//bmp就是你要轉的圖片 nRotate是你要的角度 ,W寬,H高
private BitmapgetImageProcess(Bitmap bmp, int nRotate, int viewW, int viewH){
Matrix matrix = new Matrix();
matrix.postRotate(nRotate);
Bitmap rotateBitmap = Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(), bmp.getHeight(), matrix, true);
Bitmap resize = Bitmap.createScaledBitmap(rotate Bitmap, viewW, viewH, true);
return resize;
}
全站熱搜
留言列表