gimp

How to export Palette-Based png in GIMP?


Because the nmlc ask me to add palette, so I am trying to create a palette-based png with GIMP. But I didn't see the option for palette, only the RGB, RGBA, GRAY, GRAYA. According to libpng, png have 3 types, but i only see two in GIMP(whether with or without Alpha channel). Is there a way to add palette in png file?

I was trying to find a way to add palette to the picture, but I cannot find a way to do it.


Solution

  • If your image is color-indexed in Gimp (Image > Mode > Color indexed) then it will be exported as a color-indexed PNG.

    But keep in mind that in Gimp, "Color-indexed" is really "Color-indexed GIF-style", so opacity is binary and not progressive. This of course is not a problem if your image has no transparent parts.