tags:

views:

740

answers:

3

A 24 bit .png file with transparency, as those that can be generated with Photoshop, has really 24 bits distributed across each color plus the alpha ? or the 24 bit refer only to the colors and ignores the alpha (RGBA 8888).

Is there any tool to examine a PNG file and verify this kind of information? Does Photoshop have any options to verify or configure this?

+3  A: 

24 bit + alpha is actually 32 bits per pixel. Meaning you have the Red, Green, Blue and Alpha channels, each being 8 bit, allowing for 256 shades per channel translating to 256 x 256 x 256 x 256 possible colour combinations. That's what the "millions of colours" and "billions of colours" mean in certain graphics and video software.

Soviut
Thanks for Your answer. And it's there any possible way to save it in a 24 bit format which includes alpha ? using photoshop or any other tool.
José Joel.
@José, you're asking for 6 bits per channel. That format does not exist in PNG, nor in any other format I'm aware of.
Mark Ransom
@José: Theorietically you could for example have a format with 8 bits of alpha combined with the 5+6+5 color format. There is no such PNG format though.
Guffa
Thanks for your orientation.
José Joel.
@Jose, no, you need to store that alpha information somewhere, that's what the alpha channel is for.
Soviut
A: 

24 bit PNG doesn't say much. An image has a pixel format. The pixel format describes the Colorspace used (such as CMYK, RGB) and bits per channel information (i.e. how many bits are allocated to represent each channel of the colorspace in use).

Go to File > File Info > Advanced. That should tell you what you are looking for.

dirkgently
+2  A: 

As I understand it, there are three kinds of "24 bit" pngs:

  1. 24 bits with no transparency. No alpha information, truly 24 bits per pixel.

  2. 24 bits per pixel with alpha transparency. This would be 24 bits of color information with 8 bits of alpha (allows for various levels of transparency) - 32 bits per pixel total.

  3. 24 bits per pixel with binary transparency. This would be 24 bits of color information with 1 bit of alpha (transparent or not transparent) - 25 bits per pixel total.

Eric Petroelje
Apple's openGL ES programming guide recommends using RGBA5551, or RGBA4444. Those formats contain alpha ?
José Joel.
@Jose - Yes, hence the "A" in the RGBA. RGBA5551 would have 5 bits of each color + 1 alpha bit. RGBA4444 would have 4 bits of each color + 4 bits of alpha. So those would actually be 16 bit formats.
Eric Petroelje