Tuesday, 7 November 2023

How an image stored into Computer memory?

Image is stored as collection of pixels in computer memory. Each pixel represent a single point in the image, and it is represented by a single color value.

 

How a pixel represented in computer memory?

It depends on the color space and bit depth (color depth or pixel depth).

 

For example, in RGB color space, each pixel is represented by three color channels (Red, Green and Blue). In general, each channel has a value in range from 0 to 255, where 0 specifies the absence of the color and 255 specifies the full intensity of the color.

 

Red color represented by (255, 0, 0)

Blue color represented by (0, 255, 0) and

Green color represented by (0, 0, 255)

 

What is color depth?

It is also known as bit depth or color depth. It refers the number of bits used to represent the each color channel (For RGB, we have 3 color channels, one for Red, one for Green and one for Blue) of each pixel in a digital image. Common bit depths include 1 bit, 8 bits, 24 bits and 32 bits.

 

If bit depth is 8, and color space is RGB, then the image can represent 256 x 256 x 256 = 16,777,216 unique colors (commonly referred to as 16.7 million or "true color")

Previous                                                    Next                                                    Home

No comments:

Post a Comment