1. A method of extracting metadata from a document image of pixels, the pixels having a value representing the intensity and/or color of a picture element, the method comprising: displaying at least part of the image on a display screen for a user; receiving a selection command from a user, the selection command including an indication of a selection point in a metadata element in the image; automatically classifying pixels as foreground pixels based on their values having a foreground property; automatically determining an extraction area within the image based on foreground pixels connected, with respect to a connection distance, to a foreground pixel indicated by the selection point; and extracting the metadata by processing pixels in the extraction area.