- fix build for png-1.4.1

This commit is contained in:
Dirk Meyer
2010-03-29 07:19:34 +00:00
parent 426d85f02e
commit bf9c3e77f4
4 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
--- src-IL/src/il_icon.c.orig 2009-03-08 08:10:09.000000000 +0100
+++ src-IL/src/il_icon.c 2010-03-29 08:57:55.000000000 +0200
@@ -525,7 +525,7 @@
// Expand low-bit-depth grayscale images to 8 bits
if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
- png_set_gray_1_2_4_to_8(ico_png_ptr);
+ png_set_expand_gray_1_2_4_to_8(ico_png_ptr);
}
// Expand RGB images with transparency to full alpha channels

View File

@@ -0,0 +1,20 @@
--- src-IL/src/il_png.c.orig 2009-03-08 08:10:09.000000000 +0100
+++ src-IL/src/il_png.c 2010-03-29 08:49:16.000000000 +0200
@@ -105,7 +105,7 @@
Read = iread(Signature, 1, 8);
iseek(-Read, IL_SEEK_CUR);
- return png_check_sig(Signature, 8);
+ return !png_sig_cmp(Signature, 0, 8);
}
@@ -278,7 +278,7 @@
// Expand low-bit-depth grayscale images to 8 bits
if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) {
- png_set_gray_1_2_4_to_8(png_ptr);
+ png_set_expand_gray_1_2_4_to_8(png_ptr);
}
// Expand RGB images with transparency to full alpha channels

View File

@@ -0,0 +1,11 @@
--- src/lib/Epsilon.c.orig 2007-11-30 06:33:18.000000000 +0100
+++ src/lib/Epsilon.c 2010-03-29 08:52:04.000000000 +0200
@@ -773,7 +773,7 @@
}
else
{
- if ((ret = png_check_sig ((png_bytep)buf, bytes)))
+ if ((ret = !png_sig_cmp ((png_bytep)buf, 0, bytes)))
rewind (fp);
else
{

View File

@@ -0,0 +1,11 @@
--- tools/convertrgb/loadpng.c.orig 1998-09-25 17:33:59.000000000 +0200
+++ tools/convertrgb/loadpng.c 2010-03-29 09:05:19.000000000 +0200
@@ -161,7 +161,7 @@
return 0;
fread(buf, 1, 8, f);
fclose(f);
- return (int)png_check_sig(buf, 8);
+ return (int)!png_sig_cmp(buf, 0, 8);
#else
return 0;
#endif