To download NI software, including the products shown below, visit ni.com/downloads.
This example demonstrates how to save the ROI (Region Of Interest) with an image and restore the ROI from the image later.
Description
It is sometimes useful to store additional information in an image, which are not visible for the user. This can be archived with the custom data provided by the PNG file format.
The custom data are non-visible if you open the PNG file for display. You can write the custom data with the IMAQ Write Custom Data VI or read it with IMAQ Read Custom Data VI.
This VI demonstrates how to use both functions. It stores the information for a Region of Interest (ROI) inside the custom data and restores the data later.
This concept is not limited to the ROI information and can be used to store every kind of information. Only the PNG file format provides the ability to store custom data. Conversion or editing the image can destroy the custom data.
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.