I have file "Image_RGB565.raw" which contains image buffer in RGB565 format. I want this image to be displayed in ImageView. is it possible without extra code of converting to RGB888?
I have tried to
BitmapFactory.Options opt = new BitmapFactory.Options(); opt.inPreferredConfig = Bitmap.Config.RGB_565; Bitmap bitmap = BitmapFactory.decodeFile("Image_001_RGB565.raw");
but bitmap is null.
then i also tried to load using bytearray
BitmapFactory.Options opt = new BitmapFactory.Options(); opt.inPreferredConfig = Bitmap.Config.RGB_565; Bitmap bitmap = BitmapFactory.decodeFile(decodeByteArray(data, 0, data.length, opt);
Please guide me to correct direction. My image dimension is 160x160.