elixir-image / image

Image processing for Elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Thumbnail: fill with blank/transparent

AntoineAugusti opened this issue Β· comments

Hi,

Thanks for this lib πŸ™

I have the following code:

Mix.install(
  [{:image, "~> 0.37"}]
)

{:ok, thumb} = Image.thumbnail("/tmp/divia.jpg", 100, fit: :contain)
Image.write(thumb, "/tmp/divia-small.png")

Relevant documentation

Question

How to get a 100x100 image, filled with white/transparent?

Source image

divia

Generated image

Size: 100x38

divia-small