From 4aec7aae5645522e595623aa1f81d4567922a54b Mon Sep 17 00:00:00 2001 From: Brian Popow Date: Fri, 18 Nov 2022 20:26:40 +0100 Subject: [PATCH] Change samples per pixel to ushort --- src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs b/src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs index 64b300cd60..250442f371 100644 --- a/src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs +++ b/src/ImageSharp/Formats/Tiff/TiffEncoderEntriesCollector.cs @@ -278,7 +278,7 @@ internal class TiffEncoderEntriesCollector Value = (ushort)TiffPlanarConfiguration.Chunky }; - ExifLong samplesPerPixel = new(ExifTagValue.SamplesPerPixel) + ExifShort samplesPerPixel = new(ExifTagValue.SamplesPerPixel) { Value = GetSamplesPerPixel(encoder) }; @@ -317,7 +317,7 @@ internal class TiffEncoderEntriesCollector } } - private static uint GetSamplesPerPixel(TiffEncoderCore encoder) + private static ushort GetSamplesPerPixel(TiffEncoderCore encoder) => encoder.PhotometricInterpretation switch { TiffPhotometricInterpretation.PaletteColor or