IMcRegionAccessPutArea Method
|
|
Write a block of pixels to an image.
Namespace:
MediaCy.IQL.Engine
Assembly:
MediaCy.IQL.Engine (in MediaCy.IQL.Engine.dll) Version: 10.0.6912.0
SyntaxFunction PutArea (
vArea As Object,
Optional lLeft As Integer = -1,
Optional lTop As Integer = -1,
Optional lRight As Integer = -1,
Optional lBottom As Integer = -1
) As Integer
Parameters
- vArea
- Type: SystemObject
VARIANT : A VARIANT containing a SAFEARRAY containing the new
pixel values. This may be a 1-D, 2-D or 3-D array. If a 2-D or 3-D
array, the "row" width must match the requested destination pixel width
times the number of color channels per pixel (e.g., 3 for RGB data).
Here a "row" is all dimensions beyond the slowest moving one; the
rightmost in VB and the leftmost in C++.
Values will be cast to a compatible type if they need to be to match the
pixel channel type (e.g., CHAR for standard RGB McImageType). - lLeft (Optional)
- Type: SystemInt32
long : Optional. Left side of the block. Must be between 0 and
Left-1. The default value of -1 is the same as 0. - lTop (Optional)
- Type: SystemInt32
long : Optional. Top side of the area. Must be between 0 and
Bottom-1. The default value of -1 is the same as 0. - lRight (Optional)
- Type: SystemInt32
long : Optional. Right side of the area. Must be between 0 and
Right. The default value of -1 is the same as Right. - lBottom (Optional)
- Type: SystemInt32
long : Optional. Bottom side of the area. Must be between 0 and
Bottom. The default value of -1 is the same as Bottom.
Return Value
Type:
Int32
RemarksThe coordinates passes 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.
This function supports region masking (See RegionMask). When a
mask is set, PutArea 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 may be accessing the image directly.
Hence clients should turn FastAccess off to insure
that region masking will take place. See FastAccess for details.
Note |
---|
Avoid using GetArea followed by PutArea to copy large image frames.
This causes the entire image frame being copied to need to reside in memory.
Instead use the CopyInEntireArea method. Or set up your own per line loop and
use GetLine followed by PutLine (you will need to call BeginEndUpdateBlock(TRUE/FALSE)
around such a loop to avoid excessive image updating). |
See Also