How to create a single image from an overlay image and a picture taken with the iPhone?

There are many applications that do this ... but I am curious what proposed methods exist to create the highest quality image.

An example of what I want to do:

  • Ability to overlay a mustache image on top of the iPhone camera.
  • It is not necessary to be able to resize / rotate this image.
  • Take a picture and overlay on the image (mustache in case) to create one image.

Many thanks.

+3
source share
1 answer

. 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();
+1

Source: https://habr.com/ru/post/1769683/


All Articles