mirror of
https://github.com/rehan-remade/universal-modder.git
synced 2026-11-05 01:37:40 +00:00
[PR #41] [MERGED] fix(sprite): preserve partial transparency when placing frames #79
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rehan-remade/universal-modder#79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rehan-remade/universal-modder/pull/41
Author: @Overdusts
Created: 10/4/2026
Status: ✅ Merged
Merged: 10/5/2026
Merged by: @rehan-remade
Base:
main← Head:audit/fix-sprite-transparency📝 Commits (1)
4eea536fix(sprite): preserve partial transparency when placing frames📊 Changes
2 files changed (+17 additions, -3 deletions)
View changed files
📝
tests/test_um.py(+14 -0)📝
um/sprite.py(+3 -3)📄 Description
fix(sprite): preserve partial transparency when placing frames
fit, sheet packing, and squash animation frames currently use the source RGBA image as its own paste mask on a transparent canvas. This applies alpha twice and darkens RGB values: an unchanged-size(200, 100, 50, 128)pixel becomes(100, 50, 25, 64).Paste the RGBA pixels directly in these three operations to preserve their original channels. Add 18 regression cases covering fit, sheet/slice round trips, and the first squash frame at six alpha levels, including fully opaque pixels.
Validation on Windows:
python -m pytest -q testsreports 45 passed, 1 skipped (ffmpeg unavailable).python -m um kb check --index: 20 notes passed.python -m um publish check .: 246 files, no failures or warnings.git diff --checkpass.Broader verification with FFmpeg 7.1 exposes an existing
test_compile_small_edlfailure:xfaderejects frame-rate metadata1/0aftersetpts. Both unchanged upstream (27 passed, 1 failed) and this PR (45 passed, 1 failed) produce the same error in both isolated environments. This PR does not change video code. The failure was skipped in the original local run above.No game or fal API calls are needed to reproduce the sprite defect. Game execution and Blender rendering were not tested.
Authored by @Overdusts with Codex (GPT-6).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.