| 1 |
tiff2rgba |
| 2 |
========= |
| 3 |
|
| 4 |
.. program:: tiff2rgba |
| 5 |
|
| 6 |
Synopsis |
| 7 |
-------- |
| 8 |
|
| 9 |
**tiff2rgba** [ *options* ] *input.tif* *output.tif* |
| 10 |
|
| 11 |
Description |
| 12 |
----------- |
| 13 |
|
| 14 |
:program:`tiff2rgba` converts a wide variety of TIFF images into an RGBA TIFF image. This |
| 15 |
includes the ability to translate different color spaces and photometric |
| 16 |
interpretation into RGBA, support for alpha blending, and translation |
| 17 |
of many different bit depths into a 32bit RGBA image. |
| 18 |
|
| 19 |
Internally this program is implemented using the :c:func:`TIFFReadRGBAImage` |
| 20 |
function, and it suffers any limitations of that function. This includes |
| 21 |
limited support for > 8 ``BitsPerSample`` images, and flaws with some |
| 22 |
esoteric combinations of ``BitsPerSample``, photometric interpretation, |
| 23 |
block organization and planar configuration. |
| 24 |
|
| 25 |
The generated images are stripped images with four samples per pixel |
| 26 |
(red, green, blue and alpha) or if the :option:`-n` flag is used, three samples |
| 27 |
per pixel (red, green, and blue). The resulting images are always planar |
| 28 |
configuration contiguous. For this reason, this program is a useful utility |
| 29 |
for transform exotic TIFF files into a form ingestible by almost any TIFF |
| 30 |
supporting software. |
| 31 |
|
| 32 |
Options |
| 33 |
------- |
| 34 |
|
| 35 |
.. option:: -c |
| 36 |
|
| 37 |
Specify a compression scheme to use when writing image data: |
| 38 |
:command:`-c none` for no compression (the default), |
| 39 |
:command:`-c packbits` for the PackBits compression algorithm, |
| 40 |
:command:`-c zip` for the Deflate compression algorithm, |
| 41 |
:command:`-c jpeg` for the JPEG compression algorithm, and |
| 42 |
:command:`-c lzw` for Lempel-Ziv & Welch. |
| 43 |
|
| 44 |
.. option:: -r striprows |
| 45 |
|
| 46 |
Write data with a specified number of rows per strip; |
| 47 |
by default the number of rows/strip is selected so that each strip |
| 48 |
is approximately 8 kilobytes. |
| 49 |
|
| 50 |
|
| 51 |
.. option:: -b |
| 52 |
|
| 53 |
Process the image one block (strip/tile) at a time instead of by reading |
| 54 |
the whole image into memory at once. This may be necessary for very large |
| 55 |
images on systems with limited RAM. |
| 56 |
|
| 57 |
.. option:: -n |
| 58 |
|
| 59 |
Drop the alpha component from the output file, producing a pure RGB file. |
| 60 |
Currently this does not work if the :option:`-b` flag is also in effect. |
| 61 |
|
| 62 |
.. option:: -B |
| 63 |
|
| 64 |
Use this value as the background when doing alpha compositing (dropping the |
| 65 |
alpha component). |
| 66 |
|
| 67 |
.. option:: -M size |
| 68 |
|
| 69 |
Set maximum memory allocation size (in MiB). The default is 256MiB. |
| 70 |
Set to 0 to disable the limit. |
| 71 |
|
| 72 |
See also |
| 73 |
-------- |
| 74 |
|
| 75 |
:doc:`tiff2bw` (1), |
| 76 |
:doc:`/functions/TIFFReadRGBAImage` (3tiff), |
| 77 |
:doc:`/functions/libtiff` (3tiff), |