Description

Writes an entire row of pixels into an image.

Return Type

A Long value.  

long* : The number of values set. See GetLine for details. This value is not affected by region masking.

Syntax

object.PutLine (vLine, y)

The PutLine Method syntax has these parts:

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

VARIANT : A VARIANT containing a SAFEARRAY containing the new pixel values. See GetLine for details.

yRequired. A Long value.

long : The 0-based line number. Line 0 is the top line of the McRegionAccess.

Remarks

The y coordinate is 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.

This function supports region masking (see RegionMask). When a mask is set, PutLine will only set the values of pixels that lie inside the mask. If the FastAccess flag is on however, masking may not take place because the client will be directly access the image. Hence clients should turn FastAccess off when using region masking. See FastAccess for details.

This is the preferred method for writing to an image.