Hi
I have searched this forum quite a bit and have read most of the posts regarding resizing of images, jpg's to be exact. I have tried loads of the posted codes that appear to have worked for other people but I cannot get them to work so I am hoping someone can read this a possibly post some code that will work.
My PHP details are v4.3.1 with GD Enabled:
GD Version : bundled (2.0 compatible)
FreeType Support: enabled
FreeType Linkage: with freetype
GIF Read Support: enabled
JPG Support: enabled
PNG Support: enabled
WBMP Support: enabled
The reason I have posted that is because I thought it might be important cause reading the posts on this site there are differences between GD v1.6 & 2.0 so hopefully that will give you enough info to use the appropriate code I would require.
Basically I have an image Gallery that is offsite [ie. not stored on my domain hosting package], it is stored on a free isp site that offers free space. I run all my code on my hosting site and just reference the images from there, the code I use to select a random image is:
$Q04 = "SELECT gp_site, gp_pic, gp_format, gp_who
FROM jag_gallery_photos
WHERE gp_rank <= '$userinfo[user_photo_rank]'
ORDER BY rand()";
$R04 = mysql_query($Q04) or die("Bad Q04:".mysql_error());
list($gp_site, $gp_pic, $gp_format, $gp_who, $gp_rank) = sql_fetch_row($R04);
echo "<IMG SRC='http://$gp_site/$gp_pic.$gp_format'
BORDER='0' WIDTH='150' HEIGHT='113' ALT='$gp_who'>\n";
This works fine, the only thing is the images are 600 X 450 and I have just used the HTML tags to resize the random image. I want to show this image on the home page at 150 X 113, as you know this still takes the same amount of time to load up as it would if you were looking at it at 600 X 450, hence why I wanted to temporarily resize and show the image on the home page.
Any help would be appreciated as I have been trying to figure this out for a bit now and am at a loss.
Thanks in advance