@@ -473,7 +473,7 @@ private void Write8BitColor<TPixel>(Stream stream, Image<TPixel> image, Span<byt
473
473
using IndexedImageFrame < TPixel > quantized = frameQuantizer . QuantizeFrame ( image . Frames . RootFrame , image . Bounds ) ;
474
474
475
475
ReadOnlySpan < TPixel > quantizedColorPalette = quantized . Palette . Span ;
476
- this . WriteColorPalette ( stream , quantizedColorPalette , colorPalette , configuration ) ;
476
+ WriteColorPalette ( stream , quantizedColorPalette , colorPalette , configuration ) ;
477
477
478
478
for ( int y = image . Height - 1 ; y >= 0 ; y -- )
479
479
{
@@ -547,7 +547,7 @@ private void Write4BitPixelData<TPixel>(Stream stream, Image<TPixel> image, Conf
547
547
548
548
Span < byte > colorPalette = colorPaletteBuffer . GetSpan ( ) ;
549
549
ReadOnlySpan < TPixel > quantizedColorPalette = quantized . Palette . Span ;
550
- this . WriteColorPalette ( stream , quantizedColorPalette , colorPalette , configuration ) ;
550
+ WriteColorPalette ( stream , quantizedColorPalette , colorPalette , configuration ) ;
551
551
552
552
ReadOnlySpan < byte > pixelRowSpan = quantized . DangerousGetRowSpan ( 0 ) ;
553
553
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
595
595
596
596
Span < byte > colorPalette = colorPaletteBuffer . GetSpan ( ) ;
597
597
ReadOnlySpan < TPixel > quantizedColorPalette = quantized . Palette . Span ;
598
- this . WriteColorPalette ( stream , quantizedColorPalette , colorPalette , configuration ) ;
598
+ WriteColorPalette ( stream , quantizedColorPalette , colorPalette , configuration ) ;
599
599
600
600
ReadOnlySpan < byte > pixelRowSpan = quantized . DangerousGetRowSpan ( 0 ) ;
601
601
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
652
652
653
653
Span < byte > colorPalette = colorPaletteBuffer . GetSpan ( ) ;
654
654
ReadOnlySpan < TPixel > quantizedColorPalette = quantized . Palette . Span ;
655
- this . WriteColorPalette ( stream , quantizedColorPalette , colorPalette , configuration ) ;
655
+ WriteColorPalette ( stream , quantizedColorPalette , colorPalette , configuration ) ;
656
656
657
657
ReadOnlySpan < byte > quantizedPixelRow = quantized . DangerousGetRowSpan ( 0 ) ;
658
658
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
688
688
/// <param name="quantizedColorPalette">The color palette from the quantized image.</param>
689
689
/// <param name="colorPalette">A temporary byte span to write the color palette to.</param>
690
690
/// <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 )
692
692
where TPixel : unmanaged, IPixel < TPixel >
693
693
{
694
694
int quantizedColorBytes = quantizedColorPalette . Length * 4 ;
0 commit comments