SMF.Bitmap
has static functions for image processing. rotate
function will help you about your question.
Here is a sample code for you:
var img = new SMF.UI.Image({
name: "img",
image: "smartface.png",
left: "15%",
top: "20%",
width: "70%",
height: "10%",
imageFillType: SMF.UI.ImageFillType.ASPECTFIT
});
var btn = new SMF.UI.TextButton({
name: "btn",
text: "Rotate!",
onPressed: function() {
var myImageUri = "smartface.png";
var im = new SMF.Bitmap({
imageUri: myImageUri,
onSuccess: function(e) {
im.rotate({
angle: 90,
format: SMF.ImageFormat.PNG,
compressionRate: 0.7,
onSuccess: function(e) {
img.image = e.image;
},
onError: function(e) {
alert("Error: " + e.message);
}
});
},
onError: function(e) {
alert("Error: " + e.message);
}
});
},
left: "15%",
top: "70%",
width: "70%",
height: "10%"
});