flip a Bitmap Image - Android Graphics

Android examples for Graphics:Bitmap Effect

Description

flip a Bitmap Image

Demo Code


//package com.book2s;

import android.graphics.Bitmap;

import android.graphics.Matrix;

public class Main {
    public static Bitmap flip(Bitmap src) {
        Matrix matrix = new Matrix();
        matrix.preScale(1.0f, -1.0f);// w  w w .j a  v  a 2s. c o m
        return Bitmap.createBitmap(src, 0, 0, src.getWidth(),
                src.getHeight(), matrix, true);
    }
}

Related Tutorials