Skip to main content
Skip table of contents

GGS extension, HalftoneType 116


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

The RIP supports a HalftoneType, 116, which describes screens as a sequence of tiles, rather than as a spot function or a threshold array. This allows the specification of non-monotonic screens.

HalftoneType 116 is applicable only to binary (1-bit) screens.

Type 116 is like type 16, except that instead of a threshold array, the file contains a tile sequence, one (or two) for each tint level. So, it has Width, Height, Width2, Height2 keys to describe the geometry, like type 16. Two new keys, Tiles and Tints, replace Thresholds.

Tiles

file

An input file from which sufficient data for the tile sequence can be read. For each tint level (as described by the Tints key), there are one or two rectangular tiles, depending on whether Width2 and Height2 specify a second tile. The contents of the first rectangle are specified first, followed by those of the second rectangle. Pixel values within each rectangle are listed in the same order as samples in a sampled image, with the first value at device coordinates (0, 0) horizontal coordinates changing faster than vertical (same ordering as threshold files). Each tile is a sequence of bytes describing the pixels in the tile: One bit per pixel, a 0 bit means a white (clear) pixel, a 1 bit a black (solid) pixel. In each byte, the leftmost pixel (low X coordinate) goes in the most-significant bit. Each line of pixels must be padded to a byte boundary, if necessary.

The two tiles at either end are actually used to render the 0.0 and 1.0 tints (as well as possibly other tints nearby). This is a difference from threshold screens, where those tints are implicitly solid and clear, respectively. These tiles would typically be all ones and all zeros, but you can specify anything you like.

If the tiles are stored in a separate file from the halftone definition itself the recommended location is inside a sub-directory in a SW/Tiles directory, named for your company (for example, SW/Tiles/MyCompany/MyScreen),

Tints

array

This is an array of reals in the range 0.0 (exclusive) to 1.0 (inclusive), in ascending order. The tile set has #Tints+1 tint levels (with one or two tiles each). The elements of Tints designate the lowest color value for which the corresponding tile (pair) is used; the first tile (pair) is used for all values lower than the first tint. In other words, they perform a function similar to the progression of values used in a threshold screen.

For the purposes of color management, the apparent number of (equally spaced) tint levels in a type 116 screen is set by the ScreenLevels system param. These are then mapped using the Tints array to get the actual tile to render the tint with.

The indirection from the input tone value through the Tints array can be used to reduce the size of the tile stack if there are any tonal ranges where you don’t want the pattern to change. In practice most cases probably use 256, 512, or 1024 equally spaced tiles.

Other keys

Additionally, standard Postscript halftone keys and the usual Harlequin extensions are available.

ScreenExtraGrays is documented for threshold screens only, and does not apply to tile screens.

A simple example follows:

TEXT
{
  <<
    /HalftoneType 116
    /Width 8
    /Height 8
    /Tints [ 1 1 15 { 16.0 div } for ] % 16 equally spaced tints
    /Tiles currentfile /ASCIIHexDecode filter
  >> sethalftone
} exec

ffffffffffffffff
fffffffff7ffffff
fffffff7e3f7ffff
ffffffe3e3e3ffff
fffff7e3c1e3f7ff
ffffe3c1c1c1e3ff
ffffc1c1c1c1c1ff
fff7c1c180c1c1f7
ffe3c1808080c1e3
ffc18080808080c1
f7c18080008080c1
e3c18000000080c1
e380800000008080
c180000000000080
8000000000000000
0000000000000000
>


JavaScript errors detected

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

If this problem persists, please contact our support.