mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 02:28:04 +02:00
LCL: added flag -dDisableLCLJPEG
git-svn-id: trunk@56915 -
This commit is contained in:
parent
151a644780
commit
b89efa53dc
@ -37,7 +37,6 @@ interface
|
||||
{$DEFINE HasFPJoinStyle}
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
uses
|
||||
// RTL + FCL
|
||||
SysUtils, Math, Types, Classes, Contnrs, Laz_AVL_Tree,
|
||||
@ -45,7 +44,9 @@ uses
|
||||
FPWriteBMP, // bmp support
|
||||
FPWritePNG, PNGComn, // png support
|
||||
FPReadPNM, FPWritePNM, // PNM (Portable aNyMap) support
|
||||
{$IFNDEF DisableLCLJPEG}
|
||||
FPReadJpeg, FPWriteJpeg, // jpg support
|
||||
{$ENDIF}
|
||||
FPReadTiff, FPTiffCmn, // tiff support
|
||||
FPReadGif,
|
||||
// LazUtils
|
||||
@ -452,7 +453,9 @@ type
|
||||
TIcon = class; // ico
|
||||
TPortableNetworkGraphic = class; // png
|
||||
TPortableAnyMapGraphic = class; // pnm formats: pbm, pgm and ppm
|
||||
{$IFNDEF DisableLCLJPEG}
|
||||
TJpegImage = class; // jpg
|
||||
{$ENDIF}
|
||||
TGIFImage = class; // gif (read only)
|
||||
|
||||
{ TGraphicsObject
|
||||
@ -947,7 +950,9 @@ type
|
||||
procedure ForceType(GraphicType: TGraphicClass);
|
||||
function GetBitmap: TBitmap;
|
||||
function GetIcon: TIcon;
|
||||
{$IFNDEF DisableLCLJPEG}
|
||||
function GetJpeg: TJpegImage;
|
||||
{$ENDIF}
|
||||
function GetPNG: TPortableNetworkGraphic;
|
||||
function GetPNM: TPortableAnyMapGraphic;
|
||||
function GetPixmap: TPixmap;
|
||||
@ -956,7 +961,9 @@ type
|
||||
procedure ReadData(Stream: TStream);
|
||||
procedure SetBitmap(Value: TBitmap);
|
||||
procedure SetIcon(Value: TIcon);
|
||||
{$IFNDEF DisableLCLJPEG}
|
||||
procedure SetJpeg(Value: TJpegImage);
|
||||
{$ENDIF}
|
||||
procedure SetPNG(const AValue: TPortableNetworkGraphic);
|
||||
procedure SetPNM(const AValue: TPortableAnyMapGraphic);
|
||||
procedure SetPixmap(Value: TPixmap);
|
||||
@ -1002,7 +1009,9 @@ type
|
||||
public
|
||||
property Bitmap: TBitmap read GetBitmap write SetBitmap;
|
||||
property Icon: TIcon read GetIcon write SetIcon;
|
||||
{$IFNDEF DisableLCLJPEG}
|
||||
property Jpeg: TJpegImage read GetJpeg write SetJpeg;
|
||||
{$ENDIF}
|
||||
property Pixmap: TPixmap read GetPixmap write SetPixmap;
|
||||
property PNG: TPortableNetworkGraphic read GetPNG write SetPNG;
|
||||
property PNM: TPortableAnyMapGraphic read GetPNM write SetPNM;
|
||||
@ -1823,6 +1832,7 @@ type
|
||||
end;
|
||||
|
||||
|
||||
{$IFNDEF DisableLCLJPEG}
|
||||
{ TSharedJpegImage }
|
||||
|
||||
TSharedJpegImage = class(TSharedCustomBitmap)
|
||||
@ -1856,6 +1866,7 @@ type
|
||||
property ProgressiveEncoding: boolean read FProgressiveEncoding;
|
||||
property Performance: TJPEGPerformance read FPerformance write FPerformance;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{ TSharedTiffImage }
|
||||
|
||||
@ -2375,7 +2386,9 @@ end;
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterClasses([TBitmap,TPixmap,TPortableNetworkGraphic,
|
||||
TPortableAnyMapGraphic,TJpegImage,TGIFImage,TPicture,
|
||||
TPortableAnyMapGraphic,
|
||||
{$IFNDEF DisableLCLJPEG}TJpegImage,{$ENDIF}
|
||||
TGIFImage,TPicture,
|
||||
TFont,TPen,TBrush,TRegion]);
|
||||
end;
|
||||
|
||||
@ -2762,7 +2775,9 @@ end;
|
||||
{$I pixmap.inc}
|
||||
{$I png.inc}
|
||||
{$I pnm.inc}
|
||||
{$IFNDEF DisableLCLJPEG}
|
||||
{$I jpegimage.inc}
|
||||
{$ENDIF}
|
||||
{$I icon.inc}
|
||||
{$I icnsicon.inc}
|
||||
{$I cursorimage.inc}
|
||||
|
@ -49,7 +49,9 @@ begin
|
||||
Add(TCursorImage.GetFileExtensions, rsCursor, TCursorImage);
|
||||
Add(TIcon.GetFileExtensions, rsIcon, TIcon);
|
||||
Add(TIcnsIcon.GetFileExtensions, rsIcns, TIcnsIcon);
|
||||
{$IFNDEF DisableLCLJPEG}
|
||||
Add(TJpegImage.GetFileExtensions, rsJpeg, TJpegImage);
|
||||
{$ENDIF}
|
||||
Add(TTiffImage.GetFileExtensions, rsTiff, TTiffImage);
|
||||
Add(TGIFImage.GetFileExtensions, rsGIF, TGIFImage);
|
||||
Add(TPortableAnyMapGraphic.GetFileExtensions, rsPortablePixmap, TPortableAnyMapGraphic);
|
||||
@ -247,7 +249,9 @@ begin
|
||||
Add(PredefinedClipboardFormat(pcfPixmap), TPixmap);
|
||||
//Add(PredefinedClipboardFormat(pcfIcon), TCustomIcon);
|
||||
Add(ClipboardRegisterFormat(sMimeTypePng), TPortableNetworkGraphic);
|
||||
{$IFNDEF DisableLCLJPEG}
|
||||
Add(ClipboardRegisterFormat(sMimeTypeJpg), TJPegImage);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure TPicClipboardFormats.Clear;
|
||||
@ -436,11 +440,13 @@ begin
|
||||
Result := TIcon(Graphic);
|
||||
end;
|
||||
|
||||
{$IFNDEF DisableLCLJPEG}
|
||||
function TPicture.GetJpeg: TJpegImage;
|
||||
begin
|
||||
ForceType(TJpegImage);
|
||||
Result := TJpegImage(Graphic);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TPicture.SetBitmap(Value: TBitmap);
|
||||
begin
|
||||
@ -467,10 +473,12 @@ begin
|
||||
SetGraphic(Value);
|
||||
end;
|
||||
|
||||
{$IFNDEF DisableLCLJPEG}
|
||||
procedure TPicture.SetJpeg(Value: TJpegImage);
|
||||
begin
|
||||
SetGraphic(Value);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TPicture.SetGraphic(Value: TGraphic);
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user