blob: a1b00fea4c91f5366631c86521f4f80597400dcf [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"/>
cristydcca3fa2010-12-29 21:50:07 +000013 <title>ImageMagick: Magick++, C++ API for ImageMagick</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="magick++, c++, api, for, imagemagick, 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
cristydcca3fa2010-12-29 21:50:07 +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>
cristydcca3fa2010-12-29 21:50:07 +0000105</div>
cristydcca3fa2010-12-29 21:50:07 +0000106<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000107 <a title="Binary Releases" href="binary-releases.html">Binary Releases</a>
cristydcca3fa2010-12-29 21:50:07 +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>
cristydcca3fa2010-12-29 21:50:07 +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>
cristydcca3fa2010-12-29 21:50:07 +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>
cristydcca3fa2010-12-29 21:50:07 +0000120</div>
cristyad41c0c2012-10-31 00:49:28 +0000121<div class="sep"></div>
cristydcca3fa2010-12-29 21:50:07 +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>
cristydcca3fa2010-12-29 21:50:07 +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>
cristydcca3fa2010-12-29 21:50:07 +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>
cristydcca3fa2010-12-29 21:50:07 +0000130</div>
131<div class="sub">
132 <a title="Command-line Tools: Usage" href="http://www.imagemagick.org/Usage/">Usage</a>
133</div>
134<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000135 <a title="Program Interfaces" href="api.html">Program Interfaces</a>
cristydcca3fa2010-12-29 21:50:07 +0000136</div>
137<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000138 <a title="Program Interface: MagickWand" href="magick-wand.html">MagickWand</a>
cristydcca3fa2010-12-29 21:50:07 +0000139</div>
140<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000141 <a title="Program Interface: MagickCore" href="magick-core.html">MagickCore</a>
cristydcca3fa2010-12-29 21:50:07 +0000142</div>
143<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000144 <a title="Program Interface: PerlMagick" href="perl-magick.html">PerlMagick</a>
cristydcca3fa2010-12-29 21:50:07 +0000145</div>
146<div class="sub">
cristy751980d2012-06-03 23:18:35 +0000147 <a title="Program Interface: Magick++" href="magick++.html">Magick++</a>
cristydcca3fa2010-12-29 21:50:07 +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>
cristydcca3fa2010-12-29 21:50:07 +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>
cristydcca3fa2010-12-29 21:50:07 +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>
cristydcca3fa2010-12-29 21:50:07 +0000158 </div>
159<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000160 <a title="Resources" href="resources.html">Resources</a>
cristydcca3fa2010-12-29 21:50:07 +0000161</div>
162<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000163 <a title="Architecture" href="architecture.html">Architecture</a>
cristydcca3fa2010-12-29 21:50:07 +0000164</div>
165<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000166 <a title="Download" href="download.html">Download</a>
cristydcca3fa2010-12-29 21:50:07 +0000167</div>
cristyad41c0c2012-10-31 00:49:28 +0000168<div class="sep"></div>
cristydcca3fa2010-12-29 21:50:07 +0000169<div class="menu">
cristy8ee7f242013-06-20 16:08:44 +0000170 <a title="Search" href="search.html">Search</a>
cristydcca3fa2010-12-29 21:50:07 +0000171</div>
cristyad41c0c2012-10-31 00:49:28 +0000172<div class="sep"></div>
cristydcca3fa2010-12-29 21:50:07 +0000173<div class="menu">
cristy751980d2012-06-03 23:18:35 +0000174 <a title="Site Map" href="sitemap.html">Site Map</a>
cristydcca3fa2010-12-29 21:50:07 +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>
cristydcca3fa2010-12-29 21:50:07 +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
cristydcca3fa2010-12-29 21:50:07 +0000224<h1>Magick++ C++ API</h1>
cristy417eeb12013-07-28 18:48:22 +0000225<p class="navigation-index">[<a href="magick++.html#intro">Introduction to Magick++</a><a href="magick++.html#documentation">Documentation</a><a href="magick++.html#get">Obtaining Magick++</a><a href="magick++.html#install">Installation</a><a href="magick++.html#bugs">Reporting Bugs</a>]</p>
cristydcca3fa2010-12-29 21:50:07 +0000226<div class="doc-section">
227<a id="intro"></a>
cristyf1b8a092014-02-20 15:46:11 +0000228<p><a href="http://www.imagemagick.org/ImageMagick-7.0.0/api/Magick++/index.html">Magick++ API</a> is the object-oriented C++ API to the <a href="http://www.imagemagick.org/">ImageMagick</a> image-processing library.</p>
229<p>Magick++ supports an object model which is inspired by <a href="../perl-magick.html">PerlMagick</a>.
cristydcca3fa2010-12-29 21:50:07 +0000230Images support implicit reference counting so that copy constructors
231and assignment incur almost no cost. The cost of actually copying an
232image (if necessary) is done just before modification and this copy
233is managed automagically by Magick++. De-referenced copies are
234automagically deleted. The image objects support value (rather than
235pointer) semantics so it is trivial to support multiple generations
236of an image in memory at one time.
237</p>
cristy2bd2a982011-02-15 00:52:58 +0000238<p>Magick++ provides integrated support for the <a href="http://www.sgi.com/tech/stl/">Standard
239Template Library</a> (STL) so that the powerful containers available
240(e.g. <a href="http://www.sgi.com/tech/stl/Deque.html">deque</a>,
241<a href="http://www.sgi.com/tech/stl/Vector.html">vector</a>, <a href="http://www.sgi.com/tech/stl/List.html">list</a>,
cristyac1b4322013-07-28 13:58:06 +0000242and <a href="http://www.sgi.com/tech/stl/Map.html">map</a>) can
cristydcca3fa2010-12-29 21:50:07 +0000243be used to write programs similar to those possible with PERL &amp;
244PerlMagick. STL-compatible template versions of ImageMagick's
245list-style operations are provided so that operations may be
246performed on multiple images stored in STL containers.
247</p>
248</div>
249<h2>Documentation</h2>
250<div class="doc-section">
251<a id="documentation"></a>
cristyf1b8a092014-02-20 15:46:11 +0000252<p>Detailed <a href="http://www.imagemagick.org/ImageMagick-7.0.0/api/magick++-classes.html">documentation</a> is
cristydcca3fa2010-12-29 21:50:07 +0000253provided for all Magick++ classes, class methods, and template
cristy91469932014-07-25 11:00:25 +0000254functions which comprise the API. See a <a href="../tutorial/Magick++_tutorial.pdf"> Gentle Introduction to Magick++</a> for an introductory tutorial to Magick++. We include the <a href="../tutorial/Magick++_tutorial.odt" >source</a> if you want to correct, enhance, or expand the tutorial.</p>
cristydcca3fa2010-12-29 21:50:07 +0000255</div>
256<h2>Obtaining Magick++</h2>
257<a id="get"></a>
258<div class="doc-section">
cristyf1b8a092014-02-20 15:46:11 +0000259<p>Magick++ is included as part of <a href="http://www.imagemagick.org/ImageMagick-7.0.0/index.html">ImageMagick</a>
260source releases and may be retrieved via <a href="http://www.imagemagick.org/download.html">ftp</a>
261or <a href="../subversion.html">Subversion</a>.
cristydcca3fa2010-12-29 21:50:07 +0000262</p>
263</div>
264<h2>Installation</h2>
265<div class="doc-section">
266<a id="install"></a>
267<p>Once you have the Magick++ sources available, follow these detailed
cristy8ee7f242013-06-20 16:08:44 +0000268<a href="../Magick++/Install.html">installation instructions</a> for UNIX and
cristydcca3fa2010-12-29 21:50:07 +0000269Windows.
270</p>
cristy751980d2012-06-03 23:18:35 +0000271</div>
272<h2>Usage</h2>
273<div class="doc-section">
cristy8ee7f242013-06-20 16:08:44 +0000274<p>A helper script named <code>Magick++-config</code> is installed
cristydcca3fa2010-12-29 21:50:07 +0000275under Unix which assists with recalling compilation options required
276to compile and link programs which use Magick++. For example, the
cristy8ee7f242013-06-20 16:08:44 +0000277following command will compile and link the source file <code>demo.cpp</code>
278to produce the executable <code>demo</code> (notice that quotes are
cristydcca3fa2010-12-29 21:50:07 +0000279backward quotes):
280</p>
281<pre class="text">
282c++ `Magick++-config --cxxflags --cppflags` -O2 -o demo demo.cpp \
283 `Magick++-config --ldflags --libs`
284</pre>
285<p>Windows users may get started by manually editing a project file
286for one of the Magick++ demo programs.
287</p>
288<p>Note, under Windows (and possibly the Mac) it may be necessary to initialize the ImageMagick library prior to using the Magick++ library. This initialization is performed by passing the path to the ImageMagick DLLs (assumed to be in the same directory as your program) to the InitializeMagick() function call. This is commonly performed by providing the path to your program (argv[0]) as shown in the following example: </p>
289<pre class="text">
290int main( int argc, char ** argv) {
291 InitializeMagick(*argv);
292 ...
293</pre>
294<p>This initialization step is not required under Unix, Linux,
295Cygwin, or any other operating environment that supports the notion
296of <em>installing</em> ImageMagick in a known location.
297</p>
298</div>
299<h2>Reporting Bugs</h2>
300<div class="doc-section">
301<a id="bugs"></a>
cristy2d67ddd2011-02-13 15:38:23 +0000302<p>Questions regarding usage should be directed to or to report any bugs go to
cristy6ad765e2013-02-24 22:14:01 +0000303<a href="http://www.imagemagick.org/discourse-server/viewforum.html?f=23">Magick++ bug tracking forum</a>.
cristydcca3fa2010-12-29 21:50:07 +0000304</p>
305</div>
cristyad41c0c2012-10-31 00:49:28 +0000306
307</div>
308
309<div id="linkbar">
cristyac1b4322013-07-28 13:58:06 +0000310 <span id="linkbar-west"> </span>
cristy8ee7f242013-06-20 16:08:44 +0000311
cristyad41c0c2012-10-31 00:49:28 +0000312 <span id="linkbar-center">
cristy149d58c2013-08-07 19:44:54 +0000313 <a href="../discourse-server">Discourse Server</a>
cristy91469932014-07-25 11:00:25 +0000314 <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a>
cristy417eeb12013-07-28 18:48:22 +0000315 <a href="http://www.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi">Studio</a>
cristy8ee7f242013-06-20 16:08:44 +0000316 <a href="http://jqmagick.imagemagick.org/">JqMagick</a>
cristyad41c0c2012-10-31 00:49:28 +0000317 </span>
cristyac1b4322013-07-28 13:58:06 +0000318 <span id="linkbar-east"> </span>
cristy149d58c2013-08-07 19:44:54 +0000319</div>
320<div class="footer">
cristy91469932014-07-25 11:00:25 +0000321 <span id="footer-west">© 1999-2014 ImageMagick Studio LLC</span>
cristy149d58c2013-08-07 19:44:54 +0000322 <span id="footer-east"> <a href="contact.html">Contact the Wizards</a></span>
323</div>
324<div style="clear: both; margin: 0; width: 100%; "></div>
cristyad41c0c2012-10-31 00:49:28 +0000325</body>
326</html>