Image manipulation library for Elixir.
This library provides a Rust implemented NIF which currently supports resizing and compositing images.
Because this library is partially implemented in Rust, you will need to have the Rust toolchain installed on your system.
curl https://sh.rustup.rs -sSf | sh
If available in Hex, the package can be installed
by adding mirage
to your list of dependencies in mix.exs
:
def deps do
[
{:mirage, "~> 0.1.0"}
]
end
{_, image} = Mirage.Image.read!("input.jpg")
image
|> Mirage.resize_to_fill(100, 100)
|> Mirage.Image.write!("output.png")
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/mirage.