6.2.1.13   Read Image...

Synopsis:
Add an image file to the current program.
Shortcut:
Ctrl+R

See also: read_image.

This menu entry provides a quick way to open an image file and access it in the current program. The associated dialog Read Image is displayed in figure 6.6.

Figure 6.6: Read Image....

File Name
You can enter the name of an image file into this field. A relative file name is looked up in several directories in that order:

  1. The current working directory (., a single dot), i.e., the directory HDevelop was started from.
  2. The subdirectory images of the directory specified by the environment variable HALCONROOT.
  3. The directories specified by the environment variable HALCONIMAGES.
  4. The directories used in previous invocations of Read Image....

The first matching image file is displayed as a thumbnail preview along with its width, height, color type and number of channels.

Alternatively, open a file selection dialog by selecting a predefined directory from the File Name combo box or clicking the browse button. The latter will start browsing in the current working directory, or in the last used directory. Depending on the operating system you may be able to switch to a thumbnail view in the file selection dialog.

Variable Name
HDevelop suggests a variable name derived from the selected file name. You may adopt or edit this name. If you want to use a name of an already created iconic variable, this combo box offers you all known iconic variable names. Simply click the arrow on the right side of the combo box to select a variable name. Note that the reuse of a variable deletes the old content and replaces it with the new image.

After selecting a file name, click OK to load the image into HDevelop. The operator read_image is inserted at the specified insert position (IC or PC). The specified iconic variable is updated in the variable window and the image is displayed in the active graphics window. Clicking Cancel aborts the operation.

By default, an absolute path to the selected image is inserted. You can instruct HDevelop to use relative path names (see General Options ▹ General Options in the preferences).