ex_magick v0.1.0 ExMagick

Link to this section Summary

Functions

Generate the command builder struct

Set a file path to the command builder

Set a file by base64 encoded image to the command builder

Set a file by RGB color to the command builder

Output the image from command builder

Set an option to the command builder

Link to this section Functions

Generate the command builder struct.

Examples

iex> ExMagick.init()
%ExMagick.CommandBuilder{command: "convert", options: []}
Link to this function open(builder, path)

Set a file path to the command builder.

Examples

iex> ExMagick.init() |> ExMagick.open("test.png")
%ExMagick.CommandBuilder{command: "convert", options: ["test.png"]}
Link to this function open_with_base64(builder, encoded_image)

Set a file by base64 encoded image to the command builder.

Examples

iex> ExMagick.init() |> ExMagick.open_with_base64("data:image/png;base64,....")
%ExMagick.CommandBuilder{command: "convert", options: ["inline:data:data:image/png;base64,...."]}
Link to this function open_with_color(builder, rgb, opts \\ [fill: :fill])

Set a file by RGB color to the command builder.

Examples

iex> ExMagick.init() |> ExMagick.open_with_color("#00aaff")
%ExMagick.CommandBuilder{command: "convert", options: ["xc:#00aaff"]}
iex> ExMagick.init() |> ExMagick.open_with_color("#00aaff-#ffaa00", fill: :gradient)
%ExMagick.CommandBuilder{command: "convert", options: ["gradient:#00aaff-#ffaa00"]}
Link to this function output(builder, output_name)

Output the image from command builder.

Link to this function put_option(builder, key, value)

Set an option to the command builder.

Examples

iex> ExMagick.init() |> ExMagick.put_option("size", "150x150")
%ExMagick.CommandBuilder{command: "convert", options: ["-size", "150x150"]}