From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Creating an Array of Pictures in LabVIEW

Code and Documents

Attachment

Overview


This example explains how to create an array of pictures in LabVIEW.

Introduction

An easy method of creating an array of pictures in LabVIEW uses a combination of VIs from the Programming»Graphics & Sound»Graphics Formats and Programming»Graphics & Sound»Picture Functions sub-palettes.

First, use one or more path controls to select the locations of the pictures you want to build into the array.  Pass these paths into one or more Read JPEG File, Read PNG File, or Read BMP File functions from the Graphics Formats sub-palette. Currently, LabVIEW only supports these three file types. Pass the outputs from these functions into one or more Draw Flattened Pixmap VIs from the Picture Functions palette.  The outputs from these VIs can then be passed into a Build Array function and on to an array of Picture controls from the Modern»Graph»Controls sub-palette.

The VI attached to this article illustrates this method.  Below is a snippet of the Block Diagram.

 

 

Additional Resources

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

Contributors