Updated credits; Fix issue 309: Libpng 1.4 breaks build process

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1396 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2010-03-22 00:58:00 +00:00
parent 481ea4579f
commit df5db73f5a
2 changed files with 14 additions and 1 deletions

View File

@@ -3375,7 +3375,15 @@ void Load_PNG(T_IO_Context * context)
{
// Map low bpp greyscales to full 8bit (0-255 range)
if (bit_depth < 8)
png_set_gray_1_2_4_to_8(png_ptr);
{
#if (PNG_LIBPNG_VER_MAJOR <= 1) && (PNG_LIBPNG_VER_MINOR < 4)
// Works well with png 1.2.8, but deprecated in 1.4 ...
png_set_gray_1_2_4_to_8(png_ptr);
#else
// ...where this seems to replace it:
png_set_expand_gray_1_2_4_to_8(png_ptr);
#endif
}
// Create greyscale palette
for (x=0;x<256;x++)