TIFF and LibTiff Mail List Archive

2020.12.20 20:07 "[Tiff] Inversion of parameters in tiffcrop with jpeg compression", by Miguel Medalha

The tiffcrop tool seems to be inverting the parameters for RGB and YCbCr output when using jpeg compression.

'tiffcrop -c jpeg infile.tiff outfile.tif'              the output is a 1052 kB YCbCr file (default behavior)
'ttinfo outfile.tif'                               'Photometric Interpretation: YCbCr'

Now if we specify a specific mode using the intended 'rgb' and 'raw' command line switches:

'tiffcrop -c jpeg:raw infile.tiff outfile.tif'  the output is a 2310 kB RGB file
'ttinfo outfile.tif'                            'Photometric Interpretation: RGB color'

'tiffcrop -c jpeg:rgb infile.tiff outfile.tif'          the output is a 1052 kB YCbCr file
'ttinfo outfile.tif'                          'Photometric Interpretation: YCbCr'