hackorama
hackorama

ImageMagick Demo Program

A simple class (pixmap.cpp) that will load an image and let you manipulate the pixels to do image processing operations, using the MagickCore C API which is available on all unix/linux platforms as part of ImageMagick (Also on windows via Cygwin)

The sample program (main.c) shows two basic operations, adding a red cross hair and switching all white pixels to green.


Input image


Output image

View pixmap.cpp ( Get pixmap.cpp )
View pixmap.h ( Get pixmap.h )
View main.c ( Get main.c )
View main.h ( Get main.h )
View Makefile ( Get Makefile )

pixmap-src.tar.gz

Building

You will need ImageMagick-devel package installed for building this. Its available on all Linux distributions and also on Cygwin for Windows.

On Linux use your favourite package update manager to install:

# apt-get install ImageMagick-devel
# yum install ImageMagick-devel



Saturday, 27-May-2006 13:19:16 PDT kishan at hackorama dot com