Sample of _LOADIMAGE change
#1
Code: (Select All)
$Unstable:Http

Screen _NewImage(800, 600, 32)

logo$ = "https://qb64phoenix.com/qb64wiki/resources/assets/peWikiLogo.png"
image$ = Download$(logo$, foo&)

imagehandle = _LoadImage(image$, 32, "memory")

_PutImage , imagehandle



' Content of the HTTP response is returned. The statusCode is also assigned.
Function Download$ (url As String, statusCode As Long)
    h& = _OpenClient("HTTP:" + url)
    statusCode = _StatusCode(h&)
    While Not EOF(h&)
        _Limit 60
        Get #h&, , s$
        content$ = content$ + s$
    Wend
    Close #h&
    Download$ = content$
End Function


Note:  This requires version 3.6 or above to run!
Reply


Messages In This Thread
Sample of _LOADIMAGE change - by SMcNeill - 02-20-2023, 05:46 PM
RE: Sample of _LOADIMAGE change - by mnrvovrfc - 02-21-2023, 05:17 AM



Users browsing this thread: 2 Guest(s)