A method for processing a digital image in an image file, suitable for displaying the digital image on an electronic device including a storage unit and an image processing unit, the method for processing the digital image comprising the following steps:
- storing a digital image file in the storage unit of the electronic device;
- the image processing unit analyzing the digital image file to obtain an image matrix of the digital image and a plurality of matrix elements of the image matrix;
- generating a first size-reduced image through the image processing unit, wherein the first size-reduced image corresponds to a first size-reduced image matrix, which includes some of the matrix elements, said some matrix elements being not next to one another in the image matrix;
- the image processing unit detecting a horizontal resolution and a vertical resolution of a display;
- and
- the image processing unit determining whether the number of columns of matrix elements of the image matrix is greater than the horizontal resolution, and whether the number of rows of matrix elements of the image matrix is greater than the vertical resolution;
- wherein if it's determined that the number of columns is greater than the horizontal resolution or the number of rows is greater than the vertical resolution, the image processing unit is configured to display the first size-reduced image on the display.