mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-16 23:24:22 +00:00
A descriptor class or key id is a u32 length and bytes, where length 0 means a 4-byte code follows. Photoshop stores `warp`, `list` and `time` as length-4 strings and treats the code form as a different key, so the warps of new smart objects and type layers and regenerated layer comp lists were not recognised. In the corpus, `warp` appears 741 times as a string and never as a code, `list` 5/0, `time` 7/0. `Id::new` now makes these three names string ids, as keys and class ids. Reading is byte-based and accepts both forms; a code read from a file is written back as a code. Tests: exact bytes for each name as class and key, both forms read, fresh placed-layer warp (SoLd/PlLd) and layer comp list bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>