Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Mobile / September 2004

Tip: Looking for answers? Try searching our database.

Dynamic Image Generation using Mobile Image Control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Waverider - 15 Sep 2004 00:09 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
JuanDG - 21 Sep 2004 20:59 GMT
Well I really support your creativity, but if what you really need is to get
images scaled to the proper size for the devices, you better get this control
done by Joseph Croney at Microsoft.

http://www.asp.net/ControlGallery/ControlDetail.aspx?Control=185&tabindex=2

cheers!!

--

Juan David Gomez A.
Microsoft Certified Professional
Analista de Desarrollo - PSL S.A.
Web and Wireless Banking
Medellin - Colombia

> Hi,
>
[quoted text clipped - 25 lines]
>
> End Try

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.