Table of Contents

Class TextEntry

Namespace
Egami.Metadata
Assembly
Egami.dll

A text entry, such as a PNG text chunk or a GIF comment.

public sealed record TextEntry : IEquatable<TextEntry>
Inheritance
TextEntry
Implements
Inherited Members

Examples

RasterMetadata metadata = image.Metadata;
metadata.Text.Add(new TextEntry("Comment", "Made with Egami"));
metadata.Resolution = new Resolution(300, 300, ResolutionUnit.PerInch);
Console.WriteLine($"{metadata.ColorSpace}, ICC {metadata.IccProfile.Length} bytes, XMP {metadata.Xmp.Length} bytes");
foreach (EgamiDiagnostic warning in metadata.Warnings)
{
    Console.WriteLine($"Recovered from: {warning.Message} ({warning.Id})");
}

image.Save("duck-300dpi.png");

Constructors

TextEntry(string, string, string?)

A text entry, such as a PNG text chunk or a GIF comment.

public TextEntry(string Key, string Value, string? Language = null)

Parameters

Key string

The keyword, such as "Title" or "Comment".

Value string

The text.

Language string

The language tag, if the format gives one.

Examples

RasterMetadata metadata = image.Metadata;
metadata.Text.Add(new TextEntry("Comment", "Made with Egami"));
metadata.Resolution = new Resolution(300, 300, ResolutionUnit.PerInch);
Console.WriteLine($"{metadata.ColorSpace}, ICC {metadata.IccProfile.Length} bytes, XMP {metadata.Xmp.Length} bytes");
foreach (EgamiDiagnostic warning in metadata.Warnings)
{
    Console.WriteLine($"Recovered from: {warning.Message} ({warning.Id})");
}

image.Save("duck-300dpi.png");

Properties

Key

The keyword, such as "Title" or "Comment".

public string Key { get; init; }

Property Value

string

Language

The language tag, if the format gives one.

public string? Language { get; init; }

Property Value

string

Value

The text.

public string Value { get; init; }

Property Value

string