1. A method for processing image data, comprising: using at least one processor to perform the following: providing input image data; extracting at least text and line art features from the input image data into a text image data; subtracting the text image data from the input image data to obtain a first background layer, the first background layer comprising text and line art features not extracted from the input image data and pictorial features of the input image data; processing the text image data to generate: one or more first binary foreground layers, wherein each first binary foreground layer comprises one or more pixel clusters representing text and line art pixels of a particular color in the text image data; segmenting the first background layer to generate: a second background layer representing the background attributes of the first background layer; a second contone foreground layer representing the foreground attributes of the first background layer; and a selector layer for identifying one or more foreground attributes of the second contone foreground layer not included in the second background layer; and integrating the second background layer, the selector layer, the second contone foreground layer, and the one or more first binary foreground layers into a data structure having machine-readable information for storage in a memory device.