I need to save a multipage TIFF from my program, but it seems Qt doesn’t support multipage TIFF. Still, I need to do it. What would be the best way to go about doing it from my program?
So far, I’m thinking about using ImageMagick’s command line utility to create the multipage TIFF from many JPEG files I create, or adding libtiff to my project and trying to use it, or using GDI+ (on Windows at least) to generate the TIFF.
Any other ideas I might have missed?
I’d like to avoid using external EXEs or DLLs if possible, i.e. if I can add a library directly to my project’s source code it would be best.
Also, if you know of a project where it’s already done, please post a link to it, I’d rather not reinvent the wheel.
Qt uses libtiff to read and write TIFF. So I would use the same library, just less headache. Secondly: look at http://qt.gitorious.org/qt/qt/blobs/4.8/src/gui/image/qtiffhandler.cpp to get a clue of how Qt writes one QImage. To support multiple pages I think you need to use
TIFFSetField()(see here, TIFFTAG_PAGENAME and TIFFTAG_PAGENUMBER). I would start to either expand the write() function or write something similar, where you:see also: http://code.google.com/p/multiphoton/source/browse/MatroxImagingLibrary.cpp?#1628