From: Cristy Date: Sat, 22 Dec 2018 15:12:36 +0000 (-0500) Subject: https://github.com/ImageMagick/ImageMagick/issues/1428 X-Git-Tag: 7.0.8-20~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=739d87ac04e6f4047538a503cbd393f4422aff93;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1428 --- diff --git a/coders/png.c b/coders/png.c index c80b4bcdc..6754a6b9b 100644 --- a/coders/png.c +++ b/coders/png.c @@ -8757,6 +8757,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. */ + image->depth=GetImageQuantumDepth(image,MagickFalse); if (image->depth <= 8 && image->taint && image->storage_class == PseudoClass) (void) SyncImage(image,exception);