Html程序  |  133行  |  9.98 KB





<!DOCTYPE html>
<html lang="en">
<head>
    <title>ImageMagick: Magick++, C++ API for ImageMagick: Classes</title>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  <meta name="application-name" content="ImageMagick"/>
  <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 Bézier curves."/>
  <meta name="application-url" content="http://www.imagemagick.org"/>
  <meta name="generator" content="PHP"/>
  <meta name="keywords" content="magick++, c++, api, for, imagemagick:, classes, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert"/>
  <meta name="rating" content="GENERAL"/>
  <meta name="robots" content="INDEX, FOLLOW"/>
  <meta name="generator" content="ImageMagick Studio LLC"/>
  <meta name="author" content="ImageMagick Studio LLC"/>
  <meta name="revisit-after" content="2 DAYS"/>
  <meta name="resource-type" content="document"/>
  <meta name="copyright" content="Copyright (c) 1999-2016 ImageMagick Studio LLC"/>
  <meta name="distribution" content="Global"/>
  <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1"/>
  <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" />
  <link rel="icon" href="../images/wand.png"/>
  <link rel="shortcut icon" href="../images/wand.ico"/>
  <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">
  <link rel="stylesheet" href="../css/magick.html"/>
</head>
<body>
<div class="main">
<div class="magick-masthead">
  <div class="container">
    <script async="async" src="http://localhost/pagead/js/adsbygoogle.js"></script>    <ins class="adsbygoogle"
         style="display:block"
         data-ad-client="ca-pub-3129977114552745"
         data-ad-slot="6345125851"
         data-ad-format="auto"></ins>
    <script>
      (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    <nav class="magick-nav">
      <a class="magick-nav-item " href="../index.html">Home</a>
      <a class="magick-nav-item " href="../binary-releases.html">Download</a>
      <a class="magick-nav-item " href="../command-line-tools.html">Tools</a>
      <a class="magick-nav-item " href="../command-line-processing.html">Command-line</a>
      <a class="magick-nav-item " href="../resources.html">Resources</a>
      <a class="magick-nav-item " href="api.html">Develop</a>
      <a class="magick-nav-item " href="http://www.imagemagick.org/script/search.php">Search</a>
      <a class="magick-nav-item pull-right" href="https://www.imagemagick.org/discourse-server/">Community</a>
    </nav>
  </div>
</div>
<div class="container">
<h1>Magick++ Classes</h1>
<div class="doc-section">
<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>
<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>
<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>
<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>
<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>
<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>
<p style="margin-bottom: 0cm">For ease of access, the documentation for the available user-level classes is available via the following table.</p>
<br />
<ul><table border="1" class="docutils">
<caption><em>Magick++</em> User-Level Classes</caption>
<colgroup>
<col width="18%" />
<col width="82%" />
</colgroup>
<tbody valign="top">
<tr><td><a class="reference external" href="../Magick++/Blob.html">Blob</a></td>
<td>Binary Large OBject container.</td>
</tr>
<tr><td><a class="reference external" href="../Magick++/CoderInfo.html">CoderInfo</a></td>
<td>Report information about supported image formats (use with
<a class="reference external" href="../Magick++/STL.html#coderInfoList">coderInfoList</a>())</td>
</tr>
<tr><td><a class="reference external" href="../Magick++/Color.html">Color</a></td>
<td>Color specification.</td>
</tr>
<tr><td><a class="reference external" href="../Magick++/Drawable.html">Drawable</a></td>
<td>Drawable shape (for input to 'draw').</td>
</tr>
<tr><td><a class="reference external" href="../Magick++/Exception.html">Exception</a></td>
<td>C++ exception objects.</td>
</tr>
<tr><td><a class="reference external" href="../Magick++/Geometry.html">Geometry</a></td>
<td>Geometry specification.</td>
</tr>
<tr><td><a class="reference external" href="../Magick++/Image.html">Image</a></td>
<td>Image frame.  This is the primary object in <em>Magick++</em>.</td>
</tr>
<tr><td><a class="reference external" href="../Magick++/Montage.html">Montage</a></td>
<td>Montage options for montageImages().</td>
</tr>
<tr><td><a class="reference external" href="../Magick++/Pixels.html">Pixels</a></td>
<td>Low-level access to image pixels.</td>
</tr>
<tr><td><a class="reference external" href="../Magick++/STL.html">STL</a></td>
<td>STL algorithms and function objects for operating on
containers of image frames.</td>
</tr>
<tr><td><a class="reference external" href="../Magick++/TypeMetric.html">TypeMetric</a></td>
<td>Container for font type metrics (use with
<a class="reference external" href="../Magick++/Image.html#fonttypemetrics">Image::fontTypeMetrics</a>).</td>
</tr>
</tbody>
</table>
</ul>
</div>
  <footer class="magick-footer">
    <p><a href="../support.html">Donate</a> •
     <a href="../sitemap.html">Sitemap</a> •
    <a href="../links.html">Related</a> •
    <a href="../architecture.html">Architecture</a>
</p>
    <p><a href="magick++-classes.html#">Back to top</a> •
    <a href="http://pgp.mit.edu:11371/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> •
    <a href="http://www.imagemagick.org/script/contact.php">Contact Us</a></p>
        <p><small>©  1999-2016 ImageMagick Studio LLC</small></p>
  </footer>
</div><!-- /.container -->

  <script src="https://localhost/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  <script src="../js/magick.html"></script>
</div>
</body>
</html>