A first concentration range, which is a concentration range of a region of interest, and an output concentration range are determined in an input image. A compression table for compressing a dynamic range of the input image is generated on the basis of the first concentration range and the output concentration range. The first concentration range is changed at a predetermined ratio with respect to the changed output concentration range to determine a second concentration range. A new compression table is generated on the basis of the changed output concentration range and the second concentration range. The dynamic range of the input image is compressed using the new compression table.