1. #1
    Sencha User
    Join Date
    Sep 2012
    Location
    India
    Posts
    19
    Vote Rating
    0
    Vishwastalule is on a distinguished road

      0  

    Default Unanswered: how to set image captured by camera using setHTML mehtod in ST 2.1?

    Unanswered: how to set image captured by camera using setHTML mehtod in ST 2.1?


    I want to set image captured by camera using
    Code:
    'button[action=Start_Cam]':{
                    tap:function(){
    
    
                        Ext.device.Camera.capture({
                            source: 'camera',
                            destination: 'data',
    
    
                            success: function(image) {
                                var imageView=Ext.getCmp('capturedImage');
    
    
                                imageView.setHtml('<img id="get_captured_image" src='+image+' height=auto; width=auto;>'+'</img>' );
    
    
    
    
    
    
                                Ext.getCmp('start_button').setHidden(true) ;
    
    
                                Ext.getCmp('detect_face').setHidden(false);
                            },
                            failure: function() {
                                Ext.Msg.alert('Error', 'There was an error when acquiring the picture.');
                            },
                            scope: this
                        });
                    }
                }

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Answers
    3462
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Haven't used the camera in a long time, does the string data have 'data:image/png;base64,' at the start?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    Boise, Idaho
    Posts
    84
    Answers
    3
    Vote Rating
    13
    PhilMerrell will become famous soon enough

      0  

    Default


    I assume you are somehow deploying this to a native app via phonegap or native packager. If so this works for me (just tested):

    Code:
    Ext.device.Camera.capture({    
        source: 'camera',
        destination: 'file',
        success: function(url) {
            
            var userImageContainer = Ext.ComponentQuery.query('#userImageContainer')[0];
            userImageContainer.setHtml('<img src="'+url+'" width="100%" />');
        }
    });

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi