Struct ExifKey
An EXIF tag: its number and the IFD it lives in. The named keys cover the tags most programs read and write.
public readonly record struct ExifKey : IEquatable<ExifKey>
- Implements
- Inherited Members
Examples
if (image.Metadata.Exif is ExifData exif)
{
Console.WriteLine($"{exif.CameraMake} {exif.CameraModel}, {exif.DateTaken}, {exif.Location}");
if (exif.TryGet(ExifKey.ExposureTime, out ExifEntry? exposure))
{
Console.WriteLine($"1/{1 / exposure.AsDouble():0} s");
}
exif.Set(ExifKey.Copyright, "© 2026 Example");
exif.Remove(ExifKey.GpsLatitude);
}
Constructors
ExifKey(ushort, ExifIfd)
An EXIF tag: its number and the IFD it lives in. The named keys cover the tags most programs read and write.
public ExifKey(ushort Tag, ExifIfd Ifd)
Parameters
Examples
if (image.Metadata.Exif is ExifData exif)
{
Console.WriteLine($"{exif.CameraMake} {exif.CameraModel}, {exif.DateTaken}, {exif.Location}");
if (exif.TryGet(ExifKey.ExposureTime, out ExifEntry? exposure))
{
Console.WriteLine($"1/{1 / exposure.AsDouble():0} s");
}
exif.Set(ExifKey.Copyright, "© 2026 Example");
exif.Remove(ExifKey.GpsLatitude);
}
Fields
Artist
Who made the image (IFD0 0x013B).
public static readonly ExifKey Artist
Field Value
ColorSpace
The color space: 1 sRGB, 0xFFFF uncalibrated (EXIF 0xA001).
public static readonly ExifKey ColorSpace
Field Value
Copyright
The copyright notice (IFD0 0x8298).
public static readonly ExifKey Copyright
Field Value
DateTime
When the file was last changed, as "YYYY:MM:DD HH:MM:SS" (IFD0 0x0132).
public static readonly ExifKey DateTime
Field Value
DateTimeDigitized
When the photo was stored digitally (EXIF 0x9004).
public static readonly ExifKey DateTimeDigitized
Field Value
DateTimeOriginal
When the photo was taken, as "YYYY:MM:DD HH:MM:SS" (EXIF 0x9003).
public static readonly ExifKey DateTimeOriginal
Field Value
ExifInfo
The pointer to the EXIF sub-IFD (IFD0 0x8769). Removing it removes the whole EXIF IFD, interoperability IFD included.
public static readonly ExifKey ExifInfo
Field Value
ExifVersion
The EXIF version, four ASCII digits such as "0232" (EXIF 0x9000).
public static readonly ExifKey ExifVersion
Field Value
ExposureBias
The exposure bias in EV (EXIF 0x9204).
public static readonly ExifKey ExposureBias
Field Value
ExposureProgram
The exposure program (EXIF 0x8822).
public static readonly ExifKey ExposureProgram
Field Value
ExposureTime
Exposure time in seconds (EXIF 0x829A).
public static readonly ExifKey ExposureTime
Field Value
FNumber
The f-number (EXIF 0x829D).
public static readonly ExifKey FNumber
Field Value
Flash
Whether and how the flash fired (EXIF 0x9209).
public static readonly ExifKey Flash
Field Value
FocalLength
The focal length in millimeters (EXIF 0x920A).
public static readonly ExifKey FocalLength
Field Value
FocalLengthIn35mmFilm
The focal length for a 35 mm camera (EXIF 0xA405).
public static readonly ExifKey FocalLengthIn35mmFilm
Field Value
GpsAltitude
Meters, as a rational (GPS 0x0006).
public static readonly ExifKey GpsAltitude
Field Value
GpsAltitudeRef
0 above sea level, 1 below (GPS 0x0005).
public static readonly ExifKey GpsAltitudeRef
Field Value
GpsAreaInformation
The name of the area, with an 8-byte character-code prefix (GPS 0x001C).
public static readonly ExifKey GpsAreaInformation
Field Value
GpsInfo
The pointer to the GPS sub-IFD (IFD0 0x8825). Removing it removes the whole GPS IFD.
public static readonly ExifKey GpsInfo
Field Value
GpsLatitude
Degrees, minutes and seconds, as three rationals (GPS 0x0002).
public static readonly ExifKey GpsLatitude
Field Value
GpsLatitudeRef
"N" or "S" (GPS 0x0001).
public static readonly ExifKey GpsLatitudeRef
Field Value
GpsLongitude
Degrees, minutes and seconds, as three rationals (GPS 0x0004).
public static readonly ExifKey GpsLongitude
Field Value
GpsLongitudeRef
"E" or "W" (GPS 0x0003).
public static readonly ExifKey GpsLongitudeRef
Field Value
GpsProcessingMethod
How the position was found, such as "GPS" or "NETWORK", with an 8-byte character-code prefix (GPS 0x001B).
public static readonly ExifKey GpsProcessingMethod
Field Value
ImageDescription
A title or description of the image (IFD0 0x010E).
public static readonly ExifKey ImageDescription
Field Value
IsoSpeed
The ISO speed (EXIF 0x8827, PhotographicSensitivity).
public static readonly ExifKey IsoSpeed
Field Value
LensMake
The lens maker (EXIF 0xA433).
public static readonly ExifKey LensMake
Field Value
LensModel
The lens model (EXIF 0xA434).
public static readonly ExifKey LensModel
Field Value
Make
The camera maker (IFD0 0x010F).
public static readonly ExifKey Make
Field Value
MakerNote
The camera maker's own data, kept as an opaque block (EXIF 0x927C).
public static readonly ExifKey MakerNote
Field Value
MeteringMode
The metering mode (EXIF 0x9207).
public static readonly ExifKey MeteringMode
Field Value
Model
The camera model (IFD0 0x0110).
public static readonly ExifKey Model
Field Value
OffsetTimeOriginal
The UTC offset of DateTimeOriginal, such as "+02:00" (EXIF 0x9011).
public static readonly ExifKey OffsetTimeOriginal
Field Value
Orientation
How the image is turned (IFD0 0x0112); see ImageOrientation.
public static readonly ExifKey Orientation
Field Value
PixelXDimension
The image width the camera recorded (EXIF 0xA002).
public static readonly ExifKey PixelXDimension
Field Value
PixelYDimension
The image height the camera recorded (EXIF 0xA003).
public static readonly ExifKey PixelYDimension
Field Value
ResolutionUnit
The unit of the resolutions: 2 inches, 3 centimeters (IFD0 0x0128).
public static readonly ExifKey ResolutionUnit
Field Value
Software
The software that made or last edited the file (IFD0 0x0131).
public static readonly ExifKey Software
Field Value
UserComment
A comment, with an 8-byte character-code prefix (EXIF 0x9286).
public static readonly ExifKey UserComment
Field Value
XPAuthor
The authors Windows Explorer shows, semicolon separated, as UTF-16 (IFD0 0x9C9D, XPAuthor).
public static readonly ExifKey XPAuthor
Field Value
XPComment
The comments Windows Explorer shows, as UTF-16 (IFD0 0x9C9C, XPComment).
public static readonly ExifKey XPComment
Field Value
XPKeywords
The tags Windows Explorer shows, semicolon separated, as UTF-16 (IFD0 0x9C9E, XPKeywords).
public static readonly ExifKey XPKeywords
Field Value
XPSubject
The subject Windows Explorer shows, as UTF-16 (IFD0 0x9C9F, XPSubject).
public static readonly ExifKey XPSubject
Field Value
XPTitle
The title Windows Explorer shows, as UTF-16 (IFD0 0x9C9B, XPTitle).
public static readonly ExifKey XPTitle
Field Value
XResolution
Horizontal resolution (IFD0 0x011A).
public static readonly ExifKey XResolution
Field Value
YResolution
Vertical resolution (IFD0 0x011B).
public static readonly ExifKey YResolution
Field Value
Properties
Ifd
The IFD the tag is in.
public ExifIfd Ifd { get; init; }
Property Value
Tag
The tag number.
public ushort Tag { get; init; }
Property Value
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.