Skip to content

Instantly share code, notes, and snippets.

View tomogoma's full-sized avatar

Tom Ogoma tomogoma

  • Nairobi, Kenya
View GitHub Profile
@tomogoma
tomogoma / ImageRotator.java
Created March 18, 2017 08:25
Android code to rotate an image based on exif information
// imports
public class ImageRotator {
public static Bitmap rotateImage(String path) throws IOException {
Bitmap bitmap = BitmapFactory.decodeFile(path);
return rotateImage(bitmap);
}
public static Bitmap rotateImage(Bitmap bitmap) throws IOException {
int rotate = 0;