views:

97

answers:

2
+1  Q: 

16 bits bit depth

Hi. I have an image viewed in an applet. How do I save the image as 16 bits bit depth png format? I'm using java.

+1  A: 

Conversion to 16 bit is not a part of saving the image data. You'll first have to convert the image data itself by copying to to a BufferedImage with a 16 bit ColorModel. Then just save the result as PNG.

Michael Borgwardt
Hi Michael. Thanks for your reply. By the way, i refering to 16 bits per component (Red Green Blue). That is 48 bits per pixel. Is it possible to save as 48 bits because i understand that the Java Advanced Imaging library only supports 24 bits tiff. Thank you.
@user287663: don't really have any experience working with JAI and 48bit images - but this thread http://forums.java.net/jive/message.jspa?messageID=64642 suggests that JAI does support them in principle, just not all the operations
Michael Borgwardt
A: 

You can also use this http://code.google.com/p/pngj/

leonbloy