/* #define PNG_USE_RESULT The result of this function must be checked */
/* #define PNG_NORETURN This function does not return */
/* #define PNG_ALLOCATED The result of the function is new memory */
-#if (PNG_LIBPNG_VER >= 10400 && PNG_LIBPNG_VER < 10500)
- #define PNG_DEPSTRUCT /* Access to this struct member is deprecated */
-#endif
+/* #define PNG_DEPSTRUCT Access to this struct member is deprecated */
#include "png.h"
#include "zlib.h"
message,"`%s'",image->filename);
#if (PNG_LIBPNG_VER < 10500)
+ /* A warning about deprecated use of jmpbuf here is unavoidable if you
+ * are building with libpng-1.4.x and can be ignored.
+ */
longjmp(ping->jmpbuf,1);
#else
png_longjmp(ping,1);
ping_pixels=(unsigned char *) NULL;
-#if (PNG_LIBPNG_VER < 10400 || PNG_LIBPNG_VER >= 10500)
if (setjmp(png_jmpbuf(ping)))
-#else
- /* Warning is unavoidable if #define PNG_DEPSTRUCT is not defined */
- if (setjmp(ping->jmpbuf))
-#endif
{
/*
PNG image is corrupt.
/*
Convert PNG pixels to pixel packets.
*/
-#if (PNG_LIBPNG_VER < 10400 || PNG_LIBPNG_VER >= 10500)
if (setjmp(png_jmpbuf(ping)))
-#else
- /* Warning is unavoidable if #define PNG_DEPSTRUCT is not defined */
- if (setjmp(ping->jmpbuf))
-#endif
{
/*
PNG image is corrupt.
png_set_write_fn(ping,image,png_put_data,png_flush_data);
ping_pixels=(unsigned char *) NULL;
-#if (PNG_LIBPNG_VER < 10400 || PNG_LIBPNG_VER >= 10500)
if (setjmp(png_jmpbuf(ping)))
-#else
- /* Warning is unavoidable if #define PNG_DEPSTRUCT is not defined */
- if (setjmp(ping->jmpbuf))
-#endif
{
/*
PNG write failed.
/*
Initialize image scanlines.
*/
-#if (PNG_LIBPNG_VER < 10400 || PNG_LIBPNG_VER >= 10500)
if (setjmp(png_jmpbuf(ping)))
-#else
- /* Warning is unavoidable if #define PNG_DEPSTRUCT is not defined */
- if (setjmp(ping->jmpbuf))
-#endif
{
/*
PNG write failed.