Repository navigation
Test JP2/JXR detection, native pixels and display previews - #207
Merged
Merged
Conversation
Owner
Author
|
The non-Windows JXR build failure was caused by the missing The accompanying For clarity, this fixes the non-Windows build configuration. The supplied images also pass the separate native MSVC static/DLL decode and preview checks; their runtime handling still needs content-based format selection and explicit conversion of HDR/16-bit pixels for ordinary bitmap display. |
danoli3
marked this pull request as ready for review
October 25, 2026 12:16
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The #198 samples can decode successfully and then fail when a caller selects a decoder from the extension or passes native RGB16/RGBAF pixels to an 8-bit bitmap/display API. Add a reproducible diagnostic and regression coverage for these paths.
CodecDiagnosticsdetects input content before falling back to the extension, reports native type/dimensions, optionally verifies matching file/memory pixel hashes, and exports an explicitly requested 24-bit preview. RGB16 uses direct conversion; floating-point RGB/RGBA uses Drago tone mapping. Preview conversion/save failures are reported separately from decode failures, and the native image stays unchanged. The preview policy changes HDR appearance and discards alpha; the decoder's native output remains available.Synthetic regression tests cover HDR/RGB16 preview conversion, preserved native pixels/alpha, typed codec round trips, and raw J2K mislabeled as
.jp2. Fix the bundled JXR CMake ANSI definition and two missing C declarations/includes so the diagnostic can also build on Linux and macOS.The new
JP2/JXR sample checksaction tests portable builds and runs the six supplied files on MSVC static and DLL builds. It downloads the public archive linked in #198, verifies its SHA-256, and keeps photographs/previews out of the repository. Runner CPU counts setCMAKE_BUILD_PARALLEL_LEVELautomatically. The workflow can also be dispatched manually.Validation:
sample-photo.jp2as J2K.Refs #198. These diagnostics provide a tested loading/display path; the reporting application's actual code is still needed to identify its failure.