Hello! I´m absolutely new in ImageMagick. Looking for a -montage solution with twenty two images.
I want get an ouput of 9240 (!) combinations of twenty-two different images without repetition, ordered in 9240 images in a tile 1x3
Permutations without repetition (n=22, r=3) Using Items:
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22
List has 9240 entries.
[1,2,3],[1,2,4],[1,2,5],[1,2,6],[1,2,7],[1,2,8],[1,2,9],[1,2,10],[1,2,11],[1,2,1
2],[1,2,13],[1,2,14],[1,2,15],[1,2,16],[1,2,17],[1,2,18],[1,2,19],[1,2,20],[1,2,
21] [...]
I have no clue how to do this. Some hints? Thank you!
Montage of Combinations and Permutations of .jpg
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Montage of Combinations and Permutations of .jpg
I would do it like this:
1. Work out what montage command does what you want from three input files.
2. Write a script with three nested loops. The first loops from 1 to 20, the second from the first plus 1 to 21, the third loops from the second plus 1 to 22.
3. Within the third loop, call the montage with the required three filenames.
Obviously, the details will depend on the version of IM you use and your script language.
1. Work out what montage command does what you want from three input files.
2. Write a script with three nested loops. The first loops from 1 to 20, the second from the first plus 1 to 21, the third loops from the second plus 1 to 22.
3. Within the third loop, call the montage with the required three filenames.
Obviously, the details will depend on the version of IM you use and your script language.
snibgo's IM pages: im.snibgo.com
Re: Montage of Combinations and Permutations of .jpg
Thank you! A very good hint.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Montage of Combinations and Permutations of .jpg
I have moved this post to the Users forum, since it seems directly related to IM commands
Re: Montage of Combinations and Permutations of .jpg
Done!
I just write this line 9240 times, one for a permutation
magick montage -background #FF0000 01.jpg 02.jpg 03.jpg -mode Concatenate -tile x1 montage#.jpg
Thanks for the help!
I just write this line 9240 times, one for a permutation
magick montage -background #FF0000 01.jpg 02.jpg 03.jpg -mode Concatenate -tile x1 montage#.jpg
Thanks for the help!