Subject: | Image::Scale needs error handling rewrite for src/gif.c for giflib 5.x |
Date: | Thu, 22 Jan 2015 08:17:15 -0800 |
To: | bug-Image-Scale [...] rt.cpan.org |
From: | Mark Atkinson <atkin901 [...] gmail.com> |
Perl 5.18.4
Image::Scale 0.08
giflib 5.06
src/gif.c is incompatible with giflib 5.x
See http://giflib.sourceforge.net/gif_lib.html
* Most calls return the error code instead of just GIF_ERROR
* You need to call GifErrorString() with the return code and then print the
error.
* Undocumented (I think) function calls used originally have changed.
To fix:
* Fix error handling based on version GIFLIB version macros
* Migrate to use only documented function calls
Some errors you'll see
src/gif.c:76:44: error: too few arguments to function call, expected 3,
have 2
im->gif = DGifOpen(im, image_gif_read_buf);
~~~~~~~~ ^
/usr/local/include/gif_lib.h:181:1: note: 'DGifOpen' declared here
src/gif.c:213:50: error: no member named 'Function' in 'struct SavedImage'
if (DGifGetExtension(im->gif, &temp_save.Function, &ExtData) ==
GIF_ERROR) {
~~~~~~~~~ ^
src/gif.c:220:23: error: no member named 'Function' in 'struct SavedImage'
if (temp_save.Function == 0xF9) { // transparency info
~~~~~~~~~ ^
src/gif.c:231:15: warning: implicit declaration of function
'AddExtensionBlock' is invalid in C99 [-Wimplicit-function-declaration]
if (AddExtensionBlock(&temp_save, ExtData[0], &ExtData[1]) ==
GIF_ERROR) {
^
src/gif.c:245:21: error: no member named 'Function' in 'struct SavedImage'
temp_save.Function = 0;
~~~~~~~~~ ^
1 warning and 5 errors generated.
As this would be a wholesale rewrite, I need the upstream to patch this in
order to support 5.x in
FreeBSD ports.