Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Bitmap rotate(Bitmap bitmap, int degree) {
- int w = bitmap.getWidth();
- int h = bitmap.getHeight();
- if(w > h){
- Matrix mtx = new Matrix();
- mtx.postRotate(degree);
- Bitmap bmp = Bitmap.createBitmap(bitmap, 0, 0, w, h, mtx, true);
- return bmp;
- }
- return bitmap;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement