Integrating ImageMagick in Enterprise Server 9 is a 2-step process:
Step 1. Installing ImageMagick
Step 2. Configuring Enterprise Server
1. ImageMagick installation
Use one of the following methods:
- Download and install ImageMagick for example from the following location:
https://www.imagemagick.org/script/download.php#macosx
- Download the ImageMagick source file from the following location and then compile and install it yourself:
https://www.imagemagick.org/download/
Setting environment variables
Make the settings below in one of the following locations:
- For the current user: ~/.profile
- For all users: /etc/profile
PATH - Add the ImageMagick bin folder to the 'PATH' setting.
Note: The ImageMagick bin folder is where you can find 'identify', 'convert' binary executable files.
Example: export PATH="$PATH:/usr/local/bin"
MAGICK_HOME - Add the 'home directory' of ImageMagick to the 'MAGICK_HOME' setting.
Example: export MAGICK_HOME="/usr/local"
LD_LIBRARY_PATH - Add the lib folder of ImageMagick to the 'LD_LIBRARY_PATH' setting.
Note: This is identical to setting the ImageMagick bin folder, but now use 'lib' instead of 'bin'.
Example: If the ImageMagick bin folder is '/usr/local/bin', the LD_LIBRARY_PATH would be '/usr/local/lib' (do make sure that this path really exists in your system): export LD_LIBRARY_PATH="/usr/local/lib" |
Installation
Download and install ImageMagick for example from the following location:
https://www.imagemagick.org/script/download.php#windows
Setting environment variables
The installation process will update the PATH setting. Once the installation is completed, reboot the system to use the modified PATH setting.
Use one of the following methods:
- Download and install ImageMagick for example from the following location:
https://www.imagemagick.org/script/download.php#unix
- Download the ImageMagick source file from the following location and then compile and install it yourself:
2. Enterprise Server configuration
Step 1. Define the path where ImageMagick is installed:
- File: configserver.php
- Name of option: IMAGE_MAGICK_APP_PATH
- Values: The full path to the folder of the ImageMagick application.
Note: Use forward slashes and do NOT end with a slash.
- Example:
- For Linux/Mac:
define( 'IMAGE_MAGICK_APP_PATH', '/usr/local/bin' );
- For Windows:
define( 'IMAGE_MAGICK_APP_PATH', 'C:/Program Files/ImageMagick-6.6.3-Q16' );
Step 2. Configure the preview and thumbnail quality:
Info: This feature requires Enterprise Server version 9.2.1 or higher.
- File: configserver.php file
- Name of option: IMAGE_MAGICK_OPTIONS
- Possible values: Any value mentioned on the ImageMagick Help page Command Line Options.
Note: The size (-size) is set by Enterprise Server and must not be set here.
- Default values used:
- -colorspace Sets the colorspace of the image. See ImageMagick Help.
- -quality Sets the compression level for the images. See ImageMagick Help.
- -sharpen Sharpens the image. See ImageMagick Help.
- -layers Handles multiple image as a set of image layers or animation frames. See ImageMagick Help.
- -depth Sets the number of bits in a color sample within a pixel. See ImageMagick Help.
- -strip Strips the image of any profiles or comments. See ImageMagick Help.
- -density Sets the horizontal and vertical resolution of an image for rendering to devices. See ImageMagick Help.
- Default setting: -colorspace sRGB -quality 100 -sharpen 5 -layers merge -depth 8 -strip -density
- Example:
define ('IMAGE_MAGICK_OPTIONS', '-colorspace sRGB -quality 92 -sharpen 5 -layers merge -depth 8 -strip -density 72x72');
Related Tasks
Testing ImageMagick for use in Enterprise Server 9
Controlling the quality of ImageMagick previews and thumbnails in Enterprise Server 9
Reference Materials
Image preview generation in Enterprise Server 9
Document history
- 27 February 2018: Updated the installation instructions.
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.