2010-03-24 6.6.0-9 Glenn Randers-Pehrson <glennrp@image...>
* coders/png.c: Eliminated support of libpng versions older than 1.0.12.
* Relocated the new, misplaced png_get_rowbytes() call.
+ * Updated setjmp/longjmp/jmpbuf usage to work with libpng-1.5.
2010-03-21 6.6.0-9 Cristy <quetzlzacatenango@image...>
* Windows does not support complex.h (reference
/* Suppress libpng pedantic warnings that were added in
* libpng-1.2.41 and libpng-1.4.0. If you are working on
- * migration to libpng-2.0, remove these defines and then
+ * migration to libpng-1.5, remove these defines and then
* fix any code that generates warnings.
*/
/* #define PNG_DEPRECATED Use of this function is deprecated */
" libpng-%s error: %s", PNG_LIBPNG_VER_STRING,message);
(void) ThrowMagickException(&image->exception,GetMagickModule(),CoderError,
message,"`%s'",image->filename);
+#if PNG_LIBPNG_VER < 10500
longjmp(ping->jmpbuf,1);
+#else
+ png_longjmp(ping,1);
+#endif
}
static void PNGWarningHandler(png_struct *ping,png_const_charp message)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
}
png_pixels=(unsigned char *) NULL;
- if (setjmp(ping->jmpbuf))
+ if (setjmp(png_jmpbuf(ping)))
{
/*
PNG image is corrupt.
/*
Convert PNG pixels to pixel packets.
*/
- if (setjmp(ping->jmpbuf))
+ if (setjmp(png_jmpbuf(ping)))
{
/*
PNG image is corrupt.
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.
if ((y == (long) image->rows) && (x == (long) image->columns))
{
/*
- No transparent pixels are present. Change 4 or 6 to 0 or 2,
- and do not set the PNG_INFO_tRNS flag in ping_info->valid.
+ No transparent pixels are present. Change 4 or 6 to 0 or 2.
*/
image_matte=MagickFalse;
ping_color_type&=0x03;
/*
Initialize image scanlines.
*/
- if (setjmp(ping->jmpbuf))
+ if (setjmp(png_jmpbuf(ping)))
{
/*
PNG write failed.