Repository navigation
Use reducing_gap when resizing RGBA and LA images - #10208
Merged
radarhere merged 4 commits intoOct 15, 2026
Merged
Conversation
radarhere
reviewed
Oct 15, 2026
radarhere
force-pushed
the
fix/alpha-resize-reducing-gap
branch
from
October 15, 2026 03:18
beb940a to
be67ee0
Compare
radarhere
force-pushed
the
fix/alpha-resize-reducing-gap
branch
from
October 15, 2026 03:24
be67ee0 to
f7340f4
Compare
radarhere
enabled auto-merge (squash)
October 15, 2026 03:28
radarhere
disabled auto-merge
October 15, 2026 03:28
radarhere
enabled auto-merge (squash)
October 15, 2026 03:28
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.
RGBA and LA resizes drop
reducing_gapwhen callingresize()on the premultiplied image. This also disables integer reduction in transparent PNG thumbnails, whose default gap is 2.0.Changes proposed in this pull request:
Before, the alpha values are
[76, 60, 69, 44]. With the requested integer reduction they are all 64: each 4x4 block contains four opaque white pixels and twelve transparent pixels. Visible RGB remains white.A local export audit of six existing 512x512 transparent game icons and two bundled PNGs corrects 312 gap-aware results, including 24 independently calculated block means. The 144 default/nearest/ordinary controls and 96 already-correct results retain exact hashes. At gap 2, summed nine-sample medians for the six native-size RGBA icon resizes to 32x32 improve from 18.91ms to 4.95ms; thumbnails from 19.81ms to 5.84ms. These are local asset-export measurements, not a production incident or general performance guarantee.
All four regressions fail before and pass after. Source selftest, affected suites, the full Python 3.12 suite (5,240 passed, 471 skipped, three existing xfails), configured mypy, lint/format/docs/packaging hooks and manual Pyroma pass. The baseline has 5,236 passes with the same skips/xfails. No native kernel or dependency changes.