github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/share/doc/GraphicsMagick/www/INSTALL-windows.html (about)

     1  <?xml version="1.0" encoding="utf-8" ?>
     2  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     3  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     4  <head>
     5  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     6  <meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
     7  <title>GraphicsMagick Windows Installation</title>
     8  <link rel="stylesheet" href="docutils-articles.css" type="text/css" />
     9  </head>
    10  <body>
    11  
    12  <div class="banner">
    13  <img src="images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
    14  <span class="title">GraphicsMagick</span>
    15  <form action="http://www.google.com/search">
    16  	<input type="hidden" name="domains" value="www.graphicsmagick.org" />
    17  	<input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
    18      <span class="nowrap"><input type="text" name="q" size="25" maxlength="255" />&nbsp;<input type="submit" name="sa" value="Search" /></span>
    19  </form>
    20  </div>
    21  
    22  <div class="navmenu">
    23  <ul>
    24  <li><a href="index.html">Home</a></li>
    25  <li><a href="project.html">Project</a></li>
    26  <li><a href="download.html">Download</a></li>
    27  <li><a href="README.html">Install</a></li>
    28  <li><a href="Hg.html">Source</a></li>
    29  <li><a href="NEWS.html">News</a> </li>
    30  <li><a href="utilities.html">Utilities</a></li>
    31  <li><a href="programming.html">Programming</a></li>
    32  <li><a href="reference.html">Reference</a></li>
    33  </ul>
    34  </div>
    35  <div class="document" id="graphicsmagick-windows-installation">
    36  <h1 class="title">GraphicsMagick Windows Installation</h1>
    37  
    38  <!-- -*- mode: rst -*- -->
    39  <!-- This text is in reStucturedText format, so it may look a bit odd. -->
    40  <!-- See http://docutils.sourceforge.net/rst.html for details. -->
    41  <div class="contents local topic" id="contents">
    42  <ul class="simple">
    43  <li><a class="reference internal" href="#installing-using-installer-package" id="id1">Installing Using Installer Package</a><ul>
    44  <li><a class="reference internal" href="#prerequisites" id="id2">Prerequisites</a></li>
    45  <li><a class="reference internal" href="#retrieve-install-package" id="id3">Retrieve Install Package</a></li>
    46  <li><a class="reference internal" href="#start-installation-wizard" id="id4">Start Installation Wizard</a></li>
    47  <li><a class="reference internal" href="#read-installation-information" id="id5">Read Installation Information</a></li>
    48  <li><a class="reference internal" href="#select-destination-directory" id="id6">Select Destination Directory</a></li>
    49  <li><a class="reference internal" href="#select-start-menu-folder" id="id7">Select Start Menu Folder</a></li>
    50  <li><a class="reference internal" href="#select-additional-tasks" id="id8">Select Additional Tasks</a></li>
    51  <li><a class="reference internal" href="#ready-to-install" id="id9">Ready to Install</a></li>
    52  <li><a class="reference internal" href="#installation-progress" id="id10">Installation Progress</a></li>
    53  <li><a class="reference internal" href="#final-information" id="id11">Final Information</a></li>
    54  <li><a class="reference internal" href="#finishing-up" id="id12">Finishing Up</a></li>
    55  <li><a class="reference internal" href="#testing-the-installation" id="id13">Testing The Installation</a></li>
    56  <li><a class="reference internal" href="#uninstall" id="id14">Uninstall</a></li>
    57  <li><a class="reference internal" href="#use-from-another-package-or-program" id="id15">Use From Another Package or Program</a></li>
    58  </ul>
    59  </li>
    60  <li><a class="reference internal" href="#installing-from-source-code" id="id16">Installing From Source Code</a><ul>
    61  <li><a class="reference internal" href="#applicability" id="id17">Applicability</a></li>
    62  <li><a class="reference internal" href="#important-notes" id="id18">Important Notes</a></li>
    63  <li><a class="reference internal" href="#windows-xp-vista-7-visual-c-6-0-through-19-0-compilation" id="id19">Windows XP, Vista, 7 Visual C++ 6.0 through 19.0 Compilation</a></li>
    64  <li><a class="reference internal" href="#environment-variables" id="id20">Environment Variables</a></li>
    65  <li><a class="reference internal" href="#windows-distribution-build-procedure" id="id21">Windows Distribution Build Procedure</a></li>
    66  </ul>
    67  </li>
    68  </ul>
    69  </div>
    70  <div class="section" id="installing-using-installer-package">
    71  <h1><a class="toc-backref" href="#id1">Installing Using Installer Package</a></h1>
    72  <blockquote>
    73  This section provides information specific to GraphicsMagick installed
    74  via a &quot;setup.exe&quot; style installation wizard under Microsoft Windows. It
    75  applies only to the pre-built &quot;binaries&quot; package, and not to versions
    76  compiled from source code. If you would like to install GraphicsMagick
    77  from source code, then please refer to the Installing From Source Code
    78  section.</blockquote>
    79  <div class="section" id="prerequisites">
    80  <h2><a class="toc-backref" href="#id2">Prerequisites</a></h2>
    81  <blockquote>
    82  <p>While multiple versions of GraphicsMagick may be installed at one
    83  time, if your intention is to replace a prior installation of
    84  GraphicsMagick with a newer version, then it is wise to uninstall
    85  the existing GraphicsMagick (see uninstall procedure) prior to
    86  installing the newer version.</p>
    87  <p>While it is not a requirement, it is strongly recommended that the
    88  <a class="reference external" href="http://sourceforge.net/projects/ghostscript/">Ghostscript</a>
    89  package (GraphicsMagick is tested with version 9.27) be
    90  installed. GraphicsMagick uses Ghostscript to render Postscript and
    91  PDF files, as well as formats where a translator to Postscript is
    92  available. GraphicsMagick will use the <a class="reference external" href="http://sourceforge.net/projects/gs-fonts/">Ghostscript Fonts</a> (also known as &quot;URW
    93  Fonts&quot;) to support the standard set of Adobe Postscript fonts like
    94  &quot;Helvetica&quot; and &quot;Times Roman&quot; if these fonts are not available as
    95  TrueType fonts.  The Ghostscript fonts need to manually installed
    96  with administrator privileges in the Ghostscript installation
    97  directory (e.g. as <tt class="docutils literal"><span class="pre">C:\Program</span> Files\gs\fonts</tt> or <tt class="docutils literal">C:Program
    98  Files\gs\gs9.27\fonts</tt>).</p>
    99  <p>The algorithm used to find the fonts consults the Windows registry
   100  to learn Ghostscript installation paths, and then looks for a
   101  &quot;fonts/n019003l.pfb&quot; file in each path until it finds a match.</p>
   102  <p>Make sure to install a Ghostscript which is compatible with the
   103  GraphicsMagick you are installing.  For example, if you are
   104  installing a 64-bit GraphicsMagick, you should install a 64-bit
   105  Ghostscript.  The installation order of the two packages is not
   106  important.  Both 32 and 64-bit versions of GraphicsMagick and
   107  Ghostscript may be installed at the same time.</p>
   108  </blockquote>
   109  </div>
   110  <div class="section" id="retrieve-install-package">
   111  <h2><a class="toc-backref" href="#id3">Retrieve Install Package</a></h2>
   112  <blockquote>
   113  <p>Retrieve the GraphicsMagick Windows binary install package from a one
   114  of the ftp sites listed at the <a class="reference external" href="download.html">GraphicsMagick Download Sites</a> page. The available install packages are as follows</p>
   115  <p>Windows Dynamic-Multithread (DLL-based) install package with utilities,
   116  ImageMagickObject COM object, and web pages:</p>
   117  <blockquote>
   118  <pre class="literal-block">
   119  GraphicsMagick-1.3-Q8-win32-dll.exe
   120  GraphicsMagick-1.3-Q16-win32-dll.exe
   121  GraphicsMagick-1.3-Q8-win64-dll.exe
   122  GraphicsMagick-1.3-Q16-win64-dll.exe
   123  </pre>
   124  </blockquote>
   125  <p>Note that the QuantumDepth=8 version (Q8) which provides industry
   126  standard 24/32 bit pixels consumes half the memory and about 30% less
   127  CPU than the QuantumDepth=16 version (Q16) which provides 48/64 bit
   128  pixels for high-resolution color. A Q8 version is fine for processing
   129  typical photos intended for viewing on a computer screen. If you are
   130  dealing with film, scientific, or medical images, use ICC color
   131  profiles, or deal with images that have limited contrast, then the Q16
   132  version is recommended.</p>
   133  <p>The <cite>win32</cite> packages are for 32-bit or 64-bit Windows, whereas the
   134  <cite>win64</cite> packages are only for 64-bit Windows.  The 64-bit version
   135  allows processing larger images in memory (rather than disk files),
   136  provided that the system has more than 2GB of RAM installed.  Memory
   137  access is 1000 times faster than disk access.</p>
   138  </blockquote>
   139  </div>
   140  <div class="section" id="start-installation-wizard">
   141  <h2><a class="toc-backref" href="#id4">Start Installation Wizard</a></h2>
   142  <blockquote>
   143  Execute the downloaded file from your browser or by double-clicking on
   144  the filename from within Windows Explorer. The GraphicsMagick Setup
   145  Wizard will appear. Click on &quot;<em>Next&gt;</em>&quot; to continue.</blockquote>
   146  </div>
   147  <div class="section" id="read-installation-information">
   148  <h2><a class="toc-backref" href="#id5">Read Installation Information</a></h2>
   149  <blockquote>
   150  An informational screen is presented which provides a summary of things
   151  you should know before you proceed. Please take care to read this
   152  information. Once you have finished, Click on &quot;<em>Next&gt;</em>&quot; to continue.</blockquote>
   153  </div>
   154  <div class="section" id="select-destination-directory">
   155  <h2><a class="toc-backref" href="#id6">Select Destination Directory</a></h2>
   156  <blockquote>
   157  Specify what drive and directory to install GraphicsMagick into.
   158  Approximately 15MB of free disk space is required to install all of
   159  GraphicsMagick (you may choose to install a subset to save space). A
   160  message at the bottom of the screen will tell you exactly how much
   161  space is required to install the complete package. The default
   162  installation directory is similar to <tt class="docutils literal"><span class="pre">C:\Program</span>
   163  <span class="pre">Files\GraphicsMagick-1.3-Q8</span></tt>. Once you have entered the desired
   164  installation directory, then select &quot;<em>Next&gt;</em>&quot; to continue.</blockquote>
   165  </div>
   166  <div class="section" id="select-start-menu-folder">
   167  <h2><a class="toc-backref" href="#id7">Select Start Menu Folder</a></h2>
   168  <blockquote>
   169  Select the folder where you would like the program's shortcuts to
   170  appear. The default should normally be satisfactory. Click on &quot;<em>Next&gt;</em>&quot;
   171  to continue.</blockquote>
   172  </div>
   173  <div class="section" id="select-additional-tasks">
   174  <h2><a class="toc-backref" href="#id8">Select Additional Tasks</a></h2>
   175  <blockquote>
   176  <p>A screen is displayed which presents some (or all) of the following
   177  options:</p>
   178  <ul class="simple">
   179  <li>Create a desktop icon</li>
   180  <li>Update executable search path</li>
   181  <li>Associate supported file extensions with GraphicsMagick</li>
   182  </ul>
   183  <p>&quot;Creating a desktop icon&quot; and &quot;Update the executable search path&quot;
   184  are selected by default. The remaining options default to
   185  un-selected.  Select the options you prefer.</p>
   186  <p>Think twice before selecting &quot;<em>Associate supported file extensions
   187  with GraphicsMagick</em>&quot; since this will set up approximately fifty
   188  file associations, including common formats like JPEG, GIF, PNG,
   189  TIFF, and PDF. These file associations will be to the 'gmdisplay'
   190  program which is suitable for displaying images, but currently
   191  offers little more than that.  Associations for GraphicsMagick's
   192  native formats (such as <a class="reference external" href="miff.html">MIFF</a>) will always be made.</p>
   193  <p>Once you have made your selections, click on &quot;<em>Next&gt;</em>&quot; to continue.</p>
   194  </blockquote>
   195  </div>
   196  <div class="section" id="ready-to-install">
   197  <h2><a class="toc-backref" href="#id9">Ready to Install</a></h2>
   198  <blockquote>
   199  A screen is displayed which displays the selected options. If you are
   200  not satisfied with a selected option, then click on &quot;<em>&lt;Back</em>&quot; to go back
   201  to a previous screen so that the option may be adjusted. If you are
   202  satisfied with the options and are ready to install, then select
   203  &quot;<em>Install</em>&quot;. To abort the installation entirely, select &quot;<em>Cancel</em>&quot;.</blockquote>
   204  </div>
   205  <div class="section" id="installation-progress">
   206  <h2><a class="toc-backref" href="#id10">Installation Progress</a></h2>
   207  <blockquote>
   208  While the install program is performing the installation, it will
   209  display what it is doing in an installation progress window.</blockquote>
   210  </div>
   211  <div class="section" id="final-information">
   212  <h2><a class="toc-backref" href="#id11">Final Information</a></h2>
   213  <blockquote>
   214  A summary of post-install steps is provided. These steps include some
   215  commands you can execute to make sure that GraphicsMagick is working,
   216  as well as some notes about what has been installed on your system, and
   217  where to find additional information. Once you have read this
   218  information, click on &quot;<em>Next&gt;</em>&quot; to continue.</blockquote>
   219  </div>
   220  <div class="section" id="finishing-up">
   221  <h2><a class="toc-backref" href="#id12">Finishing Up</a></h2>
   222  <blockquote>
   223  By default &quot;<em>View GraphicsMagick.html</em>&quot; is check-marked. This causes the
   224  GraphicsMagick web pages to be displayed in your web browser when
   225  &quot;<em>Finish</em>&quot; is selected. If you do not want to view the web pages, then
   226  de-select &quot;<em>View GraphicsMagick.html</em>&quot;. Select &quot;<em>Finish</em>&quot; to exit the
   227  installation program.</blockquote>
   228  </div>
   229  <div class="section" id="testing-the-installation">
   230  <h2><a class="toc-backref" href="#id13">Testing The Installation</a></h2>
   231  <blockquote>
   232  <p>Select &quot;<em>Command Prompt</em>&quot; from the Windows Start menu. Within the window
   233  type</p>
   234  <blockquote>
   235  <pre class="literal-block">
   236  gm convert logo: logo.miff
   237  gm convert logo.miff win:
   238  </pre>
   239  </blockquote>
   240  <p>and the GraphicsMagick logo should be displayed in a window.</p>
   241  </blockquote>
   242  </div>
   243  <div class="section" id="uninstall">
   244  <h2><a class="toc-backref" href="#id14">Uninstall</a></h2>
   245  <blockquote>
   246  <p>The GraphicsMagick package incorporates its own uninstall
   247  functionality. Always remove an installed GraphicsMagick via its
   248  uninstall function since manually removing it (such as by removing its
   249  installation directory) will leave behind the registry entries and path
   250  settings established at install time.</p>
   251  <p>GraphicsMagick should be removed via the &quot;<em>Add or Remove Programs</em>&quot;
   252  area of the Windows Control Panel. Select the GraphicsMagick package
   253  from the list, and click on &quot;<em>Change/Remove</em>&quot; to uninstall it.</p>
   254  </blockquote>
   255  </div>
   256  <div class="section" id="use-from-another-package-or-program">
   257  <h2><a class="toc-backref" href="#id15">Use From Another Package or Program</a></h2>
   258  <blockquote>
   259  <p>The GraphicsMagick gm utility may be executed as a sub-process by
   260  other programs. If gm utility is not in the systems executable
   261  search path (it should be since the GraphicsMagick install extends
   262  the path by default), then the utility should be executed via the
   263  complete path to the executable.</p>
   264  <p>The <a class="reference external" href="ImageMagickObject.html">ImageMagickObject</a> COM object may be
   265  used to execute the gm sub-functions (e.g. &quot;convert&quot;) without
   266  spawning a new process or causing Windows to pop up a window. The
   267  COM object supports multi-threaded concurrent use.  Note that the
   268  COM object (and other components depending on proprietary libraries)
   269  is no longer included in the installation packages we create.  If
   270  you need this, then you will need to build GraphicsMagick from
   271  source code.</p>
   272  <p>When GraphicsMagick is installed, entries are added to the Windows
   273  Registry so that other programs may obtain information regarding the
   274  most recently installed GraphicsMagick. These entries are available
   275  under the registry path <tt class="docutils literal">HKEY_LOCAL_MACHINE\SOFTWARE\GraphicsMagick\Current</tt>.</p>
   276  <p>These registry keys are currently available:</p>
   277  <table border="1" class="docutils">
   278  <colgroup>
   279  <col width="25%" />
   280  <col width="12%" />
   281  <col width="64%" />
   282  </colgroup>
   283  <thead valign="bottom">
   284  <tr><th class="head">Key Name</th>
   285  <th class="head">Key Type</th>
   286  <th class="head">Description</th>
   287  </tr>
   288  </thead>
   289  <tbody valign="top">
   290  <tr><td>BinPath</td>
   291  <td>REG_SZ</td>
   292  <td>Directory where GraphicsMagick executables
   293  are installed</td>
   294  </tr>
   295  <tr><td>ConfigurePath</td>
   296  <td>REG_SZ</td>
   297  <td>Directory where configuration files are
   298  installed</td>
   299  </tr>
   300  <tr><td>LibPath</td>
   301  <td>REG_SZ</td>
   302  <td>Directory where GraphicsMagick core DLLs
   303  are installed</td>
   304  </tr>
   305  <tr><td>CoderModulesPath</td>
   306  <td>REG_SZ</td>
   307  <td>Directory where GraphicsMagick loadable
   308  coder modules are installed</td>
   309  </tr>
   310  <tr><td>FilterModulesPath</td>
   311  <td>REG_SZ</td>
   312  <td>Directory where GraphicsMagick loadable
   313  filter modules are installed</td>
   314  </tr>
   315  <tr><td>SharePath</td>
   316  <td>REG_SZ</td>
   317  <td>Directory where configuration files are
   318  installed</td>
   319  </tr>
   320  </tbody>
   321  </table>
   322  </blockquote>
   323  </div>
   324  </div>
   325  <div class="section" id="installing-from-source-code">
   326  <h1><a class="toc-backref" href="#id16">Installing From Source Code</a></h1>
   327  <div class="section" id="applicability">
   328  <h2><a class="toc-backref" href="#id17">Applicability</a></h2>
   329  <blockquote>
   330  This section provides instructions for building GraphicsMagick
   331  Microsoft Windows using the Visual C++ (Visual Studio, etc.)
   332  IDE. For building using the free Cygwin or MinGW compilers (e.g. as
   333  part of <a class="reference external" href="https://www.msys2.org/">MSYS2</a>), follow the instructions
   334  in INSTALL-unix.txt.</blockquote>
   335  </div>
   336  <div class="section" id="important-notes">
   337  <h2><a class="toc-backref" href="#id18">Important Notes</a></h2>
   338  <blockquote>
   339  On some platforms Visual C++ may fail with an internal compiler
   340  error.  If this happens to you, then make sure that your compiler is
   341  updated with the latest fixes from the Microsoft web site and the
   342  problem will hopefully go away.  If the problem does not go away,
   343  then adjust the settings for the module which failed and disable
   344  optimization, and the problem is likely to go away (but with less
   345  performance).</blockquote>
   346  </div>
   347  <div class="section" id="windows-xp-vista-7-visual-c-6-0-through-19-0-compilation">
   348  <h2><a class="toc-backref" href="#id19">Windows XP, Vista, 7 Visual C++ 6.0 through 19.0 Compilation</a></h2>
   349  <blockquote>
   350  <p>The Visual C++ distribution targeted at Windows 2000 through Windows
   351  10 does not provide any stock workspace (DSW) or project files (DSP)
   352  except for those included with third party libraries. Instead, there
   353  is a &quot;configure&quot; program that must run to create build
   354  environments to satisfy various requirements.</p>
   355  <p>The configure program resides in <tt class="docutils literal">VisualMagick\configure</tt> in the
   356  GraphicsMagick source tree.  A pre-compiled configure.exe is
   357  provided, as well as Visual Studio project files to recompile it
   358  from source code if needed.</p>
   359  <p>Once started, the configure program provides this configuration
   360  dialog after proceeding past the initial notifications screen:</p>
   361  <img alt="Configure program screen shot" class="align-center" src="configure-target-setup.png" style="width: 498.0px; height: 473.0px;" />
   362  <p>In addition to (or as a replacement to) the above dialog, the
   363  configure.exe program supports these command-line options:</p>
   364  <dl class="docutils">
   365  <dt><cite>/Q8 /Q16 /Q32</cite></dt>
   366  <dd>Set quantum depth</dd>
   367  <dt><cite>/x64</cite></dt>
   368  <dd>Add x64 configuration</dd>
   369  <dt><cite>/mtd /sts /mts /mtsd</cite></dt>
   370  <dd>Set project type</dd>
   371  <dt><cite>/noWizard</cite></dt>
   372  <dd>Do not show the wizard</dd>
   373  <dt><cite>/openMP</cite></dt>
   374  <dd>Enable openMP</dd>
   375  </dl>
   376  <p>The Visual C++ system provides three different types of &quot;runtimes&quot;
   377  that must match across all application, library, and DLL code that is
   378  built. The &quot;configure&quot; program creates a set of build files that are
   379  consistent for a specific runtime selection.</p>
   380  <p>The three options for runtime support are:</p>
   381  <ol class="arabic simple">
   382  <li>Dynamic Multi-threaded DLL runtimes (VisualDynamicMT), <cite>/mtd</cite> option</li>
   383  <li>Static Single-threaded runtimes (<cite>VisualStaticST</cite>), <cite>/sts</cite> option</li>
   384  <li>Static Multi-threaded runtimes (VisualStaticMT), <cite>/mts</cite> option</li>
   385  <li>Static Multi-threaded DLL runtimes (VisualStaticMTDLL), <cite>/mtsd</cite> option</li>
   386  </ol>
   387  <p>In addition to these runtimes, the VisualMagick build environment allows
   388  you to select whether to include the X11 libraries in the build or not.
   389  X11 DLLs and headers are provided with the VisualMagick build
   390  environment. Most Windows users do not use X11 so they will prefer to
   391  build without X11 support. When X11 is not supported, gm subcommands
   392  'animate', 'display', and 'import' will not work.</p>
   393  <p>This leads to five different possible build options, which should
   394  cover almost any particular situation. The default binary
   395  distribution is built using #1 from above with the X11 libraries
   396  excluded. This results build using all DLL's for everything and
   397  multi-threaded support (the only option for DLL's).</p>
   398  <p>To do a build for your requirements, simply go to the configure sub-
   399  directory under VisualMagick and open the configure.dsw workspace
   400  (for Visual C++ 6.0) or configure.sln (for Visual C++ 7.X through
   401  9.X). Set the build configuration to &quot;Release&quot; under the</p>
   402  <blockquote>
   403  &quot;Build..., Set Active Configuration...&quot;  menu.</blockquote>
   404  <p>Build and execute the configure program and follow the on-screen
   405  instructions. You should not change any of the defaults unless you have a
   406  specific reason to do so.</p>
   407  <p>The configure program provides a button entitled</p>
   408  <blockquote>
   409  Edit &quot;magick_config.h&quot;</blockquote>
   410  <p>Clicking this button brings up magick_config.h in Windows notepad
   411  for optionally changing any preprocessor defines in GraphicsMagick's
   412  magick_config.h file. This file is copied to
   413  <tt class="docutils literal">magick\magick_config.h</tt>. You may safely open
   414  <tt class="docutils literal">magick\magick_config.h</tt>, modify it, and recompile without
   415  re-running the configure program. In fact, using Visual Studio to
   416  edit the copied file may be preferable since it preserves the
   417  original magick_config.h file.</p>
   418  <p>Key user tunables in magick_config.h include:</p>
   419  <blockquote>
   420  <p>QuantumDepth (default 8)</p>
   421  <blockquote>
   422  Specify size of PixelPacket color Quantums (8, 16, or 32) A value of
   423  8 uses half the memory than 16 and may run 30% faster, but provides
   424  256 times less color resolution than a value of 16.</blockquote>
   425  <p>UseInstalledMagick (default undefined)</p>
   426  <blockquote>
   427  Define to build a GraphicsMagick which uses registry settings or
   428  embedded paths to locate installed components (coder modules and
   429  configuration files). The default is to look for all files in the
   430  same directory as the executable.</blockquote>
   431  <p>ProvideDllMain (default undefined)</p>
   432  <blockquote>
   433  Define to include a DllMain() function ensures that the GraphicsMagick
   434  DLL is properly initialized without participation from dependent
   435  applications. This avoids the requirement to invoke IntializeMagick()
   436  from dependent applications but only works for DLL builds.</blockquote>
   437  <p>EnableBrokenCoders (default undefined)</p>
   438  <blockquote>
   439  Define to enable broken/dangerous file format support.  Only
   440  enable this if you have complete control over the input files
   441  and not for arbitrary files such as uploaded from untrusted
   442  sources via the Internet.  Currently this must be enabled to
   443  enable Adobe Photoshop Format (PSD).</blockquote>
   444  </blockquote>
   445  <p>After creating your build environment you can proceed to open the DSW (or
   446  SLN) file that was generated in the VisualMagick directory and build
   447  everything from there.</p>
   448  <p>In the final DSW file you will find a project call &quot;All&quot;. In order to
   449  build everything in the distribution, select this project and make it
   450  the &quot;active&quot; project. Set the build configuration to the desired one
   451  (Debug, or Release) and do a &quot;clean&quot; followed by a &quot;build&quot;. You should
   452  do the build in a specific way:</p>
   453  <blockquote>
   454  <ol class="arabic simple">
   455  <li>Make the &quot;All&quot; project the active project (Bold)
   456  Right click on the All project and select &quot;Set As Active Project&quot;</li>
   457  <li>Select &quot;Build..., Clean&quot;</li>
   458  <li>Select &quot;Build..., Build&quot;</li>
   459  <li>Go get some coffee unless you have a very fast machine!.</li>
   460  </ol>
   461  </blockquote>
   462  <p>The &quot;Clean&quot; step is needed in order to make sure that all of the target
   463  support libraries are updated with any patches needed to get them to
   464  compile properly under Visual C++.</p>
   465  <p>All of the required files that are needed to run any of the command
   466  line tools will be found in the &quot;bin&quot; subdirectory of the VisualMagick
   467  subdirectory. This includes EXE, and DLL files. You should be able
   468  to test the build directly from this directory without having to move
   469  anything to any of the global SYSTEM or SYSTEM32 areas in the operating
   470  system installation.</p>
   471  <p>Note #1:</p>
   472  <p>The Visual C++ distribution of GraphicsMagick comes with the Magick++
   473  C++ wrapper by default. This add-on layer has a large number of demo
   474  and test files that can be found in <tt class="docutils literal"><span class="pre">GraphicsMagick\Magick++\demo</span></tt>, and
   475  <tt class="docutils literal"><span class="pre">GraphicsMagick\Magick++\tests</span></tt>. There are also a variety of tests that
   476  use the straight C API as well in <tt class="docutils literal">GraphicsMagick\tests</tt>.</p>
   477  <p>All of these programs are NOT configured to be built in the default
   478  workspace created by the configure program. You can cause all of these
   479  demos and test programs to be built by checking the box in configure
   480  that says:</p>
   481  <blockquote>
   482  &quot;Include all demo and test programs&quot;</blockquote>
   483  <p>In addition, there is another related checkbox (checked by default)
   484  that causes all generated project files to be created standalone so
   485  that they can be copied to other areas of you system.</p>
   486  <p>This is the checkbox:</p>
   487  <blockquote>
   488  &quot;Generate all utility projects with full paths rather then relative
   489  paths&quot;</blockquote>
   490  <p>WOW - that a mouthfull - eh?</p>
   491  <p>Visual C++ uses a concept of &quot;dependencies&quot; that tell it what other
   492  components need to be build when a particular project is being build. This
   493  mechanism is also used to ensure that components link properly. In my normal
   494  development environment, I want to be able to make changes and debug the
   495  system as a whole, so I like and NEED to use dependencies. However, most
   496  end users don't want to work this way.</p>
   497  <p>Instead they really just want to build the package and then get down
   498  to business working on their application. The solution is to make all
   499  the utility projects (UTIL_xxxx_yy_exe.dsp) use full absolute paths
   500  to all the things they need. This way the projects stand on their own
   501  and can actually be copied and used as templates to get a particular
   502  custom application compiling with little effort.</p>
   503  <p>With this feature enabled, you should be able to nab a copy of...</p>
   504  <blockquote>
   505  <p><tt class="docutils literal">VisualMagick\utilities\UTIL_gm_xxx_exe.dsp</tt>  (for C)</p>
   506  <blockquote>
   507  -or-</blockquote>
   508  <p><tt class="docutils literal"><span class="pre">VisualMagick\Magick++\demo\UTIL_demo_xxx_exe.dsp</span></tt> (for C++)</p>
   509  </blockquote>
   510  <p>... and pop it into notepad, modify it (carefully) to your needs and
   511  be on your way to happy compiling and linking.</p>
   512  <p>You can feel free to pick any of the standard utilities, tests, or
   513  demo programs as the basis for a new program by copying the project
   514  and the source and hacking away.</p>
   515  <p>The choice of what to use as a starting point is very easy...</p>
   516  <p>For straight C API command line applications use something from</p>
   517  <blockquote>
   518  <p><tt class="docutils literal">GraphicsMagick\tests</tt> or <tt class="docutils literal">GraphicsMagick\utilities</tt> (source code)</p>
   519  <p><tt class="docutils literal">GraphicsMagick\VisualMagick\tests</tt> or <tt class="docutils literal">GraphicsMagick\Visualmagick\utilities</tt>
   520  (project - DSP)</p>
   521  </blockquote>
   522  <p>For C++ and Magick++ command line applications use something from</p>
   523  <blockquote>
   524  <p><tt class="docutils literal"><span class="pre">GraphicsMagick\Magick++\tests</span></tt> or <tt class="docutils literal"><span class="pre">GraphicsMagick\Magick++\demo</span></tt> (source code)</p>
   525  <p><tt class="docutils literal"><span class="pre">GraphicsMagick\VisualMagick\Magick++\tests</span></tt> or
   526  <tt class="docutils literal"><span class="pre">GraphicsMagick\VisualMagick\Magick++\demo</span></tt> (project - DSP)</p>
   527  </blockquote>
   528  <p>For C++ and Magick++ and MFC windows applications use</p>
   529  <blockquote>
   530  <p><tt class="docutils literal">GraphicsMagick\win2k\IMDisplay</tt> (source code)</p>
   531  <p><tt class="docutils literal">GraphicsMagick\VisualMagick\win32\NtMagick</tt> (project - DSP)</p>
   532  </blockquote>
   533  <p>Note #2:</p>
   534  <p>The GraphicsMagick distribution is very modular. The default
   535  configuration is there to get you rolling, but you need to make some
   536  serious choices when you wish to change things around.</p>
   537  <p>The default options are all targeted at having all the components in one
   538  place (e.g. the &quot;bin&quot; directory of the VisualMagick build tree). These
   539  components may be copied to another folder (such as to another computer).</p>
   540  <p>The folder containing the executables and DLLs should contain the
   541  following files:</p>
   542  <blockquote>
   543  <ol class="arabic simple">
   544  <li>colors.mgk</li>
   545  <li>delegates.mgk</li>
   546  <li>log.mgk</li>
   547  <li>magic.mgk</li>
   548  <li>modules.mgk</li>
   549  <li>type.mgk</li>
   550  <li>type-ghostscript.mgk (if Ghostscript is used)</li>
   551  </ol>
   552  </blockquote>
   553  <p>The &quot;bin&quot; folder should contains all EXE's and DLL's as well as the
   554  very important &quot;modules.mgk&quot; file.</p>
   555  <p>With this default setup, you can use any of the command line tools
   556  and run scripts as normal. You can actually get by quite nicely this
   557  way by doing something like <tt class="docutils literal">pushd <span class="pre">e:\xxx\yyy\bin</span></tt> in any scripts you
   558  write to execute &quot;out of&quot; this directory.</p>
   559  <p>By default the core of GraphicsMagick on Win32 always looks in the place
   560  were the exe program is run from in order to find all of the files as
   561  well as the DLL's it needs.</p>
   562  </blockquote>
   563  </div>
   564  <div class="section" id="environment-variables">
   565  <h2><a class="toc-backref" href="#id20">Environment Variables</a></h2>
   566  <blockquote>
   567  <p>You can use the &quot;System&quot; control panel to allow you to add and delete
   568  what is in any of the environment variables. You can even have user
   569  specific environment variables if you wish.</p>
   570  <p>PATH</p>
   571  <blockquote>
   572  <p>This sets the default list of places were Windows looks for EXE's and
   573  DLL's. Windows CMD shell seems to look in the &quot;current&quot; directory first
   574  - no matter what, which may make it unnecessary to update the PATH. If
   575  you wish to run any of utilities from another location then you must
   576  add the path to your &quot;bin&quot; directory in. For instance, you might add:</p>
   577  <blockquote>
   578  <tt class="docutils literal"><span class="pre">D:\Devel\GraphicsMagick\VisualMagick\bin</span></tt></blockquote>
   579  <p>to do this for the default build environment like I do.</p>
   580  </blockquote>
   581  <p>MAGICK_HOME</p>
   582  <blockquote>
   583  <p>If all you do is modify the PATH variable, the first problem you
   584  will run into is that GraphicsMagick may not be able to find any of
   585  its &quot;modules. Modules are all the IM_MOD*.DLL files you see in the
   586  distribution. There is one of these for each and every file format
   587  that GraphicsMagick supports. This environment variable tells the system
   588  were to look for these DLL's. The compiled in &quot;default&quot; is &quot;execution
   589  path&quot; - which says - look in the same place that the application is
   590  running &quot;in&quot;. If you are running from somewhere other then &quot;bin&quot; -
   591  this will no longer work and you must use this variable. If you elect
   592  to leave the modules in the same place as the EXE's (a good idea)
   593  then you can simply set this to the same place
   594  as you did the PATH variable. In my case:</p>
   595  <blockquote>
   596  <tt class="docutils literal"><span class="pre">D:\\GraphicsMagick\coders</span></tt></blockquote>
   597  <p>This is also the place were GraphicsMagick expects to find the
   598  &quot;colors.mgk&quot;, &quot;delegates.mgk&quot;, &quot;magic.mgk&quot;, &quot;modules.mgk&quot;, and
   599  &quot;type.mgk&quot; files.</p>
   600  <p>One cool thing about the modules build of GraphicsMagick is that you can
   601  now leave out file formats and lighten you load. If all you ever need
   602  is GIF and JPEG, then simply drop all the other DLL's into the local
   603  trash can and get on with your life.</p>
   604  <p>WARNING: Always keep the &quot;xc&quot; format, since GM uses it for internal
   605  purposes.</p>
   606  </blockquote>
   607  <p>ALSO. You can elect to changes these things the good old &quot;hard-coded&quot;
   608  way. Two #defines are applicable.</p>
   609  <p>defines.h has</p>
   610  <blockquote>
   611  <tt class="docutils literal">#define MagickConfigurePath&nbsp; <span class="pre">&quot;c:\\GraphicsMagick\\&quot;</span></tt></blockquote>
   612  <p>To view any image in a Microsoft window, type</p>
   613  <blockquote>
   614  <tt class="docutils literal">gm convert image.ext win:</tt></blockquote>
   615  <p>Make sure Ghostscript is installed, otherwise, you will be unable to
   616  convert or view a Postscript document, and Postscript standard fonts will
   617  not be available.</p>
   618  <p>You may use any standard web browser (e.g. Internet Explorer) to browse
   619  the GraphicsMagick documentation.</p>
   620  <p>The Win2K executables will work under Windows '98 and later.</p>
   621  </blockquote>
   622  </div>
   623  <div class="section" id="windows-distribution-build-procedure">
   624  <h2><a class="toc-backref" href="#id21">Windows Distribution Build Procedure</a></h2>
   625  <blockquote>
   626  <p>The following are the instructions for how to build a Q:8 (or Q:16)
   627  DLL-based distribution installer package using Visual Studio 2008
   628  Professional.  This is the same procedure used to produce the
   629  release packages.  The PerlMagick steps are skipped as of
   630  GraphicsMagick 1.3.26):</p>
   631  <ol class="arabic simple">
   632  <li>Install prerequisite software:</li>
   633  </ol>
   634  <blockquote>
   635  <ol class="loweralpha simple">
   636  <li>Install Microsoft Visual Studio.</li>
   637  <li>Download and install Inno Setup 6
   638  &lt;&quot;<a class="reference external" href="http://www.jrsoftware.org/isinfo.php">http://www.jrsoftware.org/isinfo.php</a>&quot;&gt;.</li>
   639  <li>Download and install ActiveState ActivePerl (optional)
   640  &lt;&quot;<a class="reference external" href="http://www.activestate.com/activeperl/downloads/">http://www.activestate.com/activeperl/downloads/</a>&quot;&gt;.</li>
   641  </ol>
   642  </blockquote>
   643  <ol class="arabic" start="2">
   644  <li><p class="first">Disable automatic indexing and virus scanning for the
   645  GraphicsMagick source tree.  In particular, &quot;Windows Defender&quot; in
   646  Windows 10 (and similar software in earlier Windows releases) has
   647  been observed to cause Visual Studio builds to fail since the
   648  virus scanner opens built libraries and executables to inspect
   649  whem while Visual Studio is still using them.  Indexing and
   650  scanning also cause significant slowdowns since there are many
   651  megabytes of files to index.</p>
   652  </li>
   653  <li><p class="first">Build <cite>GMVisualMagickconfigureconfigure.exe</cite> (if
   654  missing/outdated)</p>
   655  <ol class="loweralpha simple">
   656  <li>Open workspace <cite>GMVisualMagickconfigureconfigure.dsp</cite> by
   657  double-clicking from Windows Explorer.</li>
   658  <li>Upgrade Visual Studio project (as required)</li>
   659  <li>Select <cite>Rebuild All</cite> to build configure.exe</li>
   660  <li>Close the project.</li>
   661  </ol>
   662  </li>
   663  <li><p class="first">Configure Initial GraphicsMagick Visual Studio Workspace</p>
   664  <ol class="loweralpha simple">
   665  <li>Use Windows Explorer to navigate to <cite>GMVisualMagickconfigure</cite>.</li>
   666  <li>Double-click on <cite>configure.exe</cite> to run configure program.</li>
   667  <li>Select desired build options: DLL build, Quantum Depth, 64-bit, OpenMP)</li>
   668  <li>Check <cite>Build demo and test programs</cite>.</li>
   669  <li>Finish remaining configure wizard screens to complete.</li>
   670  <li><cite>File</cite> -&gt; <cite>Close Workspace</cite>.</li>
   671  </ol>
   672  </li>
   673  <li><p class="first">Open Workspace, set build configuration, build GraphicsMagick software.</p>
   674  <ol class="loweralpha simple">
   675  <li>Open workspace <cite>GMVisualMagickconfigureconfigure.sln</cite> by
   676  double-clicking from Windows Explorer.</li>
   677  <li>Build -&gt; &quot;Set Active Configuration&quot; -&gt; &quot;All - Win32 Release&quot; -&gt; OK</li>
   678  <li>Optionally enable 64-bit (WIN64) compilation.  &quot;<cite>Build</cite> /
   679  <cite>Configuration Manager...</cite> / <cite>Active Solution Platform</cite> /
   680  <cite>New</cite> / <cite>x64</cite>&quot;.</li>
   681  <li>Open <cite>CORE_magickmagickmagick_config.h</cite> and edit any
   682  configuration settings you would like to change.  For example,
   683  you might change QuantumDepth to 16 for a&quot;Q:16&quot; build.</li>
   684  <li>If using Visual Studio Professional Edition, and OpenMP
   685  support is desired, then select <cite>CORE_magick</cite> in the Solution
   686  Explorer pane and use the right mouse button menu to select
   687  <cite>Properties</cite>.  In <cite>Configuration Properties</cite> / <cite>C/C++</cite> /
   688  <cite>Language</cite> set OpenMP support to 'yes'.</li>
   689  <li>Select &quot;Rebuild All&quot;</li>
   690  <li>Click on '!' icon to run configure program</li>
   691  <li>Select DLL build</li>
   692  <li>Check <cite>Build demo and test programs</cite>.</li>
   693  <li>Click on Edit <cite>magick_config.h</cite> and verify desired settings
   694  such as QuantumDepth.  You can also defer this step to later
   695  by opening the header file
   696  <tt class="docutils literal">CORE_magick\include\magick_config.h</tt> in the Visual Studio
   697  project.</li>
   698  <li>Finish remaining configure wizard screens to complete.</li>
   699  <li>File -&gt; <cite>Close Workspace</cite></li>
   700  </ol>
   701  </li>
   702  <li><p class="first">Build ImageMagickObject</p>
   703  <ol class="loweralpha simple">
   704  <li>Open Visual Studio Command Shell Window for WIN32 or WIN64</li>
   705  <li>Change to GraphicsMagick project directory <tt class="docutils literal">GM</tt></li>
   706  <li><tt class="docutils literal">cd GM\contrib\win32\ATL7\ImageMagickObject</tt></li>
   707  <li><tt class="docutils literal">BuildImageMagickObject clean</tt></li>
   708  <li><tt class="docutils literal">BuildImageMagickObject release</tt></li>
   709  <li><tt class="docutils literal">cd <span class="pre">..\..\..\..</span></tt></li>
   710  </ol>
   711  </li>
   712  <li><p class="first">Build PerlMagick extension (optional and now rarely done)</p>
   713  <ol class="loweralpha">
   714  <li><p class="first">Open Visual Studio Command Shell Window for WIN32  or WIN64</p>
   715  </li>
   716  <li><p class="first">Change to GraphicsMagick project directory <tt class="docutils literal">GM</tt></p>
   717  </li>
   718  <li><p class="first"><tt class="docutils literal">cd GM\PerlMagick</tt></p>
   719  </li>
   720  <li><p class="first"><tt class="docutils literal">nmake clean</tt> (only if this is a rebuild)</p>
   721  </li>
   722  <li><p class="first"><tt class="docutils literal"><span class="pre">C:\Perl32\bin\perl.exe</span> Makefile.nt</tt> (or Perl64)</p>
   723  <p>Note that if multiple Perl's are installed, then it may be
   724  necessary to specify the full path to perl.exe in order to use
   725  the correct Perl.</p>
   726  </li>
   727  <li><p class="first"><tt class="docutils literal">nmake release</tt></p>
   728  </li>
   729  </ol>
   730  </li>
   731  </ol>
   732  <p>NOTE: access to <em>nmake</em> requires that there be a path to it. Depending on
   733  how the install of Visual Studio was done, this may not be the case.
   734  Visual Studio provides a batch script in VC98Bin called VCVARS32.BAT
   735  that can be used to do this manually after you open up a command prompt.</p>
   736  <ol class="arabic simple" start="8">
   737  <li>Open <cite>GMVisualMagickinstallergm-win32-Q8-dll-full.iss</cite> (or
   738  <cite>gm-win32-Q16-dll-full.iss</cite> if QuantumDepth=16) by
   739  double-clicking from Windows Explorer.<ol class="loweralpha">
   740  <li><cite>File</cite> -&gt; <cite>Compile</cite></li>
   741  <li>Test install by clicking on green triangle</li>
   742  </ol>
   743  </li>
   744  <li>Test PerlMagick (optional).<ol class="loweralpha">
   745  <li><tt class="docutils literal">cd PerlMagick</tt></li>
   746  <li><tt class="docutils literal">nmake test</tt> (All tests must pass!)</li>
   747  </ol>
   748  </li>
   749  <li>Test file format read and write.</li>
   750  </ol>
   751  <blockquote>
   752  <ol class="loweralpha simple">
   753  <li><tt class="docutils literal">cd VisualMagick\tests</tt></li>
   754  <li><tt class="docutils literal">run_rwfile.bat</tt> (All tests must pass!)</li>
   755  <li><tt class="docutils literal">run_rwblob.bat</tt> (All tests must pass!)</li>
   756  </ol>
   757  </blockquote>
   758  <ol class="arabic simple" start="11">
   759  <li>Run Magick++ test programs.</li>
   760  </ol>
   761  <blockquote>
   762  <ol class="loweralpha simple">
   763  <li><tt class="docutils literal">cd <span class="pre">Magick++/tests</span></tt></li>
   764  <li><tt class="docutils literal">run_tests.bat</tt> (All tests must pass!)</li>
   765  </ol>
   766  </blockquote>
   767  <ol class="arabic simple" start="12">
   768  <li>Run Magick++ demo programs.</li>
   769  </ol>
   770  <blockquote>
   771  <ol class="loweralpha simple">
   772  <li><tt class="docutils literal">cd <span class="pre">Magick++/demo</span></tt></li>
   773  <li><tt class="docutils literal">run_demos.bat</tt></li>
   774  <li>Use <em>gmdisplay</em> to visually inspect all output files.</li>
   775  </ol>
   776  </blockquote>
   777  <ol class="arabic simple" start="13">
   778  <li>Distribution package is available named similar to
   779  <tt class="docutils literal"><span class="pre">GM\VisualMagick\bin\GraphicsMagick-1.3-Q8-dll.exe</span></tt></li>
   780  </ol>
   781  </blockquote>
   782  <p>Copyright © GraphicsMagick Group 2002 - 2020</p>
   783  </div>
   784  </div>
   785  </div>
   786  </body>
   787  </html>