0
|
1 <tool id="image_resize" name="Image Resize" version="1.0.0">
|
|
2
|
|
3 <description>Resize the image.</description>
|
|
4
|
|
5 <command interpreter="python" >
|
|
6 image_do.py -i $input -o $output -c "resize $xx $yy $filter" -e "$input.ext"
|
|
7 </command>
|
|
8
|
|
9 <inputs>
|
|
10 <param name="input" type="data" format="png,jpg,tif,zip" label="Input image" help="Original RGB or grayscale image." />
|
|
11 <param name="xx" size="5" type="integer" value="0" label="Width" help="Target image width" />
|
|
12 <param name="yy" size="5" type="integer" value="0" label="Height" help="Target image height" />
|
|
13 <param name="filter" type="select" label="Filter">
|
|
14 <option value="0">NEAREST</option>
|
|
15 <option value="1" selected="true">ANTIALIAS</option>
|
|
16 <option value="2">BILINEAR</option>
|
|
17 <option value="3">BICUBIC</option>
|
|
18 </param>
|
|
19 </inputs>
|
|
20
|
|
21 <outputs>
|
|
22 <data format="input" name="output" metadata_source="input" label="Resized ${input.display_name}"/>
|
|
23 </outputs>
|
|
24
|
|
25 <help>
|
|
26 Resizes an image.
|
|
27 </help>
|
|
28
|
|
29 <tests>
|
|
30 <test>
|
|
31 <param name="input" value="sydney.jpg" />
|
|
32 <param name="xx" value="50" />
|
|
33 <param name="yy" value="50" />
|
|
34 <param name="filter" value="1" />
|
|
35 <output name="output" file="sydney-resized.jpg" />
|
|
36 </test>
|
|
37 </tests>
|
|
38
|
|
39 </tool> |