Digital image processing: pixels, filters and compression
Computer ScienceDigital ApplicationsAges 17–18
Use it with your class: students open it from a link or a QR code, with no account needed.
An image is generated right on the page and then re-digitized at the resolution you choose, shown next to the original for comparison. Drag the sliders to adjust brightness or contrast, or switch to grayscale or a negative image; turn on the grid to see individual pixels clearly. The compression slider simulates how JPEG compresses images in 8×8 blocks: the stronger the compression, the smaller the file, but the more blocky the image becomes.
Lesson: Digital images and image-editing software: pixels, resolution, brightness/contrast filters and image compression
What it shows
A digital image is a grid of pixels, each storing red, green and blue values from 0 to 255. Resolution sets how many pixels describe the picture: at 8 pixels per side it breaks into large squares, at 192 it looks smooth. Every filter is a simple calculation on those numbers, for example a negative replaces each value with 255 minus the value, and results are clamped to 0–255, so extreme settings wipe out detail. The compression model imitates JPEG by discarding detail inside 8×8 blocks: the file gets smaller, but the lost data cannot be recovered.
How to use
Lower the Resolution (image side) step by step and compare the processed image with the original, using Show grid to see individual pixels. Choose a Filter, drag the Filter intensity between −100% and 100%, and click the image to read a pixel's R, G and B values as they change. Then reduce the Compression quality and watch the estimated file size fall as the 8×8 blocks become visible.
Parameters you can change
- Resolution (image side) 8–192 pixels
- Filter No filter, Brightness, Contrast, Grayscale, Negative
- Filter intensity -100–100 %
- Compression quality 5–100 %
- Show pixel grid
Questions to explore
- How does the Negative filter change the R, G and B values of a pixel?
- Why do square blocks appear in the image when the Compression quality is very low?
- After raising Brightness to 100%, why do the light areas of the picture lose their detail?