Inspect the overlap of two images at exact offsets
Admin ·
Layering two images can reveal the original in one area and increase opacity in another. Start with two copies of the same small sample so the effect of an offset is easy to verify.
Shift the sample layer one pixel right and down
Select Load example. Both inputs use the same 4 × 2 PNG. The defaults keep the base dimensions and put the overlay at an offset of +1 horizontally and +1 vertically, at 50% opacity.
Select Stack images and save a PNG. Compare the two pixels below using one-based row and column positions in the saved image.
| Output pixel | Base RGBA | Overlay before opacity | Output RGBA |
|---|---|---|---|
| Row 2, column 2 | 64, 128, 192, 128 | 255, 0, 0, 255 | 191, 43, 64, 192 |
| Row 2, column 3 | 18, 37, 92, 0 | 0, 255, 0, 255 | 0, 255, 0, 128 |
W3C Compositing and Blending Level 1, simple alpha compositingW3C Portable Network Graphics Third Edition, alpha
Keep a layer that crosses the left edge
Choose Include both layers and change the horizontal offset to −1 and the vertical offset to 0. Create the composite again. The new output is 5 × 2 pixels because the overlay begins one pixel before the base.
The first pixel in the top row contains the red overlay at alpha 128. Switch back to Keep base dimensions and that extra column is clipped.
W3C Compositing and Blending Level 1, simple alpha compositing
Check alpha and the order of the inputs
Overlay opacity multiplies the stored alpha of the top image before the tool combines the two layers. Lower it to reveal more of the base. The tool blends encoded sRGB samples and records alpha separately.
When the layer order matters, choose the file that should appear first as the base and the file that should cover it as the overlay. Check the dimensions of the saved PNG before placing it on another page.
W3C Compositing and Blending Level 1, simple alpha compositingW3C Portable Network Graphics Third Edition, alpha
Common questions
What does a negative offset mean?
It moves the overlay left or above the base. Include both layers if you want that extra space in the file.
Can I edit the two layers in the downloaded PNG?
The PNG contains one composited raster. Keep the source files to adjust the stack again.