{"course":{"slug":"image-editing","title":"Editing an Image","url":"https://addaly.com/learn/image-editing","level":"beginner","track":"create"},"lesson":{"slug":"the-layer-stack-and-order","title":"The same three edits in a different order give a different picture","url":"https://addaly.com/learn/image-editing/the-layer-stack-and-order","position":14,"of":78,"minutes":9,"answer":"Image operations are not commutative, so a layer stack is an ordered recipe (repairs under tone, tone under colour.","keyIdea":"Image operations are not commutative, so a layer stack is an ordered recipe (repairs under tone, tone under colour, sharpening last) and a stamped flatten is a snapshot that silently goes stale the moment anything beneath it changes."},"body":{"format":"markdown","text":"## An adjustment layer sees everything under it\n\nThe rule is short: an adjustment layer applies to the composite of every layer beneath it in the same group, and to nothing above it. Move it up the stack and it starts affecting more; move it down and it affects less. Clip it (from the masks lesson) and it affects exactly one.\n\nThat means the stack is not a pile of independent settings. It is an ordered recipe, and the order is part of the result.\n\n## Prove it with two numbers\n\nTake a pixel at RGB 200, 100, 100, a mid-toned warm red.\n\n**Path A: saturation first, then a darkening curve.** Raise saturation, and the channels spread apart, say to 220, 80, 80. Now apply a curve that scales everything to 70 per cent: 154, 56, 56.\n\n**Path B: the darkening curve first, then saturation.** Scale to 70 per cent: 140, 70, 70. Now raise saturation by the same amount, and the spread is applied to a smaller range: roughly 154, 63, 63.\n\nDifferent answers, same two operations. This is not a rounding artefact; most image operations are not commutative, because each one is a non-linear function of the last one's output. When somebody says \"I did exactly what you did and it looks different\", the order of the stack is the first thing to check.\n\n## A stack order that works for nearly every job\n\nBottom to top. Each level exists because what is above it depends on what is below being settled.\n\n> Figure: A stack order that works for nearly every job. Layers, top to bottom: Output: the flattened copy that gets resized, sharpened, converted (Switched on last, or made fresh at each export. Sharpening exaggerates whatever it is handed, so nothing may come after it.); Effects: vignette, grain, glow (Applied over everything below so one treatment covers the whole picture rather than one element of it.); Colour: white balance correction, Hue/Saturation, the grade (Above tone, because a grade built on an unsettled exposure will not transfer to the next frame in the set.); Tone: global Curves, then masked local Curves and dodge and burn (Set the black and white points, then shape. Set a Curves layer to Luminosity and the contrast goes through without the saturation drift.); Repair: clone and heal on an empty layer, Sample All Layers on (Below tone, so a later curve change does not strand repairs that were sampled against different tones. Put it above the background and it adapts.); Background and geometry: the developed file, lens and perspective already applied (Geometry resamples every pixel in the frame, so it goes before any local work or it stretches your repairs with everything else.). An adjustment layer sees the composite of everything beneath it and nothing above, so the stack is an ordered recipe rather than a pile of settings. Two of these placements are load-bearing: repairs under tone, and sharpening above everything and applied last.\n\n1. **Background**: the developed image, or the smart object containing the raw file.\n2. **Geometry**: perspective, straightening, lens correction. Ideally already done in the raw developer, because these resample everything.\n3. **Repair**: clone and heal layers, with *Sample All Layers* on. Damage should be gone before you judge tone, or you will be setting exposure around a dust spot.\n4. **Global tone**: Levels or Curves for black point, white point and overall contrast.\n5. **Local tone**: dodge and burn, masked Curves layers for individual regions.\n6. **Colour**: white balance corrections, Hue/Saturation, selective colour, grading.\n7. **Effects**: vignette, grain, glow.\n8. **Output**: the flattened copy that gets resized, sharpened and converted. Kept in the master file as a group you switch on last, or made fresh each time you export.\n\nThe two placements that are load-bearing:\n\n**Repair below tone.** If you clone at the top of the stack, your repairs are made against the already-adjusted image. Change the curve afterwards and the repairs no longer match, because they were sampled from different tones. Put the clone layer directly above the background, under everything tonal, and it adapts.\n\n**Sharpening above everything, and applied last of all.** Sharpening exaggerates whatever it is given. Applied under a contrast curve, the curve amplifies the halos it created. This is the same argument as the output lesson later, one level up.\n\n## Name the layers, or the file is write-only\n\nA 30-layer file where every layer is called \"Layer 14 copy\" is a file only you can use, and only this week. Double-click the name and type four words: `burn – left wall`, `heal – dust on lid`, `curve – overall contrast`.\n\nColour-code groups if the tool supports it. Photoshop, Photopea and Krita all allow a colour label on a layer; use one colour for repairs, one for tone, one for output.\n\nThe test: could a colleague open this at 9 a.m. tomorrow, switch off your colour work, and see the untouched repair underneath? If not, you have a picture rather than a working file.\n\n## Stamp visible, and what it costs\n\n**Ctrl/Cmd+Alt+Shift+E** creates a new layer containing a flattened copy of everything currently visible, leaving the stack beneath it intact. It is the standard move before a filter that cannot work on a live stack: most sharpening, frequency separation, and anything in GIMP where a filter needs real pixels.\n\nThe cost is honest and worth stating. A stamped layer is a snapshot. Change anything below it and the stamp does not update; you now have two versions of the picture in one document, and the visible one is the stale one. If you stamp, do it near the end, name it clearly, and expect to delete and re-stamp when you revise. Several long arguments with a client end with the discovery that the exported file came from a stamp made before the last round of changes.\n\n## What the free tools do differently\n\n**GIMP** has no true adjustment layers, which makes this whole model harder. The standard workaround is to duplicate the layer, apply the adjustment destructively to the copy, and mask it, which gives you a maskable, removable, re-orderable layer with one loss: you cannot reopen its settings. GIMP 3.0 added non-destructive layer effects, which closes part of the gap. Plan the stack the same way and accept that revising a tone move means redoing it.\n\n**Krita** has filter layers and filter masks and behaves much like Photoshop for this.\n\n**Photopea** has adjustment layers, groups, clipping and stamp-visible with the same shortcuts, and reads and writes PSD, which makes it the closest free match for collaborative work.\n\nOne broader limitation: a deep stack is a record of your reasoning and also a performance cost, because every change re-composites everything above it. Twenty adjustment layers on a 50-megapixel file will lag on any machine. The next lessons in this block are about that trade."},"check":{"question":"An editor clones out several dust spots on a layer placed at the very top of the stack, above all the tonal adjustments. They then change the main Curves layer to brighten the image, and the cloned patches now show as visible dark discs. Why?","options":[{"text":"The clone layer was sampled from the adjusted composite, so its pixels are fixed at the old brightness while everything beneath it moved.","correct":true},{"text":"Cloning always produces a slight tonal mismatch, and the Healing Brush would have avoided the problem wherever the layer sat in the stack.","correct":false,"tempting":"Offers a genuinely better tool for blending, but healing sampled above the adjustments would go stale in exactly the same way when the curve changes."},{"text":"The clone layer's blend mode reverted to Normal, so it is no longer inheriting the tone of the layers below it.","correct":false,"tempting":"Assumes Normal mode is the fault when Normal is the correct mode for a clone layer; the issue is where the pixels came from, not how they are blended."},{"text":"The Curves layer is below the clone layer, so it cannot reach the cloned pixels, and moving it to the top of the stack would fix the mismatch.","correct":false,"tempting":"Identifies the right structural fact and draws the wrong remedy: putting the curve on top would adjust the patches too, but the repair should sit under the tone so it adapts rather than being corrected twice."}]},"prev":{"slug":"blend-modes-are-arithmetic","title":"Twenty-seven blend modes, six ideas","url":"https://addaly.com/learn/image-editing/blend-modes-are-arithmetic"},"next":{"slug":"groups-clipping-and-pass-through","title":"Why an adjustment stopped working when you put it in a folder","url":"https://addaly.com/learn/image-editing/groups-clipping-and-pass-through"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'The same three edits in a different order give a different picture', in Editing an Image. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/image-editing/the-layer-stack-and-order (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"The same three edits in a different order give a different picture","courseTitle":"Editing an Image","module":{"index":2,"slug":"the-non-destructive-workshop","title":"The non-destructive workshop"},"answer":null,"keyIdea":"Image operations are not commutative, so a layer stack is an ordered recipe (repairs under tone, tone under colour, sharpening last) and a stamped flatten is a snapshot that silently goes stale the moment anything beneath it changes.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"type":"stack","title":"A stack order that works for nearly every job","layers":[{"label":"Output: the flattened copy that gets resized, sharpened, converted","detail":"Switched on last, or made fresh at each export. Sharpening exaggerates whatever it is handed, so nothing may come after it."},{"label":"Effects: vignette, grain, glow","detail":"Applied over everything below so one treatment covers the whole picture rather than one element of it."},{"label":"Colour: white balance correction, Hue/Saturation, the grade","detail":"Above tone, because a grade built on an unsettled exposure will not transfer to the next frame in the set."},{"label":"Tone: global Curves, then masked local Curves and dodge and burn","detail":"Set the black and white points, then shape. Set a Curves layer to Luminosity and the contrast goes through without the saturation drift."},{"label":"Repair: clone and heal on an empty layer, Sample All Layers on","detail":"Below tone, so a later curve change does not strand repairs that were sampled against different tones. Put it above the background and it adapts."},{"label":"Background and geometry: the developed file, lens and perspective already applied","detail":"Geometry resamples every pixel in the frame, so it goes before any local work or it stretches your repairs with everything else."}],"caption":"An adjustment layer sees the composite of everything beneath it and nothing above, so the stack is an ordered recipe rather than a pile of settings. Two of these placements are load-bearing: repairs under tone, and sharpening above everything and applied last."},"alt":"Figure: A stack order that works for nearly every job. Layers, top to bottom: Output: the flattened copy that gets resized, sharpened, converted (Switched on last, or made fresh at each export. Sharpening exaggerates whatever it is handed, so nothing may come after it.); Effects: vignette, grain, glow (Applied over everything below so one treatment covers the whole picture rather than one element of it.); Colour: white balance correction, Hue/Saturation, the grade (Above tone, because a grade built on an unsettled exposure will not transfer to the next frame in the set.); Tone: global Curves, then masked local Curves and dodge and burn (Set the black and white points, then shape. Set a Curves layer to Luminosity and the contrast goes through without the saturation drift.); Repair: clone and heal on an empty layer, Sample All Layers on (Below tone, so a later curve change does not strand repairs that were sampled against different tones. Put it above the background and it adapts.); Background and geometry: the developed file, lens and perspective already applied (Geometry resamples every pixel in the frame, so it goes before any local work or it stretches your repairs with everything else.). An adjustment layer sees the composite of everything beneath it and nothing above, so the stack is an ordered recipe rather than a pile of settings. Two of these placements are load-bearing: repairs under tone, and sharpening above everything and applied last."}},"blocks":[{"t":"h2","id":"an-adjustment-layer-sees-everything-under-it","runs":[{"text":"An adjustment layer sees everything under it"}]},{"t":"p","runs":[{"text":"The rule is short: an adjustment layer applies to the composite of every layer beneath it in the same group, and to nothing above it. Move it up the stack and it starts affecting more; move it down and it affects less. Clip it (from the masks lesson) and it affects exactly one."}]},{"t":"p","runs":[{"text":"That means the stack is not a pile of independent settings. It is an ordered recipe, and the order is part of the result."}]},{"t":"h2","id":"prove-it-with-two-numbers","runs":[{"text":"Prove it with two numbers"}]},{"t":"p","runs":[{"text":"Take a pixel at RGB 200, 100, 100, a mid-toned warm red."}]},{"t":"p","runs":[{"text":"Path A: saturation first, then a darkening curve.","b":true},{"text":" Raise saturation, and the channels spread apart, say to 220, 80, 80. Now apply a curve that scales everything to 70 per cent: 154, 56, 56."}]},{"t":"p","runs":[{"text":"Path B: the darkening curve first, then saturation.","b":true},{"text":" Scale to 70 per cent: 140, 70, 70. Now raise saturation by the same amount, and the spread is applied to a smaller range: roughly 154, 63, 63."}]},{"t":"p","runs":[{"text":"Different answers, same two operations. This is not a rounding artefact; most image operations are not commutative, because each one is a non-linear function of the last one’s output. When somebody says “I did exactly what you did and it looks different”, the order of the stack is the first thing to check."}]},{"t":"h2","id":"a-stack-order-that-works-for-nearly-every-job","runs":[{"text":"A stack order that works for nearly every job"}]},{"t":"p","runs":[{"text":"Bottom to top. Each level exists because what is above it depends on what is below being settled."}]},{"t":"ol","start":1,"items":[[{"text":"Background","b":true},{"text":": the developed image, or the smart object containing the raw file."}],[{"text":"Geometry","b":true},{"text":": perspective, straightening, lens correction. Ideally already done in the raw developer, because these resample everything."}],[{"text":"Repair","b":true},{"text":": clone and heal layers, with "},{"text":"Sample All Layers","i":true},{"text":" on. Damage should be gone before you judge tone, or you will be setting exposure around a dust spot."}],[{"text":"Global tone","b":true},{"text":": Levels or Curves for black point, white point and overall contrast."}],[{"text":"Local tone","b":true},{"text":": dodge and burn, masked Curves layers for individual regions."}],[{"text":"Colour","b":true},{"text":": white balance corrections, Hue/Saturation, selective colour, grading."}],[{"text":"Effects","b":true},{"text":": vignette, grain, glow."}],[{"text":"Output","b":true},{"text":": the flattened copy that gets resized, sharpened and converted. Kept in the master file as a group you switch on last, or made fresh each time you export."}]]},{"t":"p","runs":[{"text":"The two placements that are load-bearing:"}]},{"t":"p","runs":[{"text":"Repair below tone.","b":true},{"text":" If you clone at the top of the stack, your repairs are made against the already-adjusted image. Change the curve afterwards and the repairs no longer match, because they were sampled from different tones. Put the clone layer directly above the background, under everything tonal, and it adapts."}]},{"t":"p","runs":[{"text":"Sharpening above everything, and applied last of all.","b":true},{"text":" Sharpening exaggerates whatever it is given. Applied under a contrast curve, the curve amplifies the halos it created. This is the same argument as the output lesson later, one level up."}]},{"t":"h2","id":"name-the-layers-or-the-file-is-write-only","runs":[{"text":"Name the layers, or the file is write-only"}]},{"t":"p","runs":[{"text":"A 30-layer file where every layer is called “Layer 14 copy” is a file only you can use, and only this week. Double-click the name and type four words: "},{"text":"burn – left wall","code":true},{"text":", "},{"text":"heal – dust on lid","code":true},{"text":", "},{"text":"curve – overall contrast","code":true},{"text":"."}]},{"t":"p","runs":[{"text":"Colour-code groups if the tool supports it. Photoshop, Photopea and Krita all allow a colour label on a layer; use one colour for repairs, one for tone, one for output."}]},{"t":"p","runs":[{"text":"The test: could a colleague open this at 9 a.m. tomorrow, switch off your colour work, and see the untouched repair underneath? If not, you have a picture rather than a working file."}]},{"t":"h2","id":"stamp-visible-and-what-it-costs","runs":[{"text":"Stamp visible, and what it costs"}]},{"t":"p","runs":[{"text":"Ctrl/Cmd+Alt+Shift+E","b":true},{"text":" creates a new layer containing a flattened copy of everything currently visible, leaving the stack beneath it intact. It is the standard move before a filter that cannot work on a live stack: most sharpening, frequency separation, and anything in GIMP where a filter needs real pixels."}]},{"t":"p","runs":[{"text":"The cost is honest and worth stating. A stamped layer is a snapshot. Change anything below it and the stamp does not update; you now have two versions of the picture in one document, and the visible one is the stale one. If you stamp, do it near the end, name it clearly, and expect to delete and re-stamp when you revise. Several long arguments with a client end with the discovery that the exported file came from a stamp made before the last round of changes."}]},{"t":"h2","id":"what-the-free-tools-do-differently","runs":[{"text":"What the free tools do differently"}]},{"t":"p","runs":[{"text":"GIMP","b":true},{"text":" has no true adjustment layers, which makes this whole model harder. The standard workaround is to duplicate the layer, apply the adjustment destructively to the copy, and mask it, which gives you a maskable, removable, re-orderable layer with one loss: you cannot reopen its settings. GIMP 3.0 added non-destructive layer effects, which closes part of the gap. Plan the stack the same way and accept that revising a tone move means redoing it."}]},{"t":"p","runs":[{"text":"Krita","b":true},{"text":" has filter layers and filter masks and behaves much like Photoshop for this."}]},{"t":"p","runs":[{"text":"Photopea","b":true},{"text":" has adjustment layers, groups, clipping and stamp-visible with the same shortcuts, and reads and writes PSD, which makes it the closest free match for collaborative work."}]},{"t":"p","runs":[{"text":"One broader limitation: a deep stack is a record of your reasoning and also a performance cost, because every change re-composites everything above it. Twenty adjustment layers on a 50-megapixel file will lag on any machine. The next lessons in this block are about that trade."}]}],"check":{"question":[{"text":"An editor clones out several dust spots on a layer placed at the very top of the stack, above all the tonal adjustments. They then change the main Curves layer to brighten the image, and the cloned patches now show as visible dark discs. Why?"}],"options":[{"text":[{"text":"The clone layer was sampled from the adjusted composite, so its pixels are fixed at the old brightness while everything beneath it moved."}],"correct":true,"tempting":null},{"text":[{"text":"Cloning always produces a slight tonal mismatch, and the Healing Brush would have avoided the problem wherever the layer sat in the stack."}],"correct":false,"tempting":[{"text":"Offers a genuinely better tool for blending, but healing sampled above the adjustments would go stale in exactly the same way when the curve changes."}]},{"text":[{"text":"The clone layer’s blend mode reverted to Normal, so it is no longer inheriting the tone of the layers below it."}],"correct":false,"tempting":[{"text":"Assumes Normal mode is the fault when Normal is the correct mode for a clone layer; the issue is where the pixels came from, not how they are blended."}]},{"text":[{"text":"The Curves layer is below the clone layer, so it cannot reach the cloned pixels, and moving it to the top of the stack would fix the mismatch."}],"correct":false,"tempting":[{"text":"Identifies the right structural fact and draws the wrong remedy: putting the curve on top would adjust the patches too, but the repair should sit under the tone so it adapts rather than being corrected twice."}]}],"order":[2,3,1,0],"why":null},"prev":{"slug":"blend-modes-are-arithmetic","title":"Twenty-seven blend modes, six ideas","minutes":10},"next":{"slug":"groups-clipping-and-pass-through","title":"Why an adjustment stopped working when you put it in a folder","minutes":8}}}