http get JPG to Image

mamuen

Member
Licensed User
Hi,

i want to receive a *.jpg with http get and show it directly as image on the form . Is there a way to show the jpg-image directly without saving to a file?
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
It is possible using the new Door library (which is only available for registered users).
Bitmap (Stream) constructor is invoked: http://msdn2.microsoft.com/en-us/library/z7ha67kw.aspx
B4X:
'WebRequest1 is a WebRequest object, WebResponse is a WebResponse object (HTTP)
'obj is an Object (Door library), args is an ObjectArray (Door)
Sub Globals
    
End Sub

Sub App_Start
    Form1.Show
    WebRequest1.New1("http://www.b4x.com/images/desktop.jpg")
    WebResponse.New1
    obj.New1(false)
    args.New1(1)
    
    WebResponse.Value = WebRequest1.GetResponse
    args.SetObject(0,WebResponse.GetStream) '
    obj.CreateNew2("System.Drawing.Bitmap" & obj.System_Drawing,args.Value)
    Form1.Image = obj.Value
End Sub
 

mamuen

Member
Licensed User
Hi Erel,

I have bought a used PDA (VPA compact II) with a full Basic4PPC 5.5 vesion from EBay. My first Project is, to make my PDA to remotecontrol for my Soundserver. I am programming a client for the mpd-demon and i want to put it to your Open Source Projects.

Have a look at http://www.musicpd.org/ or the wiki http://mpd.wikia.com/wiki/Main_Page

Regards Manuen
 
Last edited:
Top