Rotating image in 30, 45,60,75 ,90,120, 180, 270 ,360 degree depend upon angle provided in android. Image rotation in android
Rotating image in 30, 45,60,75 ,90,120, 180, 270 ,360 degree depend upon angle provided in android.
Image rotation in android
//pass bitmap of image and angle to rotate
public static Bitmap RotateBitmap(Bitmap source, float angle) { Matrix matrix = new Matrix(); matrix.postRotate(angle); Bitmap rotatedImg = Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), matrix, true); source.recycle(); return rotatedImg; }
Comments
Post a Comment