Skip to main content
Skip table of contents

(v13) Operators for processing image files, including TIFF

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

Harlequin can process many kinds of TIFF file. The recommended method is to use the HqnImage procset, as described in (v13) The HqnImage procset .


As from Harlequin 13 the tiffexec operator is now deprecated and retained only to allow migration to HqnImage .

        file dict tiffexec -
                  file tiffexec -

This operator processes TIFF 6.0 baseline files, with some exceptions, and supports selected TIFF

6.0 extensions. Both the exceptions and the extensions are as listed in the TIFF 6.0 section of the “Configuring Input” chapter in the OEM Manual. See also the TIFF 6.0 specification in [TIFF6].

The parameters to tiffexec are the file to be executed and an optional dictionary containing any options controlling its execution. This dictionary may be empty. Default values for the options not supplied, except where noted below, are set up using settiffparams as described here.

Note: Rendering TIFF images with tiffexec , unlike using the TIFF device, does not do an implicit showpage . In this respect tiffexec is similar to the image operator in that there must be an explicit showpage to generate a raster containing the TIFF image. One consequence is that you can mix TIFF images with other page objects, created using stroke , fill , image , text operators, and so on.


currenttiffparams dict

Returns a dictionary containing the current parameters for handling TIFF files with tiffexec .


dict settiffparams -

Sets a dictionary containing the parameters for handling TIFF files.

The following parameters can be set with settiffparams and reported by currenttiffparams . A subset of these parameters can be supplied to tiffexec , as noted below. All these parameters are Boolean.

The first few entries in the parameters dictionaries only relate to the initial processing of the TIFF file header data (the IFD) and are not usable with tiffexec . The remaining parameters control how the image data is processed, and are available with all these TIFF operators.


If true , abort processing when an unknown TIFF tag or type is encountered. Default is false .


If true , report more details on TIFF file processing in the Monitor window. This can be useful when processing a TIFF file that produces an error but for a non-obvious reason. Default is false .


If true , list all the IFD entries used in processing the TIFF file, highlighting which are in fact default values supplied by the RIP. (This list is a subset of all possible IFD entries.) The list translates number values into human readable form. For example, it lists BlackIsZero for PhotometricInterpretation instead of 1 . Default is false .


When /Strict is set to true the tiffexec operator will exit with an error when it believes that the file does not conform to the file specification (for example an IFD entry has the wrong type, value offsets are not double byte aligned, and so on).

When it is set to false the tiffexec operator will accept some variation in the file contents with respect to the specification. If the TIFF parameter /Verbose is also true when the tiffexec operator detects one of these variations a warning message will be shown in the monitor window.


If true a warning is displayed when TIFF files are rasterized at a higher resolution than appropriate. If it is false , an error is displayed, and the job is aborted when the output resolution is inappropriate. Default is false .


From Harlequin v12.0r1: If true , and a TIFF file contains channels marked as Associated or Unassociated alpha, then those channels are treated as if they were tagged as spot colors. Default is false.

The following parameters affect file processing and are available for use with tiffexec . If supplied to tiffexec , the value of one of these parameters overrides the current TIFF parameter settings for the current TIFF file.


Previously, as part of the TIFF specification, an image resolution was required for a TIFF file to successfully RIP. When /Strict is implemented then it is still the case that it is required. On occasions, you may encounter a job where the resolution is supplied but is set to zero or no resolution is supplied at all. So, rather than give an error, a default resolution is implemented which is used in these cases. The default resolution is set to 72 dpi but may be changed using /DefaultResolution . For example:

/DefaultResolution [1220 1220]
>> settiffparams

where the two numbers are the x then the y resolutions in DPI. If the numbers are negative, we get an error. If the TIFF file supplies a valid resolution of its own, that is used (which is actually the case in most TIFF files). This is used to get non-compliant TIFF files to process correctly.


If true , override any orientation specified in the TIFF file. Default is

true .


If true, the page size is set from the TIFF image. If false OR if

/AdjustCTM is false there is no change to the page size. Default is true .

Note that the procset HqnOPI currently sets AdjustCTM to false and so consequently will not set the page size.


If this value is true then tiffexec will modify the current transformation matrix (CTM). This modification is always based on the resolution and resolution units of the TIFF file, and if /IgnoreOrientation is false , also based on the orientation of the TIFF file. tiffexec is effectively performed within a gsave /grestore pair so the CTM is unchanged relative to what it was before calling the operator. Default is true .


If true the current color space is adjusted if it is not compatible with that of the TIFF image (detected using the PhotometricInterpretation tag). If this option is false , it is the responsibility of the PostScript job to set up a compatible color space before calling the tiffexec operator. tiffexec is effectively performed within a gsave / grestore pair so the color space will be reset to what it was before calling the operator.

Default is true .


If true and the TIFF file includes an ICC profile, then try to install the profile. Default is true .


Invert the TIFF image, after all other decoding as appropriate (including inversion based on the photometric interpretation). Default is false .

Note: This item is useful when used with DoSetColorSpace set to false , for processing grayscale TIFF files (which use an additive color space) where a subtractive color space such as /Separation has been installed.


If true the TIFF image is used as an image mask, after checking to ensure that the TIFF is a bi-level image. If it is false then the TIFF is used as an image. Default is false .


If true a warning is displayed when TIFF files are rasterized at a higher resolution than appropriate. If it is false , an error is displayed, and the job is aborted when the output resolution is inappropriate. Default is false .

In outline, tiffexec is equivalent to the following PostScript code skeleton. Lines starting ... represent omitted code.

              InstallICCProfile {
                % Install ICC profile if one present in TIFF file.
              } if
              DoSetColorSpace {
                % Set up PS colorspace appropriate for TIFF image data
              } if
              AdjustCTM {
                % Setup appropriate scale factor from resolution information
                IgnoreOrientation not {
                  % Setup appropriate orientation matrix
                } if
              } if
              % Setup appropriate image dictionary
              /InvertImage {
                % Reverse decode entry for each colorant
              } if
                /DoImagemask { imagemask
              } {
            } ifelse grestore

Some examples of using these operators may help:

            % Report on TIFF file processing and list IFD entries
            % for all TIFF files.
              /Verbose true
              /ListIFDEntries true
            >> settiffparams
            % Read TIFF file filename1.tif ignoring any ICC profile.
            (filename1.tif) (r) file << /InstallICCProfile false >> tiffexec showpage
            % Read TIFF file filename2.tif but use any included ICC profile. (filename2.tif) (r) file tiffexec

JavaScript errors detected

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

If this problem persists, please contact our support.