change TCustomImagelist.AddLazarusResource: now it can be loaded from any supported graphic format

git-svn-id: trunk@13228 -
This commit is contained in:
paul 2007-12-08 18:21:35 +00:00
parent cbf87fe0b5
commit 478cd5c347

View File

@ -152,11 +152,9 @@ function TCustomImageList.AddLazarusResource(const ResourceName: string; MaskCol
var
Bmp: TBitmap;
begin
Bmp := TBitmap.Create;
Bmp := LoadBitmapFromLazarusResource(ResourceName);
if MaskColor <> clNone then
Bmp.TransparentColor := MaskColor;
Bmp.LoadFromLazarusResource(ResourceName);
Bmp.Mask(MaskColor);
Result := Add(Bmp, nil);
Bmp.Free;
end;