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

    public ImageFilterVibrance() {
        mName = "Vibrance";
    }

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

    @Override
    public void apply(Bitmap bitmap) {
        int w = bitmap.getWidth();
        int h = bitmap.getHeight();
        int p = mParameter;
        float value = p;
        nativeApplyFilter(bitmap, w, h, value);
    }
}