views:

111

answers:

2

There are countless apps out there that do this ... but I'm curious as to what suggested way(s) exists for producing the highest quality image.

Example of what I'm looking to do:

  1. Be able to overlay an image of a mustache on top of the iPhone's camera.
  2. Optional be able to resize/rotate that image.
  3. Take a picture and superimpose the overlayed image (the mustache in the case) on the picture so a single image is produced.

Thanks much.

+1  A: 

This, this, this and this might help you.

Zabba
A: 

Here is an article on overlaying an image on the camera. http://mobile-augmented-reality.blogspot.com/2009/09/overlaying-views-on-uiimagepickercontro.html. Also, for rotating and resizing the mustache look at this http://icodeblog.com/2010/10/14/working-with-uigesturerecognizers/. After that, you can use the resulting UIImage from the code below for whatever you need. Change self.view to the camera view.

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