summaryrefslogtreecommitdiffstats
path: root/jni/filters/contrast.c
diff options
context:
space:
mode:
Diffstat (limited to 'jni/filters/contrast.c')
-rw-r--r--jni/filters/contrast.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/jni/filters/contrast.c b/jni/filters/contrast.c
index b04e9364e..fbd9c7689 100644
--- a/jni/filters/contrast.c
+++ b/jni/filters/contrast.c
@@ -17,27 +17,9 @@
#include <math.h>
#include "filters.h"
-unsigned char clamp(int c)
-{
- int N = 255;
- c &= ~(c >> 31);
- c -= N;
- c &= (c >> 31);
- c += N;
- return (unsigned char) c;
-}
-
-int clampMax(int c,int max)
-{
- c &= ~(c >> 31);
- c -= max;
- c &= (c >> 31);
- c += max;
- return c;
-}
-
void JNIFUNCF(ImageFilterContrast, nativeApplyFilter, jobject bitmap, jint width, jint height, jfloat bright)
{
+ (void)obj;
char* destination = 0;
AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
unsigned char * rgb = (unsigned char * )destination;