blackrabbit
IS-IT--Management
I have a web forum that I created with asp.net. part of the forum allows users to post the URL to an image file so that they can have a custom picture in an avatar or in thier signature or even put a picture in a post so other people can see it.
The problem is that sometimes the pictures they post URL's for are a little too big and distort my nice web page. Is there a way in asp.net to get the height and width of a remote image? I'd like to get the width and height of the URL image and then use the proportion to resize the image so it fits on my page.
The URL's to the pictures are stored in my datatbase so my asp.net code would get the URL to the picture, find out its width and hieght, resize it if needed and then write the html <img> tag with the new dimensions so it fits. Can this be done? I saw aomething done in older ASP that did this.
The problem is that sometimes the pictures they post URL's for are a little too big and distort my nice web page. Is there a way in asp.net to get the height and width of a remote image? I'd like to get the width and height of the URL image and then use the proportion to resize the image so it fits on my page.
The URL's to the pictures are stored in my datatbase so my asp.net code would get the URL to the picture, find out its width and hieght, resize it if needed and then write the html <img> tag with the new dimensions so it fits. Can this be done? I saw aomething done in older ASP that did this.