Skip to content

Commit 1c77366

Browse files
committed
Make method static
1 parent 4a82d27 commit 1c77366

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ private void Write8BitColor<TPixel>(Stream stream, Image<TPixel> image, Span<byt
473473
using IndexedImageFrame<TPixel> quantized = frameQuantizer.QuantizeFrame(image.Frames.RootFrame, image.Bounds);
474474

475475
ReadOnlySpan<TPixel> quantizedColorPalette = quantized.Palette.Span;
476-
this.WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration);
476+
WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration);
477477

478478
for (int y = image.Height - 1; y >= 0; y--)
479479
{
@@ -547,7 +547,7 @@ private void Write4BitPixelData<TPixel>(Stream stream, Image<TPixel> image, Conf
547547

548548
Span<byte> colorPalette = colorPaletteBuffer.GetSpan();
549549
ReadOnlySpan<TPixel> quantizedColorPalette = quantized.Palette.Span;
550-
this.WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration);
550+
WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration);
551551

552552
ReadOnlySpan<byte> pixelRowSpan = quantized.DangerousGetRowSpan(0);
553553
int rowPadding = pixelRowSpan.Length % 2 != 0 ? this.padding - 1 : this.padding;
@@ -595,7 +595,7 @@ private void Write2BitPixelData<TPixel>(Stream stream, Image<TPixel> image, Conf
595595

596596
Span<byte> colorPalette = colorPaletteBuffer.GetSpan();
597597
ReadOnlySpan<TPixel> quantizedColorPalette = quantized.Palette.Span;
598-
this.WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration);
598+
WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration);
599599

600600
ReadOnlySpan<byte> pixelRowSpan = quantized.DangerousGetRowSpan(0);
601601
int rowPadding = pixelRowSpan.Length % 4 != 0 ? this.padding - 1 : this.padding;
@@ -652,7 +652,7 @@ private void Write1BitPixelData<TPixel>(Stream stream, Image<TPixel> image, Conf
652652

653653
Span<byte> colorPalette = colorPaletteBuffer.GetSpan();
654654
ReadOnlySpan<TPixel> quantizedColorPalette = quantized.Palette.Span;
655-
this.WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration);
655+
WriteColorPalette(stream, quantizedColorPalette, colorPalette, configuration);
656656

657657
ReadOnlySpan<byte> quantizedPixelRow = quantized.DangerousGetRowSpan(0);
658658
int rowPadding = quantizedPixelRow.Length % 8 != 0 ? this.padding - 1 : this.padding;
@@ -688,7 +688,7 @@ private void Write1BitPixelData<TPixel>(Stream stream, Image<TPixel> image, Conf
688688
/// <param name="quantizedColorPalette">The color palette from the quantized image.</param>
689689
/// <param name="colorPalette">A temporary byte span to write the color palette to.</param>
690690
/// <param name="configuration">The global configuration</param>
691-
private void WriteColorPalette<TPixel>(Stream stream, ReadOnlySpan<TPixel> quantizedColorPalette, Span<byte> colorPalette, Configuration configuration)
691+
private static void WriteColorPalette<TPixel>(Stream stream, ReadOnlySpan<TPixel> quantizedColorPalette, Span<byte> colorPalette, Configuration configuration)
692692
where TPixel : unmanaged, IPixel<TPixel>
693693
{
694694
int quantizedColorBytes = quantizedColorPalette.Length * 4;

0 commit comments

Comments
 (0)