Implements JPEG2000 (JPX) passthrough filter per Phase 1.5: - JP2 box magic validation (12-byte signature check) - STREAM_INVALID_JPX diagnostic for raw J2K/corrupt data - OCR_JPX_UNSUPPORTED diagnostic when full-render+libopenjp2 unavailable - Runtime libopenjp2 detection (pkg-config + ldconfig fallback) - Passthrough behavior (raw bytes unchanged) Module: crates/pdftract-core/src/decoder/jpx.rs Stream integration: JpxStreamDecoder in parser/stream.rs Acceptance criteria: - JP2-wrapped JPX with full-render → passthrough, no diagnostic - JP2-wrapped JPX without full-render → OCR_JPX_UNSUPPORTED - Raw J2K codestream → STREAM_INVALID_JPX + passthrough - Round-trip test coverage (unit tests validate JP2 signature) Per plan EC-12: emits diagnostic when neither full-render nor libopenjp2 is available, alerting Phase 5.2 OCR pipeline. Co-Authored-By: Claude Code <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| pdftract-cer-diff | ||
| pdftract-cli | ||
| pdftract-core | ||
| pdftract-libpdftract | ||
| pdftract-py | ||