Page 1 of 1

Is it possible to Crop and Composite at the same time?

Posted: 2013-08-07T13:57:16-07:00
by konstantin
Hi!

I am trying to place a small logo on my image by compositing and at the same time, cropping the background image at the top.
My command:

Code: Select all

convert background.jpg logo.png -crop 1024x624+0+54 -gravity South-East -gamma 1.2 -sampling-factor 1x1 -composite result.jpg 
Unfortunately I always get this error message:

Code: Select all

convert: geometry does not contain image `logo.png' @ warning/transform.c/CropImage/666.
What can I do to achieve my goal?

Re: Is it possible to Crop and Composite at the same time?

Posted: 2013-08-07T14:12:46-07:00
by snibgo
I expect your command would crop both your input images. You probably want something like:

Code: Select all

convert ( background.jpg -crop 1024x624+0+54 +repage ) logo.png -gravity South-East -gamma 1.2 -sampling-factor 1x1 -composite result.jpg

Re: Is it possible to Crop and Composite at the same time?

Posted: 2013-08-07T15:01:31-07:00
by konstantin
Oh, I see, Thx you very much.