TeeCreateBitmap Memory Problem - TChart
Posted: Wed Dec 19, 2007 11:16 am
Hi All,
I have a problem printing TChart objects. Here is my situation:
I have a C++ project in Borland Developer Studio which uses TCharts. These charts TeeCreateBitmap method is called to extract a bitmap object which is stored in a database for use in Crystal Reports.
The chart szies are very large (3000 x 3000), so that text and and font are in the right proportion.
This is what is expected
However, in some cases this causes an EOutOfResources occurs as these images are so large, in some cases 250mb. To try to get around this, I have tried to reduce the graph size, for example 1000 x 1000. The result is shown below:
As you can see, the proportions are all wrong in comparison to the previous chart
Is there a way to get a JPEG from the TChart? Or can I call some kind of method to get the quality I want, but not return a mammoth sized TBitmap? We are working with quite a lot of legacy code and I am sure there is good reason to make this images so large, but it is a real problem when we just want to extract a JPEG for printing.
I have a problem printing TChart objects. Here is my situation:
I have a C++ project in Borland Developer Studio which uses TCharts. These charts TeeCreateBitmap method is called to extract a bitmap object which is stored in a database for use in Crystal Reports.
The chart szies are very large (3000 x 3000), so that text and and font are in the right proportion.
This is what is expected
However, in some cases this causes an EOutOfResources occurs as these images are so large, in some cases 250mb. To try to get around this, I have tried to reduce the graph size, for example 1000 x 1000. The result is shown below:
As you can see, the proportions are all wrong in comparison to the previous chart
Is there a way to get a JPEG from the TChart? Or can I call some kind of method to get the quality I want, but not return a mammoth sized TBitmap? We are working with quite a lot of legacy code and I am sure there is good reason to make this images so large, but it is a real problem when we just want to extract a JPEG for printing.