Exif File Comments - Raster imaging C++ Class Library Help

Exif File Comments

When reading or updating Exif comments, you must specify the comment type using the following constants.

NOTE: Please refer to the EXIF specification for all possible values for EXIF comments.

NOTE: LEADTOOLS will currently write version 2.21 of these files. But it can read earlier or later versions as the file format is designed to be backward compatible.

For a loop counter:

Value

Meaning

CMNT_LAST

Last defined number for comments. To get all comments, you can use the comment type constant as a loop counter. The first constant is 0 and the last is CMNT_LAST.

TIFF comments in Exif files: All Exif files (TIFF and JPG) can contain the following TIFF comments. Each TIFF comment field can contain a character string. The maximum field size is 32K, except for the date-time field, which is always 20.

Value

Meaning

CMNT_SZARTIST

[0] Person who created the image.

CMNT_SZCOPYRIGHT

[1] Copyright notice.

CMNT_SZDATETIME

[2] Date and time (YYYY:MM:DD HH:MM:SS). The field length is 20, counting the NULL terminator.

CMNT_SZDESC

[3] Description of the image.

CMNT_SZHOSTCOMP

[4] Computer and operating system in use.

CMNT_SZMAKE

[5] Manufacturer of the equipment used to create the image.

CMNT_SZMODEL

[6] Model name and number of the equipment.

CMNT_SZNAMEOFDOC

[7] Name of the document from which the image was scanned.

CMNT_SZNAMEOFPAGE

[8] Page name from which the image was scanned.

CMNT_SZSOFTWARE

[9] Name and version of software package used to create the image.
If you are using the nag version of LTKRN, this comment is fixed and cannot be changed.

General Exif comments: Exif files can contain the following general comments. Each comment field is constrained by its Exif data type.

For your convenience, some valid values are listed below for certain comments. In each case, revisions of the Exif specification might change the list of possible values for each comment. For a complete list of values for each comment, please consult the latest Exif specification.

Value

Meaning

CMNT_EXIFVERSION

[21] Exif version. LEADTOOLS always writes this value as 0221, meaning version 2.21. Data type: UNDEFINED. Length: 4.

CMNT_SZSUBSECTIME

[38] Decimal extension for seconds that are specified in the CMNT_SZDATETIME field. Data type: ASCII. Length: variable.

CMNT_SZDATETIMEORIGINAL

[22] Date and time the original image is captured. The format is YYYY:MM:DD HH:MM:SS. The time is in a 24-hour format, and a blank space is left between the date and the time. Data type: ASCII. Length: 20.

CMNT_SZSUBSECTIMEORIGINAL

[39] Decimal extension for seconds that are specified in the CMNT_SZDATETIMEORIGINAL field. Data type: ASCII. Length: variable.

CMNT_SZDATETIMEDIGITIZED

[23] Date and time the file is generated. If the file is generated directly, as with a digital camera, this is the same as the time the original image is captured. Data type: ASCII. Length: 20.

CMNT_SZSUBSECTIMEDIGITIZED

[40] Decimal extension for seconds that are specified in the CMNT_SZDATETIMEDIGITIZED field. Data type: ASCII. Length: variable.

CMNT_SHUTTERSPEEDVALUE

[24] Shutter speed. The unit of measure is APEX. Data type: SRATIONAL. Length: 1.

CMNT_APERTURE

[25] Aperture value. This is the ratio of lens aperture for the focal length. The unit of measure is APEX. Data type: RATIONAL. Length: 1.

CMNT_BRIGHTNESS

[26] Brightness value. Data type: SRATIONAL. Length: 1.

CMNT_EXPOSUREBIAS

[27] Exposure bias. This is the value for correcting a biased exposure. The unit of measure is APEX. Data type: SRATIONAL. Length: 1.

CMNT_MAXAPERTURE

[28] Minimum lens f-number. Data type: RATIONAL. Length: 1.

CMNT_SUBJECTDISTANCE

[29] Distance from lens to subject (in meters). Data type: RATIONAL. Length: 1.

CMNT_METERINGMODE

[30] Photometry mode. Possible values are

 

0 = Unidentified

 

1 = Average

 

2 = Center Weighted Average

 

3 = Spot

 

4 = MultiSpot

 

5 = Pattern

 

6 = Partial

 

255 = Others

 

Data type: SHORT. Length: 1.

CMNT_LIGHTSOURCE

[31] Light source. Possible values are

 

0 = Unidentified

 

1 = Daylight

 

2 = Florescence light

 

3 = Tungsten Lamp

 

17 = Standard light source A

 

18 = Standard light source B

 

19 = Standard light source C

 

20 = D55

 

21 = D65

 

22 = D75

 

255 = Others

 

Data type: SHORT. Length: 1.

CMNT_FLASH

[32] Flash On/Off. Possible values are 1 for on or 0 for off. Data type: SHORT. Length: 1.
Please refer to the EXIF specification for other possible values for this comment.

CMNT_FOCALLENGTH

[33] Focal length, measured in millimeters. Data type: RATIONAL. Length: 1.

CMNT_EXPOSURETIME

[34] Exposure time, expressed as a fraction of a second. Data type: RATIONAL. Length: 1.

CMNT_FNUMBER

[35] The actual lens F stop (ratio of lens aperture to focal length). Data type: RATIONAL. Length: 1.

CMNT_MAKERNOTE

Maker note. Data type: UNDEFINED. The creator of the file determines the data format.

CMNT_USERCOMMENT

[37] User comment. Data type: UNDEFINED. Length: variable. The first eight bytes specify the data format, and the remainder of the comment is in the specified format. The first eight bytes can be any of the following:

 

41 53 43 49 49 00 00 00 = ASCII

 

4A 49 53 00 00 00 00 00 = JIS (Japanese)

 

00 00 00 00 00 00 00 00 = Undefined

CMNT_SUPPORTEDFLASHPIXVERSION

[158] Supported FlashPix version (Exif 2.0). LEADTOOLS always writes 0100 here. Data type: UNDEFINED. Length: 4

CMNT_COLORSPACE

[159] Color space (Exif 2.0). Specifies whether the color is calibrated or not. LEADTOOLS always writes this value as 1. Data type: SHORT. Length: 1 Possible values are:

 

1 = sRGB (PC monitor conditions)

 

0xFFFF = Uncalibrated

 

Other = reserved

CMNT_EXPOSUREPROGRAM

[160] Exposure program (Exif 2.0) The class of the program used by the camera to set exposure when the picture is taken. Data type: SHORT. Length = 1. Possible values are:

 

0 = Not defined

 

1 = Manual

 

2 = Aperture priority

 

4 = Shutter priority

 

5 = Creative program (biased toward depth of field)

 

6 = Action program (biased toward fast shutter speed)

 

7 = Portrait mode (for closeup photos with the background out of focus)

 

Other = reserved

CMNT_SZSPECTRALSENSITIVITY

[161] Spectral sensitivity (Exif) - The spectral sensitivity of each channel of the camera used. It is an ASCII string compatible with the standard developed by the ASTM technical committee. Data type: ASCII. Length: any

CMNT_ISOSPEEDRATINGS

[162] ISO speed ratings (Exif) - the ISO speed and the ISO Latitude of the camera or input device as specified in ISO 12232 Data type: SHORT. Length: any

CMNT_OPTOELECTRICCOEFFICIENT

[163] Optoelectric coefficient (Exif) - Opto-Electric Conversion function specified in ISO 14524. OECF is the relationship between the camera optical input and the image values. Data type: UNDEFINED. Length: ANY. This is an array of m rows and n columns. For information on how it is recorded, refer to OECF.

CMNT_SZRELATEDSOUNDFILE

[164] Related audio file (Exif) - the name of an audio file related to the image data. The name should be 8 ASCII chars + '.' + 3 chars for extension + NULL. Data type: ASCII. Length: 13.

CMNT_FLASHENERGY

[165] Flash energy (Exif) - the strobe energy at the time the image iscaptured, as measured in Beam Candle Power Seconds (BPCS) Data type: RATIONAL. Length: 1

CMNT_SPATIALFREQUENCYRESPONSE

[166] Spatial frequency response (Exif) - the camera or input device spatial frequency table and SFR values in the direction of image width, image height and diagonal direction, as specified in ISO 12233. Data type: UNDEFINED. Length: ANY This is an array of m rows and n columns.For information on how this is recorded, refer to SFR.

CMNT_FOCALPLANEXRESOLUTION

[167] Focal plane X Resolution (Exif) the number of dots per resolution unit on the camera focal plane in the image width (X) direction. The resolution unit is given by CMNT_FOCALPLANERESOLUTIONUNIT. If CMNT_FOCALPLANERESOLUTIONUNIT is not set, the unit will be considered to be 2 ("dots per inch"). Data type: RATIONAL. Length: 1

CMNT_FOCALPLANEYRESOLUTION

[168] Focal plane Y Resolution (Exif) - the number of dots per resolution unit on the camera focal plane in the image height (Y) direction. The resolution unit is given by CMNT_FOCALPLANERESOLUTIONUNIT. If CMNT_FOCALPLANERESOLUTIONUNIT is not set, the unit will be considered to be 2 ("dots per inch"). Data type: RATIONAL. Length: 1

CMNT_FOCALPLANERESOLUTIONUNIT

[245] Focal plane resolution unit (Exif). This is the resolution unit for the CMNT_FOCALPLANEXRESOLUTION and CMNT_FOCALPLANEYRESOLUTION comments. Data type: SHORT. Length: 1. Possible values are:

2 = inch (CMNT_FOCALPLANEXRESOLUTION and CMNT_FOCALPLANEYRESOLUTION are expressed in dots per inch).

3 = cm (CMNT_FOCALPLANEXRESOLUTION and CMNT_FOCALPLANEYRESOLUTION are expressed in dots per cm).

CMNT_SUBJECTLOCATION

[169] Subject location (Exif) - the location of the main subject in the scene. The first value is the X column number and the second is the Y row number. Data type: SHORT. Length: 2

CMNT_EXPOSUREINDEX

[170] Exposure index (Exif) - the image sensor type on the camera or input device. Data type: SHORT. Length: 1

CMNT_SENSINGMETHOD

[171] Sensing method (Exif) - the image sensor type on the camera or input device. Data type: SHORT. Length: 1 Possible values are:

 

1 = not defined

 

2 = one-chip color area sensor

 

3 = two-chip color area sensor

 

4 = three-chip color area sensor

 

5 = color sequential area sensor

 

7 = trilinear sensor

 

8 = color sequential sensor

 

other = reserved

CMNT_FILESOURCE

[172] File source (Exif) - the image source. If a digital camera recorded the image, the value will always be 3, to indicate that the image was recorded on a digital camera. Data type: SHORT. Length: 1 Possible values are:

 

3 = image recorded on a DSC (Digital Still Camera)

 

other = reserved

CMNT_SCENETYPE

[173] Scene type (Exif) - the type of scene. If a DSC recorded the image, this value will always be 1, indicating that the image was directly photographed. Data type: UNDEFINED. Length: 1 Possible values are:

 

1 = a directly photographed image

 

other = reserved

CMNT_CFAPATTERN

[174] CFA Pattern (Exif) - the color filter array (CFA) geometric pattern of the image sensor when a one-chip color sensor was applied. It does not apply to any other sensing methods. Data type: UNDEFINED. Length: ANY This is an array m x n (horz x vertical), where the pattern is repeated every m pixels on the horizontal and n pixels on the vertical. For a table of the layout, refer to CFA .

CMNT_SUBJECTAREA

[227] Location and area of the main subject in the overall scene. Data type: SHORT. Count: 2 (Location of the subject is given in X, Y coordinates), 3 (Area of the main subject is given as a circle, X, Y, D, where X and Y are the center coordinates and D is the diameter.) and 4 (Area of the main subject is given as a rectangle, X, Y, W, H, where X and Y are the center coordinates, W is the width or the rectangle and H is the height of the rectangle.).

CMNT_CUSTOMRENDERED

[228] Use of special processing on image data, such as rendering geared toward output. When special processing is performed, the reader is expected to disable or minimize any further processing. Data type: SHORT; Count: 1; Possible Values: 0 (Normal process), 1 (Custom process), Other (Reserved). Default: 0;

CMNT_EXPOSUREMODE

[229] Exposure mode set when the image was shot. In auto-bracketing mode the camera shoots a series of frames of the same scene at different exposure settings. Tag: 41986; Data type: SHORT; Count: 1; Possible values are: 0 (Auto exposure), 1 (Manual exposure), 2 (Auto-bracket), Other (Reserved); Default: none.

CMNT_WHITEBALANCE

[230] White balance mode set when the image was shot. Data type: SHORT; Count: 1; Possible values are: 0 (Auto white balance), 1 (Manual white balance), Other (Reserved); Default: none.

CMNT_DIGITALZOOMRATIO

[231] Digital zoom ratio set when the image was shot. If the numerator of the recorded value is 0, the digital zoom was not used. Data type: RATIONAL; Count: 1; Default: none.

CMNT_FOCALLENGTHIN35MMFILM

[232] Equivalent focal length, assuming a 35mm film camera, in mm. A value of 0 means the focal length is unknown. Note that this comment is different from the CMNT_FOCALLENGTH comment. Data type: SHORT; Count: 1; Default: none.

CMNT_SCENECAPTURETYPE

[233] Type of scene that was shot. It can also be used to record the mode in which the image was shot. Note that this differs from the CMNT_SCENETYPE comment. Data type: SHORT; Count: 1; Possible values are: 0 (Standard), 1 (Landscape), 2 (Portrait), 3 (Night scene), Other (Reserved); Default: 0.

CMNT_GAINCONTROL

[234] Degree of overall image gain adjustment. Data type: SHORT; Count: 1; Possible values are: 0 (None), 1 (Low gain up), 2 (High gain up), 3 (Low gain down), 4 (High gain down), Other (Reserved); Default: none.

CMNT_CONTRAST

[235] Direction of contrast processing applied by the camera when the image was shot. Data type: SHORT; Count: 1; Possible values are: 0 (Normal), 1 (Soft), 2 (Hard), Other (Reserved); Default: 0.

CMNT_SATURATION

[236] Direction of saturation processing applied by the camera when the image was shot. Data type: SHORT; Count: 1; Possible values are: 0 (Normal), 1 (Low saturation), 2 (High saturation), Other (Reserved); Default: 0.

CMNT_SHARPNESS

[237] Direction of sharpness processing applied by the camera when the image was shot. Data type: SHORT; Count: 1; Possible values are: 0 (Normal), 1 (Soft), 2 (Hard), Other (Reserved); Default: 0.

CMNT_DEVICESETTINGDESCRIPTION

[238] Information on the picture-taking conditions of a particular camera model. Used only to indicate the picture-taking conditions in the reader. Data type: UNDEFINED; Count: Any; The data is recorded in Unicode using SHORT fro the number of display rows and columns and UNDEFINED for the camera settings. The Unicode (UCS 2) string including Signature is NULL terminated. The specifics of the Unicode string are as given in ISO/IEC 10464-1. Default: none.

CMNT_SUBJECTDISTANCERANGE

[239] Distance to the subject. Data type: SHORT; Count: 1; Possible values are: 0 (Unknown), 1 (Macro), 2 (Close view), 3 (Distant view), Other (Reserved); Default: none.

CMNT_SZIMAGEUNIQUEID

[240] Identifier assigned uniquely to each image. It is recorded as an ASCII string equivalent to hexadecimal notation and 128-bit fixed length. Tag: 42016; Data type: ASCII; Count: 33; Default: none

CMNT_GAMMA

[246] Indicates the value of coefficient gamma. The formula of transfer function used for image reproduction is expressed as follows: (Reproduced value) = (Input value) ^ (gamma). (The Reproduced and Input values are normalized to be between 0 and 1). The gamma must be positive. Tag: 42240; Data Type: RATIONAL; Count: 1; Default: none.

Exif GPS comments. Exif files can contain the following GPS (Global Positioning System) comments:

Value

Meaning

CMNT_GPSVERSIONID

[41] Version number of the GPS image file directory (IFD). The current version is 2.0.0.0. This comment must be included when any GPS comments are used. Unlike the CMNT_EXIFVERSION comment, this comment is written in bytes. A version written as 2.0.0.0 is actually 0x02000000 when coded. Data type: BYTE. Length: 4.

CMNT_GPSLATITUDEREF

[42] North or south latitude. Possible values are "N" for north and "S" for south. Data type: ASCII. Length: 2.

CMNT_GPSLATITUDE

[43] Latitude, expressed as three RATIONAL values. When expressed in degrees, minutes, and seconds, latitude is written as dd/1,mm/1,ss/1. If degrees and minutes are used as the units, and minutes are written with fractions to two decimal places, then latitude is expressed as dd/1,mmmm/100,0/1. Data type: RATIONAL. Length: 3.

CMNT_GPSLONGITUDEREF

[44] East or west longitude. Possible values are "E" for east and "W" for west. Data type: ASCII. Length: 2.

CMNT_GPSLONGITUDE

[45] The longitude, expressed as three RATIONAL values. When expressed in degrees, minutes and seconds, longitude is written as ddd/1,mm/1,ss/1. If degrees and minutes are used as the units, and minutes are written with fractions to two decimal places, then longitude is expressed as dd/1,mmmm/100,0/1. Data type: RATIONAL. Length: 3.

CMNT_GPSALTITUDEREF

[46] Reference altitude. In the current version, sea level is used as the reference, which must be zero. The reference unit is meters. Data type: BYTE. Length: 1.

CMNT_GPSALTITUDE

[47] Altitude, in meters, relative to the reference altitude. Data type: RATIONAL. Length: 1.

CMNT_GPSTIMESTAMP

[48] Time stamp in UTC (Coordinated Universal Time) time. The time is expressed as three RATIONAL values, for hours, minutes, and seconds. Data type: RATIONAL. Length: 3.

CMNT_GPSSATELLITES

[49] GPS satellites used for measurement. The coding format is not stipulated. This comment can be used to code information such as the number of satellites, the satellite number, the satellite's angle of elevation, its azimuth, and its SNR. If the GPS receiver cannot make a measurement, this comment is NULL. Data type: ASCII. Length: variable.

CMNT_GPSSTATUS

[50] Status of the GPS receiver at when the image is recorded. Possible values are "A" when measurement in progress and "V" when measurement is interrupted. Data type: ASCII. Length: 2.

CMNT_GPSMEASUREMODE

[51] GPS measurement mode. A value of "2" denotes two-dimensional measurement, and "3" denotes three-dimensional measurement. Data type: ASCII. Length: 2.

CMNT_GPSDOP

[52] DOP (data precision) value. This comment is an HDOP value during two-dimensional measurement and a PDOP value during three-dimensional measurement. Data type: RATIONAL. Length: 1.

CMNT_GPSSPEEDREF

[53] Unit for measuring speed. Possible values are "K" for kilometers, "M" for miles, and "N" for knots. Data type: ASCII. Length: 2.

CMNT_GPSSPEED

[54] Speed of the GPS receiver. Data type: RATIONAL. Length: 1.

CMNT_GPSTRACKREF

[55] Reference for direction of movement. Possible values are "T" for a true direction and "M" for a magnetic. Data type: ASCII. Length: 2

CMNT_GPSTRACK

[56] Direction of GPS receiver movement. The range of values is 0.00 to 359.00. Data type: RATIONAL. Length: 1.

CMNT_GPSIMGDIRECTIONREF

[57] Reference for the direction of photography in the recorded image. Possible values are "T" for a true direction and "M" for a magnetic. Data type: ASCII. Length: 2.

CMNT_GPSIMGDIRECTION

[58] Direction of photography in the recorded image. The range of values is 0.00 to 359.00. Data type: RATIONAL. Length: 1.

CMNT_GPSMAPDATUM

[59] Geodetic survey data used by the receiver. If the geodetic survey data is restricted to Japan, this tag value is "TOKYO" or "WGS-84". Data type: ASCII. Length: variable.

CMNT_GPSDESTLATITUDEREF

[60] North or south latitude for the destination point. Possible values are "N" for north and "S" for south. Data type: ASCII. Length: 2.

CMNT_GPSDESTLATITUDE

[61] Latitude of the destination point. The latitude is expressed as three RATIONAL values, indicating degrees, minutes and seconds. Data type: RATIONAL. Length: 3.

CMNT_GPSDESTLONGITUDEREF

East or west longitude for the destination point. Possible values are "E" for east and "W" for west. Data type: ASCII. Length: 2.

CMNT_GPSDESTLONGITUDE

[63] Longitude of the destination point. The longitude is expressed as three RATIONAL values, indicating degrees, minutes and seconds. Data type: RATIONAL. Length: 3.

CMNT_GPSDESTBEARINGREF

[64] Reference for the bearing to the destination point. Possible values are "T" for a true direction and "M" for a magnetic. Data type: ASCII. Length: 2.

CMNT_GPSDESTBEARING

[65] Bearing to the destination point. The range of values is 0.00 to 359.00. Data type: RATIONAL. Length: 1.

CMNT_GPSDESTDISTANCEREF

[66] Unit for measuring distance to the destination point. Possible values are "K" for kilometers, "M" for miles, and "N" for nautical miles. Data type: ASCII. Length: 2.

CMNT_GPSDESTDISTANCE

[67] Distance to the destination point. Data type: RATIONAL. Length: 1.

CMNT_GPSPROCESSINGMETHOD

Processing method. Data type: Byte. Length: Any.

CMNT_GPSAREAINFORMATION

Area. Data type: Byte. Length: Any.

CMNT_GPSDATESTAMP

Date. Data type: SZ. Length: 11.

CMNT_GPSDIFFERENTIAL

Differential. Data type: Short. Length: 1.

For more information about file comments, refer to:

LFileSettings::SetComment

LFileSettings::GetComment

LFile::ReadComment

Help Version 20.0.2018.6.22
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help