Resize An Image From A String


What I need to be able to do is scan a string for tags. Inside the tags will be a link to an image.

What I want to be able to do is take that link and proportionally resize that image link to fit nicely within the borders so it doesn't stretch the boreders out.