NAMEimage - Image Methods
SYNOPSISImage * AllocateImage( const ImageInfo *image_info ); MagickBooleanType AllocateImageColormap( Image *image, const unsigned long colors ); void AllocateNextImage( const ImageInfo *image_info, Image *image ); Image * AppendImages( const Image *image, const MagickBooleanType stack, ExceptionInfo *exception ); Image * AverageImages( Image *image, ExceptionInfo *exception ); ExceptionType CatchImageException( Image *image ); MagickBooleanType ClipPathImage( Image *image, const char *pathname, const MagickBooleanType inside ); Image * CloneImage( const Image *image, const unsigned long columns, const unsigned long rows, const MagickBooleanType orphan, ExceptionInfo *exception ); ImageInfo * CloneImageInfo( const ImageInfo *image_info ); Image * CombineImages( const Image *image, const ChannelType channel, ExceptionInfo *exception ); MagickBooleanType CycleColormapImage( Image *image, const long displace ); MagickBooleanType DescribeImage( Image *image, FILE *file, const MagickBooleanType verbose ); void DestroyImage( Image *image ); void DestroyImageInfo( ImageInfo *image_info ); unsigned long GetImageChannelDepth( const Image *image, const ChannelType channel, ExceptionInfo *exception ); MagickBooleanType GetImageChannelExtrema( const Image *image, const ChannelType channel, unsigned long *minima, unsigned long *maxima, ExceptionInfo *exception ); MagickBooleanType GetImageChannelMean( const Image *image, const ChannelType channel, double *mean, double *standard_deviation, ExceptionInfo *exception ); Image * GetImageClipMask( const Image *image, ExceptionInfo *exception ); void GetImageException( Image *image, ExceptionInfo *exception ); void GetImageInfo( ImageInfo *image_info ); unsigned long GetImageQuantumDepth( const Image *image, const MagickBooleanType constrain ); ImageType GetImageType( const Image *image, ExceptionInfo *exception ); MagickBooleanType IsTaintImage( const Image *image ); ModifyImage( Image *image, ExceptionInfo *exception ); MagickBooleanType PlasmaImage( Image *image, const SegmentInfo *segment, unsigned long attenuate, unsigned long depth ); Image * ReferenceImage( Image *image ); MagickBooleanType SeparateImageChannel( Image *image, const ChannelType channel ); void SetImage( Image *image, const Quantum opacity ); MagickBooleanType SetImageClipMask( Image *image, const Image *clip_mask ); void SetImageOpacity( Image *image, const Quantum opacity ); MagickBooleanType SetImageType( Image *image, const ImageType image_type ); MagickBooleanType StripImage( Image *image ); MagickBooleanType TextureImage( Image *image, const Image *texture );
FUNCTION DESCRIPTIONS
AllocateImageAllocateImage() returns a pointer to an image structure initialized to default values. The format of the AllocateImage method is: Image *AllocateImage ( const ImageInfo *image_info ); A description of each parameter follows:
AllocateImageColormapAllocateImageColormap() allocates an image colormap and initializes it to a linear gray colorspace. If the image already has a colormap, it is replaced. AllocateImageColormap ( ) returns MagickTrue if successful, otherwise MagickFalse if there is not enough memory. The format of the AllocateImageColormap method is: MagickBooleanType AllocateImageColormap ( Image *image, const unsigned long colors ); A description of each parameter follows:
AllocateNextImageUse AllocateNextImage() to initialize the next image in a sequence to default values. The next member of image points to the newly allocated image. If there is a memory shortage, next is assigned NULL. The format of the AllocateNextImage method is: void AllocateNextImage ( const ImageInfo *image_info, Image *image ); A description of each parameter follows:
AppendImagesThe AppendImages() method takes a set of images and appends them to each other top-to-bottom if the stack parameter is true, otherwise left-to-right. The format of the AppendImage method is: Image *AppendImages ( const Image *image, const MagickBooleanType stack, ExceptionInfo *exception ); A description of each parameter follows:
AverageImagesThe The format of the AverageImage method is: Image *AverageImages ( Image *image, ExceptionInfo *exception ); A description of each parameter follows:
CatchImageExceptionCatchImageException() returns if no exceptions are found in the image sequence, otherwise it determines the most severe exception and reports it as a warning or error depending on the severity. The format of the CatchImageException method is: ExceptionType CatchImageException ( Image *image ); A description of each parameter follows:
ClipPathImageClipPathImage() sets the image clip mask based any clipping path information if it exists. The format of the ClipImage method is: MagickBooleanType ClipPathImage ( Image *image, const char *pathname, const MagickBooleanType inside ); A description of each parameter follows:
CloneImageCloneImage() copies an image and returns the copy as a new image object. If the specified columns and rows is 0, an exact copy of the image is returned, otherwise the pixel data is undefined and must be initialized with the SetImagePixels ( ) and SyncImagePixels ( ) methods. On failure, a NULL image is returned and exception describes the reason for the failure. The format of the CloneImage method is: Image *CloneImage ( const Image *image, const unsigned long columns, const unsigned long rows, const MagickBooleanType orphan, ExceptionInfo *exception ); A description of each parameter follows:
CloneImageInfoCloneImageInfo() makes a copy of the given image info structure. If NULL is specified, a new image info structure is created initialized to default values. The format of the CloneImageInfo method is: ImageInfo *CloneImageInfo ( const ImageInfo *image_info ); A description of each parameter follows:
CombineImagesCombineImages() combines one or more images into a single image. The grayscale value of the pixels of each image in the sequence is assigned in order to the specified channels of the combined image. The typical ordering would be image 1 => Red, 2 => Green, 3 => Blue, etc. The format of the CombineImages method is: Image *CombineImages ( const Image *image, const ChannelType channel, ExceptionInfo *exception ); A description of each parameter follows:
CycleColormapImage
The format of the CycleColormapImage method is: MagickBooleanType CycleColormapImage ( Image *image, const long displace ); A description of each parameter follows:
DescribeImageDescribeImage() describes an image by printing its attributes to the file. Attributes include the image width, height, size, and others. The format of the DescribeImage method is: MagickBooleanType DescribeImage ( Image *image, FILE *file, const MagickBooleanType verbose ); A description of each parameter follows:
DestroyImageDestroyImage() dereferences an image, deallocating memory associated with the image if the reference count becomes zero. The format of the DestroyImage method is: void DestroyImage ( Image *image ); A description of each parameter follows:
DestroyImageInfoDestroyImageInfo() deallocates memory associated with an ImageInfo structure. The format of the DestroyImageInfo method is: void DestroyImageInfo ( ImageInfo *image_info ); A description of each parameter follows:
GetImageChannelDepthGetImageChannelDepth() returns the depth of a particular image channel. The format of the GetImageChannelDepth method is: unsigned long GetImageChannelDepth ( const Image *image, const ChannelType channel, ExceptionInfo *exception ); A description of each parameter follows:
GetImageChannelExtremaGetImageChannelExtrema() returns the extrema of one or more image channels. The format of the GetImageChannelExtrema method is: MagickBooleanType GetImageChannelExtrema ( const Image *image, const ChannelType channel, unsigned long *minima, unsigned long *maxima, ExceptionInfo *exception ); A description of each parameter follows:
GetImageClipMaskGetImageClipMask() returns the clip mask associated with the image. The format of the GetImageClipMask method is: Image *GetImageClipMask ( const Image *image, ExceptionInfo *exception ); A description of each parameter follows:
GetImageExceptionGetImageException() traverses an image sequence and returns any error more severe than noted by the exception parameter. The format of the GetImageException method is: void GetImageException ( Image *image, ExceptionInfo *exception ); A description of each parameter follows:
GetImageInfoGetImageInfo() initializes image_info to default values. The format of the GetImageInfo method is: void GetImageInfo ( ImageInfo *image_info ); A description of each parameter follows:
GetImageChannelMeanGetImageChannelMean() returns the mean and standard deviation of one or more image channels. The format of the GetImageChannelMean method is: MagickBooleanType GetImageChannelMean ( const Image *image, const ChannelType channel, double *mean, double *standard_deviation, ExceptionInfo *exception ); A description of each parameter follows:
GetImageQuantumDepthGetImageQuantumDepth() returns the depth of the image rounded to a legal quantum depth: 8, 16, or 32. The format of the GetImageQuantumDepth method is: unsigned long GetImageQuantumDepth ( const Image *image, const MagickBooleanType constrain ); A description of each parameter follows:
GetImageTypeGetImageType() returns the potential type of image: Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte To ensure the image type matches its potential, use SetImageType(): ( void ) SetImageType ( image, GetImageType ( image ) );; The format of the GetImageType method is: ImageType GetImageType ( const Image *image, ExceptionInfo *exception ); A description of each parameter follows:
IsTaintImageIsTaintImage() returns a value other than 0 if any pixel in the image has been altered since it was first constituted. The format of the IsTaintImage method is: MagickBooleanType IsTaintImage ( const Image *image ); A description of each parameter follows:
ModifyImageModifyImage() ensures that there is only a single reference to the image to be modified, updating the provided image pointer to point to a clone of the original image if necessary. The format of the ModifyImage method is: ModifyImage ( Image *image, ExceptionInfo *exception ); A description of each parameter follows:
PlasmaImagePlasmaImage() initializes an image with plasma fractal values. The image must be initialized with a base color and the random number generator seeded before this method is called. The format of the PlasmaImage method is: MagickBooleanType PlasmaImage ( Image *image, const SegmentInfo *segment, unsigned long attenuate, unsigned long depth ); A description of each parameter follows:
ReferenceImageReferenceImage() increments the reference count associated with an image returning a pointer to the image. The format of the ReferenceImage method is: Image *ReferenceImage ( Image *image ); A description of each parameter follows:
SeparateImageChannelSeparate a channel from the image and return it as a grayscale image. A channel is a particular color component of each pixel in the image. The format of the SeparateImage method is: MagickBooleanType SeparateImageChannel ( Image *image, const ChannelType channel ); A description of each parameter follows:
SetImageSetImage() sets the red, green, and blue components of each pixel to the image background color and the opacity component to the specified level of transparency. The background color is defined by the background_color member of the image. The format of the SetImage method is: void SetImage ( Image *image, const Quantum opacity ); A description of each parameter follows:
SetImageClipMaskSetImageClipMask() associates a clip mask with the image. The clip mask must be the same dimensions as the image. Set any pixel component of the clip mask to TransparentOpacity to prevent that corresponding image pixel component from being updated when SyncImagePixels ( ) is applied. The format of the SetImageClipMask method is: MagickBooleanType SetImageClipMask ( Image *image, const Image *clip_mask ); A description of each parameter follows:
SetImageChannelDepthSetImageChannelDepth() sets the depth of the image. The format of the SetImageDepth method is: MagickBooleanType SetImageDepth(Image *image,const ChannelType channel, const unsigned long depth) A description of each parameter follows:
SetImageOpacitySetImageOpacity() attenuates the opacity channel of an image. If the image pixels are opaque, they are set to the specified opacity level. Otherwise, the pixel oapcity values are blended with the supplied transparency value. The format of the SetImageOpacity method is: void SetImageOpacity ( Image *image, const Quantum opacity ); A description of each parameter follows:
SetImageTypeSetImageType() sets the type of image. Choose from these types: Bilevel Grayscale GrayscaleMatte Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte OptimizeType The format of the SetImageType method is: MagickBooleanType SetImageType ( Image *image, const ImageType image_type ); A description of each parameter follows:
StripImageStripImage() strips an image of all profiles and comments. The format of the StripImage method is: MagickBooleanType StripImage ( Image *image ); A description of each parameter follows:
TextureImageTextureImage() repeatedly tiles the texture image across and down the image canvas. The format of the TextureImage method is: MagickBooleanType TextureImage ( Image *image, const Image *texture ); A description of each parameter follows:
|