HISTORICAL EXPORT REVIEW · FILE INSPECTION

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.

BY Martin DelophyPUBLISHED REVIEWED HISTORICAL OUTPUT · AD-FREETESTING METHOD
01

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
ArtifactActual encoding and dimensionsTransparency result
Matting source
21,654 bytes
JPEG/JFIF · 512 × 768 · 8-bit, three-component baselineNo alpha channel. The .png extension is misleading.
Matting result
26,602 bytes
JPEG/JFIF · 681 × 1010 · 8-bit, three-component baselineNo alpha channel. Blue is a baked-in background.
Background-removal reference
149,263 bytes
PNG · 637 × 1024 · indexed color, type 3 with tRNS212,250 fully transparent; 108,442 partially transparent; 331,596 opaque pixels.

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.

python3 inspect-image-export.py \
  matting-before.png matting-after.png bg-after.png

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.

  1. 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.
  2. 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.
  3. 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.

About the author →

HISTORICAL OUTPUT / INTERACTIVE MATTING

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.

Portrait before matting, photographed on a busy night street
BEFORE 512 × 768 px
Matted portrait on a blue review background, with hair and cat-ear boundaries visible
AFTER 681 × 1010 px

EVIDENCE RECORD

FIELD TEST ID
MATTE-HIST-2026-09-04-01
STATUS
Historical output / workflow deferred from discovery
WORKFLOW
Browse currently verified workflows
TEST INPUT
matting-before.png · 512 × 768 JPEG (legacy filename)
RECORDED OUTPUT
matting-after.png · 681 × 1010 JPEG (legacy filename)
ARTIFACT INTEGRITY
Input SHA-256 08bc6a6dbd53… · output SHA-256 3b757ab1752f…
RECOVERED RUNTIME
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

  1. Download the original files and repeat the signature, frame-header and SHA-256 checks with the inspection script linked in this article.
  2. Compare the visible hair and shoulder boundaries at matching display size; the original mask cannot be recovered from this flattened preview.
  3. 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.