Struct PngTextData
Stores text data contained in the iTXt, tEXt, and zTXt chunks. Used for conveying textual information associated with the image, like the name of the author, the copyright information, the date, where the image was created, or some other information.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Formats.Png.Chunks
Assembly: SixLabors.ImageSharp.dll
Syntax
public readonly struct PngTextData : IEquatable<PngTextData>
  Constructors
| Edit this page View SourcePngTextData(string, string, string, string)
Initializes a new instance of the PngTextData struct.
Declaration
public PngTextData(string keyword, string value, string languageTag, string translatedKeyword)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | keyword | The keyword of the property.  | 
      
| string | value | The value of the property.  | 
      
| string | languageTag | An optional language tag.  | 
      
| string | translatedKeyword | A optional translated keyword.  | 
      
Properties
| Edit this page View SourceKeyword
Gets the keyword of this PngTextData which indicates the type of information represented by the text string as described in https://www.w3.org/TR/PNG/#11keywords.
Declaration
public string Keyword { get; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Examples
Typical properties are the author, copyright information or other meta information.
| Edit this page View SourceLanguageTag
Gets an optional language tag defined in https://www.w3.org/TR/PNG/#2-RFC-3066 indicates the human language used by the translated keyword and the text. If the first word is two or three letters long, it is an ISO language code https://www.w3.org/TR/PNG/#2-ISO-639.
Declaration
public string LanguageTag { get; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Examples
Examples: cn, en-uk, no-bok, x-klingon, x-KlInGoN.
| Edit this page View SourceTranslatedKeyword
Gets an optional translated keyword, should contain a translation of the keyword into the language indicated by the language tag.
Declaration
public string TranslatedKeyword { get; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Value
Gets the value of this PngTextData.
Declaration
public string Value { get; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Methods
| Edit this page View SourceEquals(PngTextData)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(PngTextData other)
  Parameters
| Type | Name | Description | 
|---|---|---|
| PngTextData | other | An object to compare with this object.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | True if the current object is equal to the   | 
      
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| object | obj | The object to compare with the current instance.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | true if   | 
      
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
  Returns
| Type | Description | 
|---|---|
| int | A 32-bit signed integer that is the hash code for this instance.  | 
      
Overrides
| Edit this page View SourceToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
  Returns
| Type | Description | 
|---|---|
| string | A string containing a fully qualified type name.  | 
      
Overrides
Operators
| Edit this page View Sourceoperator ==(PngTextData, PngTextData)
Compares two PngTextData objects. The result specifies whether the values of the properties of the two PngTextData objects are equal.
Declaration
public static bool operator ==(PngTextData left, PngTextData right)
  Parameters
| Type | Name | Description | 
|---|---|---|
| PngTextData | left | The PngTextData on the left side of the operand.  | 
      
| PngTextData | right | The PngTextData on the right side of the operand.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | True if the current left is equal to the   | 
      
operator !=(PngTextData, PngTextData)
Compares two PngTextData objects. The result specifies whether the values of the properties of the two PngTextData objects are unequal.
Declaration
public static bool operator !=(PngTextData left, PngTextData right)
  Parameters
| Type | Name | Description | 
|---|---|---|
| PngTextData | left | The PngTextData on the left side of the operand.  | 
      
| PngTextData | right | The PngTextData on the right side of the operand.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | True if the current left is unequal to the   |