Basic Techniques for Preparing Digital Images

Back Index Next

Unit 2 Color: 16 of 23  

The size of an image file is calculated by multiplying the its pixel dimensions by the color bit depth.  This gives us the total number of bits in the file but file sizes are normally given in bytes, which equal 8 bits.

Why are there 8 bits in a byte? In some ways that is a little like asking why there are 12 inches in a foot. That's just the way it is. At some point in time, the folks building computers decided this and it continues today.

But there is logic to it. Remember that an 8-bit color depth has 28 or 256 colors, and that each of the RGB primary colors ranges from 0 to 255.  With 8 bits in a byte, you can represent 256 values ranging from 0 to 255, as shown here: 

  0 = 00000000

  1 = 00000001

  2 = 00000010

   .....

254 = 11111110

255 = 11111111

 

Back Index Next