From: cristy Date: Sat, 8 May 2010 13:36:57 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~9525 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=80ac8b9110f1adf7202ed1f4f244cbb1a4e1a56f;p=imagemagick --- diff --git a/ChangeLog b/ChangeLog index 74a596af1..0b83adf24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2010-05-08 6.6.1-7 Cristy + * Fix improper 'invalid colormap index' PNG bug. + 2010-05-07 6.6.1-6 Anthony Thyssen * Added % and ! modification flags to morphology distance kernel scaling factor, for easier usage. diff --git a/coders/png.c b/coders/png.c index 263cedb51..9456f2fa9 100644 --- a/coders/png.c +++ b/coders/png.c @@ -2524,9 +2524,6 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, else /* image->storage_class != DirectClass */ for (pass=0; pass < num_passes; pass++) { - IndexPacket - indice; - Quantum *quantum_scanline; @@ -2687,13 +2684,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, */ r=quantum_scanline; for (x=0; x < (long) image->columns; x++) - { - indice=(IndexPacket) (*r++); - indexes[x]=indice; - q->red=image->colormap[(int) indice].red; - q->green=image->colormap[(int) indice].green; - q->blue=image->colormap[(int) indice].blue; - } + indexes[x]=(IndexPacket) (*r++); if (SyncAuthenticPixels(image,exception) == MagickFalse) break; if ((image->previous == (Image *) NULL) && (num_passes == 1))