RSS/Atom feed Twitter
Site is read-only, email is disabled

On deep-pixel (large number of bits per channel) support...again

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

On deep-pixel (large number of bits per channel) support...again Kevin Brown 14 Jul 05:15
  On deep-pixel (large number of bits per channel) support...again David Gowers 14 Jul 08:11
Kevin Brown
2007-07-14 05:15:40 UTC (almost 17 years ago)

On deep-pixel (large number of bits per channel) support...again

My first attempt to send this doesn't seem to have made it there. Trying again with a different email gateway...

My apologies for bringing this up again. It has to be a FAQ, but my specific question is one that I wasn't able to find an answer to in the archives.

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;
};

Where a gdouble is really a double.

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?

Thanks, and sorry for the naive question...

David Gowers
2007-07-14 08:11:42 UTC (almost 17 years ago)

On deep-pixel (large number of bits per channel) support...again

On 7/14/07, Kevin Brown 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 selectors.
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.. :)