简体   繁体   English

旋转和调整CIImage的大小

[英]Rotating and Resizing CIImage

I have two CIImages. 我有两个CIImage。 I'm trying to apply a CGAffineTransformation to the top image, and then pass it through along with the background image to the CIFilter for blending, but my resulting image seems to show the top image moving around (I just want it rotated on the spot). 我正在尝试将CGAffineTransformation应用于顶部图像,然后将其与背景图像一起传递到CIFilter进行混合,但是我得到的图像似乎显示顶部图像在移动(我只是希望它在原地旋转)。

I'm also having the same problem when scaling (the position of the top image seems to change). 缩放时我也遇到了同样的问题(顶部图像的位置似乎发生了变化)。

What am I missing? 我想念什么?

So after lots of digging, turns out my problem was due to the rotation point. 因此,经过大量挖掘,原来我的问题是由于旋转点造成的。 This question/answer helped a lot. 这个问题/答案很有帮助。

CGContext rotation CGContext旋转

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM