Description

Reads the File or Image object.

Return Type

A McImage object.  

The Resulting McImage

Syntax

object.Read ([Flags])

The Read Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McStream.
FlagsOptional. A mcImageCreateFlags enumeration, as described in settings.

[in]

Settings

The settings for Flags 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

This function reads the source file or IStream/IStorage and stores the information in the Destination local property. Destination can be an McImage or an IStream/IStorage, or NULL, in which case an Image is created, added to the collection (based on the flags), and then returned in Destination.

The mcImageCreateFlags are those passed to McImage.Add in order to determine which type of image (added to the collection, visible, etc...) we wish. The default for Flags is mcicfDefault, which adds the image to the collection and sends notifications to the Application to create an Imaging Workspace for the new image and then to display it. The image file is closed after this call completes. The Flags property will be updated by this operation. The image Modified property will be cleared, and the File property of the image updated.