Page 1 of 1
Problem with "<" in command line (montage -geometry)
Posted: 2014-05-22T19:37:02-07:00
by derboo
I'm trying to merge together a bunch of images with montage, but I'm having problems with the command. I want to use -geometry '1x1+0+0<' to have the images without resizing and without gaps, but the command line in Windows 7 seems to have a problem with the "<" character.
This is my command line as I type it in:
montage.exe filename*.png -tile 2x1 -geometry '1x1+0+0<' filename.png
But the command processing turns it into this:
montage.exe filename*.png -tile 2x1 -geometry '1x1+0+0 0<'
And I get an error message that the file cannot be found. Is there any way to get around this issue?
Re: Problem with "<" in command line (montage -geometry)
Posted: 2014-05-22T20:16:05-07:00
by fmw42
In Windows, I believe you must use double quotes rather than single quotes.
What was the exact error message -- what file was it complaining about?
But try just -geometery +0+0. That should force no spaces and leave the images alone, except to pad to the same height.
This aligns them centered:
Code: Select all
montage logo: rose: -geometry +0+0 -tile x1 -background black result.png
This aligns them at the top:
Code: Select all
montage logo: rose: -gravity north -geometry +0+0 -tile x1 -background black result.png
Using < in the geometry pads the smaller rose: to the same size as the logo:. I do not think that is what you want.
You can also just use
convert images -gravity XX +append result
to put several images side by side.
Code: Select all
convert logo: rose: -gravity north +append show:
This does the same as my second command using montage command. This is simpler than dealing with all the montage features.
see
http://www.imagemagick.org/Usage/montage/
http://www.imagemagick.org/Usage/layers/#append
Set the background to "none" or "transparent" if you do not want to see the background fill.
Re: Problem with "<" in command line (montage -geometry)
Posted: 2014-05-22T21:11:40-07:00
by snibgo
As Fred says, use double-quotes in Windows.
Without them, the shell interprets "<" as file redirection, taking the contents of the file (on the right) as stdin for the command (on the left). So it looks for a file called ...
... or possibly just ...
... which doesn't exist.
Re: Problem with "<" in command line (montage -geometry)
Posted: 2014-05-22T21:23:37-07:00
by derboo
Alright, that did the job, thanks.