diff options
Diffstat (limited to 'graphics/GraphicsMagick/files/patch-coders__png.c')
-rw-r--r-- | graphics/GraphicsMagick/files/patch-coders__png.c | 67 |
1 files changed, 51 insertions, 16 deletions
diff --git a/graphics/GraphicsMagick/files/patch-coders__png.c b/graphics/GraphicsMagick/files/patch-coders__png.c index 49c65302d833..ff6d44b05c8c 100644 --- a/graphics/GraphicsMagick/files/patch-coders__png.c +++ b/graphics/GraphicsMagick/files/patch-coders__png.c @@ -1,6 +1,32 @@ --- coders/png.c.orig 2008-01-18 00:34:17.000000000 +0100 -+++ coders/png.c 2010-03-28 19:51:04.000000000 +0200 -@@ -2038,10 +2038,10 @@ ++++ coders/png.c 2012-04-29 07:23:05.000000000 +0200 +@@ -73,6 +73,7 @@ + #if defined(HasPNG) + #include "png.h" + #include "zlib.h" ++#include "pngpriv.h" + + #if PNG_LIBPNG_VER > 95 + /* +@@ -1365,7 +1366,7 @@ + " libpng-%.1024s error: %.1024s", PNG_LIBPNG_VER_STRING, + message); + (void) ThrowException2(&image->exception,CoderError,message,image->filename); +- longjmp(ping->jmpbuf,1); ++ longjmp(png_jmpbuf(ping),1); + } + + static void PNGWarningHandler(png_struct *ping,png_const_charp message) +@@ -1660,7 +1661,7 @@ + ThrowReaderException(ResourceLimitError,MemoryAllocationFailed,image) + } + png_pixels=(unsigned char *) NULL; +- if (setjmp(ping->jmpbuf)) ++ if (setjmp(png_jmpbuf(ping))) + { + /* + PNG image is corrupt. +@@ -2038,10 +2039,10 @@ /* Image has a transparent background. */ @@ -15,7 +41,7 @@ if (ping_info->color_type == PNG_COLOR_TYPE_GRAY) { transparent_color.red=transparent_color.opacity; -@@ -2547,7 +2547,7 @@ +@@ -2547,7 +2548,7 @@ index=indexes[x]; if (index < ping_info->num_trans) q->opacity= @@ -24,7 +50,16 @@ q++; } else if (ping_info->color_type == PNG_COLOR_TYPE_GRAY) -@@ -6229,12 +6229,12 @@ +@@ -6030,7 +6031,7 @@ + png_set_write_fn(ping,image,png_put_data,png_flush_data); + png_pixels=(unsigned char *) NULL; + +- if (setjmp(ping->jmpbuf)) ++ if (setjmp(png_jmpbuf(ping))) + { + /* + PNG write failed. +@@ -6229,12 +6230,12 @@ /* Identify which colormap entry is transparent. */ @@ -40,7 +75,7 @@ for (y=0; y < (long) image->rows; y++) { register const PixelPacket -@@ -6254,7 +6254,7 @@ +@@ -6254,7 +6255,7 @@ index=indexes[x]; assert((unsigned long) index < number_colors); @@ -49,7 +84,7 @@ ScaleQuantumToChar(p->opacity)); } p++; -@@ -6262,14 +6262,14 @@ +@@ -6262,14 +6263,14 @@ } ping_info->num_trans=0; for (i=0; i < (long) number_colors; i++) @@ -66,7 +101,7 @@ /* Identify which colormap entry is the background color. */ -@@ -6388,12 +6388,12 @@ +@@ -6388,12 +6389,12 @@ if (ping_info->bit_depth == 1) mask=0x0001; ping_info->valid|=PNG_INFO_tRNS; @@ -84,7 +119,7 @@ (ScaleQuantumToChar(MaxRGB-p->opacity)); } if (ping_info->valid & PNG_INFO_tRNS) -@@ -6413,7 +6413,7 @@ +@@ -6413,7 +6414,7 @@ { if (p->opacity != OpaqueOpacity) { @@ -93,7 +128,7 @@ { break; /* Can't use RGB + tRNS for multiple transparent colors. */ -@@ -6426,7 +6426,7 @@ +@@ -6426,7 +6427,7 @@ } else { @@ -102,7 +137,7 @@ break; /* Can't use RGB + tRNS when another pixel having the same RGB samples is transparent. */ -@@ -6444,10 +6444,10 @@ +@@ -6444,10 +6445,10 @@ ping_info->color_type &= 0x03; /* changes 4 or 6 to 0 or 2 */ if (image->depth == 8) { @@ -117,7 +152,7 @@ } } } -@@ -6463,7 +6463,7 @@ +@@ -6463,7 +6464,7 @@ { ping_info->color_type=PNG_COLOR_TYPE_GRAY; if (save_image_depth == 16 && image->depth == 8) @@ -126,7 +161,7 @@ } if (image->depth > QuantumDepth) image->depth=QuantumDepth; -@@ -6577,14 +6577,14 @@ +@@ -6577,14 +6578,14 @@ /* Identify which colormap entry is transparent. */ @@ -144,7 +179,7 @@ for (y=0; y < (long) image->rows; y++) { register const PixelPacket -@@ -6604,21 +6604,21 @@ +@@ -6604,21 +6605,21 @@ index=indexes[x]; assert((unsigned long) index < number_colors); @@ -169,7 +204,7 @@ } /* -@@ -6636,10 +6636,10 @@ +@@ -6636,10 +6637,10 @@ image->depth=8; if ((save_image_depth == 16) && (image->depth == 8)) { @@ -184,7 +219,7 @@ } } -@@ -6666,8 +6666,8 @@ +@@ -6666,8 +6667,8 @@ " Setting up bKGD chunk"); png_set_bKGD(ping,ping_info,&background); @@ -195,7 +230,7 @@ } } if (logging) -@@ -7174,7 +7174,7 @@ +@@ -7174,7 +7175,7 @@ #endif if (ping_info->valid & PNG_INFO_tRNS) { |