The key thing of non-image data processing in ImageGear is a uniform data format that is used to convert to and from the format filter. As soon as the format filter decodes the data fields one after another during the loading operation, and encodes it in the reverse direction during the saving operation, all data consists of the set of items where each item is a minimal atom of information. The order of items is fixed, and the format filter processes item after item in the given order. The same order is used when data is passed through the stream.
The low-level format of the data consists of the list of items where each item represents a minimal unit of information. Each item also should have some unique name that allows you to connect it with the physical value inside of the file format. The definition of the data item can be described by the following fields:
Copy Code | |
---|---|
typedef struct tagAT_DATALIST_ITEM{
AT_MODE FormatID
LPCHAR Name;
DWORD Id;
AT_MODE Type;
LPVOID Value;
AT_MODE ValueType;
DWORD Length;
AT_MODE ValueAccessMode;
}AT_DATALIST_ITEM;
|
Please see the descriptions of these fields below:
FormatID | The ID of the filter that reads or writes a file (IG_FORMAT_... constant value). |
Name | The name of the item. Can be any string value. |
Id | Numerical ID of item. Can be any value of DWORD size. |
Type |
Specifies the type of item and reflects the status of the given record. Possible values are:
|
Value | Contains the value of the item when Type = IG_METAD_VALUE_ITEM. Note that possible values of this field are fixed and define the exact list of allowed data types. It also depends on the ImageGear platform and FLTR.METADATA_FORMAT global control parameter. This global parameter has two allowed values: "text" and "binary". See the section Metadata Structure "ValueType" and "Value" for possible values. |
ValueType | Contains the type identifier of the item when Type = IG_METAD_VALUE_ITEM. Possible values of this field are fixed and define the exact list of allowed data types. See the section Metadata Structure "ValueType" and "Value" for possible values. |
Length |
Identifies the number of values to be written.
|
ValueAccessMode | Identifies whether data can be changed or not. "Read only" value means that its value is information only and cannot be changed after setting the initial value. It also means that its value will be ignored during a WRITE operation. |
So, this data structure allows you to "linearize" hierarchical and complex data into an array of simplest data types.
You can transfer different non-image data using the general data structure described in this section. Please see Appendix: Non-Image Data Storage.