Created
June 28, 2012 00:55
-
-
Save springmeyer/3007985 to your computer and use it in GitHub Desktop.
C program to check if a tiff is tiled or stripped (internally)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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