2
|
1 <tool id="filter_invert" name="Filter - Invert" version="1.0.2">
|
|
2
|
|
3 <description>Apply an invert filter on the image.</description>
|
|
4
|
|
5 <command interpreter="python" >
|
|
6 #if (str($input.ext) == 'jpg'):
|
|
7 pil_filter.py $input $output invert jpeg
|
|
8 #else:
|
|
9 pil_filter.py $input $output invert ${input.ext}
|
|
10 #end if
|
|
11 </command>
|
|
12
|
|
13 <inputs>
|
|
14 <param name="input" type="data" format="png,jpg,tif,zip" label="Input image" help="Original RGB or grayscale image." />
|
|
15 </inputs>
|
|
16
|
|
17 <outputs>
|
|
18 <data format="input" name="output" metadata_source="input" label="Invert on ${input.display_name}"/>
|
|
19 </outputs>
|
|
20
|
|
21 <help>
|
|
22 Invert the image (colours).
|
|
23 </help>
|
|
24
|
|
25 <tests>
|
|
26 <test>
|
|
27 <param name="input" value="images/sydney.jpg" />
|
|
28 <output name="output" file="images/sydney-invert.jpg" />
|
|
29 </test>
|
|
30 </tests>
|
|
31
|
|
32 </tool> |