From 1c773661b4c19881cf844ebf19cf2ab3c93c1b1e Mon Sep 17 00:00:00 2001 From: Stefan Nikolei Date: Mon, 6 Feb 2023 10:54:56 +0100 Subject: [PATCH] Make method static --- src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs b/src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs index 1479d31e64..620e0499f4 100644 --- a/src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs +++ b/src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs @@ -473,7 +473,7 @@ internal sealed class BmpEncoderCore : IImageEncoderInternals using IndexedImageFrame quantized = frameQuantizer.QuantizeFrame(image.Frames.RootFrame, image.Bounds); ReadOnlySpan quantizedColorPalette = quantized.Palette.Span; - this.WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration); + WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration); for (int y = image.Height - 1; y >= 0; y--) { @@ -547,7 +547,7 @@ internal sealed class BmpEncoderCore : IImageEncoderInternals Span colorPalette = colorPaletteBuffer.GetSpan(); ReadOnlySpan quantizedColorPalette = quantized.Palette.Span; - this.WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration); + WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration); ReadOnlySpan pixelRowSpan = quantized.DangerousGetRowSpan(0); int rowPadding = pixelRowSpan.Length % 2 != 0 ? this.padding - 1 : this.padding; @@ -595,7 +595,7 @@ internal sealed class BmpEncoderCore : IImageEncoderInternals Span colorPalette = colorPaletteBuffer.GetSpan(); ReadOnlySpan quantizedColorPalette = quantized.Palette.Span; - this.WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration); + WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration); ReadOnlySpan pixelRowSpan = quantized.DangerousGetRowSpan(0); int rowPadding = pixelRowSpan.Length % 4 != 0 ? this.padding - 1 : this.padding; @@ -652,7 +652,7 @@ internal sealed class BmpEncoderCore : IImageEncoderInternals Span colorPalette = colorPaletteBuffer.GetSpan(); ReadOnlySpan quantizedColorPalette = quantized.Palette.Span; - this.WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration); + WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration); ReadOnlySpan quantizedPixelRow = quantized.DangerousGetRowSpan(0); int rowPadding = quantizedPixelRow.Length % 8 != 0 ? this.padding - 1 : this.padding; @@ -688,7 +688,7 @@ internal sealed class BmpEncoderCore : IImageEncoderInternals /// The color palette from the quantized image. /// A temporary byte span to write the color palette to. /// The global configuration - private void WriteColorPalette(Stream stream, ReadOnlySpan quantizedColorPalette, Span colorPalette, Configuration configuration) + private static void WriteColorPalette(Stream stream, ReadOnlySpan quantizedColorPalette, Span colorPalette, Configuration configuration) where TPixel : unmanaged, IPixel { int quantizedColorBytes = quantizedColorPalette.Length * 4;