Skip to content

Commit 48e5bbc

Browse files
Copilotioma8
andcommitted
Port TypeScript additional info handlers, image resources, and descriptor modules to Rust
- descriptor.rs: Complete descriptor parsing/writing implementation - All OSType value types (doub, long, bool, enum, obj, VlLs, etc.) - Reference structure handling - Unit value support (Pixels, Angle, Percent, etc.) - Version and descriptor reading/writing - Comprehensive roundtrip tests - image_resources.rs: Image resource handlers - Resolution info (1005) - XMP metadata (1060), caption digest (1061) - Print information and flags (1011, 1082) - Background color (1010), copyright (1034), URL (1035) - Grid and guides (1032) - Global angle (1037), altitude (1049) - Layer state (1024), groups (1026), selection IDs (1069) - Alpha names (1006, 1045), identifiers (1053) - ICC profile (1039), print scale (1062) - Generic resource read/write framework - Roundtrip tests for major resources - additional_info.rs: Layer additional info handlers - Unicode layer name (luni), layer ID (lyid) - Layer color (lclr), section divider (lsct/lsdk) - Blend flags (clbl, infx, knko) - Protected flags (lspf), name source (lnsr) - Text layer data (TySh) with transform and descriptors - Vector fill (SoCo, GdFl, PtFl) - Vector stroke (vscg, vstk) - Vector mask (vmsk/vsms) with bezier paths - Layer effects (lrFX, lfx2) - Placed layer/smart objects (PlLd, SoLd) - Artboard data (artb, artd) - Metadata (shmd, cust) - Unknown section preservation - Roundtrip tests for core handlers - reader.rs/writer.rs extensions: - read_color/write_color for Color types - read_fixed_point_32/write_fixed_point_32 - read_fixed_point_path_32/write_fixed_point_path_32 - Helper methods for descriptor and resource parsing All tests passing (20/20) Co-authored-by: ioma8 <6624752+ioma8@users.noreply.github.com>
1 parent f7501e2 commit 48e5bbc

6 files changed

Lines changed: 2457 additions & 1 deletion

File tree

0 commit comments

Comments
 (0)