banner



How To Find Bit Depth Of An Image

Concept of Bits Per Pixel


Bpp or bits per pixel denotes the number of bits per pixel. The number of different colors in an image is depends on the depth of color or bits per pixel.

Bits in mathematics:

Its just like playing with binary bits.

How many numbers tin can exist represented by i scrap.

0

1

How many two bits combinations can be fabricated.

00

01

10

11

If we devise a formula for the adding of total number of combinations that can exist made from bit, it would be similar this.

bits per pixels

Where bpp denotes bits per pixel. Put 1 in the formula you lot get 2, put 2 in the formula, you get 4. It grows exponentially.

Number of different colors:

Now every bit nosotros said it in the beginning, that the number of unlike colors depend on the number of $.25 per pixel.

The table for some of the bits and their colour is given below.

Bits per pixel Number of colors
ane bpp two colors
2 bpp 4 colors
3 bpp 8 colors
four bpp 16 colors
5 bpp 32 colors
6 bpp 64 colors
7 bpp 128 colors
8 bpp 256 colors
10 bpp 1024 colors
16 bpp 65536 colors
24 bpp 16777216 colors (sixteen.seven 1000000 colors)
32 bpp 4294967296 colors (4294 million colors)

This table shows different $.25 per pixel and the amount of color they contain.

Shades

You lot tin easily notice the pattern of the exponentional growth. The famous gray scale image is of viii bpp , means information technology has 256 different colors in it or 256 shades.

Shades can exist represented every bit:

shades

Color images are commonly of the 24 bpp format, or sixteen bpp.

We will see more almost other color formats and paradigm types in the tutorial of prototype types.

Color values:

We take previously seen in the tutorial of concept of pixel, that 0 pixel value denotes black color.

Black color:

Remember, 0 pixel value always denotes black color. But in that location is no fixed value that denotes white color.

White colour:

The value that denotes white color can exist calculated equally :

white_color

In instance of ane bpp, 0 denotes blackness, and i denotes white.

In case 8 bpp, 0 denotes black, and 255 denotes white.

Greyness color:

When y'all calculate the blackness and white color value, and then you can calculate the pixel value of gray color.

Gray color is actually the mid signal of black and white. That said,

In example of 8bpp, the pixel value that denotes greyness color is 127 or 128bpp (if you count from 1, not from 0).

Image storage requirements

After the give-and-take of $.25 per pixel, now we have every thing that we need to calculate a size of an image.

Image size

The size of an image depends upon iii things.

  • Number of rows
  • Number of columns
  • Number of bits per pixel

The formula for calculating the size is given beneath.

Size of an image = rows * cols * bpp

It ways that if you take an epitome, lets say this i:

einstein

Assuming it has 1024 rows and information technology has 1024 columns. And since it is a gray scale paradigm, it has 256 different shades of gray or it has $.25 per pixel. And so putting these values in the formula, nosotros get

Size of an image = rows * cols * bpp

= 1024 * 1024 * eight

= 8388608 $.25.

But since its not a standard answer that we recognize, and so volition catechumen it into our format.

Converting it into bytes = 8388608 / viii = 1048576 bytes.

Converting into kilo bytes = 1048576 / 1024 = 1024kb.

Converting into Mega bytes = 1024 / 1024 = 1 Mb.

Thats how an image size is calculated and information technology is stored. At present in the formula, if you are given the size of image and the bits per pixel, you can besides calculate the rows and columns of the paradigm, provided the image is square(aforementioned rows and same column).

Source: https://www.tutorialspoint.com/dip/concept_of_bits_per_pixel.htm

Posted by: ferrantelittly.blogspot.com

0 Response to "How To Find Bit Depth Of An Image"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel