Function Image.createFromData

Creates a new image of given size and format. See format constants. Fills the image with the given raw data. If use_mipmaps is true then generate mipmaps for this image. See the generateMipmaps.

void createFromData (
  const(long) width,
  const(long) height,
  const(bool) use_mipmaps,
  const(long) format,
  const(PoolArray!(ubyte)) data
) nothrow @nogc;