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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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."); |
|
|
|
} |
|
|
|
|