From ca8b89789ccb938e5108cdac9f8a98a434567345 Mon Sep 17 00:00:00 2001 From: Brian Popow Date: Fri, 1 May 2020 09:19:23 +0200 Subject: [PATCH] Remove not needed image parameter from CalculateBitDepth --- src/ImageSharp/Formats/Png/PngEncoderCore.cs | 4 ++-- src/ImageSharp/Formats/Png/PngEncoderOptionsHelpers.cs | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ImageSharp/Formats/Png/PngEncoderCore.cs b/src/ImageSharp/Formats/Png/PngEncoderCore.cs index d8509548ad..12ffb2cfcf 100644 --- a/src/ImageSharp/Formats/Png/PngEncoderCore.cs +++ b/src/ImageSharp/Formats/Png/PngEncoderCore.cs @@ -227,12 +227,12 @@ namespace SixLabors.ImageSharp.Formats.Png if (this.options.MakeTransparentBlack) { quantized = PngEncoderOptionsHelpers.CreateQuantizedFrame(this.options, clonedImage); - this.bitDepth = PngEncoderOptionsHelpers.CalculateBitDepth(this.options, clonedImage, quantized); + this.bitDepth = PngEncoderOptionsHelpers.CalculateBitDepth(this.options, quantized); } else { quantized = PngEncoderOptionsHelpers.CreateQuantizedFrame(this.options, image); - this.bitDepth = PngEncoderOptionsHelpers.CalculateBitDepth(this.options, image, quantized); + this.bitDepth = PngEncoderOptionsHelpers.CalculateBitDepth(this.options, quantized); } return quantized; diff --git a/src/ImageSharp/Formats/Png/PngEncoderOptionsHelpers.cs b/src/ImageSharp/Formats/Png/PngEncoderOptionsHelpers.cs index 3f490ca6f8..3a8e528cc0 100644 --- a/src/ImageSharp/Formats/Png/PngEncoderOptionsHelpers.cs +++ b/src/ImageSharp/Formats/Png/PngEncoderOptionsHelpers.cs @@ -89,11 +89,9 @@ namespace SixLabors.ImageSharp.Formats.Png /// /// The type of the pixel. /// The options. - /// The image. /// The quantized frame. public static byte CalculateBitDepth( PngEncoderOptions options, - Image image, IndexedImageFrame quantizedFrame) where TPixel : unmanaged, IPixel {