[pmwiki-users] Shrinking uploaded images...

Petko Yotov 5ko at free.fr
Sun Jul 29 05:09:10 CDT 2007


On Sunday 29 July 2007, Mike Shanley wrote:
> I've been looking around for a way to shrink uploaded images as they
> come. The reason is that I've just installed the thumblist recipe for a
> friend's page, but it throws a 500 error when thumbnailing an image that
> is about 1280x1024.
>
> I'm hoping that there's some hidden recipe somewhere, because I can't
> just tell her to shrink the pics herself. She NEEDs the quality high for
> her purposes.

This is not quite usual to break like this for such a small picture (usually 
the limit is around 1200*1600).
* Can thumblist resize any other picture? If not, your installation may be 
missing some gd-functions.
* Are there any error messages in the page or in the server error log?

Here is what you can do:
* try the "threaded mode" with $ThumbThread=1;
* set more memory for PHP (in php.ini, change "memory_limit = 64M" for 
example)
* Resize down the pictures before uploading them (on windows you can use 
IrfanView's batch convert). If she NEEDs the high quality on the server, any 
script that shrinks the file while uploading, will store a less high quality 
version, the result is the same.

If your server doesn't have enough memory, it is probably impossible to resize 
that same picture with plain PHP-GD, and I'd like to see a script that does 
it. However, if your PHP is not in "safe mode", you can hopefully use a 
script that will create the thumbnails with ImageMagick. Try Qdig or 
WikiGallery, their recipes are on pmwiki.org.

Thanks,
Petko




More information about the pmwiki-users mailing list