Skip to content

Thumbnail: fill with blank/transparent #126

@AntoineAugusti

Description

@AntoineAugusti

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions