Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Save image with overlay information.

Hi All,

 

     As I am a newer to use NI Vision for c#,I don't know how to save one image with overlay information. I have succeed in saving ImageViewer.Image to Bitmap,but I want to update the result(overlay) to Bitmap,too.

     Anyone has an example for c#? Very Thanks!

 

 

     Best Regards!

     Komahe.

0 Kudos
Message 1 of 3
(5,683 Views)

I think it's got to be a bug, because I can't get the overlay to save with the image on any of the formats.  It's very frustrating!

0 Kudos
Message 2 of 3
(5,588 Views)

Actually, I just figured this out... you need to merge the overlay so that it becomes part of the image and then save it.  So it would look something like this:

 

image.Overlays.Default.Merge();

image.WritePngFile(filePath);

0 Kudos
Message 3 of 3
(5,584 Views)