Page 1 of 1

convert and verify the covertion for bit depth of 16

Posted: 2010-10-20T00:05:50-07:00
by jairainbow
i am new to imagemagic.i have 24 bit png and need to convert to 16bit png. how to do this ?. after convertion how to verify the image is convereted properly to 16 bit....
i want to implement this sloution in my java stand alone class ...so how i achive this using JMagick

Thank for the help,
Jai

Re: convert and verify the covertion for bit depth of 16

Posted: 2010-10-20T03:31:17-07:00
by anthony
You seem to be confused.

24 bit PNG means the image contains 24 bits per pixel. that is 8 bits for red, green and blue channels. a bit 'depth' of 8 pixel per value.

a 16 bit depth image means the image is saved with 16 bits per value, that is 16 bits for red,green,blue

Now can you tell use exactly what you are wanting when you say "16 bit image" ?

Re: convert and verify the covertion for bit depth of 16

Posted: 2010-10-20T04:06:57-07:00
by jairainbow
i want to convert it into 16 bit image i.e red = 5, green=6/5, blue=5

Re: convert and verify the covertion for bit depth of 16

Posted: 2010-10-21T20:37:53-07:00
by anthony
I am not certain I know of any image file format (other than raw) that allows this.
What image file format?

Note I am not familar with all files formats so if anyone else can help, please feel free to jump in.

Re: convert and verify the covertion for bit depth of 16

Posted: 2010-10-22T06:48:23-07:00
by mlin@pelmorex.com
do you mean something similar to:
MagickSetImageDepth
MagickSetImageDepth() sets the image depth.

The format of the MagickSetImageDepth method is:

MagickBooleanType MagickSetImageDepth(MagickWand *wand, const size_t depth)
A description of each parameter follows:

wand
the magick wand.

depth
the image depth in bits: 8, 16, or 32.