Skip to content

Commit

Permalink
Merge pull request #1189 from SixLabors/bp/remObsoleteTxtProperty
Browse files Browse the repository at this point in the history
Remove obsolete PngTextProperties from png metadata
  • Loading branch information
brianpopow authored Apr 27, 2020
2 parents f6122df + 6545bbd commit 5639bab
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions src/ImageSharp/Formats/Png/PngMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,34 +91,12 @@ private PngMetadata(PngMetadata other)
public bool HasTransparency { get; set; }

/// <summary>
/// Gets or sets the collection of text data stored within the iTXt, tEXt, and zTXt chunks.
/// Gets or sets the collection of text data stored within the iTXt, tEXt, and zTXt chunks.
/// Used for conveying textual information associated with the image.
/// </summary>
public IList<PngTextData> TextData { get; set; } = new List<PngTextData>();

/// <summary>
/// Gets the list of png text properties for storing meta information about this image.
/// </summary>
public IList<PngTextData> PngTextProperties { get; } = new List<PngTextData>();

/// <inheritdoc/>
public IDeepCloneable DeepClone() => new PngMetadata(this);

internal bool TryGetPngTextProperty(string keyword, out PngTextData result)
{
for (int i = 0; i < this.TextData.Count; i++)
{
if (this.TextData[i].Keyword == keyword)
{
result = this.TextData[i];

return true;
}
}

result = default;

return false;
}
}
}

0 comments on commit 5639bab

Please sign in to comment.