Data: Import from File: Image to Matrix
This X-Function supports file re-import. See this topic for details.
Import image file into a Matrix window
1. impImage fname:="C:\image\Sample.bmp";
2. impImage fname:="c:\image\Sample.bmp" options.thumbnail:=0 options.FirstMode:=4 options.names.FNameToBk:=0;
3. fname$="C:\Images\Sample.jpg";impImage;
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
File Name | fname |
Input string |
|
Specify the filename of the image file to be imported. |
File Info | info |
Input TreeNode |
|
This is for displaying the file information in the dialog. Please do not use this variable. Basic information of the file(s) (file size) to be imported is listed here. |
Import Options | options |
Input TreeNode |
|
Use this to specify the import mode. Please see the Descriptions section for details. |
Output | orng |
Output Range |
|
This is used to specify the output range. See the syntax here. Note: Matrices can exist as standalone windows or they can be embedded in a worksheet. The impImage X-Function is programmed to recognize embedded matrices and to treat them as a matrix rather than as a worksheet. Thus, when the active worksheet contains an embedded matrix, impImage is able to output the imported image to the embedded matrix in the active workbook sheet. |
Header Info | finfo |
Output TreeNode |
|
This is for outputting the header information. It is hidden from the GUI. Users are not advised to use this variable. |
Filter | trFilter |
Input TreeNode |
|
This is the TreeNode for filter. It is hidden from the GUI. Users are not advised to use this variable. |
File Index | fIndex |
Output int |
|
This is for internal use only. |
Repeat Import | reimp |
Input int |
|
This is for internal use only. |
This X-Function can be used to import image files to Origin matrix. It is accessible when workbook, matrix, or graph window is active. Supported image file types include:
The following example will show how to import multiple image files (which contain the same dimension) as the matrix objects into the matrix sheet.