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?".
AntonioKovacevic
Posts: 4 Joined: 2015-05-22T02:43:28-07:00
Authentication code: 6789
Post
by AntonioKovacevic » 2015-05-22T03:23:52-07:00
Hello people.
I am new to the ImageMagic and I require your help. I have a folder of images 0-9_0-13.jpg. First number is column and second one is a row.
I'm using this command to merge those images together:
Code: Select all
E:\315\001_files\12>montage.exe -tile 1x14 [0-9]_[0-13].jpg miff:- | convert.exe - +append final.jpg
The image comes out all scrambled. The image should look like this:
Code: Select all
0x0 1x0 2x0 ... 9x0
0x1 1x1 2x1 ... 9x1
0x2 1x2 2x2 ... 9x2
... ... ... .
0x13 1x13 2x13 9x13
If anyone could help me I will greatly appreciate it.
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2015-05-22T03:43:25-07:00
I think montage will find the files in lexicographical (dictionary) order: 0_0.jpg, 0_1.jpg etc. Is that the order they come out?
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2015-05-22T04:05:03-07:00
Your results support my theory. In dictionary order: 0, 1, 11, 12, 13, 2, 3, 4, ...
You should use numbers with leading zeros: 00, 01, 02, ... 09, 10, 11, 12, 13.
AntonioKovacevic
Posts: 4 Joined: 2015-05-22T02:43:28-07:00
Authentication code: 6789
Post
by AntonioKovacevic » 2015-05-22T04:27:12-07:00
File names go 00x00, 02x05, 09x11.. I get an error No such file or directory. What am I doing wrong?
AntonioKovacevic
Posts: 4 Joined: 2015-05-22T02:43:28-07:00
Authentication code: 6789
Post
by AntonioKovacevic » 2015-05-22T07:25:49-07:00
Thank you. This command worked:
Code: Select all
montage.exe -mode concatenate -tile 1x14 [0-9]*_[0-9]*.jpg miff:- | convert.exe - +append final.jpg
Anybody knows a way to bulk rename files from X_Y to X_0Y, if the second number is not bigger than 10? BulkRenameUtility + RegEx maybe?
Figured it out