|Posted: Sun, 2008-06-22 05:22|
I am not a Gallery user, but I did try it while I was searching what is the best way to share my pictures. I have a photo album and the hosting service that I use allows 40 MB of memory for PHP scripts to execute (it's 1and1). This is far too less to make a thumbnail out of any decently sized picture, and pretty much any picture over 2 MB won't even load with createimagefromjpeg() with that kind of memory limit. While searching on google for a workaround I noticed that many users of Gallery are facing the same problem (from the many threads on this forum related to this issue and the same hosting service).
The workaround I found after many hours of thinking is to use Perl instead of PHP to generate the image's thumbnails. On 1and1, and I believe on some other hosting services, there is a Perl interpreter available with a truckload of modules including GD and GraphicsMagick and the nice thing is the Perl interpreter doesn't enforce any memory limit. It's a pretty straighforward script to write and it would probably solve the memory limit issue in many cases. I wrote my own script but it's a three-liner, so i'll let someone else write a more elaborate script for Gallery.
I'd have loved to learn that workaround sooner so now I hope this will help someone else.