blob: c7887d98dc55747b32a448c250c348471b1286d8 [file] [log] [blame]
cristydcca3fa2010-12-29 21:50:07 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
cristy2bd2a982011-02-15 00:52:58 +00003<html version="-//W3C//DTD XHTML 1.1//EN"
4 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
5 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6 xsi:schemaLocation="http://www.w3.org/1999/xhtml
7 http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
cristy3eaa0ef2010-03-06 20:35:26 +00008<head>
cristy3c98a4f2010-08-13 20:09:41 +00009 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
10 <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U="/>
cristyffb69ed2010-12-25 00:06:48 +000011 <title>ImageMagick: Advanced Windows Source Installation</title>
cristy3ed852e2009-09-05 21:47:34 +000012 <meta http-equiv="Content-Language" content="en-US"/>
13 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
14 <meta http-equiv="Reply-to" content="magick-users@imagemagick.org"/>
cristy3c98a4f2010-08-13 20:09:41 +000015 <meta name="Application-name" content="ImageMagick"/>
cristyaf8d6652011-02-04 21:57:45 +000016 <meta name="Description" content="Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition resize, rotate, shear, distort and transform images."/>
cristy3c98a4f2010-08-13 20:09:41 +000017 <meta name="Application-url" content="http://www.imagemagick.org"/>
cristy3ed852e2009-09-05 21:47:34 +000018 <meta name="Generator" content="PHP"/>
19 <meta name="Keywords" content="advanced, windows, source, installation, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Swiss, Army, Knife, Image, Processing"/>
cristy3ed852e2009-09-05 21:47:34 +000020 <meta name="Rating" content="GENERAL"/>
21 <meta name="Robots" content="INDEX, FOLLOW"/>
22 <meta name="Generator" content="ImageMagick Studio LLC"/>
23 <meta name="Author" content="ImageMagick Studio LLC"/>
24 <meta name="Revisit-after" content="2 DAYS"/>
25 <meta name="Resource-type" content="document"/>
cristy7e41fe82010-12-04 23:12:08 +000026 <meta name="Copyright" content="Copyright (c) 1999-2011 ImageMagick Studio LLC"/>
cristy3ed852e2009-09-05 21:47:34 +000027 <meta name="Distribution" content="Global"/>
cristydcca3fa2010-12-29 21:50:07 +000028 <link rel="icon" href="../images/wand.png"/>
cristy3c98a4f2010-08-13 20:09:41 +000029 <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon"/>
30 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>
cristy7a40ba82011-01-08 20:31:18 +000031 <link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
cristy3c98a4f2010-08-13 20:09:41 +000032 <style type="text/css" media="all">
33 @import url("../www/magick.css");
34 </style>
cristydcca3fa2010-12-29 21:50:07 +000035 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
cristy361f4662010-12-31 23:02:52 +000036 <script type="text/javascript" src="../fancybox/jquery.fancybox-1.3.4.pack.js"></script>
37 <link rel="stylesheet" type="text/css" href="../fancybox/jquery.fancybox-1.3.4.css" media="screen" />
38 <script type="text/javascript">
39 $(document).ready(function() {
40 $("a[href$=.jpg],a[href$=.png],a[href$=.gif]").fancybox({
41 'transitionIn' : 'elastic',
42 'transitionOut' : 'elastic',
43 'overlayShow' : false,
44 'opacity' : true
45 });
46 });
47 </script>
cristy3eaa0ef2010-03-06 20:35:26 +000048</head>
49
50<body id="www-imagemagick-org">
51<div class="titlebar">
cristyb52981c2011-03-19 17:09:31 +000052<div style="margin: 17px auto; float: left;">
53 <script type="text/javascript">
54 <!--
55 google_ad_client = "pub-3129977114552745";
56 google_ad_slot = "5439289906";
57 google_ad_width = 728;
58 google_ad_height = 90;
59 //-->
60 </script>
61 <script type="text/javascript"
62 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
63 </script>
64</div>
cristy3eaa0ef2010-03-06 20:35:26 +000065<a href="http://www.imagemagick.org/discourse-server/">
cristyaf8d6652011-02-04 21:57:45 +000066 <img src="../images/logo.jpg"
67 alt="ImageMagick Logo"
cristy178edaf2011-01-23 03:42:39 +000068 style="width: 123px; height: 118px; border: 0px; float: right;" /></a>
cristy3eaa0ef2010-03-06 20:35:26 +000069<a href="../index.html">
cristyaf8d6652011-02-04 21:57:45 +000070 <img src="../images/sprite.jpg"
71 alt="ImageMagick Sprite"
cristy3eaa0ef2010-03-06 20:35:26 +000072 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
73</div>
74
cristyce69bb02010-07-27 19:49:46 +000075<div class="westbar">
cristy3eaa0ef2010-03-06 20:35:26 +000076
cristy3ed852e2009-09-05 21:47:34 +000077<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000078 <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
cristy3ed852e2009-09-05 21:47:34 +000079</div>
cristy3eaa0ef2010-03-06 20:35:26 +000080<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +000081<div class="menu">
cristybb503372010-05-27 20:51:26 +000082 <a title="Binary Releases" href="../www/binary-releases.html">Binary Releases</a>
83</div>
84<div class="sub">
85 <a title="Binary Release: Unix" href="../www/binary-releases.html#unix">Unix</a>
86</div>
87<div class="sub">
88 <a title="Binary Release: MacOS X" href="../www/binary-releases.html#macosx">Mac OS X</a>
89</div>
90<div class="sub">
cristyda16f162011-02-19 23:52:17 +000091 <a title="Binary Release: iPhone" href="../www/binary-releases.html#iPhone">iPhone</a>
92</div>
93<div class="sub">
cristybb503372010-05-27 20:51:26 +000094 <a title="Binary Release: Windows" href="../www/binary-releases.html#windows">Windows</a>
95</div>
96<div class="sep"></div>
97<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000098 <a title="Command-line Tools" href="../www/command-line-tools.html">Command-line Tools</a>
cristy3ed852e2009-09-05 21:47:34 +000099</div>
100<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000101 <a title="Command-line Tools: Processing" href="../www/command-line-processing.html">Processing</a>
cristy3ed852e2009-09-05 21:47:34 +0000102</div>
103<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000104 <a title="Command-line Tools: Options" href="../www/command-line-options.html">Options</a>
cristy3ed852e2009-09-05 21:47:34 +0000105</div>
106<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000107 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
cristy3ed852e2009-09-05 21:47:34 +0000108</div>
109<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000110 <a title="Program Interfaces" href="../www/api.html">Program Interfaces</a>
cristy3ed852e2009-09-05 21:47:34 +0000111</div>
112<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000113 <a title="Program Interface: MagickWand" href="../www/magick-wand.html">MagickWand</a>
cristy3ed852e2009-09-05 21:47:34 +0000114</div>
115<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000116 <a title="Program Interface: MagickCore" href="../www/magick-core.html">MagickCore</a>
cristy3ed852e2009-09-05 21:47:34 +0000117</div>
118<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000119 <a title="Program Interface: PerlMagick" href="../www/perl-magick.html">PerlMagick</a>
cristy3ed852e2009-09-05 21:47:34 +0000120</div>
121<div class="sub">
cristydcca3fa2010-12-29 21:50:07 +0000122 <a title="Program Interface: Magick++" href="../www/magick++.html">Magick++</a>
cristy3ed852e2009-09-05 21:47:34 +0000123</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000124<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000125<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000126 <a title="Install from Source" href="../www/install-source.html">Install from Source</a>
cristy3ed852e2009-09-05 21:47:34 +0000127</div>
128<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000129 <a title="Install from Source: Unix" href="../www/install-source.html#unix">Unix</a>
cristy3ed852e2009-09-05 21:47:34 +0000130</div>
131<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000132 <a title="Install from Source: Windows" href="../www/install-source.html#windows">Windows</a>
cristy3ed852e2009-09-05 21:47:34 +0000133 </div>
134<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000135 <a title="Resources" href="../www/resources.html">Resources</a>
cristy3ed852e2009-09-05 21:47:34 +0000136</div>
cristybb503372010-05-27 20:51:26 +0000137<div class="menu">
138 <a title="Architecture" href="../www/architecture.html">Architecture</a>
139</div>
cristy3ed852e2009-09-05 21:47:34 +0000140<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000141 <a title="Download" href="../www/download.html">Download</a>
cristy3ed852e2009-09-05 21:47:34 +0000142</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000143<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000144<div class="menu">
cristy52923442011-01-15 22:54:31 +0000145 <a title="Search" href="../www/search.html">Search</a>
cristy3ed852e2009-09-05 21:47:34 +0000146</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000147<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000148<div class="menu">
cristyffb69ed2010-12-25 00:06:48 +0000149 <a title="Site Map" href="../www/sitemap.html">Site Map</a>
cristy3ed852e2009-09-05 21:47:34 +0000150</div>
151<div class="sub">
cristyffb69ed2010-12-25 00:06:48 +0000152 <a title="Site Map: Links" href="../www/links.html">Links</a>
cristy3ed852e2009-09-05 21:47:34 +0000153</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000154<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000155<div class="menu">
cristy10549a12011-05-15 19:04:46 +0000156 <a rel="follow" title="Sponsors" href="../www/sponsors.html">Sponsors:</a>
cristy3ed852e2009-09-05 21:47:34 +0000157
cristyb52981c2011-03-19 17:09:31 +0000158<a href="http://www.networkredux.com">
159 <img src="../images/networkredux.png" alt="[sponsor]"
160 style="margin-top: 4px; margin-left: 4px; border: 0px; float: left;" /></a>
cristy3ed852e2009-09-05 21:47:34 +0000161<div class="sponsbox">
cristy178edaf2011-01-23 03:42:39 +0000162<div class="sponsor">
cristy4bf6e232011-05-21 01:43:33 +0000163 <a rel="follow" title="Sponsor: Web Hosting Break" href="http://www.webhostingbreak.com">Web Hosting Break</a><!-- 201109010090 ian@ian-m... -->
cristy45dbd322011-03-27 16:40:38 +0000164</div>
165<div class="sponsor">
cristy10549a12011-05-15 19:04:46 +0000166 <a rel="follow" title="Sponsor: Druckerei" href="http://www.allesdruck.de">Druckerei</a><!-- 201303011500 r.leo -->
cristy4c54bbb2011-03-17 13:53:13 +0000167</div>
168<div class="sponsor">
cristy4bf6e232011-05-21 01:43:33 +0000169 <a rel="follow" title="Sponsor: Website Hosting" href="http://www.hostreviewgeeks.com">Website Hosting</a><!-- 201109010090 alexanian media -->
170</div>
171<div class="sponsor">
cristy10549a12011-05-15 19:04:46 +0000172 <a rel="follow" title="Sponsor: Hotel München" href="http://www.messehotel-erb-muenchen.de">Hotel München</a><!-- 201111010450 cerb -->
cristyaf8d6652011-02-04 21:57:45 +0000173</div>
174<div class="sponsor">
cristy10549a12011-05-15 19:04:46 +0000175 <a rel="follow" title="Sponsor: Best Web Hosting" href="http://webhostinggeeks.com">Best Web Hosting</a><!-- 201110010720 -->
cristya6d7cf72010-11-07 15:58:34 +0000176</div>
177<div class="sponsor">
cristy10549a12011-05-15 19:04:46 +0000178 <a rel="follow" title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
cristyee742642011-02-26 02:49:59 +0000179</div>
180<div class="sponsor">
cristy10549a12011-05-15 19:04:46 +0000181 <a rel="follow" title="Sponsor: Web Hosting Reviews" href="http://www.webhostingmasters.com">Web Hosting Reviews</a><!-- 201107011500 affliatelabel -->
cristy851dbce2010-08-06 21:40:00 +0000182</div>
cristyec6b4752011-01-08 03:16:23 +0000183<div class="sponsor">
cristy10549a12011-05-15 19:04:46 +0000184 <a rel="follow" title="Sponsor: Druckerei" href="http://print24.com/de/">Druckerei</a><!-- 201110010720 -->
cristy178edaf2011-01-23 03:42:39 +0000185</div>
186<div class="sponsor">
cristy10549a12011-05-15 19:04:46 +0000187 <a rel="follow" title="Sponsor: Web Hosting Ratings" href="http://webhostingrating.com">Web Hosting Ratings</a><!-- 201110010720 -->
cristybaacd172011-04-30 23:11:03 +0000188</div>
189<div class="sponsor">
cristy4bf6e232011-05-21 01:43:33 +0000190 <a rel="follow" title="Kaffeevollautomaten Reparatur Kundendienst Berlin" href="http://www.kaffeemaschinen-center.de">Kaffeevollautomaten Reparatur Berlin</a><!-- 2011090100025 c.karule-->
cristyec6b4752011-01-08 03:16:23 +0000191</div>
cristy3ed852e2009-09-05 21:47:34 +0000192</div>
193</div>
cristyce69bb02010-07-27 19:49:46 +0000194</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000195
cristyce69bb02010-07-27 19:49:46 +0000196<div class="eastbar">
cristyb52981c2011-03-19 17:09:31 +0000197
cristy3eaa0ef2010-03-06 20:35:26 +0000198</div>
199
200<div class="main">
201
202
cristyffb69ed2010-12-25 00:06:48 +0000203<h1>ImageMagick Advanced Windows Installation</h1>
cristy3ed852e2009-09-05 21:47:34 +0000204<p class="navigation-index">[<a href="#download">Download &amp; Unpack</a> &bull; <a href="#configure">Configure</a> &bull; <a href="#build">Build</a> &bull; <a href="#install">Install</a> &bull; <a href="#binary">Create a Self-installing Binary Distribution</a> &bull; <a href="#problems">Dealing with Unexpected Problems</a> &bull; <a href="#project">Building Your Custom Project</a>]</p>
205
206<div class="doc-section">
207<p>It's possible you don't want to concern yourself with advanced installation under Windows. If so, you also have the option of installing a self-installing <a href="../www/binary-releases.html#windows">binary release</a> or if you still want to install from source without all the fuss see the simple <a href="../www/install-source.html#windows">Install From Source</a> instructions. However, if you want to customize the configuration and installation of ImageMagick under Windows, lets begin.</p>
208</div>
209
cristydcca3fa2010-12-29 21:50:07 +0000210<h2><a id="download"></a>Download &amp; Unpack</h2>
cristy3ed852e2009-09-05 21:47:34 +0000211<div class="doc-section">
212
213<p>Building ImageMagick source for Windows requires a modern version of Microsoft Visual Studio IDE. Users have reported success with the Borland C++ compiler as well. If you don't have a compiler you can still install a self-installing <a href="../www/binary-releases.html#windows">binary release</a>.</p>
214
215<p>Download <a href="ftp://ftp.imagemagick.org/pub/ImageMagick/windows/ImageMagick-windows.zip">ImageMagick-windows.zip</a> from <a href="ftp://ftp.imagemagick.org/pub/ImageMagick/windows">ftp.imagemagick.org</a> or its <a href="../www/download.html">mirrors</a> and verify the distribution against its <a href="http://www.imagemagick.org/download/windows/digest.rdf">message digest</a>.</p>
216
217<p>You can unpack the distribution with <a href="http://www.winzip.com">WinZip</a> or type the following from any MS-DOS Command Prompt window:</p>
218
219<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>unzip ImageMagick-windows.zip</span></p>
220<p>Now that you have the ImageMagick Windows source distribution unpacked, let's configure it.</p>
221
222</div>
223
cristydcca3fa2010-12-29 21:50:07 +0000224<h2><a id="configure"></a>Configure</h2>
cristy3ed852e2009-09-05 21:47:34 +0000225<div class="doc-section">
226
227<p>These instructions are specific to building ImageMagick with the <a href="http://msdn.microsoft.com/vstudio/">Visual Studio</a> under Windows XP, Win2K, or Windows 98. ImageMagick does not include any workspace (DSW) or project files (DSP) except for those included with third party libraries. Instead, there is a <kbd>configure</kbd> program that must be built and run which creates the Visual Studio workspaces for ImageMagick. The Visual Studio system provides four different types of <em>runtime</em> environments that must match across all application, library, and dynamic-library (DLL) code that is built. The <kbd>configure</kbd> program creates a set of build files that are consistent for a specific runtime selection listed here:</p>
228
229<ol>
230 <li>Dynamic Multi-threaded DLL runtimes (VisualDynamicMT).</li>
231 <li>Static Single-threaded runtimes (VisualStaticST).</li>
232 <li>Static Multi-threaded runtimes (VisualStaticMT).</li>
233 <li>Static Multi-threaded DLL runtimes (VisualStaticMTDLL).</li>
234</ol>
235
236<p>In addition to these runtimes, the VisualMagick build environment allows you to select whether to include the X11 libraries in the build or not. X11 DLLs and headers are provided with the VisualMagick build environment. Most Windows users are probably not interested in using X11, so you might prefer to build without X11 support. Since the <kbd>animate</kbd>, <kbd>display</kbd>, and <kbd>import</kbd> program depends on the X11 delegate libraries, these programs will no work if you choose not to include X11 support.</p>
237
238<p>This leads to five different possible build options. The default binary distribution is built using the Dynamic Multi-threaded DLL (VisualDynamicMT) option with the X11 libraries included. This results in an X11 compatible build using all DLL's for everything and multi-threaded support (the only option for DLL's).</p>
239
240<p>To create a workspace for your requirements, simply go to the <kbd>VisualMagick\configure</kbd> folder and open the <kbd>configure.dsw</kbd> workspace (for Visual Studio 6) or <kbd>configure.sln</kbd> (for Visual Studio 7 or 8). Set the build configuration to <em>Release</em>.</p>
241
242<p>Build and execute the configure program and follow the on-screen instructions. You should not change any of the defaults unless you have a specific reason to do so.</p>
243
244<p>The configure program has a button entitled:</p>
245
246<p class="text">
247 Edit "magick_config.h"
248</p>
249
250<p>Click on this button to bring up <kbd>magick-config.h</kbd> in Windows Notepad. Review and optionally change any preprocessor defines in ImageMagick's <kbd>magick_config.h</kbd> file to suit your needs. This file is copied to <kbd>magick\magick_config.h</kbd>. You may safely open <kbd>magick\magick_config.h</kbd>, modify it, and recompile without re-running the configure program. In fact, using Notepad to edit the copied file may be preferable since it preserves the original <kbd>magick_config.h</kbd> file.</p>
251
252<p>Key user defines in <kbd>magick_config.h</kbd> include:</p>
253
254<dl class="doc">
255<dt> MAGICKCORE_QUANTUM_DEPTH (default 16)</dt>
256 <dd>Specify the depth of the pixel component depth (8, 16, or 32). A value of 8 uses half the memory than 16 and may run 30% faster, but provides 256 times less color resolution than a value of 16. We recommend a quantum depth of 16 because 16-bit images are becoming more prevalent on the Internet.</dd>
257<dt>MAGICKCORE_INSTALLED_SUPPORT (default undefined)</dt>
258 <dd>Define to build a ImageMagick which uses registry settings or embedded paths to locate installed components (coder modules and configuration files). The default is to look for all files in the same directory as the executable. You will wand to define this value if you intend on <a href="#install">installing</a> ImageMagick on your system.</dd>
cristya3e27cb2010-01-14 07:31:54 +0000259<dt>ProvideDllMain (default defined)</dt>
cristy3ed852e2009-09-05 21:47:34 +0000260 <dd>Define to include a DllMain() function ensures that the ImageMagick DLL is properly initialized without participation from dependent applications. This avoids the requirement to invoke IntializeMagick() from dependent applications is only useful for DLL builds.</dd>
261</dl>
262
263<p>ImageMagick is now configured and ready to build.</p>
264
265<p>The default build is WIN32. For 64-bit, open a newly created static solution and enter Configuration Manager. Add a x64 configuration, copying the configuration from WIn32. Be sure that it adds the configuration to all the projects. Now compile.</p>
266
267</div>
268
cristydcca3fa2010-12-29 21:50:07 +0000269<h2><a id="Build"></a>Build</h2>
cristy3ed852e2009-09-05 21:47:34 +0000270<div class="doc-section">
271
272<p>After creating your build environment, proceed to open the DSW (or SLN) workspace in the <kbd>VisualMagick</kbd> folder. In the DSW file choose the <em>All</em> project to make it the <em>active</em> project. Set the build configuration to the desired one (Debug, or Release) and <em>clean</em> and <em>build:</em></p>
273
274<ol>
275 <li>Right click on the All project and select <em>Set As Active Project</em></li>
276 <li>Select "Build=>Clean Solution"</li>
277 <li>Select "Build=>Build Solution"</li>
278</ol>
279
280<p>The <em>clean</em> step is necessary in order to make sure that all of the target support libraries are updated with any patches needed to get them to compile properly under Visual Studio.</p>
281
282<p>After a successful build, all of the required files that are needed to run any of the <a href="../www/command-line-tools.html">command line tools</a> are located in the <kbd>VisualMagick\bin</kbd> folder. This includes EXE, DLL libraries, and ImageMagick configuration files. You should be able to test the build directly from this directory without having to move anything to any of the global SYSTEM or SYSTEM32 areas in the operating system installation.</p>
283
284<p>The Visual Studio distribution of ImageMagick comes with the Magick++ C++ wrapper by default. This add-on layer has a large number of demo and test files that can be found in <kbd>ImageMagick\Magick++\demo</kbd>, and <kbd>ImageMagick\Magick++\tests</kbd>. There are also a variety of tests that use the straight C API as well in ImageMagick\tests.</p>
285
286<p> All of these programs are <em>not</em> configured to be built in the default workspace created by the configure program. You can cause all of these demos and test programs to be built by checking the box in configure that says:</p>
287
288<p class="text">
289 Include all demo and test programs
290</p>
291
292<p>In addition, there is another related checkbox (checked by default) that causes all generated project files to be created standalone so that they can be copied to other areas of you system.</p>
293
294<p>This the checkbox:</p>
295
296<p class="text">
297 Generate all utility projects with full paths rather then relative paths.
298</p>
299
300<p>Visual Studio uses a concept of <em>dependencies</em> that tell it what other components need to be build when a particular project is being build. This mechanism is also used to ensure that components link properly. In my normal development environment, I want to be able to make changes and debug the system as a whole, so I like and NEED to use dependencies. However, most end users don't want to work this way.</p>
301
302<p>Instead they really just want to build the package and then get down to business working on their application. The solution is to make all the utility projects (UTIL_xxxx_yy_exe.dsp) use full absolute paths to all the things they need. This way the projects stand on their own and can actually be copied and used as templates to get a particular custom application compiling with little effort.</p>
303
304<p>With this feature enabled, you should be able to nab a copy of</p>
305
306<p class="text">
307 VisualMagick\utilities\UTIL_convert_xxx_exe.dsp (for C) or <br/>
308 VisualMagick\Magick++\demo\UTIL_demo_xxx_exe.dsp (for C++)
309</p>
310
311<p>and pop it into Notepad, modify it (carefully) to your needs and be on your way to happy compiling and linking.</p>
312
313<p> You can feel free to pick any of the standard utilities, tests, or demo programs as the basis for a new program by copying the project and the source and hacking away.</p>
314
315<p>The choice of what to use as a starting point is very easy.</p>
316
317<p>For straight C API command line applications use something from:</p>
318
319<p class="text">
320 ImageMagick\tests or <br/>
321 ImageMagick\utilities (source code) or <br/>
322 ImageMagick\VisualMagick\tests or <br/>
323 ImageMagick\Visualmagick\utilities (project - DSP)
324</p>
325
326<p>For C++ and Magick++ command line applications use something from:</p>
327
328<p class="text">
329 ImageMagick\Magick++\tests or ImageMagick\Magick++\demo (source code) or <br/>
330 ImageMagick\VisualMagick\Magick++\tests or <br/>
331 ImageMagick\VisualMagick\Magick++\demo (project - DSP)
332</p>
333
334<p>For C++ and Magick++ and MFC windows applications use:</p>
335
336<p class="text">
337 ImageMagick\contrib\win32\MFC\NtMagick (source code) or <br/>
338 ImageMagick\VisualMagick\contrib\win32\MFC\NtMagick (project - DSP)
339</p>
340
341<p>The ImageMagick distribution is very modular. The default configuration is there to get you rolling, but you need to make some serious choices when you wish to change things around.</p>
342
343<p>The default options are all targeted at having all the components in one place (e.g. the <kbd>bin</kbd> directory of the VisualMagick build tree). These components may be copied to another folder (such as to another computer).</p>
344
345<p>The folder containing the executables and DLLs should contain the following files:</p>
346
347<ol>
348 <li>magic.xml</li>
349 <li>delegates.xml</li>
350 <li>modules.xml</li>
351 <li>colors.xml</li>
352</ol>
353
354<p>among others.</p>
355
356<p>The <kbd>bin</kbd> folder should contains all EXE's and DLL's as well as the very important <kbd>modules.xml</kbd> file.</p>
357
358<p>With this default setup, you can use any of the command line tools and run scripts as normal. You can actually get by quite nicely this way by doing something like <kbd>pushd e:\xxx\yyy\bin</kbd> in any scripts you write to execute <em>out of</em> this directory.</p>
359
360<p>By default the core of ImageMagick on Win32 always looks in the place were the exe program is run from in order to find all of the files as well as the DLL's it needs.</p>
361
362 <h3>ENVIRONMENT VARIABLES</h3>
363 <div class="doc-section">
364
365 <p>You can use the <em>System</em> control panel to allow you to add and delete what is in any of the environment variables. You can even have user specific environment variables if you wish.</p>
366
367 <h4>PATH</h4>
368 <div class="doc-section">
369 <p>This environmental variable sets the default list of places were Windows looks for EXE's and DLL's. Windows CMD shell seems to look in the <em>current</em> directory first no matter what, which may make it unnecessary to update the PATH. If you wish to run any of utilities from another location then you must add the path to your <kbd>bin</kbd> directory in. For instance, to do this for the default build environment like I do, you might add:</p>
370
371
372 <p class="text">
373 C:\ImageMagick\VisualMagick\bin
374 </p>
375
376 </div>
377
378 <h4>MAGICK_HOME</h4>
379 <div class="doc-section">
380 <p>If all you do is modify the PATH variable, the first problem you will run into is that ImageMagick may not be able to find any of its <em>modules</em>. Modules are all the IM_MOD*.DLL files you see in the distribution. There is one of these for each and every file format that ImageMagick supports. This environment variable tells the system were to look for these DLL's. The compiled in <em>default</em> is <em>execution path</em> - which says - look in the same place that the application is running <em>in</em>. If you are running from somewhere other then <kbd>bin</kbd> - this will no longer work and you must use this variable. If you elect to leave the modules in the same place as the EXE's (a good idea) then you can simply set this to the same place as you did the PATH variable. In my case:</p>
381
382 <p class="text">
383 C:\ImageMagick\coders
384 </p>
385
386 <p>This also the place were ImageMagick expects to find the <kbd>colors.xml</kbd>, <kbd>delegates.xml</kbd>, <kbd>magic.xml</kbd>, <kbd>modules.xml</kbd>, and <kbd>type.xml</kbd> files.</p>
387 </div>
388 </div>
389
390<p>One cool thing about the modules build of ImageMagick is that you can now leave out file formats and lighten you load. If all you ever need is GIF and JPEG, then simply drop all the other DLL's into the local trash can and get on with your life.</p>
391
392<p>Always keep the XC format, since ImageMagick uses it internally.</p>
393
394<p>You can elect to changes these things the good old <em>hard-coded</em> way. This define is applicable in <kbd>magick-config.h</kbd>:</p>
395
396<p class="text">
397 #define MagickConfigurePath "C:\\ImageMagick\\"
398</p>
399
400<p>To view any image in a Microsoft window, type</p>
401
402<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>convert image.ext win:</span></p>
403<p>Make sure <a href="http://www.cs.wisc.edu/~ghost/">Ghostscript</a> is installed, otherwise, you will be unable to convert or view a Postscript document, and Postscript standard fonts will not be available.</p>
404
405<p>You may use any standard web browser (e.g. Internet Explorer) to browse the ImageMagick documentation.</p>
406
407<p>The Win2K executables will work under Windows 98.</p>
408
409<p>ImageMagick is now configured and built. You can optionally install it on your system as discussed below.</p>
410
411<p>If you are looking to install the ImageMagick COM+ object, see <a href="../www/ImageMagickObject.html">Installing the ImageMagickObject COM+ Component</a>.</p>
412
413</div>
414
cristydcca3fa2010-12-29 21:50:07 +0000415<h2><a id="Install"></a>Install</h2>
cristy3ed852e2009-09-05 21:47:34 +0000416<div class="doc-section">
417
418<p>You can run ImageMagick command line utilities directly from the <kbd>VisualMagick\bin</kbd> folder, however, in most cases you may want the convenience of an installer script. ImageMagick provides <a href="http://www.jrsoftware.org">Inno Setup</a> scripts for this purpose. Note, you must define MAGICKCORE_INSTALLED_SUPPORT at <a href="#configure">configure</a> time to utilize the installer scripts.</p>
419
420<p>To get started building a self-installing ImageMagick executable, go to <kbd>VisualMagick\installer</kbd> folder and click on a script that matches your build environment. Press F9 to build and install ImageMagick. The default location is <kbd>C:Program Files\ImageMagick-6.?.?\Q?</kbd>. The exact folder name depends on the ImageMagick version and quantum depth. Once installed, ImageMagick command line utilities and libraries are available to the MS Command Prompt, web scripts, or to meet your development needs.</p>
421
422</div>
423
cristydcca3fa2010-12-29 21:50:07 +0000424<h2><a id="binary"></a>Create a Self-Installing Binary Distribution</h2>
cristy3ed852e2009-09-05 21:47:34 +0000425<div class="doc-section">
426
427<h3>Prerequisites</h3>
428
429 <ol>
cristy6bcf48e2011-02-15 19:09:04 +0000430 <li>Download and install <a href="http://www.jrsoftware.org/isdl.html">Inno Setup 5</a>.</li>
cristy350dea42011-02-15 17:31:04 +0000431 <li>Download and install <a href="http://www.activestate.com/activeperl/downloads">ActiveState ActivePerl</a>.</li>
cristy3ed852e2009-09-05 21:47:34 +0000432 </ol>
433
434<h3>Run the Configure Wizard</h3>
435
436 <ol>
437 <li>Double-click on <kbd>VisualMagick/configure/configure.sln</kbd> to build the configure wizard.</li>
438 <li>Select <kbd>Rebuild All</kbd> and launch the configure wizard.</li>
439 <li>Uncheck <kbd>Use X11 Stubs</kbd> and check <kbd>Build demo and test programs</kbd>.</li>
440 <li>Click on <kbd>Edit magick_config.h</kbd> and define <kbd>MAGICKCORE_INSTALLED_SUPPORT</kbd>.</li>
441 <li>Complete the configure wizard screens to create the ImageMagick Visual C++ workspace.</li>
442 </ol>
443
444<h3>Build ImageMagick</h3>
445
446 <ol>
447 <li>Double-click on <kbd>VisualMagick/VisualDynamicMT.sln</kbd> to launch the ImageMagick Visual workspace.</li>
448 <li>Set the active configuration to <kbd>Win32 Release</kbd>.</li>
449 <li>Select <kbd>Rebuild All</kbd> to build the ImageMagick binary distribution.</li>
450 </ol>
451
452<h3>Build ImageMagickObject</h3>
453
454 <ol>
455 <li>Launch the MS-DOS Command Prompt application and move to the <kbd>contrib\win32\ATL7\ImageMagickObject</kbd> folder.</li>
456 <li>Build ImageMagickObject with these commands:
457 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>BuildImageMagickObject clean</span><span class='crtout'></span><span class="crtprompt"> $magick&gt; </span><span class='crtin'>BuildImageMagickObject release</span></p></li>
458 </ol>
459
460<h3>Build PerlMagick</h3>
461
462 <ol>
463 <li>Launch the MS-DOS Command Prompt application and move to the <kbd>PerlMagick</kbd> folder.</li>
464 <li>Build PerlMagick with these commands:
465 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>perl Makefile.nt</span><span class='crtout'></span><span class="crtprompt"> $magick&gt; </span><span class='crtin'>nmake release</span></p></li>
466 </ol>
467
468<h3>Create the Self-installing ImageMagick Binary Distribution</h3>
469
470 <ol>
471 <li>Double-click on <kbd>VisualMagick/installer/im-dll-16.iss</kbd> to launch the Inno Setup 5 wizard.</li>
472 <li>Select <kbd>File->Compile</kbd>.</li>
473 </ol>
474
475<h3>Install the Binary Distribution</h3>
476
477 <ol>
478 <li>Double-click on
cristy4bf6e232011-05-21 01:43:33 +0000479 <kbd>VisualMagick/bin/ImageMagick-6.6.9-10-Q16-windows-dll.exe</kbd>
cristy3ed852e2009-09-05 21:47:34 +0000480 to launch the ImageMagick binary distribution.</li>
481 <li>Complete the installer screens to install ImageMagick on your system.</li>
482 </ol>
483
484<h3>Test the Binary Distribution</h3>
485
486 <ol>
487 <li>Launch the MS-DOS Command Prompt application and move to the <kbd>PerlMagick</kbd> folder and type
488 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>nmake test</span></p></li>
489
490 <li>Move to the <kbd>VisualMagick/tests</kbd> folder and type
491 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>validate</span></p></li>
492 <li>Move to the <kbd>VisualMagick/Magick++/tests</kbd> folder and type
493 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>run_tests.bat</span></p></li>
494 <li>Move to the <kbd>VisualMagick/Magick++/demo</kbd> folder and type
495 <p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>run_demos.bat</span></p></li>
496 </ol>
497
498<p>If all the tests pass without complaint, the ImageMagick self-install binary distribution is ready for use.</p>
499
500</div>
501
cristydcca3fa2010-12-29 21:50:07 +0000502<h2><a id="problems"></a>Dealing with Unexpected Problems</h2>
cristy3ed852e2009-09-05 21:47:34 +0000503<div class="doc-section">
504
505<p>Chances are the download, configure, build, and install of ImageMagick went flawlessly as it is intended, however, certain systems and environments may cause one or more steps to fail. We discuss a few problems we've run across and how to take corrective action to ensure you have a working release of ImageMagick.</p>
506
507<p>If the compiler generates an error or if it quits unexpectedly, go to the <a href="http://msdn.microsoft.com/vstudio/">Visual Studio</a> web site and look for Visual Studio service packs. Chances are, after you download and install all the Visual Studio service packs, ImageMagick will compile and build as expected.</p>
508
509</div>
510
cristydcca3fa2010-12-29 21:50:07 +0000511<h2><a id="project"></a>Building Your Custom Project</h2>
cristy3ed852e2009-09-05 21:47:34 +0000512<div class="doc-section">
513
514<p>The Windows <a href="../www/binary-releases.html#windows">binary</a> distribution includes a number of demo projects that you can use as a template for your own custom project. For example, start with the Button project, generally located in the <kbd>c:/Program Files/ImageMagick-6.5.5-0/Magick++_demos</kbd> folder. If not, be sure to select <kbd>Configuration Properties->C/C++->Preprocessor</kbd> and set these definitions:</p>
cristy2bd2a982011-02-15 00:52:58 +0000515
cristy3ed852e2009-09-05 21:47:34 +0000516<pre class="text">
517 NDEBUG
518 WIN32
519 _CONSOLE
520 _VISUALC_
521 NeedFunctionPrototypes
522 _DLL
523 _MAGICKMOD_
524</pre>
525
526</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000527
528</div>
529
530<div id="linkbar">
cristyce69bb02010-07-27 19:49:46 +0000531 <span id="linkbar-west">&nbsp;</span>
cristy3eaa0ef2010-03-06 20:35:26 +0000532 <span id="linkbar-center">
533 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;
cristya8902942010-07-30 00:49:52 +0000534 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy3eaa0ef2010-03-06 20:35:26 +0000535 </span>
536 <span id="linkbar-east">&nbsp;</span>
537 </div>
538 <div class="footer">
cristy7e41fe82010-12-04 23:12:08 +0000539 <span id="footer-west">&copy; 1999-2011 ImageMagick Studio LLC</span>
cristy3eaa0ef2010-03-06 20:35:26 +0000540 <span id="footer-east"> <a href="http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
541 </div>
542 <div style="clear: both; margin: 0; width: 100%; "></div>
cristya8902942010-07-30 00:49:52 +0000543 <script type="text/javascript">
544 var _gaq = _gaq || [];
545 _gaq.push(['_setAccount', 'UA-17690367-1']);
546 _gaq.push(['_trackPageview']);
547
548 (function() {
549 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
550 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
551 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
552 })();
553 </script>
cristy3eaa0ef2010-03-06 20:35:26 +0000554</body>
555</html>