summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2011-02-21 08:57:28 +0000
committerJon A. Cruz <jon@joncruz.org>2011-02-21 08:57:28 +0000
commiteb7359f33a6d3ceaa7a7385cd500aefde23c7294 (patch)
treec936f03f805bf6fbacfc5a3315e745f5158ed9ed /src
parentFinished cleanup of outated SP_OBJECT_DOCUMENT C macro. (diff)
downloadinkscape-eb7359f33a6d3ceaa7a7385cd500aefde23c7294.tar.gz
inkscape-eb7359f33a6d3ceaa7a7385cd500aefde23c7294.zip
Conditional code to handle data change in libpng > 1.5. Fixes bug #721029.
Fixed bugs: - https://launchpad.net/bugs/721029 (bzr r10061)
Diffstat (limited to 'src')
-rw-r--r--src/sp-image.cpp8
1 files changed, 6 insertions, 2 deletions
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);