MagickWand C API
The MagickWand API is the recommended interface between the C programming language and the ImageMagick image processing libraries. Unlike the MagickCore C API, MagickWand uses only a few opaque types. Accessors are available to set or get important wand properties. A description of the MagickWand public methods are found here:
+The MagickWand API is the recommended interface between the C programming language and the ImageMagick image processing libraries. Unlike the MagickCore C API, MagickWand uses only a few opaque types. Accessors are available to set or get important wand properties. A description of the MagickWand public methods are found here:
-
-
- Magick Wand Methods -
- Set or Get Magick Wand Properties -
- Magick Wand Image Methods -
- Pixel Iterator Methods -
- Pixel Wand Methods -
- Image Vector Drawing -
- Command-line Interface -
- Wand View Methods -
- Deprecated Methods -
- Error and Warning Codes +
- Magick Wand Methods +
- Set or Get Magick Wand Properties +
- Magick Wand Image Methods +
- Pixel Iterator Methods +
- Pixel Wand Methods +
- Image Vector Drawing +
- Command-line Interface +
- Wand View Methods +
- Deprecated Methods +
- Error and Warning Codes
After you write your MagickWand program, compile it like this:
- $magick> cc `MagickWand-config --cflags --cppflags` -O2 -o wand wand.c \
`MagickWand-config --ldflags --libs`
Here is a example program that utilizes the MagickWand API to get you started, wand.c. It reads an image, creates a thumbnail, and writes the result to disk.
+$magick> cc -o wand `pkg-config --cflags --libs MagickWand` wand.c
+Set the PKG_CONFIG_PATH
environment variable if ImageMagick is not in your default system path:
$magick> export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
+Here is a example program that utilizes the MagickWand API to get you started, wand.c. It reads an image, creates a thumbnail, and writes the result to disk.
-Here is another program that shows one way to get and set image pixels with the MagickWand API, contrast.c. It reads an image, applies sigmoidal non-linearity contrast control, and writes the result to disk.
+Here is another program that shows one way to get and set image pixels with the MagickWand API, contrast.c. It reads an image, applies sigmoidal non-linearity contrast control, and writes the result to disk.
-Now lets perform the same contrast enhancement while taking advantage of our dual or quad-core processing system by running the algorithm in parallel utilizing wand views. The sigmoidal-contrast.c module reads an image, applies sigmoidal non-linearity contrast control, and writes the result to disk just like the previous contrast enhancement program, but now it does its work in parallel (assumes ImageMagick is built with OpenMP support).
+Now lets perform the same contrast enhancement while taking advantage of our dual or quad-core processing system by running the algorithm in parallel utilizing wand views. The sigmoidal-contrast.c module reads an image, applies sigmoidal non-linearity contrast control, and writes the result to disk just like the previous contrast enhancement program, but now it does its work in parallel (assumes ImageMagick is built with OpenMP support).
-