blob: bdab320aa4b9bfd1660dacf08d01c242ed412251 [file] [log] [blame]
cristy91469932014-07-25 11:00:25 +00001
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">
cristyad41c0c2012-10-31 00:49:28 +00009<head>
cristy91469932014-07-25 11:00:25 +000010 <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"/>
cristyffb69ed2010-12-25 00:06:48 +000013 <title>ImageMagick: Install the ImageMagickObject COM+ Component</title>
cristy91469932014-07-25 11:00:25 +000014 <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"/>
cristy8ee7f242013-06-20 16:08:44 +000034
cristyad41c0c2012-10-31 00:49:28 +000035 <!-- Add jQuery library -->
cristy91469932014-07-25 11:00:25 +000036 <script type="text/javascript" src="http://localhost/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
cristyad41c0c2012-10-31 00:49:28 +000037
cristy8ee7f242013-06-20 16:08:44 +000038 <!-- 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>
cristyad41c0c2012-10-31 00:49:28 +000040
41 <!-- Add fancyBox -->
cristy91469932014-07-25 11:00:25 +000042 <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>
cristyad41c0c2012-10-31 00:49:28 +000044
cristy8ee7f242013-06-20 16:08:44 +000045 <!-- Optionally add helpers - button, thumbnail and/or media -->
cristy91469932014-07-25 11:00:25 +000046 <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>
cristyad41c0c2012-10-31 00:49:28 +000049
cristy91469932014-07-25 11:00:25 +000050 <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>
cristy8ee7f242013-06-20 16:08:44 +000052
cristyad41c0c2012-10-31 00:49:28 +000053 <script type="text/javascript">
54 $(document).ready(function() {
55 $(".fancybox").fancybox();
56 });
57 </script>
cristy8ee7f242013-06-20 16:08:44 +000058
cristyad41c0c2012-10-31 00:49:28 +000059 <!-- ImageMagick style -->
cristyad41c0c2012-10-31 00:49:28 +000060 <style type="text/css" media="all">
61 @import url("../www/magick.css");
62 </style>
63</head>
64
65<body id="www-imagemagick-org">
cristy8ee7f242013-06-20 16:08:44 +000066
cristy91469932014-07-25 11:00:25 +000067<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');
cristy8ee7f242013-06-20 16:08:44 +000072
cristy91469932014-07-25 11:00:25 +000073 ga('create', 'UA-40133312-1', 'imagemagick.org');
74 ga('send', 'pageview');
75</script>
cristy8ee7f242013-06-20 16:08:44 +000076
cristyad41c0c2012-10-31 00:49:28 +000077<div class="titlebar">
78<div style="margin: 17px auto; float: left;">
79 <script type="text/javascript">
80 <!--
81 google_ad_client = "pub-3129977114552745";
82 google_ad_slot = "5439289906";
83 google_ad_width = 728;
84 google_ad_height = 90;
85 //-->
86 </script>
cristy91469932014-07-25 11:00:25 +000087 <script type="text/javascript"
88 src="http://localhost/pagead/show_ads.js">
89 </script>
cristyad41c0c2012-10-31 00:49:28 +000090</div>
cristy149d58c2013-08-07 19:44:54 +000091<a href="../discourse-server">
cristy91469932014-07-25 11:00:25 +000092 <img src="../images/logo.jpg"
93 alt="ImageMagick Logo" width="123" height="118"
94 style="width: 123px; height: 118px; border: 0px; float: right;" /></a>
cristyf1b8a092014-02-20 15:46:11 +000095<a href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">
cristy91469932014-07-25 11:00:25 +000096 <img src="../images/sprite.jpg"
97 alt="ImageMagick Sprite" width="114" height="118"
98 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
cristyad41c0c2012-10-31 00:49:28 +000099</div>
100
101<div class="westbar">
102
cristy3ed852e2009-09-05 21:47:34 +0000103<div class="menu">
cristyf1b8a092014-02-20 15:46:11 +0000104 <a title="About ImageMagick" href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">About ImageMagick</a>
cristy3ed852e2009-09-05 21:47:34 +0000105</div>
cristy3ed852e2009-09-05 21:47:34 +0000106<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000107 <a title="Binary Releases" href="binary-releases.html">Binary Releases</a>
cristybb503372010-05-27 20:51:26 +0000108</div>
109<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000110 <a title="Binary Release: Unix" href="binary-releases.html#unix">Unix</a>
cristybb503372010-05-27 20:51:26 +0000111</div>
112<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000113 <a title="Binary Release: MacOS X" href="binary-releases.html#macosx">Mac OS X</a>
cristybb503372010-05-27 20:51:26 +0000114</div>
115<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000116 <a title="Binary Release: iOS" href="binary-releases.html#iOS">iOS</a>
cristyda16f162011-02-19 23:52:17 +0000117</div>
118<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000119 <a title="Binary Release: Windows" href="binary-releases.html#windows">Windows</a>
cristybb503372010-05-27 20:51:26 +0000120</div>
cristyad41c0c2012-10-31 00:49:28 +0000121<div class="sep"></div>
cristybb503372010-05-27 20:51:26 +0000122<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000123 <a title="Command-line Tools" href="command-line-tools.html">Command-line Tools</a>
cristy3ed852e2009-09-05 21:47:34 +0000124</div>
125<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000126 <a title="Command-line Tools: Processing" href="command-line-processing.html">Processing</a>
cristy3ed852e2009-09-05 21:47:34 +0000127</div>
128<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000129 <a title="Command-line Tools: Options" href="command-line-options.html">Options</a>
cristy3ed852e2009-09-05 21:47:34 +0000130</div>
131<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000132 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
cristy3ed852e2009-09-05 21:47:34 +0000133</div>
134<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000135 <a title="Program Interfaces" href="api.html">Program Interfaces</a>
cristy3ed852e2009-09-05 21:47:34 +0000136</div>
137<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000138 <a title="Program Interface: MagickWand" href="magick-wand.html">MagickWand</a>
cristy3ed852e2009-09-05 21:47:34 +0000139</div>
140<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000141 <a title="Program Interface: MagickCore" href="magick-core.html">MagickCore</a>
cristy3ed852e2009-09-05 21:47:34 +0000142</div>
143<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000144 <a title="Program Interface: PerlMagick" href="perl-magick.html">PerlMagick</a>
cristy3ed852e2009-09-05 21:47:34 +0000145</div>
146<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000147 <a title="Program Interface: Magick++" href="magick++.html">Magick++</a>
cristy3ed852e2009-09-05 21:47:34 +0000148</div>
cristyad41c0c2012-10-31 00:49:28 +0000149<div class="sep"></div>
cristy91469932014-07-25 11:00:25 +0000150<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000151 <a title="Install from Source" href="install-source.html">Install from Source</a>
cristy3ed852e2009-09-05 21:47:34 +0000152</div>
153<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000154 <a title="Install from Source: Unix" href="install-source.html#unix">Unix</a>
cristy3ed852e2009-09-05 21:47:34 +0000155</div>
156<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000157 <a title="Install from Source: Windows" href="install-source.html#windows">Windows</a>
cristy3ed852e2009-09-05 21:47:34 +0000158 </div>
159<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000160 <a title="Resources" href="resources.html">Resources</a>
cristy3ed852e2009-09-05 21:47:34 +0000161</div>
cristybb503372010-05-27 20:51:26 +0000162<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000163 <a title="Architecture" href="architecture.html">Architecture</a>
cristybb503372010-05-27 20:51:26 +0000164</div>
cristy3ed852e2009-09-05 21:47:34 +0000165<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000166 <a title="Download" href="download.html">Download</a>
cristy3ed852e2009-09-05 21:47:34 +0000167</div>
cristyad41c0c2012-10-31 00:49:28 +0000168<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000169<div class="menu">
cristy8ee7f242013-06-20 16:08:44 +0000170 <a title="Search" href="search.html">Search</a>
cristy3ed852e2009-09-05 21:47:34 +0000171</div>
cristyad41c0c2012-10-31 00:49:28 +0000172<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000173<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000174 <a title="Site Map" href="sitemap.html">Site Map</a>
cristy3ed852e2009-09-05 21:47:34 +0000175</div>
cristy91469932014-07-25 11:00:25 +0000176<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000177 <a title="Site Map: Links" href="links.html">Links</a>
cristy3ed852e2009-09-05 21:47:34 +0000178</div>
cristyad41c0c2012-10-31 00:49:28 +0000179<div class="sep"></div>
cristyad41c0c2012-10-31 00:49:28 +0000180</div>
181
182<div class="eastbar">
cristy91469932014-07-25 11:00:25 +0000183 <script type="text/javascript">
184 /* <![CDATA[ */
185 window.___gcfg = {
186 lang: 'en-US'
187 };
188
189 (function() {
190 var po = document.createElement('offline-script');
191 po.type = 'text/javascript';
192 po.async = true;
193 po.src = 'https://apis.google.com/js/plusone.js';
194 var script = document.getElementsByTagName('offline-script')[0];
195 script.parentNode.insertBefore(po, script);
196 })();
197 var gplusone = document.getElementById("gplusone");
198 gplusone.setAttribute("data-size","medium");
199 gplusone.setAttribute("data-count","true");
200 /* ]]> */
201 </script>
202 <script type="text/javascript">
203 /* <![CDATA[ */
204 (function() {
205 var po = document.createElement('offline-script'), t = document.getElementsByTagName('offline-script')[0];
206 po.type = 'text/javascript';
207 po.async = true;
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);
211 })();
212 /* ]]> */
213 </script>
cristyf1b8a092014-02-20 15:46:11 +0000214 <div> <a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://www.imagemagick.org/"></a></div>
cristy8ee7f242013-06-20 16:08:44 +0000215 <noscript>
216 <a href="http://flattr.com/thing/947300/Convert-Edit-And-Compose-Images" target="_blank">
cristy91469932014-07-25 11:00:25 +0000217 <img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" width="93" height="20" border="0" /></a>
cristy8ee7f242013-06-20 16:08:44 +0000218 </noscript>
cristy91469932014-07-25 11:00:25 +0000219 <div class="g-plusone" data-size="standard" data-count="true"></div>
cristyad41c0c2012-10-31 00:49:28 +0000220</div>
221
222<div class="main">
223
cristyffb69ed2010-12-25 00:06:48 +0000224<h1>ImageMagick COM+ Compatible Component</h1>
cristy417eeb12013-07-28 18:48:22 +0000225<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>
cristy3ed852e2009-09-05 21:47:34 +0000226
cristydcca3fa2010-12-29 21:50:07 +0000227<h2><a id="intro"></a>Introduction to the ImageMagickObject COM+ Object</h2>
cristy3ed852e2009-09-05 21:47:34 +0000228<div class="doc-section">
229
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>
231
cristy751980d2012-06-03 23:18:35 +0000232<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 +0000233
cristy751980d2012-06-03 23:18:35 +0000234<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 +0000235
236<pre class="text">
cristy91469932014-07-25 11:00:25 +0000237 c:\Program Files\ImageMagick-6.8.9-Q16\ImageMagickObject
cristy3ed852e2009-09-05 21:47:34 +0000238</pre>
239
cristy8ee7f242013-06-20 16:08:44 +0000240<p>The ImageMagickObject is registered if the checkbox, <code>Register ImageMagickObject</code>, is checked at install time.</p>
cristy3ed852e2009-09-05 21:47:34 +0000241
242<p>To execute the sample program from the Windows Command Shell, type:</p>
243
cristy91469932014-07-25 11:00:25 +0000244<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>cscript SimpleTest.vbs</span></p>
cristy751980d2012-06-03 23:18:35 +0000245<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 +0000246
cristy8ee7f242013-06-20 16:08:44 +0000247<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 +0000248
cristy8ee7f242013-06-20 16:08:44 +0000249<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 +0000250
251</div>
252
cristydcca3fa2010-12-29 21:50:07 +0000253<h2><a id="build"></a>Build ImageMagickObject From Source</h2>
cristy3ed852e2009-09-05 21:47:34 +0000254<div class="doc-section">
255
cristy8ee7f242013-06-20 16:08:44 +0000256<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>
cristy3ed852e2009-09-05 21:47:34 +0000257
258<p>Once the VisualStaticMT project has been built, build the ImageMagickObject with this procedure:</p>
259
cristy91469932014-07-25 11:00:25 +0000260<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>cd ImageMagick/contrib/win32/ATL7/ImageMagickObject</span><span class='crtout'></span><span class="crtprompt"> $magick&gt; </span><span class='crtin'>BuildImageMagickObject release</span></p>
cristy8ee7f242013-06-20 16:08:44 +0000261<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 +0000262
263<p>To register the DLL as a COM+ server, type</p>
264
cristy91469932014-07-25 11:00:25 +0000265<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>regsvr32 /c /s ImageMagickObject.dll</span></p>
cristy3ed852e2009-09-05 21:47:34 +0000266<p>To unregister the DLL, type</p>
267
cristy91469932014-07-25 11:00:25 +0000268<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>regsvr32 /u /s ImageMagickObject.dll</span></p>
cristy3ed852e2009-09-05 21:47:34 +0000269<p>Use MagickCMD to exercise ImageMagickObject to verify that it is working properly.</p>
270
271</div>
cristyad41c0c2012-10-31 00:49:28 +0000272
273</div>
274
275<div id="linkbar">
cristyac1b4322013-07-28 13:58:06 +0000276 <span id="linkbar-west"> </span>
cristy8ee7f242013-06-20 16:08:44 +0000277
cristyad41c0c2012-10-31 00:49:28 +0000278 <span id="linkbar-center">
cristy149d58c2013-08-07 19:44:54 +0000279 <a href="../discourse-server">Discourse Server</a>
cristy91469932014-07-25 11:00:25 +0000280 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
cristy417eeb12013-07-28 18:48:22 +0000281 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy8ee7f242013-06-20 16:08:44 +0000282 <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
cristyad41c0c2012-10-31 00:49:28 +0000283 </span>
cristyac1b4322013-07-28 13:58:06 +0000284 <span id="linkbar-east"> </span>
cristy149d58c2013-08-07 19:44:54 +0000285</div>
286<div class="footer">
cristy37b3d442015-02-28 14:00:30 +0000287 <span id="footer-west">© 1999-2014 ImageMagick Studio LLC</span>
cristy149d58c2013-08-07 19:44:54 +0000288 <span id="footer-east"> <a href="contact.html">Contact the Wizards</a></span>
289</div>
290<div style="clear: both; margin: 0; width: 100%; "></div>
cristyad41c0c2012-10-31 00:49:28 +0000291</body>
292</html>