I have a site with different sized images and I'm displaying them in a table with a fixed width. The problem I'm running into is that if I don't specify a width, the really BIG images push the talbes boundries out past the fixed table dimension. If I set a width, just shy of my fixed table width, it stretches the smaller images past their actual size. What I'd like, but don't know how to do it, is: RULE 1: Used actual image size. RULE 2: If image size exceeds 500px set width = 500px Can this be done? I'm pulling the images in using a database and I'm using PHP. I'd just like to know if there is anything I can add to this line: <img src="<?=HOMEPAGE?>userpics/graphics/thumbnail/<?=$thumbnail?>"/>
Hi thank... Yes it says that it is enabled: GD Support enabled GD Version bundled (2.0.28 compatible) FreeType Support enabled FreeType Linkage with freetype GIF Read Support enabled GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled
http://www.phpit.net/article/image-manipulation-php-gd-part2/ http://www.jaguarpc.com/forums/archive/index.php/t-13229.html Here's 2 good topics on how to resize using GD. The second one may be easier for your use. Also, if you can, it would be much easier to resize the images so that none are over 500px. Not sure if that is possible for what you are doing. If pictures are uploaded, you can use GD to resize anything as it is being uploaded. This would take some stress off the server, so it doesn't have to use GD for normal page views. Basically you should make a simple script to check the image's width. If it is greater than 500, then you should resize it as you wanted to do.