This job takes any number of image objects as input (e.g., PNG images) and converts them to "gif" format using the ImageMagick "convert" tool, storing the converted image in the same directory as the input object. This example runs on a set of icons in the public domain from the Open Icon Library.
Once you've set up the Manta CLI tools, you can run this job yourself on the publicly accessible dataset using the following command:
$ mfind -t o -n '.*\.png' /manta/public/examples/symbols | \
mjob create -n "Image conversion" -w \
-m 'convert "$MANTA_INPUT_FILE" out.gif && \
mpipe -H "content-type: image/gif" -f out.gif \
"${MANTA_INPUT_OBJECT%.*}.gif"'
Because the output for this job is quite large, this example did not use "mjob create -o" (which prints all job outputs). For the actual output, see "Output summary" below.
[
{
"exec": "convert \"$MANTA_INPUT_FILE\" out.gif && \\\n mpipe -H \"content-type: image/gif\" -f out.gif \\\n\t \"${MANTA_INPUT_OBJECT%.*}.gif\"",
"type": "map"
}
]