@Nullable
    public static Bitmap rotateBitmap(@Nullable final Bitmap bm, final float angleInDegree) {
        if (bm == null || angleInDegree == 0f || angleInDegree % 360 == 0f) {
            return bm;
        }
        final int h = bm.getHeight();
        final int w = bm.getWidth();
        final Matrix matrix = new Matrix();
        matrix.postRotate(angleInDegree); //, w / 2f, h / 2f);
        return Bitmap.createBitmap(bm, 0, 0, w, h, matrix, true);
    }
transforms an ImageView in a zoomable, pinchable ImageView. This method uses Loupe under the hood
@param activity activity where the view resides in
@param imageView imageView to make zoomable/pinchable
@param imageContainer container around the imageView. See loupe doc for details
@param onFlingUpDown optional: action to happen on fling down or fling up
@param onSingleTap optiona: action to happen on single tap. Note that this action is registered / exceuted for whole activity
main/src/main/java/cgeo/geocaching/utils/ImageUtils.java