From eb7359f33a6d3ceaa7a7385cd500aefde23c7294 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Mon, 21 Feb 2011 00:57:28 -0800 Subject: Conditional code to handle data change in libpng > 1.5. Fixes bug #721029. Fixed bugs: - https://launchpad.net/bugs/721029 (bzr r10061) --- src/sp-image.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/sp-image.cpp') diff --git a/src/sp-image.cpp b/src/sp-image.cpp index ed9d84b70..8bd1bfadd 100644 --- a/src/sp-image.cpp +++ b/src/sp-image.cpp @@ -387,9 +387,13 @@ static bool readPngAndHeaders( PushPull &youme, gint & dpiX, gint & dpiY ) #if defined(PNG_iCCP_SUPPORTED) { - char* name = 0; + png_charp name = 0; int compression_type = 0; - char* profile = 0; +#if (PNG_LIBPNG_VER < 10500) + png_charp profile = 0; +#else + png_bytep profile = 0; +#endif png_uint_32 proflen = 0; if ( png_get_iCCP(pngPtr, infoPtr, &name, &compression_type, &profile, &proflen) ) { // g_message("Found an iCCP chunk named [%s] with %d bytes and comp %d", name, proflen, compression_type); -- cgit v1.2.3