summaryrefslogtreecommitdiff
path: root/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-04-10 03:40:48 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-04-10 03:40:48 +0000
commit503c0227622254c0ae3209a1fa72bcb68bb450bc (patch)
tree48df20533f300f819504c15af33cdc03fc386a93 /Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled
parenta9d86b73ecf95b83666e16c4d90e348c4958a63b (diff)
libgd 2.3.0
git-svn-id: svn://tug.org/texlive/trunk@54636 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled')
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/CMakeLists.txt4
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/Makemodule.am4
-rw-r--r--Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/bug00201.c8
3 files changed, 10 insertions, 6 deletions
diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/CMakeLists.txt b/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/CMakeLists.txt
index 4d0d66ba436..00351ca4c70 100644
--- a/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/CMakeLists.txt
+++ b/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/CMakeLists.txt
@@ -1,8 +1,10 @@
+LIST(APPEND TESTS_FILES
+ exact_alpha
+)
IF(PNG_FOUND)
LIST(APPEND TESTS_FILES
basic
basic_alpha
- exact_alpha
bug00201
)
ENDIF(PNG_FOUND)
diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/Makemodule.am b/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/Makemodule.am
index 5d0d714e8bb..d42eab559c2 100644
--- a/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/Makemodule.am
+++ b/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/Makemodule.am
@@ -1,8 +1,10 @@
+libgd_test_programs += \
+ gdimagecopyresampled/exact_alpha
+
if HAVE_LIBPNG
libgd_test_programs += \
gdimagecopyresampled/basic \
gdimagecopyresampled/basic_alpha \
- gdimagecopyresampled/exact_alpha \
gdimagecopyresampled/bug00201
endif
diff --git a/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/bug00201.c b/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/bug00201.c
index 053b6db3b72..0287267e6f2 100644
--- a/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/bug00201.c
+++ b/Build/source/libs/gd/libgd-src/tests/gdimagecopyresampled/bug00201.c
@@ -48,23 +48,23 @@ int main()
fp = gdTestFileOpen2("gdimagecopyresampled", "bug00201_src.png");
logo_source = gdImageCreateFromPng(fp);
fclose(fp);
-
+
logo = blank_image(SRC_WIDTH,SRC_HEIGHT);
gdImageAlphaBlending(logo, 0);
gdImageCopy(logo, logo_source, 0,0, 0,0, SRC_WIDTH,SRC_HEIGHT);
gdImageDestroy(logo_source);
-
+
scaled_logo = blank_image(DEST_WIDTH,DEST_HEIGHT);
gdImageAlphaBlending(scaled_logo, 0);
gdImageCopyResampled(scaled_logo, logo, 0,0, 0,0, 200,105, SRC_WIDTH,SRC_HEIGHT);
gdImageDestroy(logo);
-
+
layers[0] = background;
layers[1] = scaled_logo;
img = flatten(layers, 2, DEST_WIDTH, DEST_HEIGHT);
gdImageDestroy(background);
gdImageDestroy(scaled_logo);
-
+
gdAssertImageEqualsToFile("gdimagecopyresampled/bug00201_exp.png", img);
gdImageDestroy(img);
return gdNumFailures();