TJPEGPerformance

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
mc
Newbie
Newbie
Posts: 26
Joined: Fri Jul 15, 2005 4:00 am

TJPEGPerformance

Post by mc » Fri Aug 01, 2008 2:04 pm

I am using TeeSaveToJPEGFile in Delphi:
TeeSaveToJPEGFile( self.PointChart,
'c:\Temp.jpg',
False, // not gray scale
jpBestQuality,
95, // compression
513*1.25, 497*1.25 );

The problem is that jpBestQuality is not defined. Where is it?

Thanks

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Aug 01, 2008 2:22 pm

Hi mc,

You need to include JPeg unit at the uses section. Code below works fine here:

Code: Select all

uses TeeJPEG, jpeg;

procedure TForm1.FormCreate(Sender: TObject);
begin
  TeeSaveToJPEGFile( Chart1,
    'c:\Temp.jpg',
    False, // not gray scale
    jpBestQuality,
    95, // compression
    Round(513*1.25),
    Round(497*1.25) );
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

mc
Newbie
Newbie
Posts: 26
Joined: Fri Jul 15, 2005 4:00 am

Post by mc » Fri Aug 01, 2008 2:59 pm

Thanks, that works.

What I am trying to do is create an enlarged copy of the chart and copy it into an excel sheet. The result is that the chart that ends up in the excel sheet does not have very good resolution. However, if in the app where the chart is displayed to the user, I stretch the chart manually and then do "TeeSaveToJPEG" and then "insert pic" in excel, I get a much better image.

Post Reply