-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Hello,
the toy code below demonstrates the problem: a one-pixel green RGB image is displayed as green, but is displayed as red when converted to HSV:
# Activate a brand-new environment
import Pkg
Pkg.activate(temp=true)
Pkg.add(["Images", "ImageView"])
using Images
using ImageView
# Prepare one-pixel RGB image
x = zeros(RGB{N0f8}, (1,1))
x .= RGB(0, 1, 0) # green
imshow(x, name="RGB") # correctly displays green
# Convert to HSV
y = HSV.(x) # conversion seems to be correct, HSV{Float32}(120.0f0,1.0f0,1.0f0)
imshow(y, name="HSV") # diplays red instead of green!
Information for the troubleshooting:
using(Dates)
today()
versioninfo()
Pkg.status()
julia> today()
2023-06-27
julia> versioninfo()
Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 8 × Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, skylake)
Threads: 4 on 8 virtual cores
Environment:
LD_LIBRARY_PATH = :/home/xxxx/.emacs.d/tree-sitter-julia/src/
JULIA_NUM_THREADS = 4
LD_ARGV0_REL = ../bin/vshd
JULIA_EDITOR = vim
JULIA_PKG_DEVDIR = /home/xxxx/juliadev
JULIA_CONDAPKG_BACKEND = Null
JULIA_PYTHONCALL_EXE = /home/xxxx/.julia/conda/3/bin/python
julia> Pkg.status()
Status `/tmp/jl_M9VHws/Project.toml`
[86fae568] ImageView v0.11.6
[916415d5] Images v0.25.3
Metadata
Metadata
Assignees
Labels
No labels

