LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to export XY Graph as PNG?

Solved!
Go to solution

I am exporting the results of an XY Graph as an image using the Export Image Invoke Node. This method only allows users to export as .bmp, .emf, .eps, and .pict. I want to export a .png, so I worked around this issue by writing the .bmp file, reading its image data, deleting the original .bmp, and replacing it with a .png (using Read BMP File.vi and Write PNG File.vi). If possible, I would like to avoid ever having to write the .bmp, as it is about 15-20x the size and just takes up extra time for a file I am never going to use. Is there a better way to do what I am trying to do?

 

I have attached my VI in case my process wasn't clear enough (sorry for the mess of wires)!

0 Kudos
Message 1 of 4
(1,191 Views)
Solution
Accepted by topic author chrisl03

Use invoke node Get Image instead of Export Image.  Then you can use Write PNG File.vi

 

George Zou
Message 2 of 4
(1,186 Views)

That's perfect. Thanks so much!

0 Kudos
Message 3 of 4
(1,178 Views)

Just to add some details, here is a snippet of a VI I keep in my reuse library.  It does use two other VIs from my reuse, but I added notes to state what they do.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 4
(1,166 Views)