View Source Avatarex.Kitty (Avatarex v0.1.1)
This module generates Cat avatars using images created by David Revoy and used under CC-BY-4.0.
https://www.davidrevoy.com/article591/cat-bird-fenestar-abstract-avatar-generators
Link to this section Summary
Functions
Generates a Elixir.Avatarex.Kitty with the provided name.
Generates a random Elixir.Avatarex.Kitty without a name, that cannot be regenerated based on a given name.
Generates a Elixir.Avatarex.Kitty with the specified name. Renders an image in the output directory.
Writes an image for a provided Elixir.Avatarex.Kitty to the output directory.
Writes an image for a provided %Vix.Vips.Image{} with a given name in the output directory.
Link to this section Functions
Generates a Elixir.Avatarex.Kitty with the provided name.
Returns %Elixir.Avatarex.Kitty{name: name, ...}
.
examples
Examples
iex> Elixir.Avatarex.Kitty.generate("my_kitty")
%Elixir.Avatarex.Kitty{}
Generates a random Elixir.Avatarex.Kitty without a name, that cannot be regenerated based on a given name.
Returns %Elixir.Avatarex.Kitty{}
.
examples
Examples
iex> Elixir.Avatarex.Kitty.random()
%Elixir.Avatarex.Kitty{}
Generates a Elixir.Avatarex.Kitty with the specified name. Renders an image in the output directory.
Returns VipsImage
.
examples
Examples
iex> Elixir.Avatarex.Kitty.render("my_kitty")
%Elixir.Avatarex.Kitty{}
Writes an image for a provided Elixir.Avatarex.Kitty to the output directory.
Returns VipsImage
.
examples
Examples
iex> Elixir.Avatarex.Kitty.write("my_kitty")
%Elixir.Avatarex.Kitty{}
Writes an image for a provided %Vix.Vips.Image{} with a given name in the output directory.
Returns VipsImage
.
examples
Examples
iex> Elixir.Avatarex.Kitty.write(%Vix.Vips.Image{}, "my_kitty")
%Elixir.Avatarex.Kitty{}