1. A method comprising: accessing an uncompressed image that includes blocks of pixels; by a first-phase module comprising one or more processors of a machine, generating a first image that represents colors of pixels that have minimum luminance values in their respective blocks of pixels in the uncompressed image, by the first phase module comprising one or more processors of the machine, generating a second image that represents colors of pixels that have maximum luminance values in their respective blocks of pixels in the uncompressed image; by a second-phase module comprising one or more processors of the machine, generating a third image, the third image being generated based on a fourth image that represents luminance values of pixels in the compressed image, a fifth image that represents minimum luminance values in the blocks of pixels in the uncompressed image, and a sixth image that represents maximum luminance values in the blocks of pixels in the uncompressed image; and providing the first image, the second image, and the third image to a compression engine configured to generate a compressed version of the uncompressed image.