diff options
author | Thomas Bernard <miniupnp@free.fr> | 2020-04-05 00:46:12 +0200 |
---|---|---|
committer | Thomas Bernard <miniupnp@free.fr> | 2020-04-05 00:46:12 +0200 |
commit | 691427ea8dd175db1671c77d496385e1c4760712 (patch) | |
tree | 15e07b51c8507140801ec862d99fb0775892c954 /tools/tiffinfo.c | |
parent | 632f6a1a4f830f69d62fc0314b2109a2d9025963 (diff) | |
download | libtiff-git-691427ea8dd175db1671c77d496385e1c4760712.tar.gz |
tiffinfo: fix dump of Tiled images
fixes #80
Diffstat (limited to 'tools/tiffinfo.c')
-rw-r--r-- | tools/tiffinfo.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/tools/tiffinfo.c b/tools/tiffinfo.c index 049e3a34..a15894b9 100644 --- a/tools/tiffinfo.c +++ b/tools/tiffinfo.c @@ -407,11 +407,11 @@ ShowRawWords(uint16* pp, uint32 n) putchar('\n'); } -void -TIFFReadRawData(TIFF* tif, int bitrev) +static void +TIFFReadRawDataStriped(TIFF* tif, int bitrev) { tstrip_t nstrips = TIFFNumberOfStrips(tif); - const char* what = TIFFIsTiled(tif) ? "Tile" : "Strip"; + const char* what = "Strip"; uint64* stripbc=NULL; TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbc); @@ -456,6 +456,22 @@ TIFFReadRawData(TIFF* tif, int bitrev) } static void +TIFFReadRawDataTiled(TIFF* tif, int bitrev) +{ + const char* what = "Tile"; +} + +void +TIFFReadRawData(TIFF* tif, int bitrev) +{ + if (TIFFIsTiled(tif)) { + TIFFReadRawDataTiled(tif, bitrev); + } else { + TIFFReadRawDataStriped(tif, bitrev); + } +} + +static void tiffinfo(TIFF* tif, uint16 order, long flags, int is_image) { TIFFPrintDirectory(tif, stdout, flags); |