Description

Creates a copy of the Aoi of this image with a different type.

Return Type

A McImage object.  

A new McImage of the given type.

Syntax

object.Convert (vType, [ImageCreationFlags])

The Convert Method syntax has these parts:

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

This can be an instance of an McImageType interface or it can be a numeric value from mcImageQuickTypes. These are

ImageCreationFlagsOptional. A mcImageCreateFlags enumeration, as described in settings.

Flag to pass to the McImages.Add method. See mcImageCreateFlags for the list of supported flags. You may also OR in mcImportPropertiesFlags to control which properties, if any are copied into the new image.

Settings

The settings for ImageCreationFlags are:

ConstantValueDescription
 mcicfDefault0
 mcicfContiguous1

If set, frames are allocated contiguously, and you cannot add to the FrameCount at a later time.

 mcicfNoInit2

Default is to initialize to 0 (black), this flag suppresses initialization.

 mcicfNoAddToCollection4

If set, the image is created, but not added to the collection (see Notes).

 mcicfNotVisible8

If set, the image is created, possibly added to collection (see above), but not made visible.

 mcipfNoImportProperties8388608

Suppress ImportProperties for functions creating an image from another.

Remarks

The CopyToNewImage method is a more generalized version of this method that allows you to specify a source rectangle other than the Aoi and also to supply a name for the new image.

The ConvertEx method is a version of this method that allows you or the user to specify how the pixel bit-depth scaling is to be handled. This method always scales the source image range to the destination image range.

If UseActiveFrameRange is TRUE, then any ActiveFrameRange is honored to decide which frames should be copied. At least one frame must be selected for copying.

If the image has an AOI, then the converted image will be the size of the rectangular bounds of the AOI, and only pixels which are foreground in the AOI will be copied into the new, converted image.