I tried to use mogrify and the -path while reading the images from a list file using the @ option. This is because I want to avoid calling convert in a loop as it increases the processing time quite a lot when there are many images. The command line I tried was a variation of:
Code: Select all
mogrify @list.txt -resize 100x100 -path m:\pics\thumbs
Example, if list.txt contains the following:
Code: Select all
m:\pis\pic1.jpg
m:\pis\pic2.jpg
m:\pis\pic3.jpg
Code: Select all
m:\pics\pic1-0.jpg
m:\pics\pic1-1.jpg
m:\pics\pic1-2.jpg
However, this seems to work fine:
Code: Select all
mogrify -resize 100x100 -path m:\pics\thumbs m:\pics\*.jpg
I could go around this by reading list.txt and create a one line string of file names which I then append to the mogrify command line but this would fail when the string goes beyond the command line length limit of the shell (32768 in my case) which happens easily when I have many hundreds of files as each line in list.txt is long'ish, containing the full path to the file.
Any ideas?
As a side note also (do prod me in case I'm missing something), IM is an incredibly advanced tool but it lacks one of the most basic features: processing of multiple files with filename format modifiers for the output files. Both convert and mogrify can read file names from a file with @ or from globbing a directory with e.g. *.jpg, so why not allow the user to specify the output directory and file based on the tokens from the input file, e.g. %b for basename, %f for file name, %e for extension, %p for path, etc ... outputting to a different directory would become much easier. Currently, I see IM insists on using counters and the output directory can only be specified for mogrify in that sense (i.e. when using @ or globbing and, for instance, when trying to just replicate the file names for the converted files in another directory).
Cheers and keep up the good work!