C#/기초

WritePixels

딸기우유중독 2021. 12. 24. 12:15

public void WritePixels (System.Windows.Int32Rect sourceRect, Array pixels, int stride, int offset);

Parameters

sourceRectInt32Rect

The rectangle of the WriteableBitmap to update.

pixelsArray

The pixel array used to update the bitmap.

strideInt32

The stride of the update region in pixels.

offsetInt32

The input buffer offset.

 

//The stride value is calculated as the number of bytes per "pixel line" in the write rectangle:

//픽셀 라인당 바이트수로 계산 

//32x32 Rect에서 width(32)*픽셀라인바이트수(픽셀당비트/8 = 1byte)

//stride = width * bytes per pixel. ( 8bit = 1byte => BitsPerPixel/8 = BytePerPixel)

 

728x90