Astral.Image.Metadata (Astral v0.1.4)

Copy Markdown View Source

Source image metadata used by Astral image transforms.

Summary

Functions

Read image dimensions, format, and content hash from a source file.

Types

t()

@type t() :: %Astral.Image.Metadata{
  content_hash: String.t(),
  format: atom(),
  height: pos_integer(),
  path: String.t(),
  width: pos_integer()
}

Functions

read(path)

@spec read(String.t()) :: {:ok, t()} | {:error, term()}

Read image dimensions, format, and content hash from a source file.