I had a few GIF files that I converted to PNG and tried to run the tool with. It generates a corrupted image. Attached a sample image and a patch that fixes it. [color-index.patch.zip](https://github.com/SpatialInteractive/9-patchedit/files/711577/color-index.patch.zip) 