1 extern "C" 2 { 3 void Backlight(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat backlight); 4 void Blur(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat scale); 5 void ColorTemp(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat scale); 6 void Copy(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 7 void CrossProcess(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 8 void Duotone(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jint color1, jint color2); 9 void Fisheye(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat focus_x, jfloat focus_y, jfloat scale); 10 void FlipHorizontal(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 11 void FlipVertical(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 12 void FlipBoth(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 13 void Grain(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat noise_scale); 14 void Grayscale(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat scale); 15 void HEQ(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat scale); 16 void Negative(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 17 void Quantize(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 18 void RedEye(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jobjectArray redeye_positions, jfloat radius, jfloat intensity); 19 void Saturation(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat scale); 20 void Sepia(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 21 void Sharpen(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat scale); 22 void Tint(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jint tint); 23 void Vignetting(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat range); 24 void Warmify(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 25 void WhiteBlack(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat white, jfloat black); 26 }; 27 28 typedef void (*pBacklightType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat backlight); 29 typedef void (*pBlurType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat scale); 30 typedef void (*pColorTempType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat scale); 31 typedef void (*pCopyType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 32 typedef void (*pCrossProcessType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 33 typedef void (*pDuotoneType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jint color1, jint color2); 34 typedef void (*pFisheyeType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat focus_x, jfloat focus_y, jfloat scale); 35 typedef void (*pFlipHorizontalType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 36 typedef void (*pFlipVerticalType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 37 typedef void (*pFlipBothType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 38 typedef void (*pGrainType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat noise_scale); 39 typedef void (*pGrayscaleType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat scale); 40 typedef void (*pHEQType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat scale); 41 typedef void (*pNegativeType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 42 typedef void (*pQuantizeType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 43 typedef void (*pRedEyeType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jobjectArray redeye_positions, jfloat radius, jfloat intensity); 44 typedef void (*pSaturationType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat scale); 45 typedef void (*pSepiaType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 46 typedef void (*pSharpenType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat scale); 47 typedef void (*pTintType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jint tint); 48 typedef void (*pVignettingType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat range); 49 typedef void (*pWarmifyType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap); 50 typedef void (*pWhiteBlackType)(JNIEnv *env, jobject obj, jobject src_bitmap, jobject dst_bitmap, jfloat white, jfloat black); 51 52 #define DEFINE(f) JNI_ ## f, 53 enum 54 { 55 #include "_jnif.h" 56 JNI_max 57 }; 58 #undef DEFINE 59 60 61 typedef struct 62 { 63 const char *func_name; 64 void *func_ptr; 65 } JNIFuncType; 66 67 extern JNIFuncType JNIFunc[JNI_max]; 68 69 70