I feel like I’m having déjà vu. We’ve discussed this before (see
here), but with the latest versions of GIMP, new (and old) challenges have surfaced.
GIMP is a powerful, free tool, and we are lucky to have it. However, handling our specific Daimonin assets requires a certain workflow to avoid breaking the graphics.
1. Import vs. Export
When you open a PNG in GIMP, remember that GIMP imports the file into its own internal format. It doesn't "save" back to PNG directly; you must use File -> Export As... to generate a PNG. Whether you keep the project in GIMP's native .xcf format is up to you, but for the game, only the export matters.
2. The Indexed Mode Problem (The Palette Shift Bug)
Most of our assets are 8-bit transparent PNGs, usually in Indexed Mode.
Unfortunately, the palette handling in Indexed Mode—which seemed partially fixed in 2.99—appears to be broken again in recent versions (like 3.0+).
The Bug: You can see it in action by going to Colors -> Colorize and activating the "Combined filter" checkbox. As you change colors, you’ll notice a "shifting" effect. The filter shifts the color palette by one index. Same bug is also triggered, when you export an indexed mode.
Since our engine relies on a specific color index for transparency masking, this shift breaks both the colors and the transparency alignment.
3. The Workaround: Use RGB Mode
Because of this bug, we are currently forced to avoid Indexed Mode when editing with GIMP 3.x.
Before editing, go to Image -> Mode -> RGB.
Yes, this increases the file size slightly compared to Indexed mode, but it ensures visual integrity.
4. Critical Export Settings
When exporting your work back to PNG, the settings in the export dialog are crucial. To keep our transparency working:
CHECK: "Save color values for transparent pixels"
CHECK: "Save background color"
UNCHECK: Everything else.
Items like EXIF data, XMP, and other metadata significantly bloat the file size without adding any value to the game engine.
5. GIMP 3.0 Metadata (gAMA and cHRM)
GIMP 3.0+ exports include gAMA and cHRM chunks by default. While we could theoretically use metadata cleaners to strip these and save even more disk space and traffic, I currently don't have the capacity to integrate those tools into the pipeline.
Summary
Until the GIMP developers fix the palette shift bug in Indexed Mode, please convert to RGB for all (re)exports to PNG. This ensures our transparency masks stay intact and the colors don't bleed.
Hopefully, one day, GIMP will handle indexed palettes reliably again!