Open an image file using the given mode.
Namespace: Cognex.VisionPro.ImageFileAssembly: Cognex.VisionPro.ImageFile (in Cognex.VisionPro.ImageFile.dll) Version: 85.1.0.0
Syntax
Parameters
- fileName
- Type: System String
The name of the file to open.
- mode
- Type: Cognex.VisionPro.ImageFile CogImageFileModeConstants
A CogImageFileModeConstants value indicating the mode in which to open the image file.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | mode is not a value. |
| CogFileOpenException | An error occurred while opening the specified file. |
Remarks
Opens an image file using the image file provider that corresponds to the file's extension. If more than one image file provider supports the extension, the one selected is undefined.
Default Value: Read.
See Also