Why is the gif I created so slow?












30















I am using ImageMagick to turn a collection of pngs into a single gif. I want this gif to loop as quickly as possible.



This is approximately the output I expect (courtesy of Wikipedia):



expected output



This is the output I actually get:



actual output



On my browser (Firefox 17), the expected gif runs more than twice as fast as the actual gif. This surprises me, because I specified that each frame should have 0 delay.



First I created 36 pngs by exploding the gif borrowed from Wikipedia:



--caution: command generates 36 pngs
convert.exe newton.gif newton_%d.png


Then I used coalesce to recombine the pngs into one gif.



convert.exe -dispose none -delay 0 newton_%d.png[0-35] -coalesce output.gif


identify confirms that each frame has no delay:



identify.exe -format "%T, " output.gif
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,


This is, in fact, less delay than the original:



identify.exe -format "%T, " newton.gif
5, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2,


The actual gif has less delay than the expected gif. So why is the expected gif twice as fast as the actual gif?










share|improve this question




















  • 1





    Out of curiousity, what happens if you set the delay to 1 rather than 0?

    – mgilson
    Mar 22 '13 at 14:50








  • 1





    looks like a frame-rate issue.

    – SnakeDoc
    Mar 22 '13 at 14:58











  • @mgilson, I have just tried that. The 0-delay image and 1-delay image appear to be perfectly synced. Which is odd, as the 1-delay image should lag behind 36/100ths of a second every loop.

    – Kevin
    Mar 22 '13 at 15:01






  • 1





    tl;dr on this question: Use -delay 2.

    – Matt M.
    Sep 16 '14 at 23:40


















30















I am using ImageMagick to turn a collection of pngs into a single gif. I want this gif to loop as quickly as possible.



This is approximately the output I expect (courtesy of Wikipedia):



expected output



This is the output I actually get:



actual output



On my browser (Firefox 17), the expected gif runs more than twice as fast as the actual gif. This surprises me, because I specified that each frame should have 0 delay.



First I created 36 pngs by exploding the gif borrowed from Wikipedia:



--caution: command generates 36 pngs
convert.exe newton.gif newton_%d.png


Then I used coalesce to recombine the pngs into one gif.



convert.exe -dispose none -delay 0 newton_%d.png[0-35] -coalesce output.gif


identify confirms that each frame has no delay:



identify.exe -format "%T, " output.gif
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,


This is, in fact, less delay than the original:



identify.exe -format "%T, " newton.gif
5, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2,


The actual gif has less delay than the expected gif. So why is the expected gif twice as fast as the actual gif?










share|improve this question




















  • 1





    Out of curiousity, what happens if you set the delay to 1 rather than 0?

    – mgilson
    Mar 22 '13 at 14:50








  • 1





    looks like a frame-rate issue.

    – SnakeDoc
    Mar 22 '13 at 14:58











  • @mgilson, I have just tried that. The 0-delay image and 1-delay image appear to be perfectly synced. Which is odd, as the 1-delay image should lag behind 36/100ths of a second every loop.

    – Kevin
    Mar 22 '13 at 15:01






  • 1





    tl;dr on this question: Use -delay 2.

    – Matt M.
    Sep 16 '14 at 23:40
















30












30








30


9






I am using ImageMagick to turn a collection of pngs into a single gif. I want this gif to loop as quickly as possible.



This is approximately the output I expect (courtesy of Wikipedia):



expected output



This is the output I actually get:



actual output



On my browser (Firefox 17), the expected gif runs more than twice as fast as the actual gif. This surprises me, because I specified that each frame should have 0 delay.



First I created 36 pngs by exploding the gif borrowed from Wikipedia:



--caution: command generates 36 pngs
convert.exe newton.gif newton_%d.png


Then I used coalesce to recombine the pngs into one gif.



convert.exe -dispose none -delay 0 newton_%d.png[0-35] -coalesce output.gif


identify confirms that each frame has no delay:



identify.exe -format "%T, " output.gif
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,


This is, in fact, less delay than the original:



identify.exe -format "%T, " newton.gif
5, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2,


The actual gif has less delay than the expected gif. So why is the expected gif twice as fast as the actual gif?










share|improve this question
















I am using ImageMagick to turn a collection of pngs into a single gif. I want this gif to loop as quickly as possible.



This is approximately the output I expect (courtesy of Wikipedia):



expected output



This is the output I actually get:



actual output



On my browser (Firefox 17), the expected gif runs more than twice as fast as the actual gif. This surprises me, because I specified that each frame should have 0 delay.



First I created 36 pngs by exploding the gif borrowed from Wikipedia:



--caution: command generates 36 pngs
convert.exe newton.gif newton_%d.png


Then I used coalesce to recombine the pngs into one gif.



convert.exe -dispose none -delay 0 newton_%d.png[0-35] -coalesce output.gif


identify confirms that each frame has no delay:



identify.exe -format "%T, " output.gif
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,


This is, in fact, less delay than the original:



identify.exe -format "%T, " newton.gif
5, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2,


The actual gif has less delay than the expected gif. So why is the expected gif twice as fast as the actual gif?







imagemagick gif






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 22 '13 at 15:24







Kevin

















asked Mar 22 '13 at 14:25









KevinKevin

7712810




7712810








  • 1





    Out of curiousity, what happens if you set the delay to 1 rather than 0?

    – mgilson
    Mar 22 '13 at 14:50








  • 1





    looks like a frame-rate issue.

    – SnakeDoc
    Mar 22 '13 at 14:58











  • @mgilson, I have just tried that. The 0-delay image and 1-delay image appear to be perfectly synced. Which is odd, as the 1-delay image should lag behind 36/100ths of a second every loop.

    – Kevin
    Mar 22 '13 at 15:01






  • 1





    tl;dr on this question: Use -delay 2.

    – Matt M.
    Sep 16 '14 at 23:40
















  • 1





    Out of curiousity, what happens if you set the delay to 1 rather than 0?

    – mgilson
    Mar 22 '13 at 14:50








  • 1





    looks like a frame-rate issue.

    – SnakeDoc
    Mar 22 '13 at 14:58











  • @mgilson, I have just tried that. The 0-delay image and 1-delay image appear to be perfectly synced. Which is odd, as the 1-delay image should lag behind 36/100ths of a second every loop.

    – Kevin
    Mar 22 '13 at 15:01






  • 1





    tl;dr on this question: Use -delay 2.

    – Matt M.
    Sep 16 '14 at 23:40










1




1





Out of curiousity, what happens if you set the delay to 1 rather than 0?

– mgilson
Mar 22 '13 at 14:50







Out of curiousity, what happens if you set the delay to 1 rather than 0?

– mgilson
Mar 22 '13 at 14:50






1




1





looks like a frame-rate issue.

– SnakeDoc
Mar 22 '13 at 14:58





looks like a frame-rate issue.

– SnakeDoc
Mar 22 '13 at 14:58













@mgilson, I have just tried that. The 0-delay image and 1-delay image appear to be perfectly synced. Which is odd, as the 1-delay image should lag behind 36/100ths of a second every loop.

– Kevin
Mar 22 '13 at 15:01





@mgilson, I have just tried that. The 0-delay image and 1-delay image appear to be perfectly synced. Which is odd, as the 1-delay image should lag behind 36/100ths of a second every loop.

– Kevin
Mar 22 '13 at 15:01




1




1





tl;dr on this question: Use -delay 2.

– Matt M.
Sep 16 '14 at 23:40







tl;dr on this question: Use -delay 2.

– Matt M.
Sep 16 '14 at 23:40












3 Answers
3






active

oldest

votes


















17














I experimented and created the 10ms (delay = 1) version.



10ms delay example



It seems that programs that render gifs tend to not honor the 0 hundredths of a second delay rates. Instead, they use a value that is much greater than the small value that you chose.



I can't truly comment on the reasons why they do this. I've come across more than one reason, and it's possible that its all speculation.



In general, I would recommend that you use a delay of at least two hundreds of a second in all cases.



Sources (that demonstrate how there seem to be multiple reasons for this. Some are relatively old):




  • http://blogs.msdn.com/b/ieinternals/archive/2010/06/08/animated-gifs-slow-down-to-under-20-frames-per-second.aspx

  • http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546

  • https://bugzilla.mozilla.org/show_bug.cgi?id=139677






share|improve this answer



















  • 1





    If the rendering program slows down all gifs that are too fast, then Wikipedia's gif would be just as slow as my own gif. But it isn't. Why can Wikipedia break the speed limit, and I can't?

    – Kevin
    Mar 22 '13 at 15:22






  • 2





    @Kevin: It slows down all GIFs that are too fast. Your GIFs are too fast. Wikipedia's GIFs are not too fast. You need to slow down so you won't be "too fast".

    – David Schwartz
    Mar 22 '13 at 15:29











  • The frame delays for the Wikipedia gif range between 20 ms and 50 ms. If I set my own frame delay to 20 ms, it's still slower, even though theoretically it meets the same "not too fast" criteria as the Wikipedia gif.

    – Kevin
    Mar 22 '13 at 15:33






  • 2





    If, alongside a wikipedia image that has 20ms delays, you include a gif that you've created also with 20ms delays, I will take a look.

    – David Mah
    Mar 22 '13 at 15:37






  • 2





    I was mistaken. The 20 ms gif I created is indeed as fast as the Wikipedia gif.

    – Kevin
    Mar 22 '13 at 15:53



















18














It looks like @DavidMah is right. On my Linux system, the minimum delay is 0.5:



convert -dispose none -delay 0.4 newton_%d.png[0-35] -coalesce output0.4.gif


enter image description here



convert -dispose none -delay 0.5 newton_%d.png[0-35] -coalesce output0.5.gif


enter image description here



convert -dispose none -delay 1 newton_%d.png[0-35] -coalesce output1.gif


enter image description here



For some reason the images seem not to be displayed properly in my browser. Using a local image viewer (eom), the 1st image is as slow as the one in the original question and both the others are faster than the wikipedia's. I am posting anyway in case it is a problem specific to my browser. In any case, you should get better speeds if your try the commands posted above.





UPDATE: There seem to be 2 problems. Browsers (at least y firefox and chromium running on Linux) cannot display gifs created with a delay <1.5. 1.5 works fine, 1.4 is slow. My image viewer can deal with delays of 0.5 and above. Try downloading one of the above images and opening it in your favorite image viewer. Also, have a look at these:



convert -dispose none -delay 1.4 newton_%d.png[0-35] -coalesce output1.4.gif


enter image description here



convert -dispose none -delay 1.5 newton_%d.png[0-35] -coalesce output1.5.gif


enter image description here



UPDATE2: @DavidMah points out in the comments below that decimal values are rounded to the nearest integer. So, 1.4 is rounded to 1 which is too slow while 1.5 is rounded to 2 which is OK.






share|improve this answer





















  • 7





    Beware trying to assign delays to decimal values. Delay is stored in two bytes (the implications on this is that the largest frame delay is 655360ms) and is an unsigned integer. Convert is rounding your values to be the nearest integer. en.wikipedia.org/wiki/Graphics_Interchange_Format#Animated_GIF

    – David Mah
    Mar 22 '13 at 16:04








  • 3





    @DavidMah ah, that makes sense. So 1.5 works because it is rounded to 2 while 1.4 doesn't because it's rounded to 1.

    – terdon
    Mar 22 '13 at 16:06



















5














I've had more success using the XxY delay notation, essentially the x is like a /, so if you specify -delay 1x20, the frame is displayed for 1/20th of a second.






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f569924%2fwhy-is-the-gif-i-created-so-slow%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    17














    I experimented and created the 10ms (delay = 1) version.



    10ms delay example



    It seems that programs that render gifs tend to not honor the 0 hundredths of a second delay rates. Instead, they use a value that is much greater than the small value that you chose.



    I can't truly comment on the reasons why they do this. I've come across more than one reason, and it's possible that its all speculation.



    In general, I would recommend that you use a delay of at least two hundreds of a second in all cases.



    Sources (that demonstrate how there seem to be multiple reasons for this. Some are relatively old):




    • http://blogs.msdn.com/b/ieinternals/archive/2010/06/08/animated-gifs-slow-down-to-under-20-frames-per-second.aspx

    • http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546

    • https://bugzilla.mozilla.org/show_bug.cgi?id=139677






    share|improve this answer



















    • 1





      If the rendering program slows down all gifs that are too fast, then Wikipedia's gif would be just as slow as my own gif. But it isn't. Why can Wikipedia break the speed limit, and I can't?

      – Kevin
      Mar 22 '13 at 15:22






    • 2





      @Kevin: It slows down all GIFs that are too fast. Your GIFs are too fast. Wikipedia's GIFs are not too fast. You need to slow down so you won't be "too fast".

      – David Schwartz
      Mar 22 '13 at 15:29











    • The frame delays for the Wikipedia gif range between 20 ms and 50 ms. If I set my own frame delay to 20 ms, it's still slower, even though theoretically it meets the same "not too fast" criteria as the Wikipedia gif.

      – Kevin
      Mar 22 '13 at 15:33






    • 2





      If, alongside a wikipedia image that has 20ms delays, you include a gif that you've created also with 20ms delays, I will take a look.

      – David Mah
      Mar 22 '13 at 15:37






    • 2





      I was mistaken. The 20 ms gif I created is indeed as fast as the Wikipedia gif.

      – Kevin
      Mar 22 '13 at 15:53
















    17














    I experimented and created the 10ms (delay = 1) version.



    10ms delay example



    It seems that programs that render gifs tend to not honor the 0 hundredths of a second delay rates. Instead, they use a value that is much greater than the small value that you chose.



    I can't truly comment on the reasons why they do this. I've come across more than one reason, and it's possible that its all speculation.



    In general, I would recommend that you use a delay of at least two hundreds of a second in all cases.



    Sources (that demonstrate how there seem to be multiple reasons for this. Some are relatively old):




    • http://blogs.msdn.com/b/ieinternals/archive/2010/06/08/animated-gifs-slow-down-to-under-20-frames-per-second.aspx

    • http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546

    • https://bugzilla.mozilla.org/show_bug.cgi?id=139677






    share|improve this answer



















    • 1





      If the rendering program slows down all gifs that are too fast, then Wikipedia's gif would be just as slow as my own gif. But it isn't. Why can Wikipedia break the speed limit, and I can't?

      – Kevin
      Mar 22 '13 at 15:22






    • 2





      @Kevin: It slows down all GIFs that are too fast. Your GIFs are too fast. Wikipedia's GIFs are not too fast. You need to slow down so you won't be "too fast".

      – David Schwartz
      Mar 22 '13 at 15:29











    • The frame delays for the Wikipedia gif range between 20 ms and 50 ms. If I set my own frame delay to 20 ms, it's still slower, even though theoretically it meets the same "not too fast" criteria as the Wikipedia gif.

      – Kevin
      Mar 22 '13 at 15:33






    • 2





      If, alongside a wikipedia image that has 20ms delays, you include a gif that you've created also with 20ms delays, I will take a look.

      – David Mah
      Mar 22 '13 at 15:37






    • 2





      I was mistaken. The 20 ms gif I created is indeed as fast as the Wikipedia gif.

      – Kevin
      Mar 22 '13 at 15:53














    17












    17








    17







    I experimented and created the 10ms (delay = 1) version.



    10ms delay example



    It seems that programs that render gifs tend to not honor the 0 hundredths of a second delay rates. Instead, they use a value that is much greater than the small value that you chose.



    I can't truly comment on the reasons why they do this. I've come across more than one reason, and it's possible that its all speculation.



    In general, I would recommend that you use a delay of at least two hundreds of a second in all cases.



    Sources (that demonstrate how there seem to be multiple reasons for this. Some are relatively old):




    • http://blogs.msdn.com/b/ieinternals/archive/2010/06/08/animated-gifs-slow-down-to-under-20-frames-per-second.aspx

    • http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546

    • https://bugzilla.mozilla.org/show_bug.cgi?id=139677






    share|improve this answer













    I experimented and created the 10ms (delay = 1) version.



    10ms delay example



    It seems that programs that render gifs tend to not honor the 0 hundredths of a second delay rates. Instead, they use a value that is much greater than the small value that you chose.



    I can't truly comment on the reasons why they do this. I've come across more than one reason, and it's possible that its all speculation.



    In general, I would recommend that you use a delay of at least two hundreds of a second in all cases.



    Sources (that demonstrate how there seem to be multiple reasons for this. Some are relatively old):




    • http://blogs.msdn.com/b/ieinternals/archive/2010/06/08/animated-gifs-slow-down-to-under-20-frames-per-second.aspx

    • http://humpy77.deviantart.com/journal/Frame-Delay-Times-for-Animated-GIFs-214150546

    • https://bugzilla.mozilla.org/show_bug.cgi?id=139677







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Mar 22 '13 at 15:13









    David MahDavid Mah

    30126




    30126








    • 1





      If the rendering program slows down all gifs that are too fast, then Wikipedia's gif would be just as slow as my own gif. But it isn't. Why can Wikipedia break the speed limit, and I can't?

      – Kevin
      Mar 22 '13 at 15:22






    • 2





      @Kevin: It slows down all GIFs that are too fast. Your GIFs are too fast. Wikipedia's GIFs are not too fast. You need to slow down so you won't be "too fast".

      – David Schwartz
      Mar 22 '13 at 15:29











    • The frame delays for the Wikipedia gif range between 20 ms and 50 ms. If I set my own frame delay to 20 ms, it's still slower, even though theoretically it meets the same "not too fast" criteria as the Wikipedia gif.

      – Kevin
      Mar 22 '13 at 15:33






    • 2





      If, alongside a wikipedia image that has 20ms delays, you include a gif that you've created also with 20ms delays, I will take a look.

      – David Mah
      Mar 22 '13 at 15:37






    • 2





      I was mistaken. The 20 ms gif I created is indeed as fast as the Wikipedia gif.

      – Kevin
      Mar 22 '13 at 15:53














    • 1





      If the rendering program slows down all gifs that are too fast, then Wikipedia's gif would be just as slow as my own gif. But it isn't. Why can Wikipedia break the speed limit, and I can't?

      – Kevin
      Mar 22 '13 at 15:22






    • 2





      @Kevin: It slows down all GIFs that are too fast. Your GIFs are too fast. Wikipedia's GIFs are not too fast. You need to slow down so you won't be "too fast".

      – David Schwartz
      Mar 22 '13 at 15:29











    • The frame delays for the Wikipedia gif range between 20 ms and 50 ms. If I set my own frame delay to 20 ms, it's still slower, even though theoretically it meets the same "not too fast" criteria as the Wikipedia gif.

      – Kevin
      Mar 22 '13 at 15:33






    • 2





      If, alongside a wikipedia image that has 20ms delays, you include a gif that you've created also with 20ms delays, I will take a look.

      – David Mah
      Mar 22 '13 at 15:37






    • 2





      I was mistaken. The 20 ms gif I created is indeed as fast as the Wikipedia gif.

      – Kevin
      Mar 22 '13 at 15:53








    1




    1





    If the rendering program slows down all gifs that are too fast, then Wikipedia's gif would be just as slow as my own gif. But it isn't. Why can Wikipedia break the speed limit, and I can't?

    – Kevin
    Mar 22 '13 at 15:22





    If the rendering program slows down all gifs that are too fast, then Wikipedia's gif would be just as slow as my own gif. But it isn't. Why can Wikipedia break the speed limit, and I can't?

    – Kevin
    Mar 22 '13 at 15:22




    2




    2





    @Kevin: It slows down all GIFs that are too fast. Your GIFs are too fast. Wikipedia's GIFs are not too fast. You need to slow down so you won't be "too fast".

    – David Schwartz
    Mar 22 '13 at 15:29





    @Kevin: It slows down all GIFs that are too fast. Your GIFs are too fast. Wikipedia's GIFs are not too fast. You need to slow down so you won't be "too fast".

    – David Schwartz
    Mar 22 '13 at 15:29













    The frame delays for the Wikipedia gif range between 20 ms and 50 ms. If I set my own frame delay to 20 ms, it's still slower, even though theoretically it meets the same "not too fast" criteria as the Wikipedia gif.

    – Kevin
    Mar 22 '13 at 15:33





    The frame delays for the Wikipedia gif range between 20 ms and 50 ms. If I set my own frame delay to 20 ms, it's still slower, even though theoretically it meets the same "not too fast" criteria as the Wikipedia gif.

    – Kevin
    Mar 22 '13 at 15:33




    2




    2





    If, alongside a wikipedia image that has 20ms delays, you include a gif that you've created also with 20ms delays, I will take a look.

    – David Mah
    Mar 22 '13 at 15:37





    If, alongside a wikipedia image that has 20ms delays, you include a gif that you've created also with 20ms delays, I will take a look.

    – David Mah
    Mar 22 '13 at 15:37




    2




    2





    I was mistaken. The 20 ms gif I created is indeed as fast as the Wikipedia gif.

    – Kevin
    Mar 22 '13 at 15:53





    I was mistaken. The 20 ms gif I created is indeed as fast as the Wikipedia gif.

    – Kevin
    Mar 22 '13 at 15:53













    18














    It looks like @DavidMah is right. On my Linux system, the minimum delay is 0.5:



    convert -dispose none -delay 0.4 newton_%d.png[0-35] -coalesce output0.4.gif


    enter image description here



    convert -dispose none -delay 0.5 newton_%d.png[0-35] -coalesce output0.5.gif


    enter image description here



    convert -dispose none -delay 1 newton_%d.png[0-35] -coalesce output1.gif


    enter image description here



    For some reason the images seem not to be displayed properly in my browser. Using a local image viewer (eom), the 1st image is as slow as the one in the original question and both the others are faster than the wikipedia's. I am posting anyway in case it is a problem specific to my browser. In any case, you should get better speeds if your try the commands posted above.





    UPDATE: There seem to be 2 problems. Browsers (at least y firefox and chromium running on Linux) cannot display gifs created with a delay <1.5. 1.5 works fine, 1.4 is slow. My image viewer can deal with delays of 0.5 and above. Try downloading one of the above images and opening it in your favorite image viewer. Also, have a look at these:



    convert -dispose none -delay 1.4 newton_%d.png[0-35] -coalesce output1.4.gif


    enter image description here



    convert -dispose none -delay 1.5 newton_%d.png[0-35] -coalesce output1.5.gif


    enter image description here



    UPDATE2: @DavidMah points out in the comments below that decimal values are rounded to the nearest integer. So, 1.4 is rounded to 1 which is too slow while 1.5 is rounded to 2 which is OK.






    share|improve this answer





















    • 7





      Beware trying to assign delays to decimal values. Delay is stored in two bytes (the implications on this is that the largest frame delay is 655360ms) and is an unsigned integer. Convert is rounding your values to be the nearest integer. en.wikipedia.org/wiki/Graphics_Interchange_Format#Animated_GIF

      – David Mah
      Mar 22 '13 at 16:04








    • 3





      @DavidMah ah, that makes sense. So 1.5 works because it is rounded to 2 while 1.4 doesn't because it's rounded to 1.

      – terdon
      Mar 22 '13 at 16:06
















    18














    It looks like @DavidMah is right. On my Linux system, the minimum delay is 0.5:



    convert -dispose none -delay 0.4 newton_%d.png[0-35] -coalesce output0.4.gif


    enter image description here



    convert -dispose none -delay 0.5 newton_%d.png[0-35] -coalesce output0.5.gif


    enter image description here



    convert -dispose none -delay 1 newton_%d.png[0-35] -coalesce output1.gif


    enter image description here



    For some reason the images seem not to be displayed properly in my browser. Using a local image viewer (eom), the 1st image is as slow as the one in the original question and both the others are faster than the wikipedia's. I am posting anyway in case it is a problem specific to my browser. In any case, you should get better speeds if your try the commands posted above.





    UPDATE: There seem to be 2 problems. Browsers (at least y firefox and chromium running on Linux) cannot display gifs created with a delay <1.5. 1.5 works fine, 1.4 is slow. My image viewer can deal with delays of 0.5 and above. Try downloading one of the above images and opening it in your favorite image viewer. Also, have a look at these:



    convert -dispose none -delay 1.4 newton_%d.png[0-35] -coalesce output1.4.gif


    enter image description here



    convert -dispose none -delay 1.5 newton_%d.png[0-35] -coalesce output1.5.gif


    enter image description here



    UPDATE2: @DavidMah points out in the comments below that decimal values are rounded to the nearest integer. So, 1.4 is rounded to 1 which is too slow while 1.5 is rounded to 2 which is OK.






    share|improve this answer





















    • 7





      Beware trying to assign delays to decimal values. Delay is stored in two bytes (the implications on this is that the largest frame delay is 655360ms) and is an unsigned integer. Convert is rounding your values to be the nearest integer. en.wikipedia.org/wiki/Graphics_Interchange_Format#Animated_GIF

      – David Mah
      Mar 22 '13 at 16:04








    • 3





      @DavidMah ah, that makes sense. So 1.5 works because it is rounded to 2 while 1.4 doesn't because it's rounded to 1.

      – terdon
      Mar 22 '13 at 16:06














    18












    18








    18







    It looks like @DavidMah is right. On my Linux system, the minimum delay is 0.5:



    convert -dispose none -delay 0.4 newton_%d.png[0-35] -coalesce output0.4.gif


    enter image description here



    convert -dispose none -delay 0.5 newton_%d.png[0-35] -coalesce output0.5.gif


    enter image description here



    convert -dispose none -delay 1 newton_%d.png[0-35] -coalesce output1.gif


    enter image description here



    For some reason the images seem not to be displayed properly in my browser. Using a local image viewer (eom), the 1st image is as slow as the one in the original question and both the others are faster than the wikipedia's. I am posting anyway in case it is a problem specific to my browser. In any case, you should get better speeds if your try the commands posted above.





    UPDATE: There seem to be 2 problems. Browsers (at least y firefox and chromium running on Linux) cannot display gifs created with a delay <1.5. 1.5 works fine, 1.4 is slow. My image viewer can deal with delays of 0.5 and above. Try downloading one of the above images and opening it in your favorite image viewer. Also, have a look at these:



    convert -dispose none -delay 1.4 newton_%d.png[0-35] -coalesce output1.4.gif


    enter image description here



    convert -dispose none -delay 1.5 newton_%d.png[0-35] -coalesce output1.5.gif


    enter image description here



    UPDATE2: @DavidMah points out in the comments below that decimal values are rounded to the nearest integer. So, 1.4 is rounded to 1 which is too slow while 1.5 is rounded to 2 which is OK.






    share|improve this answer















    It looks like @DavidMah is right. On my Linux system, the minimum delay is 0.5:



    convert -dispose none -delay 0.4 newton_%d.png[0-35] -coalesce output0.4.gif


    enter image description here



    convert -dispose none -delay 0.5 newton_%d.png[0-35] -coalesce output0.5.gif


    enter image description here



    convert -dispose none -delay 1 newton_%d.png[0-35] -coalesce output1.gif


    enter image description here



    For some reason the images seem not to be displayed properly in my browser. Using a local image viewer (eom), the 1st image is as slow as the one in the original question and both the others are faster than the wikipedia's. I am posting anyway in case it is a problem specific to my browser. In any case, you should get better speeds if your try the commands posted above.





    UPDATE: There seem to be 2 problems. Browsers (at least y firefox and chromium running on Linux) cannot display gifs created with a delay <1.5. 1.5 works fine, 1.4 is slow. My image viewer can deal with delays of 0.5 and above. Try downloading one of the above images and opening it in your favorite image viewer. Also, have a look at these:



    convert -dispose none -delay 1.4 newton_%d.png[0-35] -coalesce output1.4.gif


    enter image description here



    convert -dispose none -delay 1.5 newton_%d.png[0-35] -coalesce output1.5.gif


    enter image description here



    UPDATE2: @DavidMah points out in the comments below that decimal values are rounded to the nearest integer. So, 1.4 is rounded to 1 which is too slow while 1.5 is rounded to 2 which is OK.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Mar 22 '13 at 16:07

























    answered Mar 22 '13 at 15:43









    terdonterdon

    41.3k887136




    41.3k887136








    • 7





      Beware trying to assign delays to decimal values. Delay is stored in two bytes (the implications on this is that the largest frame delay is 655360ms) and is an unsigned integer. Convert is rounding your values to be the nearest integer. en.wikipedia.org/wiki/Graphics_Interchange_Format#Animated_GIF

      – David Mah
      Mar 22 '13 at 16:04








    • 3





      @DavidMah ah, that makes sense. So 1.5 works because it is rounded to 2 while 1.4 doesn't because it's rounded to 1.

      – terdon
      Mar 22 '13 at 16:06














    • 7





      Beware trying to assign delays to decimal values. Delay is stored in two bytes (the implications on this is that the largest frame delay is 655360ms) and is an unsigned integer. Convert is rounding your values to be the nearest integer. en.wikipedia.org/wiki/Graphics_Interchange_Format#Animated_GIF

      – David Mah
      Mar 22 '13 at 16:04








    • 3





      @DavidMah ah, that makes sense. So 1.5 works because it is rounded to 2 while 1.4 doesn't because it's rounded to 1.

      – terdon
      Mar 22 '13 at 16:06








    7




    7





    Beware trying to assign delays to decimal values. Delay is stored in two bytes (the implications on this is that the largest frame delay is 655360ms) and is an unsigned integer. Convert is rounding your values to be the nearest integer. en.wikipedia.org/wiki/Graphics_Interchange_Format#Animated_GIF

    – David Mah
    Mar 22 '13 at 16:04







    Beware trying to assign delays to decimal values. Delay is stored in two bytes (the implications on this is that the largest frame delay is 655360ms) and is an unsigned integer. Convert is rounding your values to be the nearest integer. en.wikipedia.org/wiki/Graphics_Interchange_Format#Animated_GIF

    – David Mah
    Mar 22 '13 at 16:04






    3




    3





    @DavidMah ah, that makes sense. So 1.5 works because it is rounded to 2 while 1.4 doesn't because it's rounded to 1.

    – terdon
    Mar 22 '13 at 16:06





    @DavidMah ah, that makes sense. So 1.5 works because it is rounded to 2 while 1.4 doesn't because it's rounded to 1.

    – terdon
    Mar 22 '13 at 16:06











    5














    I've had more success using the XxY delay notation, essentially the x is like a /, so if you specify -delay 1x20, the frame is displayed for 1/20th of a second.






    share|improve this answer






























      5














      I've had more success using the XxY delay notation, essentially the x is like a /, so if you specify -delay 1x20, the frame is displayed for 1/20th of a second.






      share|improve this answer




























        5












        5








        5







        I've had more success using the XxY delay notation, essentially the x is like a /, so if you specify -delay 1x20, the frame is displayed for 1/20th of a second.






        share|improve this answer















        I've had more success using the XxY delay notation, essentially the x is like a /, so if you specify -delay 1x20, the frame is displayed for 1/20th of a second.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 2 '14 at 14:11









        Tyson

        1,234811




        1,234811










        answered Dec 2 '14 at 12:55









        kralykkralyk

        17616




        17616






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f569924%2fwhy-is-the-gif-i-created-so-slow%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Mouse cursor on multiple screens with different PPI

            Agildo Ribeiro

            Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”