Page 1 of 1

Black pictures when exporting

Posted: Mon May 02, 2011 12:18 pm
by 16558714
Dear Support team,

I have an issue when exporting pictures (bmp) from a chart.
It happens some times (no steps for reproduction available) that when using the ".SaveToBitmapFile()" function, TChart (or whatever) stores completely black pictures.
The charts to be exported are in background, sometimes on different Tabs.

My project uses 4 charts, and each of them sometimes creates this error, but not always.
The black pictures have the correct sizes, but not colored pixels.

Any ideas on how to solve this ?

Code: Select all

{ 1st chart }  
  chartFlange2D.SaveToBitmapFile(Path + lName + 'Chart2D.bmp');

{ 2nd chart }
    tmp:= TBMPExportFormat.Create;
    ChartP.Repaint;
    tmp.SaveToFile(Path + lName + 'Chart3D.' + tmp.FileExtension);


Re: Black pictures when exporting

Posted: Mon May 02, 2011 3:02 pm
by narcis
Hi ChZiegelt,

Could you please attach a simple example project with which we can reproduce the issue here and let us know the TeeChart version you are using?

Thanks in advance.

Re: Black pictures when exporting

Posted: Tue May 03, 2011 8:22 am
by 16558714
Hi NarcĂ­s

Thanks for your help.
I am using the beforehand last available version from Spring 2011, not the latest one.

Unfortunately I can not build a project that reproduces the error, since it only occurs in this single project.
I think it is a special situation which is somehow produced by the means I work with the chart.

I hoped that you heared abou this problem before and had a simple solution - like "repaint before export" or something.

Re: Black pictures when exporting

Posted: Tue May 03, 2011 8:32 am
by narcis
Hi ChZiegelt,

I'm sorry but haven't heard about such cases with TeeChart VCL. You could try setting BufferedDisplay to false before exporting as in the example I posted here.