Editare

Partajați prin


BitmapSource.CopyPixels Method

Definition

Copies the bitmap pixel data.

Overloads

CopyPixels(Array, Int32, Int32)

Copies the bitmap pixel data into an array of pixels with the specified stride, starting at the specified offset.

CopyPixels(Int32Rect, Array, Int32, Int32)

Copies the bitmap pixel data within the specified rectangle into an array of pixels that has the specified stride starting at the specified offset.

CopyPixels(Int32Rect, IntPtr, Int32, Int32)

Copies the bitmap pixel data within the specified rectangle.

CopyPixels(Array, Int32, Int32)

Copies the bitmap pixel data into an array of pixels with the specified stride, starting at the specified offset.

public:
 virtual void CopyPixels(Array ^ pixels, int stride, int offset);
[System.Security.SecurityCritical]
public virtual void CopyPixels (Array pixels, int stride, int offset);
public virtual void CopyPixels (Array pixels, int stride, int offset);
[<System.Security.SecurityCritical>]
abstract member CopyPixels : Array * int * int -> unit
override this.CopyPixels : Array * int * int -> unit
abstract member CopyPixels : Array * int * int -> unit
override this.CopyPixels : Array * int * int -> unit
Public Overridable Sub CopyPixels (pixels As Array, stride As Integer, offset As Integer)

Parameters

pixels
Array

The destination array.

stride
Int32

The stride of the bitmap.

offset
Int32

The pixel location where copying starts.

Attributes

Applies to

CopyPixels(Int32Rect, Array, Int32, Int32)

Copies the bitmap pixel data within the specified rectangle into an array of pixels that has the specified stride starting at the specified offset.

public:
 virtual void CopyPixels(System::Windows::Int32Rect sourceRect, Array ^ pixels, int stride, int offset);
[System.Security.SecurityCritical]
public virtual void CopyPixels (System.Windows.Int32Rect sourceRect, Array pixels, int stride, int offset);
public virtual void CopyPixels (System.Windows.Int32Rect sourceRect, Array pixels, int stride, int offset);
[<System.Security.SecurityCritical>]
abstract member CopyPixels : System.Windows.Int32Rect * Array * int * int -> unit
override this.CopyPixels : System.Windows.Int32Rect * Array * int * int -> unit
abstract member CopyPixels : System.Windows.Int32Rect * Array * int * int -> unit
override this.CopyPixels : System.Windows.Int32Rect * Array * int * int -> unit
Public Overridable Sub CopyPixels (sourceRect As Int32Rect, pixels As Array, stride As Integer, offset As Integer)

Parameters

sourceRect
Int32Rect

The source rectangle to copy. An Empty value specifies the entire bitmap.

pixels
Array

The destination array.

stride
Int32

The stride of the bitmap.

offset
Int32

The pixel location where copying begins.

Attributes

Remarks

An empty sourceRect value (specified as all zeros) copies the entire bitmap.

Applies to

CopyPixels(Int32Rect, IntPtr, Int32, Int32)

Copies the bitmap pixel data within the specified rectangle.

public:
 virtual void CopyPixels(System::Windows::Int32Rect sourceRect, IntPtr buffer, int bufferSize, int stride);
[System.Security.SecurityCritical]
public virtual void CopyPixels (System.Windows.Int32Rect sourceRect, IntPtr buffer, int bufferSize, int stride);
public virtual void CopyPixels (System.Windows.Int32Rect sourceRect, IntPtr buffer, int bufferSize, int stride);
[<System.Security.SecurityCritical>]
abstract member CopyPixels : System.Windows.Int32Rect * nativeint * int * int -> unit
override this.CopyPixels : System.Windows.Int32Rect * nativeint * int * int -> unit
abstract member CopyPixels : System.Windows.Int32Rect * nativeint * int * int -> unit
override this.CopyPixels : System.Windows.Int32Rect * nativeint * int * int -> unit
Public Overridable Sub CopyPixels (sourceRect As Int32Rect, buffer As IntPtr, bufferSize As Integer, stride As Integer)

Parameters

sourceRect
Int32Rect

The source rectangle to copy. An Empty value specifies the entire bitmap.

buffer
IntPtr

nativeint

A pointer to the buffer.

bufferSize
Int32

The size of the buffer.

stride
Int32

The stride of the bitmap.

Attributes

Remarks

An empty sourceRect value (specified as all zeros) copies the entire bitmap.

Applies to