Page 1 of 1

How to batch tile images in 3x2 -montage +adjoin?

Posted: 2013-08-03T05:08:11-07:00
by feelart
Hi,

Under Win7, I have a directory of jpeg, they are lexically sorted by some date preceeding some comment about the image content, for example:
2011-07-12 12h15 My first image.jpg
2012-08-29 09h45 éèàç.jpg

Using the lexicographic order of the files, I want to make a montage of the image by group of 6, 3 in cols by 2 in rows, with output as jpeg or pdf format.
Note expected order: row1 col 1, row 1 col 2, row 1 col3, row2 col1, etc.

I tried to use

Code: Select all

montage -mode concatenate -tile 3x2 "*.jpg" +adjoin _pages%02d.jpg
But it "only" creates _pages00.jpg (3x2) and _pages01.jpg (3x1), so only 9 images while my folder as 33 jpeg...

I though the issue might be the accent or blanks in the filename, but convertion to no accent and blanks to underscore does not solve the issue.

Note: no error is prompted on shell.

Thanks for advicing.

Re: How to batch tile images in 3x2 -montage +adjoin?

Posted: 2013-08-03T11:41:16-07:00
by fmw42
Also I do not believe that montage recognizes the convert command +adjoin.

I did a simple test and indeed montage will output more than one image. IM 6.8.6.7 Q16 Mac OSX

montage -tile 2x2 -mode concatenate rose: rose: rose: rose: rose: rose: rose: rose: rose: rose: rose: rose: rose: rose: rose: rose: 1tmp1.jpg

produced four 2x2 tiled results:
1tmp1-0.jpg
1tmp1-1.jpg
1tmp1-2.jpg
1tmp1-3.jpg


Perhaps there are issues with your files or the filenames?

Re: How to batch tile images in 3x2 -montage +adjoin?

Posted: 2013-08-03T14:06:31-07:00
by feelart
*

Code: Select all

montage -tile 3x2 -mode concatenate "*.jpg" _pages%02d.jpg
works perfectly in another directory

* Note: no error is prompted on shell.
Oups, My mistake
montage.exe: unable to open image `.....': No such file or directory @ error/blob.c/OpenBlob/2643.
I look into that

Re: How to batch tile images in 3x2 -montage +adjoin?

Posted: 2013-08-03T16:06:23-07:00
by feelart
If the file name contains non US chars, such as éçàù.... then it does not work.

Test case:
à.jpg
é.jpg
è.jpg
ê.jpg

Code: Select all

identify *.jpg > dumpImgsIndentity.txt
Output
identify.exe: unable to open image `à.JPG': No such file or directory @ error/blob.c/OpenBlob/2643.
identify.exe: unable to open image `è.JPG': No such file or directory @ error/blob.c/OpenBlob/2643.
identify.exe: unable to open image `é.JPG': No such file or directory @ error/blob.c/OpenBlob/2643.
identify.exe: unable to open image `ê.JPG': No such file or directory @ error/blob.c/OpenBlob/2643.
But

Code: Select all

for %y in (*.jpg) do (identify "%y" >> dumpImgsIndentity.txt)
Perfectly works.

Should this be filed as a bug, it seems some character encoding issue (UTF8, Unicode, endianess...) ?

Re: How to batch tile images in 3x2 -montage +adjoin?

Posted: 2013-08-03T17:53:17-07:00
by fmw42
It is probably a limitation of montage compared to convert.

Re: How to batch tile images in 3x2 -montage +adjoin?

Posted: 2013-08-04T16:53:04-07:00
by feelart
On your side, can you reproduce the issue?