GIF 动画建立

var Gif:TGifImage;
begin
    //Setting the delay for each frame
    TGIFGraphicControlExtension.Create(Gif.Add(image1.Picture.Bitmap)).Delay := 300;
    TGIFGraphicControlExtension.Create(Gif.Add(image2.Picture.Bitmap)).Delay := 300;
    TGIFGraphicControlExtension.Create(Gif.Add(image3.Picture.Bitmap)).Delay := 300;
    //Adding loop extension in the first frame (0 = forever)
    TGIFAppExtNSLoop.Create(Gif.Images.Frames[0]).Loops := 0;

    Gif.SaveToFile('gif.gif');
end;
分享到: