Face trimming for photo composition

A method of processing an image involves detecting a face from a first image; determining a composition of the first image, selecting a composition of a second image according to the composition of the first image and generating the second image including the face by trimming the first image, according to the composition of the second image. The trimming operation may not be performed if a plurality of faces are detected, if a face is not detected or if a size of the face is greater than a reference value. If a plurality of faces are detected then faces may be selected based on a size of each face or the distance between the faces.