About this interactive
What you are doing: working out how much space a picture takes, from the Compressing Graphics lesson.
A 24-bit BMP uses 3 bytes a pixel, one each for red, green and blue (a BMP can be saved at other depths, but every question here means 24-bit). So the pixel data of an uncompressed 24-bit picture is width x height x 3 bytes: the lesson's 12 by 16 Mario picture is 192 pixels and 576 bytes, and its wafers photo is 53 million pixels, 159 million bytes, 159 megabytes. Video is the same sum for every frame, times the frames in each second.
A picture of only four colors can number them 00, 01, 10 and 11, so each pixel needs just 2 bits instead of 3 bytes (24 bits). That is the lesson's one example of compression; it is not the way PNG works, but a PNG of the same picture also comes out smaller than the BMP.
Two cautions. The lesson's saved BMP shows 630 bytes next to the 576 bytes of that picture's pixels: a BMP file also holds a 54-byte header, and each row of pixels is padded to a multiple of 4 bytes (this picture's 12-pixel rows are 36 bytes, so none is added). These questions count pixel data only. And a BMP that keeps a palette stores a table of the colors as well, in 1, 4 or 8 bits a pixel; these questions count only the pixels. They use SI units, 1 KB = 1,000 bytes and 1 MB = 1,000,000 bytes, as the Kilo, Mega, Giga lesson does.
How to use it: work out the pixels first, then the bytes. Type a number only.
About TechKnowSurge
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →