Method for acquiring an image of one or more codes that are optically readable by a CMOS electronic image sensor, which is activated on reception, by the sensor, of an external triggering signal (Trig) and which comprises carrying out a measurement image capture in order to determine a desirable exposure-time value, said desirable exposure-time value then being applied as current exposure-time value to all the pixels of the matrix array, in order to carry out a nominal image capture, characterized in that the measurement image capture (Mode-Mes) comprises:
- an integrating phase (100), which is common to the pixels, and in which k different exposure-time values (Ti) are applied to pixels that are regularly distributed over the rows or columns of the matrix array, each pixel being associated with one among the k different exposure-time values, k integer at least equal to 2;
- a rapid-acquiring phase (102), in which digital image data (DATA(Ti)) are rapidly acquired with the various pixel-exposure-time values, and which comprises a rapid read-out phase applying under-sampling of the rows of the matrix array;
- and
- a determining phase (110), in which the desirable exposure-time value (Topt) is determined by comparing histograms calculated on the basis of the digital image data obtained in the rapid-acquiring phase for each different exposure-time value.