In this paper we revise recent results of our team in the optimization of twisted nematic liquid crystal displays to be used as spatial light modulators for image processing and diffractive optics. In general two kind of responses are desired for the mentioned applications: amplitude-only and phase-only modulations. However, it is not a trivial task to find the polarization configurations for which these responses are obtained. We show that a reverse-engineering approach is needed to optimize the liquid crystal display response. According to this reverse-engineering approach the modulation characteristics can be calibrated by evaluating the modulation response in a few polarization configurations. These results are used to fit the liquid crystal display behavior to a simplified physical model, which uses two modulation parameters. We demonstrate that the degree of accuracy of this model is very high, thus enabling the prediction of the modulation behavior of the display at other polarization configurations. Therefore, we can perform computer searches for the optimum orientation of the polarizing elements to obtain the required optical transmission. We demonstrate the need to use short wavelengths and the need to insert wave plates in front and behind the liquid crystal displays to obtain either amplitude-only or phase-only regime.