Get remote image dimensions

Posted by o-logn on Stack Overflow See other posts from Stack Overflow or by o-logn
Published on 2010-04-09T19:26:54Z Indexed on 2010/04/09 19:33 UTC
Read the original article Hit count: 342

Given a URL to an image (and not the image itself), what's the most efficient of getting it's dimensions? I would like to change the height and width attributes in the image tag (<img>) if it is greater than 200x200. However, if it's smaller than that, then I'd like to keep the size as it is. (I'm using ASP.NET/C#)

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about c#