In an image captured by a CCD/CMOS sensor with an optical lens, only the objects within the depth of field are sharply focused. One way to get an everywhere-in-focus image is to fuse the images of the same scene which are taken with different focal settings. In this paper, a novel optimal method for multi-focus image fusion using differential evolution algorithm is presented. The source images are first decomposed into blocks. Then, the sharper blocks are selected by employing a sharpness criterion function. The selected blocks are finally combined to construct the fused image. The motivation of the proposed method lies in the fact that an optimized block size could be more effective than a fixed block size. Experimental results show that the proposed method outperforms other traditional methods and genetic algorithm based method in terms of both quantitative and visual evaluations. (C) 2010 Elsevier Ltd. All rights reserved.