The present disclosure generally relates to a method and device for encoding an image, characterized in that it comprises: obtaining (10) a luminance component (L) and each colour component (C(i)) of the image, said components belonging to a perceptual space having a metric whose values are representative of the differences between the visual perceptions of two points of said perceptual space, the metric being defined such that a perceptual threshold ([Delta]E0) exists below which a human being is not able to perceive a visual difference between two colours of the perceptual space; obtaining a quantized luminance component of the image by quantizing (11) the luminance component (L) of the image; obtaining at least one transformed color component by transforming (12) each colour component (C(i)) of the image according to a transform (T) which depends on an upper bound of the metric ([Delta]E) which enables a control of the visual losses in a displayed decoded version of the image; obtaining at least one quantized colour component by quantizing (13) each transformed colour component (C(i)<SP>T</SP>) of the image in order that a metric which is calculated between the image and a decoded version of the image, stays below the upper bound ([Delta]E); and encoding (14) each quantized component of the image (LQ, C(i)TQ).
Method and device for encoding a high-dynamic range image