| 1 |
tiffdither |
| 2 |
========== |
| 3 |
|
| 4 |
.. program:: tiffdither |
| 5 |
|
| 6 |
Synopsis |
| 7 |
-------- |
| 8 |
|
| 9 |
**tiffdither** [ *options* ] *input.tif* *output.tif* |
| 10 |
|
| 11 |
Description |
| 12 |
----------- |
| 13 |
|
| 14 |
:program:`tiffdither` converts a single channel 8-bit greyscale image to a bilevel image |
| 15 |
using Floyd-Steinberg error propagation with thresholding. |
| 16 |
|
| 17 |
Options |
| 18 |
------- |
| 19 |
|
| 20 |
.. option:: -c compress |
| 21 |
|
| 22 |
Specify the compression to use for data written to the output file: |
| 23 |
|
| 24 |
=========== =================================== |
| 25 |
Compression Description |
| 26 |
=========== =================================== |
| 27 |
none no compression |
| 28 |
packbits PackBits compression |
| 29 |
lzw Lempel-Ziv & Welch compression |
| 30 |
zip Deflate compression |
| 31 |
g3 CCITT Group 3 (T.4) compression |
| 32 |
g4 for CCITT Group 4 (T.6) compression |
| 33 |
=========== =================================== |
| 34 |
|
| 35 |
By default :program:`tiffdither` |
| 36 |
will compress data according to the value of the |
| 37 |
``Compression`` tag found in the source file. |
| 38 |
|
| 39 |
The CCITT Group 3 and Group 4 compression algorithms can only |
| 40 |
be used with bilevel data. |
| 41 |
|
| 42 |
Group 3 compression can be specified together with several |
| 43 |
T.4-specific options: |
| 44 |
``1d`` for 1-dimensional encoding, |
| 45 |
``2d`` for 2-dimensional encoding, and |
| 46 |
``fill`` to force each encoded scanline to be zero-filled so that the |
| 47 |
terminating EOL code lies on a byte boundary. |
| 48 |
Group 3-specific options are specified by appending a ``:``-separated |
| 49 |
list to the ``g3`` option; e.g. ``-c g3:2d:fill`` |
| 50 |
to get 2D-encoded data with byte-aligned EOL codes. |
| 51 |
|
| 52 |
LZW compression can be specified together with a ``predictor`` value. |
| 53 |
A predictor value of 2 causes each scanline of the output image to undergo |
| 54 |
horizontal differencing before it is encoded; a value |
| 55 |
of 1 forces each scanline to be encoded without differencing. |
| 56 |
LZW-specific options are specified by appending a ``:``-separated |
| 57 |
list to the ``lzw`` option; e.g. ``-c lzw:2`` for LZW |
| 58 |
compression with horizontal differencing. |
| 59 |
|
| 60 |
.. option:: -f |
| 61 |
|
| 62 |
Specify the bit fill order to use in writing output data. |
| 63 |
By default, :program:`tiffdither` |
| 64 |
will create a new file with the same fill order as the original. |
| 65 |
Specifying |
| 66 |
:command:`-f lsb2msb` will force data to be written with the |
| 67 |
``FillOrder`` tag set to ``LSB2MSB``, while |
| 68 |
:command:`-f msb2lsb` will force data to be written with the |
| 69 |
``FillOrder`` tag set to ``MSB2LSB``. |
| 70 |
|
| 71 |
.. option:: -r |
| 72 |
|
| 73 |
Make each strip have no more than the given number of rows. |
| 74 |
|
| 75 |
.. option:: -t |
| 76 |
|
| 77 |
Set the threshold value for dithering. |
| 78 |
By default the threshold value is 128. |
| 79 |
|
| 80 |
Notes |
| 81 |
----- |
| 82 |
|
| 83 |
The dither algorithm is taken from the :program:`tiffmedian` |
| 84 |
program (written by Paul Heckbert). |
| 85 |
|
| 86 |
See also |
| 87 |
-------- |
| 88 |
|
| 89 |
:doc:`pal2rgb` (1), |
| 90 |
:doc:`fax2tiff` (1), |
| 91 |
:doc:`tiffinfo` (1), |
| 92 |
:doc:`tiffcp` (1), |
| 93 |
:doc:`tiff2bw` (3tiff) |