![]() |
![]() |
![]() |
![]() |
NAMEconstitute - Constitute an Image
SYNOPSISImage * ConstituteImage( const unsigned long columns, const unsigned long rows, const char *map, const StorageType storage, const void *pixels, ExceptionInfo *exception ); DestroyConstitute( void ); Image * PingImage( const ImageInfo *image_info, ExceptionInfo *exception ); unsigned int PopImagePixels( Image *, const QuantumType quantum, unsigned char *destination ); unsigned int PushImagePixels( Image *image, const QuantumType quantum, const unsigned char *source ); Image * ReadImage( const ImageInfo *image_info, ExceptionInfo *exception ); Image * ReadInlineImage( const ImageInfo *image_info, const char *content, ExceptionInfo *exception ); unsigned int WriteImage( const ImageInfo *image_info, Image *image ); unsigned int WriteImages( const ImageInfo *image_info, Image *image, const char *filename, ExceptionInfo *exception );
FUNCTION DESCRIPTIONS
ConstituteImageConstituteImage() returns an image from the 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..MaxRGB]. 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 Constitute method is: Image *ConstituteImage ( const unsigned long columns, const unsigned long rows, const char *map, const StorageType storage, const void *pixels, ExceptionInfo *exception ); A description of each parameter follows:
DestroyConstituteDestroyConstitute() destroys the constitute environment. The format of the DestroyConstitute method is: DestroyConstitute ( void );
PingImagePingImage() returns all the attributes 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:
PopImagePixelsPopImagePixels() transfers one or more pixel components from the image pixel cache to a user supplied buffer. True is returned if the pixels are successfully transferred, otherwise False. The format of the PopImagePixels method is: unsigned int PopImagePixels ( Image *, const QuantumType quantum, unsigned char *destination ); A description of each parameter follows:
PushImagePixelsPushImagePixels() transfers one or more pixel components from a user supplied buffer into the image pixel cache of an image. It returns True if the pixels are successfully transferred, otherwise False. The format of the PushImagePixels method is: unsigned int PushImagePixels ( Image *image, const QuantumType quantum, const unsigned char *source ); A description of each parameter follows:
ReadImageReadImage() 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:
ReadInlineImageReadInlineImage() reads a Base64-encoded inline image or image sequence. 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 ReadInlineImage method is: Image *ReadInlineImage ( const ImageInfo *image_info, const char *content, ExceptionInfo *exception ); A description of each parameter follows:
WriteImageUse The format of the WriteImage method is: unsigned int WriteImage ( const ImageInfo *image_info, Image *image ); A description of each parameter follows:
WriteImagesWriteImages() writes an image sequence. The format of the WriteImages method is: unsigned int WriteImages ( const ImageInfo *image_info, Image *image, const char *filename, ExceptionInfo *exception ); A description of each parameter follows:
![]() |