#include "tiffio.h"
main(int argc, char* argv[])
{
TIFF* tif = TIFFOpen(argv[1], "r");
// a "directory" is a page in a multipage tiff
if (tif) {
int dircount = 0;
do {
dircount++;
} while (TIFFReadDirectory(tif));
printf("%d directories in %s\n", dircount, argv[1]);
TIFFClose(tif);
}
}
Yeah, it is C/C++ but sometimes you have to.
Responses to "Tiff Counter"
Leave a response