04-15-2010 09:18 PM
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!
Solved! Go to Solution.
04-15-2010 10:43 PM - edited 04-15-2010 10:44 PM
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.
04-16-2010 02:40 AM
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.
04-16-2010 03:49 AM
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
04-16-2010 03:49 AM
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
04-16-2010 09:04 AM
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.