Table of Contents

Struct IptcKey

Namespace
Egami.Metadata
Assembly
Egami.dll

An IPTC-IIM dataset: its record and dataset numbers, as "2:25" for keywords. The named keys cover the datasets news, stock and photo software read and write; any other pair works too.

public readonly record struct IptcKey : IEquatable<IptcKey>
Implements
Inherited Members

Examples

using Raster photo = Raster.Load("sideways.jpg");
IptcData iptc = photo.Metadata.Iptc ?? new IptcData();
iptc.Headline = "Harbour at dawn";
iptc.Keywords = [.. iptc.Keywords, "harbour", "Bergen"];

// Any dataset by its key; Add appends to the repeatable ones.
iptc.Set(IptcKey.City, "Bergen");

// Text that is not ASCII sets the coded character set (1:90) to UTF-8, so other programs read it right.
iptc.Caption = "Fishing boats at Bryggen, Bergen — first light";
foreach (IptcEntry entry in iptc.Entries)
{
    Console.WriteLine($"{entry.Key} {entry.AsString()}");
}

// JPEG saves it in its Photoshop resource block (APP13), with the digest Photoshop and Lightroom check.
photo.Metadata.Iptc = iptc;
photo.Save("captioned.jpg");

Constructors

IptcKey(byte, byte)

An IPTC-IIM dataset: its record and dataset numbers, as "2:25" for keywords. The named keys cover the datasets news, stock and photo software read and write; any other pair works too.

public IptcKey(byte Record, byte Dataset)

Parameters

Record byte

The record number: 1 for the envelope, 2 for the application record that holds the descriptive text.

Dataset byte

The dataset number within the record.

Examples

using Raster photo = Raster.Load("sideways.jpg");
IptcData iptc = photo.Metadata.Iptc ?? new IptcData();
iptc.Headline = "Harbour at dawn";
iptc.Keywords = [.. iptc.Keywords, "harbour", "Bergen"];

// Any dataset by its key; Add appends to the repeatable ones.
iptc.Set(IptcKey.City, "Bergen");

// Text that is not ASCII sets the coded character set (1:90) to UTF-8, so other programs read it right.
iptc.Caption = "Fishing boats at Bryggen, Bergen — first light";
foreach (IptcEntry entry in iptc.Entries)
{
    Console.WriteLine($"{entry.Key} {entry.AsString()}");
}

// JPEG saves it in its Photoshop resource block (APP13), with the digest Photoshop and Lightroom check.
photo.Metadata.Iptc = iptc;
photo.Save("captioned.jpg");

Fields

Byline

A creator's name; repeatable (2:80, up to 32 bytes each).

public static readonly IptcKey Byline

Field Value

IptcKey

BylineTitle

A creator's job title; repeatable (2:85, up to 32 bytes each).

public static readonly IptcKey BylineTitle

Field Value

IptcKey

Caption

The caption or description (2:120, up to 2,000 bytes).

public static readonly IptcKey Caption

Field Value

IptcKey

CaptionWriter

Who wrote the caption; repeatable (2:122, up to 32 bytes each).

public static readonly IptcKey CaptionWriter

Field Value

IptcKey

Category

The subject category, a three-letter code (2:15, up to 3 bytes; deprecated by IPTC but still written).

public static readonly IptcKey Category

Field Value

IptcKey

City

The city shown (2:90, up to 32 bytes).

public static readonly IptcKey City

Field Value

IptcKey

CodedCharacterSet

The coded character set (1:90); ESC % G means UTF-8. Egami writes it when a value is not plain ASCII.

public static readonly IptcKey CodedCharacterSet

Field Value

IptcKey

CopyrightNotice

The copyright notice (2:116, up to 128 bytes).

public static readonly IptcKey CopyrightNotice

Field Value

IptcKey

Country

The country name (2:101, up to 64 bytes).

public static readonly IptcKey Country

Field Value

IptcKey

CountryCode

The ISO 3166 country code, such as "NOR" (2:100, up to 3 bytes).

public static readonly IptcKey CountryCode

Field Value

IptcKey

Credit

The provider credited (2:110, up to 32 bytes).

public static readonly IptcKey Credit

Field Value

IptcKey

DateCreated

When the content was created, as CCYYMMDD (2:55, 8 bytes).

public static readonly IptcKey DateCreated

Field Value

IptcKey

Headline

A headline (2:105, up to 256 bytes).

public static readonly IptcKey Headline

Field Value

IptcKey

Keywords

A keyword; repeatable (2:25, up to 64 bytes each).

public static readonly IptcKey Keywords

Field Value

IptcKey

ObjectName

A short name for the object, such as a slug or file name (2:5, up to 64 bytes).

public static readonly IptcKey ObjectName

Field Value

IptcKey

OriginalTransmissionReference

The original transmission reference, a job identifier (2:103, up to 32 bytes).

public static readonly IptcKey OriginalTransmissionReference

Field Value

IptcKey

ProvinceState

The province or state (2:95, up to 32 bytes).

public static readonly IptcKey ProvinceState

Field Value

IptcKey

Source

The original owner of the content (2:115, up to 32 bytes).

public static readonly IptcKey Source

Field Value

IptcKey

SpecialInstructions

Instructions for editors, such as embargoes (2:40, up to 256 bytes).

public static readonly IptcKey SpecialInstructions

Field Value

IptcKey

SubLocation

The place within the city (2:92, up to 32 bytes).

public static readonly IptcKey SubLocation

Field Value

IptcKey

SupplementalCategory

A supplemental category; repeatable (2:20, up to 32 bytes each).

public static readonly IptcKey SupplementalCategory

Field Value

IptcKey

TimeCreated

The time the content was created, as HHMMSS±HHMM (2:60, 11 bytes).

public static readonly IptcKey TimeCreated

Field Value

IptcKey

Urgency

The editorial urgency, "1" (most urgent) to "8" (2:10, 1 byte).

public static readonly IptcKey Urgency

Field Value

IptcKey

Properties

Dataset

The dataset number within the record.

public byte Dataset { get; init; }

Property Value

byte

IsRepeatable

Gets whether the dataset may appear more than once (keywords, bylines and the other lists); unknown datasets may.

public bool IsRepeatable { get; }

Property Value

bool

MaxLength

Gets the longest value the IIM 4.2 specification allows for this dataset, in bytes, or null when Egami sets no cap.

public int? MaxLength { get; }

Property Value

int?

Record

The record number: 1 for the envelope, 2 for the application record that holds the descriptive text.

public byte Record { get; init; }

Property Value

byte

Methods

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.