Click or drag to resize

IMcImagePutArea Method

Change a block of pixel values of the image.

Namespace:  MediaCy.IQL.Engine
Assembly:  MediaCy.IQL.Engine (in MediaCy.IQL.Engine.dll) Version: 10.0.6912.0
Syntax
VB
Function PutArea ( 
	vArea As Object,
	Optional lLeft As Integer = -1,
	Optional lTop As Integer = -1,
	Optional lRight As Integer = -1,
	Optional lBottom As Integer = -1,
	Optional lFrame As Integer = -2
) As Integer

Parameters

vArea
Type: SystemObject
A VARIANT containing a SAFEARRAY containing the new pixel values. The number of values contained in the SAFEARRAY should be equal to the height times width of the image times the number of channels (3 for color images). For color images, red, green, and blue values must be interlaced.
lLeft (Optional)
Type: SystemInt32
lTop (Optional)
Type: SystemInt32
lRight (Optional)
Type: SystemInt32
lBottom (Optional)
Type: SystemInt32
lFrame (Optional)
Type: SystemInt32

Return Value

Type: Int32
The number of values set. Should be (right - left + 1)*(bottom - top + 1)*image.NumberOfChannels.
Remarks
See CreateRegionAccess for a more controlled way to set pixel values.
Note 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 IMcRegionAccess.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