On 7/14/07, Kevin Brown <[EMAIL PROTECTED]> wrote:
> My question is this: where is the 8-bit per color channel limitation in
> GIMP?  That is, which bits of the source code limit the GIMP this way?
> I ask because I took a brief look at the source, and it seems the
> internal color representation is stored in a GimpRGB struct, but that's
> one of these:
>      struct _GimpRGB
>      {
>        gdouble r, g, b, a;
>      };
Ah, GimpRGB is unrelated to the format a picture is stored in. It's
used for things like specifying colors in palettes and color
If you look around some more, there are also structures like GimpHSV,
GimpHSL, GimpCMYK encapsulating other useful color formats.

> In other words, it looks based on this naive examination like GIMP is
> already capable of handling pretty much arbitrary resolution per channel.
> What am I missing, and where do I need to look to see the limitations
> that prevent GIMP from handling more than 8 bits per channel?

Uh... just about anywhere in the backend and plugins. There are
assumptions made all over the place that a single component is stored
in a single guchar (unsigned int, 0..255). There are assumptions that
the bytes per pixel determines directly how many channels are in the
image;rgba values are considered as having the range 0..255, etc...

If you want specific places, ignore everything outside the app/ directory.
base/ is the most blatant (and important) example of these assumptions
- a majority of the .c and .h files there include such assumptions.

> Thanks, and sorry for the naive question...
Eh, you've gotta start somewhere, it's fine.. :)
Gimp-developer mailing list

Reply via email to