Skip to content Skip to sidebar Skip to footer

To Show A Thumbnail Of Photo That I Took-phonegap

I'm trying to create a thumbnail of the photo that I take with the camera but I've failed, someone can give me an idea? I'm working with PhoneGap, javascript, html and css

Solution 1:

Try this:

$('#button').click(function(){
    navigator.camera.getPicture(
        function(imageURI){
            $('img').attr('src',imageURI).css({'background-size':  '100%', 'background-repeat': 'no-repeat', 'width': '100px'});
        },
        function(message) { alert('Get picture failed'); },
        { quality: 60, 
        destinationType: navigator.camera.DestinationType.FILE_URI, 
        sourceType: navigator.camera.PictureSourceType.CAMERA,
        mediaType: Camera.MediaType.PICTURE,
        correctOrientation: true  }
        );
});

Post a Comment for "To Show A Thumbnail Of Photo That I Took-phonegap"