Mercurial > repos > tomasz-bednarz > image_tools
diff tools/image_resize.xml @ 0:64374d852e36
Uploaded
author | tomasz-bednarz |
---|---|
date | Mon, 25 Nov 2013 21:32:12 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/image_resize.xml Mon Nov 25 21:32:12 2013 -0500 @@ -0,0 +1,39 @@ +<tool id="image_resize" name="Image Resize" version="1.0.0"> + + <description>Resize the image.</description> + + <command interpreter="python" > + image_do.py -i $input -o $output -c "resize $xx $yy $filter" -e "$input.ext" + </command> + + <inputs> + <param name="input" type="data" format="png,jpg,tif,zip" label="Input image" help="Original RGB or grayscale image." /> + <param name="xx" size="5" type="integer" value="0" label="Width" help="Target image width" /> + <param name="yy" size="5" type="integer" value="0" label="Height" help="Target image height" /> + <param name="filter" type="select" label="Filter"> + <option value="0">NEAREST</option> + <option value="1" selected="true">ANTIALIAS</option> + <option value="2">BILINEAR</option> + <option value="3">BICUBIC</option> + </param> + </inputs> + + <outputs> + <data format="input" name="output" metadata_source="input" label="Resized ${input.display_name}"/> + </outputs> + + <help> + Resizes an image. + </help> + + <tests> + <test> + <param name="input" value="sydney.jpg" /> + <param name="xx" value="50" /> + <param name="yy" value="50" /> + <param name="filter" value="1" /> + <output name="output" file="sydney-resized.jpg" /> + </test> + </tests> + +</tool> \ No newline at end of file