I want to make Array{UInt8,3} (color image data) from Array{UInt8,2} (grayscale image data) in Julia 0.4 like the following:
using Images
dat = data(img)
dat2 = map(x -> (v = x*2 % UInt8; [v,0,0]), dat)
img2 = colorim(dat2)
However, the code above makes Array{Array{UInt8,1},2} instead. How can I make a "flatten" multidimensional array?