NAME

attributes - Image Text Attributes Methods


SYNOPSIS

DestroyImageAttributes( Image *image );

ImageAttribute * GetImageAttribute( const Image *image, const char *key );

unsigned int SetImageAttribute( Image *image, const char *key, const char *value );

StoreImageAttribute( Image *image, char *text );


FUNCTION DESCRIPTIONS

DestroyImageAttributes

Method DestroyImageAttributes deallocates memory associated with the image attribute list.

The format of the DestroyImageAttributes method is:

DestroyImageAttributes ( Image *image );

A description of each parameter follows:

image:
The address of a structure of type Image.

GetImageAttribute

Method GetImageAttribute searches the list of image attributes and returns a pointer to attribute if it exists otherwise NULL.

The format of the GetImageAttribute method is:

ImageAttribute *GetImageAttribute ( const Image *image, const char *key );

A description of each parameter follows:

attribute:
Method GetImageAttribute returns the attribute if it exists otherwise NULL.

image:
The address of a structure of type Image.

key:
These character strings are the name of an image attribute to return.

GetImageInfoAttribute

Method GetImageInfoAttribute returns a ``fake'' attribute based on data in the image info or image structures.

The format of the GetImageInfoAttribute method is:

    ImageAttribute *GetImageAttribute(const Image *image,const char *key)

A description of each parameter follows:

attribute:
Method GetImageInfoAttribute returns the attribute if it exists otherwise NULL.

image_info:
The address of a structure of type ImageInfo.

image:
The address of a structure of type Image.

key:
These character strings are the name of an image attribute to return.

SetImageAttribute

Method SetImageAttribute searches the list of image attributes and replaces the attribute value. If it is not found in the list, the attribute name and value is added to the list. If the attribute exists in the list, the value is concatenated to the attribute. SetImageAttribute returns True if the attribute is successfully concatenated or added to the list, otherwise False. If the value is NULL, the matching key is deleted from the list.

The format of the SetImageAttribute method is:

unsigned int SetImageAttribute ( Image *image, const char *key, const char *value );

A description of each parameter follows:

status:
Method SetImageAttribute returns True if the attribute is successfully replaced or added to the list, otherwise False.

image:
The address of a structure of type Image.

key,value:
These character strings are the name and value of an image attribute to replace or add to the list.

StoreImageAttribute

Method StoreImageAttribute is used to store an image attribute from a text string with the syntax: NAME=VALUE.

The format of the StoreImageAttribute method is:

StoreImageAttribute ( Image *image, char *text );

A description of each parameter follows:

image:
The address of a structure of type Image.

text:
The text string that is parsed and used to determine the name and value of the new attribute.