|
@@ -83,6 +83,7 @@ type
|
|
procedure Merge (pal : TFPPalette); virtual;
|
|
procedure Merge (pal : TFPPalette); virtual;
|
|
function IndexOf (const AColor: TFPColor) : integer; virtual;
|
|
function IndexOf (const AColor: TFPColor) : integer; virtual;
|
|
function Add (const Value: TFPColor) : integer; virtual;
|
|
function Add (const Value: TFPColor) : integer; virtual;
|
|
|
|
+ procedure Clear; virtual;
|
|
property Color [Index : integer] : TFPColor read GetColor write SetColor; default;
|
|
property Color [Index : integer] : TFPColor read GetColor write SetColor; default;
|
|
property Count : integer read GetCount write SetCount;
|
|
property Count : integer read GetCount write SetCount;
|
|
end;
|
|
end;
|
|
@@ -124,7 +125,9 @@ type
|
|
procedure Assign(Source: TPersistent); override;
|
|
procedure Assign(Source: TPersistent); override;
|
|
// Saving and loading
|
|
// Saving and loading
|
|
procedure LoadFromStream (Str:TStream; Handler:TFPCustomImageReader);
|
|
procedure LoadFromStream (Str:TStream; Handler:TFPCustomImageReader);
|
|
|
|
+ procedure LoadFromStream (Str:TStream);
|
|
procedure LoadFromFile (const filename:String; Handler:TFPCustomImageReader);
|
|
procedure LoadFromFile (const filename:String; Handler:TFPCustomImageReader);
|
|
|
|
+ procedure LoadFromFile (const filename:String);
|
|
procedure SaveToStream (Str:TStream; Handler:TFPCustomImageWriter);
|
|
procedure SaveToStream (Str:TStream; Handler:TFPCustomImageWriter);
|
|
procedure SaveToFile (const filename:String; Handler:TFPCustomImageWriter);
|
|
procedure SaveToFile (const filename:String; Handler:TFPCustomImageWriter);
|
|
// Size and data
|
|
// Size and data
|
|
@@ -229,6 +232,7 @@ type
|
|
function GetDefExt (const TypeName:string) : string;
|
|
function GetDefExt (const TypeName:string) : string;
|
|
function GetTypeName (index:integer) : string;
|
|
function GetTypeName (index:integer) : string;
|
|
function GetData (const ATypeName:string) : TIHData;
|
|
function GetData (const ATypeName:string) : TIHData;
|
|
|
|
+ function GetData (index : integer) : TIHData;
|
|
function GetCount : integer;
|
|
function GetCount : integer;
|
|
public
|
|
public
|
|
constructor Create;
|
|
constructor Create;
|
|
@@ -279,6 +283,9 @@ type
|
|
StrTypeAlreadyExist,
|
|
StrTypeAlreadyExist,
|
|
StrTypeReaderAlreadyExist,
|
|
StrTypeReaderAlreadyExist,
|
|
StrTypeWriterAlreadyExist,
|
|
StrTypeWriterAlreadyExist,
|
|
|
|
+ StrCantDetermineType,
|
|
|
|
+ StrNoCorrectReaderFound,
|
|
|
|
+ StrReadWithError,
|
|
StrNoPaletteAvailable
|
|
StrNoPaletteAvailable
|
|
);
|
|
);
|
|
|
|
|
|
@@ -296,6 +303,9 @@ const
|
|
'Image type "%s" already exists',
|
|
'Image type "%s" already exists',
|
|
'Image type "%s" already has a reader class',
|
|
'Image type "%s" already has a reader class',
|
|
'Image type "%s" already has a writer class',
|
|
'Image type "%s" already has a writer class',
|
|
|
|
+ 'Error while determining image type of stream: %s',
|
|
|
|
+ 'Can''t determine image type of stream',
|
|
|
|
+ 'Error while reading stream: %s',
|
|
'No palette available'
|
|
'No palette available'
|
|
);
|
|
);
|
|
|
|
|
|
@@ -313,9 +323,9 @@ begin
|
|
raise FPImageException.Create (ErrorText[Fmt]);
|
|
raise FPImageException.Create (ErrorText[Fmt]);
|
|
end;
|
|
end;
|
|
|
|
|
|
-{$i FPPalette.inc}
|
|
|
|
-{$i FPHandler.inc}
|
|
|
|
{$i FPImage.inc}
|
|
{$i FPImage.inc}
|
|
|
|
+{$i FPHandler.inc}
|
|
|
|
+{$i FPPalette.inc}
|
|
{$i FPColCnv.inc}
|
|
{$i FPColCnv.inc}
|
|
|
|
|
|
function FPColor (r,g,b,a:word) : TFPColor;
|
|
function FPColor (r,g,b,a:word) : TFPColor;
|