24-bit to 12-bit color reduction

Comments and discussions about Adobe Photoshop
Post Reply
'dacker

24-bit to 12-bit color reduction

Post by 'dacker »

I have an unusual application where I need to reduce 24-bit images to 12-bit images (4 bits per channel, 4096 total colors). On top of this, the RGB values MUST be EXACTLY certain values: 0,17,34,51,68,...255

I have been unable to find a way to do this and would appreciate any and all suggestions.

My searches on the net showed that 12-bit displays are being used on iPAQs and some color cell phones. This is not for any of these devices.

HaraldHeim
Plugin Guru
Plugin Guru
Posts: 3363
Joined: Fri Mar 08, 2002 1:00 am
Location: The Plugin Site
Contact:

Post by HaraldHeim »

Well that conversion is quite easy. Just divide each R, G and B value which ranges from 0 to 255 for 24bit images by 16. To get the 0,17,34,51,68,...255 values multiply the divided values with 17.

Post Reply