montage files input with index more than 10

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mogadanez
Posts: 6
Joined: 2014-07-14T05:48:37-07:00
Authentication code: 6789

montage files input with index more than 10

Post by mogadanez »

Code: Select all

montage  page-[0-24].jpeg  -tile 5x5  -geometry +0+0  m-0.jpeg
takes pages 0,1,2 ( 0-2 range ) and 4.
how can I get exactly 25 images 0-24?

tried

Code: Select all

montage  page-[0-'24'].jpeg  -tile 5x5  -geometry +0+0  m-0.jpeg
but it is not helps
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: montage files input with index more than 10

Post by fmw42 »

This is perhaps an OS issue. In Unix, the wildcards in [...] do not work the way you want. They get any number that contains those characters, not a sequential list.

The best way to do that is to create a loop to build a list and then use the list as the input to IM montage. In unix, this would be

Code: Select all

list=""
for (i=0; i<=24; i++)
list="$list page-$i.jpeg"
done

montage $list -tile 5x5  -geometry +0+0  m-0.jpeg
Windows would have a different looping syntax.
Post Reply