A Slightly Deeper Dive into Digital Image Channel Information
- Mohamed Benaicha
- Nov 22, 2023
- 5 min read
Updated: Nov 24, 2023
A digital image is fundamentally comprised of slates called channels, each of which represent a color. When these channels are stacked on top of each other, they create a wonderfully-colored image. The most common digital image type is the one that portrays red, green and blue information, each on a separate channel. The intensity of each of the red, green and blue colors determines the color resulting from the combination of the three colors.

A purple image results from higher values on the red and blue channels where as a purely green image results from completely darkened blue and red channels and high values (saturated) on the blue channel. White and black result when all three channels are at their highest and lowest intensities respectively. Besides having 3 entire channels to represent whatever information you want, the combination of the three channels is what truly distinguishes red, green and blue images - also called an RGB image.

There are also images that represent white and black information only on a single channel. Such images are called greyscale images and are of use in a lot of contexts such as medical imaging, geological surveys and 3D design where a single channel provides sufficient information to depict the content of the image.

Colored Digital Images - Red, Green and Blue
Digital images are comprised of three "channels" or layers, each which contains information about the intensity of red, green and blue. Each channel has higher values if it wants to represent a color intensely, or values if does not want to represent a color intensely.
The following image represents for example is comprised of only red, where the green and blue channels are completely darkened:

Figure 1
The value of the red channel ranges from intense to not so intense. Intense values are represented by a high value, say 200, 250 or 255, while not-so-intense values are represented by lower values like 0 or 10 or 30.
The image in Figure 1 has dimensions 8 x 8, meaning 8 rows of pixels, each row having 8 columns, totalling 64 pixels. The red channel of the image has the following values:

Figure 2: the red channel of the image depicted in Figure 1
Intensely-red pixels such as those in the middle have higher value (up to a maximum bit depth of 255 - we'll get into the bit depth of the image later), while dark pixels such as those around the center have a lower value. The blue and green channels are both full of zeros since no green or blue appears on the image:


Figure 3: the green and blue channels of the image depicted in Figure 1
Let's add a bit of blue in the middle and see what happens. The result blue channel looks like this:

Figure 4
The resultant combination of red, green and blue channels looks like this:

Figure 5
As expceted, we create purple. The resultant red and green channels have not changed, but the new blue channel looks like:

Figure 6: blue channel information of the image in Figure 5
The blue pixels that are brightest in a more concentrated region in the center of the image have high values as opposed to those all around which are nearly zero.
Greyscale Images
Greyscale images only depict the colors ranging from black to white. White has the higher values, whereas black has the lower value.
A bright pixel on a greyscale map has a value of, say, 200 or 250, whereas as a dark grey pixel has a value of, say, 50. The following image depicts the a greyscale map where the pixels at the center are darkest represented by low values whereas the surrounding pixels are whiter represented by higher values:


Figure 6: A greyscale image with one channel with the respective pixel values
The Alpha Channel
The alpha channel represents transparency. A high value on the alpha channel represents an opaque (non-transparent) part of the image where as a lower value represents a more transparent part of the image. In computer graphics, alpha channels serve many purposes such as hiding color information and allowing whatever is behind the object to appear instead. They can also be used for other purposes indicated in the following section.
Here's an alpha channel that applies transparency to the image in Figure 1.


Figure 7: alpha transparency is applied to the image in Figure 1, with the respective pixel values
As is evident from the values, the middle of the image is more transparent indicated by the checkered pattern, whereas the surrounding areas are opaquer (yes that is an actual word) and show color information. An important note is that alpha channels do not "erase" the color information but simply hide it.
The Alpha Channel in Computer Graphics
In computer graphics, artists can also use alpha channel information for storing light or depth information (and not necessarily for transparency) in the form of metallic or height maps - two examples among others. A higher value of the alpha that represents a metallic map indicates a metallic surface of a 3D object that reflects light intensely whereas a lower value indicates less intense light reflection meaning that the object surface is rougher. On a height map for example, a higher alpha value indicates higher bumps on the geometry's surface and vice versa for a lower alpha value. This isn't strict, but rather a demonstration that alpha information can be used to store information other than transparency.
Color Depth
Color depth simply refers to the levels of a color that an image can store. In the examples above, the maximum value on a channel was 255 whereas the lowest value was 0 meaning 256 (including 0 and 255) levels of red can be stored in a red channel; likewise for the green and blue channels.
In such images, the color depth is 8 bits. The number of levels of a single color that 8 bits can represent are 2 raised to the power of 8 which equates to 255. Hence, an image with 8-bit depth can represent:
256 levels of red
256 levels of green
256 levels of blue
256 levels of transparency/opacity
The total bit depth of the image is then 32 (8 + 8 + 8 + 8).
Other color depths include 16 and 32. A an image with a 16-bit color depth can represent up to 65536 levels of each color (i.e., 2 raised to the power of 16)! The total bit depth of the image is then 64 (16 + 16 + 16 + 16). A color with 32-bit color depth can represent a whopping 4,294,967,296 levels per color.
An image with 8-bit color depth can represent upwards of of 16 million colors (i.e., 256 x 256 x 256). Theoretically, the human eye can only distinguish 10 million of those colors. The number of colors that can be represented by a 16-bit depth image is roughly 281.5 trillion while a 32-bit depth image can represent roughly 79.2 octillion colors!
Comments