|
Posted by NC on 09/21/05 18:31
bissatch@yahoo.co.uk wrote:
>
> I need to be able to resize it to a thumbnail image
> prior to outputting. How would I do this?
The easy answer is that you probably shouldn't do it at all.
Image resizing is a CPU-intensive process, so resizing should
be done once, when uploading the image to the server. The
resulting thumbnail would then be stored next to the full-size
image.
Also, the wisdom of storing images in databases is questionable.
If you have a PHP page with five images on it, every time someone
views it, six simultaneous connections to the database will be
opened.
For details on resizing, see documentation for imagecopyresized()
and imagecopyresampled() functions:
http://www.php.net/imagecopyresized
http://www.php.net/imagecopyresampled
Cheers,
NC
Navigation:
[Reply to this message]
|