Login  Register

Re: Applying LUT to PNG image changes bit

Posted by Rasband, Wayne (NIH/NIMH) [E] on Apr 13, 2015; 11:49pm
URL: http://imagej.273.s1.nabble.com/Applying-LUT-to-PNG-image-changes-bit-tp5012460p5012462.html

On Apr 13, 2015, at 6:24 PM, Neil Fazel <[hidden email]> wrote:
>
> When I apply an LUT to a 16-bit PNG image and save it, it is saved as an 8-bit PNG image. Is this the expected behavior? My understanding was that applying a lookup table to an image should not change the image type (e.g. bit depth) when the image is saved.

Applying a lookup table does not change the bit depth when saving in TIFF format. This is not the case when saving in PNG format because 16-bit images are saved using

   ImageIO.write(BufferedImage, "png", File)

and, as far as I know, there is no way to create a 16-bit BufferedImage that has a lookup table.

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html