Skip to content

Premultiply affine transformations explicitly only for non-opaque backgrounds - #217

Merged
kipcole9 merged 1 commit into
elixir-image:mainfrom
hlindset:feat/affine-conditional-premultiply
Jul 28, 2026
Merged

Premultiply affine transformations explicitly only for non-opaque backgrounds#217
kipcole9 merged 1 commit into
elixir-image:mainfrom
hlindset:feat/affine-conditional-premultiply

Conversation

@hlindset

Copy link
Copy Markdown
Collaborator

Mirror the conditional premultiplication from the mapim implementation in affine/rotate. The manual premultiply/unpremultiply dance is only needed when a non-opaque background is given, since libvips handles premultiplication correctly in the other cases. This improvement is inherited by shear and translate since they route through affine.

@kipcole9
kipcole9 merged commit 5bdcb45 into elixir-image:main Jul 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants