summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/filters/ImageFilterBW.java
blob: bdbd1d535dea64051678b3a2b6f3cab6c029a471 (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 ImageFilterBW extends ImageFilter {

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

    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;
    }

}