ImageGear for C and C++ on Windows v20.0 - Updated
EXIF-JPEG Metadata Structure
User Guide > File Formats and Compressions > File Formats > Metadata Structures > EXIF-JPEG Metadata Structure

The EXIF-JPEG metadata structure is similar to JPEG one. But EXIF-JPEG sends the Exif APP1 marker segment data in parsed form and Jfif APP0 marker segment data is not parsed and sent as raw data.


Brief information on EXIF-JPEG metadata levels is provided in the set of tables below:

EXIF-JPEG Level

All items between items with Name "EXIF" and Id IG_FORMAT_EXIF_JPEG (Type LEVEL_START and LEVEL_END) are interpreted as EXIF data. If during sending data from application level to filter level the first item is omitted the data will not be interpreted and saved.

For JPEG marker segment levels see JPEG Non-Image Data Structure.

Name Id Type Value Type Value Value Length Read Only
"EXIF-JPEG" IG_FORMAT_EXIF_JPEG LEVEL_START 0 NULL 0 TRUE
Exif APP1 marker segment level
JPEG marker segment levels mixed in any way (if present)
"EXIF-JPEG" IG_FORMAT_EXIF_JPEG LEVEL_END 0 NULL 0 TRUE

Exif APP1 Marker Segment Level

Name Id Type Value Type Value Value Length Read Only
"APP1" 65505 LEVEL_START 0 NULL 0 TRUE
"APP1_DATASIZE" 60225 VALUE_ITEM UINT16 <Data> 1 TRUE
"EXIF_HEADER" 59935 VALUE_ITEM STRING "EXIF" 5 TRUE
"TIF_HEADER" 59936 VALUE_ITEM UINT16 0x4949 or 0x4D4D 1 TRUE
IFD 0 level ( if present )
Thumbnail IFD level ( if present )
"APP1" 0xFFE1 LEVEL_END 0 NULL 0 TRUE
The "APP1_DATASIZE" item can be omitted during saving.

For more detailed Exif information see EXIF-TIFF Non-Image Data Structure.

EXIF Makernote

Makernote is a standard EXIF tag of UNDEFINED (byte) type. This tag usually is used as a "hidden" IFD. Makernote can not be read in and written out as a BLOB, because IFD offsets become invalid. Therefore, to preserve this tag while writing an image it's necessary to decode it during reading and re-encode it during writing, despite the fact that formally makernote is just a binary tag.

See enumIGEXIFMakerNoteType for descriptions of the various makernote types.

To present Makernote info in a convenient way ImageGear introduces a special structure as an addition to the standard EXIF Metadata: "Makernote*s* Wrapper IFD". Instead of a single binary Makernote*s* tag (37500), we are adding a virtual IFD, containing all the information about Makernote*s*.

'Makernote Wrapper IFD' has the following format depending on the 'type' tag:

  1. Type IG_MAKERNOTE_TYPE_UNKNOWN:
 
Copy Code
'MakerNote wrapper IFD'
-------->'type' = IG_MAKERNOTE_TYPE_UNKNOWN
-------->'binary MakerNote'

Type IG_MAKERNOTE_TYPE_IFD: 
'MakerNote wrapper IFD'
-------->'type' = IG_MAKERNOTE_TYPE_IFD
-------->'MakerNote IFD'
----------------> 'individual MakerNote tag 1'
----------------> 'individual MakerNote tag 2'
...
----------------> 'individual MakerNote tag N'
-------->'binary MakerNote'

Type IG_MAKERNOTE_TYPE_IFD_PREFIXED: 
'MakerNote wrapper IFD'
-------->'type' = IG_MAKERNOTE_TYPE_IFD_PREFIXED
-------->'MakerNote IFD prefix'
-------->'MakerNote IFD'
----------------> 'individual MakerNote tag 1'
----------------> 'individual MakerNote tag 2'
...
----------------> 'individual MakerNote tag N'
-------->'binary MakerNote'

Type IG_MAKERNOTE_TYPE_TIF_HEADER_PREFIXED: 
'MakerNote wrapper IFD' 
-------->'type' = IG_MAKERNOTE_TYPE_TIF_HEADER_PREFIXED
<The rest of the structure is identical to IG_MAKERNOTE_TYPE_IFD_PREFIXED>

Type IG_MAKERNOTE_TYPE_IFD_PREFIXED_OFFSET_II: 
'MakerNote wrapper IFD'
-------->'type' = IG_MAKERNOTE_TYPE_IFD_PREFIXED_OFFSET_II
<The rest of the structure is identical to IG_MAKERNOTE_TYPE_IFD_PREFIXED>

If 'Makernote' EXIF tag is present in the file then ImageGear will always provide it in its original binary form via meta-data callback ('binary Makernote' tag) on the read side, and will also optionally provide it as a decoded sub-IFD (w/ or w/o prefix depending on how it is stored in the original file) if it can be decoded.

ImageGear will ignore 'binary Makernote' tag on the write side for the 'Makernote wrapper IFDs' that have 'type' other than IG_MAKERNOTE_TYPE_UNKNOWN - and construct 'Makernote' EXIF tag based on the 'Makernote IFD'.

ImageGear will store 'binary Makernote' to file 'as is' for the 'Makernote wrapper IFDs' that have 'type' set to IG_MAKERNOTE_TYPE_UNKNOWN.

If 'Makernote wrapper IFD' is not provided to ImageGear during saving operation then 'Makernote' EXIF tag will not be saved into the output file.

Makernote IFD tags are listed below:

Name Id Type Value Type Value Value Length Read Only
"IFD" IGMDTAG_ID_EXIF_MAKERNOTE LEVEL_START 0 NULL 0 FALSE
"MakerNoteType" IGMDTAG_ID_EXIF_MAKERNOTE_TYPE VALUE_ITEM UINT16 enumIGEXIFMakerNoteType 1 FALSE
"MakerNotePrefix" IGMDTAG_ID_EXIF_MAKERNOTE_PREFIX VALUE_ITEM RAW_DATA     FALSE
"MakerNoteBinary" IGMDTAG_ID_EXIF_MAKERNOTE_BINARY VALUE_ITEM RAW_DATA     FALSE
"IFD" IGMDTAG_ID_EXIF_MAKERNOTE_DATA_IFD LEVEL_START 0 NULL 0 FALSE
"UNDEFINED"   VALUE_ITEM RAW_DATA     FALSE
...
"IFD" IGMDTAG_ID_EXIF_MAKERNOTE_DATA_IFD LEVEL_END 0 NULL 0 FALSE
"IFD" IGMDTAG_ID_EXIF_MAKERNOTE LEVEL_END 0 NULL 0 FALSE

Custom Makernote Tags and IFDs

The following custom tags and IFDs are introduced for Makernote support:

Makernote Wrapper IFD: tag = 37500 (same as standard Makernote tag). This IFD is located in the "Exif IFD" (34665).

For information about new tags, which belong to the Makernote Wrapper IFD, see enumIGEXIFMakerNoteTagIDs.

Vendors and Models Currently Supported

Make Model
Canon Canon DIGITAL IXUS
Canon Canon EOS D30
Canon Canon PowerShot G2
Canon Canon PowerShot S50
FUJIFILM FinePix4900Z
LEICA digilux 4.3
Minolta Co., Ltd. DiMAGE 7i
Nikon E5000 (TIF)
NIKON E5700
NIKON E950
OLYMPUS OPTICAL CO., LTD C2040Z
OLYMPUS OPTICAL CO., LTD C960Z,D460Z
Panasonic DMC-LC5
RICOH Caplio RR1
SANYO Electric Co., Ltd. SR6
SANYO Electric Co., Ltd. SX113
SANYO Electric Co., Ltd. SX212
SEIKO EPSON CORP. PhotoPC 850Z

Exif APP2 Marker Segment (Flashpix Extensions) Levels

EXIF file format allows you to store Flashpix extensions in APP2 marker segments.

FPXR Contents List APP2 Marker Segment

Name Id Type Value Type Value Value Length Read Only
"APP2" 0xFFE2 LEVEL_START 0 NULL 0 TRUE
"APP2_DATASIZE" 60226 VALUE_ITEM UINT16   1 TRUE
"FPXR_HEADER" 61221 VALUE_ITEM STRING "FPXR" 4 FALSE
"FPXRVersion" 61222 VALUE_ITEM UINT8   1 FALSE
"FPXRExtensionID" 61223 VALUE_ITEM UINT8 "1" 1 FALSE
"FPXRInteroperabilityCount" 61224 VALUE_ITEM UINT16 <n> 1 FALSE
Interoperability Entity level 0
...
Interoperability Entity level <n> - 1
"APP2" 0xFFE2 LEVEL_END 0 NULL 0 TRUE

Interoperability Entity Level

Name Id Type Value Type Value Value Length Read Only
"InteroperabilityEntity" <Ind.> LEVEL_START 0 NULL 0 TRUE
"EntitySize" <Ind.> VALUE_ITEM UINT32 0xFFFFFFFF for Storage or <Variable> for Stream 1 FALSE
"DefaultValue" <Ind.> VALUE_ITEM UINT8 "FPXR" 4 FALSE
"Storage/StreamName" <Ind.> VALUE_ITEM RAW_DATA <Unicode name> <Variable> FALSE
The next item is present only if "EntitySize" item value is equal 0xFFFFFFFF (Storage)
"EntityClassID" <Ind.> VALUE_ITEM RAW_DATA   16 FALSE
"InteroperabilityEntity" <Ind.> LEVEL_END 0 NULL 0 TRUE

FPXR Data Stream APP2 Marker Segment

Name Id Type Value Type Value Value Length Read Only
"APP2" 0xFFE2 LEVEL_START 0 NULL 0 TRUE
"APP2_DATASIZE" 60226 VALUE_ITEM UINT16   1 TRUE
"FPXR_HEADER" 61221 VALUE_ITEM STRING "FPXR" 4 FALSE
"FPXRVersion" 61222 VALUE_ITEM UINT8   1 FALSE
"FPXRExtensionID" 61223 VALUE_ITEM UINT8 "2" 1 FALSE
"FPXRIndexToContentsList" 61225 VALUE_ITEM UINT16 <Ind.>* 1 FALSE
"FPXROffsetToStream" 61226 VALUE_ITEM UINT32   1 FALSE
"FPXRStreamData" 61227 VALUE_ITEM RAW_DATA   <Variable> FALSE
"APP2" 0xFFE2 LEVEL_END 0 NULL 0 TRUE

*<Ind.> is pointer to appropriate "InteroperabilityEntity" of FPXR Contents List APP2 marker segment. <Ind.> value is between 0 and <n> - 1(<n> is the "FPXRInteroperabilityCount" item value of FPXR Contents List APP2 marker segment).

The Other FPXR APP2 Marker Segment

Name Id Type Value Type Value Value Length Read Only
"APP2" 0xFFE2 LEVEL_START 0 NULL 0 TRUE
"APP2_DATASIZE" 60226 VALUE_ITEM UINT16   1 TRUE
"FPXR_HEADER" 61221 VALUE_ITEM STRING "FPXR" 4 FALSE
"FPXRVersion" 61222 VALUE_ITEM UINT8   1 FALSE
"FPXRExtensionID" 61223 VALUE_ITEM UINT8 More than "2" 1 FALSE
"FPXRData" 61228 VALUE_ITEM RAW_DATA   <Variable> FALSE
"APP2" 0xFFE2 LEVEL_END 0 NULL 0 TRUE
Is this page helpful?
Yes No
Thanks for your feedback.