cordova - Image took from gallery is displayed in different orientation while using phonegap in android -
i'm using sencha touch , phonegap display picture recorded camera. when taking picture on iphone via cordova2.7.0, picture drawn correct orientation. using samsung s3, picture leant -90°(only portrait images).
navigator.camera.getpicture(onphotourisuccess, onfail, { quality: 25, destinationtype: destinationtype.file_uri, targetwidth: 120, targeheight: 120, correctorientation: true, sourcetype: source }); i use above code take picture. portrait images took camera displays in correct orientation, issue happens portrait images took gallery. there way solve problem?
it solved issue adding parameter encodingtype. code looks like
var encodingtype = navigator.camera.encodingtype.png; var destinationtype = navigator.camera.destinationtype; var destinationtype = navigator.camera.destinationtype; var source = navigator.camera.picturesourcetype; navigator.camera.getpicture(onphotourisuccess, onfail, { quality: 50, destinationtype: destinationtype.file_uri, encodingtype: encodingtype.png, targetwidth: 120, targeheight: 120, correctorientation: true, sourcetype: source });
Comments
Post a Comment