blob: 5117f60bc73086d2b7246ee76650f534f1f7d211 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package com.android.gallery3d.filtershow.filters;
import android.graphics.Bitmap;
public class ImageFilterContrast extends ImageFilter {
public ImageFilterContrast() {
mName = "Contrast";
}
native protected void nativeApplyFilter(Bitmap bitmap, int w, int h, float strength);
@Override
public Bitmap apply(Bitmap bitmap, float scaleFactor, boolean highQuality) {
int w = bitmap.getWidth();
int h = bitmap.getHeight();
float p = mParameter;
float value = p;
nativeApplyFilter(bitmap, w, h, value);
return bitmap;
}
}
|