GetPixelArrayARGB Method

See Also     Examples     Applies To

Stores into an array each Blue, Green, Red and Alpha components of the pixel contained into an area of the native GdPicture image.
This function redims the arPixels pixel array like this: arPixels(0 To 3, 0 to Width - 1, 0 to Height - 1).

0 To 3 means:
0: Blue value [0 ; 255]
1: Green value [0 ; 255]
2: Red value [0 ; 255]
3: Alpha value [0 ; 255]

Syntax

object.GetPixelArrayARGB (*arPixels(), nSrcLeft, nSrcTop, nWidth, nHeight)

The GetPixelArrayARGB syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
*arPixels() Required. Output 3D Byte array. (0 To 3, 0 to Width - 1, 0 to Height - 1)
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

GdPictureStatus

Category

Pixel Access Functions

Visual Basic Sample

usage of GetPixelArrayARGB() and SetPixelArrayARGB() functions to apply negative effect on the native GdPicture image


Dim arPixel() As Byte
Dim X As Long
Dim Y As Long

Call object.GetPixelArrayARGB(arPixel, 0, 0, object.GetWidth, object.GetHeight)

For X = 0 To object.GetWidth - 1
    For Y = 0 To object.GetHeight - 1
        arPixel(0, X, Y) = Not arPixel(0, X, Y) 'Blue channel
        arPixel(1, X, Y) = Not arPixel(1, X, Y) 'Green channel
        arPixel(2, X, Y) = Not arPixel(2, X, Y) 'Red channel
    Next Y
Next X
Call object.SetPixelArrayARGB(arPixel, 0, 0, object.GetWidth, object.GetHeight)






© Copyright 2008 GdPicture All rights reserved.
Documentation MAP.