Skip to content

Commit

Permalink
fix docs examples formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
velimir committed Jun 20, 2019
1 parent 7170667 commit b890360
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions lib/imgutils.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ defmodule ImgUtils do
## Examples
iex> image = <<255, 0, 0, 0, 255, 0, 0, 0, 255>>
iex> width = 3; height = 1; channels = 3; out_width = 3; out_height = 5
iex> ImgUtils.resize(image, width, height, channels, out_width, out_height)
{:ok,
<<241, 14, 0, 14, 227, 14, 0, 14, 241, 241, 14, 0, 14, 227, 14, 0, 14, 241,
241, 14, 0, 14, 227, 14, 0, 14, 241, 241, 14, 0, 14, 227, 14, 0, 14, 241,
241, 14, 0, 14, 227, 14, 0, 14, 241>>}
iex(1)> image = <<255, 0, 0, 0, 255, 0, 0, 0, 255>>
iex(2)> width = 3; height = 1; channels = 3; out_width = 3; out_height = 5
iex(3)> ImgUtils.resize(image, width, height, channels, out_width, out_height)
{:ok,
<<241, 14, 0, 14, 227, 14, 0, 14, 241, 241, 14, 0, 14, 227, 14, 0, 14, 241,
241, 14, 0, 14, 227, 14, 0, 14, 241, 241, 14, 0, 14, 227, 14, 0, 14, 241,
241, 14, 0, 14, 227, 14, 0, 14, 241>>}
"""
@spec resize(
Expand Down
4 changes: 2 additions & 2 deletions lib/imgutils/formats/ppm.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ defmodule ImgUtils.Formats.PPM do
## Examples
iex> ImgUtils.Formats.PPM.encode(<<255, 0, 0>>, 1, 1)
<<80, 54, 10, 49, 32, 49, 10, 50, 53, 53, 10, 255, 0, 0>>
iex> ImgUtils.Formats.PPM.encode(<<255, 0, 0>>, 1, 1)
<<80, 54, 10, 49, 32, 49, 10, 50, 53, 53, 10, 255, 0, 0>>
"""
@spec encode(binary, pos_integer, pos_integer) :: binary
Expand Down

0 comments on commit b890360

Please sign in to comment.