[Camera Plugin] In the preview of the camera plugin, the quality is very low compared to the photo
Forge component 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?

Solution

Hi guys! I just want you to know that we've listened to your feedback and we've addressed some limitations of the Camera Plugin. So starting from V7.0.1 of this plugin (now booked as under development on Forge), you can define the Quality, Width, Height, and Encoding Type (JPEG, PNG) of your photos just by selecting/defining the properties of the TakePicture action. 


In addition, we've created two new blocks that should appear on the widget's panel after you install the new version of the plugin. These blocks hugely accelerate the implementation of "Take Picture" or "Choose from Gallery" actions. Likewise, you can define the properties of these blocks to choose the image quality parameters that suit you better.

 

Have a look at the new documentation page of the Camera plugin for more information on these new features.

Please, try out this version by going on the versions tab of Forge and downloading V7.0.1, and let us know what you think. We should be passing this version to stable in a couple of weeks. 

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!

Solution

Hi guys! I just want you to know that we've listened to your feedback and we've addressed some limitations of the Camera Plugin. So starting from V7.0.1 of this plugin (now booked as under development on Forge), you can define the Quality, Width, Height, and Encoding Type (JPEG, PNG) of your photos just by selecting/defining the properties of the TakePicture action. 


In addition, we've created two new blocks that should appear on the widget's panel after you install the new version of the plugin. These blocks hugely accelerate the implementation of "Take Picture" or "Choose from Gallery" actions. Likewise, you can define the properties of these blocks to choose the image quality parameters that suit you better.

 

Have a look at the new documentation page of the Camera plugin for more information on these new features.

Please, try out this version by going on the versions tab of Forge and downloading V7.0.1, and let us know what you think. We should be passing this version to stable in a couple of weeks. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.