boilerplate for dct processing the whole image