Byte by Byte › Book 6: Python, Data and How Computers Work › Chapter 12: Image Editing with Layers
Chapter 12: Image Editing with Layers
You will learn: the difference between raster and vector graphics, how to crop, resize, rotate and adjust photos, what layers are and why designers use them, how to add, hide, reorder and merge layers in Paint, how transparency and background removal work, basic design principles for posters, and how to edit images honestly.
🌟 The Adventure
Pip spread her photos across the table. The Festival of Tides had been magical, but her camera had struggled underwater. Most of the pictures were murky and dark. And in the best one, a large, round, extremely grumpy pufferfish had swum straight in front of the lens, puffed up to the size of a football.
"That's Grumble," sighed Nimo. "He puffs up whenever he's annoyed. Which is always."
The mayor wanted a poster for the Pearlhaven Open Days by tomorrow: the Glow Wall photo, the city's name, the dates, and a small picture of the Deep Engine, all on one page. "And make it look professional," he said, swimming away.
Memoon opened Paint and dropped the photo in. Then she tried to type the title on top. The letters went straight onto the photo. When she wanted to move them a little to the left, she couldn't: they had become part of the picture. She tried to paste the Engine picture into the corner, and its white background covered half the Glow Wall.
"Everything I add gets glued down," she groaned. "How do real designers do this?"
Pip looked at her over the top of her notebook. "They don't put everything on one sheet," she said. "They use layers."
💡 Learn With Memoon
Two kinds of digital image. In Chapter 4 you learned that photos are stored as grids of pixels. There is a second way to store pictures.
| Raster (bitmap) graphics | Vector graphics |
|---|
| Made of | A grid of coloured pixels | Shapes described by maths: points, lines, curves and fills |
| Best for | Photos and detailed paintings | Logos, icons, diagrams, fonts, maps |
| When enlarged | Becomes blurry and blocky (pixelation) | Stays perfectly sharp at any size |
| File formats | JPG, PNG, GIF, BMP | SVG, and the shapes inside PDF files |
| Software | Paint, Photos, Photoshop, GIMP | Inkscape, Adobe Illustrator, PowerPoint shapes |
The text on your screen right now is drawn from vector fonts, which is why it stays sharp when you zoom in. Your turtle drawings in Chapter 9 were vector-like instructions (go forward 100, turn 90) that the computer turned into pixels on the screen.
Basic photo edits.
| Edit | What it does | Watch out for |
|---|---|---|
| Crop | Cuts off the edges to keep only the part you want | You cannot get cropped parts back once saved, so keep the original |
| Resize | Makes the whole image bigger or smaller | Keep the aspect ratio (width compared with height) locked, or people become tall and thin; making an image much bigger causes pixelation |
| Rotate and flip | Turns the image or mirrors it | Flipping a photo with writing in it makes the writing backwards |
| Brightness and contrast | Lighter or darker; more or less difference between light and dark areas | Too much makes the picture look washed out or harsh |
| Saturation | How strong the colours are | Too much looks unnatural |
Destructive and non-destructive editing. Painting straight onto a photo is destructive editing: the original pixels are replaced, and once you save, they are gone. Non-destructive editing keeps the original safe and puts changes separately, so they can be adjusted or removed later. The most important tool for non-destructive editing is layers. Whichever way you work, always keep a copy of the original image.
What are layers? Imagine making a poster by stacking clear plastic sheets on top of a photo. On one sheet you write the title. On another you stick a small picture. Each sheet can be moved, changed or removed without touching the others. Where a sheet is clear, you see through it to the sheets below.
Digital layers work exactly the same way. A layered image is a stack of separate images on top of each other:
- Text layer (top): "Pearlhaven Open Days"
- Engine picture layer: a small picture with its background removed
- Photo layer (bottom): the Glow Wall
The areas of a layer that have nothing on them are transparent. In most editing programs, transparency is shown as a grey and white checkerboard pattern.
| Layer skill | What it means |
|---|---|
| Add a layer | Create a new, empty, transparent layer to work on |
| Layer order | Layers higher in the list appear in front of lower ones; drag to reorder |
| Hide or show | Turn a layer's visibility off to check something, without deleting it |
| Select the active layer | You only draw on, or change, the layer that is selected; most "my drawing disappeared" problems come from drawing on the wrong layer |
| Duplicate | Make a copy of a layer, a safe way to experiment |
| Merge | Join a layer with the one below it into one layer |
| Flatten | Merge all the layers into a single image |
Professional programs such as Adobe Photoshop and the free GIMP and Krita also let you change a layer's opacity (how see-through it is), add special effects to a layer, and save layered files to keep editing later. Windows 11 Paint has the essential layer tools, which are all you need to learn the idea.
Layers in Windows 11 Paint.
- Open your photo in Paint (File → Open).
- Click the Layers button in the toolbar (it looks like a stack of squares). The Layers panel opens on the right, showing your photo as the first layer.
- Click + (Add layer) at the top of the panel. A new transparent layer appears above the photo, and it is now selected.
- Draw or add text on the new layer. Only that layer changes.
- Point at a layer in the panel and click its menu (or right-click it) to find Hide layer, Duplicate layer, Merge down and Delete layer.
- Drag a layer up or down in the panel to change the order.
Removing a background. A picture with a plain white background will hide what is behind it. Paint can remove the background automatically: select the layer with the picture and click Remove background in the Image section of the toolbar. The background becomes transparent. Paint uses AI to decide which part is the main subject, so check the edges carefully: it sometimes cuts off a fin or leaves a bit of background behind.
Saving. When you save as PNG or JPG, the layers are combined into one flat picture. Only PNG keeps transparent areas; JPG fills them in. So save your finished poster as PNG if it has transparency, and keep the project open, or save a separate copy, while you are still making changes.
Selections. The Select tool lets you choose part of an image: a rectangle, or any shape with Free-form selection. Then you can copy, cut, move, resize or delete just that part. Paint also has Select all, Invert selection (select everything except what you chose) and Crop to selection.
Adjusting photos. Paint does not have brightness controls, but the Windows 11 Photos app does. Open the photo in Photos, click Edit image (or press Ctrl + E), and choose Adjustment to change brightness, contrast, exposure, saturation and more. Photos saves the edited picture as a copy if you choose Save as copy, so your original stays safe.
Design principles for posters. A poster has a few seconds to catch someone's eye. Four principles help:
| Principle | Meaning | On a poster |
|---|---|---|
| Contrast | Make different things look clearly different | Light text on a dark background; a big title and small details |
| Alignment | Line things up along invisible lines | Text left-aligned or centred, not scattered |
| Repetition | Reuse colours, fonts and shapes | Two fonts at most; a colour scheme of two or three colours |
| Proximity | Put related items close together | Date, time and place grouped in one block |
Give the poster a clear hierarchy: the most important thing (the title) biggest, then the picture, then the details. Leave some empty space so the design can breathe.
Editing honestly. Image editing is powerful, and powerful tools can be used to deceive. Ask yourself:
- Is it a record of real events? News photos, science images and evidence must not be edited in ways that change what happened. Cropping and brightening are usually fine. Adding or removing people or objects is not.
- Would it mislead someone? An advert or poster can be designed and decorated, but must not lie about the product or event. Many publications label heavily edited images as "illustration" or "edited".
- Do I have permission? Never edit a photo of a real person to embarrass, mock or misrepresent them. Ask before you share a photo of someone, edited or not.
- Is it mine to use? Use your own photos or images you have permission to use (Chapter 13 explains copyright).
Computers can now create convincing fake photos and videos with AI. You will learn how to spot and think about these in Book 7. The habit starts now: be honest with what you make, and sensibly sceptical about what you see.
💡 Memoon’s tip: Name your layers and keep the photo at the bottom. When something goes wrong, hide the layers one by one to find which one is causing the problem. It is debugging, for pictures.

✍️ Try It Yourself
Always work on a copy of a photo. Save a copy first and keep the original safe.
Activity 1: Raster or vector? Open Paint and draw a small circle. Zoom in to 800% (bottom right of the window). What do you see at the edge? Now open PowerPoint, insert a circle shape, and zoom in to 400%. What is different? Write down which one is raster and which is vector.
Activity 2: Basic edits.
- Choose a photo you have taken (or ask a grown-up for one you may use). Make a copy of it.
- Open the copy in Paint. Use Select to draw a rectangle around the most interesting part, then click Crop.
- Click Resize and skew (or press Ctrl + W). Choose Percentage, make sure Maintain aspect ratio is ticked, and set it to 50%. Then try unticking it and making the width 150%. What happens? Press Ctrl + Z to undo.
- Open the copy in the Photos app, click Edit image, then Adjustment. Change the brightness and contrast. Click Save as copy.
Activity 3: Your first layers.
- Open a photo in Paint and open the Layers panel.
- Add a new layer. Use the Text tool to write a title on it.
- Add another layer and draw a frame or decoration with a brush.
- Hide each layer in turn and show it again. Then drag the photo layer to the top. What happens to the other layers? Drag it back to the bottom.
- Duplicate the text layer, change the colour of the lower copy to black, and move it slightly down and right. You have made a drop shadow.
Activity 4: Background removal. Draw a simple character or object in Paint on a white background and save it. In a new Paint image with a coloured background, paste your drawing onto a new layer and click Remove background. Check the edges. Did the AI get it right everywhere? Save the result as PNG.
Activity 5: Design a poster. Make a poster for a real or imaginary school event using at least three layers: a background (a photo or a colour), a picture with its background removed, and a text layer with the title, date, time and place. Use the four design principles. Save it as PNG. Then swap posters with a partner and give each other one compliment and one suggestion, using the names of the principles.
Unplugged: Real or edited? Look at adverts in a magazine or newspaper. For each picture, discuss: was it probably edited? How can you tell? Was the editing honest decoration, or could it mislead someone? Is it labelled?
🎉 Memoon Solves It
Memoon started again, this time with layers. The Glow Wall photo went on the bottom layer. In the Photos app she first brightened it on a copy, and suddenly the magenta and gold of the rangoli glowed the way they had on the night.
Then there was Grumble. Pip wanted to paint over him. Memoon hesitated. "This poster is an advert, so we can design it," she said. "But if you put the photo in The Memunic Times, it has to be the real photo, pufferfish and all. That's what really happened." Pip thought about it, and agreed: the newspaper would print the original, and the poster would say Poster design: Pearlhaven. Memoon cropped the photo so the Glow Wall filled the frame, which removed most of Grumble without painting anything.
On a second layer she added the picture of the Deep Engine and removed its white background. On a third she placed the title, Pearlhaven Open Days, in big white letters with a black drop-shadow layer underneath, and grouped the date, time and place together at the bottom.
Then Grumble himself swam up, puffed and furious. "You cut me out!" he spluttered.
Memoon had an idea. "Would you like to be on the poster properly?" she asked. "Your own layer. Our official mascot." Grumble deflated slightly in surprise. He agreed, with conditions. So Memoon photographed him, removed the background and put him on his own layer in the corner, wearing a party hat drawn on the layer above. It was the first time anyone in Pearlhaven had seen him smile.
The posters went up in every village. But that night, as Memoon was packing up, the Speaking Stone flickered. A strange message crawled across it, and then another, and another, faster and faster. Above them, out in the dark sea, the lighthouses began to flash in patterns no one had ever programmed.
❓ Check Your Knowledge
- What is the difference between raster and vector graphics? Give one example of where each is best.
- Why does a small photo look blocky when you make it much bigger?
- What does "maintain aspect ratio" mean when resizing, and why does it matter?
- Explain destructive and non-destructive editing.
- What is a layer? Why is working with layers better than drawing everything on one image?
- In a stack of layers, which layer appears in front?
- How is transparency usually shown in image editing programs?
- You draw on your image but nothing seems to change. What is the most likely reason?
- Which file format should you save in to keep transparent areas: PNG or JPG?
- Name the four design principles and give a poster example of each.
- A news website removes a protester from a photo of a public event. Is this honest editing? Explain.
- Challenge: Plan a three-layer image of a magazine cover for your favourite hobby. List each layer from bottom to top, what is on it, and which areas are
transparent. Then explain how you would make the title stand out using contrast.
📚 Word Bank
- Raster graphics: images made of a grid of pixels.
- Vector graphics: images made of shapes described by maths, which stay sharp at any size.
- Pixelation: blurry or blocky squares that appear when a raster image is enlarged too much.
- SVG: Scalable Vector Graphics, a vector image format used on the web.
- Crop: cut away the edges of an image.
- Resize: change the size of the whole image.
- Aspect ratio: the relationship between an image's width and height.
- Brightness: how light or dark an image is.
- Contrast: the difference between light and dark areas.
- Saturation: how strong or intense the colours are.
- Destructive editing: editing that permanently changes the original pixels.
- Non-destructive editing: editing that keeps the original unchanged so changes can be undone later.
- Layer: one of a stack of separate images that combine to make a picture.
- Transparency: areas of a layer that are see-through.
- Opacity: how solid (not see-through) a layer is.
- Merge: combine a layer with the one below it.
- Flatten: combine all layers into one image.
- Selection: a chosen part of an image that can be changed on its own.
- Background removal: making the background of a picture transparent, leaving the main subject.
- Visual hierarchy: arranging a design so the most important information stands out first.
Keep learning with Byte by Byte
Explore Book 6: Python, Data and How Computers Work. Find the ebook, purchase details and teaching slides on MemuniCity.
Comments
Post a Comment