0
String photoByte2 = "FFD8FFE000104A46494600010101000000000000FFE2021C4943435...." 

this is not whole hex code;



Bitmap bitmap = BitmapFactory.decodeByteArray(photoByte2.getBytes(), 0,photoByte2.length());
        img.setImageBitmap(bitmap);

i want convert above Base16 or Hex code to Image View in my android Project?but i dont have idea what can i do...

artaaaw
  • 1
  • 1
  • notice that my image save in my table as Base16 and i want read it from database and convert to imageview...not problem at reading from db but in convert :((( !! – artaaaw Jun 19 '20 at 11:07
  • try this link https://stackoverflow.com/questions/8624203/converting-a-hex-string-to-an-image-file – unzila Jun 19 '20 at 11:13

1 Answers1

1

First convert your Hex to array of int (Int[]) and from that u can get bitmap by

bitmap=Bitmap.createBitmap(int[] intarray, int width, int height, Bitmap.Config config) 
boompsy
  • 66
  • 2