我想将图像旋转90度。我正在使用Nativescript-Vue,并且图像具有base64字符串的形式。我尝试了以下方法:
let newImage = new Image();
let imgSource = new ImageSource();
imgSource.fromBase64(base64string);
imgSource.rotationAngle = 90;
newImage.imageSource = imgSource;
newImage.rotate;
let newBase64 = newImage.imageSource;toBase64String("jpg");
这不起作用。我该如何解决?
答案 0 :(得分:0)
如果可以的话,我建议您在CSS中旋转图片
.myBtn {
transform: rotate(15deg);
}