I'm using ImageMagick to automate file downloads from an image database. ImageMagick is running on a unix system and I wrote a small perl script which converts the inputfile to 144 dpi png file, no matter which image type (tiff, eps-jpeg, jpg ... ) is downloaded. In the script I use two different convert commands depending on the fact if the image has a clipping path or not. So I use
Code: Select all
identify -verbose $inputfile
Now I've tried this perl script with different files and I found a problem in my approach with a tiff file. It includes 6 paths but none of those paths were defined as clipping path. When using the above command the resulting output is the following (reduced to the interesting parts):
Code: Select all
Image: SH_XP_35150_12.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
...
Clipping path:
<?xml version="1.0" encoding="iso-8859-1"?>
<svg width="5616" height="3744">
<g>
<path style="fill:#00000000;stroke:#00000000;stroke-width:0;stroke-antialiasing:false" d="
M 3679,489
L 3679,-95
L 852,-303
L -222,-249
L -309,702
L 1806,831
L 3678,789
"/>
</g>
</svg>
....
Version: ImageMagick 6.6.2-10 2012-02-03 Q16 http://www.imagemagick.org
Code: Select all
convert SH_XP_35150_12.tif -resample 144x144 -alpha transparent -clip -alpha opaque -strip -depth 8 mytest.png
I would be very glad if someone can give me a hint of what I'm doing wrong. If you need any more information to answer my question or to help me, please ask.
Thanks a lot
Alea