Create a thumbnail from a remote image

M

Mike

I've seen a few examples of creating an thumbnail from a file directly from
the server but....

does anyone know how i can grab a picture from another server (eg a seperate
image server http://myimages.com/images/001.jpg) and on the fly create a
thumbnail of that image?

a little like google images.

Thanks
Mike
 
A

Andreas Håkansson

Mike,

After reading your post I gave it a go and it was not hard at all.
Hopefully
this is what you are looking for.

WebRequest wr = WebRequest.Create(@"www.yoururl.com/image.jpg");
Bitmap remoteImage =
(Bitmap)Bitmap.FromStream(wr.GetResponse().GetResponseStream());

Now you have a normal bitmap image that you can modify and save as desired.

HTH,

//Andreas
 
M

Mike

Absolutly Fantastic !!!

Thanks a million for you help, Also becuase of this i'm have a good look at
the great WebRequest Class.

Thanks again :)

Mike
 
A

Andreas Håkansson

Mike,

No worries =) Yeah the WebRequest class can be a lifesave at
times. It's a blessing not having to warm up a Socket class when you
need stuff like this =)

//Andreas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top