Imaging: implement ManagedImage and codec abstraction #38
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Objective
Implement the owned image representation, channel/layout operations, validation, and object-safe codec boundary.
Deliverables
Validation
Prerequisite
Types and StructuredData are implemented and the global API/test gates are complete.
Project constraints
Implemented and verified in commit
2c806d8. Replaced all Imaging.Abstractions shims with native Rust: an object-safe ITextureCodec boundary, flag-compatible channel type, and owned ManagedImage with checked dimensions and allocation limits, documented planar layout and stride, exact C# channel conversion, clear/deep-copy ownership, nearest and bilinear resizing, bottom-left RGBA export, and stride-aware canonical interleave/deinterleave helpers. Public buffer corruption and oversized dimensions return typed errors without partial mutation. The generated audit now reports 3/3 native types and 20/20 native members with no Imaging.Abstractions shim. Verification: 7/7 native imaging tests pass; all 3/3 pre-created ManagedImage C# parity tests pass; controlled suite is exactly 193 passed and 1200 expected standardized failures; mapping, API generation/coverage, parity/surface, fmt, workspace check, locked API fixture, no-run, clippy -D warnings, and docs all pass. A post-implementation review checked the code against every issue deliverable and the pinned C# source.