05-05-2009 02:14 PM
The VB Reference manual states for the WriteImageAndVisionInfo function: "Writes an image, along with extra vision information associated with the image, to a PNG file. This extra vision information includes overlay, pattern matching template, and calibration information, and custom data."
What is this custom data? How do I implement the function to write custom data?
On a related note, the WriteCustomStringData function "associates a string with a keyname in an image." Can this string be embedded into the image file? If so, how?
Thanks!
05-05-2009 06:10 PM
Steverino -
The WriteImageAndVisionInfo function writes the custom data contained in the image to a file. To write/read the custom data in an image, check out the following functions:
CWIMAQVision.ReadCustomData
CWIMAQVision.ReadCustomStringData
CWIMAQVision.WriteCustomData
CWIMAQVision.WriteCustomStringData
Does that answer your question?
Greg Stoll
Vision R&D
National Instruments
05-06-2009 09:50 AM
>> CWIMAQVision.ReadCustomData
>> CWIMAQVision.ReadCustomStringData
>> CWIMAQVision.WriteCustomData
>> CWIMAQVision.WriteCustomStringData
I do not believe that data embedded into the image using these functions actually save the data with this image when the image is written to disk. Is that correct?
Thanks!
05-06-2009 10:23 AM
Steverino -
If you write custom data to the image, and then save the image with WriteImageAndVisionInfo, the data is saved with the image. If you then open it with ReadImageAndVisionInfo you should be able to read the custom data back.
Greg Stoll
Vision R&D
National Instruments