A coherent optical method capable of performing arbitrary two-dimensional linear transformations has been studied, in which transform coefficients are given by two-dimensional inner products of the input image and a set of basis functions. Since the inner product of two functions is equal to the value of their correlation when there is zero shift between the functions, it is possible to use an optical correlator to solve for the coefficients of the transform. By using random phase masks in the input and the filter planes of the correlator it was possible to pack many coefficients close together in the output plane, and thus take better advantage of the space-bandwidth product of the optical system. Both the input random phase mas and the spatial filter are computer-generated holographic elements, created by a computer-controlled laser beam scanner. The system can be ″programmed″ to perform arbitrary two-dimensional linear transformations. For demonstration, the set of two-dimensional Walsh functions was chosen as a transform basis. When the resolution of the Walsh functions was limited to 128 multiplied by 128, up to 256 transform coefficients were obtained in parallel. The signal-to-noise, it was possible accuracy of the transform coefficients were compared to the theory ratio and accuracy of the transform coefficients were compared to the theory.