|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
can you convert an in-memory bitmap render in a web control image ?Hello:
I have ... Dim baseMap as Bitmap = new Bitmap(200, 50) Dim myGraphic as Graphics = Graphics.FromImage(baseMap) myGraphic.FillRectangle(HBrush, 0, 0, 200, 50) BaseMap.Save(Response.OutputStream, ImageFormat.JPEG) myGraphic.Dispose() baseMap.Dispose()and I want to render the image either in a placeholder or in an image control WIHOUT saving the BaseMap to file...Is there a way to do that ?ThanksTerry
Show quote
Hide quote
"Support" <RemoveThis_Supp***@mail.oci.state.ga.us> wrote in message Sure, add an image to the placeholder and set its image src tag to an aspxnews:Ou65wBGaFHA.3400@tk2msftngp13.phx.gbl... > Hello: > > I have ... > Dim baseMap as Bitmap = new Bitmap(200, 50) > Dim myGraphic as Graphics = Graphics.FromImage(baseMap) > myGraphic.FillRectangle(HBrush, 0, 0, 200, 50) > BaseMap.Save(Response.OutputStream, ImageFormat.JPEG) > myGraphic.Dispose() > baseMap.Dispose()and I want to render the image either in a placeholder or > in an image control WIHOUT saving the BaseMap to file...Is there a way to do > that ?ThanksTerry > > file that contains the above code with no body tag in the html. You will also want to set the Response.ClearContent and Response.ContentType = "image/jpeg" Mike Yes, you'll need a special page (or an HTTPHandler) to handle the task,
though. Here are the details: http://SteveOrr.net/articles/ImproveYourImages.aspx Show quoteHide quote "Support" <RemoveThis_Supp***@mail.oci.state.ga.us> wrote in message news:Ou65wBGaFHA.3400@tk2msftngp13.phx.gbl... > Hello: > > I have ... > Dim baseMap as Bitmap = new Bitmap(200, 50) > Dim myGraphic as Graphics = Graphics.FromImage(baseMap) > myGraphic.FillRectangle(HBrush, 0, 0, 200, 50) > BaseMap.Save(Response.OutputStream, ImageFormat.JPEG) > myGraphic.Dispose() > baseMap.Dispose()and I want to render the image either in a placeholder or > in an image control WIHOUT saving the BaseMap to file...Is there a way to > do that ?ThanksTerry >
Mystery ASP.NET Error
ImageButton bug AddHandler doesn't seem to work. Blinking Controls Help, DropDown Web Control not Retuning "SelectedValue" Drop down listbox - extra properties, possible? CUSTOMVALIDATOR works but page goes on on FALSE "Google Suggests" and the AJAX .NET Wrapper? CustomValidator VALIDA pero NO FUNCIONA REGEX para Email |
|||||||||||||||||||||||