private Bitmap convertBitmap(Bitmap srcBitmap){
int width = srcBitmap.getWidth();
int height = srcBitmap.getHeight();
Bitmap newBitmap = Bitmap.createBitmap(width,height, Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas();
Matrix matrix = new Matrix();
matrix.postScale(-1,1);
Bitmap newBitmap2 = Bitmap.createBitmap(srcBitmap,0,0,width,height,matrix,true);
canvas.drawBitmap(newBitmap2,
new Rect(0,0,width,height),
new Rect(0,0,width,height),null);
return newBitmap2;
}
Bitmap镜像
转载上一篇:Android 屏幕横竖切换详解
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章