Migrating: flat images
PNG/JPEG/TIFF/WebP/AVIF as single-layer native documents through the shared import pipeline.
No mapping table here — by design
The import-flat package has landed. Unlike the layered formats it has no
blend-mode mapping table to generate a fidelity table from (a flat image has
no foreign blend vocabulary): its verdicts are conditional on file content
— EXIF orientation, ICC profiles, multi-page TIFFs — as described below.
The trivial case that exercises the whole path
Flat raster images — PNG, JPEG, TIFF, WebP, AVIF — become single-layer native
documents through the exact same pipeline every other importer uses:
content-based format detection (magic bytes, never the file extension),
ImporterContext's image decoder, the fidelity report, and source
preservation. It's the simplest case, but it's a real exercise of the shared
@faceless-photolib/import-pipeline contract, not a special-cased shortcut —
the same contract test kit
(describeImporterContract) every importer package runs against applies here
too.
Scope
Per design D8:
- One raster layer per image, at the image's native resolution.
- EXIF orientation is honored by reusing the same
createImageBitmaporientation-correction fix already used by the editor's own image loading path — one orientation implementation, not two. - ICC color profiles: a tagged profile maps to the declared layer color
space where
packages/colorrecognizes it (mapped); an untagged or unrecognized profile assumes sRGB and reportsdegraded, naming the assumption explicitly rather than silently guessing a working space.
Policy
Even the "trivial" case gets the full policy treatment documented on the
OpenRaster guide: a fidelity report (even if
it's usually all mapped), the original file preserved as a role: "master"
blob, and the import recorded as a first-class history-DAG node.
Corpus samples
Every flat-image fixture in the sample corpus — the JPEG EXIF-orientation
matrix, PNG ICC/16-bit cases, and WebP/AVIF variants — is served through the
same /api/samples/<id> proxy every other demo on this site uses; no direct
storage URL ever appears in this page. "Open in editor" runs the real import
pipeline end to end, fidelity dialog included.
Preparing sample list…
Next
OpenRaster · Krita · Photoshop