Consider an RGB image with Nx horizontal pixels and Ny vertical pixels. Consider storing the image in YCC space where the luminance channel Y is stored as one byte for each pixel but the two chrominance channels are only stored for each block of say 4x4 pixels. Note the chrominance is averaged over each 4x4 block. There is nothing particularly special about a 4x4 block instead of a 3x3 or 5x5 or other sizes. A 2x2 by two results in a factor 2 saving, a 3x3 grid results in a saving of 2.45.
Larger grids give ever decreasing rates of return and soon impact on the image quality.
The resulting luminance value is also on the scale of 0 to 255, the chrominance values need 127.5 added to them so they can saved in an unsigned byte. Of course when the YCC values are turned back into RGB, then 127.5 must be first subtracted from the two chrominance values. The RGB values should be clipped so they lie within the allowed range after the transform from YCC to RGB is calculated. Before The above is the original image that is used as an example in what follows. It was captured as a single from a digital movie camera.