EddyVerbruggen / nativescript-plugin-firebase

:fire: NativeScript plugin for Firebase
https://firebase.google.com
MIT License
1.01k stars 444 forks source link

Programmatically save image on face detection #1289

Open VjspOMMER opened 5 years ago

VjspOMMER commented 5 years ago

I would like to save the picture (base64) once certain conditions are met on the detected face result. However, the image doesn't seem to be available as part of onFaceDetectionResult event.

How could I achieve that behavior? It would be great to have an optional parameter on the component to expose original image as part of results.

Thanks the awesome work!

wimva commented 5 years ago

Another option would be a method to capture an image from the camera stream?

wimva commented 5 years ago

Found something;

You can access e.object.lastVisionImage;

Then create an ImageSource from it like this:

const bmp = e.object.lastVisionImage.getBitmap();
const source = new ImageSource();
source.setNativeSource(bmp);
kriefsacha commented 2 years ago

This is working for me on android but not on IOS @wimva , you found something ?