
#ifdef JAVA_MODUL
#include <android/log.h>
#include <android/bitmap.h>

#include "de_uwesoftware_mobilRaw_MobilRawWrapper.h"
#include "MobilePhotoTool.h"
//using namespace MobilePhotoTool;
#define  LOG_TAG    "libmobilRaw"
#define  LOGI(...)  __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
#define  LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__)

void move(unsigned short *image, int imagesizeX, int imagesizeY, int moveX, int moveY);


JNIEXPORT jlong JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_setFile
  (JNIEnv *env, jobject obj, jstring path){

	jlong pointer = 0;
	const char *file;


	file = env->GetStringUTFChars(path,NULL);
	pointer = (jlong) create_Reader(file);


	return pointer;

}

JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_released
  (JNIEnv *env, jobject obj, jlong pointer)
{
	void *reader = (void*) pointer;
	delete_Reader(reader);
}

JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_setZoom
  (JNIEnv *env, jobject obj, jlong pointer, jfloat zoom, jintArray intarray)
{
	jint *zoom_size;
	unsigned int vector_size, result;
	void *reader = (void*) pointer;

	result = MPT_ERROR ;

	vector_size = env->GetArrayLength(intarray);
	if(vector_size >= 2){
		zoom_size = env->GetIntArrayElements(intarray, NULL);
		result = set_Zoom(reader, zoom, zoom_size);
		env->ReleaseIntArrayElements(intarray, zoom_size, NULL);
	}

	return result;
}

JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_updateImage
  (JNIEnv *env, jobject obj, jlong pointer , jobject bitmap, jintArray variablen){
	AndroidBitmapInfo  info;
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	int ret;
	void * pixels;
	unsigned int *variable;

	vector_size = env->GetArrayLength(variablen);
	if(vector_size == 7){
		variable = (unsigned int*)env->GetIntArrayElements(variablen, NULL);

	    if ((ret = AndroidBitmap_getInfo(env, bitmap, &info)) < 0) {
	        LOGE("AndroidBitmap_getInfo() failed ! error=%d", ret);
	        return result;
	    }

	    if (info.format != ANDROID_BITMAP_FORMAT_RGB_565) {
	        LOGE("Bitmap format is not RGB_565 !");
	        return result;
	    }

	    if ((ret = AndroidBitmap_lockPixels(env, bitmap, &pixels)) < 0) {
	        LOGE("AndroidBitmap_lockPixels() failed ! error=%d", ret);
	        return result;
	    }
	    get_zoom_image_02(	reader,
							(unsigned short *)pixels,
							variable[0],
							variable[1],
							variable[2],
							variable[3],
							variable[4],
							variable[5],
							variable[6]);

	    env->ReleaseIntArrayElements(variablen, (jint*)variable, NULL);
	    AndroidBitmap_unlockPixels(env, bitmap);

	}
	return result;
}

jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_moveBitmap2
  (JNIEnv *env, jobject obj, jobject bitmap, jint x, jint y)
{
	AndroidBitmapInfo  info;
	int sizeX, sizeY;
	void *pixels;
	int ret;
	int result = MPT_ERROR;

	if ((ret = AndroidBitmap_getInfo(env, bitmap, &info)) < 0) {
		LOGE("AndroidBitmap_getInfo() failed ! error=%d", ret);
		return result;
	}

	if (info.format != ANDROID_BITMAP_FORMAT_RGB_565) {
		LOGE("Bitmap format is not RGB_565 !");
		return result;
	}

	if ((ret = AndroidBitmap_lockPixels(env, bitmap, (&pixels))) < 0) {
		LOGE("AndroidBitmap_lockPixels() failed ! error=%d", ret);
		return result;
	}
	sizeY = info.height;
	sizeX = info.width;

	move((unsigned short *)pixels, sizeX, sizeY, x, y);

	AndroidBitmap_unlockPixels(env, bitmap);
	result = MPT_SUCCESS;
	return result;
}

void move(unsigned short *image, int imagesizeX, int imagesizeY, int moveX, int moveY)
{
	int temp_moveX, temp_moveY;
	int posX, posY, end_posX, end_posY, posX2;

	if(moveX < 0){
		temp_moveX = -moveX;
	}else{
		temp_moveX = moveX;
	}

	if(moveY < 0){
		temp_moveY = -moveY;
	}else{
		temp_moveY = moveY;
	}

	if(imagesizeX > temp_moveX && imagesizeY > temp_moveY){
		 if(moveX != 0){
			 if(moveX < 0){
				 for(posY = 0; posY < imagesizeY; posY++){
					 posX		= posY * imagesizeX;
					 end_posX	= posX + imagesizeX + moveX;
					 for(; posX < end_posX; posX++){
						 image[posX] = image[posX - moveX];
					 }
				 }
			 }else{
				 for(posY = 0; posY < imagesizeY; posY++){
					 posX 		= (posY + 1) * imagesizeX - 1;
					 end_posX 	= posX - imagesizeX + moveX;
					 for(; posX > end_posX; posX--){
						 image[posX] = image[posX - moveX];
					 }
				 }
			 }
		 }

		 if(moveY != 0){
			 if(moveY < 0){
				 posY = 0;
				 end_posY = imagesizeY + moveY;
				 for(;posY < end_posY; posY++){
					 posX2		= (posY - moveY) * imagesizeX;
					 posX		= posY * imagesizeX;
					 end_posX	= posX + imagesizeX;
					 for(; posX < end_posX; posX++, posX2++){
						 image[posX] = image[posX2];
					 }
				 }
			 }else{
				 posY 		= imagesizeY - 1;
				 end_posY 	= posY - imagesizeY + moveY;
				 for(;posY > end_posY; posY--){
					 posX2 = (posY - moveY) * imagesizeX;
					 posX  = posY *imagesizeX;
					 end_posX = posX + imagesizeX;
					 for(;posX < end_posX; posX++, posX2++){
						 image[posX] = image[posX2];
					 }
				 }
			 }
		 }
	}

}


JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Preview_1Size
  (JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 2){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		variable[1]	= get_PreviewLength(reader);
		variable[0]	= get_PreviewWidth(reader);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
		result = MPT_SUCCESS;
	}


	return result;

}

/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Preview_Bitmap
 * Signature: (JLandroid/graphics/Bitmap;)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Preview_1Bitmap
  (JNIEnv *env, jobject obj, jlong pointer, jobject bitmap)
{
	AndroidBitmapInfo  info;
	int sizeX, sizeY;
	void *pixels;
	int ret;
	int result = MPT_ERROR;
	void *reader = (void*)pointer;

	if ((ret = AndroidBitmap_getInfo(env, bitmap, &info)) < 0) {
		LOGE("AndroidBitmap_getInfo() failed ! error=%d", ret);
		return result;
	}

	if (info.format != ANDROID_BITMAP_FORMAT_RGB_565) {
		LOGE("Bitmap format is not RGB_565 !");
		return result;
	}

	if ((ret = AndroidBitmap_lockPixels(env, bitmap, (&pixels))) < 0) {
		LOGE("AndroidBitmap_lockPixels() failed ! error=%d", ret);
		return result;
	}
	sizeY = info.height;
	sizeX = info.width;

	result = get_PreviewData_02(reader, (unsigned short *)pixels, sizeY * sizeX);

	return result;
}




JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1ExposureTime
  (JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 2){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_ExposureTime(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}

/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_FNumber
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1FNumber
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 2){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_FNumber(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_ExposureProgram
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1ExposureProgram
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_ExposureProgram(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_ISOSpeedRatings
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1ISOSpeedRatings
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_ISOSpeedRatings(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_DateTimeOriginal
 * Signature: (J[C)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1DateTimeOriginal
  (JNIEnv *env, jobject obj, jlong pointer, jbyteArray carray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	char *variable;

	vector_size = env->GetArrayLength(carray);
	if(vector_size >= 20){
		variable = (char*)env->GetByteArrayElements(carray, NULL);
		result = get_Exif_DateTimeOriginal(reader, variable);
		env->ReleaseByteArrayElements(carray, (jbyte*)variable, NULL);
	}


	return result;
}

/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_SubsecTimeOriginal
 * Signature: (J[C)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1SubsecTimeOriginal
(JNIEnv *env, jobject obj, jlong pointer, jcharArray carray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	char *variable;

	vector_size = env->GetArrayLength(carray);
	if(vector_size >= 20){
		variable = (char*)env->GetCharArrayElements(carray, NULL);
		result = get_Exif_SubsecTimeOriginal(reader, variable);
		env->ReleaseCharArrayElements(carray, (jchar*)variable, NULL);
	}


	return result;
}

/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_DateTimeDigitized
 * Signature: (J[C)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1DateTimeDigitized
(JNIEnv *env, jobject obj, jlong pointer, jcharArray carray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	char *variable;

	vector_size = env->GetArrayLength(carray);
	if(vector_size >= 20){
		variable = (char*)env->GetCharArrayElements(carray, NULL);
		result = get_Exif_DateTimeDigitized(reader, variable);
		env->ReleaseCharArrayElements(carray, (jchar*)variable, NULL);
	}


	return result;
}

/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_SubsecTimeDigitized
 * Signature: (J[C)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1SubsecTimeDigitized
  (JNIEnv *env, jobject obj, jlong pointer, jcharArray carray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	char *variable;

	vector_size = env->GetArrayLength(carray);
	if(vector_size >= 20){
		variable = (char*)env->GetCharArrayElements(carray, NULL);
		result = get_Exif_SubsecTimeDigitized(reader, variable);
		env->ReleaseCharArrayElements(carray, (jchar*)variable, NULL);
	}


	return result;
}

/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_ExposureBiasValue
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1ExposureBiasValue
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 2){
		variable = (int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_ExposureBiasValue(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_MeteringMode
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1MeteringMode
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_MeteringMode(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_Flash
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1Flash
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_Flash(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_FlashEnergy
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1FlashEnergy
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 2){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_FlashEnergy(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_FocalLength
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1FocalLength
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 2){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_FocalLength(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_FocalLengthIn35mmFilm
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1FocalLengthIn35mmFilm
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_FocalLengthIn35mmFilm(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_SensingMethod
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1SensingMethod
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_SensingMethod(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_CustomRendered
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1CustomRendered
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_CustomRendered(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_ExposureMode
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1ExposureMode
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_ExposureMode(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_WhiteBalance
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1WhiteBalance
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_WhiteBalance(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_SceneCaptureType
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1SceneCaptureType
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_SceneCaptureType(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_Contrast
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1Contrast
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_Contrast(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_Saturation
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1Saturation
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_Saturation(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_Sharpness
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1Sharpness
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_Sharpness(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_BaselineSharpness
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1BaselineSharpness
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_BaselineSharpness(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}
/*
 * Class:     de_uwesoftware_mobilRaw_MobilRawWrapper
 * Method:    get_Exif_SubjectDistanceRange
 * Signature: (J[I)I
 */
JNIEXPORT jint JNICALL Java_de_uwesoftware_mobilRaw_MobilRawWrapper_get_1Exif_1SubjectDistanceRange
(JNIEnv *env, jobject obj, jlong pointer, jintArray iarray)
{
	void *reader = (void*)pointer;
	unsigned int result = MPT_ERROR;
	unsigned int vector_size;
	unsigned int *variable;

	vector_size = env->GetArrayLength(iarray);
	if(vector_size >= 1){
		variable = (unsigned int*)env->GetIntArrayElements(iarray, NULL);
		result = get_Exif_SubjectDistanceRange(reader, variable);
		env->ReleaseIntArrayElements(iarray, (jint*)variable, NULL);
	}


	return result;
}

#endif
