This paper presents a method for contrast enhancement of medical images with preserving the local image details. The proposed method incorporates CLAHE and local image contrast preserving dynamic range compression. The method controls the amplification while preserving the local contrast of the image. The range of the gain parameter for local contrast enhancement varies from one image to another. The local contrast enhancement at any pixel position depends on the corresponding pixel neighborhood edge density. We have performed several experiments based on different image quality measures. Our proposed method provides more information about the image detail which affects the medical diagnosis. The experimental results by different image quality measures show that the output image quality of our proposed method is better than the CLAHE output.