Skip to content

Thumbnail: fill with blank/transparent#126

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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