A method for providing an expanded dynamic range image from a digital image defined by pixels associated with colors represented in a color space separating luminance from chrominance, comprising: low-pass filtering luminance values Y(p) of pixels of said image to obtain low-pass filtered luminance values Y base (p); computing an edge and/or gradient map, wherein a value M(p) of this map is obtained using a block-based analysis of pixels surrounding the pixel p; inverse tone mapping luminance values Y(p) by notably applying, for each luminance value of a pixel p, an expansion exponent value E(p) of said pixel: - to said low-pass filtered luminance value Y base (p) of said luminance value Y(p) if the value M(p) representative of edges and/or gradients in a block B p of pixels around said pixel p is low such that the area of said block B p is smooth, and - to said luminance value Y(p) itself if the value M(p) representative of edges and/or gradients in a block B p of pixels around said pixel p is high such that there is an egde within said block Bp; or by notably applying, for each luminance value of a pixel p, an expansion value E(p) of said pixel: - to a weighted combination of said luminance value Y(p) and of said low-pass filtered luminance value Y base (p) if the value M(p) representative of edges and/or gradients in a block B p of pixels around said pixel p is inferior to an edge/gradient threshold T, wherein the weight in said weighted combination is proportional to the value M(p) representative of edges and/or gradients in said block B p, and - to said luminance value Y(p) itself if the value M(p) representative of edges and/or gradients in a block B p of pixels around said pixel p is higher to said edge/gradient threshold T; and providing an expanded dynamic range image based on the inverse tone mapped luminance values. low-pass filtering luminance values Y(p) of pixels of said image to obtain low-pass filtered luminance values Y base (p); computing an edge and/or gradient map, wherein a value M(p) of this map is obtained using a block-based analysis of pixels surrounding the pixel p; inverse tone mapping luminance values Y(p) by notably applying, for each luminance value of a pixel p, an expansion exponent value E(p) of said pixel: - to said low-pass filtered luminance value Y base (p) of said luminance value Y(p) if the value M(p) representative of edges and/or gradients in a block B p of pixels around said pixel p is low such that the area of said block B p is smooth, and - to said luminance value Y(p) itself if the value M(p) representative of edges and/or gradients in a block B p of pixels around said pixel p is high such that there is an egde within said block - to said low-pass filtered luminance value Y base (p) of said luminance value Y(p) if the value M(p) representative of edges and/or gradients in a block B p of pixels around said pixel p is low such that the area of said block B p is smooth, and - to said luminance value Y(p) itself if the value M(p) representative of edges and/or gradients in a block B p of pixels around said pixel p is high such that there is an egde within said block Bp; or by notably applying, for each luminance value of a pixel p, an expansion value E(p) of said pixel: - to a weighted combination of said luminance value Y(p) and of said low-pass filtered luminance value Y base (p) if the value M(p) representative of edges and/or gradients in a block B p of pixels around said pixel p is inferior to an edge/gradient threshold T, wherein the weight in said weighted combination is proportional to the value M(p) representative of edges and/or gradients in said block B p, and - to said luminance value Y(p) itself if the value M(p) representative of edges and/or gradients in a block B p of pixels around said pixel p is higher to said edge/gradient threshold T; and - to a weighted combination of said luminance value Y(p) and of said low-pass filtered luminance value Y base (p) if the value M(p) representative of edges and/or gradients in a block B p of pixels around said pixel p is inferior to an edge/gradient threshold T, wherein the weight in said weighted combination is proportional to the value M(p) representative of edges and/or gradients in said block B p, and - to said luminance value Y(p) itself if the value M(p) representative of edges and/or gradients in a block B p of pixels around said pixel p is higher to said edge/gradient threshold T; and providing an expanded dynamic range image based on the inverse tone mapped luminance values.