freeimage/Fix-build-failure-with-OpenEXR-3.0.patch

80 lines
2.1 KiB
Diff
Raw Permalink Normal View History

From 62886972a16fe1a8df6443bf04f90d668902052a Mon Sep 17 00:00:00 2001
From: wei dong <weidong@uniontech.com>
Date: Tue, 1 Mar 2022 17:06:24 +0800
Subject: [PATCH] Source/FreeImage/PluginTIFF.cpp
Signed-off-by: wei dong <weidong@uniontech.com>
---
Source/FreeImage/PluginEXR.cpp | 12 ++++++------
Source/FreeImage/PluginTIFF.cpp | 4 +++-
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Source/FreeImage/PluginEXR.cpp b/Source/FreeImage/PluginEXR.cpp
index 9bf3ada..4980c7b 100644
--- a/Source/FreeImage/PluginEXR.cpp
+++ b/Source/FreeImage/PluginEXR.cpp
@@ -2,7 +2,7 @@
// EXR Loader and writer
//
// Design and implementation by
-// - Herv<72> Drolon (drolon@infonie.fr)
+// - Hervé Drolon (drolon@infonie.fr)
// - Mihail Naydenov (mnaydenov@users.sourceforge.net)
//
// This file is part of FreeImage 3
@@ -37,7 +37,7 @@
#include <OpenEXR/ImfRgba.h>
#include <OpenEXR/ImfArray.h>
#include <OpenEXR/ImfPreviewImage.h>
-#include <OpenEXR/half.h>
+#include <Imath/half.h>
// ==========================================================
@@ -66,11 +66,11 @@ public:
return ((unsigned)n != _io->read_proc(c, 1, n, _handle));
}
- virtual Imath::Int64 tellg() {
+ virtual uint64_t tellg() {
return _io->tell_proc(_handle);
}
- virtual void seekg(Imath::Int64 pos) {
+ virtual void seekg(uint64_t pos) {
_io->seek_proc(_handle, (unsigned)pos, SEEK_SET);
}
@@ -100,11 +100,11 @@ public:
}
}
- virtual Imath::Int64 tellp() {
+ virtual uint64_t tellp() {
return _io->tell_proc(_handle);
}
- virtual void seekp(Imath::Int64 pos) {
+ virtual void seekp(uint64_t pos) {
_io->seek_proc(_handle, (unsigned)pos, SEEK_SET);
}
};
diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp
index f0ac0d0..b159aed 100644
--- a/Source/FreeImage/PluginTIFF.cpp
+++ b/Source/FreeImage/PluginTIFF.cpp
@@ -39,7 +39,9 @@
#include "Utilities.h"
#include <tiffio.h>
#include "../Metadata/FreeImageTag.h"
-#include <OpenEXR/half.h>
+#include <Imath/ImathVec.h>
+#include <Imath/half.h>
+#include <Imath/half.h>
#include "FreeImageIO.h"
#include "PSDParser.h"
--
2.27.0