FlashPix Comments

Comments in FlashPix files are one contiguous block of memory, a Comments Block. Within the Comments Block are individual Comments which consist of a Comment header and Comment data. The Comment header contains information on the size and type of the Comment. The Comment header may be a FPXCOMMENT_HEADER_ELEMENT, if the Comment consists of a single item (a float or a short for example), or it may be a FPXCOMMENT_HEADER_ARRAY if the Comment consists of an array of items (an array of shorts, an array of chars, or an array of strings for example). These structures are as follows:

FPXCOMMENT_HEADER_ELEMENT

typedef struct _FPXCOMMENT_HEADER_ELEMENT 
{ 
   L_UINT32 size; 
   L_UINT32 type; 
} FPXCOMMENT_HEADER_ELEMENT; 

Member

Description

size

size of the comment.

type

type of comment stored.

Comments

Size is given in bytes. Type refers to a value within the enumerated type FPXTYPE_DATA.

FPXCOMMENT_HEADER_ARRAY

typedef struct _FPXCOMMENT_HEADER_ARRAY 
{ 
   L_UINT32 size; 
   L_UINT32 type; 
   L_UINT32 elements; 
} FPXCOMMENT_HEADER_ARRAY; 

Member

Description

size

size of the comment.

type

type of comment stored.

elements

number of elements in the array.

Comments

Size is given in bytes. Type refers to a value within the enumerated type FPXTYPE_DATA. Elements provides the number of elements in the array.

Following the Comment header is the Comment data. Comment data may consist of simple data such as a float value, sub-comments, or a combination of one or more simple data and one or more sub-comments. The sections making up a sub-comment will be referred to as sub-comment header and sub-comment data. Both Comments and sub-comments must be of a Comment type.

For example, a Comment of Comment type FlashPixLong would contain a Comment header FPXCOMMENT_HEADER_ELEMENT. This would be followed by the Comment data, consisting of a L_UINT32 (4 bytes) which holds the long value. A Comment of Comment type FlashPixCFAPatternBlock, however, has Comment data consisting of two integer values and a comment of Comment type FlashPixString. A list of FlashPix Comment types is provided at the end of this section. To better understand FlashPix file Comment organization, look through the following example.

Each cell in the graph below indicates 1 byte of memory. Therefore a L_UINT32 is 4 bytes in size.

The values given above the cells indicate the value stored in that segment of memory.

The Comment type is given in brackets beside the Comment name.

Wide characters are 2 bytes in size and are indicated by a character followed by a blank byte.

The example given here contains the Comments present in the "Content Description Group" (CMNT_FPXCONTENTDESCRIPTIONGROUP see FlashPix File Comments.). The first Comment, CMNT_FPXTESTTARGETINTHEIMAGE is of Comment type FlashPixLong. It consists of the FPXCOMMENT_HEADER_ELEMENT and a single Comment data element of type long. Within the Comment header, the leftmost L_UINT32 stores the size of the entire Comment. The 4 bytes of the long data element and the 8 bytes for the 2 L_UINT32 members in the Comment header gives a total of 12 bytes. The right L_UINT32 member in the Comment header stores the value 3 for the Comment type of this Comment [FlashPixLong]. Finally, the last L_UINT32 (data) holds the value of the Comment data itself ( 0x0 ).

The next Comment, CMNT_FPXGROUPCAPTION is very similar. The Comment header stores the size of the entire Comment (34 bytes) as well as the Comment type (FlashPixWideString) and the number of elements (11) in the string. The Comment data contains the string itself (MY FRIENDS). Notice that since the array is made up of wide characters, each character within the string is followed by an empty byte to indicate that the wide characters are 2 bytes in size. The space between words and the final '\0' are included in the number of wide characters.

The next Comment is almost identical to CMNT_FPXGROUPCAPTION.

The next Comment CMNT_FPXPEOPLEINTHEIMAGE gives an example Comment of Comment type FlashPixWideStringArray. This Comment header is FPXCOMMENT_HEADER_ARRAY. The first L_UINT32 stores the size of the entire Comment, including the entire array (52 bytes). Again the next L_UINT32 indicates the Comment type is FlashPixWideStringArray (10). The rightmost L_UINT32 member in the Comment header stores the number of elements present in the array (2). The Comment data consists of multiple sub-comments of Comment type FlashPixWideString which make up the array. Again, these sub-comments consist of a sub-comment header and sub-comment data. The sub-comment header for the first FlashPixWideString sub-comment in the array begins with a L_UINT32 which stores the size of that one string within the array (20 bytes). The next L_UINT32 indicates the Comment type of the sub-comment which follows (9 or FlashPixWideString). Please note that the entire Comment is of type FlashPixWideStringArray, but each member of that array is of Comment type FlashPixWideString. The next L_UINT32 member in the sub-comment header of each wide string stores the number of elements in the string (4). Finally, the sub-comment data of each sub-comment contains the string BOB and TED.

The rest of the Comments may be explained similarly. It is important to note that all of the 1 byte cells seen here represent a contiguous block of memory and therfore would fall side by side in memory. The "exploded" view of the Comment organization is done only to show the individual members of the header and the data section.

image\comment.gif

Comments and sub-comments must be of certain Comment types. The Comment types available are listed below.

The following declarations pertain to the examples included in the Comment type definitions:

FPXCOMMENT_HEADER_ELEMENT  *pElement;   
FPXCOMMENT_HEADER_ARRAY *pArray;   
L_UCHAR *pChar;   
L_UINT16 *pShort;   
L_UINT32 *pLong;   
L_FLOAT *pFloat;   
L_DOUBLE *pDouble;   
L_UINT      i, j, uBytes;   
L_UCHAR     Buffer[1024], String[] = "String"; 

FlashPixCFAPatternBlock ( Comment type)

This comment is used to store the number of rows, number of columns and data array which describe a color pattern. Refer to CMNT_FPXCFAPATTERN in FlashPix File Comments.

L_UNIT32 size_of_structure
L_UNIT32
type_of_structure
L_UINT16
cfa_repeat_rows
L_UINT16
cfa_repeat_cols
FlashPixString cfa_array

image\CmntCFA.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_CFA_PATTERN_BLOCK

cfa_repeat_rows

data value containing the number of rows defining the color pattern

cfa_repeat_col

data value containing the number of columns defining the color pattern

cfa_array

data array of color pattern values

Example

pElement = (FPXCOMMENT_HEADER_ELEMENT  *) Buffer; 
pElement->size = sizeof(FPXCOMMENT_HEADER_ELEMENT) + 
sizeof(L_UINT16) + 
sizeof(L_UINT16) + 
sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(L_UCHAR) * sizeof(String); 
pElement->type = FPXENUM_CFA_PATTERN_BLOCK; 
uBytes = pElement->size; 
pShort = (L_UINT16 *) (pElement + 1); 
pShort[0] = 1234; 
pShort[1] = 4321; 
pArray = (FPXCOMMENT_HEADER_ARRAY *)&pShort[2]; 
pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(L_UCHAR) * sizeof(String); 
pArray->type = FPXENUM_STRING; 
pArray->elements = sizeof(String); 
pChar = (L_UCHAR *) (pArray + 1); 
for ( j = 0; j < sizeof(String); j++) 
{ 
   pChar[j] = String[j]; 
} 
LFileSettings::SetComment(CMNT_FPXCFAPATTERN, Buffer, uBytes); 

FlashPixDate( Comment type)

This comment is used to store information concerning the revision date of the scanning software. Refer to CMNT_FPXSCANSOFTWAREREVISIONDATE in FlashPix File Comments.

L_UINT32 size_of_structure
L_UNIT32
type_of_structure
L_DOUBLE
date

image\Cmntdate.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_DATE

date

data value containing the date

Example

pElement = (FPXCOMMENT_HEADER_ELEMENT *) Buffer;   
pElement->size = sizeof(FPXCOMMENT_HEADER_ELEMENT) +   
sizeof(L_DOUBLE);   
pElement->type = FPXENUM_DATE;   
uBytes = pElement->size;   
pDouble = (L_DOUBLE *) (pElement + 1);   
*pDouble = 1234.5678; 
LFileSettings::SetComment(CMNT_FPXSCANSOFTWAREREVISIONDATE, Buffer, uBytes); 

FlashPixLong( Comment type)

This comment is used to store a long value. For a full list of the FlashPix file comments, refer to FlashPix File Comments.

L_UINT32 size_of_structure
L_UNIT32
type_of_structure
L_UINT32
long

image\Cmntlong.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_LONG

long

data value containing a long

Example

pElement = (FPXCOMMENT_HEADER_ELEMENT *) Buffer;   
pElement->size = sizeof(FPXCOMMENT_HEADER_ELEMENT) +   
sizeof(L_UINT32);   
pElement->type = FPXENUM_LONG;   
uSize = pElement->size;   
pLong = (L_UINT32 *) (pElement + 1);   
*pLong = 12345678; 
LFileSettings::SetComment(CMNT_TESTTARGETINTHEIMAGE, Buffer, uBytes); 

FlashPixLongArray( Comment type)

This comment is used to store an array of long values. For a full list of the FlashPix file comments, refer to FlashPix File Comments.

L_UINT32 size_of_structure
L_UNIT32
type_of_structure
L_UINT32
number_of_longs
L_UINT32
long[0]
L_UINT32
long[1]
.
.
.
L_UINT32
long[number_of_longs - 1]

image\Ctlngar.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_LONG_ARRAY

number_of_longs

length of array stored in this comment

long[0]

data value containing the first long value in the array

long[1]

data value containing the second long value in the array

Example

#define MAX_VECTOR 10 
pArray = (FPXCOMMENT_HEADER_ARRAY *) Buffer; 
pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
(sizeof(L_UINT32) * MAX_VECTOR); 
pArray->type = FPXENUM_LONG_ARRAY; 
pArray->elements = MAX_VECTOR; 
uBytes = pArray->size; 
pLong = (L_UINT32 *) (pArray + 1); 
for (i = 0; i < MAX_VECTOR; i++) 
{ 
   pLong[i] = 12345678; 
} 
LFileSettings::SetComment(CMNT_FPXCREATIONPATH, Buffer, uBytes); 

FlashPixOECFBlock( Comment type)

This comment is used to store information of a table which provides information concerning the relationship between optical input and the image file value output from an electronic camera. Data is stored concerning exposure, ouput levels for red, output levels for green and output levels for blue. Refer to CMNT_FPXOECF in FlashPix File Comments.

L_UINT32 size_of_structure
L_UNIT32
type_of_structure
L_UINT16
number_of_columns
L_UINT16
number_of_rows
FlashPixWideStringArray column_headings
FlashPixFloatArray data

image\CmntOECF.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_OECF_BLOCK

number_of_columns

data value containing the number of columns in the table

number_of_rows

data value containing the number of rows in the table

column_headings

data array containing the column headings for the table

data

data array containing a list of table entries

Example

pElement = (FPXCOMMENT_HEADER_ELEMENT *) Buffer; 
pElement->size = sizeof(FPXCOMMENT_HEADER_ELEMENT) + 
sizeof(L_UINT16) + 
sizeof(L_UINT16) + 
sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(FPXCOMMENT_HEADER_ARRAY) * MAX_VECTOR + 
sizeof(L_UINT16) * sizeof(String) * MAX_VECTOR; 
sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(L_FLOAT) * MAX_VECTOR; 
pElement->type = FPXENUM_OECF_BLOCK; 
uBytes = pElement->size; 
pShort = (L_UINT16 *) (pElement + 1); 
pShort[0] = 1234; 
pShort[1] = 4321; 
pArray = (FPXCOMMENT_HEADER_ARRAY *)&pShort[2]; 
pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(FPXCOMMENT_HEADER_ARRAY) * MAX_VECTOR + 
sizeof(L_UINT16) * sizeof(String) * MAX_VECTOR; 
pArray->type = FPXENUM_WIDE_STRING_ARRAY; 
pArray->elements = MAX_VECTOR; 
pArray++; 
for ( i = 0; i < MAX_VECTOR; i++) 
{ 
   pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
   = sizeof(L_UINT16) * sizeof(String); 
   pArray->type = FPXENUM_WIDE_STRING; 
   pArray->elements = sizeof(String); 
   pShort = (L_UINT16 *) (pArray + 1); 
   for (j = 0; j < sizeof(String); j++) 
   { 
      pShort[j] = String[j]; 
   } 
   pArray = (FPXCOMMENT_HEADER_ARRAY *) ((L_UCHAR *)pArray + pArray->size); 
} 
pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(L_FLOAT) * MAX_VECTOR; 
pArray->type = FPXENUM_FLOAT_ARRAY; 
pArray->elements = MAX_VECTOR; 
pFloat = (L_FLOAT *) (pArray + 1); 
for (i = 0; i < MAX_VECTOR; i++) 
{ 
   pFloat[i] = 12.34; 
} 
LFileSettings::SetComment(CMNT_FPXOECF, Buffer, uBytes); 

FlashPixFloat( Comment type)

This comment is used to store a float value. For a full list of the FlashPix file comments, refer to FlashPix File Comments.

L_UINT32 size_of_structure
L_UNIT32
type_of_structure
L_FLOAT
float

image\Cmntflt.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_FLOAT

float

data value containing a float

Example

pElement = (FPXCOMMENT_HEADER_ELEMENT *) Buffer;   
pElement->size = sizeof(FPXCOMMENT_HEADER_ELEMENT) +   
sizeof(L_FLOAT);   
pElement->type = FPXENUM_FLOAT;   
uBytes = pElement->size;   
pFloat = (L_FLOAT *) (pElement + 1);   
*pFloat = 12.34; 
LFileSettings::SetComment(CMNT_FPXFNUMBER, Buffer, uBytes); 

FlashPixFloatArray( Comment type)

This comment is used to store an array of float values. For a full list of the FlashPix file comments, refer to FlashPix File Comments.

L_UINT32 size_of_structure
L_UNIT32
type_of_structure
L_UINT32
number_of_floats
L_FLOAT
float[0]
L_FLOAT
float[1]
.
.
.
L_FLOAT
float[number_of_floats - 1]

image\Ctfltar.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_FLOAT_ARRAY

number_of_floats

data value containing the number of float values stored in the array

float[0]

data value containing the first float value stored

float[1]

data value containing the second float value stored, etc.

Example

pArray = (FPXCOMMENT_HEADER_ARRAY *) Buffer; 
pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(L_FLOAT) * MAX_VECTOR; 
pArray->type = FPXENUM_FLOAT_ARRAY; 
pArray->elements = MAX_VECTOR; 
uBytes = pArray->size; 
pFloat = (L_FLOAT *) (pArray + 1); 
for (i = 0; i < MAX_VECTOR; i++) 
{ 
   pFloat[i]= 12.34; 
} 
LFileSettings::SetComment(CMNT_FPXSUBJECTDISTANCE, Buffer, uBytes); 

FlashPixScannedImageSizeBlock( Comment type)

This comment is used to store information concerning the dimensions of original scanned images and original documents. refer to CMNT_FPXORIGINALSCANNEDIMAGESIZE or CMNT_FPXORIGINALDOCUMENTSIZE in FlashPix File Comments.

L_UINT32 size_of_structure
L_UNIT32
type_of_structure
L_FLOAT
original_size_x
L_FLOAT
original_size_y
L_UINT32
original_size_unit

image\CmntSISB.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_SCANNED_IMAGE_SIZE_BLOCK

original_size_x

data value containing the width of the image

original_size_y

data value containing the height of the image

original_size_unit

data value indicating the unit of measurement, mm, inches, etc.(This must be filled with a value from FPXTYPE_RESOLUTION_UNIT.)

Example

pElement = (FPXCOMMENT_HEADER_ELEMENT *) Buffer;   
pElement->size = sizeof(FPXCOMMENT_HEADER_ELEMENT) +   
sizeof(L_FLOAT) +   
sizeof(L_FLOAT) +   
sizeof(L_UINT32);   
pElement->type = FPXENUM_SCANNED_IMAGE_SIZE_BLOCK;   
uBytes = pElement->size;   
pFloat = (L_FLOAT *) (pElement + 1);   
pFloat[0] = 12.34;   
pFloat[1] = 43.21;   
pLong = (L_UINT32 *)&pFloat[2];   
pLong[0] = 12345678; 
LFileSettings::SetComment(CMNT_FPXORIGINALSCANNEDIMAGESIZE, Buffer, uBytes); 

FlashPixShort( Comment type)

This comment is used to store a short value. For a full list of the FlashPix file comments, refer to FlashPix File Comments.

L_UINT32 size_of_structure
L_UNIT32
type_of_structure
L_UINT16
short

image\Ctshort.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_SHORT

short

data value containing a short

Example

pElement = (FPXCOMMENT_HEADER_ELEMENT *)Buffer;   
pElement->size = sizeof(FPXCOMMENT_HEADER_ELEMENT) +   
sizeof(L_UINT16);   
pElement->type = FPXENUM_SHORT;   
uBytes = pElement->size;   
pShort = (L_UINT16 *) (pElement + 1);   
*pShort = 1234; 
LFileSettings::SetComment(CMNT_FPXFILMROLLNUMBER, Buffer, uBytes); 

FlashPixShortArray( Comment type)

This comment is used to store an array of short values. For a full list of the FlashPix file comments, refer to FlashPix File Comments.

L_UINT32 size_of_structure /* header information */   
L_UNIT32 type_of_structure = FPXENUM_SHORT_ARRAY   
/* header information */   
L_UINT32 number_of_shorts /* header information */   
L_UINT16 short[0] /* data */   
L_UINT16 short[1] /* data */   
.   
.   
.   
L_UINT16 short[number_of_shorts - 1] /* data */ 

image\Ctshrtar.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_SHORT_ARRAY

number_of_shorts

data value containing the number of short values stored in the array

short[0]

data value containing the first short value stored in the array

short[1]

data value containing the second short value stored in the array, etc.

Example

pArray = (FPXCOMMENT_HEADER_ARRAY *)Buffer; 
pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(L_UINT16) * MAX_VECTOR; 
pArray->type = FPXENUM_SHORT_ARRAY; 
pArray->elements = MAX_VECTOR; 
uBytes = pArray->size; 
pShort = (L_UINT16 *) (pArray + 1); 
for (i = 0; i < MAX_VECTOR; i++) 
{ 
   pShort[i] = 1234; 
} 
LFileSettings::SetComment(CMNT_FPXISOSPEEDRATINGS, Buffer, uBytes); 

FlashPixSpacialFrequencyResponseBlock( Comment type)

This comment is used to store information of a table which provides information concerning the spatial frequency response of a camera (SFR). The data stored concerns spatial frequency,and horizontal, vertical and diagonal SFR. Refer to CMNT_FPXSPATIALFREQUENCY in FlashPix File Comments.

L_UINT32 size_of_structure
L_UNIT32
type_of_structure
L_UINT32
number_of_columns
L_UINT32
number_of_rows
FlashPixWideStringArray column_headings
FlashPixFloatArray data

image\CmntSFRB.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_SPACIAL_FREQUENCY_RESPONSE_BLOCK

number_of_columns

data value containing the number of columns in the table

number_of_rows

data value containing the number of rows in the table

column_headings

data array containing the column headings for the table

data

data array containing a list of table entries

Example

pElement = (FPXCOMMENT_HEADER_ELEMENT *) Buffer; 
pElement->size = sizeof(FPXCOMMENT_HEADER_ELEMENT) + 
sizeof(L_UINT32) + 
sizeof(L_UINT32) + 
sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(FPXCOMMENT_HEADER_ARRAY) * MAX_VECTOR + 
sizeof(L_UINT16) * sizeof(String) * MAX_VECTOR; 
sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(L_FLOAT) * MAX_VECTOR; 
pElement->type = FPXENUM_SPACIAL_FREQUENCY_RESPONSE_BLOCK; 
uBytes = pElement->size; 
pLong = (L_UINT32 *) (pElement + 1); 
pLong[0] = 12345678; 
pLong[1] = 87654321; 
pArray = (FPXCOMMENT_HEADER_ARRAY *)&pLong[2]; 
pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(FPXCOMMENT_HEADER_ARRAY) * MAX_VECTOR + 
sizeof(L_UINT16) * sizeof(String) * MAX_VECTOR; 
pArray->type = FPXENUM_WIDE_STRING_ARRAY; 
pArray->elements = MAX_VECTOR; 
pArray++; 
for ( i = 0; i < MAX_VECTOR; i++) 
{ 
   pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
   = sizeof(L_UINT16) * sizeof(String); 
   pArray->type = FPXENUM_WIDE_STRING; 
   pArray->elements = sizeof(String); 
   pShort = (L_UINT16 *) (pArray + 1); 
   for (j = 0; j < sizeof(String); j++) 
   { 
      pShort[j] = String[j]; 
   } 
   pArray = (FPXCOMMENT_HEADER_ARRAY *) ((L_UCHAR  *)pArray + pArray->size); 
} 
pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(L_FLOAT) * MAX_VECTOR; 
pArray->type = FPXENUM_FLOAT_ARRAY; 
pArray->elements = MAX_VECTOR; 
pFloat = (L_FLOAT *) (pArray + 1); 
for (i = 0; i < MAX_VECTOR; i++) 
{ 
   pFloat[i] = 12.34; 
} 
LFileSettings::SetComment(CMNT_FPXSPATIALFREQUENCY, Buffer, uBytes); 

FlashPixString( Comment type)

This comment is used to store a string value. For a full list of the FlashPix file comments, refer to FlashPix File Comments.

L_UINT32 size_of_structure
L_UNIT32
type_of_structure
L_UINT32
number_of_chars
L_UCHAR
char[0]
L_UCHAR
char[1]
.
.
.
L_UCHAR
char[number_of_chars - 1]

image\Cmntstrg.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_STRING

number_of_chars

data value containing the number of characters stored in the array

char[0]

data value containing the first character stored in the array

char[1]

data value containing the second character stored in the array, etc.

Example

pArray = (FPXCOMMENT_HEADER_ARRAY *)Buffer; 
pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(L_UCHAR) * sizeof(String); 
pArray->type = FPXENUM_ STRING; 
pArray->elements = sizeof(String); 
uBytes = pArray->size; 
pChar = (L_UCHAR *) (pArray + 1); 
for ( j = 0; j < sizeof(String); j++) 
{ 
   pChar[j] = String[j]; 
} 
LFileSettings::SetComment(CMNT_FPXTITLE, Buffer, uBytes); 

FlashPixSystemTime( Comment type)

This comment is used to store time values. Refer to CMNT_FPXEDITTIME, CMNT_FPXLASTPRINTED, CMNT_FPXCREATEDTM, CMNT_FPXLASTSAVEDTM, CMNT_FPXCAPTUREDATE, CMNT_FPXSCANDATE, or CMNT_FPXLASTMODIFIEDDATE in FlashPix File Comments.

 L_UINT32 size_of_structure
 L_UNIT32 type_of_structure
 L_UINT16 year
 L_UINT16 month
 L_UINT16 day_of_week
 L_UINT16 day
 L_UINT16 hour
 L_UINT16 minute
 L_UINT16 second
 L_UINT16 milliseconds

image\Cmntsys.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_SYSTEM_TIME

year

data value containing the year

month

data value containing the month

day_of_week

data value containing the day of the week

day

data value containing the day of the month

hour

data value containing the hour

minute

data value containing the minute

second

data value containing the seconds past the minute

milliseconds

data value containing the milliseconds

Example

pElement = (FPXCOMMENT_HEADER_ELEMENT *)Buffer;   
pElement->size = sizeof(FPXCOMMENT_HEADER_ELEMENT) +   
sizeof(L_UINT16) * 8;   
pElement->type = FPXENUM_SYSTEM_TIME;   
uBytes = pElement->size;   
pShort = (L_UINT16 *) (pElement + 1); 
pShort[0] = 1965; // Year   
pShort[1] = 12; // Month   
pShort[2] = 0; // Day of week   
pShort[3] = 11; // Day   
pShort[4] = 1; // Hour   
pShort[5] = 2; // Minute   
pShort[6] = 3; // Second   
pShort[7] = 4; // Milliseconds 
LFileSettings::SetComment(CMNT_FPXEDITTIME, Buffer, uBytes); 

FlashPixWideString( Comment type)

This comment is used to store a wide string. In a wide string each character stored is two bytes in size. For a full list of the FlashPix file comments, refer to FlashPix File Comments.

L_UINT32 size_of_structure
L_UNIT32
type_of_structure
L_UINT32
number_of_wide_chars
L_UINT16
wide_char[0]
L_UINT16
wide_char[1]
.
.
.
L_UINT16
wide_char[number_of_wide_chars - 1]

image\Ctwstr.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_WIDE_STRING

number_of_wide_chars

data value containing the number of wide characters stored in the string

wide_char[0]

data value containing the first wide character stored in the string

wide_char[1]

data value containing the second wide character stored in the string, etc.

Example

pArray = (FPXCOMMENT_HEADER_ARRAY *)Buffer; 
pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(L_UINT16) * sizeof(String); 
pArray->type = FPXENUM_WIDE_STRING; 
pArray->elements = sizeof(String); 
uBytes = pArray->size; 
pShort = (L_UINT16 *) (pArray + 1); 
for ( j = 0; j < sizeof(String); j++) 
{ 
   pShort[j] = String[j]; 
} 
LFileSettings::SetComment(CMNT_FPXCOPYRIGHT, Buffer, uBytes); 

FlashPixWideStringArray( Comment type)

This comment is used to store an array of wide strings. For a full list of the FlashPix file comments, refer to FlashPix File Comments.

L_UINT32 size_of_structure
L_UNIT32
type_of_structure
L_UINT32
number_of_wide_strings
FlashPixWideString wide_string[0]
FlashPixWideString wide_string[1]
.
.
.
FlashPixWideString wide_string[number_of_wide_strings - 1]

image\Ctwstrar.gif

Member

Description

size_of_structure

size of this comment

type_of_structure

type of this comment = FPXENUM_WIDE_STRING_ARRAY

number_of_wide_strings

data value containing the number of wide strings stored in the array

wide_string[0]

data values containing the first wide string stored in the array

wide_string[1]

data values containing the second wide string stored in the array, etc.

Example

pArray = (FPXCOMMENT_HEADER_ARRAY *)Buffer; 
pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
sizeof(FPXCOMMENT_HEADER_ARRAY) * MAX_VECTOR + 
sizeof(L_UINT16) * sizeof(String) * MAX_VECTOR; 
pArray->type = FPXENUM_WIDE_STRING_ARRAY; 
pArray->elements = MAX_VECTOR; 
uBytes = pArray->size; 
pArray++; 
for ( i = 0; i < MAX_VECTOR; i++) 
{ 
   pArray->size = sizeof(FPXCOMMENT_HEADER_ARRAY) + 
   sizeof(L_UINT16) * sizeof(String); 
   pArray->type = FPXENUM_WIDE_STRING; 
   pArray->elements = sizeof(String); 
   pShort = (L_UINT16 *) (pArray + 1); 
   for ( j = 0; j < sizeof(String); j++ ) 
   { 
      pShort[j] = String[j]; 
   } 
   pArray = (FPXCOMMENT_HEADER_ARRAY *) ((L_UCHAR *)pArray + pArray->size); 
} 
LFileSettings::SetComment(CMNT_FPXPEOPLEINTHEIMAGE, Buffer, uBytes); 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C++ Class Library Help