2004.09.14 13:50 "[Tiff] Removing reduced resolution pages", by Han The Man

2004.09.15 17:51 "Re: [Tiff] Removing reduced resolution pages", by Andrey Kiselev

I have about 50.000 TIFF files, some of them having pages with "reduced-resolution" pages.

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?

If all your image has the same structure you can simply use the tiffcp utility:

 $ tiffcp input.tiff,0 output.tiff

Number after comma specifies the page number to extract (zero based). So above command extracts the first page for you.

Below is a sample output from TIFFINFO. I know (by visual inspection) that the reduced resolution images are at page 2 and 4.

The subfiletype is 0x03 for page 2 and 4, but according to the TIFF 6.0 spec about "Subfiletype", 0x03 means "a single page of a multipage image".

Shouldn't TIFFINFO print 0x02 - "reduced-resolution image".

What am I missing?

You shouldn't refer to SubfilteType tag, it is obsoleted and doesn't supported by libtiff for writing. Refer to NewSubfileType tag.


Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517