Keeps both test modules in crates/format/tests/it/main.rs: main's camera_raw_roundtrip and this PR's channel_mixer_cmyk.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* raw,camera_raw: bump craft-develop to 7631ed550 and add explicit parity tests (#587)
* raw,camera_raw: cut over develop_sensor demosaic and camera_raw::develop to craft_develop (#587)
* raw,camera_raw: fix craft_develop field names and test imports (#587)
* camera_raw: fix clippy excessive_precision and unnecessary cast lints
* raw,camera_raw: use exact gaussian_taps for sharpening, silence camera_raw_gpu dead_code, update post-cutover pins
* raw,camera_raw: fix highlights sign, <0.3px sharpen noop, non-Bayer/fused parity, and gpu test ignores
* engine: update camera_raw_filter_legacy_baseline_pixels to post-cutover craft_develop baseline
* raw,camera_raw: early-exit noop sharpen, exact full desat, PAD=6 fused margin
* raw,camera_raw: guard <0.3px texture/clarity blur and route fused band demosaic through craft_develop
* io: update default RAW Open baseline pins for craft_develop::sensor::demosaic reflect borders
* io: add Windows libm FNV-1a hash pins for RAW Open baselines
* test(raw): pin pre-cutover Camera Raw SmartFilter and filter baseline (#587)
* test(format): avoid json! macro recursion limit in camera_raw_roundtrip (#587)
* test(format): wrap SmartSource::Embedded bytes in Arc (#587)
* test(engine): use select.deselect in camera_raw_baseline_pin (#587)
* test(raw): capture legacy RAW Open and Camera Raw Filter pixel baselines (#587)
* test(raw): lock Camera Raw Filter baseline pixels and capture RAW Open values (#587)
* test(io): lock legacy RAW Open baseline pixels (#587)
* test(io): capture RAW Open camera WB legacy baseline pixels (#587)
* test(io): lock RAW Open camera WB legacy baseline pixels (#587)
* Open luminance and data-channel EXRs as RGB 32-bit
A Y-only, Z-only or Y + A EXR opened as a Grayscale document tagged linear gray through File > Open (the band decoder) and File > Open EXR Parts. Every EXR now opens as RGB 32-bit tagged linear sRGB, as in the reference application: the gray band is expanded to R = G = B with its alpha kept, and exr_parts converts every part or group to RGBA. RGB files are unchanged. The whole-file decoder in flat.rs (the bytes import and File > Open's fallback for a Z-only file) still opens gray as Grayscale and is left for a follow-up; an ignored test records it. Fixes#14069.
* Cover a Z-only EXR through File > Open
The band decoder reads a Z-only scanline EXR, so File > Open of one is covered by the passing test; only the bytes import through flat.rs stays an open point for #14069.
---------
Co-authored-by: qvest-ssels <[email protected]>
custom_domain_lookup_warns_and_round_trips_verbatim crossed 3 LUT domain
spellings with 6 PSD/PSB x depth containers (18 open/save chains). The
spelling only decides read_lookup's default-domain check; after that the
block is raw bytes whose stored lengths are all multiples of four, so no
spelling reaches a different container path. Each of the 6 containers now
takes the spellings in turn: every container and every spelling still runs
the whole open, native round trip and PSD/PSB re-save chain, with the same
assertions. adjust_map's unit tests still parse every spelling.
Resolve the conflict in crates/engine/src/adjust_params.rs: keep this
branch's generic mixer_row (RGB rows of 4, ink rows of 5) and main's
rounding to whole percentages before clamping (#14414).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The real-file corpus tests the Linux gate runs took up to 394 s each (the psd-tools mutation
sweep), 780 test-s together. Each now walks a fixed sample chosen for coverage (photocraft-testkit
`corpus`: every colour mode and depth, PSD and PSB, the block kinds outside the large files, each
oracle kind, smart objects, vector blocks, type) and stays under a second. PHOTOCRAFT_FULL_SWEEP=1,
the switch the testkit sweeps already read, takes every file; the nightly run sets it.
- Oracles keep floors for the sample next to the full floors.
- The mutation sweep cuts and corrupts each sampled file 12 times instead of 31.
- The layered TIFF test takes the psd-tools sample.
- The smart-object test imports only files with a placed-layer block (full sweep: 32 s to 5 s).
- The blend-mode tests import once and render only the compared cells.
- The 16.8 MP spot-channel file runs in full sweeps only; the generated files check the same reading.
- The #1606 special-shapes test is the affinity table's row for that file plus its warning check.
Part of #15711
main moved the command table out of crates/engine/src/cmd.rs into crates/engine/src/cmd/table/. cmd.rs takes main's version; this PR's Channel Mixer params doc (cyan/magenta/yellow/black ink outputs, monochrome unsupported for CMYK outputs) now lives on the channelMixer entry in cmd/table/image/adjustments.rs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The palette PNG path wrote an Indexed Color document without
interlacing and said nothing; the band-wise PNG path warns when it turns
interlacing off. The palette path now adds the same kind of warning.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Document.layers is a LayerTree that builds an id index on first lookup and drops it on any mutable access. Layer lookups and selected_layers use the index instead of walking the document.
Each crate's top-level tests/*.rs files become modules of tests/it/main.rs, and a new xtask check (test-binaries) refuses a new single-file test binary.
main (#15449) moved the adjustment editors onto the craft UI framework and deleted basic.rs, which held this PR's CMYK Channel Mixer editor. The framework ChannelMixer has red, green and blue rows only, so a CMYK mixer is now kept out of it: values::from_params refuses a mixer with ink keys (CMYK_MIXER_UNAVAILABLE), the Properties panel shows that message and edits nothing, and Image > Adjustments > Channel Mixer refuses to open in a CMYK document with the same reason. A CMYK editor in craft-libs is the follow-up.
ui_tests.rs keeps main's tests; the test of the deleted egui editor is replaced by cmyk_channel_mixer_is_kept_out_of_the_rgb_editor, and the every-kind Properties test expects the refusal for a CMYK mixer. The Tokens::mixer_rgb/mixer_ink fields added for the deleted editor are dropped (no user left).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
PhotoCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (next branch): shell, dock and panels, hosted dialogs, keyboard, focus, IME and pointer routing, the canvas's view commands, themes and tokens. The engine, document model, file formats, commands and automation stay. PhotoCraft pins storytold/craft-libs next.
PSD export no longer writes a monochrome CMYK Channel Mixer it would have to infer (an edited imported one, or an RGB monochrome mixer reshaped for a CMYK document); it warns that the layer's mixer was not written. Unedited imported blocks are still saved back verbatim.
The Channel Mixer source track colours come from new Tokens fields (mixer_rgb, mixer_ink) set in every theme, and the source and Constant sliders are disabled while an imported monochrome CMYK mixer has Monochrome on, the state the engine refuses to edit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
parse_tysh/write_tysh/translate_tysh/transform_is_safe become adapters over
craft_psd::text::envelope (extracted from here in craft-libs#1594); only the
Affine <-> [f64; 6] mapping stays. write_tysh/build_tysh return Option: a block
the shared writer refuses (unsafe transform, non-finite bounds, > 8 MiB) is not
written, and export falls back to pixels with its existing warning. craft-psd
re-pinned to craft-libs main eafb50af (additions only in crates/psd).
When every entry of the palette has its own colour, the pixel colours
already name the entries, and Color Table's nearest entry finds them.
The second pass over the file then adds nothing, and it is a pass that
neither the stepped import (the web build) splits up nor a cancel stops,
so it is skipped.
The io test helpers map the indices' layer along with the layers
instead of copying the expected one, so indices that name no layer
still make the documents differ.
Indexed Color documents store RGB pixels, so Color Table found each
pixel's index again as the nearest entry, and entries of one colour
lost their own pixels (#14342). The document now keeps each pixel's
index (Document::color_indices) where it is known: recorded when a
palette PNG is opened, by Image > Mode > Indexed Color and by Color
Table itself. Color Table uses it while the layer still has exactly the
recorded tiles; after any other change it maps by nearest colour as
before. A known index past a shrunk table stays black until the table
grows back over it.
The native format saves the indices only while they hold for the layer
as saved, and pairs them with the loaded layer on open.