"tjScaledSize"="tjGetScaledSize"
This commit is contained in:
2
jpegut.c
2
jpegut.c
@@ -444,7 +444,7 @@ void _gentestbmp(tjhandle hnd, unsigned char *jpegbuf, unsigned long jpegsize,
|
||||
}
|
||||
|
||||
temp1=scaledw; temp2=scaledh;
|
||||
_catch(tjScaledSize(w, h, &temp1, &temp2));
|
||||
_catch(tjGetScaledSize(w, h, &temp1, &temp2));
|
||||
if(temp1!=scaledw || temp2!=scaledh)
|
||||
{
|
||||
printf("Scaled size mismatch\n"); bailout();
|
||||
|
||||
@@ -259,7 +259,7 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_getScaledW
|
||||
(JNIEnv *env, jobject obj, jint input_width, jint input_height,
|
||||
jint output_width, jint output_height)
|
||||
{
|
||||
if(tjScaledSize(input_width, input_height, &output_width, &output_height)
|
||||
if(tjGetScaledSize(input_width, input_height, &output_width, &output_height)
|
||||
==-1)
|
||||
_throw(tjGetErrorStr());
|
||||
|
||||
@@ -271,7 +271,7 @@ JNIEXPORT jint JNICALL Java_org_libjpegturbo_turbojpeg_TJDecompressor_getScaledH
|
||||
(JNIEnv *env, jobject obj, jint input_width, jint input_height,
|
||||
jint output_width, jint output_height)
|
||||
{
|
||||
if(tjScaledSize(input_width, input_height, &output_width, &output_height)
|
||||
if(tjGetScaledSize(input_width, input_height, &output_width, &output_height)
|
||||
==-1)
|
||||
_throw(tjGetErrorStr());
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@ DLLEXPORT int DLLCALL tjDecompressHeader(tjhandle j,
|
||||
|
||||
|
||||
/*
|
||||
int tjScaledSize(int input_width, int input_height,
|
||||
int tjGetScaledSize(int input_width, int input_height,
|
||||
int *output_width, int *output_height)
|
||||
|
||||
[INPUT] input_width = width (in pixels) of the JPEG image
|
||||
@@ -265,7 +265,7 @@ DLLEXPORT int DLLCALL tjDecompressHeader(tjhandle j,
|
||||
|
||||
RETURNS: 0 on success, -1 if arguments are out of bounds
|
||||
*/
|
||||
DLLEXPORT int DLLCALL tjScaledSize(int input_width, int input_height,
|
||||
DLLEXPORT int DLLCALL tjGetScaledSize(int input_width, int input_height,
|
||||
int *output_width, int *output_height);
|
||||
|
||||
|
||||
|
||||
@@ -457,14 +457,14 @@ DLLEXPORT int DLLCALL tjDecompressHeader(tjhandle h,
|
||||
}
|
||||
|
||||
|
||||
DLLEXPORT int DLLCALL tjScaledSize(int input_width, int input_height,
|
||||
DLLEXPORT int DLLCALL tjGetScaledSize(int input_width, int input_height,
|
||||
int *output_width, int *output_height)
|
||||
{
|
||||
int i, retval=0, scaledw=0, scaledh=0;
|
||||
|
||||
if(input_width<1 || input_height<1 || output_width==NULL
|
||||
|| output_height==NULL || *output_width<0 || *output_height<0)
|
||||
_throw("Invalid argument in tjScaledSize()");
|
||||
_throw("Invalid argument in tjGetScaledSize()");
|
||||
|
||||
if(*output_width==0) *output_width=input_width;
|
||||
if(*output_height==0) *output_height=input_height;
|
||||
|
||||
Reference in New Issue
Block a user