Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Not certain if this is bug or not, but after upgrading to imagemagick version 7, attempting to read or resize many animated gifs result in an 'invalid colormap index' error. This is also happening when trying to open animated gifs with Magick::readImages when using Magick++. This happens on both Mac OS X and Ubuntu 14.04. If this is in fact correct and intended behavior, I would appreciate it greatly if somebody could indicate to me what in particular is wrong with the gif below.
fmw42 wrote: ↑2017-07-27T14:15:15-07:00
I can confirm on IM 7.0.6.3 Q16 Mac OSX. I get the same error and no output image with or without the -layers optimize.
Thanks for confirming. Does anything seem amiss with that particular file? I know that IM is more restrictive than most utilities when handling images for security purposes, but do you know if there's been an update to the specification that GIFs need to adhere to in order to be considered valid?
No, I do not know. But if it works in IM 6, then it should work in IM 7. So it seems there may be a bug in IM 7. We will have to wait to hear back from the IM developers.
Both IMv6 and IMv7 detect an invalid colormap index. The colormap has 32 colors and the colormap index is 32 which suggests a corrupt image file or ImageMagick is not reading it correctly. IMv6 detects the problem but does not report it. We'll add a patch so it does report the problem.
According to all of the graphics control extension that I think that I found in the test file, it looks like 32 is the transparent color index.
From my reading of the GIF89a spec, decoders should skip any pixels with the transparent color index value and not modify the displayed output (https://www.w3.org/Graphics/GIF/spec-gif89a.txt, Pg16 23.viii). I think a number of tools take advantage of this to pack in more colors in conjunction with transparency optimization. My attempt at reading the spec and the raw hex could both be flawed, but I'd like to hear the developers' opinion on this.