LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save chart/graph as image file

Solved!
Go to solution

Dear all,

 

I am wondering if there is any way i can save the graph/chart with data as image file (jpg etc)? I need the image file to be saved the same as the graph/chart while the program is running. It should have colours and not black and white.

 

I knew how to do it in matlab but not sure how to do it in labview. Can anyone help me out with an example Vi that can do this in labview 2009?

 

Thank you! 

0 Kudos
Message 1 of 6
(7,054 Views)
Solution
Accepted by topic author Joven

It's quite easy. Just create the Get Image method for the graph and use one of the graphics format VIs:

 

 

Note: This is also explained in the LabVIEW Help.

Message Edited by smercurio_fc on 04-15-2010 10:44 PM
Message 2 of 6
(7,043 Views)

 

Dear Sir,

 

I have tried that but how come the chart that i save the colour grey is not uniform? I mean on the GUI, the grey is all unifrom grey but after saving into jpg or png filr, some of the areas is light grey while others is dark gray. The dark gray is around the areas on the x axis and some text area.

0 Kudos
Message 3 of 6
(7,017 Views)

You could try setting the 'image depth' to 24.

 

From the help file...

Image Depth: Indicates the color depth, or number of supported colors, of the image: 1 (1-bit, black and white), 4 (4-bit, 16 colors), 8 (8-bit, 256 colors), or 24 (24-bit, true color). The default is 8.

 

Hope that helps,

Ian

0 Kudos
Message 4 of 6
(6,999 Views)

 

Dear Smer,

 

Thanks. I got it solve already. The problem arise when i save it to jpg format instead. PNG format has no problem.

 

James koh

0 Kudos
Message 5 of 6
(6,998 Views)

Joven wrote:

 

Dear Smer,

 

Thanks. I got it solve already. The problem arise when i save it to jpg format instead. PNG format has no problem.



Yeah, JPEG is not a good format to use for computer images like this. JPEG was designed to work with photographs, and is a lossy format. PNG is the way to go.

0 Kudos
Message 6 of 6
(6,982 Views)