How to chop image in top or bottom?

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
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

How to chop image in top or bottom?

Post by agriz »

Code: Select all

convert: geometry does not contain image `input.jpg' @ warning/transform.c/ChopImage/225. ) 
I am getting this error if i use

Code: Select all

-gravity south -chop 0x10
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to chop image in top or bottom?

Post by fmw42 »

First, please always provide your IM version and platform!!!! Also your full command line. Please read the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620

If you want to split the image into top and bottom, you should use -crop

convert image.jpg -crop 100%x50% +repage image_%d.jpg

See http://www.fmwconcepts.com/imagemagick/ ... .php#crop1
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: How to chop image in top or bottom?

Post by agriz »

It is latest version of IM.

Code: Select all


convert \( image.png -background transparent -rotate -2 \) \( -clone 0 -shadow 80x2-20+20 \) \( -clone 1 -clone 0 -compose over -composite \) -delete 0-1 -gravity south -chop 0x10 output.png
Array ( [0] => convert: geometry does not contain image `image.png' @ warning/transform.c/ChopImage/225. )
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to chop image in top or bottom?

Post by fmw42 »

agriz wrote:It is latest version of IM.

Code: Select all


convert \( image.png -background transparent -rotate -2 \) \( -clone 0 -shadow 80x2-20+20 \) \( -clone 1 -clone 0 -compose over -composite \) -delete 0-1 -gravity south -chop 0x10 output.png
Array ( [0] => convert: geometry does not contain image `image.png' @ warning/transform.c/ChopImage/225. )

The latest version is continually changing. So that kind of answer is not useful to some one later on.

Add +repage between -delete 0-1 and -gravity south.
Post Reply