【Delphi】GIF 动画建立

时间:2023-03-08 17:20:51
var Gif:TGifImage;
begin
//Setting the delay for each frame
TGIFGraphicControlExtension.Create(Gif.Add(image1.Picture.Bitmap)).Delay := ;
TGIFGraphicControlExtension.Create(Gif.Add(image2.Picture.Bitmap)).Delay := ;
TGIFGraphicControlExtension.Create(Gif.Add(image3.Picture.Bitmap)).Delay := ;
//Adding loop extension in the first frame (0 = forever)
TGIFAppExtNSLoop.Create(Gif.Images.Frames[]).Loops := ; Gif.SaveToFile('gif.gif');
end;