Disclosed in the embodiments of the present application are an
image processing method, an electronic device, a computer-readable storage medium and a
computer program product. The method comprises: an electronic device displaying a
high dynamic range (HDR) image on the basis of a first
standard dynamic range (SDR) image and a first
gain map, or displaying the first SDR image; in response to an
image editing operation, performing editing
processing on the first SDR image, so as to obtain a second SDR image, and obtaining a second
gain map on the basis of
dynamic range transformation information and the second SDR image; storing the second
gain map and the second SDR image; and on the basis of the second gain map and the second SDR image, displaying an edited HDR image. The
dynamic range transformation information is obtained on the basis of the first SDR image and the first gain map, and is used for describing the transformation relationship from an SDR image to an HDR image; and the second gain map is a gain map comprising editing content corresponding to the
image editing operation. By means of the embodiments of the present application, an HDR effect can still be presented after
image editing.