TIFF and LibTiff Mail List Archive


2003.11.17 09:28 "[Tiff] tiff2pdf contribution", by
2003.11.19 22:49 "[Tiff] tiff2pdf contribution", by Finlayson, Ross

2003.11.19 22:49 "[Tiff] tiff2pdf contribution", by Finlayson, Ross


I've made some progress with the tiff2pdf.c program. Now it can handle the JPEG and OJPEG images in the 3.4 sample pics. It also handles some other OJPEG images including some Wang images.

I'm trying to figure out how to link into the libpng software as an option to utilize the differencing filters for PNG prediction. I haven't really seen that specified with regards to TIFF. In PDF, and on PNG, there are a variety of filter methods for differencing the pixels to provide more compressible data. In the Adobe Tech Note describing the "standardization" of new JPEG and Deflate, it is not mentioned. Yet, it's possible to consider adopting support for PNG Group differencing with its specification via the Predictor tag assigned to LZW and Deflate. For outputting the data to PDF, in that case it is well specified in PDF the implementing of PNG-style row differencing, I look at libpng and think I can use the png_write_find_filter function with a png_structp with the libtiff malloc, free, warning, error, and write functions. The filter differencing isn't specified for use with TIFF, I wonder if it is already used and how. It would be an increased efficiency measure, and libpng has compatible distribution policies with libtiff.

Other things in regards to tiff2pdf are colorimetric details. PDF has a gamut of print and display that can almost represent what you can put in a TIFF file. This has to do with transfer functions, halftoning, ICC profiles, footroom and headroom, and other things.

I'm trying to figure out if I can use libtiff to write to standard output. Libtiff expects a seekable file descriptor. The idea of writing to standard output besides piping is that, well, that's about it. You could write a CGI header to output and then write a TIFF for a primitive CGI program.

I can add encryption support to tiff2pdf, yet I don't know if that's a good idea in the general case. Libtiff is widely distributed, and some locales frown on even 40 bit encryption, besides the trivial plaintext attack, some people would like passwords on their faxes.

Another notion is that of thumbnails, that is more the realm of commercial products, although it might be an eventual feature. To implement it would require functions, probably similar to those used in the thumbnail.c tool. That leads into the quagmire of utility libraries for libtiff where libtiff is more plainly about reading and writing the image files and that is all.

I compress the tiff2pdf.c program as it is and attach it to this e-mail, you can also get it from http://www.tiki-, approximately 4000 lines of near-ISO C source code.

I've been discussing with Andrey for a couple weeks, he has mentioned a bump release of libtiff 3.6.1 within the near future, a month or so, so if we as a community have more ideas for libtiff there's no time like the present.

If you have other requests for tiff2pdf please let me know. I'm thinking about handling orientation, colorimetry, and, planar configuration, and that's about it.


Ross F.

<Attachment missing><Attachment missing>