Image factory with mobile webforms! Help me!!!

Discussion in 'ASP .Net Mobile' started by Gabriel, Sep 1, 2003.

  1. Gabriel

    Gabriel Guest

    hi

    I have a ImageFactory.aspx page that in its Load event
    generate an image...

    ImageFactory.aspx
    -------------------

    private void Page_Load(object sender, System.EventArgs e)
    {
    // Response Gif image
    Response.ContentType = "image/gif";

    const int width = 20, height = 20;
    Bitmap objBitmap = new Bitmap(width, height);

    bla bla bla...

    MemoryStream memoryStream = new MemoryStream();
    objBitmap.Save(memoryStream,
    System.Drawing.Imaging.ImageFormat.Gif);

    // clean up...
    objGraphics.Dispose();
    objBitmap.Dispose();

    Response.BinaryWrite(memoryStream.ToArray());
    memoryStream.Close();
    }

    In another mobile page (main.aspx), I have an Image movile
    control...

    Main.aspx
    ---------

    Image1.ImageUrl = "ImageFactory.aspx";


    The problem is:
    ---------------

    The main.aspx page works in Internet Explorer Desktop, but
    does not
    work with Microsoft Mobile Explorer 3.0 and other
    emulators!


    Is not possible use "Image Factory" in Mobile App?

    thanks

    Gabriel
    Gabriel, Sep 1, 2003
    #1
    1. Advertising

  2. Gabriel

    Marijn Ros Guest


    >-----Original Message-----
    >hi
    >
    >I have a ImageFactory.aspx page that in its Load event
    >generate an image...
    >
    >ImageFactory.aspx
    >-------------------
    >
    >private void Page_Load(object sender, System.EventArgs e)
    >{
    > // Response Gif image
    > Response.ContentType = "image/gif";
    >
    > const int width = 20, height = 20;
    > Bitmap objBitmap = new Bitmap(width, height);
    >
    > bla bla bla...
    >
    > MemoryStream memoryStream = new MemoryStream();
    > objBitmap.Save(memoryStream,
    >System.Drawing.Imaging.ImageFormat.Gif);
    >
    > // clean up...
    > objGraphics.Dispose();
    > objBitmap.Dispose();
    >
    > Response.BinaryWrite(memoryStream.ToArray());
    > memoryStream.Close();
    >}
    >
    >In another mobile page (main.aspx), I have an Image

    movile
    >control...
    >
    >Main.aspx
    >---------
    >
    >Image1.ImageUrl = "ImageFactory.aspx";
    >
    >
    >The problem is:
    >---------------
    >
    >The main.aspx page works in Internet Explorer Desktop,

    but
    >does not
    >work with Microsoft Mobile Explorer 3.0 and other
    >emulators!
    >
    >
    >Is not possible use "Image Factory" in Mobile App?


    Are you sure Mobile Explorer supports Gif? WAP-clients
    tend to only support WBMP, for example.
    Marijn Ros, Sep 2, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Zahoor
    Replies:
    1
    Views:
    795
    Darryl L. Pierce
    Nov 15, 2003
  2. Medi Montaseri
    Replies:
    17
    Views:
    838
    Medi Montaseri
    Sep 3, 2003
  3. C#
    Replies:
    4
    Views:
    390
  4. chen selina
    Replies:
    0
    Views:
    1,257
    chen selina
    Jul 13, 2010
  5. Waverider
    Replies:
    1
    Views:
    187
    JuanDG
    Sep 21, 2004
Loading...

Share This Page