Basically I want to generate thumbnails for my portfolio by fitting images in a space of 200x90, but I don't want to stretch them. I basically want to image to be scale down just as much as possible without the aspect-ratio changing... and that the image gets centered in the 200x90 space, like garrysmod.org does. How would I do this?
[QUOTE=Zaldos;21273999][html]
<img src="img.png" style="max-width:200px;max-height:90px;"/>
[/html][/QUOTE]
No. I want the images to be 200x90 at all times, otherwise the design gets messed up. And it should be in PHP.
[editline]12:30AM[/editline]
Basically, I want to know how to calculate how much you can scale an image down while keeping the same aspect-ratio until either the width or the height is smaller than 200x90. I can figure it out further myself if anyone knows how to do that.
Do you want to physically make a new one?
If you do, here's a script I wrote to do it:
[url]http://www.facepunch.com/showthread.php?t=850562[/url]
[QUOTE=andersonmat;21276710]Do you want to physically make a new one?
If you do, here's a script I wrote to do it:
[url]http://www.facepunch.com/showthread.php?t=850562[/url][/QUOTE]
Thanks!
Sorry, you need to Log In to post a reply to this thread.