2004.09.15 10:10 "Re: [Tiff] Removing reduced resolution pages", by Gerben Vos
I want to remove any pages in those TIFF files marked as reduced-resolution. So in essence, I want to replace the original file with a new file not having reduced-resolution pages.
Can I do that reliably using libtiff?
You can use tiffcp to copy only some subimages, eg.:
tiffcp in.tif,0,2 out.tif
To identify the subimages you want, write a shell script or batch file that parses the output of tiffinfo, maybe with a bit of perl or awk.
Alternatively, take the tiffcp source code and tweak it to do what you want. Or write your own code; that isn't too hard if you know that all your TIFFs are tiled or not. tiffcp already knows how to take care of both strips and tiles and conversion between the two formats, which is the main reason I find tiffcp a bit hard to read.