When reading or updating Exif comments, you must specify the comment type using the constants below.
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.
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.
The following file formats can also support Tiff and Exif comments:
Value | Description |
---|---|
RasterCommentMetadataType.Artist | Person who created the image. |
RasterCommentMetadataType.Copyright | Copyright notice. |
RasterCommentMetadataType.DateTime | Date and time (YYYY:MM:DD HH:MM:SS). The field length is 20, counting the NULL terminator. |
RasterCommentMetadataType.Description | Description of the image. |
RasterCommentMetadataType.HostComputer | Computer and operating system in use. |
RasterCommentMetadataType.Make | Manufacturer of the equipment used to create the image. |
RasterCommentMetadataType.Model | Model name and number of the equipment. |
RasterCommentMetadataType.NameOfDocument | Name of the document from which the image was scanned. |
RasterCommentMetadataType.NameOfPage | Page name from which the image was scanned. |
RasterCommentMetadataType.Software | Name and version of software package used to create the image. |
Exif files can contain the following general comments. Each comment field is constrained by its Exif data type.
Value | Description |
---|---|
RasterCommentMetadataType.ExifVersion | Exif version. LEADTOOLS always writes this value as 0110, meaning version 1.1. Data type: RasterCommentMetadataDataType.Byte. Length: 4. |
RasterCommentMetadataType.SubsecTime | Decimal extension for seconds that are specified in the .DateTime field. Data type: RasterCommentMetadataDataType.Ascii. Length: variable. |
RasterCommentMetadataType.DateTimeOriginal | 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: |
RasterCommentMetadataDataType.Ascii. Length: 20. | |
RasterCommentMetadataType.SubsecTimeOriginal | Decimal extension for seconds that are specified in the RasterCommentMetadataType.DateTimeOriginal field. Data type: RasterCommentMetadataDataType.Ascii. Length: |
variable. | |
RasterCommentMetadataType.DateTimeDigitized | 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: RasterCommentMetadataDataType.Ascii. |
Length: 20. | |
RasterCommentMetadataType.SubsecTimeDigitized | Decimal extension for seconds that are specified in the RasterCommentMetadataType.DateTimeDigitized field. Data type: RasterCommentMetadataDataType.Ascii. Length: |
variable. | |
RasterCommentMetadataType.ShutterSpeedValue | Shutter speed. The unit of measure is APEX. Data type: RasterCommentMetadataDataType.Rational. Length: 1. |
RasterCommentMetadataType.Aperture | Aperture value. This is the ratio of lens aperture for the focal length. The unit of measure is APEX. Data type: RasterCommentMetadataDataType.URational. Length: 1. |
RasterCommentMetadataType.Brightness | Brightness value. Data type: RasterCommentMetadataDataType.Rational. Length: 1. |
RasterCommentMetadataType.ExposureBias | Exposure bias. This is the value for correcting a biased exposure. The unit of measure is APEX. Data type: RasterCommentMetadataDataType.Rational. Length: 1. |
RasterCommentMetadataType.MaxAperture | Minimum lens f-number. Data type: RasterCommentMetadataDataType.URational. Length: 1. |
RasterCommentMetadataType.SubjectDistance | Distance from lens to subject (in meters). Data type: RasterCommentMetadataDataType.URational. Length: 1. |
RasterCommentMetadataType.MeteringMode | 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: RasterCommentMetadataDataType.Short. Length: 1. | |
RasterCommentMetadataType.LightSource | 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: RasterCommentMetadataDataType.Short. Length: 1. | |
RasterCommentMetadataType.Flash | Flash On/Off. Possible values are 1 for on or 0 for off. Data type: RasterCommentMetadataDataType.Short. Length: 1. |
RasterCommentMetadataType.FocalLength | Focal length, measured in millimeters. Data type: RasterCommentMetadataDataType.URational. Length: 1. |
RasterCommentMetadataType.ExposureTime | Exposure time, expressed as a fraction of a second. Data type: RasterCommentMetadataDataType.Length: 1. |
RasterCommentMetadataType.FNumber | The actual lens F stop (ratio of lens aperture to focal length). Data type: RasterCommentMetadataDataType.URational. Length: 1. |
RasterCommentMetadataType.MakerNote | Maker note. Data type: RasterCommentMetadataDataType.Byte. The creator of the file determines the data format. |
RasterCommentMetadataType.UserComment | User comment. Data type: RasterCommentMetadataDataType.Byte. 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 | |
RasterCommentMetadataType.SupportedFlashPixVersion | Supported FlashPix version (Exif 2.0). LEADTOOLS always writes 0100 here. Data type: RasterCommentMetadataDataType.Byte. Length: 4 |
RasterCommentMetadataType.ColorSpace | Color space (Exif 2.0). Specifies whether the color is calibrated or not. LEADTOOLS always writes this value as 1. Data type: RasterCommentMetadataDataType.Short. Length: 1 Possible values are: |
1 = sRGB (PC monitor conditions) | |
0xFFFF = Uncalibrated | |
Other = reserved | |
RasterCommentMetadataType.ExposureProgram | 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 | |
RasterCommentMetadataType.SpectralSensitivity | 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: |
RasterCommentMetadataDataType.Ascii. Length: any | |
RasterCommentMetadataType.IsoSpeedRatings | ISO speed ratings (Exif) - the ISO speed and the ISO Latitude of the camera or input device as specified in ISO 12232 Data type: RasterCommentMetadataDataType.Short. Length: 1 |
RasterCommentMetadataType.OptoelectricCoefficient | 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: |
RasterCommentMetadataDataType.Byte. Length: ANY. This is an array of m rows and n columns. | |
RasterCommentMetadataType.RelatedSoundFile | 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: RasterCommentMetadataDataType.Ascii. |
Length: 13. | |
RasterCommentMetadataType.FlashEnergy | Flash energy (Exif) - the strobe energy at the time the image is captured, as measured in Beam Candle Power Seconds (BPCS) Data type: RasterCommentMetadataDataType.URational. Length: 1 |
RasterCommentMetadataType.SpatialFrequencyResponse | 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: |
RasterCommentMetadataDataType.Byte. Length: ANY This is an array of m rows and n columns. | |
RasterCommentMetadataType.FocalPlaneXResolution | 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 |
RasterCommentMetadataType.FocalPlaneResolutionUnit. If RasterCommentMetadataType.FocalPlaneResolutionUnit is not set, the unit will be considered to be 2 ("dots per inch"). | |
Data type: RasterCommentMetadataDataType.URational. Length: 1 | |
RasterCommentMetadataType.FocalPlaneYResolution | Focal plane Y Resolution (Exif) - the number of dots per resolution unit on the camera focal plane in the image width (Y) direction. The resolution unit is given by |
RasterCommentMetadataType.FocalPlaneResolutionUnit. If RasterCommentMetadataType.FocalPlaneResolutionUnit is not set, the unit will be considered to be 2 ("dots per inch"). | |
Data type: RasterCommentMetadataDataType.URational. Length: 1 | |
RasterCommentMetadataType.FocalPlaneResolutionUnit | Focal plane resolution unit (Exif). This is the resolution unit for the RasterCommentMetadataType.FocalPlaneXResolution and |
RasterCommentMetadataType.FocalPlaneYResolution | |
comments. Data type: RasterCommentMetadataDataType.Short. Length: 1. Possible values are: | |
2 = inch (RasterCommentMetadataType.FocalPlaneXResolution and RasterCommentMetadataType.FocalPlaneYResolution are expressed in dots per inch). | |
3 = cm (RasterCommentMetadataType.FocalPlaneXResolution and RasterCommentMetadataType.FocalPlaneYResolution are expressed in dots per cm). | |
RasterCommentMetadataType.SubjectLocation | 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 |
RasterCommentMetadataType.ExposureIndex | Exposure index (Exif) - the image sensor type on the camera or input device. Data type: SHORT. Length: 1 |
RasterCommentMetadataType.SensingMethod | 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 | |
RasterCommentMetadataType.FileSource | 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 | |
RasterCommentMetadataType.SceneType | 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: RasterCommentMetadataDataType.Byte. Length: 1 |
Possible values are: | |
1 = a directly photographed image | |
other = reserved | |
RasterCommentMetadataType.CfaPattern | 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: |
RasterCommentMetadataDataType.Byte. 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. | |
RasterCommentMetadataType.SubjectArea | 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.). | |
RasterCommentMetadataType.CustomRendered | 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; | |
RasterCommentMetadataType.ExposureMode | 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. | |
RasterCommentMetadataType.WhiteBalance | 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. |
RasterCommentMetadataType.DigitalZoomRatio | 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: RasterCommentMetadataDataType.URational; Count: 1; Default: none. |
RasterCommentMetadataType.FocalLengthin35MmFilm | 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 RasterCommentMetadataType.FocalLength comment. Data |
type: SHORT; Count: 1; Default: none. | |
RasterCommentMetadataType.SceneCaptureType | 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 RasterCommentMetadataType.SceneType comment. Data type: SHORT; Count: 1; Possible |
values are: 0 (Standard), 1 (Landscape), 2 (Portrait), 3 (Night scene), Other (Reserved); Default: 0. | |
RasterCommentMetadataType.GainControl | 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. |
RasterCommentMetadataType.Contrast | 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. |
RasterCommentMetadataType.Saturation | 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. |
RasterCommentMetadataType.Sharpness | 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. |
RasterCommentMetadataType.DeviceSettingDescription | Information on the picture-taking conditions of a particular camera model. Used only to indicate the picture-taking conditions in the reader. Data type: RasterCommentMetadataDataType.Byte; Count: Any; The |
data is recorded in Unicode using SHORT for the number of display rows and columns and RasterCommentMetadataDataType.Byte 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. | |
RasterCommentMetadataType.SubjectDistanceRange | 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. |
RasterCommentMetadataType.ImageUniqueId | 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: RasterCommentMetadataDataType.Ascii; Count: |
33; Default: none | |
RasterCommentMetadataType.Gamma | 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: RasterCommentMetadataDataType.Rational; Count: 1; Default: none. |
Exif files can contain the following GPS (Global Positioning System) comments:
Value | Meaning |
---|---|
RasterCommentMetadataType.GpsVersionId | 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 RasterCommentMetadataType.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. | |
RasterCommentMetadataType.GpsLatitudeRef | North or south latitude. Possible values are "N" for north and "S" for south. Data type: RasterCommentMetadataDataType.Ascii. Length: 2. |
RasterCommentMetadataType.GpsLatitude | Latitude, expressed as three RasterCommentMetadataDataType.URational 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: RasterCommentMetadataDataType.URational. Length: 3. | |
RasterCommentMetadataType.GpsLongitudeRef | East or west longitude. Possible values are "E" for east and "W" for west. Data type: RasterCommentMetadataDataType.Ascii. Length: 2. |
RasterCommentMetadataType.GpsLongitude | The longitude, expressed as three RasterCommentMetadataDataType.URational 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: RasterCommentMetadataDataType.URational. Length: 3. | |
RasterCommentMetadataType.GpsAltitudeRef | 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. |
RasterCommentMetadataType.GpsAltitude | Altitude, in meters, relative to the reference altitude. Data type: RasterCommentMetadataDataType.URational. Length: 1. |
RasterCommentMetadataType.GpsTimeStamp | Time stamp in UTC (Coordinated Universal Time) time. The time is expressed as three RasterCommentMetadataDataType.URational values, for hours, minutes, and seconds. Data type: |
RasterCommentMetadataDataType.URational. Length: 3. | |
RasterCommentMetadataType.GpsSatellites | 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: RasterCommentMetadataDataType.Ascii. Length: variable. | |
RasterCommentMetadataType.GpsStatus | 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: RasterCommentMetadataDataType.Ascii. |
Length: 2. | |
RasterCommentMetadataType.GpsMeasureMode | GPS measurement mode. A value of "2" denotes two-dimensional measurement, and "3" denotes three-dimensional measurement. Data type: RasterCommentMetadataDataType.Ascii. Length: 2. |
RasterCommentMetadataType.GpsDop | DOP (data precision) value. This comment is an HDOP value during two-dimensional measurement and a PDOP value during three-dimensional measurement. Data type: RasterCommentMetadataDataType.URational. |
Length: 1. | |
RasterCommentMetadataType.GpsSpeedRef | Unit for measuring speed. Possible values are "K" for kilometers, "M" for miles, and "N" for knots. Data type: RasterCommentMetadataDataType.Ascii. Length: 2. |
RasterCommentMetadataType.GpsSpeed | Speed of the GPS receiver. Data type: RasterCommentMetadataDataType.URational. Length: 1. |
RasterCommentMetadataType.GpsTrackRef | Reference for direction of movement. Possible values are "T" for a true direction and "M" for a magnetic. Data type: RasterCommentMetadataDataType.Ascii. Length: 2 |
RasterCommentMetadataType.GpsTrack | Direction of GPS receiver movement. The range of values is 0.00 to 359.00. Data type: RasterCommentMetadataDataType.URational. Length: 1. |
RasterCommentMetadataType.GpsImageDirectionRef | 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: RasterCommentMetadataDataType.Ascii. Length: 2. |
RasterCommentMetadataType.GpsImageDirection | Direction of photography in the recorded image. The range of values is 0.00 to 359.00. Data type: RasterCommentMetadataDataType.URational. Length: 1. |
RasterCommentMetadataType.GpsMapDatum | 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: RasterCommentMetadataDataType.Ascii. Length: variable. |
RasterCommentMetadataType.GpsDestLatitudeRef | North or south latitude for the destination point. Possible values are "N" for north and "S" for south. Data type: RasterCommentMetadataDataType.Ascii. Length: 2. |
RasterCommentMetadataType.GpsDestLatitude | Latitude of the destination point. The latitude is expressed as three RasterCommentMetadataDataType.URationalvalues, indicating degrees, minutes and seconds. Data type: |
RasterCommentMetadataDataType.URational. Length: 3. | |
RasterCommentMetadataType.GpsDestLongitudeRef | East or west longitude for the destination point. Possible values are "E" for east and "W" for west. Data type: RasterCommentMetadataDataType.Ascii. Length: 2. |
RasterCommentMetadataType.GpsDestLongitude | Longitude of the destination point. The longitude is expressed as three RasterCommentMetadataDataType.URationalvalues, indicating degrees, minutes and seconds. Data type: |
RasterCommentMetadataDataType.URational. Length: 3. | |
RasterCommentMetadataType.GpsDestBearingRef | Reference for the bearing to the destination point. Possible values are "T" for a true direction and "M" for a magnetic. Data type: RasterCommentMetadataDataType.Ascii. Length: 2. |
RasterCommentMetadataType.GpsDestBearing | Bearing to the destination point. The range of values is 0.00 to 359.00. Data type: RasterCommentMetadataDataType.URational. Length: 1. |
RasterCommentMetadataType.GpsDestDistanceRef | Unit for measuring distance to the destination point. Possible values are "K" for kilometers, "M" for miles, and "N" for nautical miles. Data type: RasterCommentMetadataDataType.Ascii. Length: 2. |
RasterCommentMetadataType.GpsDestDistance | Distance to the destination point. Data type: RasterCommentMetadataDataType.URational. Length: 1. |
RasterCommentMetadataType.GpsProcessingMethod | Processing method. Data type: Byte. Length: Any. |
RasterCommentMetadataType.GpsAreaInformation | Area. Data type: Byte. Length: Any. |
RasterCommentMetadataType.GpsDateStamp | Date. Data type: SZ. Length: 11. |
RasterCommentMetadataType.GpsDifferential | Differential. Data type: Short. Length: 1. |
For more information about file comments, refer to RasterCodecs.ReadComment and RasterCodecs.WriteComment.