aboutsummaryrefslogtreecommitdiff
path: root/turbojpeg-jni.c
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2011-02-16 03:26:48 +0000
committerDRC <dcommander@users.sourceforge.net>2011-02-16 03:26:48 +0000
commite1303ef09989fffaa721ddf715fe871015fe93cc (patch)
treeabcfcf209614c490581daef501b9d08b6971cb4d /turbojpeg-jni.c
parent942029fd9351bcc21d00f80fc85e9da5d9db84e1 (diff)
downloadlibjpeg-turbo-e1303ef09989fffaa721ddf715fe871015fe93cc.tar.gz
Expose TurboJPEG scaling features in Java wrapper
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@375 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'turbojpeg-jni.c')
-rw-r--r--turbojpeg-jni.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/turbojpeg-jni.c b/turbojpeg-jni.c
index 892e51b2..1ab5e28a 100644
--- a/turbojpeg-jni.c
+++ b/turbojpeg-jni.c
@@ -169,7 +169,7 @@ JNIEXPORT jobject JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompr
JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
(JNIEnv *env, jobject obj, jbyteArray src, jlong size, jbyteArray dst,
- jint width, jint pitch, jint height, jint pixelsize, jint flags)
+ jint pitch, jint pixelsize, jint scale_num, jint scale_denom, jint flags)
{
tjhandle handle=0;
unsigned char *srcbuf=NULL, *dstbuf=NULL;
@@ -179,8 +179,8 @@ JNIEXPORT void JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_decompress
bailif0(srcbuf=(*env)->GetPrimitiveArrayCritical(env, src, 0));
bailif0(dstbuf=(*env)->GetPrimitiveArrayCritical(env, dst, 0));
- if(tjDecompress(handle, srcbuf, (unsigned long)size, dstbuf, width, pitch,
- height, pixelsize, flags)==-1)
+ if(tjDecompress2(handle, srcbuf, (unsigned long)size, dstbuf, pitch,
+ pixelsize, scale_num, scale_denom, flags)==-1)
{
(*env)->ReleasePrimitiveArrayCritical(env, dst, dstbuf, 0);
(*env)->ReleasePrimitiveArrayCritical(env, src, srcbuf, 0);