libtiff: Fix wrong return of TIFFIsBigTIFF() in case byte-swapping is acitve (i.e. little endian image on a big endian machine).

From 562bfcad1d80d6e91153ec50a20894a72c7604f0 Mon Sep 17 00:00:00 2001
From: Su_Laus <[EMAIL REDACTED]>
Date: Wed, 13 Mar 2024 19:58:04 +0100
Subject: [PATCH] Fix wrong return of TIFFIsBigTIFF() in case byte-swapping is
 acitve (i.e. little endian image on a big endian machine).

---
 libtiff/tif_open.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libtiff/tif_open.c b/libtiff/tif_open.c
index 6ae178e1..74b5532e 100644
--- a/libtiff/tif_open.c
+++ b/libtiff/tif_open.c
@@ -888,10 +888,7 @@ int 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);
-}
+int TIFFIsBigTIFF(TIFF *tif) { return ((tif->tif_flags & TIFF_BIGTIFF) != 0); }
 
 /*
  * Return pointer to file read method.