Browse Source

Cleanup and update references.

pull/1138/head
James Jackson-South 6 years ago
parent
commit
d9596ef33b
  1. 4
      src/ImageSharp/Processing/Processors/Quantization/EuclideanPixelMap{TPixel}.cs
  2. 1
      src/ImageSharp/Processing/Processors/Quantization/FrameQuantizerExtensions.cs
  3. 3
      src/ImageSharp/Processing/Processors/Quantization/PaletteFrameQuantizer{TPixel}.cs
  4. 2
      src/ImageSharp/Processing/Processors/Quantization/PaletteQuantizer.cs
  5. 2
      tests/Images/External

4
src/ImageSharp/Processing/Processors/Quantization/EuclideanPixelMap{TPixel}.cs

@ -2,12 +2,10 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using System.Buffers;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Processing.Processors.Quantization namespace SixLabors.ImageSharp.Processing.Processors.Quantization
@ -106,5 +104,5 @@ namespace SixLabors.ImageSharp.Processing.Processors.Quantization
match = Unsafe.Add(ref paletteRef, index); match = Unsafe.Add(ref paletteRef, index);
return index; return index;
} }
} }
} }

1
src/ImageSharp/Processing/Processors/Quantization/FrameQuantizerExtensions.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;

3
src/ImageSharp/Processing/Processors/Quantization/PaletteFrameQuantizer{TPixel}.cs

@ -2,10 +2,7 @@
// Licensed under the Apache License, Version 2.0. // Licensed under the Apache License, Version 2.0.
using System; using System;
using System.Buffers;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats; using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Processing.Processors.Quantization namespace SixLabors.ImageSharp.Processing.Processors.Quantization

2
src/ImageSharp/Processing/Processors/Quantization/PaletteQuantizer.cs

@ -56,7 +56,9 @@ namespace SixLabors.ImageSharp.Processing.Processors.Quantization
// multi frame gifs using a global palette. // multi frame gifs using a global palette.
int length = Math.Min(this.colorPalette.Length, options.MaxColors); int length = Math.Min(this.colorPalette.Length, options.MaxColors);
var palette = new TPixel[length]; var palette = new TPixel[length];
Color.ToPixel(configuration, this.colorPalette.Span, palette.AsSpan()); Color.ToPixel(configuration, this.colorPalette.Span, palette.AsSpan());
var pixelMap = new EuclideanPixelMap<TPixel>(configuration, palette, length); var pixelMap = new EuclideanPixelMap<TPixel>(configuration, palette, length);
return new PaletteFrameQuantizer<TPixel>(configuration, options, pixelMap); return new PaletteFrameQuantizer<TPixel>(configuration, options, pixelMap);
} }

2
tests/Images/External

@ -1 +1 @@
Subproject commit f8a76fd3a900b90c98df67ac896574383a4d09f3 Subproject commit 1fea1ceab89e87cc5f11376fa46164d3d27566c0
Loading…
Cancel
Save