BitmapSource.CopyPixels 方法

定義

複製點陣圖像素資料。Copies the bitmap pixel data.

多載

CopyPixels(Array, Int32, Int32)

將點陣圖像素資料複製到具有所指定步距 的像素陣列 (從指定的位移 (Offset) 開始)。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)

將點陣圖像素資料複製到具有所指定步距 的像素陣列 (從指定的位移 (Offset) 開始)。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);
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)

參數

pixels
Array

目的陣列。The destination array.

stride
Int32

點陣圖的步距。The stride of the bitmap.

offset
Int32

開始複製作業的像素位置。The pixel location where copying starts.

屬性

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);
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)

參數

sourceRect
Int32Rect

要複製的來源矩形。The source rectangle to copy. Empty 值會指定整個點陣圖。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.

屬性

備註

空的 sourceRect 值(指定為全部零)會複製整個點陣圖。An empty sourceRect value (specified as all zeros) copies the entire bitmap.

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);
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)

參數

sourceRect
Int32Rect

要複製的來源矩形。The source rectangle to copy. Empty 值會指定整個點陣圖。An Empty value specifies the entire bitmap.

buffer
IntPtr

緩衝區的指標。A pointer to the buffer.

bufferSize
Int32

緩衝區的大小。The size of the buffer.

stride
Int32

點陣圖的步距。The stride of the bitmap.

屬性

備註

空的 sourceRect 值(指定為全部零)會複製整個點陣圖。An empty sourceRect value (specified as all zeros) copies the entire bitmap.

適用於