Page 1 of 1

reduce colour

Posted: 2010-11-03T04:40:07-07:00
by kelvin
Hi,

we are using imagemagic in our java application. we have a scenario that we need to convert the images into 16 bits.
We converted the images into 16 bits by using mogrify command -depth 16. But it is converting to 48 bits infact.
that means 16 bit Red, 16 bit Green,16 bit blue. what we need is total 16 bits. like 5-6-5. Any idea how to reduce the colour
of converted image?


Thanks
Kelvin.

Re: reduce colour

Posted: 2010-11-03T08:59:26-07:00
by fmw42
IM -depth means bits/channel not bits/image

If you are on Q16 IM, then you will get 16-bits/color channel nominally. To get 8-bits/channel use -depth 8. To get 8-bits per image, use -colors 256 +dither -type palette.

I don't know of any format that supports 16-bits per image. But I am not an expert on that or if IM can produce that. It may be possible with PNG special output controls. see http://www.imagemagick.org/Usage/formats/#png_write

or with tiff, see http://www.imagemagick.org/Usage/formats/#tiff