In my xamarin.forms app, I have a custom camera view with circle overlay. I can able to take picture in both android and iOS.The difficulty I am facing is I need to rename the taken image into some specific format which contain the picture taken date time. But I am unable to rename the taken picture on both android and iOS.
In iOS,inside my native cameraview, I can get the captured image like this.
var videoConnection = stillImageOutput.ConnectionFromMediaType(AVMediaType.Video);
var sampleBuffer = await stillImageOutput.CaptureStillImageTaskAsync(videoConnection);
var jpegData = AVCaptureStillImageOutput.JpegStillToNSData(sampleBuffer);
var photo = new UIImage(jpegData);
The photo
contains captured image on iOS.
How can I rename this image? Any help is appreciated.