Skip to content

formats: shared raster codecs (design first) #785

Closed

Description

@dylanmtaylor

Current verified status — 2026-11-18

Open; pixel-codec adoption does not complete every header, metadata or writer route. Light #4300 WebP 8a302d39, #4426 BMP 1218db19 and #4312 native AVIF cf3d0205 merged, superseding older pending wording. AVIF disabled-feature/WASM, animation and extended-image policies remain separate; retain the TGA non-applicability correction.

Shared #2134 f57bbca2, #2135 7ff0f967, #2231 82fc7451, #2263 WebP safety 0d8d8b90, #2178 JPEG-LS/prefix b130ac1f and #2281 EXR writer 3b8e426a merged. These do not establish adoption/sign-off in every app. Shared #2294 closed unmerged and was superseded by attribution-corrected #2302 merged 8aa61a47; post-merge CI is not certified. Reduced JPEG #2296 updated to c4fa2f5d, requiring fresh validation rather than attributing old-head failures to it. #2275 JXL 3bfafcc0 has failing gates.

Consumer correction — 2026-11-19: Effect #3937 merged 665bfac0 for EXR export only. Dylan’s release hold pending vangel parity sign-off remains a release-only hold, not a merge-sign-off requirement; standalone export rayon follow-up remains. Owner-led reader/cache integration Effect #3301 is open at vangel76’s 98ada1e8, which merged current main and removed the old conflict; it remains BLOCKED/CHANGES_REQUESTED by FredApps. The folded #3750 aggregate cap is unchanged; folded #3941 adds export/render-queue/CLI/watch-folder session budgets. Exact-head Ubuntu, Nix and lock checks passed; coverage archive/shards skipped. No independent parity or sign-off is established. This is separate from the merged export writer; releases remain held. Texture #668 merged 51c3f644, runtime icons/screenshots/base-color codecs only: exact head 995eff5e passed Linux/Windows native gates, all four coverage shards, scan and CodeQL; CodeRabbit skipped. This is not whole-raster or post-merge certification. Prior Fig #2478 snapshot (b5ea6b00, draft/conflicting and awaiting #2302 reconciliation) is historical and not reverified here. None of these scoped updates certifies whole-raster completion.

Bounded live snapshot, not exhaustive source/corpus or post-merge CI certification. Earlier checkpoints below are historical; original scope and ownership are preserved. No whole-issue closure.

Source/reason audit — 2026-11-19: The old Light JPEG local-marker rationale was test-only code: current production inspection/MPF/EOI/SEF/pixels delegate shared APIs. Design reduced JPEG decoding and PNG/TIFF/WebP/BMP resolution parsing remain concrete local/adoption boundaries. Light TGA has no established consumer and is N/A, not an unfinished cutover. Source-confirmed routes still lack exhaustive corpus certification.


Verified progress — 2026-11-16

Open; shared pixel decoding is widely used, header/writer residuals remain. PhotoCraft main 6f4a2cba aliases photocraft-codecs to craft-image-codecs; LightCraft main d6715fb4 uses shared JPEG/PNG/WebP/TIFF/JXL/HEIF routes. VectorCraft #7669 is now merged as 7452b6f3, superseding its older ed6f22a8 open-PR status. The scoped shared-codec integration is landed; remaining local writer/header routes require current-main verification before completion, rather than carrying the old snapshot forward as current. WordCraft header probes remain local. LightCraft header/metadata PR stack is open. Shared BMP resolution #1837 merged 8a83e917; library merge alone is not consumer completion.

This checkpoint combines pinned-main source inspection with current GitHub PR states. It is bounded, not exhaustive absence proof or fresh runtime/CI certification. Original scope is retained below; #778 remains the consolidated tracker.


photocraft/codecs (22k lines, depth- and metadata-preserving), lightcraft/codecs (9.5k lines, decodes to linear light) and designcraft/images (3.4k lines, built on image/tiff) each cover PNG, JPEG, TIFF, WebP and others with different designs. Write a short design note on a shared API before moving code.

Part of #778. Approach: see "How each move is done" there.

WebP stored-dimension parity follow-up, 2026-11-16: shared #1921 (5ac4cbc1) fixes a pre-existing strict/compatibility EXIF disagreement that swapped stored width/height. It reuses the bounded WebP container probe and adds an independent 2×3 malformed-EXIF regression. LightCraft #4300 remains open/conflicting at f0451d9b; it requires the landed shared pin and refreshed assertions/hosted tests. Shared CI/review pending; not consumer completion.

LightCraft BMP residual, source-verified 2026-11-16: Main aa08a770 already delegates dimensions, coverage and pixels after #4299, but crates/codecs/src/sniff.rs:133–137 still parses DIB-header sizes. New shared #1929 (be8f06f1) ports the exact supported-header check with Brandon Thomas primary authorship and boundary regressions. Dependent LightCraft #4426 (5bba2c23) removes that final local BMP routing parser without relaxing the 26-byte/DIB allowlist validation. Both are open, hosted CI and independent review pending; consumer needs merged shared pin and fresh tests. BMP remains partial on main until integration and re-verification.

BMP prerequisite landed and consumer repinned (2026-11-16 22:56 UTC): User merged shared #1929 at a9efd722b49924588448fba5c59f36d3aee3f4c6. Shared Workspace 43974796850 is running, coverage 43974797005 pending and lockfile passed. LightCraft #4426 is now 4c119c1f5c6c367c1f393d7c5d0eaaf3f9f3ace1, pinning merged shared source with regenerated Flatpak inventory; fresh hosted gates required. Previous head had real UI coverage failures, not merely a Sonar quality warning; separate #4436 and #4201 address the UI paths. LightCraft main is not yet BMP-complete; consumer remains open.

Integration checkpoint — 2026-11-17

Shared Radiance HDR prerequisite #1961 is verified merged. This is library progress only; the corresponding Film consumer and remaining raster readers/writers require their own final-pin and hosted validation. Earlier source snapshots are not refreshed corpus certification. #778 contains the current cross-project checkpoint.

TGA scope correction, 2026-11-17: LightCraft main 7bb9165c has no TGA variant in codecs/sniff.rs and no TGA header/decode route in codecs/other.rs; bounded all-state TGA-title PR search found none. The #778 TGA row is a no-consumer/non-applicable cutover entry, not a missing migration or a completed format. Historical #4244 did not add TGA. New TGA support would be a separate feature. Other raster work remains open.

Verified #778 checkpoint — 2026-11-20

FigCraft #2515 landed high-depth thumbnail resize before 8-bit reduction; exact main Ubuntu/Sonar/lockfile passed. Design #3022 passed fresh checks but is still changes-requested over stored dimensions, GIF logical-screen and density semantics. Light #4556 moved scoped metadata; broader sniffing remains local. Shared EXR #2033 landed display-canvas staging for contained data windows; app parity and maintainer EXR sign-off are separate. Keep open for remaining raster output and ICC parity.

Activity

  1. diegochagas commented on Nov 18, 2026

    @diegochagas
    Contributor

    Taking JPEG XL reading for image-codecs: a non-default jxl feature that decodes through craft-jxl (#1229), as heif does with craft-heif. It comes with a small hardening change in craft-jxl itself: jxl-oxide inflates Brotli brob metadata boxes outside its allocation tracker, so a 54-byte box returns 64 MiB of XMP today. Two pull requests follow, one per change. photocraft#2868 (the old crates/jxl route) will be closed in favour of this.

  2. FredApps commented on Nov 18, 2026

    @FredApps
    Contributor

    Taking a formatting-only follow-up to merged #2281. Current main3b8e426a fails all native full-validation formatting gates at the two new Encoding literals in crates/exr/src/decode.rs (lines1076 and1114; observed in #2290 job135188368099). I will apply exactly the rustfmt whitespace diff in a separate PR, preserving tokens, behavior and tests. No overlapping formatting follow-up found in current open PRs or #2281 discussion. No workflow changes or weakened gate.

  3. Terra854 commented on Nov 20, 2026

    @Terra854
    Contributor

    Claiming the FigCraft JPEG export chroma-parity slice of #785 and #778. On FigCraft main d4d4b576, #2501's shared JPEG writer still inherits 4:2:0 for RGB where the previous encoder produced 4:4:4. #2518 has merged and covers quality, alpha compositing, and ICC, with no sampling assertion. I checked current tracker comments, main, and matching PRs. I will restore 4:4:4 through the existing codec pin and verify the emitted JPEG sampling in a standalone FigCraft PR.

  4. Terra854 commented on Nov 20, 2026

    @Terra854
    Contributor

    Claiming the TextureCraft grayscale-plus-alpha EXR export coverage slice of #785 and #778. Main fde68a0 skips two-channel EXR in the format matrix and points to a test that currently covers only the single Y channel. I checked current tracker comments, main and matching PRs. I will exercise the normal texture-map export route and inspect the stored Y and A samples at half and full precision after the shared writer cutover in TextureCraft #697.

  5. Terra854 commented on Nov 21, 2026

    @Terra854
    Contributor

    Claiming the ZIP/PXR24 decompression slice of FilmCraft’s local OpenEXR still reader under #778, #781 and #785. FilmCraft main e11edd27 has a private DEFLATE implementation used for ZIP, ZIPS and PXR24 scanline payloads. I’ll expose exact-size inflation in craft-exr using the decoder dependency it already has, verify FilmCraft’s existing header, output-size and checksum compatibility, and prepare the FilmCraft adapter for a canonical shared pin. I checked current main, tracker comments and matching PRs. Compression writers, EXR channel/window policy and the deep-reader checksum policy are separate.

  6. Terra854 commented on Nov 21, 2026

    @Terra854
    Contributor

    Claiming the FilmCraft PXR24 scanline byte-plane reconstruction under #785 and #778. FilmCraft main d6cc257f still reconstructs HALF, FLOAT and UINT samples locally after shared zlib inflation (#2853 and storytold/filmcraft#5132). I checked current main, tracker comments and matching PRs. I will share this bounded EXR byte transform, verify mixed sample depths and truncated blocks, and validate the FilmCraft still-open path against the canonical shared revision. RLE and ZIP byte prediction (#2921), multipart writing (#2614), raw-block detection and the existing FilmCraft checksum policy stay separate.

    Shared implementation is open in #2935. The FilmCraft consumer passed 146 local media tests, including the normal still-open path, mixed sample types, stored-raw fallback and malformed blocks. It is staged for the merged shared revision.

  7. Terra854 commented on Nov 21, 2026

    @Terra854
    Contributor

    Claiming the FigCraft PNG sRGB export tag under #785 and #778. Current FigCraft main 5c2a3784 still inserts the sRGB chunk locally after shared PNG encoding. I checked tracker comments, recent stable main commits and open and closed pull requests. I will use a bounded shared metadata operation for the standard sRGB tag and verify the normal FigCraft export still has the same chunk order, rendering intent, alpha and pixel bytes. Display P3, ICC policy, PNG density and thumbnail routing are separate. The consumer will use a merged shared revision.

    Shared implementation is open in #2941. It passed 1,186 library tests. The FigCraft adapter passed 269 render tests and eight engine export-profile tests, including byte-for-byte PNG export parity. The adapter is staged for the merged shared revision.

  8. Terra854 commented on Nov 21, 2026

    @Terra854
    Contributor

    Claiming TextureCraft mesh-export PNG inspection under #785 and #778. Main 391c98a still uses image to decode PNGs for GLB/USD black emissive and clearcoat decisions, and reads GLB alpha directly from a byte offset. I checked current main, tracker comments and matching PRs. I will route those checks through the pinned craft-image-codecs decoder and PNG probe, preserving paint below fully transparent pixels, the RGB8 threshold for 16-bit input, explicit stored alpha and the existing unreadable-map fallback. Resource import (#733), MCMAT cook budgets, the mesh writers and dependency revisions stay separate.

    Implementation is open in storytold/texturecraft#751. The new alpha regression fails on main and passes with the shared probe. Windows passed 244 release formats tests and three export-command tests. Strict Clippy, formatting, layering and workspace wasm32 checks passed.

  9. Terra854 commented on Nov 21, 2026

    @Terra854
    Contributor

    Claiming the TextureCraft linked-material cook PNG reader under #785 and #778. TextureCraft main 391c98a still routes CookedMap PNGs through ImageReader while direct PNG imports use the pinned shared decoder after #733. I checked tracker comments, recent main and matching PRs. I will reuse the shared PNG reader for the cooked-map path, keeping the reported dimensions, per-decode budget, stored orientation, straight alpha, exact integer-to-float results and the engine aggregate budget. Non-PNG maps, general imports, cook publication and the writer budget from #729 are separate.

    Implementation is open in storytold/texturecraft#752. The reported-side regression fails on main and passes with the shared PNG reader. The Windows formats release suite passed 243 tests, both linked-material engine tests passed, and strict Clippy, workspace formatting, layering and workspace wasm32 passed.

  10. Terra854 commented on Nov 21, 2026

    @Terra854
    Contributor

    I’m taking the EffectCraft PNG sequence writer cutover under #785 and #778. Scope is RGB, RGBA and alpha-only sequence output, preserving the current frame placement and rendered samples.

    EffectCraft’s existing golden fixtures require PNG bytes to stay identical. The shared prerequisite will use the same Fast compression and adaptive filtering as the current encoder. The app will compact RGB and alpha-only samples in its owned frame buffer. The full raster facade adds dependencies with IJG and Zlib terms outside EffectCraft’s allowlist. The PNG-only prerequisite uses the existing MIT or Apache-2.0 PNG package. I’ll validate both repos independently and open the app PR once the shared revision is on main.

    The shared prerequisite is craft-libs #2946. Local EffectCraft validation passed the existing still-export byte goldens and all 171 export tests with six existing ignores. The app branch will use the canonical shared revision after merge.

  11. Terra854 commented on Nov 21, 2026

    @Terra854
    Contributor

    I’m taking the MaterialCraft library preview-cache PNG writer under #785 and #778. On main 4ff5af9a, crates/ui-egui/src/preview_disk_cache.rs still encodes its RGBA8 cache entries through image::codecs::png::PngEncoder. I checked the tracker claims, current main and open MaterialCraft PRs. MaterialCraft #251 changes the Camera menu in view3d.rs. This slice covers the library cache write path only.

    I’ll use the plain shared PNG writer from #2946 and verify that existing cache bytes, encoded-byte budgets, and round-trip reads are preserved. The app PR will pin the shared revision once it is available on main.

    The original writer and the adapter each passed 10 release cache tests with one existing ignored test. The generated preview matched the original PNG bytes, was rejected one byte below its encoded size and admitted at the exact size, and decoded to the original RGBA samples. The full UI release suite passed 381 tests with 60 existing ignores. Strict native Clippy, workspace layering, formatting and the nine wasm package checks passed in local validation. The shared writer landed in #2946. The app change is now open as MaterialCraft #309 using the canonical revision.

  12. dylanmtaylor commented on Nov 21, 2026

    @dylanmtaylor
    MemberAuthor

    Completed and verified on exact main:

    • storytold/craft-libs#2865 (c60e7a20), #2879 (e1d62d7e), #2853 (8b40f1a4), #2848 (bb30de6b), #2843 (ba25ccd2).
    • storytold/designcraft#3101 (0fc7a789), #3105 (d7401b64), #3016 (a6d82e9a), #3125 (1d166a87), and #3127 (00bf1e69, asymmetric Orientation 6 reduced TIFF pixel placement assertion; exact-main gate (ubuntu-24.04), Build instrumented test archive, and Tests 1/4–4/4 all passed).
    • storytold/lightcraft#4618 (8a04ebe5), #4617 (81db84ab, gate (ubuntu-24.04), gate-windows, nix / eval passed), #4601 (35527de6).
    • storytold/photocraft#16149 (8aee0476, gate (ubuntu-24.04), windows, web build and wasm size gate, SonarCloud Scan passed).
    • storytold/filmcraft#5132 (3d746514, gate (ubuntu-24.04), gate-windows, SonarCloud, nix / eval passed).
    • storytold/figcraft#2547 (5c2a3784, gate (ubuntu-24.04), SonarCloud, nix / eval, Lockfile passed).
    • storytold/vectorcraft#9028 (869105e1) and #9033 (f72c5671, gate / test 1/5–5/5, affinity3 / gate, nix / eval passed).
    • storytold/texturecraft#729 (eb126f6f) and #733 (391c98af, gate (ubuntu-24.04), gate (windows-latest), SonarCloud Scan, Tests 1–4/4 passed).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions