We present a multiscale image approach for contrast enhancement based on a composition of contrast operators. Contrast operators are built by means of the opening and closing by reconstruction. The operator that works on bright regions uses the opening and the identity as primitives, while the one working on the dark zones uses the closing and the identity as primitives. To select the primitives, a contrast criterion given by the top-hat transformation is proposed. Thus, the regions verifying the criterion remain intact as in the original image, whereas the other regions are attenuated by the opening or closing. This choice enables us to introduce a well-defined contrast in the output image. Moreover, by applying these operators by composition according to the scale (size) parameter, the output image not only preserves a well-defined contrast at each scale, but also increases the contrast at finer scales. Because of the use of connected transformations to build these operators, the principal edges of the input image are preserved and enhanced in the output image. Finally, since the contrast operators do not increase the gray level of the image, these operators are improved by applying an anamorphosis to the regions verifying the criterion.