http get JPG to Image

Discussion in 'Questions (Windows Mobile)' started by mamuen, Mar 25, 2008.

  1. mamuen

    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: Mar 25, 2008
  2. Erel

    Erel Administrator Staff Member Licensed 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
    Code:
    '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.basic4ppc.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
     
  3. mamuen

    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: Mar 26, 2008
Loading...