From 91aa1d718a5a2616806ff0fdb8859e0f92daa74e Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Wed, 22 Jun 2016 11:01:00 -0400 Subject: [PATCH] animations: use tmp.gif for ijulia, remove prefix from convert call; closes #346 --- src/animation.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/animation.jl b/src/animation.jl index 77e41d91..edd90fe8 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -24,7 +24,7 @@ immutable AnimatedGif filename::Compat.ASCIIString end -function gif(anim::Animation, fn = tempname()*".gif"; fps::Integer = 20) +function gif(anim::Animation, fn = (isijulia() ? "tmp.gif" : tempname()*".gif"); fps::Integer = 20) fn = abspath(fn) try @@ -35,8 +35,8 @@ function gif(anim::Animation, fn = tempname()*".gif"; fps::Integer = 20) if isfile(file) && !haskey(ENV, "MAGICK_CONFIGURE_PATH") include(file) end - prefix = get(ENV, "MAGICK_CONFIGURE_PATH", "") - run(`$(joinpath(prefix, "convert")) -delay $speed -loop 0 $(joinpath(anim.dir, "*.png")) -alpha off $fn`) + # prefix = get(ENV, "MAGICK_CONFIGURE_PATH", "") + run(`convert -delay $speed -loop 0 $(joinpath(anim.dir, "*.png")) -alpha off $fn`) catch err warn("""Tried to create gif using convert (ImageMagick), but got error: $err @@ -56,7 +56,7 @@ end # write out html to view the gif... note the rand call which is a hack so the image doesn't get cached function Base.writemime(io::IO, ::MIME"text/html", agif::AnimatedGif) - write(io, "\" />") + write(io, "\" />") end