Description

Read a single pixel from an image.

Return Type

A Long value.  
long

the number of values returned in pvPixel: One value per channel

in the McRegionAccess. The number channels in the McRegionAccess is determined by
the channel argument of McImage.CreateRegionAccess as well as the McImageType.

Syntax

object.PutPixel (vPixel, x, y)

The PutPixel Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McRegionAccess.
vPixelRequired. A Variant value.

VARIANT : A VARIANT containing the new pixel value. The type and number of values in vPixel depends on the type and number of channels of the McRegionAccess. These parameters are defined during the creation of the McRegionAccess via McImage.CreateRegionAccess. See GetPixel for more information.

xRequired. A Long value.

long : The x-location of the pixel. 0 indicates a pixel along the edge of the McRegionAccess.

yRequired. A Long value.

long : The y-location of the pixel. 0 indicates a pixel along the first line of the McRegionAccess.

Remarks

The x and y coordinates are relative to the McRegionAccess ROI, not the image. The pixel values returned are in the requested color model, which may differ from the image's native color model. If different, the pixel values will be converted back into the native color model and the image will be modified.