您的位置:首页 > 其它

对Bitmap 进行水平或者垂直的镜面翻转

2017-04-28 12:01 537 查看
Matrix m = new Matrix();
if (i < 4)
m.setScale(-1, 1);//水平翻转
else
m.setScale(1, -1);//垂直翻转
int w = picture.getWidth();
int h = picture.getHeight();
//生成的翻转后的bitmap
Bitmap reversePic = Bitmap.createBitmap(picture.getPictureBitmap(), 0, 0, w, h, m, true);




内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: