ShawnMolloy
MIS
Without saving it to disk first? This is a script I wrote that queries the ITUNES database for album cover art and then recieves a URL with the image URL, and in turn creates a memory stream w/that URL:
I want to just be able to assign the Image SRC of an image button control this in memory representation of the image. I dont want to give it the image url from itunes.
Shawn Molloy
Seattle, WA
Code:
AlbumArt art = new AlbumArt();
art.Fetch(txt_Artist.Text, txt_Album.Text);
MemoryStream memStream = new MemoryStream();
System.IO.Stream responseStream = art.GetStream();
Bitmap bmpArt = new Bitmap(responseStream);
Response.Clear();
Response.ContentType = "image/jpeg";
bmpArt.Save(memStream, ImageFormat.Jpeg);
memStream.WriteTo(Response.OutputStream);
I want to just be able to assign the Image SRC of an image button control this in memory representation of the image. I dont want to give it the image url from itunes.
Shawn Molloy
Seattle, WA