Browse Source

Make correct method virtual

pull/637/head
James Jackson-South 8 years ago
parent
commit
becc80b4cd
  1. 4
      src/ImageSharp/Processing/Quantization/PaletteQuantizer.cs

4
src/ImageSharp/Processing/Quantization/PaletteQuantizer.cs

@ -48,7 +48,7 @@ namespace SixLabors.ImageSharp.Processing.Quantization
public IErrorDiffuser Diffuser { get; } public IErrorDiffuser Diffuser { get; }
/// <inheritdoc /> /// <inheritdoc />
public IFrameQuantizer<TPixel> CreateFrameQuantizer<TPixel>() public virtual IFrameQuantizer<TPixel> CreateFrameQuantizer<TPixel>()
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
=> this.CreateFrameQuantizer(() => NamedColors<TPixel>.WebSafePalette); => this.CreateFrameQuantizer(() => NamedColors<TPixel>.WebSafePalette);
@ -58,7 +58,7 @@ namespace SixLabors.ImageSharp.Processing.Quantization
/// <typeparam name="TPixel">The pixel format.</typeparam> /// <typeparam name="TPixel">The pixel format.</typeparam>
/// <param name="paletteFunction">The method to return the palette.</param> /// <param name="paletteFunction">The method to return the palette.</param>
/// <returns>The <see cref="IFrameQuantizer{TPixel}"/></returns> /// <returns>The <see cref="IFrameQuantizer{TPixel}"/></returns>
public virtual IFrameQuantizer<TPixel> CreateFrameQuantizer<TPixel>(Func<TPixel[]> paletteFunction) public IFrameQuantizer<TPixel> CreateFrameQuantizer<TPixel>(Func<TPixel[]> paletteFunction)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
=> new PaletteFrameQuantizer<TPixel>(this, paletteFunction.Invoke()); => new PaletteFrameQuantizer<TPixel>(this, paletteFunction.Invoke());

Loading…
Cancel
Save