To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This code demonstrates how to save the content of a picture control on hard disk as image (*.png, *.jpg, ...) or how to load an image into a picture control.
Description
LabVIEW provides 6 VIs to allow reading and writing image files - each one pertains to a specific format:
I felt that it would be useful to have a VI which figures out which image format is given, and use the correct VI.
The 2 VIs here do just that - using the Get File Extension VI, the correct read or write VI is selected to open or save the file. The VI also automatically promps the user for a path if none is provided when calling the VI.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
**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.