【问题标题】:How to create a single image from an overlayed image and a picture taken with iPhone?如何从叠加图像和用 iPhone 拍摄的照片创建单个图像?
【发布时间】:2010-10-15 05:06:51
【问题描述】:

有无数的应用程序可以做到这一点......但我很好奇有什么建议的方法来生成最高质量的图像。

我想要做的示例:

  1. 能够在 iPhone 的摄像头上叠加一张小胡子图像。
  2. 可以选择调整/旋转该图像的大小。
  3. 拍摄一张照片并将叠加的图像(在案例中为胡须)叠加在图片上,以便生成单个图像。

非常感谢。

【问题讨论】:

标签: iphone graphics ios4 camera


【解决方案1】:

这是一篇关于在相机上叠加图像的文章。 http://mobile-augmented-reality.blogspot.com/2009/09/overlaying-views-on-uiimagepickercontro.html。此外,要旋转和调整胡须的大小,请查看http://icodeblog.com/2010/10/14/working-with-uigesturerecognizers/。之后,您可以根据需要使用下面代码中生成的 UIImage。将 self.view 更改为相机视图。

UIGraphicsBeginImageContext(self.view.bounds.size);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *screenShot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多