Reputation: 1
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...
Upvotes: 0
Views: 345
Reputation: 66
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)
Upvotes: 1