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?
Problem with "<" in command line (montage -geometry)
Problem with "<" in command line (montage -geometry)
Last edited by derboo on 2014-05-22T21:12:19-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Problem with "<" in command line (montage -geometry)
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:
This aligns them at the top:
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.
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.
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
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:
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.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Problem with "<" in command line (montage -geometry)
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.
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 ...
Code: Select all
' filename.png
Code: Select all
'
snibgo's IM pages: im.snibgo.com
Re: Problem with "<" in command line (montage -geometry)
Alright, that did the job, thanks.