Image Dimensions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way to determine the dimensions of an image using the image's
URL?
ie load image based on URL, and then get dimensions? or perhaps better method?
 
MurrayTh said:
Is there any way to determine the dimensions of an image using the image's
URL?
ie load image based on URL, and then get dimensions? or perhaps better method?

I don't think you can get an image parameters until you get it(read - download it)
I think you can read just the header and then parsing it get the dimentions, but it's gonna be pain
in the a$$...
 
http doesn't provide the images dimensions. It simply says what size to display the image on the client browser. To
accurately get the images size you need to get the image local and use the handy System.Drawing.Image class to extract
whatever info you need. Well most of it anyway.
 
Sorry I missed your reply back there. Just saw it now.

I would need to know more about the site you are attempting to get the image information from. Does the site actually
display the image or a thumbnail of the image? .ASP? ASP.NET? The URL won't usually have image data in it, unless you
have control over the site and can embed it in Meta Data or something like that. Or in a hidden input. Otherwise you
will have to download the image to get it's internal data.
 
Back
Top