FormatParser.Image (format_parser v2.6.0)
An Image struct and functions.
The Image struct contains the fields format, width_px, height_px, intrinsics and nature.
Summary
Functions
Parses an image file or result.
Types
Functions
Parses an image file or result.
- If given a tuple
{:error, file}wherefileis a binary, attempts to parse the image from the file. - If given a binary
file, attempts to parse the image from the file. - For any other input, returns the input as-is.
Examples
iex> parse("image.png") # Parsed image result
iex> parse({:error, "image.png"}) # Parsed image result
iex> parse(:some_other_result) :some_other_result