Rotate/Crop Image Layer over Image
Posted: 2018-04-01T05:41:37-07:00
Hey ya'll,
Given are 2 Images:
- (a) Background Image: https://i.imgur.com/dZGoHko.png
- (b) Image to overlay on the backgrorund image: https://i.imgur.com/We5n1Cj.png
I want to overlay Image (b) on top of Image (a). I also have given position info with roatation angle on where to put the Image (b) on (a).
Lets go with this position numbers:
- top: 40px
- left: 200px
- width: 40px
- height: 100px
- angle: 45°
So the result should look like this: https://i.imgur.com/fOlxg6Y.png
Currently i have this command:
With this command i get this unexcpected result: https://i.imgur.com/m0XqyAb.png
I think the problem is the gravity of the overlayed image. I dont want it to be rotated fom the top left corner.
It should be rotated from the center of the overlayed image position.
Any tips?
Also how could i crop the overlayed image before putting it on top of the background?
Thanks in advance!
Given are 2 Images:
- (a) Background Image: https://i.imgur.com/dZGoHko.png
- (b) Image to overlay on the backgrorund image: https://i.imgur.com/We5n1Cj.png
I want to overlay Image (b) on top of Image (a). I also have given position info with roatation angle on where to put the Image (b) on (a).
Lets go with this position numbers:
- top: 40px
- left: 200px
- width: 40px
- height: 100px
- angle: 45°
So the result should look like this: https://i.imgur.com/fOlxg6Y.png
Currently i have this command:
Code: Select all
convert background.png -draw "rotate 45 image Over 200,40 40,100 overlay.png" test.png
I think the problem is the gravity of the overlayed image. I dont want it to be rotated fom the top left corner.
It should be rotated from the center of the overlayed image position.
Any tips?
Also how could i crop the overlayed image before putting it on top of the background?
Thanks in advance!