Montage and drawing

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
User avatar
whugemann
Posts: 289
Joined: 2011-03-28T07:11:31-07:00
Authentication code: 8675308
Location: Münster, Germany 52°N,7.6°E

Montage and drawing

Post by whugemann »

I would like to draw some triangles (which are supposed to be "arrows") on of four images which I combined with Montage, i.e.:

Code: Select all

Montage -tile 2x2 -geometry 400x300+10+10 1.jpg 2.jpg 3.jpg 4.jpg -draw "polyline 200,300 400,300 300,400"  result.jpg
However, Montage draws the triangle on each of the images, not on the combined one. Is there any way I can tell Montage that I want to draw on the result instead?

(The triangles shall indicate logical relationships between the arranged pictures.)
Wolfgang Hugemann
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage and drawing

Post by fmw42 »

I don't believe that montage is that sophisticated. In unix the easiest way would be to pipe the result from montage to the input of a new convert to do the drawing. I am not sure whether that is easy in Windows or not.

montage ..... miff:- | convert - -draw .... resultimage


Otherwise, you would likely need to save some temporary image from montage and do a convert command afterwards. Then delete the temporary image.
User avatar
whugemann
Posts: 289
Joined: 2011-03-28T07:11:31-07:00
Authentication code: 8675308
Location: Münster, Germany 52°N,7.6°E

Re: Montage and drawing

Post by whugemann »

montage ..... miff:- | convert - -draw .... resultimage
Well, I have just given it a try, although I did not expect this to work under Windows, but ...

... indeed, this works under Windows just as well! The pipe symbol is the same in Windows and it feeds STDOUT to STDIN just as well. But I have never seen it being used in such a way, i.e. as a stream operator. I 've just peformed a search on the Net and could not find another example of such use of the CMD pipe sysmbol.

So this defnitively something I have to incorporate on my Windows usage page!
Wolfgang Hugemann
Post Reply