]> granicus.if.org Git - imagemagick/commitdiff
Quieted warnings about png_get_iCCP and png_set_iCCP arising from libpng-1.5.0
authorglennrp <glennrp@git.imagemagick.org>
Sat, 8 Jan 2011 17:16:09 +0000 (17:16 +0000)
committerglennrp <glennrp@git.imagemagick.org>
Sat, 8 Jan 2011 17:16:09 +0000 (17:16 +0000)
ChangeLog
coders/png.c

index 19d252d5a7eb72233c3c59ac9210be76782247f5..6017885c437e40a41624c2d11a61355bcece5ab9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-08  6.6.7-1 Glenn Randers-Pehrson <glennrp@image...>
+  * Quieted some inconsequential warnings in the PNG codec due to a
+    change in the type of the PNG iCCP profile from png_charp to png_bytep
+    in libpng-1.5.0.
+
 2011-01-03  6.6.7-0 Cristy  <quetzlzacatenango@image...>
   * Handle negative heights for ICO images.
 
index 34c92cd39c729f1de6a1da1d9dbfdea36f590dc4..1ec018682d46d0dd647d54b246ae0b3d7f466e56 100644 (file)
@@ -1348,7 +1348,7 @@ static void PNGErrorHandler(png_struct *ping,png_const_charp message)
   (void) ThrowMagickException(&image->exception,GetMagickModule(),CoderError,
     message,"`%s'",image->filename);
 
-#if PNG_LIBPNG_VER < 10500
+#if (PNG_LIBPNG_VER < 10500)
   longjmp(ping->jmpbuf,1);
 #else
   png_longjmp(ping,1);
@@ -1853,8 +1853,15 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
       int
         compression;
 
+#if (PNG_LIBPNG_VER < 10500)
+      png_charp
+        info;
+#else
+      png_bytep
+        info;
+#endif
+
       png_charp
-        info,
         name;
 
       png_uint_32
@@ -8268,7 +8275,11 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
                if (ping_exclude_iCCP == MagickFalse)
                  {
                        png_set_iCCP(ping,ping_info,(const png_charp) name,0,
+#if (PNG_LIBPNG_VER < 10500)
                          (png_charp) GetStringInfoDatum(profile),
+#else
+                         (png_const_bytep) GetStringInfoDatum(profile),
+#endif
                          (png_uint_32) GetStringInfoLength(profile));
                  }
              }