TIFF and LibTiff Mail List Archive


2000.03.29 01:50 "Duplicating tiff file", by Kin Wong
2000.03.29 07:50 "Re: Duplicating tiff file", by Tom Lane
2000.03.29 13:37 "Re: Duplicating tiff file", by Klaus Bartz
2000.03.29 17:57 "Re: Duplicating tiff file", by Kin Wong
2000.03.29 18:18 "Re: Duplicating tiff file", by Rex Jolliff

2000.03.29 01:50 "Duplicating tiff file", by Kin Wong


I've just downloaded the tiff library and compiled it on the Mac using Metrowerk 4 without too much trouble. Your library got me up and running in no time flat. Thanks for all the great work you all have contributed.

Now, hopefully someone can help me with this question by steering me to the proper path. I want to write a general filtering program for some picture processing. So I would need to read in a tiff file, process it, and write it out to a new tiff file. The caveat is that I want to preserve the original header in the new tiff file.

So far, I am unsucessful in finding a way to duplicate the input file's header in the tiff library API, either in memory or into a new file.

So I have tried another approach where I first duplicate the input file, then process the duplicated file using the sequence, TIFFReadScanline(buffer) -> process buffer -> TIFFWriteScanline(buffer). After looking at the library code, this combination of calls is obviously not going to work. Is there a set of functions that will let me read and write on the tiff data buffer?

Right now, my options seem to be: 1). bypass the tiff library API and work on the TIFF structure directly, or 2). don't preserve the original header and put in my own tags. Perhaps somebody have a better approach or suggestion for another option. I hope I am not the only one that need to do something like this.


- Kin