In the primary visual cortex (V1) the contrast response function of many neurons saturates at high contrast and adapts depending on the visual stimulus. We propose that both effects - contrast saturation and adaptation - can be explained by a fast and a slow component in the synaptic dynamics. In our model the saturation is an effect of fast synaptic depression with a recovery time constant of about 200 ms. Fast synaptic depression leads to a contrast response function with a high gain for only a limited range of contrast values. Furthermore, we propose that slow adaptation of the transmitter release probability at the geniculocortical synapses is the underlying neural mechanism that accounts for contrast adaptation on a time scale of about 7 sec. For the functional role of contrast adaptation we make the hypothesis that it serves to achieve the best visual cortical representation of the geniculate input. This representation should maximize the mutual information between the cortical activity and the geniculocortical input by increasing the release probability in a low contrast environment. We derive an adaptation rule for the transmitter release probability based on this infomax principle. We show that changes in the transmitter release probability may compensate for changes in the variance of the geniculate inputs - an essential requirement for contrast adaptation. Also, we suggest that increasing the release probability in a low contrast environment is beneficial for signal extraction, because neurons remain sensitive only to an increase in the presynaptic activity if it is synchronous and, therefore, likely to be stimulus related. Our hypotheses are tested in numerical simulations of a network of integrate-and-fire neurons for one column of V1 using fast synaptic depression and slow synaptic adaptation. The simulations show that changing the synaptic release probability of the geniculocortical synapses is a better model for contrast adaptation than the adaptation of the synaptic weights: only in the case of changing the transmitter release probability does our model reproduce the experimental finding that the average membrane potential (DC component) adapts much more strongly than the stimulus modulated component (F1 component). In the case of changing the synaptic weights, however, the average membrane potential (DC) as well as the stimulus modulated component (F1 component) would adapt. Furthermore, changing the release probability at the recurrent cortical synapses cannot account for contrast adaptation, but could be responsible for establishing oscillatory activity often observed in recordings from visual cortical cells.