What is a raster picture?
A raster picture is a grid of tiny squares. Each square is a pixel (picture element). A pixel has one colour only. When your eyes see thousands of pixels together, they join into a smooth picture.
Photos, screenshots and phone pictures are raster. The size of a raster picture is its resolution: width × height in pixels. A picture of 10 × 8 pixels has 10 × 8 = 80 pixels. More pixels means more detail and a bigger file.
Try it: zoom a photo on your phone as far as it goes. You will see the squares.
Colour in numbers: RGB
A screen makes colour with three tiny lights: Red, Green and Blue. Each light has a level from 0 (off) to 255 (full). That is 256 levels.
- (255, 0, 0) is red.
- (255, 200, 0) is a sunny yellow.
- (0, 0, 0) is black and (255, 255, 255) is white.
- When R = G = B, the pixel is a shade of grey.
Three lights with 256 levels each give 256 × 256 × 256 = 16,777,216 colours. Printers use a different mix, CMYK (cyan, magenta, yellow, black ink).
Colour has three easy ideas: hue (which colour, such as red or blue), saturation (how strong or washed out) and brightness (how light or dark).
Editing and retouching
Editing a raster picture means changing pixel numbers. Cropping removes the outer pixels. Resizing adds or removes pixels. Retouching fixes small faults, such as a speck, a spot or a scratch. The usual way is to copy clean pixels from next to the fault and paint them over it.
Always work on a copy or a new layer, so the original stays safe.
Making a bigger picture from a small one only guesses the new pixels. It cannot bring back detail that was never there.
Layers, masks and collage
A layer is like a clear sheet. You stack sheets: sky, sun, house. What you see is the stack seen from the top. You can move, hide, recolour or delete one sheet without touching the others.
A mask controls what part of a layer you can see. On a layer mask, white shows and black hides. Grey shows a little. Nothing is erased, so you can undo.
A collage puts parts of several pictures into one. Each part sits on its own layer and a mask cuts out its edges.
Filters and colour correction
A filter is one rule used on every pixel. Examples:
- Grey: new value = (R + G + B) ÷ 3 for all three numbers.
- Invert: new value = 255 − old value.
- Brighter: add the same amount to R, G and B (never above 255).
- Blur mixes a pixel with its neighbours; sharpen makes edges stronger.
Colour correction fixes the look of a photo: brightness (lighter or darker), contrast (gap between dark and light), saturation and white balance (so white looks white, not yellow).
Raster vs vector, formats and business graphics
Vector graphics store shapes as maths: contours (outlines), fill colours, gradients (colour that slowly changes) and text. They stay sharp at any size, so logos, icons and maps are often vector. Raster is better for photos with many tiny colour changes.
| Raster | Vector | |
|---|---|---|
| Made of | pixels | shapes and curves |
| Zoom in | gets blocky | stays sharp |
| Best for | photos | logos, icons |
| Formats | JPG, PNG, GIF | SVG |
JPG makes small files and loses a little detail (good for photos). PNG keeps every pixel and can have a see-through background. Business graphics are charts, diagrams and infographics that show numbers clearly. They are often vector so that they print sharply.
AI image generation and honest use
An AI image generator makes a new picture from a text prompt, such as “a red kite over a green field”. It learned patterns from a huge number of pictures. The result is still a raster picture: a grid of pixels.
Rules for honest use:
- Say when a picture is made by AI. Never show it as a real photo of a real event.
- Do not make pictures of real people without their permission, and never to shame or trick them.
- Respect artists. Do not copy a living artist's style to sell as your own, and check the tool's rules for using the result.
- Check the picture: AI can make mistakes (extra fingers, wrong text) and can repeat unfair ideas about people.
Try it
Predict, then check. A pixel is (30, 60, 90). Guess what the grey filter gives. Then use the 3D free play: tap the Look tool, tap a pixel, press Grey and compare. (Answer: 60, 60, 60.)
At home: take a photo of your notebook. Open the editor on your phone. Crop it, make it brighter, then undo. Notice that the editor can undo because the original numbers are kept.
Key formulas and definitions
- Pixels = width × height
- RGB: each value 0 to 255 (256 levels); colours = 256 × 256 × 256 = 16,777,216
- Raw file size (bytes) = width × height × 3
- Grey filter: new = (R + G + B) ÷ 3
- Invert filter: new = 255 − old
- Layer mask: white shows, black hides
Worked examples
1. How many pixels are in a picture 640 pixels wide and 480 pixels high?
Pixels = 640 × 480 = 307,200.
2. Make the pixel (30, 60, 90) grey with the average rule.
Average = (30 + 60 + 90) ÷ 3 = 60. New pixel = (60, 60, 60).
3. Invert the pixel (200, 100, 0).
255 − 200 = 55, 255 − 100 = 155, 255 − 0 = 255. New pixel = (55, 155, 255).
4. A photo is 100 pixels wide and 50 high. Each pixel uses 3 bytes. What is the raw size?
100 × 50 = 5,000 pixels. 5,000 × 3 = 15,000 bytes (about 15 KB) before compression.
5. A logo is made twice as wide and twice as high. How many times more pixels does a raster logo have? What about a vector logo?
Raster: 2 × 2 = 4 times as many pixels, and the new ones are guessed, so it may look soft. Vector: the shape is redrawn from maths at the new size, so it stays sharp.
Common mistakes
- Thinking a pixel has many colours. A pixel has exactly one colour (one R, G, B triple).
- Zooming a small photo and expecting new detail. Making a picture bigger only guesses pixels.
- Editing the only copy of a photo. Always keep the original or work on a new layer.
- Using JPG for a logo with sharp edges and a see-through background. Use PNG or SVG instead.
- Showing an AI-made picture as a real photo of a real event.