0
convert 'a.png' \
\( -background none -geometry 100x100+150+50! -rotate 5 'b.png' \) \
-composite 'a.png';

This is a simple script to rotate and place an image b on top of image a. My problem is that image b is being rotated within the defined area (100x100):

bad

How do I rotate the whole image frame as such:

good

Or, put it simple:

enter image description here

  1. is the original picture (a) with (b) picture on top of it
  2. picture two is how im rotates the (b) picture
  3. is how I need the picture rotated
4

1 回答 1

0

在 Freenode 社区的帮助下,答案如下:

convert 'a.png' \( 'b.png' -resize 100x100 -rotate 50 \) -geometry +100+50 -composite 'a.png';

问题是-geometry将旋转的元素限制在指定的尺寸。

于 2012-11-09T20:20:24.303 回答