TechKnowSurge
CompTIA Tech+ 4.2 CompTIA Tech+ 1.3
InteractiveComputeFree

How Big Is the Picture?

Work out how many bytes a picture takes uncompressed, with only four colors, and as a PNG.

⚑ Complete this interactive to capture a CTF flag worth 5 points.

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.

What you'll learn

Aligned to

CompTIA Tech+
4.2 Identify fundamental data types and their characteristics.
1.3 Compare and contrast common units of measure.

Key terms

Pixel
The smallest addressable unit of a digital image, whose color is encoded as binary values representing red, green, and blue channel intensities; display resolution is expressed as a grid of pixels.
Bitmap
An uncompressed image format that stores color data for every pixel individually, with file size directly determined by pixel dimensions and bit depth.
Portable Network Graphics
PNG
A compressed image file format that reduces storage size while preserving image quality by encoding pixel data more efficiently than bitmap formats.
Bit Depth
The number of bits used to represent the color of a single pixel, which determines the total number of possible colors in a digital image.
File Compression
The process of reducing the size of one or more files using software algorithms to save storage space and make file transfers faster.

Topics

Pixel Bitmap Portable Network Graphics Calculation Interactive

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 →