Skip to content

Instantly share code, notes, and snippets.

@antonfirsov
Last active April 22, 2020 16:02
Show Gist options
  • Save antonfirsov/145f97512363170896a4a43eea3a5c73 to your computer and use it in GitHub Desktop.
Save antonfirsov/145f97512363170896a4a43eea3a5c73 to your computer and use it in GitHub Desktop.
public interface IQuantizer
{
// Remove:
// IFrameQuantizer<TPixel> CreateFrameQuantizer<TPixel>(Configuration configuration, QuantizerOptions options)
// where TPixel : unmanaged, IPixel<TPixel>;
// Add:
IQuantizer<TPixel> CreatePixelSpecificQuantizer<TPixel>(Configuration configuration, QuantizerOptions options)
where TPixel : unmanaged, IPixel<TPixel>;
}
// Renamed from FrameQuantizer<TPixel>
public interface IQuantizer<TPixel> : IDisposable
where TPixel : unmanaged, IPixel<TPixel>
{
// Remove:
// void BuildPalette(ImageFrame<TPixel> source, Rectangle bounds);
// Add:
void CollectPaletteColors(BufferArea<TPixel> pixels); // can be invoked multiple times for different frames
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment