Mercurial > repos > bgruening > graphicsmagick_image_convert
comparison convert.xml @ 8:99217847314a draft
planemo upload for repository https://github.com/bgruening/galaxytools/new/gm/tools/image_processing/image_processing/ commit b81f7b8b0253917d3322c08d884a5a86a3b7e0fe
author | bgruening |
---|---|
date | Mon, 04 Dec 2023 16:27:57 +0000 |
parents | ff05b2c4263c |
children | 5376a7767fb3 |
comparison
equal
deleted
inserted
replaced
7:ff05b2c4263c | 8:99217847314a |
---|---|
1 <tool id="graphicsmagick_image_convert" name="Convert image format" version="@VERSION@+galaxy2"> | 1 <tool id="graphicsmagick_image_convert" name="Convert image format" version="@VERSION@+galaxy3"> |
2 <description>with GraphicsMagick</description> | 2 <description>with GraphicsMagick</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="requirements" /> | 6 <expand macro="requirements" /> |
12 #set $trans_options = str($transformations).replace(',', ' ') | 12 #set $trans_options = str($transformations).replace(',', ' ') |
13 #else: | 13 #else: |
14 #set $trans_options = '' | 14 #set $trans_options = '' |
15 #end if | 15 #end if |
16 | 16 |
17 gm convert -resize ${resize}%x $trans_options input.${input.ext} temp.${output_format} | 17 gm convert |
18 -resize ${resize}%x | |
19 $trans_options | |
20 #if $palette.palette_select == "automatic" | |
21 -type Palette | |
22 #else if $palette.palette_select == "manual" | |
23 -colors '${palette.palette}' | |
24 #end if | |
25 'input.${input.ext}' | |
26 'temp.${output_format}' | |
18 && | 27 && |
19 mv temp.${output_format} '${output}' | 28 mv 'temp.${output_format}' '${output}' |
20 ]]> | 29 ]]> |
21 </command> | 30 </command> |
22 <inputs> | 31 <inputs> |
23 <param format="jpg,png,bmp,gif,svg,eps,tiff,xcf" name="input" type="data" label="Image to convert" /> | 32 <param format="jpg,png,bmp,gif,svg,eps,tiff,xcf" name="input" type="data" label="Image to convert" /> |
24 <param name="transformations" multiple="true" type="select" display="checkboxes" label="Transformations"> | 33 <param name="transformations" multiple="true" type="select" display="checkboxes" label="Transformations"> |
26 <option value="-flop">flip horizontally</option> | 35 <option value="-flop">flip horizontally</option> |
27 <option value="-rotate 90">rotate 90 degree to the right</option> | 36 <option value="-rotate 90">rotate 90 degree to the right</option> |
28 <option value="-rotate 270">rotate 90 degree to the left</option> | 37 <option value="-rotate 270">rotate 90 degree to the left</option> |
29 <option value="-rotate 180">rotate 180 degree</option> | 38 <option value="-rotate 180">rotate 180 degree</option> |
30 </param> | 39 </param> |
40 | |
41 <conditional name="palette"> | |
42 <param name="palette_select" type="select" label="Reduce Color Palette"> | |
43 <option value="no" selected="true">No</option> | |
44 <option value="automatic">Automatic</option> | |
45 <option value="manual">Manual</option> | |
46 </param> | |
47 <when value="automatic" /> | |
48 <when value="manual"> | |
49 <param name="palette" type="integer" min="1" label="Color Palette Size" value="32" help="Number of colors to use, should be in powers of 2 (1, 2, 4, 8, 16, 32, 64, ...), otherwise space is wasted in the palette."/> | |
50 </when> | |
51 </conditional> | |
31 <param name="resize" type="float" value="100" label="Resize (%)" min="0"/> | 52 <param name="resize" type="float" value="100" label="Resize (%)" min="0"/> |
32 <param name="output_format" type="select" label="Output Format"> | 53 <param name="output_format" type="select" label="Output Format"> |
33 <option value="jpg">jpg</option> | 54 <option value="jpg">jpg</option> |
34 <option value="png">png</option> | 55 <option value="png">png</option> |
35 <option value="bmp">bmp</option> | 56 <option value="bmp">bmp</option> |
60 <param name="output_format" value="png" /> | 81 <param name="output_format" value="png" /> |
61 <param name="transformations" value="-flip" /> | 82 <param name="transformations" value="-flip" /> |
62 <param name="resize" value="50" /> | 83 <param name="resize" value="50" /> |
63 <output name="output" file="result_image_convert_1.png" compare="sim_size" delta="20000" /> | 84 <output name="output" file="result_image_convert_1.png" compare="sim_size" delta="20000" /> |
64 </test> | 85 </test> |
86 <test> | |
87 <param name="input" value="donald.jpg" /> | |
88 <param name="output_format" value="jpg" /> | |
89 <conditional name="palette"> | |
90 <param name="palette_select" value="automatic" /> | |
91 </conditional> | |
92 <output name="output" file="donald-palette.jpg" compare="sim_size" delta="20000" /> | |
93 </test> | |
94 <test> | |
95 <param name="input" value="donald.jpg" /> | |
96 <param name="output_format" value="jpg" /> | |
97 <conditional name="palette"> | |
98 <param name="palette_select" value="manual" /> | |
99 <param name="palette" value="2" /> | |
100 </conditional> | |
101 <output name="output" file="donald-colors-2.jpg" compare="sim_size" delta="20000" /> | |
102 </test> | |
65 </tests> | 103 </tests> |
66 <help> | 104 <help> |
67 <![CDATA[ | 105 <![CDATA[ |
68 | 106 |
69 **What it does** | 107 **What it does** |