changeset 0:3d3e4a1bd21e draft

planemo upload for repository https://github.com/bgruening/galaxytools/new/gm/tools/image_processing/image_processing/ commit dd88ad4ff9d10d72ed60263da31b406074173853
author bgruening
date Wed, 10 Oct 2018 16:17:02 -0400
parents
children e88f1111d9e7
files convert.xml macros.xml static/images/-flip static/images/donald.jpg static/images/donald.png test-data/donald.jpg test-data/result_image_convert_1.png test-data/result_image_montage_1.jpg
diffstat 8 files changed, 90 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/convert.xml	Wed Oct 10 16:17:02 2018 -0400
@@ -0,0 +1,77 @@
+<tool id="graphicsmagick_image_convert" name="Image Converter" version="@VERSION@">
+    <description></description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="aggressive">
+<![CDATA[
+        ln -s '${input}' input.${input.ext}
+        &&
+        #set $trans_options = str($transformations).replace(',', ' ')
+
+        convert $trans_options input.${input.ext} temp.${output_format}
+        &&
+        mv temp.${output_format} '${output}'
+]]>
+    </command>
+    <inputs>
+        <param format="jpg,png,bmp,gif,svg,eps,tiff,xcf" name="input" type="data" label="Image to convert" />
+        <param name="transformations" multiple="true" type="select" display="checkboxes" label="Transformations">
+            <option value="-flip">flip vertically</option>
+            <option value="-flop">flip horizontally</option>
+            <option value="-rotate 90">rotate 90 degree to the right</option>
+            <option value="-rotate 270">rotate 90 degree to the left</option>
+            <option value="-rotate 180">rotate 180 degree</option>
+        </param>
+        <param name="output_format" type="select" label="Output Format">
+                <option value="jpeg">jpg</option>
+                <option value="png">png</option>
+                <option value="bmp">bmp</option>
+                <option value="gif">gif</option>
+                <option value="svg">svg</option>
+                <option value="eps">eps</option>
+                <option value="tiff">tiff</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data format="png" name="output">
+            <change_format>
+                <when input="output_format" value="jpeg" format="jpg" />
+                <when input="output_format" value="png" format="png" />
+                <when input="output_format" value="bmp" format="bmp" />
+                <when input="output_format" value="gif" format="gif" />
+                <when input="output_format" value="svg" format="svg" />
+                <when input="output_format" value="eps" format="eps" />
+                <when input="output_format" value="tiff" format="tiff" />
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+      <test>
+          <param name="input" value="donald.jpg" />
+          <param name="output_format" value="png"  />
+          <param name="transformations" value="-flip" />
+          <output name="output" file="result_image_convert_1.png" compare="sim_size" delta="20000" />
+      </test>
+  </tests>
+    <help>
+<![CDATA[
+
+**What it does**
+
+This tool converts an image into another format. You can also do some transformations like flipping or rotating.
+Here you can see, how -flip behaves:
+
+Input:
+
+.. image:: $PATH_TO_IMAGES/donald.jpg
+
+Output:
+
+.. image:: $PATH_TO_IMAGES/donald.png
+
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Wed Oct 10 16:17:02 2018 -0400
@@ -0,0 +1,13 @@
+<macros>
+    <token name="@VERSION@">1.3.26</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@VERSION@">graphicsmagick</requirement>
+            <yield />
+        </requirements>
+    </xml>
+    <xml name="citations">
+        <citations>
+        </citations>
+    </xml>
+</macros>
Binary file static/images/-flip has changed
Binary file static/images/donald.jpg has changed
Binary file static/images/donald.png has changed
Binary file test-data/donald.jpg has changed
Binary file test-data/result_image_convert_1.png has changed
Binary file test-data/result_image_montage_1.jpg has changed