Calculating file sizes

Fill in the blanks

To calculate the size of an image, the formula used is = Width x Height x Channels x Bits per channel. For a standard 2000 by 3000 color RGB image, the dimensions are as follows: Width: 2000, Height: 3000, Channels: , and Bits per channel: 8 (0 to 255). When we apply the formula, we find that 2000 x 3000 x 3 x 8 = bits, which converts to Bytes as follows: 144,000,000 / 8 = .



Similarly, for a 2000 by 3000 color Grayscale image, the calculation changes slightly. The Width remains 2000, Height is still 3000, but the Channels are now just and the Bits per channel remain the same at 8 (0 to 255). When calculated, this gives us: 2000 x 3000 x 1 x 8 = bits, which converts to Bytes as 48,000,000 / 8 = .



In another example of a custom 40 by 30 Black and White image, we have the dimensions: Width: 40, Height: 30, Channels: (Black), and Bits per channel at . Using our formula, we find that 40 x 30 x 1 x 1 = bits, and when converted to Bytes, it results in 120 / 8 = .



Lastly, consider a custom 50 x 20 8-bit image; the Width is , Height is , with Channels at 1 and Bits per channel at bits per pixel. The calculation yields 50 x 20 x 8 = bits, which further converts to Bytes giving us 8000 / 8 = , or .

Keywords

1000 bytes | 50 | 48,000,000 | file size (bits) | 6 megabytes | 15 bytes | 18 megabytes | 1 kilobyte | 1 | 120 | 144,000,000 | 8000 | 1 | red, green, blue | 20 | grey | 8 |