The Cutout Was a JPEG: A Matting Export Failure Review
A convincing blue-background selection was saved under a .png filename, but the retained file is an opaque JPEG. We inspected the original bytes, reproduced the transparency check and used a separate working cutout as a reference. Here is what failed, what the files prove and how to avoid delivering the same kind of unusable asset.
Why this export cannot serve as a transparent master
Place the retained cutout on a white or black page and a blue rectangle remains around the subject. The export stored the preview background in its color pixels instead of preserving transparency.
Our September 7, 2026 inspection identified both matting-before.png and matting-after.png as JPEG/JFIF files. Their first bytes are FF D8 FF E0; their baseline frame headers declare three image components and no alpha channel. We inspected the unchanged files without running matting inference or recovering the original export settings.
02
What the original bytes establish
Measured on the retained files; original bytes remain unchanged
The third file is a separate portrait from the documented Background Remover example, included to check that our inspection recognizes a real transparent export. It is not a rerun of the matting portrait or a quality comparison between two models. Its alpha counts sum to 652,288 pixels, matching 637 × 1024. All PNG chunk checksums passed.
The PNG reference uses a palette and a transparency table rather than four stored RGBA channels. As the PNG specification explains, indexed pixels can receive their alpha values from tRNS. A test that accepts only PNG color type 6 would wrongly reject this file. Our inspector follows the palette indices, applies their transparency entries and counts the decoded alpha values.
03
Repeat the file check without running an AI model
Download the two historical files, the transparent reference and the inspection script into one directory. The script uses Python 3's standard library and reads files without modifying them. Its supported formats are deliberately bounded: the baseline JFIF headers in this record and non-interlaced 8-bit RGB, indexed or RGBA PNGs.
Compare your output with the saved inspection.json. The two matting entries should report detected_format: JPEG/JFIF, filename_matches_format: false and contains_transparent_pixels: false. The reference should report detected_format: PNG, tRNS_present: true and the three alpha counts above. Full SHA-256 hashes identify the exact bytes; matching only a filename or thumbnail is insufficient.
The JPEG finding comes from its signature, JFIF marker and baseline three-component frame header; the script does not decode JPEG pixels or estimate a quality score. The PNG result additionally checks chunk CRCs, decompresses image rows and counts actual transparency values. A macOS cross-check with sips -g format -g pixelWidth -g pixelHeight -g hasAlpha independently reported JPEG/no alpha for both matting files and PNG/alpha for the reference. The method notes and file manifest preserve the command, scope and hashes.
04
What the blue preview still lets us inspect
The preserved pair shows the retained subject and visible edge defects. It cannot expose the original prompt points or mask. Its unequal dimensions also prevent a pixel-aligned segmentation score or any claim that the larger output recovered detail.
Renaming the JPEG or converting it to PNG preserves the blue pixels. Removing blue would be a new edit, not recovery of the missing alpha values. Return to the source and retain a mask or transparent master before flattening a preview.
05
A current route to a reusable transparent cutout
Open Background Remover with its published sample source. Its documented transparent output provides a working alternative; this review has not tested the historical matting portrait through that workflow.
Run the remover and inspect the downloaded file for transparent pixels. If the small inspector rejects a PNG variant it does not support, check the alpha channel in an image editor instead; rejection does not prove opacity.
Place the export over white, dark gray and its intended destination. Check hair, glasses, accessories and shoulders at 100 percent and delivery size. Reject old-background halos or holes in solid parts; correct the mask manually if needed and recheck the export.
Keep the source and transparent master. Save any opaque preview separately after choosing its background.
The reference's 16.62 percent partial-alpha pixels demonstrate soft transparency in that file, not a quality target. Judge whether the edges fit the intended background.
06
What would justify reopening the interactive tool
The interactive matting route remains deferred. A fresh run must demonstrate initialization, image input, inference and a downloaded asset, recording model files, browser version, selected points or mask, dimensions and full hashes. For this export failure, the result must be a correctly identified PNG with real transparency and usable edges on several backgrounds. Keep the source, transparent master or mask, and separate preview. The retained historical files cannot establish that result.
EXPORT REVIEW
Questions the files can answer
Is the historical matting output a transparent PNG?
No. It is an opaque three-component JPEG with a misleading .png filename and baked-in blue pixels.
Did this review run the interactive matting model again?
No. The September 7 review repeated file-format and transparency checks only. The interactive workflow remains deferred.
Can an indexed PNG contain partial transparency?
Yes. The reference uses PNG color type 3 with tRNS and contains 108,442 partially transparent pixels.
Which workflow can I use for a transparent cutout now?
Use Background Remover with its documented sample, then inspect the downloaded asset over light and dark backgrounds. That separate result does not validate the deferred matting tool.
AUTHOR
Martin Delophy
Independent full-stack and algorithm engineer in China with 10 years of frontend, AI and audio/video development experience, including 5 years focused on AI. His open-source work covers browser AI, ONNX, WebGPU, Transformers, Stable Diffusion and local-first creative tools.
A preserved failure record for a deferred workflow
The original portrait and blue-background preview are preserved below. Both are opaque JPEGs under legacy .png filenames; the file inspection and transparent reference are documented in the article.
BEFORE 512 × 768 px
AFTER 681 × 1010 px
EVIDENCE RECORD
FIELD TEST ID
MATTE-HIST-2026-09-04-01
STATUS
Historical output / workflow deferred from discovery
Deferred implementation expected a MobileSAM encoder and quantized decoder; those artifacts are not shipped as a ready workflow.
OBSERVED MEASUREMENT
Both files are baseline three-component JPEG/JFIF, with no alpha channel.
REVIEW METHOD
Inspect the file signatures and frame headers, then review visible boundaries against the recorded blue field.
SAMPLE LIMIT
Historical pair; original generation settings and intermediate mask unavailable. File inspection was repeated September 7; matting inference was not.
REPRODUCE THE CHECK
Download the original files and repeat the signature, frame-header and SHA-256 checks with the inspection script linked in this article.
Compare the visible hair and shoulder boundaries at matching display size; the original mask cannot be recovered from this flattened preview.
A new inference would require restoring and separately testing the deferred workflow; these downloads reproduce the file inspection only.
01
Visible boundary defects
The face, glasses, cat ears and main hair shapes remain recognizable. Small dark marks survive to the right of the hair, with uneven hair and shoulder edges. The saved preview shows those defects, but the missing mask and export settings prevent attributing them to selection, resizing, compositing or JPEG encoding.