reduce colour

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
kelvin

reduce colour

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: reduce colour

Post 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
Post Reply