Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency between accepted argument types for YCbCr constructor and colorview #200

Open
yakir12 opened this issue Apr 2, 2024 · 0 comments

Comments

@yakir12
Copy link

yakir12 commented Apr 2, 2024

There seem to be some inconsistencies in the accepted argument-types to the YCbCr constructor and the element-types of the channels in colorview.

Here, all the following types work:

using ImageCore
types = (UInt8, Int, N0f8, Float32)

for T in types
    YCbCr(rand(T, 3)...)
end

While here, only the Float32 does:

for T in types
    try
        colorview(YCbCr, (rand(T, 10, 10) for _ in 1:3)...)
        @info "worked for type $T"
    catch ex
        if ex isa TypeError
            @warn "failed for type $T"
        else
            throw(ex)
        end
    end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant