I have a Phonegap application that uses the camera Cordova API to take a picture and upload it to my server upon successful capture. The only problem is that the quality of the image is too good. It will really be a problem when I reach a higher user count.
Here is my javascript:
function capture() {
navigator.camera.getPicture(cameraSuccess, cameraError, {
quality: 5,
destinationType: destinationType.FILE_URI,
sourceType : sourceType.CAMERA,
encodingType: encodingType.JPEG,
targetWidth: 300
});
}
The file being uploaded is about 240KB in size and more then 1200 pixels wide.
I tried adding the "quality" and "targetWidth" within the options to change the quality of the image, but to no avail.
Any help would be appreciated, thanks!