SKBitmap.CopyPixelsTo(IntPtr, Int32, Int32, Boolean) Method

Definition

Warning

This API is now obsolete.

Copies the pixels of the bitmap to the specified memory location.

[System.Obsolete("Use SKPixmap.ReadPixels instead.")]
public bool CopyPixelsTo (IntPtr dst, int dstSize, int dstRowBytes = 0, bool preserveDstPad = false);

Parameters

dst
IntPtr

The location of destination buffer.

dstSize
Int32

The size of destination buffer. Must be large enough to hold pixels using indicated stride.

dstRowBytes
Int32

The width of each line in the buffer. If 0, uses bitmap's internal stride.

preserveDstPad
Boolean

Whether or not to preserve padding in the destination.

Returns

Returns true if possible, returns false otherwise.

Attributes

Remarks

In the case when the dstRowBytes matches the bitmap's rowBytes, the copy may be made faster by copying over the dst's per-row padding (for all rows but the last). By setting preserveDstPad to true the caller can disable this optimization and ensure that pixels in the padding are not overwritten.

Applies to