Hi, Read up on the image manipulation functions of PHP at http://www.php.net/manual/en/ref.image.php
You will need to install the GD library if it's not already installed and once you do you will have access to all the functions described, including the ImageCopyResized function. To read the image from disk, you will probably have to use ImageCreateFromGif or ImageCreateFromJpeg and to create the destination image you will need to use CreateImage. You can then save the resulting thumbnail using ImageGif, ImageJpeg or anything you like. Just as a side note, you should probably use ImageCopyResampled which uses interpolation to resize the image, thus creating a thumbnail of much better quality. HTH Olivier PS: to get the image's height and width, use ImagesY and ImagesX respectively, once you have opened/created the image. At 18:09 2002-09-22 +0300, Kjell Hansen wrote: >Hi, >I'm using a Win2k with php4.1 and I'd like to make some thumbnails from >pictures on my disk. >I've gotten the impression that it's possible, but I havent' found out >just how. > >I've stumbled across the ImageCopyResized function but it requires a >imagehandle(?) to the file copied from. How do I get that? Is it the >right way to do this? >I guess I could use some picture manipulating program to do this, but >doing it the PHP way is nicer :) > >TIA >Kjell > > >-- >PHP Windows Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php