Skip to content

Commit 5689e17

Browse files
committed
fix regression
1 parent ae7cfb7 commit 5689e17

File tree

5 files changed

+37
-555
lines changed

5 files changed

+37
-555
lines changed

src/ImageInTerminal.jl

+1-3
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,11 @@ different encoding method, call `ImageInTerminal.use_256()` or `ImageInTerminal.
5757
"""
5858
enable_encoding() = (should_render_image[] = true)
5959

60-
6160
# colorant arrays
6261
function Base.show(
6362
io::IO, mime::MIME"text/plain",
6463
img::AbstractArray{<:Colorant})
65-
if should_render_image[] && false
64+
if should_render_image[]
6665
println(io, summary(img), ":")
6766
ImageInTerminal.imshow(io, img, colormode[])
6867
else
@@ -83,7 +82,6 @@ function Base.show(io::IO, mime::MIME"text/plain", color::Colorant)
8382
end
8483
end
8584

86-
8785
function __init__()
8886
# use 24bit if the terminal supports it
8987
lowercase(get(ENV, "COLORTERM", "")) in ("24bit", "truecolor") && use_24bit()

test/reference/monarch_show_24bit.txt

+17-256
Large diffs are not rendered by default.

test/reference/monarch_show_256.txt

+17-256
Large diffs are not rendered by default.

test/reference/rgbline_show_24bit.txt

+1-20
Original file line numberDiff line numberDiff line change
@@ -1,20 +1 @@
1-
██ RGB{Float64}(0.0,0.0,1.0)
2-
██ RGB{Float64}(0.05263157894736842,0.0,0.9473684210526315)
3-
██ RGB{Float64}(0.10526315789473684,0.0,0.8947368421052632)
4-
██ RGB{Float64}(0.15789473684210525,0.0,0.8421052631578947)
5-
██ RGB{Float64}(0.21052631578947367,0.0,0.7894736842105263)
6-
██ RGB{Float64}(0.2631578947368421,0.0,0.7368421052631579)
7-
██ RGB{Float64}(0.3157894736842105,0.0,0.6842105263157895)
8-
██ RGB{Float64}(0.3684210526315789,0.0,0.631578947368421)
9-
██ RGB{Float64}(0.42105263157894735,0.0,0.5789473684210527)
10-
██ RGB{Float64}(0.47368421052631576,0.0,0.5263157894736842)
11-
██ RGB{Float64}(0.5263157894736842,0.0,0.47368421052631576)
12-
██ RGB{Float64}(0.5789473684210527,0.0,0.42105263157894735)
13-
██ RGB{Float64}(0.631578947368421,0.0,0.3684210526315789)
14-
██ RGB{Float64}(0.6842105263157895,0.0,0.3157894736842105)
15-
██ RGB{Float64}(0.7368421052631579,0.0,0.2631578947368421)
16-
██ RGB{Float64}(0.7894736842105263,0.0,0.21052631578947367)
17-
██ RGB{Float64}(0.8421052631578947,0.0,0.15789473684210525)
18-
██ RGB{Float64}(0.8947368421052632,0.0,0.10526315789473684)
19-
██ RGB{Float64}(0.9473684210526315,0.0,0.05263157894736842)
20-
██ RGB{Float64}(1.0,0.0,0.0)
1+
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 

test/reference/rgbline_show_256.txt

+1-20
Original file line numberDiff line numberDiff line change
@@ -1,20 +1 @@
1-
██ RGB{Float64}(0.0,0.0,1.0)
2-
██ RGB{Float64}(0.05263157894736842,0.0,0.9473684210526315)
3-
██ RGB{Float64}(0.10526315789473684,0.0,0.8947368421052632)
4-
██ RGB{Float64}(0.15789473684210525,0.0,0.8421052631578947)
5-
██ RGB{Float64}(0.21052631578947367,0.0,0.7894736842105263)
6-
██ RGB{Float64}(0.2631578947368421,0.0,0.7368421052631579)
7-
██ RGB{Float64}(0.3157894736842105,0.0,0.6842105263157895)
8-
██ RGB{Float64}(0.3684210526315789,0.0,0.631578947368421)
9-
██ RGB{Float64}(0.42105263157894735,0.0,0.5789473684210527)
10-
██ RGB{Float64}(0.47368421052631576,0.0,0.5263157894736842)
11-
██ RGB{Float64}(0.5263157894736842,0.0,0.47368421052631576)
12-
██ RGB{Float64}(0.5789473684210527,0.0,0.42105263157894735)
13-
██ RGB{Float64}(0.631578947368421,0.0,0.3684210526315789)
14-
██ RGB{Float64}(0.6842105263157895,0.0,0.3157894736842105)
15-
██ RGB{Float64}(0.7368421052631579,0.0,0.2631578947368421)
16-
██ RGB{Float64}(0.7894736842105263,0.0,0.21052631578947367)
17-
██ RGB{Float64}(0.8421052631578947,0.0,0.15789473684210525)
18-
██ RGB{Float64}(0.8947368421052632,0.0,0.10526315789473684)
19-
██ RGB{Float64}(0.9473684210526315,0.0,0.05263157894736842)
20-
██ RGB{Float64}(1.0,0.0,0.0)
1+
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 

0 commit comments

Comments
 (0)