From 2ef436b53c11e4d45dcdde6f69b7c1c7ccf3176a Mon Sep 17 00:00:00 2001 From: Olaf Rogalsky Date: Sun, 7 Jan 2024 22:08:56 +0100 Subject: [PATCH] fix detection of small RGB images --- src/ImageInTerminal.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageInTerminal.jl b/src/ImageInTerminal.jl index cdedfd0..628ede5 100644 --- a/src/ImageInTerminal.jl +++ b/src/ImageInTerminal.jl @@ -55,8 +55,8 @@ function choose_sixel(img::AbstractArray) # Small images really do not need sixel encoding. # `60` is a randomly chosen value (10 sixel); it's not the best because # 60x60 image will be very small in terminal after sixel encoding. - any(size(img) .≤ 12) && return false - all(size(img) .≤ 60) && return false + any(size(img)[1:2] .≤ 12) && return false + all(size(img)[1:2] .≤ 60) && return false return true end end