I use the Cordova 2.6 Camera plugin to receive images from the device gallery, I get them with base64 encoding, and I tried to compress them to a lower quality using the "quality" option.
I noticed that compression does not work, and when I read the Cordoba documentation at https://github.com/apache/cordova-plugin-camera/blob/master/doc/index.md , I can read:
NOTE. The resolution of photos on new devices is not bad. selected photos from the deviceβs gallery are not reduced to a lower quality , even if the quality parameter is specified. To avoid shared memory issues, set Camera.destinationType to FILE_URI, not DATA_URL.
In my case, I can only use DATA_URL, since I use base64 encryption to upload an image with a third-party web service. I also use only images from the device gallery (not from the camera itself). I have performance problems, mainly on Windows Phone. My application takes too long to process base64 data due to image size (I am testing large images stored in the device gallery but which were captured using a 5 megapixel or 8 megapixel telephone camera).
My question is, is there a solution to get the "quality" parameter that works for gallery photos in the Cordoba plugin?
Is there any custom plugin or plug where we can compress photos of the device gallery?
Is there any other alternative that you offer? (for example, a custom native plugin that uses FILE_URI and returns compression of a compressed base64 image)
WiPhone
source share