The Mixed Raster Content (MRC) format was developed by the International Telecommunications Union as part of ITU-T Recommendation T.44, and is defined in the proposed standard, RFC-2301, File Format for Internet Fax. The MRC model divides a page into strips and up to 3 layers: consisting of Mask, Foreground and Background layers. Each layer can be coded and compressed independently. Subsequently, these layers can be uncompressed and combined to restore the original image.
The advantage of the MRC model is that optimal compression methods can be selected for the various image and text components of documents, resulting in both high compression factors and high detail retention. Image and text components may be mixed on the same page.
The MRC compression breaks an image into three kinds of layers: foreground, background, and mask layers, each of which is compressed separately. These layers can be uncompressed and combined to restore the original image.
A foreground layer contains color data for the text and line art, and may also contain photographic or continuous tone color data. The background layer generally contains low-resolution color image data, such as a background image, a wash or other pattern that would have text overlaid on it. The mask layer or the selector layer that controls the process of image regeneration contains binary image data that is high spatial resolution, such as text and line art. This layer is used for drawing the corresponding foreground layer where the selector value is 1 and drawing the corresponding background layer where the selector value is 0. (For example: a high-resolution color font can be represented using significantly less space, since the color information is stored at a lower resolution.)
LEADTOOLS offers the LEADTOOLS MRC (Mixed Raster Content) C API module to handle mixed raster content files, expanding LEADTOOLS input/output functionality by adding support for color documents which contain mixed image and text components.
LEADTOOLS also provides support for PDF compression with MRC segmentation. This compression is used to break down a page or an image into smaller segments, saving each segment using compression appropriate for that segment. Thus, one page of a PDF file may have an image JPEG compressed, some text JBIG2 compressed, and another area CCITT compressed. This whole process works to provide a PDF file with better compression and better quality than just a standard Raster PDF file.
The segmentation can be performed automatically with the option to optimize it manually or it can be done only manually. The applicable segment types are 1-bit black and white text, 1-bit colored text, 2-bit colored text, 2-bit grayscale, 8-bit grayscale and 24-bit picture. The grayscale types are valid for LEAD proprietary T44. Grayscale segments are converted to picture segments in the T44 standard format. The user can set up which compression will be applied for each area type. The compression for 1-bit schemes can be Fax G3 1D, Fax G3 2D, Fax G4 or JBIG; the compression for 2 bit grayscale can be JBIG; the compression for 8 bit grayscale can be JPEG, LEAD CMP or LEAD CMW; the compression for pictures can be JPEG for T44 standard format, and can be JPEG, LEAD CMP or LEAD CMW for LEAD proprietary T44 format. The user can also set up the quality parameters of some of these compressions.
Note: The characteristics of individual images differ greatly and not every image compresses well as mixed raster content.