Skip to main content
Skip table of contents

The object map

This page applies to Harlequin v14.0r0 and later; only Harlequin Core.

The Harlequin RIP offers a plane of metadata for each pixel in the raster generated for a page. In Harlequin RIP terminology, this metadata plane is called the object map.

The object map was first a feature of the Harlequin RIP’s run-length encoded output format, but has since been introduced into some of the RIP’s contone color output modes.

The object map is only available with the Harlequin Core.

Raster output modes with object map support

Object map output is possible in the following output modes:

  • Run-length encoded (RLE) output
  • All contone output modes. The bit-depth of the object map must not exceed the output depth. The ObjectTypeMap array (see ObjectTypeMap pagedevice key below) can be used to reduce the object map bit depth, if necessary.

The mechanism of obtaining object map data in RLE differs from that of other output formats. For more information see RUN_OBJECT_TYPE in the RLE documentation.

Content of the object map

The value in the object map is an 8-bit container, where bit positions map to an object type, thus:

bit 0Set by the user.
bit 1 Reserved for future use.
bit 2 Reserved for future use.
bit 3 Other (that is, not Text, Shading or Picture)
bit 4 Text
bit 5 Shading
bit 6 Picture (images)
bit 7 Composited (transparency)

For definitions of the four types (Other, Text, Shading, or Picture), see Object types.

If the page is unmarked at the position a pixel represents, each bit in the object map for that pixel is 0.

If the pixel is the result of overprinting, the bit for each object type that formed the pixel is set. For example, if text overprints an image, bits 4 and 6 are both set.

Bit 0 is controlled programmatically. The setuserlabel operator (in internaldict) takes a boolean parameter, determining whether this bit is set or clear for objects created thereafter.

The composited bit (7) declares that the pixel is the result of transparency compositing. The objects that were composited are indicated through bits 3 to 6. Overprinting on top of a composited pixel also leaves the composited bit set, even if the overprinting means that the pixel is now opaque.

Delivery of the object map in contone output

In contone output, the object map is delivered through the same mechanism as each component of the color pixel, that is, as if it were a colorant.

The object map output is also configured using the same mechanism as used for colorant channels. This requires configuring the ColorantFamilies description (see Specifying color output capabilities). Since the object map channel is treated the same as any other colorant, it can be interleaved in any order, omitted with other separations, appear in chunky (pixel-interleaved), or planar (band or frame interleaved) raster formats.

The Harlequin Core SDK provides support for discovering which channel is being delivered at any time:

  • The RasterDescription structure contains a description of the layout with all the channels and their colorants. The channel names come from the ColorantFamilies description.
  • The colorant description includes the type field which is an integer value equalling the ColorantType value configured by the ColorantFamilies description. The value for object map channels is SW_PGB_COLORANTTYPE_TYPE.

ObjectTypeMap pagedevice key


The ObjectTypeMap array allows the default bit positions of the object map to be rearranged, the object type to be reduced for lower bit-depth output, or the object type bits to be prioritized and mapped onto other type-related fields efficiently.

This array implements a lookup table with 256 entries. The object type value (the combination of bits described in Content of the object map) is used as an index into this array. Values in the ObjectTypeMap are integers in the range 0 up to the maximum value representable in the output bit-depth; for example, 8-bit output values are in the range 0255, while 16-bit output values are in the range 065535.

For example, for 8-bit color, the following mapping sets the object map values to 0 if nothing marked the pixel, 1 if a text object contributed to the pixel, and 2 if the pixel was marked with anything other than text:

    /ObjectTypeMap [ 0 1 255 { 120 and dup 0 eq {
                                 pop 0
                               } {
                                 16 and 0 ne {1} {2} ifelse
                               } ifelse
                             } for ]
  >> setpagedevice

The example configuration CMYKCompositeBand300dpiObjectTypeMap is supplied with the RIP and demonstrates ObjectTypeMap.

Out-of-range values are not allowed in the array and cause a rangecheck error in the setpagedevice call. If no array is specified, the code assumes an identity mapping.

There is no restriction on mapping multiple input values to the same map value. That is, you could map both index 0 (00000000) and index 2 (00000010) to 255 (11111111) if desired.

Thus it’s possible to generate a single hard mask where 0 means unmarked and 255 means marked, using:

<< /ObjectTypeMap [ 0 255 { 255 } repeat ] >> setpagedevice

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.