让TBitmap支持Gif,成为具有jpg,gif,bmp,ico,gif五种显示功能的图片控件
TImage要支持Gif,代码,我查的xe5的新增功能,亲自调试无错误,特来分享!
var
stream: TResourceStream;
tbimap: TBitmap;
begin
BitmapListAnimation1.AnimationBitmap.LoadFromFile('本地图片地址',',',');
BitmapListAnimation1.AnimationCount := 4;
BitmapListAnimation1.AnimationRowCount := 1;
//BitmapListAnimation1.PropertyName := 'TEST';
BitmapListAnimation1.AnimationBitmap.CopyFromBitmap(tbimap,',',');
BitmapListAnimation1.Enabled := true;
BitmapListAnimation1.Start(,',',');
image1.Bitmap := tbimap;
end;
这样就成为:TBitmap支持Gif,成为具有jpg,gif,bmp,ico,gif五种显示功能的图片控件了!
关键字词: