Grx.Pixmap.new

function new(pixels: ByteArray, w: Number(gint), h: Number(gint), colors: Array(Grx.Color)): Grx.Pixmap {
    // Gjs wrapper for grx_pixmap_new()
}
  

Build a pixmap from pixels.

The elements of the pixels array are used as indices in colors. This means that pixmaps created this way can use at most 256 colors. NOTE: any color modifiers (GrXOR, GrOR, GrAND) OR-ed to the elements of the color table are ignored.

pixels

a two dimensional array of bytes

w

the width of the pixel array

h

the height of the pixel array

colors

color table for the pixel array

Returns

a new Grx.Pixmap or null if there was an error.