Fastimage v0.0.2 Fastimage

Summary

Functions

Returns the dimensions of the image as a map in the form %{width: _w, height: _h}. Supports “bmp”, “gif”, “jpeg” or “png” image files only. Returns :unknown_type if the image file type is not supported

Returns the type of file. Only “bmp”, “gif”, “jpeg” or “png” files are currently detected

Types

recv_error ::
  :timeout |
  :no_file_found |
  :no_file_or_url_found |
  any
stream_ref :: {pid, reference, atom} | File.Stream

Functions

size(url_or_file)

Specs

size(url_or_file :: String.t) :: map | :unknown_type

Returns the dimensions of the image as a map in the form %{width: _w, height: _h}. Supports “bmp”, “gif”, “jpeg” or “png” image files only. Returns :unknown_type if the image file type is not supported.

type(url_or_file)

Specs

type(url_or_file :: String.t) ::
  String.t |
  :unknown_type

Returns the type of file. Only “bmp”, “gif”, “jpeg” or “png” files are currently detected.