Closed onigetoc closed 2 weeks ago
I dont't know if it's still relevant to you.
The option to choose from camera OR photo library is achieved if you replace the CameraSource type.
const photo = await Camera.getPhoto({quality: 90, allowEditing: true, resultType: CameraResultType.Uri, source: CameraSource.Camera});
Replace source: CameraSource.Camera
with source: CameraSource.Prompt
and it should work.
I didn't test it with ImageToText but as this is the capacitor way to prompt the user between camera and library i am guessing this should work as you are wishing.
Documentation on this is here: https://capacitorjs.com/docs/apis/camera#getphoto
Is your feature request related to a problem? Please describe. In Tesseract you have this.getPicture(this.camera.PictureSourceType.PHOTOLIBRARY); this.getPicture(this.camera.PictureSourceType.CAMERA); But nothing here from capacitor.
Describe the solution you'd like Options to choose from photo from Camera or/and Photo Library. And adding base64 images.