¡@

Home 

2014/10/16 ¤W¤È 08:21:35

android Programming Glossary: previousdata

JNI bitmap operations , for helping to avoid OOM when using large images [closed]

http://stackoverflow.com/questions/18250951/jni-bitmap-operations-for-helping-to-avoid-oom-when-using-large-images

JniBitmap jniBitmap JniBitmap env GetDirectBufferAddress handle if jniBitmap _storedBitmapPixels NULL return uint32_t previousData jniBitmap _storedBitmapPixels uint32_t oldWidth jniBitmap _bitmapInfo.width uint32_t newWidth right left newHeight bottom.. newWidth right left newHeight bottom top uint32_t newBitmapPixels new uint32_t newWidth newHeight uint32_t whereToGet previousData left top oldWidth uint32_t whereToPut newBitmapPixels for int y top y bottom y memcpy whereToPut whereToGet sizeof uint32_t.. sizeof uint32_t newWidth whereToGet oldWidth whereToPut newWidth done copying so replace old data with new one delete previousData jniBitmap _storedBitmapPixels newBitmapPixels jniBitmap _bitmapInfo.width newWidth jniBitmap _bitmapInfo.height newHeight..