tahoma2d/toonz/sources/image/tzp/tiff_dir.c

32 lines
676 B
C
Raw Normal View History

2016-03-19 06:57:51 +13:00
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define _TOONZ_PROTOTYPES_
#include "toonz.h"
#include "tiff.h"
#include "tiffio.h"
2016-06-15 18:43:10 +12:00
void main(int argc, char *argv[]) {
TIFF *tfp = NIL;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
if (argc != 2) {
printf("tiff_dir error: missing parameters\n");
exit(0);
}
Tiff_ignore_missing_internal_colormap = 1;
Silent_tiff_print_error = 1;
tfp = TIFFOpen(argv[1], "r");
if (!tfp) {
printf("unable to open %s\n", argv[1]);
exit(0);
}
TIFFPrintDirectory(tfp, stderr, TRUE);
while (TIFFReadDirectory(tfp)) TIFFPrintDirectory(tfp, stderr, TRUE);
TIFFClose(tfp);
2016-03-19 06:57:51 +13:00
}