tiffchan - copy manipulating the channels


tiffchan [ -none ] [ -packbits ] [ -lzw ] [ -set R G B ] [ -luminance] [-LUMINANCE]
[-red] [-green] [-blue] [-alpha] [-noalpha] [-rowsperstripn ] inputfile outputfile


tiffchan creates a new file called outputfile created according to the Tag Image File Format, Rev 6.0, using channel information extracted from inputfile. The input file is interpreted as an rgba file. If the file is not in rgba form, the colors information is converted to rgb and an alpha channel is added. The output file will be a single-channel min_is_black image in the case of -luminance, -red, -green, -blue, and -alpha. The -luminance option will calculate luminance using the formula:

0.2989 × red + 0.5866 × green + 0.1144 × blue + 0.5

The three constants used in the luminance calculation can be set using the -set option. -set is followed by three floating-point numbers, which are the multipliers for the red, green and blue channels respectively. The three values should usually add to one. The luminance value will be clamped at 255. The -LUMINANCE option functions the same as the -luminance option with the difference that the output is a sixteen bit image.

The -noalpha option will create a three-channel rgb image. The default option will create a four-channel image, rgb plus an alpha channel. The output file may be compressed using a different algorithm than the input file. tiffchan will copy all the relevant tags in a TIFF directory of the input file to the associated directory in the output file. The -none, -packbits, and -lzw options are used to override this behavior, and define the compression scheme to be used in creating the output file.

The -rowsperstrip option can be used to set the number of rows (scanlines) in each strip of data in the output file. By default, the output file has the number of rows per strip set to a value that will ensure each strip is no more than 8 kilobytes.


tiffcopy(1), tiffjoin(1), tiffdump(1), tiffsize(1), tiffcomp(1), tiffdiff(1), tiffinfo(1)


Pixar Animation Studios
(510) 752-3000 (voice)   (510) 752-3151 (fax)
Copyright © 1996- Pixar. All rights reserved.
RenderMan® is a registered trademark of Pixar.