summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/filters/ImageFilterBWRed.java
blob: 19b3c6b3ad5671e7512c45e9fc5345e9ce1d2963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

package com.android.gallery3d.filtershow.filters;

import android.graphics.Bitmap;

public class ImageFilterBWRed extends ImageFilter {

    public ImageFilterBWRed() {
        mName = "Black & White (Red)";
    }

    native protected void nativeApplyFilter(Bitmap bitmap, int w, int h);

    @Override
    public Bitmap apply(Bitmap bitmap, float scaleFactor, boolean highQuality) {
        int w = bitmap.getWidth();
        int h = bitmap.getHeight();
        nativeApplyFilter(bitmap, w, h);
        return bitmap;
    }

}