Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is 24-bit with alpha png the same as 32-bit png?

Tags:

png

I'm a beginner. I asked a similar question yesterday but got downvoted somehow. So this time I try to simplify the question.

is 24-bit with alpha png the same as 32-bit png?

A few hints from you are very much appreciated.

like image 544
Wallyfull Avatar asked Feb 14 '23 03:02

Wallyfull


1 Answers

There's not such a thing as "24-bit with alpha" png image. If there is an alpha channel, then we have four channels (RGBA) [*], and the PNG is either 32bits (8 bits per channel) or 64bits (16 bits per channel) - the later is rather rare.

But you can have a "24-bits PNG with transparency", by adding a tRNS chunk that marks a single (RGB8) colour as (totally) transparent. This is not very common - and I would not call this a "24-bit with alpha".

For details about how PNG supports transparency, see here.

[*] Well, strictly speaking we can have also a grayscale image with alpha, which gives us two channels (GA = Gray+Alpha), but then the image would be either 16-bits per pixel (bitdepth=8) or 32-bits (bitdepth). Not very common. And neither gives you 24-bits.

like image 98
leonbloy Avatar answered Feb 24 '23 11:02

leonbloy