convert and verify the covertion for bit depth of 16

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
jairainbow

convert and verify the covertion for bit depth of 16

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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" ?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
jairainbow

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

Post by jairainbow »

i want to convert it into 16 bit image i.e red = 5, green=6/5, blue=5
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

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

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
mlin@pelmorex.com

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

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