From e10a3065f68c0c49924933388eef1d601fdd8002 Mon Sep 17 00:00:00 2001 From: wp Date: Mon, 17 Sep 2018 21:32:19 +0000 Subject: [PATCH] LCL: Activate fast reading of scaled jpeg images (issue #30408, patch by Nur Cholif Murtadho) git-svn-id: trunk@59053 - --- lcl/graphics.pp | 2 ++ lcl/include/jpegimage.inc | 1 + 2 files changed, 3 insertions(+) diff --git a/lcl/graphics.pp b/lcl/graphics.pp index 88df24a44c..3cb401a08e 100644 --- a/lcl/graphics.pp +++ b/lcl/graphics.pp @@ -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} diff --git a/lcl/include/jpegimage.inc b/lcl/include/jpegimage.inc index 934218f436..1a5bebfb3d 100644 --- a/lcl/include/jpegimage.inc +++ b/lcl/include/jpegimage.inc @@ -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);