See Also Examples Applies To
Changes the pixel values contained into an area of the native GdPicture image from an array which contains each Alpha, Red, Green and Blue components of color
Syntax
object.SetPixelArrayBytesARGB (*arPixels(), nDstLeft, nDstTop, nWidth, nHeight)
The SetPixelArrayBytesARGB 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. The array of pixel component values. |
| 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 SetPixelArrayBytesARGB() and GetPixelArrayBytesARGB() functions to apply negative effect on the native GdPicture image
Dim arPixel() As Byte
Dim X As Long
Dim Y As Long
Call object.GetPixelArrayBytesARGB(arPixel, 0, 0, object.GetWidth, object.GetHeight)
For X = 0 To object.GetWidth - 1
For Y = 0 To object.GetHeight - 1
arPixel((Y * 4 * object.GetWidth) + X * 4) = Not arPixel((Y * 4 * object.GetWidth) + X * 4) 'Blue channel
arPixel((Y * 4 * object.GetWidth) + X * 4 + 1) = Not arPixel((Y * 4 * object.GetWidth) + X * 4 + 1) 'Green channel
arPixel((Y * 4 * object.GetWidth) + X * 4 + 2) = Not arPixel((Y * 4 * object.GetWidth) + X * 4 + 2) 'Red channel
Next Y
Next X
Call object.SetPixelArrayBytesARGB(arPixel, 0, 0, object.GetWidth, object.GetHeight)