As we mentioned earlier, raster image is actually just a grid of small squares called pixel, each pixel will have to store at least three information, how much strength is for the red color, how much is for the green color, and finally, how much is for the blue color, different level of red, green and blue colors will determine the color of the pixel. These three types of information for each existing pixel are called channels. Basically, channel is just a block of data inside a pixel to hold the color components. So, we have red channel, green channel and blue channel. Now, besides red, green and blue channels, we can also have alpha channel in our image. Essentially, alpha channel is additional channel which is used for controlling the transparency of each of the pixels.
You must be aware though, that not all image file formats support alpha channel, PNG, Tiff, and TGA file formats are some of the examples that support alpha channel. So using these file formats, we can have transparency, because again, each pixel in that file can have four channels total, which consists of three channels for the color or the RGB values and one channel for transparency or the alpha channel. Okay, now, we are going to discuss the nitty gritty of image file formats. And that will be the number of bits in each channel. If we have Krita open and then press Ctrl N, or click this new document button, we can see there is a pulldown list in here that says eight bits per channel. If we click on the button, we can see a lot more options in here.
We have a 32 bit 16 bit integer, and 16 bit float. Now you need to know that all standard images only use eight bit per channel. This is the setting for common images you see in the web, or images you see in screen devices such as TV, mobile phones, tablets, etc. Okay, so what is the exactly bit per channel value means this number means that for each channel in the image will have eight bits memory slot. So, we have eight slots for red, eight slots for green and eight slots for blue. And if we have alpha channel, then we have another eight slots for it.
Okay. Now computers actually only know binary numbers which are zero and one. So these eight slots will be filled in with a bunch of zero and one numbers. For example, it can be something like this Now these are just random digit numbers, just to give you an example. Okay? What we can count with the setup is that if we have eight probable space, and two probable values, which are zero and one, how much is the total configurations that we can get from it?
Well, that will be to Power BI eight equals to 256 variations. So with eight bits per channel, each channel can have one to 256 probable values. But if we start from zero instead of one, we can have zero to 255 values for each channel. That is why when we open the color selector in Krita, each of the channels red, green and blue can only have a maximum value of 255 because we start from zero. Also, if we have alpha channel, the level of therapy Currency can spread from zero as the lowest value, which means fully transparent to 255, which means fully opaque. Okay, so four standard RGB file, each pixel will have eight plus eight plus eight bits equals to total of 24 bits.
But if we have alpha channel in the image, each pixel will have additional eight bits information, so the total will be 32 bits. Although this seems not important at the moment, but trust me by knowing these will help you understand file settings better in other graphic applications, because some graphic application has unique ways of showing image parameters such as they asked you whether to save as 24 bits or 32 bits, or save to RGB plus alpha etc. By now you already understand that 24 Bits image file equals to standard RGB file with no transparency, and 32 bits image file equals to standard RGB file, but with alpha transparency. Okay, so now we know that standard images have eight bits per channel. But what about other bits per channel value, such as 16, or 32 bits per channel? Well, this type of images are mostly used to store more lighting information from the real world.
Why? Well, this is kind of a long story, but I will try to make it as short as possible. You'll see in the real world, lightness or brightness can range from zero to theoretically an infinite value. zero means a pitch black, dark situation where there are no lights at all. In this condition, we are quote unquote blind We cannot see anything. And infinite brightness value is just a theory.
As for us living in Planet Earth, the brightest thing we can see is the sun, there is no mean made light able to defeat the sun's brightness. Okay, now if we need to capture this lightness information into an image because our standard image only have eight bits per channel, it may only capture a small portion of the real world lighting condition. We can however compress it like this. These kind of techniques are known as tone mapping. It is a very important techniques because our display devices such as computer monitor, TV, smartphone screen, etc. Even the LCD screen at the back of our digital cameras, they are all have a standard color space called sRGB.
It is stands for standard RGB, which basically eight bits per channel. Now, tone mapping is good only for displaying images in display devices. But if we want to reuse the image as a light source in 3d scene, for example, or for further tweaking in post processing, eight bit per channel images are too limiting, there is not much of the actual light information can be put in the image. That is why high range image formats was created to solve this problem. several examples of high range images are hdri open here are high range PNG files, camera, roll files, etc. Essentially, these file formats able to store more than eight bits per channel.
Now again, mostly, these file formats are useless if we only want to see them directly with our screen or display devices. Because our display devices can only support eight bits per channel, therefore, they won't be able to show the true form of high range images. So high range images are mostly not useful for common people, but they are very useful for graphic professionals, for example, as light sources in 3d software, or in game engines, also in photography and in video post processing, to give more flexibility in tweaking the exposure. Now, although Krita support high range images, we are not going to use or discuss this in our course. We will be using standard eight bits per channel, as this is what actually our monitors can display.