android - How can I get the image path of an image inside an image view? -


i have set scaled image in image view. want path of scaled image. possible? heard stored somewhere in internal memory.

update:

i have problem: have set set image gallery in imagview. want save state (that means image in image view). how can that?

i thought saving entire image blob sql database. heard should rather take image path.

can tell me how can this?

this how image gallery , how set in imageview.

@override public void onactivityresult(int requestcode, int resultcode, intent data) {     if (resultcode == result_ok) {         if (requestcode == pick_from_file) {             uri selectedimageuri = data.getdata();             selectedimagepath = getpath(selectedimageuri);              log.v("image path====>>>> ",selectedimagepath);              // decode, scale , set image.             bitmap mybitmap = bitmapfactory.decodefile(selectedimagepath);             bitmap scaledbitmap = bitmap.createscaledbitmap(mybitmap, new_width, new_height, true);             mybitmap.recycle();             mybitmap = null;              mimageview.setimagebitmap(scaledbitmap);         }     } } 

try this

string filename = "myfilename" fileoutputstream out = new fileoutputstream(filename) scaledbitmap.compress(bitmap.compressformat.png, 90, out); 

there's more examples on how save bitmap objects here.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -