Class PixelBufferDither
Provides methods for converting pixel buffers to 4bpp indexed buffers with optional dithering.
Assembly: MicroGraphics.dll
View Source
Declaration
public static class PixelBufferDither
Methods
To1bpp(IPixelBuffer, Color, Color, DitherMode, bool)
Provides methods for converting pixel buffers to single-color 1bpp buffers with optional dithering.
View Source
Declaration
public static Buffer1bpp To1bpp(IPixelBuffer sourceBuffer, Color color1, Color color2, DitherMode mode, bool serpentine = true)
Returns
Meadow.Foundation.Graphics.Buffers.Buffer1bpp
Parameters
| Type | Name |
|---|---|
Meadow.Peripherals.Displays.IPixelBuffer | sourceBuffer |
Meadow.Color | color1 |
Meadow.Color | color2 |
| Graphics.MicroGraphics.Dither.DitherMode | mode |
System.Boolean | serpentine |
ToIndexed4(IPixelBuffer, Color[], DitherMode, bool)
Convert any IPixelBuffer to a new BufferIndexed4 using a provided palette and dithering.
View Source
Declaration
public static BufferIndexed4 ToIndexed4(IPixelBuffer sourceBuffer, Color[] palette, DitherMode mode, bool serpentine = true)
Returns
Meadow.Foundation.Graphics.Buffers.BufferIndexed4
Parameters
| Type | Name |
|---|---|
Meadow.Peripherals.Displays.IPixelBuffer | sourceBuffer |
Meadow.Color[] | palette |
| Graphics.MicroGraphics.Dither.DitherMode | mode |
System.Boolean | serpentine |
ToRgb444(IPixelBuffer, DitherMode, bool)
Convert any IPixelBuffer to a new BufferRgb444 with optional dithering.
View Source
Declaration
public static BufferRgb444 ToRgb444(IPixelBuffer sourceBuffer, DitherMode mode, bool serpentine = true)
Returns
Meadow.Foundation.Graphics.Buffers.BufferRgb444
Parameters
| Type | Name |
|---|---|
Meadow.Peripherals.Displays.IPixelBuffer | sourceBuffer |
| Graphics.MicroGraphics.Dither.DitherMode | mode |
System.Boolean | serpentine |