Skip to main content
Skip table of contents

(v13) The object map


This page applies to Harlequin v13.1r0 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, Vignette or Picture)
bit 4 Text
bit 5 Vignette (shadings)
bit 6 Picture (images)
bit 7 Composited (transparency)


For definitions of the four types (Other, Text, Vignette, or Picture), see (v13) 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 the Harlequin Core SDK Developer’s Guide). 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 example skin for the Harlequin Core provides support for discovering which channel is being delivered at any time:

  • The RasterDescription structure holds a linked list of RasterColorant structures. The list is in order of colorant channel delivery, and each RasterColorant has a string name for the channel. This name is the same as the channel name configured by the ColorantFamilies description.
  • The RASTER_write_data callback type includes a “channel” parameter, which informs the OEM code which channel from the list in RasterDescription is currently being delivered in the call to that RASTER_write_data callback.
  • The RIP core delivers a ColorantType page buffer parameter for each Colorant. This parameter is an integer value the same as the ColorantType value configured by the ColorantFamilies description. The value for object map channels is SW_PGB_COLORANTTYPE_TYPE. It can be captured while parsing the page colorants, stored in the raster description, and used to test if a channel is an object map.

ObjectTypeMap pagedevice key

array

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:

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

The TestConfig 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.