View Source IVCU.Converter.CMD (IVCU v0.1.1)

Provides a helper to generate a converter that uses any cmd converter for files (convert binary from imagemagick in example).

usage

Usage

To use the converter you need to define a module.

defmodule MyApp.ImageConverter do
  use IVCU.Converter.CMD,
    args: %{
      thumb: [
        "convert",
        :input,
        "-thumbnail",
        "100x100^",
        "-gravity",
        "center",
        "-extent",
        "100x100",
        :output
      ]
    }
end

:args is a map where the commands for different versions are provided.

:input and :output represent positions of input and output files for the command.

Now you can use your storage module in your definition.