Show .bmp file in ImageView Android 6

105
January 13, 2022, at 00:20 AM

My application receives ByteArray with .bmp file in it from backend. I need to output that bmp file in ImageView. For Android versions 7+ I create Bitmap with BitmapFactory.decodeByteArray() and then do imgView.setImageBitmap() and it works perfectly fine. But for OS versions 5 and 6 BitmapFactory.decodeByteArray() returns null.

I also tried writing bytes to file and creating Bitmap from file or stream - no good. Creating Drawable from the file and using file's Uri for ImageView.setImageUri() didn't solve the issue either.

Picasso and Glide libraries also don't work.

I would think that Android 5 and 6 can't work with bmp at all, but that just doesn't sound right. Also when I put test image (the same as the one that I receive from server) to res/mipmap folder I am able to output it to my ImageView.

So my question is what is the solution to that? How do I output .bmp image from ByteArray or locally saved file to ImageView on Android 5 and 6?

Rent Charter Buses Company
READ ALSO
utilize jQuery contextMenu with D3.js forced graph

utilize jQuery contextMenu with D3.js forced graph

I am trying to combine jQuery contextMenu (2x) with a simple D3

123
AssertionError: Must have equivalent tags in image_2, label_2 and velodyne dirs, check those files what is the meaning of it and how to solve?

AssertionError: Must have equivalent tags in image_2, label_2 and velodyne dirs, check those files what is the meaning of it and how to solve?

I was following the official Voxelnet repo on [Voxelnet][1] [1]: https://githubcom/gkadusumilli/Voxelnet/ As per the instructions, I preprocessed the data

121
babel command converts when run in terminal but running the script ends in error

babel command converts when run in terminal but running the script ends in error

I've been trying to get babel core and cli to convert modern JavaScript from indexjs into bundle

108
codeigniter 4 / how to select emoji from mysql db and display in view

codeigniter 4 / how to select emoji from mysql db and display in view

I have a table called mh_countryHere is one row from phpmyadmin

130