Gimp currently uses 8bits/channel.
Some 16/12bit formats (eg TIFF) are supported only by scaling the data
down into 8 bits.

The colors used in color selectors, and 'single' colors are
represented as floating point values.

I suggest investigating GEGL (, which can provide pixel data
in a wide range of formats, and load images, if you require >8bpp
support. GIMP 2.5+ already depends on GEGL.

(also, with a 256-entry lookup table, converting 8bpp->float is
trivially easy and fast to implement)

On Mon, Jun 16, 2008 at 8:25 AM, TriKri <[EMAIL PROTECTED]> wrote:
> Hi!
> I am wondering which data type GIMP uses to represent the color in a pixel
> of an image? 8 bits/channel? 12 or 16 bits? float?
> According to
>, there seems
> to be some different representation types, but glaus is somewhat unknown to
> me, though.
> I'm having a bit of trouble myself deciding which type I should have in the
> program I'm going to make, to use for each channel. If I use 8 bits per
> channel, the different functions will probably run a bit faster than if I
> use floating point values.

Premature optimization is the root of all evil.
I know it's tempting, but it's really good practice to only optimize
when a) there is something fundamentally wrong with the approach taken
by the algorithm, or b) you have proof that that specific code is
unacceptably slow (bottlenecking the process)

> If you should, by chance, use floating point representation of the colors,
> is there some function in GIMP to read a jpg image directly into an image
> with floats, instead of using some function already existing to read it into
> an image with 24-bit color and then convert it to floating point values?
> /Kristofer
> --
> View this message in context: 
> Sent from the Gimp Developer mailing list archive at
> _______________________________________________
> Gimp-developer mailing list
> Gimp-developer@lists.XCF.Berkeley.EDU
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Gimp-developer mailing list

Reply via email to