Browse Source

Apply suggestions from code review

Co-authored-by: Günther Foidl <gue@korporal.at>
pull/1647/head
Brian Popow 5 years ago
committed by GitHub
parent
commit
85ef0fe2ca
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/ImageSharp/Formats/Tiff/TiffBitsPerSampleExtensions.cs
  2. 2
      src/ImageSharp/Formats/Tiff/TiffDecoderOptionsParser.cs

4
src/ImageSharp/Formats/Tiff/TiffBitsPerSampleExtensions.cs

@ -50,9 +50,9 @@ namespace SixLabors.ImageSharp.Formats.Tiff
return TiffBitsPerSample.Bit24;
}
if (bitsPerSample[0] == TiffConstants.BitsPerSampleRgb4Bit[0] &&
if (bitsPerSample[2] == TiffConstants.BitsPerSampleRgb4Bit[2] &&
bitsPerSample[1] == TiffConstants.BitsPerSampleRgb4Bit[1] &&
bitsPerSample[2] == TiffConstants.BitsPerSampleRgb4Bit[2])
bitsPerSample[0] == TiffConstants.BitsPerSampleRgb4Bit[0])
{
return TiffBitsPerSample.Bit12;
}

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

@ -189,7 +189,7 @@ namespace SixLabors.ImageSharp.Formats.Tiff
options.ColorType = TiffColorType.Rgb444;
break;
default:
TiffThrowHelper.ThrowNotSupported("Bits per sample is nut supported.");
TiffThrowHelper.ThrowNotSupported("Bits per sample is not supported.");
break;
}
}

Loading…
Cancel
Save