From 8587fe068db6854b7ebd3c17ec26de49cf9bd1ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Fri, 3 Mar 2023 08:57:08 +0100 Subject: [PATCH] Don't perform EXIF hack on BigTIFF --- rtdata/languages/default | 2 +- rtengine/imageio.cc | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index bda477f14..10d0a89c3 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2061,7 +2061,7 @@ SAMPLEFORMAT_16;16-bit floating-point SAMPLEFORMAT_32;24-bit floating-point SAMPLEFORMAT_64;32-bit floating-point SAVEDLG_AUTOSUFFIX;Automatically add a suffix if the file already exists -SAVEDLG_BIGTIFF;BigTIFF +SAVEDLG_BIGTIFF;BigTIFF (no metadata support) SAVEDLG_FILEFORMAT;File format SAVEDLG_FILEFORMAT_FLOAT; floating-point SAVEDLG_FORCEFORMATOPTS;Force saving options diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index 573a391aa..7b3513051 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -1392,7 +1392,7 @@ int ImageIO::saveTIFF ( bool applyExifPatch = false; - if (exifRoot) { + if (exifRoot && !big) { rtexif::TagDirectory* cl = (const_cast (exifRoot))->clone (nullptr); // ------------------ remove some unknown top level tags which produce warnings when opening a tiff (might be useless) ----------------- @@ -1475,10 +1475,11 @@ int ImageIO::saveTIFF ( } #if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ - bool needsReverse = exifRoot && exifRoot->getOrder() == rtexif::MOTOROLA; + bool needsReverse = exifRoot && exifRoot->getOrder() == rtexif::MOTOROLA; #else - bool needsReverse = exifRoot && exifRoot->getOrder() == rtexif::INTEL; + bool needsReverse = exifRoot && exifRoot->getOrder() == rtexif::INTEL; #endif + if (iptcdata) { rtexif::Tag iptcTag(nullptr, rtexif::lookupAttrib (rtexif::ifdAttribs, "IPTCData")); iptcTag.initLongArray((char*)iptcdata, iptclen);