2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4 <html version="-//W3C//DTD XHTML 1.1//EN"
5 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
6 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7 xsi:schemaLocation="http://www.w3.org/1999/xhtml
8 http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
10 <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
11 <meta name=viewport content="width=device-width, initial-scale=0.3333334">
12 <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4"/>
13 <title>ImageMagick: Install the ImageMagickObject COM+ Component</title>
14 <meta http-equiv="content-language" content="en-US"/>
15 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
16 <meta http-equiv="reply-to" content="magick-users@imagemagick.org"/>
17 <meta name="application-name" content="ImageMagick"/>
18 <meta name="description" content="A collection of tools and libraries to read, write, and manipulate an image in any of the more popular image formats."/>
19 <meta name="application-url" content="http://www.imagemagick.org"/>
20 <meta name="generator" content="PHP"/>
21 <meta name="keywords" content="install, the, imagemagickobject, com+, component, convert, edit, compose, image, pixel"/>
22 <meta name="rating" content="GENERAL"/>
23 <meta name="robots" content="INDEX, FOLLOW"/>
24 <meta name="generator" content="ImageMagick Studio LLC"/>
25 <meta name="author" content="ImageMagick Studio LLC"/>
26 <meta name="revisit-after" content="2 DAYS"/>
27 <meta name="resource-type" content="document"/>
28 <meta name="copyright" content="Copyright (c) 1999-2012 ImageMagick Studio LLC"/>
29 <meta name="distribution" content="Global"/>
30 <link rel="icon" href="../images/wand.png"/>
31 <link rel="shortcut icon" href="../images/wand.ico" type="images/x-icon"/>
32 <link rel="canonical" href="http://www.imagemagick.org" />
33 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf"/>
35 <!-- Add jQuery library -->
36 <script type="text/javascript" src="http://localhost/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
38 <!-- Add mousewheel plugin (this is optional) -->
39 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>
42 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
43 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
45 <!-- Optionally add helpers - button, thumbnail and/or media -->
46 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />
47 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
48 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.6"></script>
50 <link rel="stylesheet" href="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" />
51 <script type="text/javascript" src="http://www.imagemagick.org/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>
53 <script type="text/javascript">
54 $(document).ready(function() {
55 $(".fancybox").fancybox();
59 <!-- ImageMagick style -->
60 <style type="text/css" media="all">
61 @import url("../www/magick.css");
65 <body id="www-imagemagick-org">
67 <script type="text/javascript">
68 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
69 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
70 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
71 })(window,document,'offline-script','//www.google-analytics.com/analytics.js','ga');
73 ga('create', 'UA-40133312-1', 'imagemagick.org');
74 ga('send', 'pageview');
77 <div class="titlebar">
78 <div style="margin: 17px auto; float: left;">
79 <script type="text/javascript">
81 google_ad_client = "pub-3129977114552745";
82 google_ad_slot = "5439289906";
83 google_ad_width = 728;
84 google_ad_height = 90;
87 <script type="text/javascript"
88 src="http://localhost/pagead/show_ads.js">
91 <a href="../discourse-server">
92 <img src="../images/logo.jpg"
93 alt="ImageMagick Logo" width="123" height="118"
94 style="width: 123px; height: 118px; border: 0px; float: right;" /></a>
95 <a href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">
96 <img src="../images/sprite.jpg"
97 alt="ImageMagick Sprite" width="114" height="118"
98 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
101 <div class="westbar">
104 <a title="About ImageMagick" href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">About ImageMagick</a>
107 <a title="Binary Releases" href="binary-releases.html">Binary Releases</a>
110 <a title="Binary Release: Unix" href="binary-releases.html#unix">Unix</a>
113 <a title="Binary Release: MacOS X" href="binary-releases.html#macosx">Mac OS X</a>
116 <a title="Binary Release: iOS" href="binary-releases.html#iOS">iOS</a>
119 <a title="Binary Release: Windows" href="binary-releases.html#windows">Windows</a>
121 <div class="sep"></div>
123 <a title="Command-line Tools" href="command-line-tools.html">Command-line Tools</a>
126 <a title="Command-line Tools: Processing" href="command-line-processing.html">Processing</a>
129 <a title="Command-line Tools: Options" href="command-line-options.html">Options</a>
132 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
135 <a title="Program Interfaces" href="api.html">Program Interfaces</a>
138 <a title="Program Interface: MagickWand" href="magick-wand.html">MagickWand</a>
141 <a title="Program Interface: MagickCore" href="magick-core.html">MagickCore</a>
144 <a title="Program Interface: PerlMagick" href="perl-magick.html">PerlMagick</a>
147 <a title="Program Interface: Magick++" href="magick++.html">Magick++</a>
149 <div class="sep"></div>
151 <a title="Install from Source" href="install-source.html">Install from Source</a>
154 <a title="Install from Source: Unix" href="install-source.html#unix">Unix</a>
157 <a title="Install from Source: Windows" href="install-source.html#windows">Windows</a>
160 <a title="Resources" href="resources.html">Resources</a>
163 <a title="Architecture" href="architecture.html">Architecture</a>
166 <a title="Download" href="download.html">Download</a>
168 <div class="sep"></div>
170 <a title="Search" href="search.html">Search</a>
172 <div class="sep"></div>
174 <a title="Site Map" href="sitemap.html">Site Map</a>
177 <a title="Site Map: Links" href="links.html">Links</a>
179 <div class="sep"></div>
182 <div class="eastbar">
183 <script type="text/javascript">
190 var po = document.createElement('offline-script');
191 po.type = 'text/javascript';
193 po.src = 'https://apis.google.com/js/plusone.js';
194 var script = document.getElementsByTagName('offline-script')[0];
195 script.parentNode.insertBefore(po, script);
197 var gplusone = document.getElementById("gplusone");
198 gplusone.setAttribute("data-size","medium");
199 gplusone.setAttribute("data-count","true");
202 <script type="text/javascript">
205 var po = document.createElement('offline-script'), t = document.getElementsByTagName('offline-script')[0];
206 po.type = 'text/javascript';
208 po.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
209 var script = document.getElementsByTagName('offline-script')[0];
210 script.parentNode.insertBefore(po, script);
214 <div> <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://www.imagemagick.org/"></a></div>
216 <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
217 <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width="93" height="20" border="0" /></a>
219 <div class="g-plusone" data-size="standard" data-count="true"></div>
224 <h1>ImageMagick COM+ Compatible Component</h1>
225 <p class="navigation-index">[<a href="index.html#intro">Introduction to the ImageMagickObject COM+ Object</a> • <a href="index.html#build">Build ImageMagickObject From Source</a>]</p>
227 <h2><a id="intro"></a>Introduction to the ImageMagickObject COM+ Object</h2>
228 <div class="doc-section">
230 <p>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>
232 <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>
234 <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>
237 c:\Program Files\ImageMagick-6.8.9-Q16\ImageMagickObject
240 <p>The ImageMagickObject is registered if the checkbox, <code>Register ImageMagickObject</code>, is checked at install time.</p>
242 <p>To execute the sample program from the Windows Command Shell, type:</p>
244 <p class='crt'><span class="crtprompt"> $magick> </span><span class='crtin'>cscript SimpleTest.vbs</span></p>
245 <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>
247 <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>
249 <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>
253 <h2><a id="build"></a>Build ImageMagickObject From Source</h2>
254 <div class="doc-section">
256 <p>The source code for ImageMagickObject is available from the ImageMagick <a href="subversion.html">subversion</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>
258 <p>Once the VisualStaticMT project has been built, build the ImageMagickObject with this procedure:</p>
260 <p class='crt'><span class="crtprompt"> $magick> </span><span class='crtin'>cd ImageMagick/contrib/win32/ATL7/ImageMagickObject</span><span class='crtout'></span><span class="crtprompt"> $magick> </span><span class='crtin'>BuildImageMagickObject release</span></p>
261 <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>
263 <p>To register the DLL as a COM+ server, type</p>
265 <p class='crt'><span class="crtprompt"> $magick> </span><span class='crtin'>regsvr32 /c /s ImageMagickObject.dll</span></p>
266 <p>To unregister the DLL, type</p>
268 <p class='crt'><span class="crtprompt"> $magick> </span><span class='crtin'>regsvr32 /u /s ImageMagickObject.dll</span></p>
269 <p>Use MagickCMD to exercise ImageMagickObject to verify that it is working properly.</p>
276 <span id="linkbar-west"> </span>
278 <span id="linkbar-center">
279 <a href="../discourse-server">Discourse Server</a> •
280 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> •
281 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a> •
282 <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
284 <span id="linkbar-east"> </span>
287 <span id="footer-west">© 1999-2014 ImageMagick Studio LLC</span>
288 <span id="footer-east"> <a href="contact.html">Contact the Wizards</a></span>
290 <div style="clear: both; margin: 0; width: 100%; "></div>