summaryrefslogtreecommitdiff
path: root/tools/tiffinfo.c
diff options
context:
space:
mode:
authorAndrey Kiselev <dron@ak4719.spb.edu>2005-12-09 14:52:48 +0000
committerAndrey Kiselev <dron@ak4719.spb.edu>2005-12-09 14:52:48 +0000
commit796777f5c5d2c1de4fbec6f11e3d2bca61636ed4 (patch)
tree9c1261586acaf8975bf27f1dcde390ad3c162f8f /tools/tiffinfo.c
parentb6862f841419bf01fe6ff7dba6374a06d3f3532f (diff)
downloadlibtiff-git-796777f5c5d2c1de4fbec6f11e3d2bca61636ed4.tar.gz
Print EXIF directory contents if exist.
Diffstat (limited to 'tools/tiffinfo.c')
-rw-r--r--tools/tiffinfo.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/tiffinfo.c b/tools/tiffinfo.c
index b1f50fd7..d4c04b6c 100644
--- a/tools/tiffinfo.c
+++ b/tools/tiffinfo.c
@@ -1,4 +1,4 @@
-/* $Id: tiffinfo.c,v 1.7 2004-09-03 08:19:27 dron Exp $ */
+/* $Id: tiffinfo.c,v 1.8 2005-12-09 14:52:48 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -129,9 +129,16 @@ main(int argc, char* argv[])
if (TIFFSetSubDirectory(tif, diroff))
tiffinfo(tif, order, flags);
} else {
- do
+ do {
+ uint32 offset;
+
tiffinfo(tif, order, flags);
- while (TIFFReadDirectory(tif));
+ if (TIFFGetField(tif, TIFFTAG_EXIFIFD,
+ &offset)) {
+ if (TIFFReadEXIFDirectory(tif, offset))
+ tiffinfo(tif, order, flags);
+ }
+ } while (TIFFReadDirectory(tif));
}
TIFFClose(tif);
}