diff options
author | az6667 <az6667@gmail.com> | 2021-03-03 18:17:51 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 02:17:51 -0500 |
commit | fc38677e8005c24db891b84d3e84df7a199c979c (patch) | |
tree | 4c9d48e75eed62e4e47c700e5db3bdd272c2e572 /tests/gdimagecrop | |
parent | a9a5b459832af3f524c23dc5e795f9593d9b4fe4 (diff) | |
download | libgd-fc38677e8005c24db891b84d3e84df7a199c979c.tar.gz |
Allow GIFs missing both Global and Local Colormaps to still decode (#494)
Ensure that a GIF without any Global or Local color tables is still
decoded by libgd.
GIF89a spec indicates conforming image files need not have
Global or Local color tables at all.
Spec recommends creating custom color map in that situation, and
that at least Black+White as first two entries, to ensure B&W images
are decoded.
Some commonly used single-pixel GIFs found around the web are
undecoded by libgd otherwise. Test case has been included.
References:
https://www.w3.org/Graphics/GIF/spec-gif89a.txt
http://probablyprogramming.com/2009/03/15/the-tiniest-gif-ever
Diffstat (limited to 'tests/gdimagecrop')
-rw-r--r-- | tests/gdimagecrop/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/gdimagecrop/CMakeLists.txt b/tests/gdimagecrop/CMakeLists.txt index 43f6f6c..f5c309e 100644 --- a/tests/gdimagecrop/CMakeLists.txt +++ b/tests/gdimagecrop/CMakeLists.txt @@ -7,4 +7,10 @@ LIST(APPEND TESTS_FILES bug00486 ) +IF(PNG_FOUND) +LIST(APPEND TESTS_FILES + bug00486 +) +ENDIF(PNG_FOUND) + ADD_GD_TESTS() |