Skip to content

IndexedImageData Constructors ​

Initializes an image by copying row-major palette indices.

c#
public IndexedImageData(int width, int height, Byte[] pixels, PaletteData palette, int bitsPerPixel = 8);

View source

Parameters ​

NameTypeDescription
widthInt32The width in pixels.
heightInt32The height in pixels.
pixelsByte[]One byte per pixel, even for bit depths below eight.
palettePaletteDataThe palette. Its size must fit the bit depth and contain every referenced index.
bitsPerPixelInt32The index bit depth: one, two, four or eight.