ConstituteImage • PingImage • PingImages • ReadImage • ReadImages • WriteImage • WriteImages
ConstituteImage() returns an image from the pixel data you supply. The pixel data must be in scanline order top-to-bottom. The data can be char, short int, int, float, or double. Float and double require the pixels to be normalized [0..1], otherwise [0..QuantumRange]. For example, to create a 640x480 image from unsigned red-green-blue character data, use:
image = ConstituteImage(640,480,"RGB",CharPixel,pixels,&exception);
The format of the ConstituteImage method is:
Image *ConstituteImage(const size_t columns,const size_t rows, const char *map,const StorageType storage,const void *pixels, ExceptionInfo *exception)
A description of each parameter follows:
PingImage() returns all the properties of an image or image sequence except for the pixels. It is much faster and consumes far less memory than ReadImage(). On failure, a NULL image is returned and exception describes the reason for the failure.
The format of the PingImage method is:
Image *PingImage(const ImageInfo *image_info,ExceptionInfo *exception)
A description of each parameter follows:
PingImages() pings one or more images and returns them as an image list.
The format of the PingImage method is:
Image *PingImages(ImageInfo *image_info,const char *filename, ExceptionInfo *exception)
A description of each parameter follows:
ReadImage() reads an image or image sequence from a file or file handle. The method returns a NULL if there is a memory shortage or if the image cannot be read. On failure, a NULL image is returned and exception describes the reason for the failure.
The format of the ReadImage method is:
Image *ReadImage(const ImageInfo *image_info,ExceptionInfo *exception)
A description of each parameter follows:
ReadImages() reads one or more images and returns them as an image list.
The format of the ReadImage method is:
Image *ReadImages(ImageInfo *image_info,const char *filename, ExceptionInfo *exception)
A description of each parameter follows:
WriteImage() writes an image or an image sequence to a file or file handle. If writing to a file is on disk, the name is defined by the filename member of the image structure. WriteImage() returns MagickFalse is there is a memory shortage or if the image cannot be written. Check the exception member of image to determine the cause for any failure.
The format of the WriteImage method is:
MagickBooleanType WriteImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception)
A description of each parameter follows:
WriteImages() writes an image sequence into one or more files. While WriteImage() can write an image sequence, it is limited to writing the sequence into a single file using a format which supports multiple frames. WriteImages(), however, does not have this limitation, instead it generates multiple output files if necessary (or when requested). When ImageInfo's adjoin flag is set to MagickFalse, the file name is expected to include a printf-style formatting string for the frame number (e.g. "image02d.png").
The format of the WriteImages method is:
MagickBooleanType WriteImages(const ImageInfo *image_info,Image *images, const char *filename,ExceptionInfo *exception)
A description of each parameter follows: