Skip to main content
Skip table of contents

ImageRGB callback


This page applies to Harlequin v13.1r0 and later; both Harlequin Core and Harlequin MultiRIP.

A procedure may be defined to be called whenever an image in DeviceRGB is encountered in the incoming PostScript-language or PDF stream.

If the image is encountered within a Level 2 pattern fill there is a single argument on the operand stack: /Pattern. If the image is in a character (in a Type 3 font) then there is a single argument: /Character .

If the image occurs outside a font or a pattern then there are five items on the operand stack when it is called four values defining the bounding box of the image (after any current clipping path has been applied) and the name /Page. The bounding box items are supplied in the order llx , lly , urx , ury , and they are in PostScript-language default user units (points).

The example below shows how the procedure is installed. This test draws a red box for the bounding box of any RGB images on the page and issue a text warning.

TEXT
<<
  /ImageRGB {
    (It's an RGB image!) =
    dup ==
    /Page eq {
      -1 0 { index == } for
      gsave
        initgraphics
        0 1 1 0 setcmykcolor 3 setlinewidth
        2 index sub exch 3 index sub exch
        rectstroke
      grestore
    } if
    (__________) =
  } bind
>> 1183615869 internaldict begin setmischooks end


JavaScript errors detected

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

If this problem persists, please contact our support.