Page 1 of 1

16-bit grayscale images

Posted: Tue Jun 01, 2010 11:38 pm
by cyockey
How are 16-bit grayscale images handled by GdPicture? I assume that they are mapped down to 8-bit. Is there a Look Up Table that allows me to adjust which shades show up? Thanks.

Calvin

Re: 16-bit grayscale images

Posted: Thu Jun 03, 2010 10:11 am
by Loïc
Hi Calvin,

16 bpp grayscale bitmap are converted to 8bpp grayscale using linear conversion:

0-255 becode RGB(0,0,0)
256-511 become RGB(1,1,1)
512-767 become RGB(2,2,2)
...

Hope this helps.

Re: 16-bit grayscale images

Posted: Thu Jun 03, 2010 3:31 pm
by cyockey
Thanks for the reply, Loïc.

Do you store the entire 16-bits in memory and just do the transform upon display? This would give me the opportunity to apply my own LUT which is necessary for medical images. Any chance you might add a LUT option?

Calvin

Re: 16-bit grayscale images

Posted: Mon Jun 07, 2010 9:47 am
by Loïc
Hi Calvin,

Sorry for the delay. No we convert the image to 8 bit based components on loading time. This for performance & easy usage purpose.

For the LUT option why not ? We have some research to do but I think we can easily bring this feature. I added it into our wish list for future investigation.

With best regards,

Loïc

Re: 16-bit grayscale images

Posted: Mon Jun 07, 2010 4:36 pm
by cyockey
Thanks for considering the LUT, Loïc. That would be very useful for diagnostic imaging.

Cheers,

Calvin