美文网首页
imageToGif

imageToGif

作者: phyiuang | 来源:发表于2021-09-02 14:38 被阅读0次

    code1:

    SetDirectory["C:\\Users\\liugang\\Desktop\\gif\\"];

    PicBegStr = "Cygwin_setup_";

    Files = FileNames[PicBegStr ~~ "*.png", Directory[]];

    Piclists = Import /@ Files

    Export[PicBegStr ~~ "gif.gif", Piclists, "DisplayDurations" -> 1,  "AnimationRepetitions" -> Infinity];

    代码来源如下:

    https://www.jianshu.com/p/fbf36614edf6

    code2:

    SetDirectory["D:\\Program Files\\DAUM\\PotPlayer\\Capture\\"];

    images=FileNames["*.jpg"];

    img=Table[Import[images[[i]]],{i,Length[images]}];

    Export["波西米亚狂想曲.gif",img,ImageSize->Scaled[.8],"DisplayDurations"->.15,AnimationRepetitions->Infty]

    代码来源如下:

    代码来源如下:

    https://www.jianshu.com/p/b3b6950b6674

    相关文章

      网友评论

          本文标题:imageToGif

          本文链接:https://www.haomeiwen.com/subject/bstcwltx.html