Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
C program to check if a tiff is tiled or stripped (internally)
#include <tiffio.h>
/*
clang -o tiff-is-tiled tiff-is-tiled.c -I/usr/local/include -ltiff;
./tiff-is-tiled test.tiff
*/
int main(int argc, char **argv) {
if (argv[1]) {
TIFF * tif = TIFFOpen(argv[1], "r");
if (TIFFIsTiled(tif))
printf("%s is tiled\n",argv[1]);
else
printf("%s is NOT tiled (stripped)\n",argv[1]);
return 0;
} else {
printf("please provide a path to a tiff file\n");
return 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.