Example Code

Convert 2D LabVIEW Picture to IMAQ Image

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • Vision Development Module
  • LabVIEW

Code and Documents



This example demonstrates how to cast a Picture into an IMAQ Image.



The VI shows the process to create a IMAQ Image out of a LabVIEW 2D Picture. The process includes in the cast to a Pixmap, cast from Pixmap to Pixel Array and the cast to the IMAQ Image.
The example includes a standalone mode to test the VI without any calling code.




  • LabVIEW Base Development System 2012 (or compatible)
  • NI Vision Development Module 2012 (or compatible)


  • No hardware is necessary to use this example VI


Steps to Implement or Execute Code

  1. Download and open the attached file
  2. Run the program


Additional Information or References

Picture to IMAQ Image - Front Panel.png


Picture to IMAQ Image - Block Diagram.png


**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.