Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

ScatterGraph ToImage image bad quality

Hi,

 

I'm using Measurement Studio 2010 for .Net, Win7 64bit, VS2008, scatter graph.

when trying to use the ToImage method the image quality is very bad.

Please see attached images. one image was done using the ToImage method and the other a simple print screen.

Is there a way to get a good quality graph image?

 

thanks in advance for you help,

Oren

Download All
0 Kudos
Message 1 of 8
(4,252 Views)

Hi Oren,

 

I tried using the same toImage function with a ScatterGraph on my machine with Measurement Studio 2010 in Visual Studio 2008 and I wasn't seeing the same type of poor image quality that you did.  Would you mind putting your code up for us to download and try out over here? 

 

 

Regards,

 

Stephanie R.

National Instruments

Stephanie R.
National Instruments
0 Kudos
Message 2 of 8
(4,204 Views)

Hi Stephanie,

 

 

Thanks for the prompt reply. I tried now to create a new project added a new ScatterGraph and the problem did not occur. So I took my form stripped it from all components and code other than the ScatterGraph and the tried again. The problem occurs.

 

I attached the project with the rebellious ScatterGraph.

Just run the project. Click the ToClipboard button and paste the image somewhere. You should see the problem now.

By the way, this project demos the ToClipboard, but the ToImage malfunction the same way.

 

Thanks for the help,

Oren

0 Kudos
Message 3 of 8
(4,181 Views)

Hi Oren,

 

I took a look at your code and it exhibited the same behavior over here on my machine, too -- with both the ToImage() and ToClipboard() functions.  I think your code is returning these bad results because the graph is located on a tab control. When you remove the tab control and then send the graph to an image or to the clipboard, the quality is much higher.

 

The same behavior is occuring with Visual Studio 2010, as well.  I have filed a corrective action request (#286749) to R&D for this particular issue.  When any new updates on the matter come out, we will update you.  Thank you for your feedback on this matter!

 

 

Regards,

 

Stephanie R.

National Instruments

Stephanie R.
National Instruments
0 Kudos
Message 4 of 8
(4,160 Views)

Hi Stephanie,

 

It is great you found the problem!

Unfortunately it is already build in to our software that the graph is located on a tab control is there a work around I can do in the mean time?

Do you have a rough estimation how long will it take until an update will be released?

 

Thanks again,

Oren

0 Kudos
Message 5 of 8
(4,157 Views)

Hi Oren,

 

One thing you may want to look at is one of the shipping examples, titled Snippets.2008.sln.  This is found in Start >> All Programs >> National Instruments >> Measurement Studio 2010 for Visual Studio 2008 >> .NET Examples >> Application >> UISnippets.  This example uses a ScatterGraph inside a tab control, and saving it to a file or copying it to the clipboard does not cause that strange drop in resolution that you saw. 

 

I am not sure how long it will take for an update to be released, but we will let you know when this happens.  You can also keep an eye on the request made to R&D (286749) as any new updates will also be posted there.

 

 

Regards,

 

Stephanie R.

National Instruments

Stephanie R.
National Instruments
0 Kudos
Message 6 of 8
(4,139 Views)

Hi Oren,

 

R&D has found a workaround for this issue, and I would like to pass it along to you.  If you set a color to the control or tabPage's BackColor property, then the drop in resolution should disappear.  For example, If you set

 

scatterGraph1.BackColor = Color.Black;

 

then when you copy the image over the the clipboard, it should transfer as is. 

 

Hopefully this helps!

 

 

Regards,

 

Stephanie R.

National Instruments

Stephanie R.
National Instruments
0 Kudos
Message 7 of 8
(4,125 Views)

Hi Stephanie,

 

That looks much better!

Thanks for the prompt responses and the quick workaround!

 

Best regards,

Oren

0 Kudos
Message 8 of 8
(4,122 Views)