I have image data in an rgb_565 byte array and I want to convert it to an efficient path into an argb array. Right now, I have found only one (slightly slow) way to do this:
Bitmap mPhotoPicture = BitmapFactory.decodeByteArray(imageData, 0 , imageData.length);
where imageData is my byte[] array in rgb_565, and then:
int pixels[] = new int[CameraView.PICTURE_HEIGHT*CameraView.PICTURE_WIDTH]; mPhotoPicture.getPixels(pixels, 0,PICTURE_WIDTH, 0, 0, PICTURE_WIDTH, PICTURE_HEIGHT);
I believe that creating a Bitmap object is exacting and not necessary in this case. Is there any other faster way to convert rgb_565 array to argb array?
I need this because image processing on the rgb_565 array seems a bit annoying. Or maybe it's not that difficult?
source share