Skip to content

Commit 0f2af14

Browse files
committed
use MosaicView 0.2
1 parent 340a117 commit 0f2af14

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

Project.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
99
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
1010
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
1111
ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254"
12-
PaddedViews = "5432bcbf-9aad-5242-b902-cca2824c8663"
12+
ImageShow = "4e3cecfd-b093-5904-9786-8bbb286a6a31"
13+
MosaicViews = "e94cdb99-869f-56ef-bcf0-1ae2bcbe0389"
1314
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1415
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
1516
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
@@ -20,7 +21,8 @@ Distances = "0.7, 0.8"
2021
FileIO = "1"
2122
ImageCore = "0.8.1"
2223
ImageInTerminal = "0.3, 0.4"
23-
PaddedViews = "0.4"
24+
ImageShow = "0.2"
25+
MosaicViews = "0.2"
2426
julia = "1"
2527

2628
[extras]

src/ReferenceTests.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ using ImageInTerminal
88
using SHA
99
using DeepDiffs
1010
using Random
11-
using PaddedViews
11+
using MosaicViews
12+
using ImageShow
1213

1314
export
1415
@withcolor,

src/render.jl

+4-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ end
2424

2525
## 2 arg form render for comparing
2626
function render(mode::BeforeAfter, reference, actual)
27-
if showable(MIME("image/png"), actual)
27+
if displayable(MIME("image/png"))
2828
render(MIME("image/png"), mode, reference, actual)
2929
else
3030
render(MIME("text/plain"), mode, reference, actual)
@@ -39,10 +39,8 @@ function render(::MIME"text/plain", mode::BeforeAfter, reference, actual)
3939
println("-------------------------------")
4040
end
4141
function render(::MIME"image/png", mode::BeforeAfterImage, reference, actual)
42-
fill_value = zero(eltype(reference))
43-
out = paddedviews(fill_value, reference, actual)
4442
println("- REFERENCE --------|--------- ACTUAL -")
45-
display(hcat(out...))
43+
display(MIME("image/png"), mosaicview(reference, actual; nrow=1, npad=5))
4644
end
4745

4846
function render(::Diff, reference, actual)
@@ -53,8 +51,8 @@ end
5351

5452
## 1 arg form render for new content
5553
function render(mode::RenderMode, actual)
56-
if showable(MIME("image/png"), actual)
57-
display(actual)
54+
if displayable(MIME("image/png"))
55+
display(MIME("image/png"), actual)
5856
else
5957
println("- NEW CONTENT -----------------")
6058
render_item(mode, actual)

0 commit comments

Comments
 (0)