1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en" xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
4 <meta http-equiv="content-type" content="text/html; charset=UTF-8"></meta>
5 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4"></meta>
6 <title>ImageMagick: Resources</title>
7 <meta http-equiv="content-language" content="en-US"></meta>
8 <meta http-equiv="content-type" content="text/html; charset=utf-8"></meta>
9 <meta http-equiv="reply-to" content="magick-users@imagemagick.org"></meta>
10 <meta name="application-name" content="ImageMagick"></meta>
11 <meta name="description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition, resize, rotate, shear, distort or transform images automagically."></meta>
12 <meta name="application-url" content="http://www.imagemagick.org"></meta>
13 <meta name="generator" content="PHP"></meta>
14 <meta name="keywords" content="resources, ImageMagick, PerlMagick, image processing, OpenMP, software development library, image, photo, software, Magick++, MagickWand"></meta>
15 <meta name="rating" content="GENERAL"></meta>
16 <meta name="robots" content="INDEX, FOLLOW"></meta>
17 <meta name="generator" content="ImageMagick Studio LLC"></meta>
18 <meta name="author" content="ImageMagick Studio LLC"></meta>
19 <meta name="revisit-after" content="2 DAYS"></meta>
20 <meta name="resource-type" content="document"></meta>
21 <meta name="copyright" content="Copyright (c) 1999-2012 ImageMagick Studio LLC"></meta>
22 <meta name="distribution" content="Global"></meta>
23 <link rel="icon" href="../images/wand.png"></link>
24 <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon"></link>
25 <link rel="canonical" href="../index.html"></link>
26 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"></link>
28 <!-- Add jQuery library -->
29 <script type="text/javascript" src="http://localhost/ajax/libs/jquery/1.7/jquery.min.js"></script>
31 <!-- Add mousewheel plugin (this is optional) -->
32 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
35 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/jquery.fancybox.css?v=2.0.6" type="text/css" media="screen"></link>
36 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/jquery.fancybox.pack.js?v=2.0.6"></script>
38 <!-- Optionally add helpers - button, thumbnail and/or media -->
39 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.2" type="text/css" media="screen"></link>
40 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.2"></script>
41 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.0"></script>
43 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=2.0.6" type="text/css" media="screen"></link>
44 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=2.0.6"></script>
46 <script type="text/javascript">
47 $(document).ready(function() {
48 $(".fancybox").fancybox();
52 <!-- ImageMagick style -->
53 <style type="text/css" media="all">
54 @import url("../www/magick.css");
58 <body id="www-imagemagick-org">
62 <div class="titlebar">
63 <div style="margin: 17px auto; float: left;">
64 <script type="text/javascript">
66 google_ad_client = "pub-3129977114552745";
67 google_ad_slot = "5439289906";
68 google_ad_width = 728;
69 google_ad_height = 90;
74 <a href="../discourse-server">
75 <img src="../images/logo.jpg" alt="ImageMagick Logo" style="width: 123px; height: 118px; border: 0px; float: right;"></img></a>
76 <a href="../index.html">
77 <img src="../images/sprite.jpg" alt="ImageMagick Sprite" style="width: 114px; height: 118px; border: 0px; float: right;"></img></a>
83 <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
86 <a title="Binary Releases" href="binary-releases.html">Binary Releases</a>
89 <a title="Binary Release: Unix" href="binary-releases.html#unix">Unix</a>
92 <a title="Binary Release: MacOS X" href="binary-releases.html#macosx">Mac OS X</a>
95 <a title="Binary Release: iOS" href="binary-releases.html#iOS">iOS</a>
98 <a title="Binary Release: Windows" href="binary-releases.html#windows">Windows</a>
100 <div class="sep"></div>
102 <a title="Command-line Tools" href="command-line-tools.html">Command-line Tools</a>
105 <a title="Command-line Tools: Processing" href="command-line-processing.html">Processing</a>
108 <a title="Command-line Tools: Options" href="command-line-options.html">Options</a>
111 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
114 <a title="Program Interfaces" href="api.html">Program Interfaces</a>
117 <a title="Program Interface: MagickWand" href="magick-wand.html">MagickWand</a>
120 <a title="Program Interface: MagickCore" href="magick-core.html">MagickCore</a>
123 <a title="Program Interface: PerlMagick" href="perl-magick.html">PerlMagick</a>
126 <a title="Program Interface: Magick++" href="magick++.html">Magick++</a>
128 <div class="sep"></div>
130 <a title="Install from Source" href="install-source.html">Install from Source</a>
133 <a title="Install from Source: Unix" href="install-source.html#unix">Unix</a>
136 <a title="Install from Source: Windows" href="install-source.html#windows">Windows</a>
139 <a title="Resources" href="resources.html">Resources</a>
142 <a title="Architecture" href="architecture.html">Architecture</a>
145 <a title="Download" href="download.html">Download</a>
147 <div class="sep"></div>
149 <a title="Search" href="search.html">Search</a>
151 <div class="sep"></div>
153 <a title="Site Map" href="sitemap.html">Site Map</a>
156 <a title="Site Map: Links" href="links.html">Links</a>
158 <div class="sep"></div>
160 <a title="Support ImageMagick Development" href="support.html">Support ImageMagick Development</a>
164 <div class="eastbar">
166 <div> <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="../index.html"></a></div>
168 <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
169 <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width="93" height="20" border="0"></img></a>
177 <h1>Customize ImageMagick With Resources</h1>
178 <p class="navigation-index">[<a href="resources.html#configure">Configuration Files</a> • <a href="resources.html#modules">Modules</a> • <a href="resources.html#fonts">Fonts</a> • <a href="resources.html#environment">Environment Variables</a>]</p>
180 <div class="doc-section">
181 <p>ImageMagick depends on a number of external resources including configuration files, loadable modules, fonts, and environment variables.</p>
184 <h2><a id="configure"></a>Configuration Files</h2>
185 <div class="doc-section">
187 <p>ImageMagick depends on a number of external configuration files detailed here:</p>
190 <dt class="doc"><a href="../source/coder.xml">coder.xml</a></dt>
191 <dd>Associate an image format with the specified coder module.
193 <p>ImageMagick has a number of coder modules to support the reading and/or writing of an image format (e.g. JPEG). Some coder modules support more than one associated image format and the mapping between an associated format and its respective coder module is defined in this configuration file. For example, the PNG coder module not only supports the PNG image format, but the JNG and MNG formats as well.</p>
196 <dt class="doc"><a href="../source/colors.xml">colors.xml</a></dt>
197 <dd>Associate a color name with its red, green, blue, and alpha intensities.
199 <p>A number of command line options require a <a href="color.html">color parameter</a>. It is often convenient to refer to a color by name (e.g. white) rather than by hex value (e.g. #fff). This file maps a color name to its equivalent red, green, blue, and alpha intensities (e.g. for white, red = 255, green = 255, blue = 255, and alpha = 0).</p>
202 <dt class="doc"><a id="configure.xml"></a><a href="../source/configure.xml">configure.xml</a></dt>
203 <dd>Set ImageMagick build parameters and system-wide environment variables (e.g. MAGICK_TEMPORARY_PATH).
205 As ImageMagick is built, a number of build parameters are saved to this configuration file. They include the version, release date, dependent delegate libraries, and quantum depth among others.</p>
208 <dt class="doc"><a href="../source/delegates.xml">delegates.xml</a></dt>
209 <dd>Associate delegate programs with certain image formats.
211 <p>ImageMagick relies on a number of delegate programs to support certain image formats such as <a href="http://ufraw.sourceforge.net/">ufraw-batch</a> to read raw camera formats or <a href="http://www.cs.wisc.edu/~ghost/">Ghostscript</a> to read Postscript images. Use this configuration file to map an input or output format to an external delegate program.</p>
214 <dt class="doc"><a href="../source/english.xml">english.xml</a></dt>
215 <dd>Associate message tags with English translations.</dd>
217 <dt class="doc"><a href="../source/francais.xml">francais.xml</a></dt>
218 <dd>Associate message tags with French translations. </dd>
220 <dt class="doc"><a href="../source/locale.xml">locale.xml</a></dt>
221 <dd>Associate message tags with a translation for your locale.
223 <p>ImageMagick has a number of informational, warning, and error messages that are represented as tags. Tags are short descriptions of a message such as
224 <em>FileNotFound</em> or <em>MemoryAllocationFailed</em>. This configuration file lists locales that have a translation for each tag recognized by ImageMagick. Currently only English and French translations are available in the <code>english.xml</code> and <code>francais.xml</code> configuration files.</p>
227 <dt class="doc"><a href="../source/log.xml">log.xml</a></dt>
228 <dd>Configure logging parameters.
229 <p>ImageMagick is capable of spewing copious amounts of informational or debugging statements. Use this file to configure how the information will appear in a log message and where you want the logging messages posted.</p>
232 <dt class="doc"><a href="../source/magic.xml">magic.xml</a></dt>
233 <dd>Associate an image format with a unique identifier.
234 <p>Many image formats have identifiers that uniquely identify a particular image format. For example, the GIF image format always begins with <code>GIF8</code> as the first 4 characters of the image. ImageMagick uses this information to quickly determine the type of image it is dealing with when it reads an image.</p>
237 <dt class="doc"><a href="../source/mime.xml">mime.xml</a></dt>
238 <dd>Associate an internet media type with a unique identifier.
239 <p>Many files and data streams have identifiers that uniquely identify a
240 particular internet media type. For example, files in the "Corel Draw
241 drawing" format (mime type="application/vnd.corel-draw") are associated with
242 the filename pattern <code>*.cdr</code>, and also have an initial string of the
243 characters "CDRXvrsn". ImageMagick uses combinations of this information,
244 when available, to attempt to quickly determine the internet media type of a
245 file or data stream.</p>
248 <dt class="doc"><a href="../source/policy.xml">policy.xml</a></dt>
249 <dd>Configure ImageMagick policies.
250 <p>By default any coder, delegate, filter, or file path is permitted. Use a policy to deny access to, for example, the MPEG video delegate, or permit reading images from a file system but deny writing to that same file system. Or use the resource policy to set resource limits. Policies are useful for multi-user servers that want to limit the overall impact ImageMagick has on the system. For example, to limit the maximum image size in memory to 100MB:</p>
253 <policy domain="resource" name="area" value="100MB"/>
256 <p>Any image larger than this area limit is cached to disk rather than memory.</p>
258 <p>To limit the elapsed time of any ImageMagick command to 5 minutes, use this policy:</p>
261 <policy domain="resource" name="time" value="300"/>
263 <p>Define arguments for the memory, map, area, and disk resources with SI prefixes (.e.g 100MB). In addition, resource policies are maximums for each instance of ImageMagick (e.g. policy memory limit 1GB, the <code>-limit 2GB</code> option exceeds policy maximum so memory limit is 1GB).</p> </dd>
265 <dt class="doc"><a href="../source/quantization-table.xml">quantization-table.xml</a></dt>
266 <dd>Custom JPEG quantization tables. Activate with <code>-define:q-table=quantization-table.xml</code>.</dd>
268 <dt class="doc"><a href="../source/thresholds.xml">thresholds.xml</a></dt>
269 <dd>Set threshold maps for ordered posterized dither.</dd>
271 <dt class="doc"><a id="type.xml"></a><a href="../source/type.xml">type.xml</a></dt>
273 <p>Define the font name, family, foundry, style, format, metrics, and glyphs for any font you want to use within ImageMagick.</p>
276 <dt class="doc"><a href="../source/type-ghostscript.xml">type-ghostscript.xml</a></dt>
277 <dd>Configure <a href="http://www.cs.wisc.edu/~ghost/">Ghostscript</a> fonts.
278 <p>The Ghostscript package includes a number of <a href="https://sourceforge.net/projects/gs-fonts/">fonts</a> that can be accessed with ImageMagick.</p>
281 <dt class="doc"><a href="../source/type-windows.xml">type-windows.xml</a></dt>
282 <dd>Associate names with Windows font glyphs.</dd>
286 <p>Under Unix and Linux, ImageMagick searches for each of the configuration files listed above by looking in the locations given below, in order, and loads them if found:</p>
289 $MAGICK_CONFIGURE_PATH
290 $PREFIX/etc/ImageMagick
291 $PREFIX/share/ImageMagick-6.8.6
293 <<em>client path</em>>/etc/ImageMagick/
296 <p>The environmental variable $PREFIX is the default install path (e.g. <code>/usr/local</code>). The <em>client path</em> is the execution path of your ImageMagick client (e.g. <code>/usr/local</code>) .</p>
298 <p>For the Unix or Linux pre-compiled uninstalled binary distributions, the configuration load order is:</p>
301 $MAGICK_CONFIGURE_PATH
302 $MAGICK_HOME/etc/ImageMagick
303 $MAGICK_HOME/share/ImageMagick-6.8.6
304 $PREFIX/share/ImageMagick-6.8.6
306 <<em>client path</em>>/etc/ImageMagick/
307 <<em>current directory</em>>
310 <p>Under Windows, ImageMagick searches for these configuration files in the following order, and loads them if found:</p>
313 $MAGICK_CONFIGURE_PATH
314 <<em>windows registry</em>>
316 $USERPROFILE/.magick/
317 <<em>client path</em>>
320 <p>Above, $PREFIX is the default install path, typically <code>c:\\Program Files\\ImageMagick-6.8.6</code>.</p>
322 <p>For an uninstalled Windows installation, the configuration load order is:</p>
325 $MAGICK_CONFIGURE_PATH
327 $USERPROFILE/.magick/
329 <<em>current directory</em>>
332 <p>If a configuration file cannot not be found, ImageMagick relies on built-in default values.</p>
336 <h2><a id="modules"></a>Modules</h2>
337 <div class="doc-section">
340 <p>An image coder (i.e. encoder / decoder) is responsible for registering, optionally classifying, optionally reading, optionally writing, and unregistering one image format (e.g. PNG, GIF, JPEG, etc.). ImageMagick searches for coders in the following order and it uses the first match found:</p>
343 $MAGICK_HOME/lib/ImageMagick-6.8.6/modules-Q16/coders/
344 <<em>client path</em>>/../lib/ImageMagick-6.8.6/modules-Q16/coders/
345 $MAGICK_HOME/lib/ImageMagick-6.8.6/modules-Q16/coders
346 $MAGICK_HOME/share/ImageMagick-6.8.6/modules-Q16/coders
348 <<em>client path</em>>/lib/ImageMagick-6.8.6/modules-Q16/coders
352 <p>ImageMagick provides a convenient mechanism for adding your own custom image processing algorithms. ImageMagick searches for filters in the following order and it uses the first match found:</p>
354 $MAGICK_HOME/lib/ImageMagick-6.8.6/modules-Q16/filters/
355 <<em>client path</em>>/../lib/ImageMagick-6.8.6/modules-Q16/filters/
356 $MAGICK_HOME/lib/ImageMagick-6.8.6/modules-Q16/filters
357 $MAGICK_HOME/share/ImageMagick-6.8.6/modules-Q16/filters
359 <<em>client path</em>>/lib/ImageMagick-6.8.6/modules-Q16/filters
364 <h2><a id="fonts"></a>Fonts</h2>
365 <div class="doc-section">
367 <p>ImageMagick is able to load raw TrueType and Postscript font files. It searches for the font configuration file, <a href="resources.html#type.xml">type.xml</a>, in the following order, and loads them if found:</p>
370 $MAGICK_CONFIGURE_PATH
371 $MAGICK_HOME/etc/ImageMagick/
372 $MAGICK_HOME/share/ImageMagick-6.8.6/
374 <<em>client path</em>>/etc/ImageMagick/
380 <h2><a id="environment"></a>Environment Variables</h2>
381 <div class="doc-section">
383 <p>Environment variables recognized by ImageMagick include:</p>
386 <dt class="doc">HOME</dt>
387 <dd>Set path to search for configuration files in <em>$HOME/.magick</em> if the directory exists.</dd>
388 <dt class="doc">LD_LIBRARY_PATH</dt>
389 <dd>Set path to the ImageMagick shareable libraries and other dependent libraries.</dd>
390 <dt class="doc">MAGICK_AREA_LIMIT</dt>
391 <dd>Set the maximum <em>width * height</em> of an image that can reside in the pixel cache memory.</dd>
392 <dd>Images that exceed the area limit are cached to disk (see <a href="resources.html#disk-limit">MAGICK_DISK_LIMIT</a>) and optionally memory-mapped.</dd>
393 <dt class="doc">MAGICK_CODER_FILTER_PATH</dt>
394 <dd>Set search path to use when searching for filter process modules (invoked via <a href="command-line-options.html#process">-process</a>).</dd>
395 <dd>This path permits the user to extend ImageMagick's image processing functionality by adding loadable modules to a preferred location rather than copying them into the ImageMagick installation directory. The formatting of the search path is similar to operating system search paths (i.e. colon delimited for Unix, and semi-colon delimited for Microsoft Windows). This user specified search path is searched before trying the <a href="resources.html#modules">default search path</a>.</dd>
396 <dt class="doc">MAGICK_CODER_MODULE_PATH</dt>
397 <dd>Set path where ImageMagick can locate its coder modules.</dd>
398 <dd>This path permits the user to arbitrarily extend the image formats supported by ImageMagick by adding loadable coder modules from an preferred location rather than copying them into the ImageMagick installation directory. The formatting of the search path is similar to operating system search paths (i.e. colon delimited for Unix, and semi-colon delimited for Microsoft Windows). This user specified search path is searched before trying the <a href="resources.html#modules">default search path</a>.</dd>
399 <dt class="doc">MAGICK_CONFIGURE_PATH</dt>
400 <dd>Set path where ImageMagick can locate its configuration files</dd>
401 <dd>Use this search path to search for configuration (.xml) files. The formatting of the search path is similar to operating system search paths (i.e. colon delimited for Unix, and semi-colon delimited for Microsoft Windows). This user specified search path is searched before trying the <a href="resources.html#configure">default search path</a>.</dd>
402 <dt class="doc">MAGICK_DEBUG</dt>
403 <dd>Set debug options.</dd>
404 <dd>See <a href="command-line-options.html#debug">-debug</a> for a description of debugging options.</dd>
405 <dt class="doc"><a id="disk-limit"></a>MAGICK_DISK_LIMIT</dt>
406 <dd>Set maximum amount of disk space in bytes permitted for use by the pixel cache.</dd>
407 <dd>When this limit is exceeded, the pixel cache is not be created and an error message is returned.</dd>
408 <dt class="doc">MAGICK_FILE_LIMIT</dt>
409 <dd>Set maximum number of open pixel cache files.</dd>
410 <dd>When this limit is exceeded, any subsequent pixels cached to disk are closed and reopened on demand. This behavior permits a large number of images to be accessed simultaneously on disk, but with a speed penalty due to repeated open/close calls.</dd>
411 <dt class="doc">MAGICK_FONT_PATH</dt>
412 <dd>Set path ImageMagick searches for TrueType and Postscript Type1 font files.</dd>
413 <dd>This path is only consulted if a particular font file is not found in the current directory.</dd>
414 <dt class="doc">MAGICK_HOME</dt>
415 <dd>Set the path at the top of ImageMagick installation directory.</dd>
416 <dd>This path is consulted by <em>uninstalled</em> builds of ImageMagick which do not have their location hard-coded or set by an installer.</dd>
417 <dt class="doc"><a id="map-limit"></a>MAGICK_MAP_LIMIT</dt>
418 <dd>Set maximum amount of memory map in bytes to allocate for the pixel cache.</dd>
419 <dd>When this limit is exceeded, the image pixels are cached to disk (see MAGICK_DISK_LIMIT).</dd>
420 <dt class="doc">MAGICK_MEMORY_LIMIT</dt>
421 <dd>Set maximum amount of memory in bytes to allocate for the pixel cache from the heap.</dd>
422 <dd>When this limit is exceeded, the image pixels are cached to memory-mapped disk (see <a href="resources.html#map-limit">MAGICK_MAP_LIMIT</a>).</dd>
423 <dt class="doc">MAGICK_PRECISION</dt>
424 <dd>Set the maximum number of significant digits to be printed.</dd>
425 <dt class="doc">MAGICK_SHRED_PASSES</dt>
426 <dd>If you want to keep the temporary files ImageMagick creates private, overwrite them with zeros or random data before they are removed. On the first pass, the file is zeroed. For subsequent passes, random data is written.</dd>
427 <dt class="doc">MAGICK_SYNCHRONIZE</dt>
428 <dd>Set to "true" to ensure all image data is fully flushed and synchronized to disk. There is a performance penalty, however, the benefits include ensuring a valid image file in the event of a system crash and early reporting if there is not enough disk space for the image pixel cache.</dd>
429 <dt class="doc">MAGICK_TEMPORARY_PATH</dt>
430 <dd>Set path to store temporary files.</dd>
431 <dt class="doc">MAGICK_THREAD_LIMIT</dt>
432 <dd>Set maximum parallel threads.</dd>
433 <dd>Many ImageMagick algorithms run in parallel on multi-processor systems. Use this enviroment variable to set the maximum number of threads that are permitted to run in parallel.</dd>
434 <dt class="doc">MAGICK_THROTTLE</dt>
435 <dd>Periodically yield the CPU for at least the time specified in milliseconds.</dd>
436 <dt class="doc">MAGICK_TIME_LIMIT</dt>
437 <dd>Set maximum time in seconds.</dd>
438 <dd>When this limit is exceeded, an exception is thrown and processing stops.</dd>
440 <p>Define arguments for the MAGICK_AREA_LIMIT, MAGICK_DISK_LIMIT, MAGICK_MAP_LIMIT, and MAGICK_MEMORY_LIMIT environment variables with SI prefixes (.e.g 100MB).</p>
446 <span id="linkbar-west"> </span>
448 <span id="linkbar-center">
449 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> •
450 <a href="../discourse-server">Discourse Server</a> •
451 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a> •
452 <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
454 <span id="linkbar-east"> </span>
457 <span id="footer-west">© 1999-2013 ImageMagick Studio LLC</span>
458 <span id="footer-east"> <a href="contact.html">Contact the Wizards</a></span>
460 <div style="clear: both; margin: 0; width: 100%; "></div>