Re: Save as PNG problem

Posted by Wayne Rasband on
URL: http://imagej.273.s1.nabble.com/Save-as-PNG-problem-tp3691200p3691202.html

On Aug 10, 2009, at 12:25 AM, Roger Bourne wrote:

> Dear List
>
> My students have found some apparently inconsistent behavior with the
> Save As PNG command.
> We opened a 16 bit dicom and used Menu: Image > Type to change to 8
> bit before saving as PNG.  Also saved as 16 bit PNG prior to this.
> The PNG file size was the same in both cases.
>
> Similarly, when an 8 bit PNG was opened and changed to 16 bit before
> saving as PNG there was no change in file size and the reopened file
> appears to still be 8 bit.
>
> Conclusion: It appears that the Save As PNG command is not reading the
> currently set bit depth.

The File>Save As>PNG command saves 16-bit images as 8-bit PNGs. It does
this so that the images are displayed corruptly in PNG readers such as
Photoshop that expect 16-bit PNGs to use the full 0-65535 (or 0-32767)
pixel value range.

-wayne