I am using Cordova 2.0 with a built-in camera plugin. My application contains many photos uploaded to the remote server, and I have to limit the file size on the phone side for bandwidth and performance.
I use the following camera settings to take new photos:
var options = { quality : 30, destinationType : navigator.camera.DestinationType.FILE_URI, targetWidth: 1600, targetHeight: 1200 }
This is great for photos taken with the phone, as they are usually larger than 1600x1200. However, when I upload an existing photo, I don’t want to scale the images smaller than the target resolution:
var options = { quality : 30, sourceType : navigator.camera.PictureSourceType.PHOTOLIBRARY, destinationType : navigator.camera.DestinationType.FILE_URI, targetWidth: 1600, targetHeight: 1200 };
In fact, I always want to avoid expansion. Any ideas on how to change the “zoom mode” of the camera plugin?
source share