See Also Examples Applies To
Changes the pixel values contained into an area of the native GdPicture image from an array which contains each Red, Green and Blue components of color
Syntax
object.SetPixelArrayBytesRGB (*arPixels(), nDstLeft, nDstTop, nWidth, nHeight)
The SetPixelArrayBytesRGB syntax has these parts:
| Part | Description |
| object | Required. An object expression that evaluates to an object in the Applies To list. |
| *arPixels() | Required. Input 1D byte Array. |
| nDstLeft | Required. Long. The left destination pixel of the area. |
| nDstTop | Required. Long. The top destination pixel of the area. |
| nWidth | Required. Long. The width of the destination area in pixel. |
| nHeight | Required. Long. The height of the destination area in pixel. |
Returns
Long. GdPictureStatus
Category
Pixel Access Functions
Visual Basic Sample
usage of SetPixelArrayBytesRGB() and GetPixelArrayBytesRGB() functions to apply negative effect on the native GdPicture image
Dim arPixel() As Byte
Dim X As Long
Dim Y As Long
Call object.GetPixelArrayBytesRGB(arPixel, 0, 0, object.GetWidth, object.GetHeight)
For X = 0 To object.GetWidth - 1
For Y = 0 To object.GetHeight - 1
arPixel((Y * 3 * object.GetWidth) + X * 3) = Not arPixel((Y * 3 * object.GetWidth) + X * 3) 'Blue channel
arPixel((Y * 3 * object.GetWidth) + X * 3 + 1) = Not arPixel((Y * 3 * object.GetWidth) + X * 3 + 1) 'Green channel
arPixel((Y * 3 * object.GetWidth) + X * 3 + 2) = Not arPixel((Y * 3 * object.GetWidth) + X * 3 + 2) 'Red channel
Next Y
Next X
Call object.SetPixelArrayBytesRGB(arPixel, 0, 0, object.GetWidth, object.GetHeight)