Repository navigation
Correct byte order when resampling I;16B and I;16N images - #10286
Merged
Merged
Conversation
radarhere
force-pushed
the
fix/i16b-resample
branch
from
October 23, 2026 00:17
f8f7fe9 to
1700e28
Compare
radarhere
enabled auto-merge (squash)
October 23, 2026 00:19
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.
Changes proposed in this pull request:
resize()read and wrote I;16B and I;16N pixels in the wrong byte order when using a filter other thanNEAREST. Since Support all resampling filters when resizing I;16* images #8422,_ImagingResampleHorizontal_16bpc()and_ImagingResampleVertical_16bpc()have treated I;16N as big-endian and I;16B as little-endian. They now use the same check asBoxBlur.c,Filter.candDraw.c.On main, this prints
[1714, 3286]for I;16 and[57814, 12721]for I;16B. Big-endian 16-bit grayscale TIFF files open as I;16B, so resizing them with the default filter is affected.