|
|
|
@ -98,10 +98,10 @@ namespace SixLabors.ImageSharp.Formats.Gif |
|
|
|
|
|
|
|
this.hasFrames = image.Frames.Count > 1; |
|
|
|
|
|
|
|
var ditheredQuantizer = (IQuantizer<TPixel>)this.quantizer; |
|
|
|
var pixelQuantizer = (IQuantizer<TPixel>)this.quantizer; |
|
|
|
|
|
|
|
// Quantize the image returning a palette.
|
|
|
|
QuantizedImage<TPixel> quantized = ditheredQuantizer.Quantize(image.Frames.RootFrame, size); |
|
|
|
QuantizedImage<TPixel> quantized = pixelQuantizer.Quantize(image.Frames.RootFrame, size); |
|
|
|
|
|
|
|
int index = this.GetTransparentIndex(quantized); |
|
|
|
|
|
|
|
@ -124,7 +124,7 @@ namespace SixLabors.ImageSharp.Formats.Gif |
|
|
|
{ |
|
|
|
if (quantized == null) |
|
|
|
{ |
|
|
|
quantized = ditheredQuantizer.Quantize(frame, size); |
|
|
|
quantized = pixelQuantizer.Quantize(frame, size); |
|
|
|
} |
|
|
|
|
|
|
|
this.WriteGraphicalControlExtension(frame.MetaData, writer, this.GetTransparentIndex(quantized)); |
|
|
|
|