Image.create

Create the image from an array of pixels.

The pixel array is assumed to contain 32-bits RGBA pixels, and have the given width and height. If not, this is an undefined behaviour. If pixels is null, an empty image is created.

  1. void create(uint width, uint height, Color color)
  2. void create(uint width, uint height, const(ubyte)[] pixels)
    class Image
    void
    create
    (
    uint width
    ,
    uint height
    ,
    const(ubyte)[] pixels
    )

Parameters

width
Type: uint

Width of the image

height
Type: uint

Height of the image

pixels
Type: const(ubyte)[]

Array of pixels to copy to the image

Meta