1. A method of selecting transform matrices for use in a transcoder for down-sampling a DCT image directly in the DCT domain, the method comprising: obtaining a training set by applying a pre-selected down-sampling method to a DCT reference image to obtain a down-sampled DCT reference image; initializing the transform matrices; and applying a learning with forgetting algorithm to the transform matrices to obtain transform matrices which reduce a learning objective function, wherein the learning objective function is a function of the visual quality of a down-sampled DCT image obtained using the transform matrices relative to the visual quality of the down-sampled DCT reference image, and the learning objective function is also a function of the computational complexity of applying the transform matrices.