Skip to content

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

@yakir12

Description

@yakir12

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions