This is Magick++, the object-oriented C++ API to the ImageMagick image-processing library. Please report any problems to Bob Friesenhahn <bfriesen@simple.dallas.tx.us>.
Magick++ supports an object model which is inspired by PerlMagick. Magick++ should be a bit faster than PerlMagick since it is written in a compiled language which is not parsed at run-time. This makes it suitable for Web CGI programs. 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 STL. This support allows Magick++ to be used with the Standard Template Library (STL) so that the powerful containers available (e.g. vector and list) can be used to write programs similar to those possible with PERL & PerlMagick. STL-compatable template versions of ImageMagick's list-style operations are provided so that operations may be performed on multiple images stored in STL containers.
Please be aware that until Magick++ reaches version 1.0, some minor
changes may be expected to implemented APIs based on operational experience.
The compiler must support the following recent C++ standard features:
./configure [ --prefix=/prefix ]
make
make install
The configure script uses the compiler/linker flags it obtains from the installed 'Magick-config' script when performing the build. The library is currently named similar to 'libMagick++.a' and is installed under prefix/lib while the headers are installed under prefix/include.
To influence the options the configure script chooses, you may specify
environment variables when running the script. For example, the command
CXX=CC CXXFLAGS=-O2 LIBS=-lposix ./configure
specifies additional options to the configure script. The
following table shows the available options.
|
|
|
Name of C++ compiler (e.g. 'CC -Xa') to use compiler 'CC -Xa' |
|
Compiler flags (e.g. '-g -O2') to compile with |
|
Include paths (-I/somedir) to look for header files |
|
Library paths (-L/somedir) to look for libraries. Systems that support the notion of a library run-path may additionally require -R/somedir or '-rpath /somedir' in order to find shared libraries at run time. |
|
Extra libraries (-lsomelib) required to link |
Magick++Test and demonstration programs are built in the directory which contains their sources.
the Magick++ library
attributes
test setting image attributes
manipulate
test manipulating images
button
program to create a simple rectangular button with an annotation
demo
program to demonstrate the image manipulation primitives
shapes
program to demonstrate use of the drawing primitives
Magick::Color | Color specification. |
Magick::Drawable | Drawable shape (for input to 'draw'). |
Magick::Exception | C++ exception objects. |
Magick::Geometry | Geometry specification. |
Magick::Image | Image frame. This is the primary object in Magick++. |
Magick::Montage | Montage options for montageImages(). |
Magick::STL | STL algorithms and function objects for operating on containers of image frames. |
1.0 API for operating on individual images and STL containers of images
This version supports all ImageMagick API operations which operate on a single image as well as providing STL container support for operating on multiple images (on any STL compatable container which supports a forward input iterator).
STL is used as the framework in which to store images. Template functions (e.g. montage) are provided to build the image lists required by ImageMagick and then invoke the list-oriented ImageMagick API. STL is quite powerful yet easy to use. At this stage Magick++ has matched what is currently available/possible using the PerlMagick API due to leveraging the power of STL.2.0 CORBA IDL based client API with server implementation for executing image processing operations on a remote (or local) computer.
This version provides a standard CORBA IDL-based API. A C++ wrapper API compatable with that developed for release 2.0 is available for use by clients. Client wrappers may also be developed for other languages (e.g. Java). A CORBA server is provided which is implemented in terms of the Magick++ API in order to satisfy client requests (which may run a different operating system than the server) . An implementation repository and object activation is used to instantiate the server upon demand to ensure that server machines are not unnecessarily burdended. The CORBA ORB employed is TAO developed by Doug Schmidt (and friends).3.0 Integration of IDL-based API with an existing freeware work-queing system in order to load-share image processing tasks across a large number of machines.
This version is the culmination of the effort. By intelligently spreading work over many machines, the performance of ImageMagick is magnified. In order for this to be a success algorithms for efficient transfer of image data must be developed. Algorithms that take into account processor afinity and the CPU vs I/O tradeoff for the task to be performed must be developed. At this point in time, the queuing system to be employed has not been identified.