ImageMagick thumbnail generation and image preview
From FileRun Documentation
Contents |
Introduction
FileRun can make use of ImageMagick utility for generating image thumbnails and previews for PDF and PSD files. If you are frequently previewing large common (JPG, PNG, GIF) image files you should also use ImageMagick, as you will reach PHP's memory limitation.
Installing ImageMagick
Please see http://www.imagemagick.org
For ImageMagick to be able to generate thumbnails for PDF documents you will also need to install Ghostscript (http://pages.cs.wisc.edu/~ghost/).
Hewlett-Packard Graphics Language (HPGL) plotter files (.plt) can also be previewed with FileRun and ImageMagick by installing "Hp2xx" (http://www.gnu.org/software/hp2xx/hp2xx.html). Windows version available here: http://gnuwin32.sourceforge.net/packages/hp2xx.htm
If you are running a Windows server, we recommend you to install ImageMagick to a path without space characters (like "Program Files"). You can install it for example to a path like "C:\ImageMagick\".
Setting up FileRun
To enable ImageMagick please follow these steps:
- Login as superuser (default username "admin").
- Open "Control Panel".
- Go to "System configuration" >> "File preview and thumbnails".
- Enable ImageMagick.
- Set path to ImageMagick "convert" binary. Examples:
- Windows servers: C:\ImageMagick\convert.exe
- Linux servers: /usr/bin/convert
Troubleshooting
If you see broken icons instead of thumbnails:
- Make sure ImageMagick is working, running the following command: convert logo: image.jpg
- Make sure that Ghostscript is working. Try converting a PDF document using the command line: convert example.pdf example.png
- Make sure the path to ImageMagick is correctly configured in FileRun's control panel.
- On Windows servers, make sure PHP can run external application. You need to give the Internet Guest User (IUSR_<your-computer-name>) "read & execute" permission on the file that PHP is trying to run ImageMagick trough. That would be "cmd.exe" (located usually inside the folder "C:\Windows\System32"), the file used for running programs trough the command line.
