add option to supress saved message

Added option `show_msg::Bool` to `buildanimation` to show/suppress the "Saved animation to..." message.
This commit is contained in:
Yakir Luc Gagnon 2018-03-14 12:01:01 +01:00 committed by GitHub
parent 7c257a09f6
commit bfa2fd2edc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,8 @@ mp4(anim::Animation, fn = mp4fn(); kw...) = buildanimation(anim.dir, fn, false;
function buildanimation(animdir::AbstractString, fn::AbstractString,
is_animated_gif::Bool=true;
fps::Integer = 20, loop::Integer = 0,
variable_palette::Bool=false)
variable_palette::Bool=false,
show_msg::Bool=true)
fn = abspath(fn)
if is_animated_gif
@ -86,7 +87,7 @@ function buildanimation(animdir::AbstractString, fn::AbstractString,
run(`ffmpeg -v 0 -framerate $fps -loop $loop -i $(animdir)/%06d.png -pix_fmt yuv420p -y $fn`)
end
info("Saved animation to ", fn)
show_msg && info("Saved animation to ", fn)
AnimatedGif(fn)
end