SetPixelArrayARGB Method

See Also     Examples     Applies To

Changes the pixel values contained into an area of the native GdPicture image from an array which contains each each Blue, Green, Red and Alpha components of pixel.

Syntax

object.SetPixelArrayARGB (*arPixels(), nDstLeft, nDstTop, nWidth, nHeight)

The SetPixelArrayARGB syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
*arPixels() Required. Input 3D Byte Array. (1 To 4, Width, Height).
1 To 4 means:
1: Blue value [0 ; 255]
2: Green value [0 ; 255]
3: Red value [0 ; 255]
4: Alpha value [0 ; 255]
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 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.