Fix build with OpenEXR 1.6.0

Obtained from:  KDE SVN r703387
Reported by:	chmeee on #kde-freebsd
This commit is contained in:
Tilman Keskinoz 2007-10-10 15:02:00 +00:00
parent c02dada131
commit 0bcff581c3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=201266
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,25 @@
--- branches/KDE/3.5/kdegraphics/kfile-plugins/exr/kfile_exr.cpp 2005/09/29 14:33:08 465369
+++ kfile-plugins/exr/kfile_exr.cpp 2007/08/22 12:19:02 703387
@@ -32,6 +32,7 @@
#include <ImfVecAttribute.h>
#include <ImfPreviewImage.h>
#include <ImfVersion.h>
+#include <ImfCRgbaFile.h>
#include <iostream>
@@ -226,7 +227,14 @@
qcapDateString.setLength(capDateString.size());
appendItem( stdgroup, "Capture Date", qcapDateString );
}
+ // This define was introduced in EXR 1.6.0
+#ifndef IMF_B44_COMPRESSION
+ // This is the 1.4 and earlier version
if ( hasutcOffset(h) ) {
+#else
+ // This is the 1.6.0 and later version
+ if ( hasUtcOffset(h) ) {
+#endif
QString UTCOffset;
if (utcOffset(h)>0.0) {
UTCOffset.append(QString("%1").arg(utcOffset(h)/3600, 0, 'f', 1));

View File

@ -0,0 +1,25 @@
--- branches/KDE/3.5/kdegraphics/kfile-plugins/exr/kfile_exr.cpp 2005/09/29 14:33:08 465369
+++ kfile-plugins/exr/kfile_exr.cpp 2007/08/22 12:19:02 703387
@@ -32,6 +32,7 @@
#include <ImfVecAttribute.h>
#include <ImfPreviewImage.h>
#include <ImfVersion.h>
+#include <ImfCRgbaFile.h>
#include <iostream>
@@ -226,7 +227,14 @@
qcapDateString.setLength(capDateString.size());
appendItem( stdgroup, "Capture Date", qcapDateString );
}
+ // This define was introduced in EXR 1.6.0
+#ifndef IMF_B44_COMPRESSION
+ // This is the 1.4 and earlier version
if ( hasutcOffset(h) ) {
+#else
+ // This is the 1.6.0 and later version
+ if ( hasUtcOffset(h) ) {
+#endif
QString UTCOffset;
if (utcOffset(h)>0.0) {
UTCOffset.append(QString("%1").arg(utcOffset(h)/3600, 0, 'f', 1));