LCL: Activate fast reading of scaled jpeg images (issue #30408, patch by Nur Cholif Murtadho)

git-svn-id: trunk@59053 -
This commit is contained in:
wp 2018-09-17 21:32:19 +00:00
parent 17269a3edf
commit e10a3065f6
2 changed files with 3 additions and 0 deletions

View File

@ -1763,6 +1763,7 @@ type
FPerformance: TJPEGPerformance;
FProgressiveEncoding: boolean;
FQuality: TJPEGQualityRange;
FScale: TJPEGScale;
procedure SetCompressionQuality(AValue: TJPEGQualityRange);
procedure SetGrayScale(AValue: Boolean);
protected
@ -1782,6 +1783,7 @@ type
property GrayScale: Boolean read FGrayScale write SetGrayScale;
property ProgressiveEncoding: boolean read FProgressiveEncoding;
property Performance: TJPEGPerformance read FPerformance write FPerformance;
property Scale: TJPEGScale read FScale write FScale;
end;
{$ENDIF}

View File

@ -83,6 +83,7 @@ procedure TJPEGImage.InitializeReader(AImage: TLazIntfImage; AReader: TFPCustomI
begin
inherited;
TFPReaderJPEG(AReader).Performance := Performance;
TFPReaderJPEG(AReader).Scale := Scale;
end;
procedure TJPEGImage.InitializeWriter(AImage: TLazIntfImage; AWriter: TFPCustomImageWriter);