1. A computer readable storage medium having embodied thereon a computer program for causing a computer to execute a synthesized image generation method for generating synthesized image data by extracting face images of characters contained in image data and synthesizing the extracted face images with a template into a plurality of synthesis positions which have been set in advance on the template, the program comprising the steps of: forming groups of the synthesis positions by combining the adjacent synthesis positions; determining an order of the groups according to number of synthesis positions belonging to each of the groups; detecting the face images of the characters contained in the image data; detecting a relationship between the detected face images; distributing the face images to the groups in the determined order according to the relationship between the face images; and generating the synthesized image data by synthesizing the distributed face images with the template into the synthesis positions of the groups.