rotateImage

open fun rotateImage(imageToOrient: Bitmap, degreesToRotate: Int): Bitmap

This is an expensive operation that copies the image in place with the pixels rotated. If possible rather use getOrientationMatrix, and put that as the imageMatrix on an ImageView.

Return

The oriented bitmap. May be the imageToOrient without modification, or a new Bitmap.

Parameters

imageToOrient

Image Bitmap to orient.

degreesToRotate

number of degrees to rotate the image by. If zero the original image is returned unmodified.