1. A computer implemented method of identifying at least one of a photo region and a graphics region in a colour bitmap image of a compound document, the method comprising: connecting similarly coloured pixels of the image into connected components and placing the connected components in an enclosure tree, the enclosure tree forming a hierarchy of ancestor and descendent connected components where an ancestor connected component encloses a descendent connected component wherein each node of the enclosure tree is a connected component; classifying each connected component into one of a plurality of classes wherein at least one class represents non-text connected components; selecting a connected component from one of the non-text connected components of the enclosure tree; calculating context statistics for the selected connected component based on descendent and touching sibling connected components of the selected connected component; identifying whether the selected connected component contains at least one of a photo region and a graphics region based on the context statistics; and storing the selected connected component identified as either graphics or photo object to memory.