Khemraj Udaipur
Khemraj Udaipur

Reputation: 19

How Capture image using camera 'Circle' overlay and Save it on path in Xamarin.forms (Android)

I am new in xamarin.forms and i wants to make a app using xamarin.forms for capture a image and save in given path. i also want add Camera Overlay to crop image in Circle shape. I have found below sample project-

'https://github.com/CrossGeeks/OverlaySample'

and modified it to add button in common project and call capture event using rendering. capture event successfully fire but image capturing not working because of 'SurfaceView' in above sample.

Please help- How to capture image using 'SurfaceView'.

Thanks in advance.

Upvotes: 0

Views: 1083

Answers (1)

Leo Zhu
Leo Zhu

Reputation: 14981

SurfaceView is in used in the native Android, you could create a customview that include an surfaceview in android project,then create a custom viewrenderer and SetNativeControl(your customview) your could refer to the CameraPreviewRenderer ,NativeCameraPreview classes in android project and CameraPreview class in forms project.You can refer to SurfaceView for more information and a sample for using surfaceview

Upvotes: 0

Related Questions