Load Flipped Vertical Bitmap - Android Graphics

Android examples for Graphics:Bitmap Transform

Description

Load Flipped Vertical Bitmap

Demo Code


//package com.java2s;
import android.graphics.Bitmap;
import android.graphics.Matrix;

public class Main {
    public static Bitmap LoadFlippedVertical(Bitmap src) {
        Matrix matrix = new Matrix();
        matrix.preScale(1.0f, -1.0f);//from   w w  w . j av a2 s .c  om
        return Bitmap.createBitmap(src, 0, 0, src.getWidth(),
                src.getHeight(), matrix, true);
    }
}

Related Tutorials