Hello everyone! Is it possible to define a path for ImageCreate and/or ImageCopyResize ? I have an image gallery script that uploads images to the server. I would like to automatically create thumbnails of the image [as soon as it is uploaded and saved in a sub-directory. Is this possible with ImageCreate/ImageCopyResize, or the other functions?
My directory structure is ../media /images /thumbs/ I have an upload script that upload images to the media/images/ directory. But, I would like to automatically create a thumbnail of the same image, but saved in the media/images/thumbs directory. Is that possible? The final result would like: ../media/images/ |_image1.jpg |_image2.jpg |_thumbs |_thumb-image1.jpg |_thumb-image2.jpg Any suggestions? FYI: I currently have: $thumb = imagecreate ($w, $h); $image = ImageCreateFromJpeg($img); $imagedata = getimagesize($img); imagecopyresized ($thumb, $image, 0, 0, 0, 0, $w, $h, $imagedata[0], $imagedata[1]); imagejpeg($thumb, $img); This works, but it overwrites the original [uploaded] image with the thumbnail. I want to save the thumbnails in another directory. Am I missing something? Please advise. _john -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php