Skip to content

Affine: keep libvips' native background instead of forcing :black to get alpha-aware fill#205

Merged
kipcole9 merged 2 commits into
elixir-image:mainfrom
hlindset:fix/affine-background-native-fill
Jun 30, 2026
Merged

Affine: keep libvips' native background instead of forcing :black to get alpha-aware fill#205
kipcole9 merged 2 commits into
elixir-image:mainfrom
hlindset:fix/affine-background-native-fill

Conversation

@hlindset

Copy link
Copy Markdown
Contributor
  • Image.affine/3, Image.translate/4 and Image.shear/4 no longer inject a default :background of :black. When :background is omitted, libvips keeps its own native fill, which is transparent on images with an alpha band, opaque black otherwise.
  • Updated the :background option text to document the native default ("transparent for images with an alpha band, black otherwise") in place of "The default is :black."
  • Added a ## Partially-transparent backgrounds section like in Expose :interpolate and route :background through Image.Pixel.to_pixel/2 in Image.rotate/3 #204.

I think this is more expected/ergonomic? An oversight on my part in #202.

@kipcole9 kipcole9 merged commit 0239834 into elixir-image:main Jun 30, 2026
6 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