Browse Source

Update src/ImageSharp/Formats/Png/PngEncoderCore.cs

Co-authored-by: Günther Foidl <gue@korporal.at>
pull/2269/head
James Jackson-South 4 years ago
committed by GitHub
parent
commit
6745cae8b6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ImageSharp/Formats/Png/PngEncoderCore.cs

2
src/ImageSharp/Formats/Png/PngEncoderCore.cs

@ -1336,7 +1336,7 @@ internal sealed class PngEncoderCore : IImageEncoderInternals, IDisposable
bitDepth = bits;
}
if (Array.IndexOf(PngConstants.ColorTypes[colorType], bitDepth) == -1)
if (Array.IndexOf(PngConstants.ColorTypes[colorType], bitDepth) < 0)
{
throw new NotSupportedException("Bit depth is not supported or not valid.");
}

Loading…
Cancel
Save