RgbImage.this

this(const(ubyte)[] data, int width, int height, int depth = 3, int lineSize = 0)

Creates a new RGB image from pixel data.

The data is copied, so the original buffer can be freed after this constructor returns.

Parameters

dataPixel data buffer
widthWidth in pixels
heightHeight in pixels
depthBytes per pixel (1=gray, 2=gray+alpha, 3=RGB, 4=RGBA)
lineSizeLine data size (0 = width * depth)