View Source Thumbelina (Thumbelina v0.0.2)

Image manipulation api.

Link to this section Summary

Functions

If dealing with a large amount of files on disk and you wouldn't like to use File.open/1 due to the number of open file descriptors and would like control over how many bytes are read into memory at a time. Defaults to 2 ** 16 bytes or ~65kb.

Link to this section Types

@type result() :: {:ok, Thumbelina.Image.t()} | {:error, String.t()}

Link to this section Functions

@spec blur(Thumbelina.Image.t(), float()) :: result()
Link to this function

brighten(image, brightness)

View Source
@spec brighten(Thumbelina.Image.t(), pos_integer()) :: result()
Link to this function

crop(image, width, height)

View Source
@spec flip(Thumbelina.Image.t(), :vertical | :horizontal) :: result()
@spec greyscale(Thumbelina.Image.t()) :: result()
@spec open(String.t()) :: result()
@spec open_all!(String.t()) :: [Enumerable.t()]
Link to this function

resize(image, width, height)

View Source
@spec resize(Thumbelina.Image.t(), pos_integer(), pos_integer()) :: result()
@spec rotate(Thumbelina.Image.t(), pos_integer()) :: result()
Link to this function

stream_directory!(path, bytes \\ 65536)

View Source
@spec stream_directory!(String.t(), pos_integer()) :: [Enumerable.t()]

If dealing with a large amount of files on disk and you wouldn't like to use File.open/1 due to the number of open file descriptors and would like control over how many bytes are read into memory at a time. Defaults to 2 ** 16 bytes or ~65kb.

Link to this function

thumbnail(image, new_width, new_height)

View Source
@spec thumbnail(Thumbelina.Image.t(), pos_integer(), pos_integer()) :: result()