A new color space that maps image pixel values in a mosaiced sampling
pattern (such as that generated by a Bayer color filter array) into four
color channels that correspond to rectangular sampling patterns. Because
these new channels correspond to a rectangular sampling grid, they are
much more amenable to processing steps such as compression. In one
embodiment, the transformation from the original mosaic-patterned pixels
into the new four-channel color space can be made reversible in integer
arithmetic. That allows for the implementation of efficient lossless
image compression systems for mosaiced (e.g., raw, or raw Charged Couple
Device (CCD)) images.