Merge pull request #1958 from JuliaPlots/sd-gifmime

add support for gif mime
This commit is contained in:
Daniel Schwabeneder 2019-03-25 09:35:25 +01:00 committed by GitHub
commit 47e48e5d27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,6 +106,14 @@ function Base.show(io::IO, ::MIME"text/html", agif::AnimatedGif)
end
# Only gifs can be shown via image/gif
Base.showable(::MIME"image/gif", agif::AnimatedGif) = file_extension(agif.filename) == "gif"
function Base.show(io::IO, ::MIME"image/gif", agif::AnimatedGif)
open(fio-> write(io, fio), agif.filename)
end
# -----------------------------------------------
function _animate(forloop::Expr, args...; callgif = false)