PtcMagick

PtcMagick provides a trivial integration between OpenPTC (http://www.gaffer.org/ptc/) and Magick++ (http://www.simplesystems.org/Magick++/). Besides these two packages. the Hermes library (http://www.clanlib.org/hermes/) and ImageMagick library (http://www.imageMagick.org/) must be installed.

OpenPTC is a set of classes and display drivers which support displaying images very rapidly to a screen, accepting keyboard input, and operating on regions of pixels in arbitrary 32-bit (or 8/16/24 bit) TrueColor, as well as 8-bit indexed formats.

Magick++ is the C++ API to ImageMagick (http://www.imagemagick.org/), a mature image-processing package. Magick++ provides the means to read and write images in many formats, and well as perform operations on them.

This integration provides the means for an OpenPTC developer to read and write images in many formats. It provides the Magick++ developer the ability to display images very quickly under many popular operating systems (Unix, Linux, Windows) using several display systems.

The current interface is exceedingly trivial and consists of two functions. The function ImageToSurface() converts a Magick++ image to an OpenPTC Surface. The function SurfaceToImage() converts an OpenPTC Surface to a Magick++ image. The prototypes are as follows:
 

// Convert a Magick++ Image to an OpenPTC surface
Surface* ImageToSurface( Magick::Image image_ );

// Convert an OpenPTC surface to a Magick++ Image
Magick::Image SurfaceToImage( Surface& surface_ );
 

Please see the source file "demo.c" for an example of usage.

In order to build the demo, it should only be necessary to type 'make' on a Unix system (assuming required packages are installed). Some adjustment to the Makefile may be required.

Obtain PtcMagick from  ftp://ftp.simplesystems.org/pub/PtcMagick/ .

PtcMagick is currently tested with Magick++ 5.2.5, ImageMagick 5.2.5, OpenPTC-x11-1.0.0-2, and Hermes 1.2.6.

PtcMagick is written by Bob Friesenhahn <bfriesen@simple.dallas.tx.us>.