animation icon indicating copy to clipboard operation
animation copied to clipboard

long animations not working with saveGIF

Open JeromeMathieuEcology opened this issue 8 years ago • 3 comments

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

JeromeMathieuEcology avatar Nov 21 '16 10:11 JeromeMathieuEcology

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.

yulijia avatar Nov 22 '16 03:11 yulijia

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

espinielli avatar May 30 '17 11:05 espinielli

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 [email protected]:

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

JeromeMathieuEcology avatar Jun 07 '17 07:06 JeromeMathieuEcology