diff --git a/src/BigGustave/PngBuilder.cs b/src/BigGustave/PngBuilder.cs index 923eb4b..53727b3 100644 --- a/src/BigGustave/PngBuilder.cs +++ b/src/BigGustave/PngBuilder.cs @@ -287,7 +287,7 @@ public void Save(Stream outputStream, SaveOptions options = null) if (!hasTooManyColorsForPalette && !hasAlphaChannel) { var paletteColors = colorCounts.OrderByDescending(x => x.Value).Select(x => x.Key).ToList(); - bitDepth = paletteColors.Count >= 128 ? 8 : 4; + bitDepth = paletteColors.Count > 16 ? 8 : 4; var samplesPerByte = bitDepth == 8 ? 1 : 2; var applyShift = samplesPerByte == 2;