diff options
Diffstat (limited to 'platform/java/mupdf_native.c')
-rw-r--r-- | platform/java/mupdf_native.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index 8af0b8a4..8d811afe 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -3816,6 +3816,34 @@ FUN(Pixmap_getYResolution)(JNIEnv *env, jobject self) return pixmap ? pixmap->yres : 0; } +JNIEXPORT void JNICALL +FUN(Pixmap_invert)(JNIEnv *env, jobject self) +{ + fz_context *ctx = get_context(env); + fz_pixmap *pixmap = from_Pixmap(env, self); + + if (!ctx || !pixmap) return; + + fz_try(ctx) + fz_invert_pixmap(ctx, pixmap); + fz_catch(ctx) + jni_rethrow(env, ctx); +} + +JNIEXPORT void JNICALL +FUN(Pixmap_gamma)(JNIEnv *env, jobject self, jfloat gamma) +{ + fz_context *ctx = get_context(env); + fz_pixmap *pixmap = from_Pixmap(env, self); + + if (!ctx || !pixmap) return; + + fz_try(ctx) + fz_gamma_pixmap(ctx, pixmap, gamma); + fz_catch(ctx) + jni_rethrow(env, ctx); +} + /* Path Interface */ JNIEXPORT void JNICALL |