Repository navigation
Accept reference encoder alpha end offsets - #28
Merged
Merged
Conversation
Some Microsoft reference-encoder files put the absolute alpha end offset in ALPHA_BYTE_COUNT instead of the stream length. The parser rejected these separate-alpha images because adding the offset to that value extended beyond the input. Recognize this convention only when the stored value equals the file length and the alpha offset lies strictly inside the file. Normalize it to a length before the existing range and overlap checks; ordinary byte counts retain their existing interpretation. Co-authored-by: GPT-6 Astra · Extra High <codex@openai.com>
Member
|
Thanks for digging into this. The reference encoder does write the end offset here, so this makes sense. I ran the regression tests, including the decode comparison, and everything passed. CI is green too. Looks good to merge. |
jcwal1516
added a commit
that referenced
this pull request
Nov 15, 2026
Publish the separate-alpha SCALED_FLAG fix (#30) with the reference encoder alpha end offsets (#28) and the additional WIC pixel formats (#27). jxr-native and jxr-metal change; jxr, jxr-image and jxr-mpsgraph follow their exact pins to 0.5.1 and 0.6.1. jxr-core, jxr-cuda and jxr-math are unchanged and keep their published versions. Both lockfiles follow. cargo semver-checks reports no semver update required for any of the five packages. docs/releasing.md gives the publish order.
4 of 5 tasks
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.
Some Microsoft reference-encoder files put the absolute alpha end offset in ALPHA_BYTE_COUNT instead of the stream length. The parser rejected these separate-alpha images because adding the offset to that value extended beyond the input.
Recognize this convention only when the stored value equals the file length and the alpha offset lies strictly inside the file. Normalize it to a length before the existing range and overlap checks; ordinary byte counts retain their existing interpretation.
My agent found this and one other issue while processing a corpus of Kindle test books. I take responsibility for the code written, but am not a domain expert.