PNG question

Moderator: jsachs

Post Reply
MarkT
Posts: 367
Joined: April 24th, 2009, 2:07 pm

PNG question

Post by MarkT »

Just curious, is there any chance of being able to save a 32-bit transparent PNG? Another software requires 32-bit files to use brushes when creating painting effects.

Thanks

Mark
jsachs
Posts: 4268
Joined: January 22nd, 2009, 11:03 pm

Re: PNG question

Post by jsachs »

Is that not what is saved currently when you save a 24-bit color image with an alpha layer for transparency?
Jonathan Sachs
Digital Light & Color
MarkT
Posts: 367
Joined: April 24th, 2009, 2:07 pm

Re: PNG question

Post by MarkT »

Apparently not. I had a problem with creating brushes for use with the software (fotosketcher.com - Painting 4 custom brush), and the programmer said my PNG file was not 32-bit (so I'm taking his word for it.). I made a few brushes with Paint.net, which gives the option to chose the bit-depth when saving PNG files, and the 32-bit files work just fine.

Not knowing anything about how this might work, I thought you might be able to shed some light on the matter. How can I tell what the bit-depth is for a given file? When I open a 32-bit file in PWP, it's showing 24-bit, and the transparent background is filled with a solid colour:
pwp_png.jpg
pwp_png.jpg (37.39 KiB) Viewed 2148 times
jsachs
Posts: 4268
Joined: January 22nd, 2009, 11:03 pm

Re: PNG question

Post by jsachs »

Does he mean 32 bits per pixel or per channel? PWP transparent PNG are 32 bits per pixel - 8 bits each for R, G, B and transparency.

Saved transparent PNG files appear to open OK in Photoshop and also display correctly in Chrome.

PWP does not support transparency when you open files, so the transparency mask is just ignored and you get a solid background instead. It has been on my list for a while to support transparency masks in PNG and TIFF files, but it's not well documented how to get it to work.
Jonathan Sachs
Digital Light & Color
MarkT
Posts: 367
Joined: April 24th, 2009, 2:07 pm

Re: PNG question

Post by MarkT »

David at Fotosketcher says 32 bits per pixel are required.

When I open a PNG in Firefox, this is what I see: I didn't think the checkered background would be visible?

png_open_in_Firefox.jpg
png_open_in_Firefox.jpg (51.75 KiB) Viewed 2135 times
jsachs
Posts: 4268
Joined: January 22nd, 2009, 11:03 pm

Re: PNG question

Post by jsachs »

The checkerboard is not actually part of the image -- it is just a convention Adobe started in Photoshop to indicate the image is transparent by displaying an artificial background behind the image. If you open it in Chrome you don't see the checkerboard. If you include the image as part of a web page however you should the the page background behind the image where it is transparent. This is the primary use for transparent PNG files.

The file definitely has 32 bits per pixel. It is written with bit_depth = 8 and type = PNG_COLOR_TYPE_RGB_ALPHA.

If you are saving a 48-bit color image, the PNG will be 64-bit with bit_depth = 16, so that may be the issue.
Jonathan Sachs
Digital Light & Color
MarkT
Posts: 367
Joined: April 24th, 2009, 2:07 pm

Re: PNG question

Post by MarkT »

Solved. "Operator Error" - Thanks to Jonathan for reminding me to use the "Save As" button in the Transparent PNG transformation window, instead of the "File Save As" option on the main menu.
Post Reply