|
|
@ -59,6 +59,7 @@ Java_com_jme3_system_ios_IosImageLoader_loadImageData(JNIEnv* e, jclass obj, job |
|
|
|
UIImage* inputImage = [UIImage imageWithData:inData]; |
|
|
|
UIImage* inputImage = [UIImage imageWithData:inData]; |
|
|
|
if(inputImage == nil){ |
|
|
|
if(inputImage == nil){ |
|
|
|
[inData release]; |
|
|
|
[inData release]; |
|
|
|
|
|
|
|
[pool release]; |
|
|
|
return nil; |
|
|
|
return nil; |
|
|
|
} |
|
|
|
} |
|
|
|
CGImageRef inImage = [inputImage CGImage]; |
|
|
|
CGImageRef inImage = [inputImage CGImage]; |
|
|
@ -68,6 +69,7 @@ Java_com_jme3_system_ios_IosImageLoader_loadImageData(JNIEnv* e, jclass obj, job |
|
|
|
jobject nativeBuffer = (*e)->CallStaticObjectMethod(e, bufferUtilsClass, newBufferMethod, ht*wdth*4); |
|
|
|
jobject nativeBuffer = (*e)->CallStaticObjectMethod(e, bufferUtilsClass, newBufferMethod, ht*wdth*4); |
|
|
|
if (checkJNIException(e)) { |
|
|
|
if (checkJNIException(e)) { |
|
|
|
[inData release]; |
|
|
|
[inData release]; |
|
|
|
|
|
|
|
[pool release]; |
|
|
|
return nil; |
|
|
|
return nil; |
|
|
|
} |
|
|
|
} |
|
|
|
void *rawData = (*e)->GetDirectBufferAddress(e, nativeBuffer); |
|
|
|
void *rawData = (*e)->GetDirectBufferAddress(e, nativeBuffer); |
|
|
|