yihui / animation

A gallery of animations in statistics and utilities to create animations
https://yihui.org/animation/
206 stars 60 forks source link

long animations not working with saveGIF #87

Open JeromeMathieuEcology opened 7 years ago

JeromeMathieuEcology commented 7 years ago

Hi,

When I try to make an animated plot with many steps (many images), saveGIF throw an error : "command line too long".

I think it is because the command sent to convert contains the list of the images to work on, and it is too long for large animations.

Perhaps it could be handled by sending instead something like convert *.png -delay 3 -loop 0 binom.gif

Here's Microsoft's page on similar problem https://support.microsoft.com/en-us/kb/830473

Is there a way to fix this issue? Thanks, Jerome

yulijia commented 7 years ago

How many images do you used in making a animation?

Both ImageMagick and GraphicsMagick may have a limit on the number of images to be converted. It is a known issue that this function can fail with more than (approximately) 9000 images. The function saveVideo is a better alternative in such a case.

espinielli commented 7 years ago

I found a solution see dgrtwo/gganimate#47 You have to use ImageMagick internal filename globbing by quoting your filenames (note the quoted "*.png"):

convert "*.png" -delay 3 -loop 0 binom.gif
JeromeMathieuEcology commented 7 years ago

Thank you that's great !! I will have a look asap. All the best, Jerome

2017-05-30 13:26 GMT+02:00 Enrico Spinielli notifications@github.com:

I found a solution see dgrtwo/gganimate#47 https://github.com/dgrtwo/gganimate/issues/47 You have to use ImageMagick internal filename globbing by quoting your filenames (note the quoted "*.png"):

convert "*.png" -delay 3 -loop 0 binom.gif

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yihui/animation/issues/87#issuecomment-304849693, or mute the thread https://github.com/notifications/unsubscribe-auth/AMAS0t0onfGJJeTSejiMGd01mqT69PmPks5r-_zTgaJpZM4K4COI .

-- Jérôme Mathieu http://www.jerome-mathieu.com/ Université Pierre & Marie Curie http://www.upmc.fr/ Institute of Ecology and Environmental Sciences (Paris) https://ieesparis.ufr918.upmc.fr/ Team EERI

4 place Jussieu Tour 44-45, 5th floor, door 514 75005 Paris France

tel: 33 1 44 27 34 22