yihui / animation

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

img.nfmt as separate option from img.fmt #107

Closed MonteShaffer closed 6 years ago

MonteShaffer commented 6 years ago

It appears that img.fmt is available via ani.options under certain conditions ...

line 133

img.fmt = file.path(imgdir, paste(img.name, '%d', '.', ani.type, sep = ''))

would it be possible to make a new "ani-option" such as img.nfmt = '%d' ?

I have 64 images, and to keep them ordered, I would like to do a zero fill: 01, 02, 03, ... 64

yulijia commented 6 years ago

Thank you for your suggestion. We add new feature imgnfmt in ani.options(). You can set up the file name number format by this command ani.options(imgnfmt='%02d').