BitmapSource.CopyPixels Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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
- 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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기