Re: generating thumbnails
| From: | Rasmus Lerdorf | Date: | Mon, 21 May 2001 14:06:27 +0000 |
| Subject: | Re: generating thumbnails | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53717@lists.php.net to get a copy of this message | ||
> nahhh, if you're doing a lot of images on a page, doing a system call for
> each one would generate entirely too much overhead, imo.
>
> check out the built-in image manipulation functions in php.
> http://www.php.net/manual/en/ref.image.php
>
> there is a function called ImageCopyResized() which is probably what you would need to use. i
> used to have a thumbnailer written in php but alas, it's been so long ago, that i forgot how i
> wrote it. :)
The problem with that function is that it is going to dither things down
to 8-bit colour for you and the resulting thumbnail isn't going to look
very good. Sometimes for thumbnails that is not an issue though.
imagecopyresampled() does a very nice job of scaling images without losing
quality, but you need GD2 to use it.
-Rasmus