blob: 24699a2a2bd7e8c87352147629bdec3644bbcae9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package com.android.gallery3d.filtershow.filters;
import android.graphics.Bitmap;
public class ImageFilterVignette extends ImageFilter {
public ImageFilterVignette() {
mName = "Vignette";
}
native protected void nativeApplyFilter(Bitmap bitmap, int w, int h, float strength);
public void apply(Bitmap bitmap) {
int w = bitmap.getWidth();
int h = bitmap.getHeight();
float p = mParameter;
float value = p / 100.0f;
nativeApplyFilter(bitmap, w, h, value);
}
}
|