如何旋转具有固定中心的合成图像? [英] How to rotate a composite image with fixed center?
本文介绍了如何旋转具有固定中心的合成图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以,我有这个背景图片:
So, I have this background image:
我有一个1px x 1px图像,我想覆盖它。如果我跑:
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
我明白了:
但我想用固定中心旋转它。预期结果应该是这样的:
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?
谢谢你。
推荐答案
查看@frostyterrier的评论我认为他的问题是他需要+扭曲并使用-distort?
Looking into the comment by @frostyterrier I think his problem is he needs +distort and is using -distort?
此页面应该有所帮助: http://www.imagemagick.org / Usage / distorts / #srt
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
这篇关于如何旋转具有固定中心的合成图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文