diff --git a/lcl/graphics.pp b/lcl/graphics.pp index 361c6e1229..66731c5658 100644 --- a/lcl/graphics.pp +++ b/lcl/graphics.pp @@ -1766,8 +1766,10 @@ type FProgressiveEncoding: boolean; FQuality: TJPEGQualityRange; FScale: TJPEGScale; + FSmoothing: Boolean; procedure SetCompressionQuality(AValue: TJPEGQualityRange); procedure SetGrayScale(AValue: Boolean); + procedure SetProgressiveEncoding(AValue: Boolean); protected procedure InitializeReader(AImage: TLazIntfImage; AReader: TFPCustomImageReader); override; procedure InitializeWriter(AImage: TLazIntfImage; AWriter: TFPCustomImageWriter); override; @@ -1785,9 +1787,10 @@ type property GrayScale: Boolean read FGrayScale write SetGrayScale; property MinHeight: Integer read FMinHeight write FMinHeight; property MinWidth: Integer read FMinWidth write FMinWidth; - property ProgressiveEncoding: boolean read FProgressiveEncoding; + property ProgressiveEncoding: boolean read FProgressiveEncoding write SetProgressiveEncoding; property Performance: TJPEGPerformance read FPerformance write FPerformance; property Scale: TJPEGScale read FScale write FScale; + property Smoothing: Boolean read FSmoothing write FSmoothing; end; {$ENDIF} diff --git a/lcl/include/jpegimage.inc b/lcl/include/jpegimage.inc index 9080cf5101..89d988da89 100644 --- a/lcl/include/jpegimage.inc +++ b/lcl/include/jpegimage.inc @@ -86,6 +86,7 @@ begin TFPReaderJPEG(AReader).MinWidth := MinWidth; TFPReaderJPEG(AReader).Performance := Performance; TFPReaderJPEG(AReader).Scale := Scale; + TFPReaderJPEG(AReader).Smoothing := Smoothing; end; procedure TJPEGImage.InitializeWriter(AImage: TLazIntfImage; AWriter: TFPCustomImageWriter); @@ -110,3 +111,10 @@ begin FGrayScale := AValue; FreeSaveStream; end; + +procedure TJPEGImage.SetProgressiveEncoding(AValue: boolean); +begin + if FProgressiveEncoding = AValue then Exit; + FProgressiveEncoding := AValue; + FreeSaveStream; +end;