Delphi中的OpenPicDialog只能浏览Bmp and Jpg,如何浏览Gif???

解决方案 »

  1.   

    编写解析GIF格式的类,将其注册到TPicture即可!如TGifImage!
      

  2.   

    从TGraphic派生新类
    如:TGIFImage = class(TGraphic)重载几个关键过程!
    procedure SaveToStream(Stream: TStream); override;
    procedure LoadFromStream(Stream: TStream); override;
    procedure LoadFromClipboardFormat(AFormat: Word; AData: THandle; APalette: HPALETTE); override;
    procedure SaveToClipboardFormat(AFormat: Word; AData: THandle; APalette: HPALETTE); override;
    用搜索引擎从网上找关于GIF格式的文档资料,编写相应程序!TPicture.RegisterFileFormat('GIF', 'GIF Image', TGIFImage);//第一个参数为关联的后缀,第二个为描述,第三个为相关类!
    TPicture.RegisterClipboardFormat(RegisterClipboardFormat(PChar(sGIFImageFile)), TGIFImage);现成的控件TGifImage,我上面已经说了,自己用搜索引擎找!实在太懒还是考虑别做了
      

  3.   

    http://www.csdn.net/dev/Format/graphics/gif87.htm
    http://www.csdn.net/dev/Format/graphics/lzwexp.htm
    http://www.csdn.net/dev/Format/graphics/Gif89a.doc
    http://asp.6to23.com/iseesoft/devdoc/imgdoc/gif.htm
    http://asp.6to23.com/iseesoft/devdoc/imgdoc/gif.zip
    http://member.netease.com/~inetsoft/downloads/doc/fileformat/Gif.zip