mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 02:39:37 +02:00
LCL: Activate TJpegImage.ProgressiveEncoding and .Smoothing (issue #30408, patch by Nur Cholif Murtadho).
git-svn-id: trunk@59055 -
This commit is contained in:
parent
5ba5831cbe
commit
4d63f89b51
@ -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}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user