Click or drag to resize

BitmapDataSetPixels Method

Use this to set the pixels of the bitmap from an array or other source.

Namespace:  Eto.Drawing
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public void SetPixels(
	IEnumerable<Color> pixels
)

Parameters

pixels
Type: System.Collections.GenericIEnumerableColor
Enumerator that returns each pixel of the bitmap from top to bottom
Remarks
For example, you can use this to set the pixel data from an int array like so:
int[] myData;
bitmapData.SetPixels(myData.Select(Color.FromArgb));
This will set all the pixels up till the end of the enumeration. If there isn't enough data to fill the bitmap entirely, it will not set any additional pixels.
See Also