Android Bitmap Rotate RotateBitmap(Bitmap source, float angle)

Here you can find the source of RotateBitmap(Bitmap source, float angle)

Description

Rotate Bitmap

Declaration

public static Bitmap RotateBitmap(Bitmap source, float angle) 

Method Source Code

//package com.java2s;

import android.graphics.Bitmap;

import android.graphics.Matrix;

public class Main {
    public static Bitmap RotateBitmap(Bitmap source, float angle) {
        Matrix matrix = new Matrix();
        matrix.postRotate(angle);//w w w. ja  va2s . c o m
        return Bitmap.createBitmap(source, 0, 0, source.getWidth(),
                source.getHeight(), matrix, true);
    }
}

Related

  1. rotateBitmap(Bitmap b, int degrees)
  2. getRotatedBitmap(Bitmap bitmap, int degrees)
  3. rotateBitmap(Bitmap bitmap, float degrees)
  4. rotateBitmapTranslate(Bitmap bitmap, float degrees)
  5. createRotatedBitmap(Bitmap bm, float degree)