Page 1 of 1

How to chop image in top or bottom?

Posted: 2016-08-22T22:10:34-07:00
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

Re: How to chop image in top or bottom?

Posted: 2016-08-22T22:25:04-07:00
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

Re: How to chop image in top or bottom?

Posted: 2016-08-23T09:19:28-07:00
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. )

Re: How to chop image in top or bottom?

Posted: 2016-08-23T09:35:48-07:00
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.