..NET makes this pretty easy using classes from the System.Drawing and
System.NET namespaces:
string imageUrl =
"http://msdn.microsoft.com/nodehomes/graphics/80x60/aspnet.jpg";
WebRequest request = WebRequest.Create(imageUrl);
WebResponse response = request.GetResponse();
Image image = Image.FromStream(response.GetResponseStream());
Console.WriteLine("Image size: {0}x{1}",
image.Width, image.Height);
HTH,
--
Scott
http://www.OdeToCode.com
On Tue, 1 Jun 2004 05:11:02 -0700, "Laser Lu"
<an*******@discussions.microsoft.com> wrote:
I want to get the pixel size of a image file, which is specified by its URL. The problem is how to load the image file by a URL, and then how to get its size? I'm looking for any useful advices.