awakenblueheart Member Licensed User Longtime User Dec 8, 2015 #1 https://my.pcloud.com/publink/show?code=XZK4OzZaxjIEnCQUyQLRDGSQCGNX59fLdiX Hi, I am new B4A user. I have try to download image from server but get error "error loading bitmap". Any help? Attached with is my project. Thanks in advance.
https://my.pcloud.com/publink/show?code=XZK4OzZaxjIEnCQUyQLRDGSQCGNX59fLdiX Hi, I am new B4A user. I have try to download image from server but get error "error loading bitmap". Any help? Attached with is my project. Thanks in advance.
Erel B4X founder Staff member Licensed User Longtime User Dec 9, 2015 #2 It is better to upload the project to the forum directly. You can use File - Export as zip to build the zip file. 1. You can use HttpUtils2 library instead of the two modules. 2. I don't understand how your code should work. What is the image link? Upvote 0
It is better to upload the project to the forum directly. You can use File - Export as zip to build the zip file. 1. You can use HttpUtils2 library instead of the two modules. 2. I don't understand how your code should work. What is the image link?
awakenblueheart Member Licensed User Longtime User Dec 9, 2015 #3 I am using below link library. HTML: Copy <a href="https://www.b4x.com/android/forum/threads/httputils2-web-services-are-now-even-simpler.18992/" target="_blank" class="externalLink">HttpUtils2</a> Attached with uploaded project file modified from above library. Answer: 1.The modules already there when I open the Httputils2 library sample project. 2. Image link = "http://www.kipidap.web44.net/image/" which in Map Activity. (image type: jpeg) Is it possible to download image and save in specific folder like 1.in SD card ? 2.Internal Directory for apps ? If possible, guide me. Thanks Erel. Attachments HttpUtils2.zip HttpUtils2.zip 480 KB · Views: 314 Last edited: Dec 10, 2015 Upvote 0
I am using below link library. HTML: Copy <a href="https://www.b4x.com/android/forum/threads/httputils2-web-services-are-now-even-simpler.18992/" target="_blank" class="externalLink">HttpUtils2</a> Attached with uploaded project file modified from above library. Answer: 1.The modules already there when I open the Httputils2 library sample project. 2. Image link = "http://www.kipidap.web44.net/image/" which in Map Activity. (image type: jpeg) Is it possible to download image and save in specific folder like 1.in SD card ? 2.Internal Directory for apps ? If possible, guide me. Thanks Erel.
awakenblueheart Member Licensed User Longtime User Dec 9, 2015 #4 Sorry, I thought the HTML link will appear as HttpUtils2 hyperlink. My bad... Upvote 0
awakenblueheart Member Licensed User Longtime User Dec 11, 2015 #5 I managed to solve my issue. The problem with my code is the image link "http://www.kipidap.web44.net/image/" content many images. I am downloading them all one time. So, I change a bit by calling the method to download my image one by one. Example: "http://www.kipidap.web44.net/image/book.jpg" then "http://www.kipidap.web44.net/image/book2.jpg". The problem now is when my phone change orientation I need to download them again. So, I think there is a way to save downloaded image in directory. Please, any help ??? Upvote 0
I managed to solve my issue. The problem with my code is the image link "http://www.kipidap.web44.net/image/" content many images. I am downloading them all one time. So, I change a bit by calling the method to download my image one by one. Example: "http://www.kipidap.web44.net/image/book.jpg" then "http://www.kipidap.web44.net/image/book2.jpg". The problem now is when my phone change orientation I need to download them again. So, I think there is a way to save downloaded image in directory. Please, any help ???
Erel B4X founder Staff member Licensed User Longtime User Dec 11, 2015 #6 ImageDownloader - The simple way to download images Upvote 0
awakenblueheart Member Licensed User Longtime User Dec 12, 2015 #7 Finally, successfully, to save the downloaded image. Here is the code I used: Dim Out As OutputStream Out=File.OpenOutput(File.DirDefaultExternal,text,False) bmps(ImageIndex).WriteToStream(Out,67,"JPEG") Upvote 0
Finally, successfully, to save the downloaded image. Here is the code I used: Dim Out As OutputStream Out=File.OpenOutput(File.DirDefaultExternal,text,False) bmps(ImageIndex).WriteToStream(Out,67,"JPEG")