blob: f6bb1dd1d502164b6200d69e47fce86d0ac4fc38 [file] [log] [blame]
cristy3eaa0ef2010-03-06 20:35:26 +00001
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
cristy2c839602010-04-03 02:32:08 +00004<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
cristy3eaa0ef2010-03-06 20:35:26 +00005<head>
cristy3de29cc2010-04-15 02:34:44 +00006 <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
cristy3eaa0ef2010-03-06 20:35:26 +00007 <meta name="verify-v1" content="g222frIIxcQTrvDR3NBRUSKP3AnMNoqxOkIniCEkV7U=" />
8 <link rel="meta" type="application/rdf+xml" title="ICI" href="http://imagemagick.org/ici.rdf" />
cristy3de29cc2010-04-15 02:34:44 +00009 <style type="text/css" media="all">
cristy3eaa0ef2010-03-06 20:35:26 +000010 @import url("../www/magick.css");
cristy3de29cc2010-04-15 02:34:44 +000011 </style>
cristy3ed852e2009-09-05 21:47:34 +000012 <link rel="shortcut icon" href="../images/wand.ico" type="images/vnd.microsoft.icon"/>
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="Generator" content="PHP"/>
18 <meta name="Keywords" content="install, the, imagemagickobject, com+, component, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand, ImageMagickObject, Swiss, Army, Knife, Image, Processing"/>
19 <meta name="Description" content="ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems. The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images automagically and dynamically."/>
20 <meta name="Rating" content="GENERAL"/>
21 <meta name="Robots" content="INDEX, FOLLOW"/>
22 <meta name="Generator" content="ImageMagick Studio LLC"/>
23 <meta name="Author" content="ImageMagick Studio LLC"/>
24 <meta name="Revisit-after" content="2 DAYS"/>
25 <meta name="Resource-type" content="document"/>
cristy16af1cb2009-12-11 21:38:29 +000026 <meta name="Copyright" content="Copyright (c) 1999-2010 ImageMagick Studio LLC"/>
cristy3ed852e2009-09-05 21:47:34 +000027 <meta name="Distribution" content="Global"/>
cristy3eaa0ef2010-03-06 20:35:26 +000028</head>
29
30<body id="www-imagemagick-org">
31<div class="titlebar">
32<a href="../index.html">
33 <img src="../images/script.png" alt="[ImageMagick]"
34 style="width: 350px; height: 60px; margin: 28px auto; float: left;" /></a>
35<a href="http://www.networkredux.com">
36 <img src="../images/networkredux.png" alt="[sponsor]"
37 style="margin: 45px auto; border: 0px; float: left;" /></a>
38<a href="http://www.imagemagick.org/discourse-server/">
39 <img src="../images/logo.jpg" alt=""
40 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
41<a href="../index.html">
42 <img src="../images/sprite.jpg" alt=""
43 style="width: 114px; height: 118px; border: 0px; float: right;" /></a>
44</div>
45
cristyce69bb02010-07-27 19:49:46 +000046<div class="westbar">
cristy3eaa0ef2010-03-06 20:35:26 +000047
cristy3ed852e2009-09-05 21:47:34 +000048<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000049 <a title="About ImageMagick" href="../index.html">About ImageMagick</a>
cristy3ed852e2009-09-05 21:47:34 +000050</div>
cristy3eaa0ef2010-03-06 20:35:26 +000051<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +000052<div class="menu">
cristybb503372010-05-27 20:51:26 +000053 <a title="Binary Releases" href="../www/binary-releases.html">Binary Releases</a>
54</div>
55<div class="sub">
56 <a title="Binary Release: Unix" href="../www/binary-releases.html#unix">Unix</a>
57</div>
58<div class="sub">
59 <a title="Binary Release: MacOS X" href="../www/binary-releases.html#macosx">Mac OS X</a>
60</div>
61<div class="sub">
62 <a title="Binary Release: Windows" href="../www/binary-releases.html#windows">Windows</a>
63</div>
64<div class="sep"></div>
65<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000066 <a title="Command-line Tools" href="../www/command-line-tools.html">Command-line Tools</a>
cristy3ed852e2009-09-05 21:47:34 +000067</div>
68<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000069 <a title="Command-line Tools: Processing" href="../www/command-line-processing.html">Processing</a>
cristy3ed852e2009-09-05 21:47:34 +000070</div>
71<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000072 <a title="Command-line Tools: Options" href="../www/command-line-options.html">Options</a>
cristy3ed852e2009-09-05 21:47:34 +000073</div>
74<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000075 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
cristy3ed852e2009-09-05 21:47:34 +000076</div>
77<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000078 <a title="Program Interfaces" href="../www/api.html">Program Interfaces</a>
cristy3ed852e2009-09-05 21:47:34 +000079</div>
80<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000081 <a title="Program Interface: MagickWand" href="../www/magick-wand.html">MagickWand</a>
cristy3ed852e2009-09-05 21:47:34 +000082</div>
83<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000084 <a title="Program Interface: MagickCore" href="../www/magick-core.html">MagickCore</a>
cristy3ed852e2009-09-05 21:47:34 +000085</div>
86<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000087 <a title="Program Interface: PerlMagick" href="../www/perl-magick.html">PerlMagick</a>
cristy3ed852e2009-09-05 21:47:34 +000088</div>
89<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000090 <a title="Program Interface: Magick++" href="../Magick++/">Magick++</a>
cristy3ed852e2009-09-05 21:47:34 +000091</div>
cristy3eaa0ef2010-03-06 20:35:26 +000092<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +000093<div class="menu">
cristy83a272e2010-05-07 20:40:35 +000094 <a title="Install from Source" href="../www/install-source.html">Install from Source</a>
cristy3ed852e2009-09-05 21:47:34 +000095</div>
96<div class="sub">
cristy83a272e2010-05-07 20:40:35 +000097 <a title="Install from Source: Unix" href="../www/install-source.html#unix">Unix</a>
cristy3ed852e2009-09-05 21:47:34 +000098</div>
99<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000100 <a title="Install from Source: Windows" href="../www/install-source.html#windows">Windows</a>
cristy3ed852e2009-09-05 21:47:34 +0000101 </div>
102<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000103 <a title="Resources" href="../www/resources.html">Resources</a>
cristy3ed852e2009-09-05 21:47:34 +0000104</div>
cristybb503372010-05-27 20:51:26 +0000105<div class="menu">
106 <a title="Architecture" href="../www/architecture.html">Architecture</a>
107</div>
cristy3ed852e2009-09-05 21:47:34 +0000108<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000109 <a title="Download" href="../www/download.html">Download</a>
cristy3ed852e2009-09-05 21:47:34 +0000110</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000111<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000112<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000113 <a title="Search" href="http://www.imagemagick.org/script/search.php">Search</a>
cristy3ed852e2009-09-05 21:47:34 +0000114</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000115<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000116<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000117 <a title="Site Map"href="../www/sitemap.html">Site Map</a>
cristy3ed852e2009-09-05 21:47:34 +0000118</div>
119<div class="sub">
cristy83a272e2010-05-07 20:40:35 +0000120 <a title="Site Map: Links"href="../www/links.html">Links</a>
cristy3ed852e2009-09-05 21:47:34 +0000121</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000122<div class="sep"></div>
cristy3ed852e2009-09-05 21:47:34 +0000123<div class="menu">
cristy83a272e2010-05-07 20:40:35 +0000124 <a title="Sponsors" href="../www/sponsors.html">Sponsors:</a>
cristy3ed852e2009-09-05 21:47:34 +0000125
126<div class="sponsbox">
127<div class="sponsor">
cristy851dbce2010-08-06 21:40:00 +0000128 <a title="Sponsor: Flyer drucken" href="http://www.online-druck.biz">Flyer drucken</a><!-- 201109010900 Floeter-->
129</div>
130<div class="sponsor">
cristy83a272e2010-05-07 20:40:35 +0000131 <a title="Sponsor: Webdesign Agentur" href="http://www.ventzke-partner.de">Webdesign Agentur</a><!-- 201101010480 invendio.de-->
cristy7d34ef22010-03-25 01:11:22 +0000132</div>
133<div class="sponsor">
cristy83a272e2010-05-07 20:40:35 +0000134 <a title="Sponsor: LVM Versicherung" href="http://www.neu-reich.de">LVM Versicherung</a><!-- 201101010480 -->
cristy8f900122010-03-05 15:26:31 +0000135</div>
136<div class="sponsor">
cristy83a272e2010-05-07 20:40:35 +0000137 <a title="Sponsor: Deko.net" href="http://www.deko.net">Deko.net</a><!-- 201101010600 Peterssen-->
cristy1f9e1ed2009-11-18 04:09:38 +0000138</div>
139<div class="sponsor">
cristy83a272e2010-05-07 20:40:35 +0000140 <a title="Sponsor: Druckerei" href="http://www.print24.de/">Druckerei</a><!-- 201009010720 -->
cristyc1c61662009-09-30 14:04:37 +0000141</div>
142<div class="sponsor">
cristy83a272e2010-05-07 20:40:35 +0000143 <a title="Sponsor: Druckerei Online" href="http://www.allesdruck.de">Druckerei Online</a><!-- 201012011200 allesdruck.de-->
cristyb4c03bb2009-09-27 13:55:46 +0000144</div>
cristy23b89aa2010-06-28 18:08:37 +0000145<div class="sponsor">
cristyce69bb02010-07-27 19:49:46 +0000146 <a title="Sponsor: Webdesign" href="http://www.renehornig.com/">Webdesign</a><!-- 20111001000240 -->
cristy23b89aa2010-06-28 18:08:37 +0000147</div>
cristy3ed852e2009-09-05 21:47:34 +0000148</div>
149</div>
cristyce69bb02010-07-27 19:49:46 +0000150</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000151
cristyce69bb02010-07-27 19:49:46 +0000152<div class="eastbar">
153 <script type="text/javascript">
154 <!--
155 google_ad_client = "pub-3129977114552745";
cristyce69bb02010-07-27 19:49:46 +0000156 google_ad_slot = "0574824969";
157 google_ad_width = 160;
158 google_ad_height = 600;
159 //-->
160 </script>
161 <script type="text/javascript"
162 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
163 </script>
cristy3eaa0ef2010-03-06 20:35:26 +0000164</div>
165
166<div class="main">
167
cristy3ed852e2009-09-05 21:47:34 +0000168<p class="navigation-index">[<a href="../www/#intro">Introduction to the ImageMagickObject COM+ Object</a> &bull; <a href="../www/#build">Build ImageMagickObject From Source</a>]</p>
169
170<h2><a name="intro"></a>Introduction to the ImageMagickObject COM+ Object</h2>
171<div class="doc-section">
172
173<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>
174
175<p>The ImageMagickObject COM+ component provides access to the <a href="../www/compare.html">compare</a>, <a href="../www/convert.html">convert</a>, <a href="../www/composite.html">composite</a>, <a href="../www/mogrify.html">mogrify</a>, <a href="../www/identify.html">identify</a>, <a href="../www/montage.html">montage</a>, and <a href="../www/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>
176
177<p>ImageMagick provides a statically-built ImageMagick object as part of its <a href="../www/binary-releases.html#windows">Windows installation package</a>. When this package is installed, ImageMagickObject and its sample programs are installed to this path:</p>
178
179<pre class="text">
cristyb15553d2010-07-03 22:53:14 +0000180 c:\Program Files\ImageMagick-6.6.3-Q16\ImageMagickObject
cristy3ed852e2009-09-05 21:47:34 +0000181</pre>
182
183<p>The ImageMagickObject is registered if the checkbox, <kbd>Register ImageMagickObject</kbd>, is checked at install time.</p>
184
185<p>To execute the sample program from the Windows Command Shell, type:</p>
186
187<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>cscript SimpleTest.vbs</span></p>
188<p>Since the ImageMagick utility command line parsers are incorporated within ImageMagickObject, please refer to the <a href="../www/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>
189
190<p>C++ programmers should have a look at the <kbd>MagickCMD.cpp</kbd> 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>
191
cristyc1c61662009-09-30 14:04:37 +0000192<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 <kbd>convert xxxx yyyy</kbd> you can use <kbd>MagickCMD convert xxxx yyyy</kbd> 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 +0000193
194</div>
195
196<h2><a name="build"></a>Build ImageMagickObject From Source</h2>
197<div class="doc-section">
198
199<p>The source code for ImageMagickObject is available from the ImageMagick <a href="../www/subversion.html">subversion</a> repository, or as part of the <a href="../www/install-source.html#windows">Windows source</a> distribution. Once the source code has been retrieved and extracted, the source for ImageMagickObject is the directory <kbd>ImageMagick\contrib\win32\ATL7ImageMagickObject</kbd>, 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="../www/install-source.html#windows">Windows compilation instructions</a> to get ImageMagick itself built before building the ImageMagick COM+ component.</p>
200
201<p>Once the VisualStaticMT project has been built, build the ImageMagickObject with this procedure:</p>
202
203<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>
204<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 <kbd>debug</kbd>; instead.</p>
205
206<p>To register the DLL as a COM+ server, type</p>
207
208<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>regsvr32 /c /s ImageMagickObject.dll</span></p>
209<p>To unregister the DLL, type</p>
210
211<p class='crt'><span class="crtprompt"> $magick&gt; </span><span class='crtin'>regsvr32 /u /s ImageMagickObject.dll</span></p>
212<p>Use MagickCMD to exercise ImageMagickObject to verify that it is working properly.</p>
213
214</div>
cristy3eaa0ef2010-03-06 20:35:26 +0000215
216</div>
217
218<div id="linkbar">
cristyce69bb02010-07-27 19:49:46 +0000219 <span id="linkbar-west">&nbsp;</span>
cristy3eaa0ef2010-03-06 20:35:26 +0000220 <span id="linkbar-center">
221 <a href="http://www.imagemagick.org/discourse-server/">Discourse Server</a> &bull;
cristya8902942010-07-30 00:49:52 +0000222 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy3eaa0ef2010-03-06 20:35:26 +0000223 </span>
224 <span id="linkbar-east">&nbsp;</span>
225 </div>
226 <div class="footer">
227 <span id="footer-west">&copy; 1999-2010 ImageMagick Studio LLC</span>
228 <span id="footer-east"> <a href="http://www.imagemagick.org/script/contact.php">Contact the Wizards</a></span>
229 </div>
230 <div style="clear: both; margin: 0; width: 100%; "></div>
cristya8902942010-07-30 00:49:52 +0000231 <script type="text/javascript">
232 var _gaq = _gaq || [];
233 _gaq.push(['_setAccount', 'UA-17690367-1']);
234 _gaq.push(['_trackPageview']);
235
236 (function() {
237 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
238 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
239 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
240 })();
241 </script>
cristy3eaa0ef2010-03-06 20:35:26 +0000242</body>
243</html>