String to Bitmap java / android

I am developing an application in which I converted a bitmap to a string for some purprose. How can I convert this string to bitmap again?

0
source share
1 answer

I converted Bitmap to String to do some work, now I want to convert it back ... it looks like " android.graphics.Bitmap@43fd34c0 "

Simply put, you cannot.

This line is created by Object.toString()default. It does not encode the information content of the object, and there is nothing in the libraries of standard classes that return it to the link to the original object ... provided that it still exists.

- Map<String,Bitmap> ; .

Map<String, Bitmap> map = new HashMap<String, Bitmap>();
...
map.put(someBitmap.toString(), someBitmap);
...
Bitmap retrieved = map.get(someString);
+2

All Articles