Montage type

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
seiko
Posts: 7
Joined: 2012-08-01T01:12:37-07:00
Authentication code: 15

Montage type

Post by seiko »

Hello. I have 10 images and i want to put them like that:

1+2 | 3 | 4 |
5 | 6 | 7 |
8 | 9 | 10|

How to do that? Righ now i am doing montage for first two, create an image, use that image for mantage 2 and delete the image but i am not fine with that. I know there should be something better;
Thanks!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage type

Post by fmw42 »

The only thing that I can think of is to +append the first two images, then run montage on all the images after removing image 1 and 2 and keeping the appended image. Not much different from your method. It just depends upon if you have frame borders in your montage.

If you don't want the montage frame borders, you can use convert with parenthesis process to append the first two images, then append each row and then append all 3 rows. That can be done in one command. You can also include -frame to add frame borders for each image.

However, the append and montage solution is better. You can use convert to append the two images, then pipe that to montage with the rest of the images.
seiko
Posts: 7
Joined: 2012-08-01T01:12:37-07:00
Authentication code: 15

Re: Montage type

Post by seiko »

I dont have frame borders...just addind them without anything else.
Right now i am using
p.StartInfo.Arguments = @"montage -tile 3x3 -geometry 402x253+0-2" ;
for(i = 0; i < 9; i++)
p.StartInfo.Arguments += pathImages;

Can you gine some hints on how to use add?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage type

Post by fmw42 »

In command line I would do:

convert image1 image2 +append miff:- | montage -tile 3x3 - image3 image4 ... image10 resultimage

This will put all the images together with no spaces. I am not sure what your -geometry is doing? Is it to resize all the images to the same size?
seiko
Posts: 7
Joined: 2012-08-01T01:12:37-07:00
Authentication code: 15

Re: Montage type

Post by seiko »

I have some huge images ~2500px each and i dont nedd so huge. I need one at medium resolution ~1200px x 700 all toghether.
I tried for 2 images what u said but didnt work...
My command is: convert "C:\1\CN112313.022\both arches\left_occl.png" "C:\1\CN112313.022\both arches\upper_top.png" +append miff:- | montage -title 3x3 - "C:\1\CN112313.022\both arches\right_occl.png" "C:\1\CN112313.022\both arches\lower_top.png" "C:\1\CN112313.022\both arches\front_occl.png" "C:\1\CN112313.022\both arches\lower_front.png" "C:\1\CN112313.022\both arches\top_measure.png" "C:\1\CN112313.022\both arches\front_measure.png" "C:\1\CN112313.022\both arches\spectrum text box.jpg" "C:\1\CN112313.022\both arches\front_trans.png" "C:\1\CN112313.022\both arches\final.jpg"

No image is created...
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage type

Post by fmw42 »

I am not sure windows supports pipes. See http://www.imagemagick.org/Usage/windows/. Perhaps there is some info there.
seiko
Posts: 7
Joined: 2012-08-01T01:12:37-07:00
Authentication code: 15

Re: Montage type

Post by seiko »

No help. At the end i create a temp file, resized and used in montage. After that i deleted that image and works well but a little bit too slow.
Thanks for help.
Post Reply