I've been trying to find/create an image gallery for Drupal. I'm still in the process of researching the my options, and am yet to complete my comparison of all the available options. When I am done, I'll make a post that details my findings. Today however I thought I'd just share a small tip that I took a really long time to discover.
Drupal comes with inbuilt support for PHP's default image processing library, GD. Now GD is a great library that can be really fast, but the problem with it is that it really eats into a system's memory. Furthermore since GD is part of PHP, memory it consumes is taken out of the quota for PHP. If your Drupal site happens to be running on a shared webhosting platform, chances are that you cannot change the memory limits, and that uploading slightly large pictures will cause your Drupal site to give you an error saying that PHP ran out of memory.
This is where ImageMagick comes in. ImageMagick is a set of command line tools that is more efficient than GD and runs in a separate process. Hence it will not be confined by PHP's memory settings. ImageMagick is available on most shared webhosting plans, and if it isn't you should ask your webhost if its possible to have it installed.
To enable Drupal to recognize the presence of the ImageMagick toolkit, we need to add a file called image.imagemagick.inc to the includes folder in the Drupal installation directory. Normally we would have to write functions that implement Drupals abstraction layer and things, but luckily a file that does all this has been created. The file was created for the Image module, but it can be used without the module as well.
To get the file you will have to download the Image module and extract the contents from it. Then in the folder that is created locate the image.imagemagic.inc file and upload it to your Drupal installation directory's includes folder. Now go the and check the installed image toolkits at Administer >> Site configuration >> Image toolkits and you should see the ImageMagick toolkit listed there. Select it and set the path to the convert binary (which your webhost should have given you) and you're set to go.
Although ImageMagick is very popular, it's not the only image processing library available. A similar one called GraphicsMagick is also quite popular, and is known to be a more efficient with less features. Since the things we do with the image processing library are fairly basic, it would be advantageous to use the GraphicsMagick toolkit. The great thing about GraphicsMagick is that the usage of it is very similar to that of ImageMagick, and hence it should not be a problem to make an image.graphicsmagick.inc file.
However as of now I cannot locate one. If I find one, or get down to writing it myself, I'll make another post detailing that.