Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/ImageShow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ using StackViews
using ImageCore.MappedArrays
using ImageCore.PaddedViews

# opt-in HTML render for image
# work around https://github.com/JuliaImages/ImageShow.jl/pull/50#issuecomment-1124132500
const _ENABLE_HTML = Ref(false)
enable_html_render() = _ENABLE_HTML[] = true
disable_html_render() = _ENABLE_HTML[] = false
Base.showable(::MIME"text/html", ::AbstractMatrix{<:Colorant}) = _ENABLE_HTML[]

include("showmime.jl")
include("gif.jl")
include("multipage.jl")
Expand Down
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Test
using ImageShow
ImageShow.enable_html_render()

@testset "ImageShow" begin
include("writemime.jl")
Expand Down