Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
Can someone push me to the correct docs to read for this? I am getting ready to make some new additions to my tourist app for the Danish town I live in. I thought it would be fun to add a camera feature that would overlay a photo of a Viking helmet. Then you line up your subject under it and snap a photo.

I have not worked with the camera object before and then trying to combined the photo taken with an overlay and saving to the photo album.

I assume this is possible so I thought about reading some doc's on the subject starting with the camera. But if anyone has a better idea for me to start researching to save some time looking around I would be thankful.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
Start with UIImagePickerController.h and cameraOverlayView. Your helmet image will have to be partly transparent. Use an imageView as your overlay view, with the transparent helmet image.

Compositing on the camera and compositing on the resulting image are different. To generate the resulting image draw the camera image into an image context then draw the overlay image into the image context. Save the image from the context as a jpeg.
 

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
Ahhh, thanks for detailing that out for me. Now I have a plan of attack for this project this weekend. It's always fun learning new things!
 

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
Thanks Jnoxx, I think I want to try and tackle this project myself so I can learn the tools and be a better programmer. But I am sure I will have questions. I thought it would be a fun addition to the app for tourists here as well as a nice challenge for myself.

As I run into problems I will let you guys know!

Thanks!
 

larswik

macrumors 68000
Original poster
Sep 8, 2006
1,552
11
Good to know. This site has been a great resource for me for my projects and learning.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.