Sub topic 1
How layers build an image
This chapter explains the working model behind every other layer skill: a Photoshop document is an ordered stack of layers, and the final image is computed from that stack. If you understand the model, the later chapters on creating, ordering, grouping, and clipping become predictable instead of trial and error.
Prerequisites
This chapter assumes you can already do the following:
- Open a document in Photoshop and find panels through the Window menu.
- Use the Move tool and basic selection tools.
- Tell pixels (a grid of colored dots) from vector shapes (paths described by math) at a general level.
You do not need to know any layer features yet.
What a layer is
A layer is a separate, editable piece of a document. You can think of it as a sheet of clear film. Each sheet can hold pixels, text, a shape, or an instruction that changes the sheets below it. Where a sheet has nothing on it, it is transparent, and you see through it to the sheets underneath.
Because each element lives on its own sheet, you can move, recolor, hide, or delete one element without touching the others. This is called non-destructive editing: the original pixels stay intact while you change how they are displayed.
How the stack composites
Photoshop stores layers in a stack. The layer at the bottom is drawn first. Each layer above it is then drawn on top of the result so far. This process is called compositing, and it runs from bottom to top.
For each layer, Photoshop combines three things:
- The layer's own pixels, including their transparency.
- The layer's settings: opacity, fill, and blend mode.
- The image computed from every layer below it.
The output of one step becomes the input to the next. The final step produces what you see on the canvas and what gets exported.
Two consequences follow from this model:
- Order changes the result. The same layers in a different order can produce a different image. Chapter topics on stacking order build on this.
- Upper layers can hide lower ones. A fully opaque layer covers whatever is beneath it in the places where it has pixels.
A worked example
Suppose a poster file has four layers. In the Layers panel, the top of the list is the top of the stack:
| Position in panel | Layer | Content |
|---|---|---|
| Top | Title | Text reading "Summer Sale" |
| 3 | Warm tone | An adjustment that shifts colors toward orange |
| 2 | Beach photo | Pixels from a photograph |
| Bottom | Background | A flat white fill |
Photoshop builds the image like this:
- It starts with the white Background.
- It draws the Beach photo over it. Where the photo is opaque, the white is covered.
- The Warm tone adjustment does not add pixels of its own. It changes the color of everything computed so far, which is the photo over white.
- The Title text is drawn last, so it sits above everything.
If you drag Title below Beach photo, the text disappears behind the photo wherever the photo is opaque. Nothing was deleted. Only the order changed.
If you move Warm tone above Title, the title turns orange too, because the adjustment now affects everything below it, including the text.
Layers are not the same as the flattened image
The layered file and the exported image are different things. A PSD file keeps every layer. A JPEG or PNG export stores only the composited result. Once you export, you cannot pull the layers back out of a JPEG.
For that reason, keep a layered master file and export copies from it.
Where layers appear in the interface
You work with layers mainly in the Layers panel, opened with Window > Layers or the F7 key. The panel lists layers from top of stack to bottom. Each row shows a thumbnail, a name, and small icons for visibility and state. The next chapter tours this panel in detail.
Layer kinds at a glance
Not every layer holds pixels. Later chapters cover each in depth. For now, notice that they all take part in the same bottom-to-top compositing:
- Pixel layers hold painted or pasted pixels.
- Type layers hold editable text.
- Shape layers hold vector shapes that stay sharp at any size.
- Smart objects wrap content so it can be scaled and filtered without permanent loss.
- Adjustment layers change the look of the layers below without altering their pixels.
- Fill layers supply a solid color, gradient, or pattern.
Common errors and misconceptions
- "My edit does nothing." Check which layer is active. Painting or filtering affects only the selected layer. If the active layer is hidden, empty in that area, or locked, the change may not appear.
- "A layer vanished." Usually it is covered by an opaque layer above it, hidden with the eye icon, or sitting at zero opacity. It is rarely deleted.
- "An adjustment affects too much." An adjustment layer affects everything below it in the stack, not only the layer next to it. Later chapters show how groups and clipping masks limit this.
- "The file got huge." Every layer stores its own pixel data, so a document with many full-size layers grows quickly. Keep only the layers you need.
- Expecting the order in the panel to be the order of creation. The panel shows stacking position, not history.
Reading the stack with a script
You can inspect the model directly with scripting. In Photoshop's ExtendScript, doc.layers[0] is the topmost item in the Layers panel. This script lists the top-level layers from top to bottom, which is the reverse of the order in which they are composited.
// ExtendScript (.jsx): list top-level layers from top of stack to bottom
var doc = app.activeDocument;
var lines = [];
for (var i = 0; i < doc.layers.length; i++) {
lines.push((i + 1) + ". " + doc.layers[i].name);
}
alert(lines.join("\n"));Run it from File > Scripts > Browse. The first line shown is drawn last, and the last line is drawn first.
Summary of the model
- A document is an ordered stack of layers.
- The canvas shows the result of compositing from bottom to top.
- Each layer contributes its pixels or an effect, shaped by opacity, fill, and blend mode.
- Reordering changes the result without destroying any content.
- Exporting to a flat format discards the layers, so keep a layered master.
Exercise
A document has these layers from top to bottom: a "Logo" pixel layer, a "Darken" adjustment layer, and a "Photo" pixel layer. The logo is white and sits over a bright area of the photo. You drag "Darken" to the top of the stack. What happens to the logo, and why?
Show answer
The logo gets darker. An adjustment layer changes everything computed below it. Before the move, the Darken layer sat under the logo, so only the photo was darkened. After the move, the logo is part of the image below Darken, so the adjustment applies to it too. No pixels were deleted. Only the compositing order changed.
Exercise
You hide the topmost layer of a file, and the canvas shows no change. Give two reasons this could happen.
Show answer
Possible reasons include: the layer has no pixels in the visible area, so it was transparent there; or another layer above it is not what you expected, so the hidden layer was not the topmost one drawn. A layer with zero opacity, or one fully covered by an opaque layer above it, would also show no change when toggled. The model to apply is that each layer only changes the canvas where it contributes visible pixels or an effect.