Magick++ -- C++ API for ImageMagick
Magick++ is the object-oriented C++ API to the ../../index.htmlImageMagick  image-processing library, the most comprehensive open-source image processing package available. Read the latest NEWS.htmlNEWS  and ChangeLog.htmlChangeLog  for Magick++.
Magick++ supports an object model which is inspired by ../../perl.htmlPerlMagick . Images support implicit reference counting so that copy constructors and assignment incur almost no cost. The cost of actually copying an image (if necessary) is done just before modification and this copy is managed automatically by Magick++. De-referenced copies are automatically deleted. The image objects support value (rather than pointer) semantics so it is trivial to support multiple generations of an image in memory at one time.
Magick++ provides integrated support for the http://www.sgi.com/tech/stl/Standard Template Library  (STL) so that the powerful containers available (e.g. http://www.sgi.com/tech/stl/Deque.htmldeque , http://www.sgi.com/tech/stl/Vector.htmlvector , http://www.sgi.com/tech/stl/List.htmllist , and http://www.sgi.com/tech/stl/Map.htmlmap ) can be used to write programs similar to those possible with PERL &PerlMagick. STL-compatible template versions of ImageMagick's list-style operations are provided so that operations may be performed on multiple images stored in STL containers.
Documentation
Detailed Documentation.htmldocumentation  are provided for all Magick++ classes, class methods, and template functions which comprise the API.
Obtaining Magick++
Magick++ is included as part of ../../index.htmlImageMagick  source releases and may be retrieved via ../download.htmlftp  or ../subversion.htmlsubversion .
Installation
Once you have the sources available, follow these detailed Install.htmlinstallation instructions  for UNIX and Windows.
Usage
A helper script named Magick++-config is installed under Unix which assists with recalling compilation options required to compile and link programs which use Magick++. For example, the following command will compile and link the source file example.cpp to produce the executable example (notice that quotes are backward quotes):
c++ `Magick++-config --cxxflags --cppflags` -o example example.cpp `Magick++-config --ldflags --libs`
Windows users may get started by manually editing a project file for one of the Magick++ demo programs.
Please note that under Windows (and possibly the Mac) it is 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:
int main( int /*argc*/, char ** argv){InitializeMagick(*argv);This initialization step is not required under Unix, Linux, Cygwin, or any other operating environment that supports the notion of "installing" ImageMagick in a known location.
Reporting Bugs
Please report any bugs or questions via the http://studio.imagemagick.org/magick/index.phpImageMagick Discourse Server .
Related Packages
Users who are interested in displaying their images at video game rates on a wide number of platforms and graphic environments (e.g. Windows, X11, BeOS, and Linux/CGI) may want to try http://www.simplesystems.org/PtcMagick/PtcMagick , which provides a simple interface between Magick++ and http://www.gaffer.org/ptc/OpenPTC .
