diff compare.xml @ 0:fd0e8bda0154 draft

planemo upload for repository https://github.com/bgruening/galaxytools/new/gm/tools/image_processing/image_processing/ commit bc7f5022150a6a31030775c7aafc81293833d55a
author bgruening
date Sat, 23 Dec 2023 11:35:44 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compare.xml	Sat Dec 23 11:35:44 2023 +0000
@@ -0,0 +1,79 @@
+<tool id="graphicsmagick_image_compare" name="Compare two images" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05">
+    <description>with GraphicsMagick</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="aggressive">
+<![CDATA[
+        ln -s '${input1}' input1.${input1.ext} &&
+        ln -s '${input2}' input2.${input2.ext} &&
+
+        gm compare
+            -file outfile.png
+            -highlight-style $highlight_style
+            -metric $metric
+            -highlight-color $color
+            'input1.${input1.ext}'
+            'input2.${input2.ext}'
+]]>
+    </command>
+    <inputs>
+        <param name="input1" format="jpg,png,bmp,gif,svg,eps,tiff,xcf" type="data" label="First image to compare" />
+        <param name="input2" format="jpg,png,bmp,gif,svg,eps,tiff,xcf" type="data" label="Second image to compare" />
+
+        <param argument="-highlight-style" type="select" label="Pixel highlight style">
+            <option value="assign">assign</option>
+            <option value="threshold">threshold</option>
+            <option value="tint">tint</option>
+            <option value="xor">xor</option>
+        </param>
+        <param argument="-metric" type="select" label="Comparison metric">
+            <option value="MAE">MAE</option>
+            <option value="MSE">MSE</option>
+            <option value="PAE">PAE</option>
+            <option value="PSNR">PSNR</option>
+            <option value="PMSE">PMSE</option>
+        </param>
+        <expand macro="color" />
+    </inputs>
+    <outputs>
+        <data name="output" format="png" from_work_dir="outfile.png">
+        </data>
+    </outputs>
+    <tests>
+      <test>
+          <param name="input1" value="donald.jpg" />
+          <param name="input2" value="donald-palette.jpg" />
+          <output name="output" file="result_image_compare01.png" compare="sim_size" delta="500" />
+      </test>
+      <test>
+        <param name="input1" value="donald.jpg" />
+        <param name="input2" value="donald-palette.jpg" />
+        <param name="highlight_style" value="tint" />
+        <param name="metric" value="MAE" />
+        <output name="output" file="result_image_compare02.png" compare="sim_size" delta="500" />
+    </test>
+  </tests>
+    <help>
+<![CDATA[
+
+**What it does**
+
+This tool compares two images and provides a diff by pixels.
+Here you can see how it behaves:
+
+Input:
+
+.. image:: $PATH_TO_IMAGES/donald.jpg
+.. image:: $PATH_TO_IMAGES/donald-palette.jpg
+
+
+Output:
+
+.. image:: $PATH_TO_IMAGES/result_image_compare01.png
+
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>