Browse Source

remove obsolete code

pull/1760/head
Ildar Khayrutdinov 4 years ago
parent
commit
75db00274f
  1. 16
      src/ImageSharp/Formats/Tiff/Ifd/DirectoryReader.cs
  2. 5
      src/ImageSharp/Metadata/Profiles/Exif/ExifReader.cs

16
src/ImageSharp/Formats/Tiff/Ifd/DirectoryReader.cs

@ -92,21 +92,5 @@ namespace SixLabors.ImageSharp.Formats.Tiff
return list;
}
/// <summary>
/// <see cref="DuplicateKeyComparer{TKey}"/> used for possibility add a duplicate offsets (but tags don't duplicate).
/// </summary>
/// <typeparam name="TKey">The type of the key.</typeparam>
private class DuplicateKeyComparer<TKey> : IComparer<TKey>
where TKey : IComparable
{
public int Compare(TKey x, TKey y)
{
int result = x.CompareTo(y);
// Handle equality as being greater.
return (result == 0) ? 1 : result;
}
}
}
}

5
src/ImageSharp/Metadata/Profiles/Exif/ExifReader.cs

@ -172,10 +172,7 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Exif
protected void ReadValues64(List<IExifValue> values, ulong offset)
{
if (offset > (ulong)this.data.Length)
{
return;
}
DebugGuard.MustBeLessThanOrEqualTo(offset, (ulong)this.data.Length, "By spec UInt64.MaxValue is supported, but .Net Stream.Length can Int64.MaxValue.");
this.Seek(offset);
ulong count = this.ReadUInt64();

Loading…
Cancel
Save