The Fastest Way To Pass Java Bitmap Pixels To Jni
I'm trying to find the best/fastest way to pass a bitmap from java to JNI. Next is how I do this operation at the moment. Can this be improved, or is there any other faster way? vo
Solution 1:
The easiest way is to just call AndroidBitmap_lockPixels. So in the constructor of JNIBitmap you would do this:
void* bitmapPixels;
AndroidBitmap_lockPixels(env, bitmap, &bitmapPixels)
Then in the destructor you would do this:
AndroidBitmap_unlockPixels( env, bitmap);
Post a Comment for "The Fastest Way To Pass Java Bitmap Pixels To Jni"