Naming issue when converting multiple files
Posted: 2014-05-14T20:05:26-07:00
Hello ImageMagick forum, I am experiencing a strange problem. I have a directory of tiff files: 'tiff2'. For each tiff in this directory, I want to create two thumbnails, one of height 360px, one of height 240px and store them in an output directory 'resize'. The input directory contains 4 files.
I run the command given below on.
And the output directory contains the following files.
It seems that the %[pagename] variable is not being appropriately unpacked for the final image (alphabetically) in my input directory.
Is this expected behavior? Have I discovered a bug? Should I be doing something different?
I'm using the following version of ImageMagick
Thanks so much for your help!
Code: Select all
PA00001.tiff PA00002.tiff PA00003.tiff PA00004.tiff
I run the command given below on.
Code: Select all
convert \
tiff2/*.tiff \
-define registry:temporary-path=/mnt/magick-tmp \
-limit memory 4GiB \
-colorspace rgb \
+profile '*' \
-filter triangle\
-set pagename "%t" \
-write mpr:'%[pagename]' +delete \
mpr:'%[pagename]' \
-resize x360 \
-set filename:title '%t_%h' \
-write 'resize/%[filename:title].png' +delete \
mpr:'%[pagename]' \
-resize x240 \
-set filename:title '%t_%h' 'resize/%[filename:title].png'
Code: Select all
PA00001_240.png PA00002_240.png PA00003_240.png %[pagename]_240.png
PA00001_360.png PA00002_360.png PA00003_360.png %[pagename]_360.png
Is this expected behavior? Have I discovered a bug? Should I be doing something different?
I'm using the following version of ImageMagick
Code: Select all
Version: ImageMagick 6.8.7-10 Q16 x86_64 2014-05-11 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC OpenCL OpenMP
Delegates: bzlib djvu fontconfig freetype jng jp2 jpeg lcms lqr openexr pangocairo png tiff x xml zlib