Skip to main content

PixelFormat Class

Package: GHIElectronics.Endpoint.Drawing
Module: GHIElectronics.Endpoint.Drawing

Pixel layout of a Canvas buffer. Also the layout written to the destination device (on-board panel, SPI TFT, I2C OLED, ...) when Canvas.Buffer is handed to it. Integer values mirror the .NET enum.

class PixelFormat:
Monochrome = 1
Rgb565 = 2
Rgb888 = 3
Argb8888 = 4

Fields​

NameValueDescription
Monochrome11 bit per pixel, packed MSB-first in each byte. Typical for SSD1306 / SH1106 OLEDs.
Rgb565216 bits per pixel, 5-6-5 big-endian. Native format of the on-board panel and most SPI TFTs (ILI9341, ST7735).
Rgb888324 bits per pixel, R-G-B byte order. Common for parallel RGB panels at 24 bpp.
Argb8888432 bits per pixel, A-R-G-B byte order. Off-screen compositing; alpha is respected by blit operations.