Description

Set a pixel value.

Return Type

A Long value.  

The number of values set. One value set per channel (1 for gray scale images, 3 for color images)

Syntax

object.PutPixel (vPixel, x, y, [Frame])

The PutPixel Method syntax has these parts:

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

A VARIANT containing the new pixel value. For gray scale images, this could be any simple integer or floating point type. For color images, this is a SAFEARRAY containing three values.

xRequired. A Long value.

The x-location of the pixel. 0 indicates a pixel along the edge of the image.

yRequired. A Long value.

The y-location of the pixel. 0 indicates a pixel along the first line of the image.

FrameOptional. A Long value.

Optional. 0-based frame number, McActiveFrame, McLastFrame. Default is McActiveFrame.

Remarks

See CreateRegionAccess for a more controlled way to set pixel values.