/// <summary> /// Creates an image and fills it with the given color. /// </summary> /// <param name="width">The width (in pixels) of the image to create.</param> /// <param name="height">The height (in pixels) of the image to create.</param> /// <param name="color">The color to fill the image with.</param> /// <returns>The newly created image.</returns> public static ImageData CreateImage(int width, int height, ColorUint color) { var ret = new ImageData { PixelData = new byte[width * height], Height = height, Width = width, PixelFormat = ImagePixelFormat.RGBA, Stride = width }; MemSet(ret.PixelData, color.ToArray()); return(ret); }