File: 0001-Fix-LibRaw-0.21-API-change.patch

package info (click to toggle)
hdrmerge 0.5%2Bgit20200117-4.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,956 kB
  • sloc: cpp: 5,043; sh: 175; makefile: 5
file content (25 lines) | stat: -rw-r--r-- 919 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: Manuel Presnitz <mail@mpy.de>
Date: Wed, 28 Dec 2022 14:08:47 +0100
Forwarded: not-needed
Subject: Fix LibRaw 0.21 API change

---
 src/ImageIO.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/ImageIO.cpp b/src/ImageIO.cpp
index a80ca51..a5f3715 100644
--- a/src/ImageIO.cpp
+++ b/src/ImageIO.cpp
@@ -36,7 +36,11 @@ using namespace hdrmerge;
 Image ImageIO::loadRawImage(const QString& filename, RawParameters & rawParameters, int shot_select) {
     std::unique_ptr<LibRaw> rawProcessor(new LibRaw);
     auto & d = rawProcessor->imgdata;
+#if LIBRAW_VERSION >= LIBRAW_MAKE_VERSION(0, 21, 0)
+    d.rawparams.shot_select = shot_select;
+#else
     d.params.shot_select = shot_select;
+#endif
     if (rawProcessor->open_file(rawParameters.fileName.toLocal8Bit().constData()) == LIBRAW_SUCCESS) {
         libraw_decoder_info_t decoder_info;
         rawProcessor->get_decoder_info(&decoder_info);