1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    2
    Vote Rating
    0
    semheethaar is on a distinguished road

      0  

    Default Unanswered: Ext.device.Camera.capture Image size problem

    Unanswered: Ext.device.Camera.capture Image size problem


    Hello,
    If I use Ext.device.Camera.capture with sencha packaging i can't control the image size, I just get a small image from the device camera. This doesn't happen when packaging with phonegap. Is this a known issue or am I doing something wrong?
    Also: the returned image is a jpg , not the requested png..
    the code I use:

    Code:
    Ext.device.Camera.capture({
    source: 'camera', success: function(image)
    console.log('new picture:'+ 300 +':'+ 300); field.setValue(image)
    }
    failure: function(){
    console.log('failure', arguments);
    }
    }, this,//scope 'data',//destination 'png',//encoding: 300,//width 300 //height );
    Last edited by semheethaar; 30 Jul 2012 at 4:50 AM. Reason: forgot comma

  2. #2
    Sencha User
    Join Date
    Jul 2012
    Posts
    1
    Vote Rating
    0
    Attila Bakos is on a distinguished road

      0  

    Default png fix

    png fix


    If you put all the options into the first object (where you defined source/success/failure), then you'll get a png, but I don't know how to fix the image size problem. I get a 160x100 image from the Android Emulator, and I also tested it on an Xperia Mini Pro, where I got a 320x240 image. It totally ignored the width & height I specified. However, the encoding and quality options do work.

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    2
    Vote Rating
    0
    semheethaar is on a distinguished road

      0  

    Default re: png-fix

    re: png-fix


    Well, if i add the options to the object, i can get a png image, however if i add the quality, the app crashes.

    It seems to ignore width and height here as well...

  4. #4
    Ext JS Premium Member schtoeffel's Avatar
    Join Date
    Feb 2011
    Location
    Frauenfeld, Switzerland
    Posts
    5
    Vote Rating
    0
    schtoeffel is on a distinguished road

      0  

    Default Solution ?

    Solution ?


    I experience the same issue. Did anyone solve this?

  5. #5
    Sencha Premium Member
    Join Date
    Feb 2013
    Posts
    8
    Vote Rating
    0
    trj is on a distinguished road

      0  

    Default


    I'm running into this problem too. The image height and width are completely ignored on native android devices.

  6. #6
    Ext JS Premium Member schtoeffel's Avatar
    Join Date
    Feb 2011
    Location
    Frauenfeld, Switzerland
    Posts
    5
    Vote Rating
    0
    schtoeffel is on a distinguished road

      0  

    Default


    have you tried packing your app with phonegap?

  7. #7
    Sencha Premium Member
    Join Date
    Feb 2013
    Posts
    8
    Vote Rating
    0
    trj is on a distinguished road

      0  

    Default


    We're a large company and 100% Sencha shop. For a variety of reasons PhoneGap is not an option for us at this time. Although it can solve some issues with native devices, it opens up a lot of other issues as well. Anyway, thanks for the suggestion, we're looking for a Sencha solution if possible though.