blob: 42c64ea137d93cec1e9f172ef43f4e7567213a32 [file] [log] [blame]
cristy29dc8652015-05-12 16:26:21 +00001<!DOCTYPE html>
cristyd2432012015-05-04 23:15:15 +00002<html lang="en">
cristyad41c0c2012-10-31 00:49:28 +00003<head>
Cristyb57c2352015-08-25 20:01:06 -04004
cristy29f2c972015-07-28 13:37:46 +00005 <title>ImageMagick: Install the ImageMagickObject COM+ Component</title>
cristyd2432012015-05-04 23:15:15 +00006 <meta http-equiv="content-type" content="text/html; charset=utf-8">
cristyd2432012015-05-04 23:15:15 +00007 <meta name="application-name" content="ImageMagick">
8 <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.">
9 <meta name="application-url" content="http://www.imagemagick.org">
10 <meta name="generator" content="PHP">
11 <meta name="keywords" content="install, the, imagemagickobject, com+, component, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert">
12 <meta name="rating" content="GENERAL">
13 <meta name="robots" content="INDEX, FOLLOW">
14 <meta name="generator" content="ImageMagick Studio LLC">
15 <meta name="author" content="ImageMagick Studio LLC">
16 <meta name="revisit-after" content="2 DAYS">
17 <meta name="resource-type" content="document">
cristy2f563d42015-05-06 23:36:51 +000018 <meta name="copyright" content="Copyright (c) 1999-2015 ImageMagick Studio LLC">
cristyd2432012015-05-04 23:15:15 +000019 <meta name="distribution" content="Global">
cristy44443b92015-05-05 00:06:07 +000020 <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1">
cristy354f1172015-07-29 14:03:48 +000021 <link rel="icon" href="../images/wand.png">
22 <link rel="shortcut icon" href="../images/wand.ico">
23 <link rel="stylesheet" href="../css/magick.html">
cristyad41c0c2012-10-31 00:49:28 +000024</head>
cristyd2432012015-05-04 23:15:15 +000025<body>
cristyad41c0c2012-10-31 00:49:28 +000026<div class="main">
cristyd2432012015-05-04 23:15:15 +000027<div class="magick-masthead">
28 <div class="container">
Cristy542697a2015-10-12 20:10:32 -040029 <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3129977114552745" data-ad-slot="6345125851" data-ad-format="auto"></ins>
cristy29f2c972015-07-28 13:37:46 +000030 <script>
Cristy542697a2015-10-12 20:10:32 -040031 (adsbygoogle = window.adsbygoogle || []).push({});
cristyd2432012015-05-04 23:15:15 +000032 </script>
cristyd2432012015-05-04 23:15:15 +000033 <nav class="magick-nav">
cristy44443b92015-05-05 00:06:07 +000034 <a class="magick-nav-item " href="../index.html">Home</a>
cristyea2793e2015-05-31 16:52:26 +000035 <a class="magick-nav-item " href="binary-releases.html">Download</a>
cristyd2432012015-05-04 23:15:15 +000036 <a class="magick-nav-item " href="command-line-tools.html">Tools</a>
37 <a class="magick-nav-item " href="command-line-options.html">Options</a>
cristyea2793e2015-05-31 16:52:26 +000038 <a class="magick-nav-item " href="resources.html">Resources</a>
39 <a class="magick-nav-item " href="api.html">Develop</a>
cristy5b8fe762015-06-09 16:24:03 +000040 <a class="magick-nav-item " href="http://nextgen.imagemagick.org/script/search.php">Search</a>
cristya1890f02015-05-15 23:32:44 +000041 <a class="magick-nav-item pull-right" href="http://www.imagemagick.org/discourse-server/">Community</a>
cristyd2432012015-05-04 23:15:15 +000042 </nav>
43 </div>
44</div>
45<div class="container">
46<div class="magick-header">
47<p class="text-center"><a href="index.html#build">Build ImageMagickObject From Source</a></p>
cristyad41c0c2012-10-31 00:49:28 +000048
cristyd2432012015-05-04 23:15:15 +000049<p class="lead magick-description">The ImageMagickObject is a COM+ compatible component that can be invoked from any language capable of using COM objects. The intended use is for Windows Scripting Host VBS scripts and Visual Basic, but it is also available from to C++, ASP, and other languages like Delphi, Perl and PHP.</p>
cristy3ed852e2009-09-05 21:47:34 +000050
cristy751980d2012-06-03 23:18:35 +000051<p>The ImageMagickObject COM+ component provides access to the <a href="compare.html">compare</a>, <a href="convert.html">convert</a>, <a href="composite.html">composite</a>, <a href="mogrify.html">mogrify</a>, <a href="identify.html">identify</a>, <a href="montage.html">montage</a>, and <a href="stream.html">stream</a> tools, efficiently executing them as part of your process, rather than as external programs. The way you use it is exactly the same. You pass it a list of strings including filenames and various options and it does the job. In fact, you can take any existing batch scripts that use the command line tools and translate them into the equivalent calls to the COM+ object in a matter of minutes. Beyond that, there is also a way to pass in and retrieve images in memory in the form of standard smart arrays (byte arrays). Samples are provided, to show both the simple and more elaborate forms of access.</p>
cristy3ed852e2009-09-05 21:47:34 +000052
cristy751980d2012-06-03 23:18:35 +000053<p>ImageMagick provides a statically-built ImageMagick object as part of its <a href="binary-releases.html#windows">Windows installation package</a>. When this package is installed, ImageMagickObject and its sample programs are installed to this path:</p>
cristy3ed852e2009-09-05 21:47:34 +000054
cristyd2432012015-05-04 23:15:15 +000055<pre>
cristy99513ee2015-06-21 00:00:03 +000056 c:\Program Files\ImageMagick-7.0.0-Q16\ImageMagickObject
cristy3ed852e2009-09-05 21:47:34 +000057</pre>
58
cristy8ee7f242013-06-20 16:08:44 +000059<p>The ImageMagickObject is registered if the checkbox, <code>Register ImageMagickObject</code>, is checked at install time.</p>
cristy3ed852e2009-09-05 21:47:34 +000060
61<p>To execute the sample program from the Windows Command Shell, type:</p>
62
cristyd2432012015-05-04 23:15:15 +000063<pre>
64cscript SimpleTest.vbs
65</pre>
66
cristy751980d2012-06-03 23:18:35 +000067<p>Since the ImageMagick utility command line parsers are incorporated within ImageMagickObject, please refer to the <a href="command-line-tools.html">command-line tools</a> discussion to learn how to use it. The sample VBS scripts show how the object should be called and used and have lots of comments.</p>
cristy3ed852e2009-09-05 21:47:34 +000068
cristy8ee7f242013-06-20 16:08:44 +000069<p>C++ programmers should have a look at the <code>MagickCMD.cpp</code> command line utility for an example of how to call the object from C++. The object requires a variable size list of BSTR's to emulate the command line argc, argv style calling conventions of the COM component which is more complex in C++ then in VBS or VB.</p>
cristy3ed852e2009-09-05 21:47:34 +000070
cristy8ee7f242013-06-20 16:08:44 +000071<p>MagickCMD is a C++ sample, but it also serves as a replacement for all the other command line utilities in most applications. Instead of using <code>convert xxxx yyyy</code> you can use <code>MagickCMD convert xxxx yyyy</code> instead. MagickCMD calls the COM object to accomplish the designated task. This small tight combination replaces the entire usual binary distribution in just a few mebibytes.</p>
cristy3ed852e2009-09-05 21:47:34 +000072
cristyd2432012015-05-04 23:15:15 +000073<h2 class="magick-header"><a id="build"></a>Build ImageMagickObject From Source</h2>
cristy3ed852e2009-09-05 21:47:34 +000074
Cristy4de4f202015-09-16 16:50:53 -040075<p>The source code for ImageMagickObject is available from the ImageMagick <a href="http://git.imagemagick.org/repos/ImageMagick">GIT</a> repository, or as part of the <a href="install-source.html#windows">Windows source</a> distribution. Once the source code has been retrieved and extracted, the source for ImageMagickObject is the directory <code>ImageMagick\contrib\win32\ATL7ImageMagickObject</code>, however, ImageMagick itself must be built using the static-multithread (VisualStaticMT) build configuration. Building ImageMagickObject requires Microsoft Visual C++ 7.0 as delivered with Microsoft's Visual Studio .NET package. See the <a href="install-source.html#windows">Windows compilation instructions</a> to get ImageMagick itself built before building the ImageMagick COM+ component.</p>
cristy3ed852e2009-09-05 21:47:34 +000076
77<p>Once the VisualStaticMT project has been built, build the ImageMagickObject with this procedure:</p>
78
cristyd2432012015-05-04 23:15:15 +000079<pre>
80cd ImageMagick/contrib/win32/ATL7/ImageMagickObject
81BuildImageMagickObject release
82</pre>
83
cristy8ee7f242013-06-20 16:08:44 +000084<p>Here, we assume that the VisualStaticMT project has been built using the release setting for an optimized build. If the debug setting was used for a debug build, specify the argument <code>debug</code>; instead.</p>
cristy3ed852e2009-09-05 21:47:34 +000085
86<p>To register the DLL as a COM+ server, type</p>
87
cristyd2432012015-05-04 23:15:15 +000088<pre>
89regsvr32 /c /s ImageMagickObject.dll
90</pre>
91
cristy3ed852e2009-09-05 21:47:34 +000092<p>To unregister the DLL, type</p>
93
cristyd2432012015-05-04 23:15:15 +000094<pre>
95regsvr32 /u /s ImageMagickObject.dll
96</pre>
97
cristy3ed852e2009-09-05 21:47:34 +000098<p>Use MagickCMD to exercise ImageMagickObject to verify that it is working properly.</p>
99
100</div>
cristyd2432012015-05-04 23:15:15 +0000101 <footer class="magick-footer">
cristy29f2c972015-07-28 13:37:46 +0000102 <p><a href="support.html">Donate</a>
103 <a href="sitemap.html">Sitemap</a>
cristyd2432012015-05-04 23:15:15 +0000104 <a href="links.html">Related</a>
cristy29f2c972015-07-28 13:37:46 +0000105 <a href="architecture.html">Architecture</a>
cristyd2432012015-05-04 23:15:15 +0000106</p>
107 <p><a href="ImageMagickObject.html#">Back to top</a>
cristyea2793e2015-05-31 16:52:26 +0000108 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
cristy5b8fe762015-06-09 16:24:03 +0000109 <a href="http://nextgen.imagemagick.org/script/contact.php">Contact Us</a></p>
Cristyb57c2352015-08-25 20:01:06 -0400110 <p><small>© 1999-2015 ImageMagick Studio LLC</small></p>
cristyd2432012015-05-04 23:15:15 +0000111 </footer>
112</div><!-- /.container -->
cristyad41c0c2012-10-31 00:49:28 +0000113
Cristy542697a2015-10-12 20:10:32 -0400114 <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
cristy29f2c972015-07-28 13:37:46 +0000115 <script src="http://nextgen.imagemagick.org/js/magick.html"></script>
cristyad41c0c2012-10-31 00:49:28 +0000116</div>
cristyad41c0c2012-10-31 00:49:28 +0000117</body>
cristy5a367e42015-05-05 12:39:18 +0000118</html>