Class TextEntry
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
KeystringThe keyword, such as "Title" or "Comment".
ValuestringThe text.
LanguagestringThe 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
Language
The language tag, if the format gives one.
public string? Language { get; init; }
Property Value
Value
The text.
public string Value { get; init; }