It is not very obvious, but FITS stores RGB image data with the matrix axes as "color, height, width" where most programs expect "height, width, color". FITS effectively stores 3 monochrome images for R, G, and B (on the first axis). In the scientific world, it was probably more interesting to view each channel separately than as a combined image.

Numpy has some very nice methods for altering matrices.

Read More...