# 2.7.28 impImage

Data: Import from File: Image to Matrix

This X-Function supports file re-import. See this topic for details.

## Brief Information

Import image file into a Matrix window

## Command Line Usage

 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;  ## Variables Display Name Variable Name I/O and Type Default Value Description File Name fname Input string fname$

Specify the filename of the image file to be imported.

File Info info

Input

TreeNode

<unassigned>

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

<unassigned>

Use this to specify the import mode. Please see the Descriptions section for details.

Output orng

Output

Range

<active>

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.

Output

TreeNode

<unassigned>

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

<optional>

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

<optional>

This is for internal use only.

Repeat Import reimp

Input

int

0

This is for internal use only.

## Description

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:

• Bitmap (*.bmp)
• Graphics Interchange Format (*.gif)
• Joint Photographic Experts Group (*.jpg, *jpe, *jpeg)
• Zsoft PC Paintbrush Bitmap (*.pcx)
• Portable Network Graphics (*.png)
• Truevision Targa (*.tga)
• Tag Image File (*.tif, *tiff)
• Windows MetaFile (*.wmf)
• Enhanced MetaFile (*.emf)

### Details on Some Dialog Options

• Import Options(options)