View Source Kino.Image (Kino v0.7.0)
A kino for rendering a binary image.
This is just a meta-struct that implements the Kino.Render
protocol, so that it gets rendered as the underlying image.
examples
Examples
content = File.read!("/path/to/image.jpeg")
Kino.Image.new(content, "image/jpeg")
Link to this section Summary
Functions
Creates a new kino displaying the given binary image.
Link to this section Types
Link to this section Functions
@spec new(binary(), common_image_type() | mime_type()) :: t()
Creates a new kino displaying the given binary image.
The given type be either :jpeg
, :png
, :gif
, :svg
or a string with image MIME type.