sindoki
3 Sep 2012, 10:05 PM
Hello! Here is a problem...
I try to get a picture in my application. Here is the code:
Ext.device.Camera.capture({
source: 'album',
success: function (image) {
console.log("Success!");
var imageView = Ext.getCmp('imageEditField');
var imgSrc = "data:image/jpeg;base64," + image;
imageView.setSrc(imgSrc);
},
failure: function () {
console.log('failure', arguments);
},
config: {
quality: 75,
scope: this,
destination: 'data',
encoding: 'jpg',
height: "auto",
width: 90
}
}
);
This code invokes a file browser to pick a picture. And if I choose rather small picture, it works fine, but on a large one the application crashes. It's not related to the code of Success function, it fails before.
Is it a memory usage issue or something else? How can I fix it?
Will appreciate any advice. Thanks.
I try to get a picture in my application. Here is the code:
Ext.device.Camera.capture({
source: 'album',
success: function (image) {
console.log("Success!");
var imageView = Ext.getCmp('imageEditField');
var imgSrc = "data:image/jpeg;base64," + image;
imageView.setSrc(imgSrc);
},
failure: function () {
console.log('failure', arguments);
},
config: {
quality: 75,
scope: this,
destination: 'data',
encoding: 'jpg',
height: "auto",
width: 90
}
}
);
This code invokes a file browser to pick a picture. And if I choose rather small picture, it works fine, but on a large one the application crashes. It's not related to the code of Success function, it fails before.
Is it a memory usage issue or something else? How can I fix it?
Will appreciate any advice. Thanks.