summaryrefslogtreecommitdiff
path: root/trunk/turbojpeg-jni.c
diff options
context:
space:
mode:
authordcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519>2011-02-16 03:26:48 +0000
committerdcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519>2011-02-16 03:26:48 +0000
commitb7481bbb92179beadda35732a15a5e9494696d5a (patch)
tree4f577fed410fe1c079cff26316f519470bdf77d7 /trunk/turbojpeg-jni.c
parent891b10a74e4aae0e2ae7c749cb9f4307aee936b0 (diff)
Expose TurboJPEG scaling features in Java wrapper
git-svn-id: https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo@375 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'trunk/turbojpeg-jni.c')
-rw-r--r--trunk/turbojpeg-jni.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/trunk/turbojpeg-jni.c b/trunk/turbojpeg-jni.c
index 892e51b..1ab5e28 100644
--- a/trunk/turbojpeg-jni.c
+++ b/trunk/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);