™AsAs4242 Member Licensed User Longtime User Jun 2, 2015 #1 hello I'm a social network application When you open the application registered users list(the name and photo)will appear. I can download image and show in imageview with Picasso library, but it can't be saved in thememory I do not want to be cached images I want to download and save to memory and display then next time if we enter the application if there photo in memory shown else download and save photos then display
hello I'm a social network application When you open the application registered users list(the name and photo)will appear. I can download image and show in imageview with Picasso library, but it can't be saved in thememory I do not want to be cached images I want to download and save to memory and display then next time if we enter the application if there photo in memory shown else download and save photos then display
Erel B4X founder Staff member Licensed User Longtime User Jun 2, 2015 #2 This code saves a Bitmap object named bmp to a file: B4X: Dim out AsOutputStream out = File.OpenOutput(File.DirDefaultExternal, "1.jpg", False) bmp.WriteToStream(out, 100, "JPEG") out.Close Upvote 0
This code saves a Bitmap object named bmp to a file: B4X: Dim out AsOutputStream out = File.OpenOutput(File.DirDefaultExternal, "1.jpg", False) bmp.WriteToStream(out, 100, "JPEG") out.Close
™AsAs4242 Member Licensed User Longtime User Jun 2, 2015 #3 Erel said: This code saves a Bitmap object named bmp to a file: B4X: Dim out AsOutputStream out = File.OpenOutput(File.DirDefaultExternal, "1.jpg", False) bmp.WriteToStream(out, 100, "JPEG") out.Close Click to expand... Tnx For Replay Erel But Ago i tested it if load image with picasso and save with this method the size of saved image is 2kb and when open is black !! plz see ScreenShot Attachments Screenshot_2015-06-02-14-38-10.png 150.6 KB · Views: 159 Upvote 0
Erel said: This code saves a Bitmap object named bmp to a file: B4X: Dim out AsOutputStream out = File.OpenOutput(File.DirDefaultExternal, "1.jpg", False) bmp.WriteToStream(out, 100, "JPEG") out.Close Click to expand... Tnx For Replay Erel But Ago i tested it if load image with picasso and save with this method the size of saved image is 2kb and when open is black !! plz see ScreenShot
Erel B4X founder Staff member Licensed User Longtime User Jun 3, 2015 #4 It is impossible to help you without seeing the code. Upvote 0