[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.drawing

creating bitmap from string

Jason

11/29/2004 10:41:00 PM

I'm loading a jpg using XMLHttp, but am not sure how to convert the result
into a bitmap?

I've tried converting ResponseText into a byte array, and then loading that
into a memory stream, and then creating the bitmap from that, but it's not
working.

I don't want to have to create a temporary file, and for now I'm stuck using
XMLHttp instead of WebRequest.

Any suggestions?


2 Answers

Morten Wennevik [C# MVP]

11/30/2004 10:42:00 AM

0

Hi Jason,

I'm not familiar with XMLHttp and I'm not sure this is what you seek, but
if your goal is to download a jpg from a certain location to display, you
can use WebClient.DownloadData to store the file in memory instead of on
disk.

--
Happy Coding!
Morten Wennevik [C# MVP]

Jason

11/30/2004 4:21:00 PM

0

I have done this with WebRequest without problems. But WebRequest does not
cache data, where XMLHttp uses IE's cache. I'm trying to utilize IE's
caching mechanism rather than having to write my own.