To demonstrate what Peter is saying you could do something like this:
Code:
WebRequest objRequest = WebRequest.Create("http://test/site/I/test.jpg");
objRequest.Method = "GET";
WebResponse objResponse = objRequest.GetResponse();
System.Drawing.Image b = System.Drawing.Bitmap.FromStream(objResponse.GetResponseStream());
the instance B will now contain the Width, Height, etc about your image, however, you can NOT get the file size of the image from the Image class. You have 2 choices here:
Save the file to disk and use the FileInfo class to get the file size or a slightly less accurate method would be to convert the image into a Byte array and get the length of that array to get a determined file size.
hth.
--Edit:
To the end of using the HttpWebRequest/Response classes, you can declare objRequest and objResponse as an HttpWebRequest and HttpWebResponse respectively but you would modifiy the code:
Code:
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create("http://test/site/I/test.jpg");
...
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse()
hth.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========