Image Overlay on Live Camera

Hi all,

I've been searching this form and the internet for an answer to this for some time now but just cannot find any solid leads on it.

Basically what I'm hoping to create is an application which lets you take a picture on your device camera, with an image (local image file) overlaid on the top. So similar to Snapchat's face detection filters, but just a static image.

So I need to be able to render a live view of the camera AND the overlay on the content page/view and then when the "take" button is used, the image is saved to the camera roll/library with the overlay rasterised. Also I need to be able to perform this on both iOS and Android, but since I haven't been able to find any sort of plugin or library to do this, I'm guessing using the Dependency Service is my best chance.

If anyone could point me in the right direction for achieving this, that would be greatly appreciated.

Answers

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai

    @logicallysynced,

    I don't know of a plugin that will give you all this. Instead, you would need to use some native features of each platform to do what you want. The first step in this is to get a renderer for handling the camera view inside the app. Take a look at this guide for a quick sample on getting that to work. In that guide you are using some native features for showing a live feed from the camera. Next, you'll want to research some ways to work with those native APIs. For example, on iOS, you would wan't to find out how to show an image on top of AVCaptureSession.

  • logicallysyncedlogicallysynced AUMember

    Thanks @JohnMiler, unfortunately I think that sample is a bit out of date since a lot of the code seems to be depreciated in iOS10 and just causes random crashes whenever I try to piece it together.

    I shall continue investigating CustomRenderers though.

  • Bump. Has there been any progress made on this? It seems like a nice piece of functionality to have!

  • DevLawDevLaw Member ✭✭

    I also need to achieve the above image.

Sign In or Register to comment.