To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example demonstrates how to save complex data to an image file.
Description
Complex images are typically created when performing a fast fourier transform (FFT) on an image. Pixels in a complex image consist of a real component and an imaginary component. The complex image type cannot be saved to a file format that other programs can read. When saving in other file formats, the phase (imaginary) information of the complex image will be lost.
This example can save a complex image to another file type including JPG, PNG, and BMP. This examlpe uses an invoke node to take a "screenshot" of a front panel image display and save this image to file. This does not save any of the complex information associated with the image but it does allow the user to save a "screenshot" of the complex image being displayed.
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.