AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2020.12.19 20:37 "[Tiff] tiffcp - Make the display of compression options conditional", by Miguel Medalha
2020.12.19 20:52 "Re: [Tiff] tiffcp - Make the display of compression options conditional", by Miguel Medalha
2020.12.19 21:31 "Re: [Tiff] tiffcp - Make the display of compression options conditional", by Bob Friesenhahn
2020.12.19 21:45 "Re: [Tiff] tiffcp - Make the display of compression options conditional", by Miguel Medalha
2020.12.19 21:53 "Re: [Tiff] tiffcp - Make the display of compression options conditional", by Miguel Medalha
2020.12.19 22:20 "Re: [Tiff] tiffcp - Make the display of compression options conditional", by Bob Friesenhahn
2020.12.19 22:36 "Re: [Tiff] tiffcp - Make the display of compression options conditional", by Miguel Medalha
2020.12.19 23:20 "Re: [Tiff] tiffcp - Make the display of compression options conditional", by Bob Friesenhahn

2020.12.19 20:37 "[Tiff] tiffcp - Make the display of compression options conditional", by Miguel Medalha

Hello all

The current display of parameters for tiffcp is hardcoded in tiffcp.c. Even when certain compression libraries are not built, tiffcp will display all the options, including the non-functioning ones, which to me seems very inelegant.

I propose making the display conditional upon the real support for those options. Something like the following (starting at line 473 of tiffcp.c):

#if LZW_SUPPORT 1
" -c lzw[:opts]   compress output with Lempel-Ziv & Welch encoding",
#endif
#if ZIP_SUPPORT 1
" -c zip[:opts]   compress output with deflate encoding",
#endif
#if LZMA_SUPPORT
" -c lzma[:opts]  compress output with LZMA2 encoding",
#endif
#if ZSTD_SUPPORT
" -c zstd[:opts]  compress output with ZSTD encoding",
#endif
#if WEBP_SUPPORT
" -c webp[:opts]  compress output with WEBP encoding",
#endif
#if JPEG_SUPPORT 1
" -c jpeg[:opts]  compress output with JPEG encoding",
#endif
#if JBIG_SUPPORT 1
" -c jbig         compress output with ISO JBIG encoding",
#endif
#if PACKBITS_SUPPORT 1
" -c packbits     compress output with packbits encoding",
#endif
#if CCITT_SUPPORT 1
" -c g3[:opts]    compress output with CCITT Group 3 encoding",
" -c g4           compress output with CCITT Group 4 encoding",
#endif

I don't quite know what to make of the "-c sgilog" option, though. Is it an inbuilt function?