I have to do some processing of a bitmap, and I'm trying to use NDK to return a byte array to java by locking Bitmap pixels. After processing in java is done, I ( finally ) call another NDK function to unlock bitmap's pixels.
I've tryied a few things but no one has worked:
Ive solved this by manipulating the array entirely inside native code. All Java code that used the byte[] has been moved to JNI.
According to my research, I think there is no way to manipulate the byte array of a Bitmap directly from Java. Of course you can manipulate a copy, but I dindt find any way to work directly with the native bitmap's data.
If someone finds a way, I would like to know it.
Regards!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.