1. A method of performing gamut mapping to high dynamic range images for a display device, comprising: receiving an input image to analyze a color distribution of the input image; determining a protect range corresponding to a first percentage of color codes of the input image and a compression range corresponding to a second percentage of the color codes of the input image based on the color distribution of the input image; and moving at least one of the color codes of the input image outside the protect range of the color codes to the compression range by a non-linear compression algorithm to perform gamut mapping to the input image.