Java tutorial
//package com.java2s; //License from project: Open Source License import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; public class Main { public static Bitmap getRotatedBitmap(byte[] bildDaten) { Bitmap result = BitmapFactory.decodeByteArray(bildDaten, 0, bildDaten.length); if (result.getWidth() > result.getHeight()) { Matrix m = new Matrix(); m.postRotate(90); result = Bitmap.createBitmap(result, 0, 0, result.getWidth(), result.getHeight(), m, true); } return result; } }