Hi Dan, Forgive me if I have missed something, but this is not actually doing anything to the image.
the *same* image is being sent to the client, and it is up to the client browser to resize the image in the size you specify. Therefore, no matter what image size is specified, the same image is sent to the client. This could have the effect of stretching the image (if a large number was chosen), or shrinking it - on the client while the same file size is sent down the wire. Surely there is a better way to do this - preferably on the server side so that the correct image size is always sent... I do not know GD at all, and thus cannot really contribute to teh correct way to do this, but I think your way os a bit of a poor mans hack. Cheers David R Dan Koken wrote: > Andy, > Yes I do it all the time. In this example, I do this with a window that > has buttons across the top of a image representing size from 1 to 10. > Depending on the button they select they get a image displayed from > small to large. > > Here is a snip of code that displays the sized images. > ---------------------------- > The button name is $s. They select from 1 to 10, but can be any increment. > $hi = $s * 100; // size in 100 pixels. (but can be any increment) > echo " > <TABLE BORDER='15' CELLPADDING='0' CELLSPACING='0'><TR><TD> > <image src='ft_image.php?imno=$image_num' BORDER=0 ALIGN='TOP' > height=$hi></TD></TR></TABLE> > "; > > Note: in the 'image src' you give it a program name, not the image, and > pass some way for it to read the image from the DB. In this case the > program is ft_image.php and it passes imno. > > To didplay the photo in ft_image.php, execute the following: > > header("Content-type: image/jpeg"); > print(mysql_result($result, 0, "photo_image")); > > photo_image is name of blob field from the DB > --------------------------------- > HTH.. Good luck.. Dan. > > =========================================================== > Andy wrote: > >> Hi there, >> >> I am wondering how to resize an image which is stored in a mysql blob >> field. >> >> With files this workes just fine, but how to do this with the image >> comming >> from blob? Has anybody done this already? >> >> Thank you for any help on that, >> >> andy >> >> > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php