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 The HqnImage procset
.
tiffexec
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
currenttiffparams dict
Returns a dictionary containing the current parameters for handling TIFF files with tiffexec
.
settiffparams
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 |
| If |
| If |
| When When it is set to |
| If |
| From Harlequin v12.0r1: If |
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
TEXT
where the two numbers are the | |
| If
| |
| If
Note that the procset | |
| If this value is | |
| If Default is | |
| If | |
| Invert the TIFF image, after all other decoding as appropriate (including inversion based on the photometric interpretation). Default is Note:
This item is useful when used with | |
| If | |
| If | |
In outline, tiffexec
is equivalent to the following PostScript code skeleton. Lines starting ...
represent omitted code.
gsave
InstallICCProfile {
% Install ICC profile if one present in TIFF file.
...
} if
DoSetColorSpace {
% Set up PS colorspace appropriate for TIFF image data
...
setcolorspace
} if
AdjustCTM {
% Setup appropriate scale factor from resolution information
...
scale
IgnoreOrientation not {
% Setup appropriate orientation matrix
...
concat
} if
} if
% Setup appropriate image dictionary
...
/InvertImage {
% Reverse decode entry for each colorant
...
} if
/DoImagemask { imagemask
} {
image
} 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
showpage