JuliaImages / JuliaImages/ImageCore.jl
incorrect `channelview` for `ReinterpretArray` when constructed from numerical array
Open
@johnnychen94 is already working on this.
Since Apr 4, 2022.
bug
- Dominant language
- Julia
- Stars
- 28
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
julia> data = UInt8[0, 255]
2-element Vector{UInt8}:
0x00
0xff
julia> img = reinterpret(Gray{N0f8}, data)
2-element reinterpret(Gray{N0f8}, ::Vector{UInt8}):
Gray{N0f8}(0.0)
Gray{N0f8}(1.0)
julia> channelview(img) # the eltype should be `N0f8` instead
2-element Vector{UInt8}:
0x00
0xff
julia> channelview(collect(img))
2-element reinterpret(reshape, N0f8, ::Array{Gray{N0f8},1}) with eltype N0f8:
0.0N0f8
1.0N0f8
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.