Balluff - mvVirtualDevice Technical Documentation
Using FreeImage

The mvVirtualDevice library as well as the mvDeviceManager library are capable of connecting to a custom version of the FreeImage library derived from these sources: https://github.com/danoli3/FreeImage. This allows the mvVirtualDevice library to capture various image files like JPG or PNG from a user defined directory. Also captured images can be stored to hard disk by calling appropriate API functions implemented inside the mvDeviceManager library. For license information regarding FreeImage please refer to the Legal Notice section of the API manuals of Impact Acquire.

Note
The original project is hosted here: http://freeimage.sourceforge.net/, but hasn't been maintained in quite a while now and due to various CVEs, which have been published in the meantime Impact Acquire did switch to the forked project being maintained on GitHub now.

When the FreeImage library has been detected on the system, running an instance of the VirtualDevice the property imageType of the class CameraSettingsVirtualDevice will offer more valid values such as vditTIFF when reading this properties translation dictionary.

The Impact Acquire framework always supports the latest of these versions of the FreeImage library only, since currently this is a custom build version with reduced image format support in order to reduce the potential attack surface of this library to a minimum. The source code modifications applied to the original version are part of the Impact Acquire installation package allowing to rebuild the exact version of the FreeImage library used by Impact Acquire.

Both the mvVirtualDevice as well the mvDeviceManager library try to locate and load the FreeImage library using the path from this list:

  • $(MVIMPACT_ACQUIRE_DIR)/Toolkits/FreeImage-3.19.9/Dist/arm64/libfreeimage-3.19.9.so (ARM64 Linux systems)
  • $(MVIMPACT_ACQUIRE_DIR)/Toolkits/FreeImage-3.19.9/Dist/armhf/libfreeimage-3.19.9.so (ARM hf Linux systems)
  • $(MVIMPACT_ACQUIRE_DIR)/Toolkits/FreeImage-3.19.9/Dist/x86_64/libfreeimage-3.19.9.so (x86_64 Linux systems)
  • $(MVIMPACT_ACQUIRE_DIR)/Toolkits/FreeImage-3.19.9/Dist/x32/FreeImage.dll (32-bit Windows systems)
  • $(MVIMPACT_ACQUIRE_DIR)/Toolkits/FreeImage-3.19.9/Dist/x64/FreeImage.dll (64-bit Windows systems)
Note
Since the main header file of the FreeImage project has been slightly modified as well, adding libraries built in a different configuration here can result in undefined behaviour!