Closed mfiano closed 2 years ago
Hi! The problem is that your x
is not concretely typed, RGB
struct is parametrized on the type of the of the individual r
, g
, and b
elements, basically:
struct RGB{T}
r::T
g::T
b::T
end
What you are missing is the type parameter -- with x = Array{ColorTypes.RGB{Float64}}(undef, 4, 4)
would've worked.
By omitting the type parameter, you created an array which could hold many different types of RGB
s, but that is rarely a good idea and not something that is supported by PNGFiles.jl
.
It took me a few hours (as a relative beginner) to finally get a MWE, but this is how it errors: