Added the opt-in jpeg2000 feature with a safe Rust codec API and a private, bounded OpenJPEG 2.5.4+ ABI adapter; default crates do not discover or link OpenJPEG.
Implemented raw J2K and JP2 decode/encode, reversible lossless and irreversible lossy modes, discard/quality layers, precision/signedness/component/alpha preservation, C#-compatible channel order and alpha substitutions, and typed failure behavior.
Added Rust-side JP2 box/SIZ validation and checked byte, pixel, component, sample, and output limits before decoded sample-plane allocation.
Replaced the mapped ManagedImageCreator and interleaved shims with native Rust behavior matching the pinned C# reference, including 1-5 component mapping and CoreJ2K DC offsets.
Documented OpenJPEG licensing/deployment and added explicit Linux, macOS, and Windows feature CI.
Verification:
cargo test -p libremetaverse-imaging --features jpeg2000: 15 passed, including an exact 16-bit OpenJPEG 2.5.4 golden, J2K/JP2 lossless round trips, lossy encode/decode, alpha, discard, bounds, and malformed inputs.
cargo test -p libremetaverse --features jpeg2000 j2k: 3 passed for the pinned C# creator/interleaved/block-source behavior.
Required formatting, mapping, API coverage, compile, clippy, and documentation gates passed; the private FFI crate was also linted and documented independently.
Implemented and pushed in commit 16501f2.
Implementation:
- Added the opt-in `jpeg2000` feature with a safe Rust codec API and a private, bounded OpenJPEG 2.5.4+ ABI adapter; default crates do not discover or link OpenJPEG.
- Implemented raw J2K and JP2 decode/encode, reversible lossless and irreversible lossy modes, discard/quality layers, precision/signedness/component/alpha preservation, C#-compatible channel order and alpha substitutions, and typed failure behavior.
- Added Rust-side JP2 box/SIZ validation and checked byte, pixel, component, sample, and output limits before decoded sample-plane allocation.
- Replaced the mapped ManagedImageCreator and interleaved shims with native Rust behavior matching the pinned C# reference, including 1-5 component mapping and CoreJ2K DC offsets.
- Documented OpenJPEG licensing/deployment and added explicit Linux, macOS, and Windows feature CI.
Verification:
- `cargo test -p libremetaverse-imaging --features jpeg2000`: 15 passed, including an exact 16-bit OpenJPEG 2.5.4 golden, J2K/JP2 lossless round trips, lossy encode/decode, alpha, discard, bounds, and malformed inputs.
- `cargo test -p libremetaverse --features jpeg2000 j2k`: 3 passed for the pinned C# creator/interleaved/block-source behavior.
- Required formatting, mapping, API coverage, compile, clippy, and documentation gates passed; the private FFI crate was also linted and documented independently.
- Controlled suite audit passed: 204 passed, 1200 expected standardized failures, 0 ignored, 0 nonstandard failures.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Objective
Implement J2K/JP2 encode/decode behavior through the imaging codec boundary.
Deliverables
Validation
Prerequisite
Types and StructuredData are implemented and the global API/test gates are complete.
Project constraints
Implemented and pushed in commit
16501f2.Implementation:
jpeg2000feature with a safe Rust codec API and a private, bounded OpenJPEG 2.5.4+ ABI adapter; default crates do not discover or link OpenJPEG.Verification:
cargo test -p libremetaverse-imaging --features jpeg2000: 15 passed, including an exact 16-bit OpenJPEG 2.5.4 golden, J2K/JP2 lossless round trips, lossy encode/decode, alpha, discard, bounds, and malformed inputs.cargo test -p libremetaverse --features jpeg2000 j2k: 3 passed for the pinned C# creator/interleaved/block-source behavior.