How to determine the length of a .gif animation in milliseconds

后端 未结 3 1918
清酒与你
清酒与你 2021-01-13 22:19

Is there an easy way to figure out approximately how long a .gif image takes to play one time in Javascript?

3条回答
  •  星月不相逢
    2021-01-13 22:50

    I tried ImageMagick identify but it didn't give me the correct duration.

    I found another reliable way using ExifTool

    exiftool -Duration image.gif

    It will print out the duration in seconds:

    Duration : 0.48 s

提交回复
热议问题