Android Bitmap Rotate rotatePic(Bitmap bitmap, int degree)

Here you can find the source of rotatePic(Bitmap bitmap, int degree)

Description

rotate Pic

Declaration

public static Bitmap rotatePic(Bitmap bitmap, int degree) 

Method Source Code

//package com.java2s;

import android.graphics.Bitmap;

import android.graphics.Matrix;

public class Main {
    public static Bitmap rotatePic(Bitmap bitmap, int degree) {
        Matrix matrix = new Matrix();
        matrix.postRotate(degree);/* w  w  w .j av a  2 s .  com*/
        int width = bitmap.getWidth();
        int height = bitmap.getHeight();
        return Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix,
                true);
    }
}

Related

  1. rotate(Bitmap bitmap, int degree)
  2. rotateAndMirror(Bitmap b, int degrees, boolean mirror)
  3. rotateBitmap(Bitmap b, int degrees)
  4. rotateBitmap(Bitmap source, float angle)
  5. rotateBitmap(Bitmap source, int rotation, boolean recycle)
  6. rotation(Bitmap source, int degrees)
  7. GetRotatedBitmap(Bitmap bitmap, int degrees)
  8. computePictureRotation()
  9. GetExifOrientation(String filepath)