OgEx.Image.Resource (og_ex v0.2.0)

Copy Markdown View Source

Verified image bytes returned by an OgEx.ResourceLoader.

A resource contains encoded bytes, detected format and content type, intrinsic dimensions, and a SHA-256 content fingerprint. Remote loaders may also retain ETag and Last-Modified values for conditional revalidation.

Applications normally receive this struct only when implementing a resource loader or inspecting loader results.

Summary

Types

t()

@type t() :: %OgEx.Image.Resource{
  bytes: binary(),
  content_type: String.t(),
  etag: String.t() | nil,
  fingerprint: String.t(),
  format: atom(),
  height: pos_integer(),
  last_modified: String.t() | nil,
  source: OgEx.Image.Source.t(),
  width: pos_integer()
}