Visual Basic |
---|
Public Sub DIBSetPixel( _ ByVal IPPixelX As Long, _ ByVal IPPixelY As Long, _ ByVal IPDIBColor As OLE_COLOR _ ) |
- IPPixelX
The x location of the pixel within the image.
Valid values are greater than or equal to zero.
- IPPixelY
The y location of the pixel within the image.
Valid values are greater than or equal to zero.
- IPDIBColor
The RGB color value or the palette index of the pixel.
Note: Value specified must be in a valid OLE_COLOR range.
If the current DIB is an 8-bit, 4-bit or 1-bit DIB, IPDIBcolor contains the palette index of the pixel. If the current DIB is a 24-bit or 16-bit DIB, IPDIBcolor contains RGB color data formatted as follows:
BBGGRR
where BB, GG and RR are 8-bit byte values. The line of Visual Basic code below illustrates using the DIBSetPixel method to set the pixel of a 24-bit DIB at location 10,10 to red.
VB example using DIBSetPixel ( ) | Copy Code |
---|---|
ImagXpress1.DIBSetPixel10,10,RGB(255,0,0) |