The Alpha Channel – Transparency

Before we move on to the other image formats namely the PNG and GIF, it will be useful to understand more about this Alpha Channel or Layer that is gaining popularity. This layer is the reason behind the transparency / opacity of any image.

The Alpha Channel is to be seen as any normal RGB / YCbCr layer. It has as many values as the number of pixels making the image. The fundamental concept is that a zero alpha represents a completely transparent pixel, while maximum (255 in case of 8-bit) alpha represents a completely opaque pixel. Thus we can conclude saying that the Alpha Channel is more a measure of the Opacity.

When the complete alpha layer has values 255, i.e. maximum; we consider that the image can be treated as a normal image, and the alpha-layer is knocked off. This image is stored / compressed and is not considered as lossy from the original, which is rather satisfactory. This is called Alpha Separation.

We shall see that during the PNG encoding procedure, a process called Alpha Compaction. In this, if there exist an RGB value for which all pixels are transparent, while for all other pixels, the image is opaque, then we carry out a special procedure to achive higher compression ratios.

Its preferable to have this transparent background in images of objects, i.e. the foreground. We’ll move over to PNG compression in the next post.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s