-2

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.

  • 1
    SO is a programming Q&A platform and this question is not about programming. Questions about operating systems, their utilities, networking and hardware, are off topic here. [What topics can I ask about here?](https://stackoverflow.com/help/on-topic). Please delete this – Rob Dec 03 '22 at 11:15

1 Answers1

1

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.

xenoid
  • 8,396
  • 3
  • 23
  • 49