Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
JimBobSquarePants authored Aug 10, 2022
2 parents 7f14e34 + d33b364 commit 1cc618a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ImageSharp/Formats/Tiff/TiffEncoderCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,13 @@ private void SanitizeAndSetEncoderOptions(TiffBitsPerPixel? bitsPerPixel, int in
return;

case TiffPhotometricInterpretation.Rgb:
// Make sure 1 Bit compression is only used with 1 bit pixel type.
if (IsOneBitCompression(this.CompressionType))
{
// Invalid compression / bits per pixel combination, fallback to no compression.
compression = DefaultCompression;
}

this.SetEncoderOptions(TiffBitsPerPixel.Bit24, photometricInterpretation, compression, predictor);
return;
}
Expand Down

0 comments on commit 1cc618a

Please sign in to comment.