Browse Source

Set YcbcrSubSampling to 1, 1 with jpeg compression and PhotometricInterpretation YCbCr

pull/2789/head
Brian Popow 3 years ago
parent
commit
14ced6f6d2
  1. 12
      src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs

12
src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs

@ -628,6 +628,12 @@ internal static class TiffDecoderOptionsParser
options.ColorType = TiffColorType.Rgb;
}
if (options.PhotometricInterpretation is TiffPhotometricInterpretation.YCbCr)
{
options.YcbcrSubSampling[0] = 1;
options.YcbcrSubSampling[1] = 1;
}
break;
}
@ -642,6 +648,12 @@ internal static class TiffDecoderOptionsParser
options.ColorType = TiffColorType.Rgb;
}
if (options.PhotometricInterpretation is TiffPhotometricInterpretation.YCbCr)
{
options.YcbcrSubSampling[0] = 1;
options.YcbcrSubSampling[1] = 1;
}
break;
}

Loading…
Cancel
Save