ImageUtil.java 493 Bytes
Newer Older
李晓兵's avatar
李晓兵 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
package com.hand.face.utils;

import android.graphics.Bitmap;
import android.graphics.Matrix;

/**
 * Created by USER on 2016/12/10.
 */
public class ImageUtil {
    /**
     * 旋转图片
     */
    public static Bitmap getRotateBitmap(Bitmap b, float rotateDegree){
        Matrix matrix = new Matrix();
        matrix.postRotate((float)rotateDegree);
        Bitmap rotaBitmap = Bitmap.createBitmap(b, 0, 0, b.getWidth(), b.getHeight(), matrix, false);
        return rotaBitmap;
    }
}