I tried using `convert` elementwise over a `reinterpret`ed array:

A = ones(Float64, 3, 1000, 1000);
B = reinterpret(HSV{Float64}, A);
C = [convert(RGB, B[i,j]) for i in 1:1000, j in 1:1000];
imwrite(C, "image.PNG")

However, this doesn't work, because the array comprehension doesn't appear 
to be aware that the resulting array is of type Array{RGB{Float64}, 2}, and 
instead gives Array{Any, 2} (although all elements are of type 
RGB{Float64}), which then gives an error at the `imwrite` step because of a 
type mismatch. It is also fairly slow. I also tried the following:
D = convert(RGB, B)
but this is invalid syntax.

Is there a straightforward way to do the conversion?

Reply via email to