With write_tysh refusing unsafe geometry, a layer without psd_raw can end up
with no generated TySh; the imported block (text from before the edit) was then
kept. Export now drops it so the layer is written as pixels with the existing
warning. TySh selection moves into type_tysh/type_blocks (cognitive complexity).
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).
The per-sample normalization in fill_samples called a helper that tested
range.is_finite() and range <= 0.0 for every sample, which made 24 MP
monochrome U16 develops ~30% slower than main. A single range > 0.0
test gives the same results (NaN, zero, negative and infinite ranges all
end at 0) and restores main's speed; output hashes are unchanged.
gpu/fx: the review asks for the Done-when line "CPU and GPU compositors
agree". `B::shadow` built the Inner Shadow map from the shape shifted by
whole pixels only, so the Anti-aliased checkbox stayed invisible on the
GPU: the parity check of the issue's document measured 20.65/255
between the two compositors once the CPU honoured the flag.
The map builder now calls the same gate the CPU does (`effects::aa_shift`,
inner branch and the Gaussian contour only), and `fs_mshift` samples the
way `Map::shifted` does: four taps, bilinear, with the invert and the
`outside` fill applied per tap. A whole-pixel offset weights its taps 1
and 0, so every shift that exists today (drop shadows with Distance,
satin, the Choke/Spread field shift) reads exactly the texel it read
before. The stage radius ceils, so a sub-pixel shift's extra tap stays
inside the window the executor recomputes - what makes the paged
compositor agree.
Two tests: the stage list, which needs no device, and the issue's
document rendered on both compositors (plain and paged 256 px),
comparing the four edge ramps against the CPU and against the issue's
measured values.
Reuse the byte-identical resource 1053 implementation already pinned in craft-psd. Retain existing app ordering policy, callers and byte regression tests; no dependency changes.
Co-authored-by: Jason D <[email protected]>
Keep lossy UTF-16, trailing NUL and partial-list policy unchanged. Shared parser preserves Brandon Thomas original framing and Valentin Klein checked-length safeguards.
Co-authored-by: Brandon Thomas <[email protected]>
Co-authored-by: Valentin Klein <[email protected]>
Retain PhotoCraft colour conversion and compatibility policy while delegating DisplayInfo and alternate spot wire framing to craft-psd.
Co-authored-by: Jason D <[email protected]>
Co-authored-by: Khawar Zamman Wani <[email protected]>