0

I have images and I am storing it in database as a BLOB file type. Now I want to migrate Firebase online database. because of Firebase database can not support Blob type, I've stored BLOB file as a String type such as "137,80,78,71,13,10,26,10,0,0,0,13,73,72,68..." (just put in " ", normaly numbers are a BLOB file). Now how can convert it to BLOB file and a make it Bitmap again.

in short:

my String like this "137,80,78,71,13,10,26,10,0,0,0,13,73,72,68..."

    String value = new String(byteArray);
    byte[] byteArray = new byte[] {137,80,78,71,13,10,26,10,0,0,0,13,73,72,68...};

and I want to convert it byte array like above

mehmet
  • 1,558
  • 5
  • 30
  • 41
  • It might be more effectient to store the images inside [Firebase Storage](https://firebase.google.com/docs/storage/), and then save the url link to the images inside your database – Pat Needham Feb 12 '18 at 14:42
  • You are right but this database is very old I didnt find the original images. only BLOB type images exist – mehmet Feb 12 '18 at 14:44
  • It's fairly straight forward to read the BLOB's and then save them as... jpg's (for example). – Jay Feb 12 '18 at 18:43
  • OKEY I am trying to use Firebase Storage, can you help my new question https://stackoverflow.com/questions/48762263/using-firebase-storage-image-with-glide – mehmet Feb 13 '18 at 08:21

0 Answers0