aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-09-24 17:28:22 +0100
committerStruan Donald <struan@exo.org.uk>2013-09-24 17:28:22 +0100
commit0bbe826419e7712ef8fdfa917af1c12a866b0c32 (patch)
tree73f0ce70c788b38258894605771c91f15ac113ef /src
parente90734afa8b6759841f8cc59c6bc987302ae06ce (diff)
Reduce the size of the photos we use
This helps to stop crashes on Android when taking photos due to out of memory issues
Diffstat (limited to 'src')
-rw-r--r--src/js/views/photo.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/js/views/photo.js b/src/js/views/photo.js
index be4c1e2..f24207e 100644
--- a/src/js/views/photo.js
+++ b/src/js/views/photo.js
@@ -30,7 +30,10 @@
getOptions: function(isFromAlbum) {
var options = {
destinationType: Camera.DestinationType.FILE_URI,
- sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY
+ sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY,
+ correctOrientation: true,
+ targetHeight: 768,
+ targetWidth: 1024
};
if ( ! isFromAlbum ) {
@@ -41,7 +44,6 @@
// this helps with out of memory errors on iPhones but not on Android it seems
if ( ! FMS.isAndroid ) {
options.quality = 49;
- options.correctOrientation = true;
}
return options;