From 2c0aa2b7e0aee86192c28c20aa29d341194a07fa Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Tue, 26 Jun 2018 18:43:34 +1000 Subject: [PATCH] Make correct method virtual --- src/ImageSharp/Processing/Quantization/PaletteQuantizer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/Processing/Quantization/PaletteQuantizer.cs b/src/ImageSharp/Processing/Quantization/PaletteQuantizer.cs index 85cc8334f..dd10a040a 100644 --- a/src/ImageSharp/Processing/Quantization/PaletteQuantizer.cs +++ b/src/ImageSharp/Processing/Quantization/PaletteQuantizer.cs @@ -48,7 +48,7 @@ namespace SixLabors.ImageSharp.Processing.Quantization public IErrorDiffuser Diffuser { get; } /// - public IFrameQuantizer CreateFrameQuantizer() + public virtual IFrameQuantizer CreateFrameQuantizer() where TPixel : struct, IPixel => this.CreateFrameQuantizer(() => NamedColors.WebSafePalette); @@ -58,7 +58,7 @@ namespace SixLabors.ImageSharp.Processing.Quantization /// The pixel format. /// The method to return the palette. /// The - public virtual IFrameQuantizer CreateFrameQuantizer(Func paletteFunction) + public IFrameQuantizer CreateFrameQuantizer(Func paletteFunction) where TPixel : struct, IPixel => new PaletteFrameQuantizer(this, paletteFunction.Invoke());