Mercurial > repos > bgruening > image_processing
comparison convert.xml @ 0:af5a19bb4293 draft
Uploaded
| author | bgruening |
|---|---|
| date | Mon, 18 Nov 2013 15:53:03 -0500 |
| parents | |
| children | 7ff9146333d3 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:af5a19bb4293 |
|---|---|
| 1 <tool id="graphicsmagick_image_processing" name="Image Converter" version="0.1.0"> | |
| 2 <description></description> | |
| 3 <requirements> | |
| 4 <requirement type="package" version="1.3.18">graphicsmagick</requirement> | |
| 5 </requirements> | |
| 6 <command> | |
| 7 ln -s '${input}' input.${input.ext}; | |
| 8 #set $trans_options = str($transformations).replace(',', ' ') | |
| 9 | |
| 10 convert $trans_options input.${input.ext} temp.${output_format}; | |
| 11 mv temp.${output_format} '${output}'; | |
| 12 </command> | |
| 13 | |
| 14 <inputs> | |
| 15 <param format="jpg,png,bmp,gif,svg,eps,tiff,xcf" name="input" type="data" label="Image to convert" /> | |
| 16 <param name="transformations" multiple="true" type="select" display="checkboxes" label="Transformations"> | |
| 17 <option value="-flip">flip vertically</option> | |
| 18 <option value="-flop">flip horizontally</option> | |
| 19 <option value="-rotate 90">rotate 90 degree to the right</option> | |
| 20 <option value="-rotate 270">rotate 90 degree to the left</option> | |
| 21 <option value="-rotate 180">rotate 180 degree</option> | |
| 22 </param> | |
| 23 <param name="output_format" type="select" label="Output Format"> | |
| 24 <option value="jpeg">jpg</option> | |
| 25 <option value="png">png</option> | |
| 26 <option value="bmp">bmp</option> | |
| 27 <option value="gif">gif</option> | |
| 28 <option value="svg">svg</option> | |
| 29 <option value="eps">eps</option> | |
| 30 <option value="tiff">tiff</option> | |
| 31 </param> | |
| 32 </inputs> | |
| 33 <outputs> | |
| 34 <data format="png" name="output"> | |
| 35 <change_format> | |
| 36 <when input="output_format" value="jpeg" format="jpg" /> | |
| 37 <when input="output_format" value="png" format="png" /> | |
| 38 <when input="output_format" value="bmp" format="bmp" /> | |
| 39 <when input="output_format" value="gif" format="gif" /> | |
| 40 <when input="output_format" value="svg" format="svg" /> | |
| 41 <when input="output_format" value="eps" format="eps" /> | |
| 42 <when input="output_format" value="tiff" format="tiff" /> | |
| 43 </change_format> | |
| 44 </data> | |
| 45 </outputs> | |
| 46 <tests> | |
| 47 <test> | |
| 48 <param name="input" value="donald.jpg" /> | |
| 49 <output name="output" file="donald.png" compare="sim_size" /> | |
| 50 <param name="output_format" value="png" /> | |
| 51 <param name="transformations" value="-flip" /> | |
| 52 </test> | |
| 53 | |
| 54 </tests> | |
| 55 | |
| 56 <help> | |
| 57 | |
| 58 **What it does** | |
| 59 | |
| 60 This tool converts an image into another format. You can also do some transformations like flipping or rotating. | |
| 61 Here you can see, how -flip behaves: | |
| 62 | |
| 63 Input: | |
| 64 | |
| 65 image:: $PATH_TO_IMAGES/donald.jpg | |
| 66 | |
| 67 Output: | |
| 68 | |
| 69 image:: $PATH_TO_IMAGES/donald.png | |
| 70 </help> | |
| 71 </tool> |
