How to rotate a composite image with fixed center?

我怕爱的太早我们不能终老 提交于 2019-12-24 14:29:50

问题


So, I have this background image:

And I have a 1px x 1px image that I want to overlay on that. If I run:

convert bg.png \( -size 80x240 -background none -rotate 30 -geometry +120+88 tile:red.png \) -composite result.png

I get this:

But I want to rotate it with fixed center. The expected result should be something like this:

Do you know how can I accomplish that?

Thank you.


回答1:


Looking into the comment by @frostyterrier I think his problem is he needs +distort and is using -distort?

This page should help: http://www.imagemagick.org/Usage/distorts/#srt

Rotate an image and have a transparent background

convert input.jpg -background none -virtual-pixel background +distort ScaleRotateTranslate 30 output.png


来源:https://stackoverflow.com/questions/15071640/how-to-rotate-a-composite-image-with-fixed-center

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!