This document summarizes work done to properly apply the discrete cosine transform (DCT) to an image. It was found that shifting pixel values by 128 before applying the DCT was necessary to avoid negative DC coefficient values after reconstruction. Using integer 16 data type for the image instead of uint8 helped preserve pixel values below 128 after reconstruction. Not shifting the data led to incorrect pixel values being lost during reconstruction.