Calculating Image Sizes
To calculate the size of an image:
File Size (bits) = Width x Height x Channels x Bits per channel
Example 1
For example for a normal 2000 by 3000 color RGB image:
- Width: 2000
- Height: 3000
- Channels: Red, Green, Blue
- Bits per channel: 8 ( 0 to 255)
2000 x 3000 x 3 x 8 = 144,000,000 bits
Convert to Bytes:
144,000,000 / 8 = 18 Megabytes
Calculating Image size example
Example 2
For example for a 2000 by 3000 color Grayscale image:
- Width: 2000
- Height: 3000
- Channels: Grey
- Bits per channel: 8 ( 0 to 255)
2000 x 3000 x 1 x 8 = 48,000,000 bits
Convert to Bytes:
48,000,000 / 8 = 6 Megabytes
Example 3
Example 3
For example for a custom 40 by 30 Black and White Image
- Width: 40
- Height: 30
- Channels: 1 (Black)
- Bits per channel: 1
40 x 30 x 1 x 1 = 120 Bits
Convert to Bytes:
120 / 8 = 15 Bytes
Example 4
For example for a custom 50 x 20 8 bit image
- Width: 40
- Height: 30
- Channels: 1
- Bits per channel: 8 bits per pixel.
50 x 20 x 8 = 8000 bits
8000 / 8 = 1000 bytes
1 Kilobyte
Review: Fill in the Blanks
To calculate the size of an image, the formula to use is: File Size (bits) = Width x Height x Channels x Bits per channel. For example, for a normal 2000 by 3000 color RGB image, the width is , the height is , the channels are Red, Green, and Blue and the bits per channel is . The calculation would be 2000 x 3000 x 3 x 8, resulting in a total of bits. When converted to bytes, this equals Megabytes.
In another case, for a 2000 by 3000 color Grayscale image, the width remains , the height is , but the channels consist of only Grey, and bits per channel is still . The computation is 2000 x 3000 x 1 x 8, which results in bits. When converting this to bytes, the size totals Megabytes.
Consider also a custom 40 by 30 Black and White image; here, the width is , the height is , and the channels account for 1 (Black), while the bits per channel is . Thus, the calculation goes as 40 x 30 x 1 x 1, yielding a total of bits. In bytes, this equals Bytes.
Finally, for a custom 50 x 20 8 bit image, the width is , the height is , the channels amount to , and each channel is composed of 8 bits per pixel. The computed size is 50 x 20 x 8, which results in bits, converting down to bytes, or Kilobyte.
In another case, for a 2000 by 3000 color Grayscale image, the width remains , the height is , but the channels consist of only Grey, and bits per channel is still . The computation is 2000 x 3000 x 1 x 8, which results in bits. When converting this to bytes, the size totals Megabytes.
Consider also a custom 40 by 30 Black and White image; here, the width is , the height is , and the channels account for 1 (Black), while the bits per channel is . Thus, the calculation goes as 40 x 30 x 1 x 1, yielding a total of bits. In bytes, this equals Bytes.
Finally, for a custom 50 x 20 8 bit image, the width is , the height is , the channels amount to , and each channel is composed of 8 bits per pixel. The computed size is 50 x 20 x 8, which results in bits, converting down to bytes, or Kilobyte.
Click the keywords below to fill in the blanks:
6
8
1
144,000,000
30
50
48,000,000
2000
120
3000
18
8
8000
1
15
1
40
20
2000
1000
3000
â All blanks filled correctly! Great job!
Complete! Ready to test your knowledge?
Introduction to Calculating file sizes
- Calculating Image Sizes
- Calculating Image size example
- Example 3
- Example 4