GIMP not exporting indexed PNGs correctly
Environment/Versions
- GIMP version: 2.10.36
- Package: Installer from gimp.org
- Operating System: Windows
Exporting an indexed PNG causes the image to be corrupted. An additional color is added to the beginning of the palette, causing all of the colors in the image to be shifted over one palette color. Exporting that image causes the corruption to happen again, demonstrating that it's not because of some malformed input file. Description of the bug
This is the image I used as a sample. I was originally intending to crop it to content, but I didn't in this case to demonstrate that it wasn't caused by altering the image.
This is the result of exporting the image.
This is the result of exporting the exported image.
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Load an indexed PNG image.
- Export it as a PNG without changing it.
- Load the image you just exported.
- Export the image as a PNG again without changing it.
- Load the image you just exported.
Expected result: No change to the image.
Actual result: The image's palette is altered, causing the image to change.
Additional information
None.