- fix build for png-1.4.1

This commit is contained in:
Dirk Meyer 2010-04-01 16:25:59 +00:00
parent 5e1b33860a
commit e75bee1541
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=251975
2 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,20 @@
--- filters/krita/png/kis_png_converter.cc.orig 2007-05-30 23:39:37.000000000 +0200
+++ filters/krita/png/kis_png_converter.cc 2010-04-01 14:09:11.000000000 +0200
@@ -162,7 +162,7 @@
}
png_byte signature[8];
fread(signature, 1, 8, fp);
- if (!png_check_sig(signature, 8))
+ if (png_sig_cmp(signature, 0, 8))
{
return (KisImageBuilder_RESULT_BAD_FETCH);
}
@@ -785,7 +785,7 @@
void KisPNGConverter::progress(png_structp png_ptr, png_uint_32 row_number, int pass)
{
- if(png_ptr == NULL || row_number > PNG_MAX_UINT || pass > 7) return;
+ if(png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7) return;
// setProgress(row_number);
}

View file

@ -0,0 +1,20 @@
--- krita/plugins/filters/cimg/CImg.h.orig 2007-05-30 23:40:02.000000000 +0200
+++ krita/plugins/filters/cimg/CImg.h 2010-04-01 13:09:06.000000000 +0200
@@ -14840,7 +14840,7 @@
png_uint_32 width, height;
int bit_depth, color_type, interlace_type;
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_type,
- int_p_NULL, int_p_NULL);
+ NULL, NULL);
int new_bit_depth = bit_depth;
int new_color_type = color_type;
@@ -14851,7 +14851,7 @@
new_bit_depth = 8;
}
if (new_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8){
- png_set_gray_1_2_4_to_8(png_ptr);
+ png_set_extend_gray_1_2_4_to_8(png_ptr);
new_bit_depth = 8;
}
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))