I am getting image from database in blob format. i want to convert it into Bitmap image.the code i used to convert bitmap to Blob is put below.but please tell me how to reve
This will work
byte[] byteArray = DBcursor.getBlob(columnIndex);
Bitmap bm = BitmapFactory.decodeByteArray(byteArray, 0 ,byteArray.length);
Why not make a helper method like that :)
public static Bitmap getBitmapFromBytes(byte[] bytes) {
if (bytes != null) {
return BitmapFactory.decodeByteArray(bytes, 0 ,bytes.length);
}
return null;
}