Re: Image color representation?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 (gegl.org), 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 <kristoferkrus@xxxxxxxxxxx> 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
> http://pippin.gimp.org/image_processing/chap_dir.html#id2525344, 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: http://www.nabble.com/Image-color-representation--tp17855048p17855048.html
> Sent from the Gimp Developer mailing list archive at Nabble.com.
>
> _______________________________________________
> Gimp-developer mailing list
> Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
> https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
>
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux