montage problem

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?".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: montage problem

Post by fmw42 »

You can crop the image data (not from the displayed image). See http://www.imagemagick.org/Usage/crop/#crop and http://www.imagemagick.org/script/comma ... s.php#crop
guitarking123
Posts: 22
Joined: 2016-02-22T12:54:41-07:00
Authentication code: 1151

Re: montage problem

Post by guitarking123 »

Code: Select all

C:\Users\Work>convert 4.jpg: -crop 23x27+89+77  crop.jpg
convert.exe: unable to open module file `C:\Program Files\ImageMagick-6.9.3-Q16\
modules\coders\IM_MOD_RL_4.JPG_.dll': No such file or directory @ warning/module
.c/GetMagickModulePath/674.
convert.exe: no decode delegate for this image format `4.JPG' @ error/constitute
.c/ReadImage/501.
convert.exe: no images defined `crop.jpg' @ error/convert.c/ConvertImageCommand/
3241.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: montage problem

Post by snibgo »

C:\Users\Work>convert 4.jpg: -crop ...
Why do you have a colon? Try:

Code: Select all

convert 4.jpg -crop ...
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: montage problem

Post by fmw42 »

convert 4.jpg: -crop 23x27+89+77 crop.jpg
The colon is the problem. Only IM internal images such as logo: and rose: use colons. try

Code: Select all

convert 4.jpg -crop 23x27+89+77 +repage  crop.jpg
The repage is needed to remove the virtual canvas, which is important for format such as gif and png and tif that save the virtual canvas. Jpg does not save it, so you are safe leaving it off. But it is good practice to add it unless you want to keep the virtual canvas.
guitarking123
Posts: 22
Joined: 2016-02-22T12:54:41-07:00
Authentication code: 1151

Re: montage problem

Post by guitarking123 »

Okey, thanks!
guitarking123
Posts: 22
Joined: 2016-02-22T12:54:41-07:00
Authentication code: 1151

Re: montage problem

Post by guitarking123 »

Can I increase image size?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: montage problem

Post by fmw42 »

What do you mean by increase image size? Do you mean to magnify the image, i.e. make the whole image bigger at every pixel or just add a border around the image. To resize and image:

Code: Select all

convert image -resize WxH newimage
where W and H are the new image dimensions or can be percents. See http://www.imagemagick.org/script/comma ... php#resize and http://www.imagemagick.org/script/comma ... p#geometry

To add a border around an image:

Code: Select all

convert image -bordercolor somecolor -border X newimage
where X is the thickness of the border in pixels.
guitarking123
Posts: 22
Joined: 2016-02-22T12:54:41-07:00
Authentication code: 1151

Re: montage problem

Post by guitarking123 »

Thanks!!
Post Reply