Table of Contents

Struct ExifKey

Namespace
Egami.Metadata
Assembly
Egami.dll

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

Tag ushort

The tag number.

Ifd ExifIfd

The IFD the tag is in.

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

ExifKey

ColorSpace

The color space: 1 sRGB, 0xFFFF uncalibrated (EXIF 0xA001).

public static readonly ExifKey ColorSpace

Field Value

ExifKey

The copyright notice (IFD0 0x8298).

public static readonly ExifKey Copyright

Field Value

ExifKey

DateTime

When the file was last changed, as "YYYY:MM:DD HH:MM:SS" (IFD0 0x0132).

public static readonly ExifKey DateTime

Field Value

ExifKey

DateTimeDigitized

When the photo was stored digitally (EXIF 0x9004).

public static readonly ExifKey DateTimeDigitized

Field Value

ExifKey

DateTimeOriginal

When the photo was taken, as "YYYY:MM:DD HH:MM:SS" (EXIF 0x9003).

public static readonly ExifKey DateTimeOriginal

Field Value

ExifKey

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

ExifKey

ExifVersion

The EXIF version, four ASCII digits such as "0232" (EXIF 0x9000).

public static readonly ExifKey ExifVersion

Field Value

ExifKey

ExposureBias

The exposure bias in EV (EXIF 0x9204).

public static readonly ExifKey ExposureBias

Field Value

ExifKey

ExposureProgram

The exposure program (EXIF 0x8822).

public static readonly ExifKey ExposureProgram

Field Value

ExifKey

ExposureTime

Exposure time in seconds (EXIF 0x829A).

public static readonly ExifKey ExposureTime

Field Value

ExifKey

FNumber

The f-number (EXIF 0x829D).

public static readonly ExifKey FNumber

Field Value

ExifKey

Flash

Whether and how the flash fired (EXIF 0x9209).

public static readonly ExifKey Flash

Field Value

ExifKey

FocalLength

The focal length in millimeters (EXIF 0x920A).

public static readonly ExifKey FocalLength

Field Value

ExifKey

FocalLengthIn35mmFilm

The focal length for a 35 mm camera (EXIF 0xA405).

public static readonly ExifKey FocalLengthIn35mmFilm

Field Value

ExifKey

GpsAltitude

Meters, as a rational (GPS 0x0006).

public static readonly ExifKey GpsAltitude

Field Value

ExifKey

GpsAltitudeRef

0 above sea level, 1 below (GPS 0x0005).

public static readonly ExifKey GpsAltitudeRef

Field Value

ExifKey

GpsAreaInformation

The name of the area, with an 8-byte character-code prefix (GPS 0x001C).

public static readonly ExifKey GpsAreaInformation

Field Value

ExifKey

GpsInfo

The pointer to the GPS sub-IFD (IFD0 0x8825). Removing it removes the whole GPS IFD.

public static readonly ExifKey GpsInfo

Field Value

ExifKey

GpsLatitude

Degrees, minutes and seconds, as three rationals (GPS 0x0002).

public static readonly ExifKey GpsLatitude

Field Value

ExifKey

GpsLatitudeRef

"N" or "S" (GPS 0x0001).

public static readonly ExifKey GpsLatitudeRef

Field Value

ExifKey

GpsLongitude

Degrees, minutes and seconds, as three rationals (GPS 0x0004).

public static readonly ExifKey GpsLongitude

Field Value

ExifKey

GpsLongitudeRef

"E" or "W" (GPS 0x0003).

public static readonly ExifKey GpsLongitudeRef

Field Value

ExifKey

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

ExifKey

ImageDescription

A title or description of the image (IFD0 0x010E).

public static readonly ExifKey ImageDescription

Field Value

ExifKey

IsoSpeed

The ISO speed (EXIF 0x8827, PhotographicSensitivity).

public static readonly ExifKey IsoSpeed

Field Value

ExifKey

LensMake

The lens maker (EXIF 0xA433).

public static readonly ExifKey LensMake

Field Value

ExifKey

LensModel

The lens model (EXIF 0xA434).

public static readonly ExifKey LensModel

Field Value

ExifKey

Make

The camera maker (IFD0 0x010F).

public static readonly ExifKey Make

Field Value

ExifKey

MakerNote

The camera maker's own data, kept as an opaque block (EXIF 0x927C).

public static readonly ExifKey MakerNote

Field Value

ExifKey

MeteringMode

The metering mode (EXIF 0x9207).

public static readonly ExifKey MeteringMode

Field Value

ExifKey

Model

The camera model (IFD0 0x0110).

public static readonly ExifKey Model

Field Value

ExifKey

OffsetTimeOriginal

The UTC offset of DateTimeOriginal, such as "+02:00" (EXIF 0x9011).

public static readonly ExifKey OffsetTimeOriginal

Field Value

ExifKey

Orientation

How the image is turned (IFD0 0x0112); see ImageOrientation.

public static readonly ExifKey Orientation

Field Value

ExifKey

PixelXDimension

The image width the camera recorded (EXIF 0xA002).

public static readonly ExifKey PixelXDimension

Field Value

ExifKey

PixelYDimension

The image height the camera recorded (EXIF 0xA003).

public static readonly ExifKey PixelYDimension

Field Value

ExifKey

ResolutionUnit

The unit of the resolutions: 2 inches, 3 centimeters (IFD0 0x0128).

public static readonly ExifKey ResolutionUnit

Field Value

ExifKey

Software

The software that made or last edited the file (IFD0 0x0131).

public static readonly ExifKey Software

Field Value

ExifKey

UserComment

A comment, with an 8-byte character-code prefix (EXIF 0x9286).

public static readonly ExifKey UserComment

Field Value

ExifKey

XPAuthor

The authors Windows Explorer shows, semicolon separated, as UTF-16 (IFD0 0x9C9D, XPAuthor).

public static readonly ExifKey XPAuthor

Field Value

ExifKey

XPComment

The comments Windows Explorer shows, as UTF-16 (IFD0 0x9C9C, XPComment).

public static readonly ExifKey XPComment

Field Value

ExifKey

XPKeywords

The tags Windows Explorer shows, semicolon separated, as UTF-16 (IFD0 0x9C9E, XPKeywords).

public static readonly ExifKey XPKeywords

Field Value

ExifKey

XPSubject

The subject Windows Explorer shows, as UTF-16 (IFD0 0x9C9F, XPSubject).

public static readonly ExifKey XPSubject

Field Value

ExifKey

XPTitle

The title Windows Explorer shows, as UTF-16 (IFD0 0x9C9B, XPTitle).

public static readonly ExifKey XPTitle

Field Value

ExifKey

XResolution

Horizontal resolution (IFD0 0x011A).

public static readonly ExifKey XResolution

Field Value

ExifKey

YResolution

Vertical resolution (IFD0 0x011B).

public static readonly ExifKey YResolution

Field Value

ExifKey

Properties

Ifd

The IFD the tag is in.

public ExifIfd Ifd { get; init; }

Property Value

ExifIfd

Tag

The tag number.

public ushort Tag { get; init; }

Property Value

ushort

Methods

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.