Confirmed: Scaling pixel values distorts image

Interesting things:
When Calc_DCT() and then Undo_DCT() are called after one another, the
colors in the image become horribly distorted.
When Undo_DCT() and then Calc_DCT() are called (in that order), the
colors in the image are perfectly fine. This can't actually be a
solution in practice, however, as Calc_DCT() and Undo_DCT() scale the
values in a particular order.
In fact, it's only when the scaling of input values is removed that the
image is preserved. It's time to look into how this breaks the image.