So I have three matrices that represent say the R, G, and B channels of an image:
mR = RandomInteger[{0, 255}, {2, 2}];
mG = RandomInteger[{0, 255}, {2, 2}];
mB = RandomInteger[{0, 255}, {2, 2}];
I would like to add these to get an overall image made of these three channels, but I can't seem to be able to do that. Trying to understand the documentation under "Image", I tried
Image[{mR, mG, mB}, "Byte"]
but this gives me an image that's 3x2:

Also when I try
Image[{mR, ConstantArray[0, {2, 2}], ConstantArray[0, {2, 2}]}, "Byte"]
I don't get the red channel. I just get the first row of the image above with zeros everywhere else:

I can't understand the documentation here, and any help would be greatly appreciated!



Image[RandomInteger[{0, 255}, {2, 2, 3}], "Byte"]... – cormullion Dec 19 '12 at 16:30RandomIntegerpart was just to generate a MWE, and in reality themR,mG, andmBare more complicated. – Eli Lansey Dec 19 '12 at 16:33