Creative workflow
How to Verify That a PNG Export Kept the Same Alpha Mask

A corrected cutout can look different against dark teal even when every pixel retains the same opacity. We compared the decoded alpha in two fictional North Pier PNG files, then inspected one real edge pixel to separate a transparency change from a color change.
Quick answer
Open both exports and confirm that their dimensions and orientation match. Decode each to RGBA, take the alpha channel, and compare it pixel by pixel. If opacity matches, inspect RGB and compositing separately.
1. Make the two inputs comparable
Keep an original and the exact deliverable. Compare the unscaled files at the same pixel dimensions and register their silhouettes. A difference after cropping, rotation or resampling compares different coordinates. The supplied example uses two 320 × 208, 8-bit RGBA PNGs.
2. Compare the alpha bytes
The Python example below uses Pillow. Its output reports the number of pixels where the alpha samples differ. Run it with the original and edited PNG. Zero means identical alpha samples in these 8-bit decoded images. For a 16-bit workflow use a tool that retains the full sample depth instead of converting to 8-bit RGBA.
# Python 3 with Pillow installed. Use two 8-bit PNGs with the same dimensions:
# python3 compare-png-alpha.txt original.png edited.png
from argparse import ArgumentParser
from pathlib import Path
from PIL import Image, ImageChops
parser = ArgumentParser(description="Count changed decoded alpha samples in two 8-bit PNGs.")
parser.add_argument("original")
parser.add_argument("edited")
args = parser.parse_args()
for filename in (args.original, args.edited):
with Path(filename).open("rb") as stream:
header = stream.read(25)
if header[:8] != b"\x89PNG\r\n\x1a\n" or header[12:16] != b"IHDR":
parser.error("Both inputs must be PNG files.")
if header[24:25] != bytes([8]):
parser.error("Use 8-bit PNG files.")
with Image.open(args.original) as original, Image.open(args.edited) as edited:
if original.format != "PNG" or edited.format != "PNG":
parser.error("Both inputs must be PNG files.")
if original.size != edited.size:
parser.error("Both PNG files must have the same pixel dimensions.")
a = original.convert("RGBA").getchannel("A")
b = edited.convert("RGBA").getchannel("A")
unchanged = ImageChops.difference(a, b).histogram()[0]
print(f"Changed alpha samples: {a.width * a.height - unchanged}")3. Explain any visible difference with a second check
Both test images have alpha 115 at zero-based pixel (128, 29). The matted image stores RGB (146, 194, 186), and the corrected image stores RGB (13, 120, 103). Those different colors produce different composites even with identical alpha. If your project requires pixel-identical output, compare RGB and color profiles as well.
Start with the reference

Compare the two proofs in Ciyo
We imported the two proofs into a private production Ciyo project at the same scale and used Select to drag the comparison into place. This board shows the externally rendered or measured outputs for review.
The two canvas proofs have different-looking edges on the same dark background. The 66,560 decoded alpha samples are identical across the two original PNGs.

Example files
Sources and related reading
Frequently asked questions
Do matching masks prove the same transparent image?
They prove the same opacity values at each compared coordinate. Colors, profiles and transformation during rendering can still affect the composite.
Why should I compare the source files instead of screenshots?
A screenshot contains the composited background and display scaling. Use it to review appearance and the original PNGs to compare stored transparency.
Review a second version on the canvas
Keep both proofs at the same size and put the exact difference you reviewed in the handoff.