Perform calculations to estimate the file size for a bitmap image

1.2 Multimedia – Estimating Bitmap File Size

📐 Quick Overview – A bitmap image stores colour information for every single pixel. 💾 The file size depends on the image dimensions, the number of colour channels, and the bits used per channel. 🧮 In this lesson we’ll learn how to calculate the size in bytes, kilobytes (KB), and megabytes (MB).

What is a Bitmap?

A bitmap is like a giant grid of tiny coloured LEGO bricks. Each brick (pixel) has a colour value that tells the computer how bright it should be in red, green, and blue (RGB). If you have a 100 × 100 pixel image, that’s 10,000 bricks, each with a colour code.

How to Calculate File Size

The formula is simple: $$ \text{File Size (bytes)} = \text{Width} \times \text{Height} \times \text{Bits per Pixel} $$ - Width and Height are the number of pixels horizontally and vertically. - Bits per Pixel (bpp) is usually 24 bpp for true‑colour RGB images (8 bits for each of R, G, B). - If the image has an alpha channel (transparency), add 8 bits → 32 bpp.

  1. Count the pixels: Width × Height.
  2. Decide the colour depth: 24 bpp for RGB, 32 bpp if you need transparency.
  3. Multiply the two numbers to get bytes.
  4. Convert to KB (divide by 1024) or MB (divide by 1,048,576).

Example Calculation

Parameter Value
Width 1920 px
Height 1080 px
Bits per Pixel 24 bpp (RGB)
Total Bytes $1920 \times 1080 \times 24 = 49{,}766{,}400$ bytes
In KB $49{,}766{,}400 ÷ 1024 ≈ 48{,}600$ KB
In MB $48{,}600 ÷ 1024 ≈ 47.5$ MB

🧩 Analogy – Imagine each pixel as a small tile in a mosaic. The more tiles (pixels) and the more colours each tile can display (bits per pixel), the bigger the finished picture (file).

Quick Practice

Calculate the file size for a 640 × 480 image with 32 bpp (including alpha). Answer: $640 \times 480 \times 32 = 9{,}830{,}400$ bytes ≈ 9.38 MB.

Exam Tips

  • Always check if the image has an alpha channel; add 8 bits if it does.
  • Remember the conversion: 1 KB = 1024 bytes, 1 MB = 1024 KB.
  • Show your work step‑by‑step; examiners look for clear reasoning.
  • Use the formula in the question: width × height × bits per pixel.
  • Practice with different dimensions to build confidence.

Key Takeaway

📊 The file size of a bitmap grows linearly with the number of pixels and the colour depth. By mastering this calculation, you can estimate storage needs for images in web design, games, and multimedia projects.

Revision

Log in to practice.

2 views 0 suggestions