Top | ![]() |
![]() |
![]() |
![]() |
Tag SpecificationsTag Specifications — querying tag usage information from the IPTC IIM specification |
const char * | iptc_tag_get_name () |
char * | iptc_tag_get_title () |
char * | iptc_tag_get_description () |
const IptcTagInfo * | iptc_tag_get_info () |
char * | iptc_format_get_name () |
int | iptc_tag_find_by_name () |
enum | IptcRecord |
enum | IptcTag |
struct | IptcTagInfo |
enum | IptcFormat |
enum | IptcMandatory |
enum | IptcRepeatable |
These functions allow queries to the IPTC IIM specification which contains information about the purpose of each IPTC tag, along with any requirements such as maximum/minimum data length, data type, repeatability and whether the tag is mandatory.
const char * iptc_tag_get_name (IptcRecord record
,IptcTag tag
);
Retrieves the name of a tag. The name is derived from the IPTC IIM specification and gives an indication of the purpose of a particular tag. The name will consist of ASCII characters with no spaces, for example "CopyrightNotice".
char * iptc_tag_get_title (IptcRecord record
,IptcTag tag
);
Retrieves the title of a tag. The title is similar to the name, except it will be translated to the current locale (if available) and may contain spaces, for example "Copyright Notice". It is appropriate for the title to appear in user interfaces. The return value will be encoding using the UTF-8 character set.
char * iptc_tag_get_description (IptcRecord record
,IptcTag tag
);
Retrieves the description of a tag, which explains the purpose of the tag from the IPTC IIM specification. It is translated to the current locale if available. The return value will be encoded using the UTF-8 character set.
const IptcTagInfo * iptc_tag_get_info (IptcRecord record
,IptcTag tag
);
Retrieves the IptcTagInfo structure containing information about the tag from the IPTC IIM specification such as purpose, data format, and minimum and maximum lengths.
char *
iptc_format_get_name (IptcFormat format
);
Retrieves a string version of a data format. For example,
IPTC_FORMAT_STRING
returns "String".
int iptc_tag_find_by_name (const char *name
,IptcRecord *record
,IptcTag *tag
);
Looks up the record and tag numbers for a tag specified by name. For example, searching for "Caption" would return 2:120 in the record and tag variables.
The record number that, together with the tag number (IptcTag), uniquely identifies the purpose of a tag.
the record used for file information such as file format, version, unique identifier, etc. This is often not used for photo-management applications. |
||
the record used for application-specific tags such as Caption, Keywords, etc. |
||
application-specific tags |
||
application-specific tags |
||
application-specific tags |
||
application-specific tags |
||
contains information about an encapsulated file |
||
the encapsulated file data (usually not used) |
||
followup information about an encapsulated file |
The tag number that, together with the record number (IptcRecord), uniquely identifies the purpose of a tag.
struct IptcTagInfo { IptcRecord record; IptcTag tag; const char *name; const char *title; const char *description; IptcFormat format; IptcMandatory mandatory; IptcRepeatable repeatable; unsigned int minbytes; unsigned int maxbytes; };
Contains static information about a specific tag (identified by its record-tag pair) from the IPTC IIM specificiation. This info is for reference only and should never be modified by an application.
IptcRecord |
record number of the tag |
|
IptcTag |
dataset number of the tag |
|
English name of the tag (no spaces) |
||
English title of the tag (may contain spaces) |
||
English description of the tag |
||
IptcFormat |
data format of the tag |
|
IptcMandatory |
whether the specification says the tag is required |
|
IptcRepeatable |
whether the specification says the tag can appear more than once |
|
minimum number of bytes in the tag value |
||
maximum number of bytes in the tag value |
The possible data formats for a tag's value, derived from the IPTC IIM specification. Integer formats are always represented with the most significant byte first (big-endian) in the IPTC bytestream.
Unknown format (for a tag not in the specification) |
||
Binary data (variable length) |
||
1-byte integer |
||
2-byte integer (big-endian) |
||
4-byte integer (big-endian) |
||
String data (variable length, of any character set) |
||
String containing only numerals (variable length) |
||
String of the format "YYYYMMDD" (8 bytes) |
||
String of the format "HHMMSS±HHMM" where the second HHMM defines the timezone offset (11 bytes) |
Whether a tag is mandatory according to the IPTC IIM specification. Note that most applications ignore this aspect of the specification since the spec was designed to encapsulate the media file rather than the other way around (which is how nearly all applications use it). This renders most mandatory tags unnecessary.