diff options
Diffstat (limited to 'platform/android/jni')
-rw-r--r-- | platform/android/jni/mupdf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/android/jni/mupdf.c b/platform/android/jni/mupdf.c index 96b9162d..d28b7792 100644 --- a/platform/android/jni/mupdf.c +++ b/platform/android/jni/mupdf.c @@ -2722,7 +2722,7 @@ static char *tmp_gproof_path(char *path) } JNIEXPORT jstring JNICALL -JNI_FN(MuPDFCore_startProofInternal)(JNIEnv * env, jobject thiz) +JNI_FN(MuPDFCore_startProofInternal)(JNIEnv * env, jobject thiz, int inResolution) { #ifdef SUPPORT_GPROOF globals *glo = get_globals(env, thiz); @@ -2737,9 +2737,13 @@ JNI_FN(MuPDFCore_startProofInternal)(JNIEnv * env, jobject thiz) if (!tmp) return NULL; + int theResolution = PROOF_RESOLUTION; + if (inResolution != 0) + theResolution = inResolution; + fz_try(ctx) { - fz_write_gproof_file(ctx, glo->current_path, glo->doc, tmp, PROOF_RESOLUTION); + fz_write_gproof_file(ctx, glo->current_path, glo->doc, tmp, theResolution, "", ""); LOGE("Creating %s\n", tmp); ret = (*env)->NewStringUTF(env, tmp); @@ -2851,7 +2855,7 @@ JNI_FN(MuPDFCore_getSepInternal)(JNIEnv *env, jobject thiz, int page, int sep) return NULL; /* MuPDF returns RGBA as bytes. Android wants a packed BGRA int. */ - name = fz_get_separation_on_page(ctx, glo->pages[i].page, sep, &rgba[0], &cmyk); + name = fz_get_separation_on_page(ctx, glo->pages[i].page, sep, (unsigned int *)(&rgba[0]), &cmyk); bgra = (rgba[0] << 16) | (rgba[1]<<8) | rgba[2] | (rgba[3]<<24); jname = name ? (*env)->NewStringUTF(env, name) : NULL; |