HTTPUtils.GetBitmap

optimist

Member
Licensed User
Longtime User
There are a lot of suspictious graphics in the net.
b4a HTTPUtils Module can load them, but not assign to a bitmap variable.

in my mind it is not the fault of b4a, but we have to handle this.
i suggest to add an exception-handler for LoadBitmap

B4X:
Sub GetBitmap(URL As String) As Bitmap
   Dim b As Bitmap
   If IsSuccess(URL) = False Then
      Log("Task not completed successfully.")
      Return b
   End If
   Try
     b = LoadBitmap(HttpUtilsService.TempFolder, SuccessfulUrls.Get(URL))
   Catch
       Log(LastException)
     Return Null
   End Try
   Return b
End Sub

Or am i on the wrong way?
 

romario11

Member
Licensed User
Longtime User
i need your help !

hello,
im at the same state! I can get the image but i cant assign to a bitmap variable.
how to make it ??
im going crazy haha

thank you !!



 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…