On Thu, 2007-06-07 at 01:05 +0200, Henning Makholm wrote:
> One cannot do this, in general, because an indexed PNG stores a single
> alpha value for each palette entry. An image with an unrestricted
> alpha channel would most likely lead to more color/alpha combinations
> than the 256 palette slots available in PNG.
That is one way of storing alpha and indexed colors in PNG. As far as I
know there's also another mode that involves a real alpha channel. That
should be easily implementable.
> I can see good software-engineering reasons to want to eliminate
> indexed representation internally, but from a usability standpoint it
> will be a loss not to be able to restrict the possible color values to
> a predetermined palette.
> Imagine finding out only after several hours of editing that some of
> the pixels you intended to be (255,192,53) accidentally became
> (255,192,54), and others became (255,188,53) and a few of the
> (64,64,0) became (64,64,3), and this is a source of immense confusion
> to software later your build process, which recognizes exactly those
> colors to have a special meaning, and now you have to go through a few
> dozen layers to find all of the misfit pixels and correct their color
> one layer and color at a time. Indexed editing prevents making the
> mistake in the first place; if I have not explicitly added
> (255,192,54) to the palette I know that I'll not risk finding it in
> the output.
This is not exactly the kind of job that we design GIMP for. You will
have to use another application (or an older version of GIMP) for this
Gimp-developer mailing list