delphi xe TBitmap支持Gif,成为具有jpg,gif,bmp,ico,gif五种显示功能的图片控件


本文整理自网络,侵删。

 让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五种显示功能的图片控件了!

相关阅读 >>

Delphi 读取网上的文本文件

Delphi 判断字符串是否是单词

Delphi webservices 字节数组 base64编码

Delphi 如何从url提取文件名?

Delphi 查看dpr文件

Delphi之完美splash方案

Delphi 加密解密字符串函数

Delphi xe3里判断网络是否连接成功

Delphi 根据关键字取关键词以后的字符串

判断url的有效性

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...