Home | History | Annotate | Download | only in api
      1 
      2 
      3 
      4 
      5 <!DOCTYPE html>
      6 <html lang="en">
      7 <head>
      8     <title>ImageMagick: Magick++, C++ API for ImageMagick: Classes</title>
      9   <meta charset="utf-8" />
     10   <meta http-equiv="X-UA-Compatible" content="IE=edge" />
     11   <meta name="viewport" content="width=device-width, initial-scale=1" />
     12   <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
     13   <meta name="application-name" content="ImageMagick"/>
     14   <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 Bzier curves."/>
     15   <meta name="application-url" content="http://www.imagemagick.org"/>
     16   <meta name="generator" content="PHP"/>
     17   <meta name="keywords" content="magick++, c++, api, for, imagemagick:, classes, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
     18   <meta name="rating" content="GENERAL"/>
     19   <meta name="robots" content="INDEX, FOLLOW"/>
     20   <meta name="generator" content="ImageMagick Studio LLC"/>
     21   <meta name="author" content="ImageMagick Studio LLC"/>
     22   <meta name="revisit-after" content="2 DAYS"/>
     23   <meta name="resource-type" content="document"/>
     24   <meta name="copyright" content="Copyright (c) 1999-2016 ImageMagick Studio LLC"/>
     25   <meta name="distribution" content="Global"/>
     26   <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
     27   <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
     28   <link rel="icon" href="../images/wand.png"/>
     29   <link rel="shortcut icon" href="../images/wand.ico"/>
     30   <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Roboto:900,400,400italic,700,700italic,300,300italic|Open+Sans:300italic,400italic,700italic,300,400,600,700">
     31   <link rel="stylesheet" href="../css/magick.html"/>
     32 </head>
     33 <body>
     34 <div class="main">
     35 <div class="magick-masthead">
     36   <div class="container">
     37     <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
     38          style="display:block"
     39          data-ad-client="ca-pub-3129977114552745"
     40          data-ad-slot="6345125851"
     41          data-ad-format="auto"></ins>
     42     <script>
     43       (adsbygoogle = window.adsbygoogle || []).push({});
     44     </script>
     45     <nav class="magick-nav">
     46       <a class="magick-nav-item " href="../index.html">Home</a>
     47       <a class="magick-nav-item " href="../binary-releases.html">Download</a>
     48       <a class="magick-nav-item " href="../command-line-tools.html">Tools</a>
     49       <a class="magick-nav-item " href="../command-line-processing.html">Command-line</a>
     50       <a class="magick-nav-item " href="../resources.html">Resources</a>
     51       <a class="magick-nav-item " href="api.html">Develop</a>
     52       <a class="magick-nav-item " href="http://www.imagemagick.org/script/search.php">Search</a>
     53       <a class="magick-nav-item pull-right" href="https://www.imagemagick.org/discourse-server/">Community</a>
     54     </nav>
     55   </div>
     56 </div>
     57 <div class="container">
     58 <h1>Magick++ Classes</h1>
     59 <div class="doc-section">
     60 <p><a href="../Magick++.1">Magick++</a> provides a simple C++ API to the ImageMagick image processing library which supports reading and writing a huge number of image formats as well as supporting a broad spectrum of traditional image processing operations. The ImageMagick C API is complex and the data structures are currently not documented. Magick++ provides access to most of the features available from the C API but in a simple object-oriented and well-documented framework.</p>
     61 <p>Magick++ is intended to support commercial-grade application development. In order to avoid possible conflicts with the user's application, all symbols contained in Magick++ (included by the header <tt><font color="#663366">&lt;Magick++.h&gt;</font></tt>) are scoped to the <span lang="en-US">namespace</span> <i>Magick</i>. Symbols from the ImageMagick C library are imported under the <i>MagickCore</i> namespace to avoid possible conflicts and ImageMagick macros are only included within the Magick++ implementation so they won't impact the user's application.</p>
     62 <p>The core class in Magick++ is the <a href="Image++.html">Image</a> class. The Image class provides methods to manipulate a single image frame (e.g. a JPEG image). Standard Template Library (STL)<span lang="en-US">compatible</span> <a href="http://www.imagemagick.org/api/STL.html">algorithms and function objects</a> are provided in order to manipulate multiple image frames or to read and write file formats which support multiple image frames (e.g. GIF animations, MPEG animations, and Postscript files).</p>
     63 <p>The Image class supports reference-counted memory management which supports the semantics of an intrinsic variable type (e.g. 'int') with an extremely efficient <tt>operator =</tt> and copy constructor (only a pointer is assigned) while ensuring that the image data is replicated as required so that it the image may be modified without impacting earlier generations. Since the Image class manages heap memory internally, images are best allocated via C++ automatic (stack-based) memory allocation. This support allows most programs using Magick++ to be written without using any pointers, simplifying the implementation and avoiding the risks of using pointers. When a program uses automatic memory allocation to allocate Magick++ images, that aspect of the program becomes naturally exception-safe and thread-safe.</p>
     64 <p>The image class uses a number of supportive classes in order to specify arguments. Colors are specified via the <a href="../Magick++/Color.html">Color</a> class. Colors specified in X11-style string form are implicitly converted to the Color class. Geometry arguments (those specifying width, height, and/or x and y offset) are specified via the <a href="http://www.imagemagick.org/api/Geometry.html">Geometry</a> class. Similar to the Color class, geometries specified as an X11-style string are implicitly converted to the Geometry class. Two dimensional drawable objects are specified via the <a href="http://www.imagemagick.org/api/Drawable.html">Drawable</a> class. Drawable objects may be provided as a single object or as a list of objects to be rendered using the current image options. Montage options (a montage is a rendered grid of thumbnails in one image) are specified via the <a href="http://www.imagemagick.org/api/Montage.html">Montage</a> class.</p>
     65 <p>Errors are reported using C++ exceptions derived from the <a href="../Magick++/Exception.html">Exception</a> class, which is itself derived from the standard C++ exception class. Exceptions are reported synchronous with the operation and are caught by the first matching <i>try</i> block as the stack is unraveled. This allows a clean coding style in which multiple related Magick++ commands may be executed with errors handled as a unit rather than line-by-line. Since the Image object provides reference-counted memory management, unreferenced images on the stack are automagically cleaned up, avoiding the potential for memory leaks.</p>
     66 <p style="margin-bottom: 0cm">For ease of access, the documentation for the available user-level classes is available via the following table.</p>
     67 <br />
     68 <ul><table border="1" class="docutils">
     69 <caption><em>Magick++</em> User-Level Classes</caption>
     70 <colgroup>
     71 <col width="18%" />
     72 <col width="82%" />
     73 </colgroup>
     74 <tbody valign="top">
     75 <tr><td><a class="reference external" href="../Magick++/Blob.html">Blob</a></td>
     76 <td>Binary Large OBject container.</td>
     77 </tr>
     78 <tr><td><a class="reference external" href="../Magick++/CoderInfo.html">CoderInfo</a></td>
     79 <td>Report information about supported image formats (use with
     80 <a class="reference external" href="../Magick++/STL.html#coderInfoList">coderInfoList</a>())</td>
     81 </tr>
     82 <tr><td><a class="reference external" href="../Magick++/Color.html">Color</a></td>
     83 <td>Color specification.</td>
     84 </tr>
     85 <tr><td><a class="reference external" href="../Magick++/Drawable.html">Drawable</a></td>
     86 <td>Drawable shape (for input to 'draw').</td>
     87 </tr>
     88 <tr><td><a class="reference external" href="../Magick++/Exception.html">Exception</a></td>
     89 <td>C++ exception objects.</td>
     90 </tr>
     91 <tr><td><a class="reference external" href="../Magick++/Geometry.html">Geometry</a></td>
     92 <td>Geometry specification.</td>
     93 </tr>
     94 <tr><td><a class="reference external" href="../Magick++/Image.html">Image</a></td>
     95 <td>Image frame.  This is the primary object in <em>Magick++</em>.</td>
     96 </tr>
     97 <tr><td><a class="reference external" href="../Magick++/Montage.html">Montage</a></td>
     98 <td>Montage options for montageImages().</td>
     99 </tr>
    100 <tr><td><a class="reference external" href="../Magick++/Pixels.html">Pixels</a></td>
    101 <td>Low-level access to image pixels.</td>
    102 </tr>
    103 <tr><td><a class="reference external" href="../Magick++/STL.html">STL</a></td>
    104 <td>STL algorithms and function objects for operating on
    105 containers of image frames.</td>
    106 </tr>
    107 <tr><td><a class="reference external" href="../Magick++/TypeMetric.html">TypeMetric</a></td>
    108 <td>Container for font type metrics (use with
    109 <a class="reference external" href="../Magick++/Image.html#fonttypemetrics">Image::fontTypeMetrics</a>).</td>
    110 </tr>
    111 </tbody>
    112 </table>
    113 </ul>
    114 </div>
    115   <footer class="magick-footer">
    116     <p><a href="../support.html">Donate</a> 
    117      <a href="../sitemap.html">Sitemap</a> 
    118     <a href="../links.html">Related</a> 
    119     <a href="../architecture.html">Architecture</a>
    120 </p>
    121     <p><a href="magick++-classes.html#">Back to top</a> 
    122     <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x89AB63D48277377A">Public Key</a> 
    123     <a href="http://www.imagemagick.org/script/contact.php">Contact Us</a></p>
    124         <p><small>  1999-2016 ImageMagick Studio LLC</small></p>
    125   </footer>
    126 </div><!-- /.container -->
    127 
    128   <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    129   <script src="../js/magick.html"></script>
    130 </div>
    131 </body>
    132 </html>
    133