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);//from w  w w . jav  a2s .  c  om

        return Bitmap.createBitmap(source, 0, 0, source.getWidth(),
                source.getHeight(), matrix, true);
    }
}

Related

  1. fixBitmapOrientation(Uri uri, Bitmap bmp)
  2. rotate(Bitmap b, int degrees)
  3. rotate(Bitmap bitmap, int degree)
  4. rotateAndMirror(Bitmap b, int degrees, boolean mirror)
  5. rotateBitmap(Bitmap b, int degrees)
  6. rotateBitmap(Bitmap source, int rotation, boolean recycle)
  7. rotatePic(Bitmap bitmap, int degree)
  8. rotation(Bitmap source, int degrees)
  9. GetRotatedBitmap(Bitmap bitmap, int degrees)