Page 1 of 1

TJPEGPerformance

Posted: Fri Aug 01, 2008 2:04 pm
by 9342775
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

Posted: Fri Aug 01, 2008 2:22 pm
by narcis
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;

Posted: Fri Aug 01, 2008 2:59 pm
by 9342775
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.