[Visual Basic] Public Function GetBitmapPixel( _ x As Integer, y As Integer, _ palette As Byte, red As Byte, green As Byte, blue As Byte _ ) As Boolean
[C#] public bool GetBitmapPixel( int x, int y, ref byte palette, ref byte red, ref byte green, ref byte blue );
パラメータ
- x,y
- 取得するピクセルのX,Y座標
- palette
- パレット番号を取得する変数
- red
- RGBの赤を取得する変数
- green
- RGBの緑を取得する変数
- blue
- RGBの青を取得する変数
戻り値
成功の場合は true、失敗の場合は false を返します。
解説
LayerNumber
プロパティによって処理されるイメージが決まります。
1,4,8ビットイメージの場合はPalette、16,24,32ビットイメージの場合はred,green,blueに有効な値が設定されます。
処理の流れとしては
StartBitmapAccess
|
GetBitmapPixel, SetBitmapPixel
|
EndBitmapAccess
となります。
コード例についてはStartBitmapAccessメソッドを参照してください。