Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#9 png_set_gray_1_2_4_to_8 function is obsolete with libpng 1.4

open
nobody
None
5
2010-05-16
2010-05-16
Samuli Suominen
No

In src/pslib.c, the "png_set_gray_1_2_4_to_8" function must be renamed to "png_set_expand_gray_1_2_4_to_8" to be compatible with libpng 1.4.

It will compile without, but print out a compile warning about implicit declaration.

And then pslib will crash and burn at runtime :-/

The fix is trivial:

sed -i -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' src/pslib.c

Discussion

  • Also I'd like to mention that renaming the function is perfectly compatible with libpng 1.2... so no #ifdef's are required.