From 58927f327bbcd8aeb7cf369ae31ba60bf0473f51 Mon Sep 17 00:00:00 2001 From: Brian Popow Date: Sun, 22 May 2022 14:33:29 +0200 Subject: [PATCH] Also set color type to rgb, when compression is jpeg --- src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs b/src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs index 206f06843..6d99fed3e 100644 --- a/src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs +++ b/src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs @@ -462,8 +462,9 @@ namespace SixLabors.ImageSharp.Formats.Tiff if (options.PhotometricInterpretation is TiffPhotometricInterpretation.YCbCr && options.JpegTables is null) { - // Note: Setting PhotometricInterpretation to RGB here, since the jpeg decoder will handle the conversion of the pixel data. + // Note: Setting PhotometricInterpretation and color type to RGB here, since the jpeg decoder will handle the conversion of the pixel data. options.PhotometricInterpretation = TiffPhotometricInterpretation.Rgb; + options.ColorType = TiffColorType.Rgb; } break;