During normal vision, objects moving in the environment, our own body movements and our eye movements ensure that the receptive fields of visual neurons are being presented with continually changing contrasts. Thus, the visual input during normal behaviour differs from the type of stimuli traditionally used to study contrast coding, which are presented in a step-like manner with abrupt changes in contrast followed by prolonged exposure to a constant stimulus. The abrupt changes in contrast typically elicit brief periods of intense firing with low variability called onset transients. Onset transients provide the visual system with a powerful and reliable cue that the visual input has changed. In this paper we investigate visual processing in the primary visual cortex of cats in response to stimuli that change contrast dynamically. We show that 1-4 s presentations of dynamic increases and decreases in contrast can generate stronger contrast gain control than several minutes exposure to a stimulus of constant contrast. Thus, transient mechanisms of contrast coding are not only less variable than sustained responses but are also more rapid and flexible. Finally, we propose a quantitative model of contrast coding which accounts for changes in spike rate over time in response to dynamically changing image contrast.