Batch Script to Resize, Rotate, Overlay, Reposition and Crop Two Images

Do you need consulting from ImageMagick experts and are willing to pay for their expertise? Or are you well versed in ImageMagick and offer paid consulting? If so, post here otherwise post elsewhere for free assistance.
Post Reply
miaho
Posts: 2
Joined: 2015-07-18T08:58:13-07:00
Authentication code: 1151

Batch Script to Resize, Rotate, Overlay, Reposition and Crop Two Images

Post by miaho »

Hi,

I need a batch script for the following...

I have two images: photo.jpg and overlay.png

1] The photo.jpg needs to be resized from 3456x2304 to 2406x1604 and rotated 345 degrees

2] Then the overlay.png image needs to be placed over the distorted photo while using the center points of the original photo and the overlay as tie points and offset the overlay by X(-90) Y(-160)

3] Then the resulting image needs to be cropped to the the dimensions of the overlay.png file (1864x1228) and saved as photo_overlay.jpg

Please see images below:
Photo: https://www.dropbox.com/s/iprfjxohffhxq ... o.jpg?dl=0
Overlay: https://www.dropbox.com/s/frtliwkr426wn ... y.png?dl=0
Preview (not to scale): https://www.dropbox.com/s/60n2ohx9j90dy ... d.jpg?dl=0
Output (not to scale): https://www.dropbox.com/s/e353h26zhd579 ... y.jpg?dl=0

I'd be happy to pay, however I will need some idea of cost before we get stuck in.

Thanks
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Batch Script to Resize, Rotate, Overlay, Reposition and Crop Two Images

Post by snibgo »

You should also say what shell script language you need. Here it is in Windows BAT syntax:

Code: Select all

convert photo.jpg ^
  -resize "2406x1604^!" ^
  -rotate 345 ^
  overlay.png ^
  -gravity Center ^
  -geometry -90+160 ^
  +swap ^
  -compose DstOver -composite ^
  photo_overlay2.jpg
I have taken liberties with "-geometry" to match your sample instead of your text.

No charge.
snibgo's IM pages: im.snibgo.com
miaho
Posts: 2
Joined: 2015-07-18T08:58:13-07:00
Authentication code: 1151

Re: Batch Script to Resize, Rotate, Overlay, Reposition and Crop Two Images

Post by miaho »

That's absolutely perfect! Many thanks, but seriously "No Charge"? If you want to PM me your PayPal details, I'd be happy to make a donation. Thanks again!
Post Reply