Underflow/Overflow error exporting a Contour graph to JPEG.
Posted: Wed Jan 16, 2008 3:37 pm
I have an application with multiple graphs, which I have wrapped in a graph class. I am able to successfully export the various 2-dimensional graphs to JPeg, but when I attempt to export a 3D Surface graph, I get an System:ArithmeticExpression error in TeeChart.dll (Overflow or underflow in the arithmetic operation).
I am working in VS 2005, using C#.
Here is the function I am using to save the graphs:
public void SaveGraph(string FileName)
{
Steema.TeeChart.Export.JPEGFormat jPEG = M_CurrentGraph.Export.Image.JPEG;
jPEG.GrayScale = true;
jPEG.Height = 500;
jPEG.Width = 700;
jPEG.Quality = 100;
jPEG.Save(FileName);
}
The error occurs upon the declaration and assignment of the variable jPEG.
Here is the stack trace:
TeeChart.dll!Steema.TeeChart.Export.ImageExportFormat.ImageExportFormat(Steema.TeeChart.Chart c = {Steema.TeeChart.Chart}) + 0xaa bytes
TeeChart.dll!Steema.TeeChart.Export.JPEGFormat.JPEGFormat(Steema.TeeChart.Chart c = {Steema.TeeChart.Chart}) + 0x25 bytes
TeeChart.dll!Steema.TeeChart.Export.ImageExport.JPEG.get() + 0x2f bytes
> SensorMetrix.exe!SensorMetrix.SM_Graph.SaveGraph(string FileName = "C:\\Film_Thickness\\Part #1-1-Gray-080116101540.JPG") Line 565 + 0x22 bytes
Anyone have any suggestions?
Thanks!
I am working in VS 2005, using C#.
Here is the function I am using to save the graphs:
public void SaveGraph(string FileName)
{
Steema.TeeChart.Export.JPEGFormat jPEG = M_CurrentGraph.Export.Image.JPEG;
jPEG.GrayScale = true;
jPEG.Height = 500;
jPEG.Width = 700;
jPEG.Quality = 100;
jPEG.Save(FileName);
}
The error occurs upon the declaration and assignment of the variable jPEG.
Here is the stack trace:
TeeChart.dll!Steema.TeeChart.Export.ImageExportFormat.ImageExportFormat(Steema.TeeChart.Chart c = {Steema.TeeChart.Chart}) + 0xaa bytes
TeeChart.dll!Steema.TeeChart.Export.JPEGFormat.JPEGFormat(Steema.TeeChart.Chart c = {Steema.TeeChart.Chart}) + 0x25 bytes
TeeChart.dll!Steema.TeeChart.Export.ImageExport.JPEG.get() + 0x2f bytes
> SensorMetrix.exe!SensorMetrix.SM_Graph.SaveGraph(string FileName = "C:\\Film_Thickness\\Part #1-1-Gray-080116101540.JPG") Line 565 + 0x22 bytes
Anyone have any suggestions?
Thanks!