[Camera Plugin] In the preview of the camera plugin, the quality is very low compared to the photo

Forge Component
(25)
Published on 25 Oct by OutSystems R&D
25 votes
Published on 25 Oct by OutSystems R&D

When you call the Camera with the plugin you get redirected and active the camera. After you take a picture you are sent to a sort of preview screen where you can either "Ok" or "Decline" the picture. The problem is that the quality of this preview is much lower than the camera itself or the attachment after it has been downloaded.

I've already tried the quality = 100 and i've given the photo a width and height of 2000 each. Does anybody know how I can do this for the preview photo as well?

Hello,

I couldn't simulate that but found something you can try, try changing the destinationType parameter just like the image:

I found this information at https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/


Hope this helps!

Luis Fernando wrote:

Hello,

I couldn't simulate that but found something you can try, try changing the destinationType parameter just like the image:

I found this information at https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/


Hope this helps!

Hi Luis, 

I tried to change the parameter and used "File_URI" however the problem still persists. To maybe give a bit more context:

This is how it looks before I take a picture (Native Camera)

This is the preview:

This is how it will be saved to the database:

Bart van Orizande wrote:

Luis Fernando wrote:

Hello,

I couldn't simulate that but found something you can try, try changing the destinationType parameter just like the image:

I found this information at https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/


Hope this helps!

Hi Luis, 

I tried to change the parameter and used "File_URI" however the problem still persists. To maybe give a bit more context:

This is how it looks before I take a picture (Native Camera)

This is the preview:

This is how it will be saved to the database:

Hi,

After the change, did you e generate a new apk? sometimes you need to generate the apk again.

Anyway, you can try to create your own visualization screen. Try to use this component: https://www.outsystems.com/forge/component-overview/1985/camera-preview-plugin-multi-platform


Use the StartCameraPreview function to prepare the camera, after that use the TakePicture function.
You can find some functions in the following link: https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview

Make sure to add this to your css in the screen you want to use this plugin:

html, body {  
background-color: transparent;

}


Hope this helps!