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