Image Representation Examples: 48 Problems with Answers
Start with the recap, study the fully worked examples, then use the practice problems to
check your understanding of Image Representation.
This page combines explanation, solved examples, and follow-up practice so you can move
from recognition to confident problem-solving in CS Thinking.
Concept Recap
Image representation is the way a computer stores a picture as numeric data. Most digital images are made of pixels arranged in a grid, where each pixel stores color information such as red, green, and blue values.
A digital image is a giant colored spreadsheet: each square has a position and a color value.
Read the first worked example with the solution open so the structure is clear.
Try the practice problems before revealing each solution.
Use the related concepts and background knowledge badges if you feel stuck.
What to Focus On
Core idea:Image quality depends on how many pixels there are and how much color information each pixel stores.
Common stuck point:Resolution and file format are different ideas. Two images can have the same resolution but different file sizes.
Sense of Study hint:First identify the width and height in pixels. Then check how color is stored, such as grayscale or RGB. Finally, compare how file formats compress that pixel data.
Worked Examples
Example 1
medium
An image is enlarged on screen from 100x100 to 400x400 pixels by repeating each pixel 4x4 times. Does the file size change, and what visual effect appears?
Answer
file size same; pixelation appears
First step
1
The underlying data is still 100×100 pixel values.
See the full worked solution + why-it-works coaching
Setup·Key insight·Why it works·Common pitfall·Connection
Compare 8-bit and 10-bit per channel for one channel: how many MORE levels does 10-bit provide, and by what factor?
Practice Problems
Try these problems on your own first, then open the solution to compare your method.
Example 1
easy
An image is 100 pixels wide and 50 pixels tall. How many pixels does it contain?
Example 2
easy
Each pixel stores 8 bits for red, 8 for green, 8 for blue. How many bits per pixel is this?
Example 3
easy
With 24-bit color (8 bits per RGB channel), how many distinct colors can be represented?How does color count grow with bit depth? At 24-bit: 2^24 = ?
Example 4
easy
How many bits are needed per channel to represent exactly 256 brightness levels?8-bit channel: column weights sum to 255 — how many bits are needed for 256 brightness levels?
Example 5
easy
A grayscale image uses 1 bit per pixel. How many shades can each pixel show?1-bit-per-pixel image: how many shades can each pixel show?
Example 6
easy
Estimate the uncompressed size in bits of a 10×10 image at 24 bits per pixel.10×10 pixel image — at 24 bits per pixel, estimate the total uncompressed size in bits
Example 7
easy
A pixel has RGB value (255, 0, 0). What color does it represent?24-bit pixel: R
Example 8
easy
If you double both the width and height of an image, how does the pixel count change?
Example 9
medium
A photo is 2000×1500 pixels at 24 bits per pixel. Compute the uncompressed size in megabytes (use 1 MB=8,000,000 bits).
Example 10
medium
Image A is 16-bit color, image B is 24-bit color, same dimensions. How many times more colors can B represent than A?16-bit vs 24-bit color, same dimensions — by what factor can B represent more colors?
Example 11
medium
A 24-bit image is converted to an 8-bit palette image. By what factor does the per-pixel storage shrink, and what is lost?
Example 12
medium
A pixel stored as binary RGB is `11111111 00000000 11111111`. What color is it in words and decimal RGB?Pixel binary RGB: 11111111 00000000 11111111 — identify the color and decimal RGB
Example 13
medium
A bilevel scanner produces a 1000×1000 image at 1 bit per pixel. What is the raw size in kilobytes (use 1 KB=8000 bits)?
Example 14
medium
Two images both display at the same size on screen, but one is 50x50 pixels scaled up and one is 500x500 pixels. Which holds more actual image data, and why?
Example 15
medium
An image format claims '10:1 compression' on a 9 MB raw photo. What is the compressed size, and is resolution changed?
Example 16
medium
How many bits per pixel are needed to represent exactly 1,000,000 distinct colors (round up)?
Example 17
challenge
A camera offers 12-bit-per-channel RAW vs 8-bit-per-channel JPEG. For one channel, how many MORE distinct levels does 12-bit provide than 8-bit, and by what factor?
Example 18
challenge
You must store a 4000×3000 photo at 24 bpp, but the disk has only 30 MB free (use 1 MB=8,000,000 bits). What minimum compression ratio is required?
Example 19
challenge
A designer needs at least 16.7 million colors and a 1920×1080 display. Verify whether 24-bit color suffices for the color need, and compute one frame's raw size in MB (1 MB=8,000,000 bits).
Example 20
medium
A 640×480 image at 8 bits per pixel (256-color palette) has what raw size in kilobytes (1 KB=8000 bits)?
Example 21
easy
An image is 200×100 pixels. How many pixels does it contain?
Example 22
easy
A pixel uses 4 bits per channel for R, G, B. How many bits per pixel total?Each channel uses 4 bits (weights 8,4,2,1) — R, G, B together: how many bits per pixel total?
Example 23
easy
How many distinct colors can a 16-bit color image represent?How many distinct colors can a 16-bit color image represent?
Example 24
easy
How many bits per pixel are needed to represent exactly 16 colors?4-bit channel can represent values 0–15 — how many bits are needed for exactly 16 colors?
Example 25
easy
What RGB triple represents pure green at 8 bits per channel?8-bit per channel RGB pixel for pure green — what is the RGB triple?
Example 26
easy
Estimate the uncompressed size in bits of a 50×50 grayscale image at 8 bits per pixel.
Example 27
easy
A black-and-white scanner uses 1 bit per pixel. What two values can a pixel hold?1-bit-per-pixel scanner — what two values can a pixel hold?
Example 28
easy
A pixel has RGB value (0, 0, 255). What color does it represent?Pixel with RGB value (0, 0, 255) — what color does it represent?
Example 29
medium
A photo is 4000×3000 pixels at 24 bpp. Compute the raw size in MB (use 1 MB=8,000,000 bits).
Example 30
medium
Image A: 800×600 at 24 bpp. Image B: 400×300 at 24 bpp. By what factor is A larger?
Example 31
medium
An icon is 32×32 at 32 bpp (RGBA). Raw size in bits?
Example 32
medium
A pixel stored as binary RGB is `00000000 11111111 00000000`. State the color and the decimal RGB.Binary pixel: 00000000 11111111 00000000 — state the color and decimal RGB
Example 33
medium
An image with a 256-color palette stores 8 bits per pixel. How does this compare in size per pixel to true-color 24 bpp?
Example 34
medium
Compute the raw size in KB of a 200×150 image at 24 bpp (use 1 KB=8000 bits).
Example 35
medium
How many bits per pixel are needed to represent at least 5000 distinct colors?
Example 36
medium
An image is described as '300 ppi' and printed at 6×4 inches. How many pixels wide is the underlying image?
Example 37
medium
A pixel has RGB value (255, 255, 0). State the color it shows on screen.Pixel RGB (255, 255, 0) shown in binary — what color does it show on screen?
Example 38
medium
A 500×500 image is stored at 16 bpp. Compute the raw size in KB (use 1 KB=8000 bits).
Example 39
medium
A grayscale photo uses 8 bits per pixel. How many gray shades can a pixel display?Grayscale: 8 bits per pixel — how many gray shades can a pixel display?
Example 40
hard
A camera produces a 24 MP image at 24 bpp. Raw size in MB (use 1 MB=8,000,000 bits)?
Example 41
hard
An animation is 30 frames per second, each frame 1280×720 at 24 bpp. Raw bandwidth in MB per second (use 1 MB=8,000,000 bits)?
Example 42
hard
A storage budget of 5 MB (1 MB=8,000,000 bits) holds a 2000×2000 image at 24 bpp after compression. What minimum compression ratio is required?
Example 43
hard
An image is 1024×768 and uses indexed color with a 64-color palette. Raw size in bits?
Example 44
hard
Two images have the same file size in KB but different dimensions: one is 1000×1000 at 8 bpp, the other is 500×500 at 32 bpp. Which has more pixels, and which stores more color information per pixel?
Example 45
challenge
A frame buffer must store a 3840×2160 display at 32 bpp. Compute the required memory in MB (use 1 MB=8,000,000 bits) and explain why double-buffering doubles the requirement.
Example 46
challenge
A photographer claims '12-bit RAW captures 4 times more color detail per channel than 10-bit.' Verify or correct the claim using level counts.