See Also Examples Applies To
Set pixel indexes from an array to an area of the palettized 8bpp native GdPicture image.
Syntax
object.SetPixelArray8bpp1D (*arPixels(), nSrcLeft, nSrcTop, nWidth, nHeight)
The SetPixelArray8bpp1D syntax has these parts:
| Part | Description |
| object | Required. An object expression that evaluates to an object in the Applies To list. |
| *arPixels() | Required. Input (0 based) Byte Array. pixel indexes. each entrie of the array is a reference to a palette index [0 - 255]. |
| nSrcLeft | Required. Long. The left source pixel of the area. |
| nSrcTop | Required. Long. The top source pixel of the area. |
| nWidth | Required. Long. The width of the area in pixel. |
| nHeight | Required. Long. The height of the area in pixel. |
Returns
Long. GdPictureStatus
Remarks
This function works only with 8bpp image.
Category
Pixel Access Functions
Visual Basic Sample
usage of GetPixelArray8bpp1D() and SetPixelArray8bpp1D() functions to apply negative effect on the 8bpp grayscale native GdPicture image.
Dim arPixel() As Byte
Dim X As Long
Dim Y As Long
Call object.GetPixelArray8bpp1D(arPixel, 0, 0, object.GetWidth, object.GetHeight)
For X = 0 To object.GetWidth - 1
For Y = 0 To object.GetHeight - 1
arPixel((Y * object.GetWidth) + X) = Not arPixel((Y * object.GetWidth) + X)
Next Y
Next X
Call object.SetPixelArray8bpp1D(arPixel, 0, 0, object.GetWidth, object.GetHeight)