[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/graphics/kipi-plugins/common/libkipiplugins/tools
From:       Andrew Coles <andrew.i.coles () googlemail ! com>
Date:       2011-01-25 10:25:00
Message-ID: 20110125102500.32CD9AC8B9 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1216971 by coles:

Added support for libpng 1.5.  As there's only one place in the file affected
by the API change, it's done with an #if at the point where it's needed.

BUG: 264184



 M  +8 -0      kpwriteimage.cpp  


--- trunk/extragear/graphics/kipi-plugins/common/libkipiplugins/tools/kpwriteimage.cpp #1216970:1216971
@@ -398,8 +398,16 @@
     // Write ICC profile.
     if (!d->iccProfile.isEmpty())
     {
+        // In libpng 1.5, the icc profile data changed from png_charp to png_bytep
+        // BUG: 264184
+
+        #if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 5
         png_set_iCCP(png_ptr, info_ptr, (png_charp)"icc", PNG_COMPRESSION_TYPE_BASE,
+                     (png_bytep)d->iccProfile.data(), d->iccProfile.size());
+        #else
+        png_set_iCCP(png_ptr, info_ptr, (png_charp)"icc", PNG_COMPRESSION_TYPE_BASE,
                      d->iccProfile.data(), d->iccProfile.size());
+        #endif
     }
 
     // Write Software info.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic