Hi,
On Windows 7, 32-bit or 64-bit, using TeeChart 2013 for RAD XE2, the TChart.CopyToClipboardMetafile as EMF creates an image about 70 times larger (in bytes) compared to Windows XP, 32-bit, using TeeChart 2012 for Delphi 2007. The image sizes are in this case 2Mb v30kb.
This means that Word documents embedding a lot of such images become massive. Do you know what's changed? EMF format? The TChart method? The Windows clipboard?
Thanks for any advice.
Regards
Toreba
CopyToClipboardMetafile and Windows / Office versions
Re: CopyToClipboardMetafile and Windows / Office versions
Hello Toreba,
I've run this code with all TeeChart version from v2012.05 to the actual version v2015.15 (and the current sources v2015.16).
Find here all the emf files generated:
As you can see, from v2013.09 there was an increment in sizes from about 30Kb to about 75Kb.
Note there's an exception, concretely at v2013.08, with about 370Kb. I'm not sure if this is the version where you observed the difference.
Also note, going back to GDI reduces the size of the emf files generated.
I've run this code with all TeeChart version from v2012.05 to the actual version v2015.15 (and the current sources v2015.16).
Code: Select all
uses Series, TeeConst;
var Chart1: TChart;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1:=TChart.Create(Self);
Chart1.Parent:=Self;
Chart1.Title.Text.Text:=TeeMsg_Version;
with Chart1.AddSeries(TBarSeries) as TBarSeries do
begin
FillSampleValues;
ColorEachPoint:=true;
end;
//Chart1.CopyToClipboardMetafile(true);
Chart1.SaveToMetafileEnh('E:\tmp\emfChart_v' + TeeProductName +
TeeVCLMinorVersion + '.' + TeeVCLBuildVersion +'.emf');
end;
Note there's an exception, concretely at v2013.08, with about 370Kb. I'm not sure if this is the version where you observed the difference.
Also note, going back to GDI reduces the size of the emf files generated.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: CopyToClipboardMetafile and Windows / Office versions
Yeray,
Yes, that's exactly the version I was using, in XE2. I will upgrade to a later version.
Thank you very much for your help.
Regards
Toreba
Yes, that's exactly the version I was using, in XE2. I will upgrade to a later version.
Thank you very much for your help.
Regards
Toreba
Re: CopyToClipboardMetafile and Windows / Office versions
Yeray,
I ported to TeeChart Pro 2014.12.140923 32-bit VCL, and this helped to an extent, though the files I was producing were still many times larger than they were with TeeChart 2012 for Delphi 2007. Switching back from GDI+ to GDI was much more effective, producing files of much more comparable size. So when did TChart switch to GDI+?
Thanks for your advice.
Toreba
I ported to TeeChart Pro 2014.12.140923 32-bit VCL, and this helped to an extent, though the files I was producing were still many times larger than they were with TeeChart 2012 for Delphi 2007. Switching back from GDI+ to GDI was much more effective, producing files of much more comparable size. So when did TChart switch to GDI+?
Thanks for your advice.
Toreba
Re: CopyToClipboardMetafile and Windows / Office versions
Hi Toreba,
toreba wrote:So when did TChart switch to GDI+?
http://www.teechart.net/support/viewtop ... 483#p66483Yeray wrote:TeeChart 2013.09 moved the default Canvas from GDI to GDIPlus
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |