Dynamic Image Generation using Mobile Image Control
From: Waverider (laurie.mcculloch_at_ntlworld.com)
Date: 09/14/04
- Next message: bonnie: "Theory behind ASP.NET mobile device capabilities?"
- Previous message: Sara T.: "MobileForm and javascript"
- Next in thread: JuanDG: "RE: Dynamic Image Generation using Mobile Image Control"
- Reply: JuanDG: "RE: Dynamic Image Generation using Mobile Image Control"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 14 Sep 2004 23:09:25 GMT
Hi,
I'm trying to implemet some code that dynamically re-scales an image for a mobile image control. The code works fine when I browse to it in Internet Explorer but not when I browse to it on a mobile device, I just get a blank image with a red cross through it. It's got me flummoxed....any ideas.
Here's my code...
to fill my Image control
Image1.ImageUrl = ("img.aspx?image=/Images/logo_003.gif&height128&width128")
and the code inside the page load event of img.aspx
Try
Dim _image As String = Request.QueryString("image")
Dim _height As Int32 = Convert.ToInt32(Request.QueryString("height"))
Dim _width As Int32 = Convert.ToInt32(Request.QueryString("width"))
Dim bitmapname As String = Request.PhysicalApplicationPath + _image
Dim bmpsize As New System.Drawing.Size(_width, _height)
Dim bmpFile As New Bitmap(bitmapname)
Dim bmpfile2 As New Bitmap(bmpFile, bmpsize)
Response.ContentType = "image/gif"
bmpfile2.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif)
Catch ex As Exception
End Try
- Next message: bonnie: "Theory behind ASP.NET mobile device capabilities?"
- Previous message: Sara T.: "MobileForm and javascript"
- Next in thread: JuanDG: "RE: Dynamic Image Generation using Mobile Image Control"
- Reply: JuanDG: "RE: Dynamic Image Generation using Mobile Image Control"
- Messages sorted by: [ date ] [ thread ]