From aeeb7db0bcdf8c5c203c40f64c7768521d2660ef Mon Sep 17 00:00:00 2001 From: Ildar Khayrutdinov Date: Sat, 3 Jul 2021 13:31:32 +0300 Subject: [PATCH] Double tags fixing --- src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs b/src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs index b00dcc9673..1b042eec04 100644 --- a/src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs +++ b/src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs @@ -244,19 +244,19 @@ namespace SixLabors.ImageSharp.Formats.Tiff imageMetadata.HorizontalResolution, imageMetadata.VerticalResolution); - this.Collector.Add(new ExifShort(ExifTagValue.ResolutionUnit) + this.Collector.AddOrReplace(new ExifShort(ExifTagValue.ResolutionUnit) { Value = exifValues.Item1 }); if (exifValues.Item2 != null && exifValues.Item3 != null) { - this.Collector.Add(new ExifRational(ExifTagValue.XResolution) + this.Collector.AddOrReplace(new ExifRational(ExifTagValue.XResolution) { Value = new Rational(exifValues.Item2.Value) }); - this.Collector.Add(new ExifRational(ExifTagValue.YResolution) + this.Collector.AddOrReplace(new ExifRational(ExifTagValue.YResolution) { Value = new Rational(exifValues.Item3.Value) });