View Source Moul (Moul v0.2.0)

Documentation for Moul.

Link to this section Summary

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

decode_blurhash(hash, width, height)

View Source
Link to this function

get_ideal_dimension(current_dimension, ideal_dimension)

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: ""}}