Changed the byte order of the images.

I modified the order in which pixels are written to the image file in
order to facilitate the conversion to NSData for the CIColorCube
filter. There should no longer be a need for complicated index
translation as the order in the image file is the same as in the data
file.