]> granicus.if.org Git - imagemagick/commitdiff
Don't SyncImage on entry to the PNG encoder if depth > 8 (lost transparency)
authorglennrp <glennrp@git.imagemagick.org>
Fri, 3 Dec 2010 14:57:40 +0000 (14:57 +0000)
committerglennrp <glennrp@git.imagemagick.org>
Fri, 3 Dec 2010 14:57:40 +0000 (14:57 +0000)
coders/png.c

index 8ce7ebb752eb5c47694fd85b5ded12eeb8eb5ccb..8dea40fec6dbffaad2222857d0fc6cf489247d29 100644 (file)
@@ -7296,7 +7296,7 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
     Sometimes we get PseudoClass images whose RGB values don't match
     the colors in the colormap.  This code syncs the RGB values.
   */
-  if (image->taint && image->storage_class == PseudoClass)
+  if (image->depth <= 8 && image->taint && image->storage_class == PseudoClass)
      (void) SyncImage(image);
 
 #if (MAGICKCORE_QUANTUM_DEPTH > 16)