View Source Moul (Moul v0.1.0)

Documentation for Moul.

Link to this section Summary

Functions

Crop square image at max 512px with few additional sizes

Resize image at max 4096px at the long end with few additional sizes

Link to this section Functions

Link to this function

avatarize(in_file, out_path \\ "")

View Source

Crop square image at max 512px with few additional sizes

xl:512 lg:256 md:128 xs:32

xs:32 is decoded hash

examples

Examples

iex> Moul.avatarize("path/to/file.jpeg", "out/path")
{:ok, %{width: 0, height: 0, hash: ""}}
Link to this function

get_ideal_dimention(current_dimention, ideal_dimention)

View Source
Link to this function

moulify(in_file, out_path \\ "")

View Source

Resize image at max 4096px at the long end with few additional sizes

xl:4096 lg:2048 md:1024 xs:32

xs:32 is decoded hash

examples

Examples

iex> Moul.moulify("path/to/file.jpeg", "out/path")
{:ok, %{width: 0, height: 0, hash: ""}}