../index.html
[ImageMagick]
http://www.imagemagick.org/
[sponsor]
../index.html
../index.html
#main
Skip to page contents
[
../index.html
About ImageMagick
../www/command-line-tools.html
Command-line Tools
../www/api.html
Program Interfaces
]
[
../www/install-source.html
Install from Source
../www/binary-releases.html
Binary Releases
../www/resources.html
Resources
]
[
../www/download.html
Downloads
]
[
../www/links.html
Links
]
[
../www/sponsors.html
Sponsors
http://www.pcbanter.net/
PCbanter Windows
XP Help Forum
]
The MagickCore API is a low-level interface between the C programming language and the ImageMagick image processing libraries and is recommended for wizard-level programmers only.  Unlike the
../www/magick-wand.html
MagickWand
C API which uses only a few opaque types and accessors, with MagickCore you almost exlusively access the structure members directly.  A description of the MagickCore public methods are found here:
../www/api/magick.html
Initialize or Destroy the ImageMagick Environment
../www/api/constitute.html
Constitute an Image
../www/api/composite.html
Composite an Image
../www/api/image.html
Image Methods
../www/api/color.html
Count the Colors in an Image
../www/api/colorspace.html
Dealing with Image Colorspaces
../www/api/profile.html
Dealing with Image Profiles
../www/api/quantize.html
Reduce the Number of Unique Colors in an Image
../www/api/segment.html
Segment an Image with Thresholding Fuzzy c-Means
../www/api/resize.html
Resize an Image
../www/api/transform.html
Transform an Image
../www/api/shear.html
Shear or Rotate an Image by an Arbitrary Angle
../www/api/enhance.html
Enhance an Image
../www/api/effect.html
Add an Effect
../www/api/fx.html
Add a Special Effect
../www/api/decorate.html
Decorate an Image
../www/api/attribute.html
Set Text Attributes
../www/api/annotate.html
Annotate an Image
../www/api/paint.html
Paint on an Image
../www/api/draw.html
Draw on an Image
../www/api/montage.html
Create an Image Thumbnail
../www/api/compare.html
Compare an Image to a Reconstructed Image
../www/api/display.html
Interactively Display and Edit an Image
../www/api/animate.html
Interactively Animate an Image Sequence
../www/api/cache.html
Get or Set Image Pixels
../www/api/list.html
Working with Image Lists
../www/api/cache-view.html
Working with Cache Views
../www/api/stream.html
The Pixel FIFO
../www/api/blob.html
Read or Write Binary Large OBjects
../www/api/signature.html
Compute a Message Digest for an Image
../www/api/registry.html
The Registry
../www/api/exception.html
Dealing with Exceptions
../www/api/memory.html
Memory Allocation
../www/api/resource.html
Monitor or Limit Resource Consumption
../www/api/monitor.html
Monitor the Progress of an Image Operation
../www/api/version.html
Get the Version and Copyrights
After you write your MagickCore program, compile it like this:
cc `Magick-config --cflags --cppflags` core.c `Magick-config --ldflags --libs`
Here is a example program that utilizes the MagickWand API to get you started,
../www/source/core.c
core.c
. It reads a GIF image, creates a thumbnail, and writes it to disk in the PNG image format.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <magick/ImageMagick.h>
int main(int argc,char **argv)
{
ExceptionInfo
exception;
Image
*image,
*images,
*resize_image,
*thumbnails;
ImageInfo
*image_info;
/*
Initialize the image info structure and read an image.
*/
InitializeMagick(*argv);
GetExceptionInfo(&exception);
image_info=CloneImageInfo((ImageInfo *) NULL);
(void) strcpy(image_info->filename,"image.gif");
images=ReadImage(image_info,&exception);
if (exception.severity != UndefinedException)
CatchException(&exception);
if (images == (Image *) NULL)
exit(1);
/*
Turn the images into a thumbnail sequence.
*/
thumbnails=NewImageList();
while ((image=RemoveFirstImageFromList(&images)) != (Image *) NULL)
{
resize_image=ResizeImage(image,106,80,LanczosFilter,1.0,&exception);
if (resize_image == (Image *) NULL)
MagickError(exception.severity,exception.reason,exception.description);
(void) AppendImageToList(&thumbnails,resize_image);
DestroyImage(image);
}
/*
Write the image as MIFF and destroy it.
*/
(void) strcpy(thumbnails->filename,"image.png");
WriteImage(image_info,thumbnails);
thumbnails=DestroyImageList(thumbnails);
image_info=DestroyImageInfo(image_info);
DestroyExceptionInfo(&exception);
DestroyMagick();
return(0);
}
http://redux.imagemagick.org/discussion-server
Discourse Server
|
../www/mailing-list.html
Mailing Lists
|
http://redux.imagemagick.org/gallery
Image Gallery
|
http://net11.imagemagick.org/MagickStudio/scripts/MagickStudio.cgi
ImageMagick Studio
© 1999-2005 ImageMagick Studio LLC
