Skip to content

Image Loading vTool#

The Image Loading vTool allows you to load image files from disk and use them as input for other vTools.

The Image Loading vTool outputs information about the images loaded via its output pins.

Image Loading vTool

How It Works#

The vTool allows you to specify a directory on your computer that contains image files.

Depending on the settings, some or all image files in this directory will be loaded and output via the Image output pin.

You can also specify the frequency (i.e., the frame rate) and the order of the images output, so that the vTool essentially behaves like a camera device.

Supported File Types#

  • Windows: BMP, JPG, PNG, TIF
  • Linux: PNG, TIF

Configuring the vTool#

To configure the Image Loading vTool:

Image Loading vTool Settings

  1. In the Recipe Management pane in the vTool Settings area, click Open Settings or double-click the vTool.
    The Image Loading dialog opens.
  2. In the Source area, enter the path to the directory containing your image files. Alternatively, click the button to browse files.
    The vTool will search for all images of the supported file types. Subdirectories will be ignored.


    You can also specify the full path including a file name, e.g., c:\images\test.png.

    This allows you to load a single image. Note that this is only possible if you type the full path in the text box, not if you use the button.

  3. In the Settings area, specify the following settings as required:

    • Sort by: Specifies whether to load the images in the directory in alphabetical order (A-Z or Z-A) or in random order.
    • Number of images: Number of images to be loaded. The maximum number is 99999999 images.
      By default, the vTool loads all images found in the directory. If you change the setting, only the first n images in alphabetical order (or n randomly chosen images) will be output.
    • Frames per second: Number of images to be output per second while the recipe is running. The maximum number is 500 frames per second.
    • Number of runs: Specifies how many times the image output is repeated. For example, if your directory contains 10 images and you set the number of runs to 3, the vTool will output 30 images. The value range is 1–999999999.
    • Run continuously while recipe is running: If selected, image output is repeated indefinitely. The Number of runs option will become unavailable.
  4. In the Output area, check the information displayed and make sure the settings meet your requirements.


Assume the specified directory contains three image files:

  • bar.bmp
  • baz.png
  • foo.jpg

You specify the following settings:

  • Sort by: Z-A
  • Number of images: 2
  • Frames per second: 1
  • Number of runs: 5
  • Run continuously while recipe is running: False

Now, while the recipe is running, the vTool outputs an image every second, alternating between baz.png and foo.jpg, and stops after 10 images (2 images x 5 runs).



Returns the image loaded. The output image can be used by any vTool accepting images as input.

  • Data type: Image
  • Image format: Color or mono images (according to the input image)


Returns the full path of the image currently output, including the file name.

  • Data type: String


Returns the number of the current run. For example, if the vTool is currently outputting images for the third time, RunCount returns 3. The value range is 1 up to 264 - 1. When the maximum run count is reached, the count restarts at 1.

  • Data type: Integer

Typical Successors#