[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

Image factory with mobile webforms! Help me!!!

Gabriel

9/1/2003 9:20:00 PM

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
1 Answer

Marijn Ros

9/2/2003 1:25:00 PM

0


>-----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.