View Source Identicon (Identicon2 v0.1.0)

Identicon is a module that that helps to convert a sting into a spacial type of image

Link to this section Summary

Link to this section Functions

@spec build_grid(%Identicon.Image{
  color: term(),
  grid: term(),
  hex: term(),
  pixel_map: term()
}) ::
  %Identicon.Image{color: term(), grid: term(), hex: term(), pixel_map: term()}
@spec build_pixel_map(%Identicon.Image{
  color: term(),
  grid: term(),
  hex: term(),
  pixel_map: term()
}) ::
  %Identicon.Image{color: term(), grid: term(), hex: term(), pixel_map: term()}
@spec draw_image(%Identicon.Image{
  color: term(),
  grid: term(),
  hex: term(),
  pixel_map: term()
}) ::
  binary()
Link to this function

filter_odds_squares(grid)

View Source
@spec filter_odds_squares([{term(), integer()}]) :: [{term(), integer()}]
@spec main(String.t()) :: any()

Main function that will do the conversion.

@spec mirror_row([byte()]) :: [byte()]
@spec pick_color(%Identicon.Image{
  color: term(),
  grid: term(),
  hex: term(),
  pixel_map: term()
}) ::
  %Identicon.Image{color: term(), grid: term(), hex: term(), pixel_map: term()}
Link to this function

save_image(image, filename)

View Source
@spec save_image(binary(), String.t()) :: :ok | {:error, atom()}
@spec string_to_md5(Stream.t()) :: %Identicon.Image{
  color: term(),
  grid: term(),
  hex: [byte()],
  pixel_map: term()
}