summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSu Laus <sulau@freenet.de>2022-05-08 17:57:40 +0000
committerEven Rouault <even.rouault@spatialys.com>2022-05-08 17:57:40 +0000
commitbfb7d2291f5e32d090c87c68af5f8d4313267fc3 (patch)
tree7beba3319a7246c0bbe1c0872c4f046677fe939a
parent9752dae8febab08879fc0159e7d387cff14eb3c3 (diff)
downloadlibtiff-git-bfb7d2291f5e32d090c87c68af5f8d4313267fc3.tar.gz
TIFFIsBigTiff() function added.
-rw-r--r--libtiff/libtiff.def1
-rw-r--r--libtiff/tif_open.c9
-rw-r--r--libtiff/tiffio.h3
3 files changed, 12 insertions, 1 deletions
diff --git a/libtiff/libtiff.def b/libtiff/libtiff.def
index 90850fd2..e93bef08 100644
--- a/libtiff/libtiff.def
+++ b/libtiff/libtiff.def
@@ -63,6 +63,7 @@ EXPORTS TIFFAccessTagMethods
TIFFGetVersion
TIFFGetWriteProc
TIFFIsBigEndian
+ TIFFIsBigTIFF
TIFFIsByteSwapped
TIFFIsCODECConfigured
TIFFIsMSB2LSB
diff --git a/libtiff/tif_open.c b/libtiff/tif_open.c
index a94b68e4..9bef1727 100644
--- a/libtiff/tif_open.c
+++ b/libtiff/tif_open.c
@@ -669,6 +669,15 @@ TIFFIsBigEndian(TIFF* tif)
}
/*
+ * Return nonzero if given file is BigTIFF style.
+ */
+int
+TIFFIsBigTIFF(TIFF *tif)
+{
+ return (tif->tif_header.common.tiff_version == TIFF_VERSION_BIG);
+}
+
+/*
* Return pointer to file read method.
*/
TIFFReadWriteProc
diff --git a/libtiff/tiffio.h b/libtiff/tiffio.h
index 2ad58503..f8ebdbd8 100644
--- a/libtiff/tiffio.h
+++ b/libtiff/tiffio.h
@@ -385,9 +385,10 @@ extern int TIFFIsByteSwapped(TIFF*);
extern int TIFFIsUpSampled(TIFF*);
extern int TIFFIsMSB2LSB(TIFF*);
extern int TIFFIsBigEndian(TIFF*);
+extern int TIFFIsBigTIFF(TIFF*);
extern TIFFReadWriteProc TIFFGetReadProc(TIFF*);
extern TIFFReadWriteProc TIFFGetWriteProc(TIFF*);
-extern TIFFSeekProc TIFFGetSeekProc(TIFF*);
+extern TIFFSeekProc TIFFGetSeekProc(TIFF*);
extern TIFFCloseProc TIFFGetCloseProc(TIFF*);
extern TIFFSizeProc TIFFGetSizeProc(TIFF*);
extern TIFFMapFileProc TIFFGetMapFileProc(TIFF*);