The contrast enhancement of gray-level digital images is considered in this paper. In particular, the mean image intensity is preserved while the contrast is enhanced. This provides better viewing consistence and effectiveness. The contrast enhancement is achieved by maximizing the information content carried in the image via a continuous intensity transform function. The preservation of image intensity is obtained by applying gamma-correction on the images. Since there is always a trade-off between the requirements for the enhancement of contrast and preservation of intensity, an improved multiobjective particle swarm optimization procedure is proposed to resolve this contradiction, making use of its flexible algorithmic structure. The effectiveness of the proposed approach is illustrated by a number of images including the benchmarks and an image sequence captured from a mobile robot in an indoor environment.