Save as PNG problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Save as PNG problem

Roger Bourne
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.

IJ 1.41o  Java 1.6.0_10

Thanks
Roger

--
-----------------------------------
Dr Roger Bourne
Lecturer, Medical Radiation Physics
Medical Radiation Sciences
University of Sydney
Tel: +61 2 9036 7350
Fax: +61 2 9351 9146

C42 - Cumberland Campus
The University of Sydney
East Street
Lidcombe
NSW 2141 Australia
-----------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Save as PNG problem

Wayne Rasband
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
Reply | Threaded
Open this post in threaded view
|

Re: Save as PNG problem

Harry Parker
In reply to this post by Roger Bourne
Hi Roger,

If you need to save 16 bit PNG files, you can use the Image IO plugins set found at
http://ij-plugins.sourceforge.net/plugins/imageio/index.html.

Then look for the 2nd PNG..., below the line in the Save As... submenu.

 --
Harry Parker
Senior Imaging Systems Engineer







________________________________
From: Roger Bourne <[hidden email]>
To: [hidden email]
Sent: Monday, August 10, 2009 12:25:41 AM
Subject: Save as PNG problem

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.

IJ 1.41o  Java 1.6.0_10

Thanks
Roger

-- -----------------------------------
Dr Roger Bourne
Lecturer, Medical Radiation Physics
Medical Radiation Sciences
University of Sydney
Tel: +61 2 9036 7350
Fax: +61 2 9351 9146

C42 - Cumberland Campus
The University of Sydney
East Street
Lidcombe
NSW 2141 Australia
-----------------------------------