Access to raw data in ARGB_8888 Android Bitmap
问题 I am trying to access the raw data of a Bitmap in ARGB_8888 format on Android, using the copyPixelsToBuffer and copyPixelsFromBuffer methods. However, invocation of those calls seems to always apply the alpha channel to the rgb channels. I need the raw data in a byte[] or similar (to pass through JNI; yes, I know about bitmap.h in Android 2.2, cannot use that). Here is a sample: // Create 1x1 Bitmap with alpha channel, 8 bits per channel Bitmap one = Bitmap.createBitmap(1,1,Bitmap.Config.ARGB