1. A method for positioning edges of a photograph, comprising: obtaining a photograph taken by a camera of an electronic device; processing RGB values of the pixels of the photograph to get corresponding RGB modification values of the pixels of the photograph; computing positions of vertexes of the photograph according to the RGB modification values in following steps: setting a threshold value and an area on a corner of the photograph; comparing RGB modification values of different pixels in the area with the threshold value until getting a first pixel whose RGB modification value is greater than the threshold value; and comparing RGB modification values of adjacent pixels, that are adjacent to the first pixel, with the threshold value, if most of the RGB modification values of adjacent pixels are greater than the threshold value, the first pixel is set as a vertex; connecting the vertexes to form edges of the photograph.