mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 03:37:59 +01:00
LCL: Fix compilation issue with fpc 3.0.2 (TJpegImage.GrayScale).
git-svn-id: trunk@59059 -
This commit is contained in:
parent
b64daa1f84
commit
9deac7b246
@ -13,10 +13,10 @@ object Form1: TForm1
|
||||
Height = 585
|
||||
Top = 31
|
||||
Width = 676
|
||||
ActivePage = PgRead
|
||||
ActivePage = PgWrite
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 4
|
||||
TabIndex = 0
|
||||
TabIndex = 1
|
||||
TabOrder = 0
|
||||
object PgRead: TTabSheet
|
||||
Caption = 'Read'
|
||||
|
||||
@ -135,7 +135,9 @@ begin
|
||||
try
|
||||
jpeg.LoadFromFile(filename);
|
||||
jpeg.CompressionQuality := SbQuality.Position;
|
||||
{$IF FPC_FullVersion >= 30400}
|
||||
jpeg.GrayScale := CbGrayScale.Checked;
|
||||
{$IFEND}
|
||||
jpeg.ProgressiveEncoding := CbProgressive.Checked;
|
||||
jpeg.SaveToFile(newFileName);
|
||||
finally
|
||||
@ -169,6 +171,9 @@ begin
|
||||
LblProgressive.Caption := '';
|
||||
BtnReadClick(nil);
|
||||
SbQualityChange(nil);
|
||||
{$IF FPC_FullVersion >= 30400}
|
||||
CbGrayScale.Enabled := false;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TForm1.GetFileName: String;
|
||||
|
||||
@ -1784,7 +1784,7 @@ type
|
||||
class function GetFileExtensions: string; override;
|
||||
public
|
||||
property CompressionQuality: TJPEGQualityRange read FQuality write SetCompressionQuality;
|
||||
property GrayScale: Boolean read FGrayScale write SetGrayScale;
|
||||
property GrayScale: Boolean read FGrayScale {$IF FPC_FullVersion >= 30400} write SetGrayScale{$IFEND};
|
||||
property MinHeight: Integer read FMinHeight write FMinHeight;
|
||||
property MinWidth: Integer read FMinWidth write FMinWidth;
|
||||
property ProgressiveEncoding: boolean read FProgressiveEncoding write SetProgressiveEncoding;
|
||||
|
||||
@ -95,7 +95,9 @@ begin
|
||||
if not(AWriter is TFPWriterJPEG) then Exit;
|
||||
TFPWriterJPEG(AWriter).ProgressiveEncoding := ProgressiveEncoding;
|
||||
TFPWriterJPEG(AWriter).CompressionQuality := CompressionQuality;
|
||||
{$IF FPC_FullVersion >= 30400}
|
||||
TFPWriterJPEG(AWriter).GrayScale := GrayScale;
|
||||
{$IFEND}
|
||||
end;
|
||||
|
||||
procedure TJPEGImage.SetCompressionQuality(AValue: TJPEGQualityRange);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user