Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc62036333 | ||
|
|
91c089089d | ||
|
|
0b0690e0f0 | ||
|
|
f64234071c |
12 changed files with 1079 additions and 5933 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
|
@ -27,11 +27,3 @@ rawtherapee-3.0-a1.tar.bz2
|
|||
/rawtherapee-5.6.tar.xz
|
||||
/rawtherapee-5.7.tar.xz
|
||||
/rawtherapee-5.8.tar.xz
|
||||
/RawTherapee-68ec1a5bb50b496e255a0b843c36345fbeff2468.tar.gz
|
||||
/RawTherapee-4059ae5bcad8e18443bf8f37bcff84de1dcc0d03.tar.gz
|
||||
/rawtherapee-5.9.tar.xz
|
||||
/rawtherapee-5.10-rc1.tar.xz
|
||||
/rawtherapee-5.10.tar.xz
|
||||
/rawtherapee-5.11.tar.xz
|
||||
/rawtherapee-5.12-rc1.tar.xz
|
||||
/rawtherapee-5.12.tar.xz
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,39 +0,0 @@
|
|||
From d12ca94d42c1370d70fb14cc185d46aaca9c05ac Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Gao <daniel.gao.work@gmail.com>
|
||||
Date: Sun, 24 Aug 2025 11:37:06 -0400
|
||||
Subject: [PATCH] Fix typos
|
||||
|
||||
---
|
||||
rtgui/filepanel.cc | 2 +-
|
||||
rtgui/main.cc | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/rtgui/filepanel.cc b/rtgui/filepanel.cc
|
||||
index f069f099e..28bee9839 100644
|
||||
--- a/rtgui/filepanel.cc
|
||||
+++ b/rtgui/filepanel.cc
|
||||
@@ -208,7 +208,7 @@ void FilePanel::init ()
|
||||
dirBrowser->fillDirTree ();
|
||||
placesBrowser->refreshPlacesList ();
|
||||
|
||||
- if (!App::get().argv0().empty() && Glib::file_test (App::get().argv1(), Glib::FILE_TEST_EXISTS)) {
|
||||
+ if (!App::get().argv1().empty() && Glib::file_test (App::get().argv1(), Glib::FILE_TEST_EXISTS)) {
|
||||
Glib::ustring d(App::get().argv1());
|
||||
if (!Glib::file_test(d, Glib::FILE_TEST_IS_DIR)) {
|
||||
d = Glib::path_get_dirname(d);
|
||||
diff --git a/rtgui/main.cc b/rtgui/main.cc
|
||||
index ded7076be..180e43f5d 100644
|
||||
--- a/rtgui/main.cc
|
||||
+++ b/rtgui/main.cc
|
||||
@@ -139,7 +139,7 @@ int processLineParams ( int argc, char **argv )
|
||||
if (currParam == "-gimp") {
|
||||
app.setIsGimpPlugin(true);
|
||||
app.setIsSimpleEditor(true);
|
||||
- app.setIsRemote(true);
|
||||
+ app.setIsRemote(false);
|
||||
break;
|
||||
}
|
||||
|
||||
--
|
||||
2.51.1
|
||||
|
||||
22
RT_5.8_fix_canon_sraw.patch
Normal file
22
RT_5.8_fix_canon_sraw.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
From 4221fdf31e43658cef98ad660ad398b8ae81b8d7 Mon Sep 17 00:00:00 2001
|
||||
From: Ingo Weyrich <heckflosse67@gmx.de>
|
||||
Date: Fri, 7 Feb 2020 13:52:25 +0100
|
||||
Subject: [PATCH] fix regression in Canon sRAW/mRAW black level computation,
|
||||
taken from ART, fixes #5638
|
||||
|
||||
---
|
||||
rtengine/dcraw.cc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc
|
||||
index 812f122b3..0284b3f1d 100644
|
||||
--- a/rtengine/dcraw.cc
|
||||
+++ b/rtengine/dcraw.cc
|
||||
@@ -9868,6 +9868,7 @@ void CLASS identify()
|
||||
filters = 0;
|
||||
tiff_samples = colors = 3;
|
||||
load_raw = &CLASS canon_sraw_load_raw;
|
||||
+ FORC4 cblack[c] = 0; // ALB
|
||||
} else if (!strcmp(model,"PowerShot 600")) {
|
||||
height = 613;
|
||||
width = 854;
|
||||
221
RT_5.8_fix_crop.patch
Normal file
221
RT_5.8_fix_crop.patch
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
From 15db8cdb57161d57af8307bf85aeda02ea69ddde Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fl=C3=B6ssie?= <floessie.mail@gmail.com>
|
||||
Date: Sun, 5 Apr 2020 11:26:47 +0200
|
||||
Subject: [PATCH] Guard accesses to `Crop::crop_ratios` (#5701)
|
||||
|
||||
---
|
||||
rtgui/crop.cc | 125 +++++++++++++++++++++++++++++++++++---------------
|
||||
rtgui/crop.h | 11 ++---
|
||||
2 files changed, 92 insertions(+), 44 deletions(-)
|
||||
|
||||
diff --git a/rtgui/crop.cc b/rtgui/crop.cc
|
||||
index d9d496523..f092f07a5 100644
|
||||
--- a/rtgui/crop.cc
|
||||
+++ b/rtgui/crop.cc
|
||||
@@ -16,6 +16,8 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
+#include <vector>
|
||||
+
|
||||
#include "crop.h"
|
||||
|
||||
#include "options.h"
|
||||
@@ -46,39 +48,82 @@ inline void get_custom_ratio(int w, int h, double &rw, double &rh)
|
||||
|
||||
} // namespace
|
||||
|
||||
+class Crop::CropRatios final
|
||||
+{
|
||||
+public:
|
||||
+ CropRatios() :
|
||||
+ ratios{
|
||||
+ {M("GENERAL_ASIMAGE"), 0.0},
|
||||
+ {M("GENERAL_CURRENT"), -1.0},
|
||||
+ {"3:2", 3.0 / 2.0}, // L1.5, P0.666...
|
||||
+ {"4:3", 4.0 / 3.0}, // L1.333..., P0.75
|
||||
+ {"16:9", 16.0 / 9.0}, // L1.777..., P0.5625
|
||||
+ {"16:10", 16.0 / 10.0}, // L1.6, P0.625
|
||||
+ {"1:1", 1.0 / 1.0}, // L1, P1
|
||||
+ {"2:1", 2.0 / 1.0}, // L2, P0.5
|
||||
+ {"3:1", 3.0 / 1.0}, // L3, P0.333...
|
||||
+ {"4:1", 4.0 / 1.0}, // L4, P0.25
|
||||
+ {"5:1", 5.0 / 1.0}, // L5, P0.2
|
||||
+ {"6:1", 6.0 / 1.0}, // L6, P0.1666...
|
||||
+ {"7:1", 7.0 / 1.0}, // L7, P0.142...
|
||||
+ {"4:5", 4.0 / 5.0}, // L1.25, P0.8
|
||||
+ {"5:7", 5.0 / 7.0}, // L1.4, P0.714...
|
||||
+ {"6:7", 6.0 / 7.0}, // L1.166..., P0.857...
|
||||
+ {"6:17", 6.0 / 17.0}, // L2.833..., P0.352...
|
||||
+ {"24:65 - XPAN", 24.0 / 65.0}, // L2.708..., P0.369...
|
||||
+ {"1.414 - DIN EN ISO 216", 1.414}, // L1.414, P0.707...
|
||||
+ {"3.5:5", 3.5 / 5.0}, // L1.428..., P0.7
|
||||
+ {"8.5:11 - US Letter", 8.5 / 11.0}, // L1.294..., P0.772...
|
||||
+ {"9.5:12", 9.5 / 12.0}, // L1.263..., P0.791...
|
||||
+ {"10:12", 10.0 / 12.0}, // L1.2, P0.833...
|
||||
+ {"11:14", 11.0 / 14.0}, // L1.272..., P0.785...
|
||||
+ {"11:17 - Tabloid", 11.0 / 17.0}, // L1.545..., P0.647...
|
||||
+ {"13:19", 13.0 / 19.0}, // L1.461..., P0.684...
|
||||
+ {"17:22", 17.0 / 22.0}, // L1.294..., P0.772...
|
||||
+ {"45:35 - ePassport", 45.0 / 35.0}, // L1.285,... P0.777...
|
||||
+ {"64:27", 64.0 / 27.0}, // L2.370..., P0.421...
|
||||
+ }
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ std::vector<Glib::ustring> getLabels() const
|
||||
+ {
|
||||
+ std::vector<Glib::ustring> res;
|
||||
+
|
||||
+ res.reserve(ratios.size());
|
||||
+
|
||||
+ for (const auto& ratio : ratios) {
|
||||
+ res.push_back(ratio.label);
|
||||
+ }
|
||||
+
|
||||
+ return res;
|
||||
+ }
|
||||
+
|
||||
+ double getValue(std::size_t index) const
|
||||
+ {
|
||||
+ return
|
||||
+ index < ratios.size()
|
||||
+ ? ratios[index].value
|
||||
+ : ratios[0].value;
|
||||
+ }
|
||||
+
|
||||
+ void updateCurrentRatio(double value)
|
||||
+ {
|
||||
+ ratios[1].value = value;
|
||||
+ }
|
||||
+
|
||||
+private:
|
||||
+ struct CropRatio {
|
||||
+ Glib::ustring label;
|
||||
+ double value;
|
||||
+ };
|
||||
+
|
||||
+ std::vector<CropRatio> ratios;
|
||||
+};
|
||||
+
|
||||
Crop::Crop():
|
||||
FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true),
|
||||
- crop_ratios{
|
||||
- {M("GENERAL_ASIMAGE"), 0.0},
|
||||
- {M("GENERAL_CURRENT"), -1.0},
|
||||
- {"3:2", 3.0 / 2.0}, // L1.5, P0.666...
|
||||
- {"4:3", 4.0 / 3.0}, // L1.333..., P0.75
|
||||
- {"16:9", 16.0 / 9.0}, // L1.777..., P0.5625
|
||||
- {"16:10", 16.0 / 10.0}, // L1.6, P0.625
|
||||
- {"1:1", 1.0 / 1.0}, // L1, P1
|
||||
- {"2:1", 2.0 / 1.0}, // L2, P0.5
|
||||
- {"3:1", 3.0 / 1.0}, // L3, P0.333...
|
||||
- {"4:1", 4.0 / 1.0}, // L4, P0.25
|
||||
- {"5:1", 5.0 / 1.0}, // L5, P0.2
|
||||
- {"6:1", 6.0 / 1.0}, // L6, P0.1666...
|
||||
- {"7:1", 7.0 / 1.0}, // L7, P0.142...
|
||||
- {"4:5", 4.0 / 5.0}, // L1.25, P0.8
|
||||
- {"5:7", 5.0 / 7.0}, // L1.4, P0.714...
|
||||
- {"6:7", 6.0 / 7.0}, // L1.166..., P0.857...
|
||||
- {"6:17", 6.0 / 17.0}, // L2.833..., P0.352...
|
||||
- {"24:65 - XPAN", 24.0 / 65.0}, // L2.708..., P0.369...
|
||||
- {"1.414 - DIN EN ISO 216", 1.414}, // L1.414, P0.707...
|
||||
- {"3.5:5", 3.5 / 5.0}, // L1.428..., P0.7
|
||||
- {"8.5:11 - US Letter", 8.5 / 11.0}, // L1.294..., P0.772...
|
||||
- {"9.5:12", 9.5 / 12.0}, // L1.263..., P0.791...
|
||||
- {"10:12", 10.0 / 12.0}, // L1.2, P0.833...
|
||||
- {"11:14", 11.0 / 14.0}, // L1.272..., P0.785...
|
||||
- {"11:17 - Tabloid", 11.0 / 17.0}, // L1.545..., P0.647...
|
||||
- {"13:19", 13.0 / 19.0}, // L1.461..., P0.684...
|
||||
- {"17:22", 17.0 / 22.0}, // L1.294..., P0.772...
|
||||
- {"45:35 - ePassport", 45.0 / 35.0}, // L1.285,... P0.777...
|
||||
- {"64:27", 64.0 / 27.0}, // L2.370..., P0.421...
|
||||
- },
|
||||
+ crop_ratios(new CropRatios),
|
||||
opt(0),
|
||||
wDirty(true),
|
||||
hDirty(true),
|
||||
@@ -229,8 +274,8 @@ Crop::Crop():
|
||||
// ppigrid END
|
||||
|
||||
// Populate the combobox
|
||||
- for (const auto& crop_ratio : crop_ratios) {
|
||||
- ratio->append (crop_ratio.label);
|
||||
+ for (const auto& label : crop_ratios->getLabels()) {
|
||||
+ ratio->append (label);
|
||||
}
|
||||
|
||||
ratio->set_active (0);
|
||||
@@ -354,7 +399,10 @@ void Crop::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||
setDimensions (pp->crop.x + pp->crop.w, pp->crop.y + pp->crop.h);
|
||||
}
|
||||
|
||||
- const bool flip_orientation = pp->crop.fixratio && crop_ratios[ratio->get_active_row_number()].value > 0 && crop_ratios[ratio->get_active_row_number()].value < 1.0;
|
||||
+ const bool flip_orientation =
|
||||
+ pp->crop.fixratio
|
||||
+ && crop_ratios->getValue(ratio->get_active_row_number()) > 0
|
||||
+ && crop_ratios->getValue(ratio->get_active_row_number()) < 1.0;
|
||||
|
||||
if (pp->crop.orientation == "Landscape") {
|
||||
orientation->set_active (flip_orientation ? 1 : 0);
|
||||
@@ -469,7 +517,10 @@ void Crop::write (ProcParams* pp, ParamsEdited* pedited)
|
||||
}
|
||||
|
||||
// for historical reasons we store orientation different if ratio is written as 2:3 instead of 3:2, but in GUI 'landscape' is always long side horizontal regardless of the ratio is written short or long side first.
|
||||
- const bool flip_orientation = fixr->get_active() && crop_ratios[ratio->get_active_row_number()].value > 0 && crop_ratios[ratio->get_active_row_number()].value < 1.0;
|
||||
+ const bool flip_orientation =
|
||||
+ fixr->get_active()
|
||||
+ && crop_ratios->getValue(ratio->get_active_row_number()) > 0
|
||||
+ && crop_ratios->getValue(ratio->get_active_row_number()) < 1.0;
|
||||
|
||||
if (orientation->get_active_row_number() == 0) {
|
||||
pp->crop.orientation = flip_orientation ? "Portrait" : "Landscape";
|
||||
@@ -1501,7 +1552,7 @@ double Crop::getRatio () const
|
||||
return r;
|
||||
}
|
||||
|
||||
- r = crop_ratios[ratio->get_active_row_number()].value;
|
||||
+ r = crop_ratios->getValue(ratio->get_active_row_number());
|
||||
if (!r) {
|
||||
r = maxh <= maxw ? float(maxh)/float(maxw) : float(maxw)/float(maxh);
|
||||
}
|
||||
@@ -1539,5 +1590,5 @@ void Crop::updateCurrentRatio()
|
||||
double rw, rh;
|
||||
get_custom_ratio(w->get_value(), h->get_value(), rw, rh);
|
||||
customRatioLabel->set_text(Glib::ustring::compose("%1:%2", rw, rh));
|
||||
- crop_ratios[1].value = double(w->get_value())/double(h->get_value());
|
||||
+ crop_ratios->updateCurrentRatio(static_cast<double>(w->get_value()) / static_cast<double>(h->get_value()));
|
||||
}
|
||||
diff --git a/rtgui/crop.h b/rtgui/crop.h
|
||||
index b9221a803..c6636b917 100644
|
||||
--- a/rtgui/crop.h
|
||||
+++ b/rtgui/crop.h
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
-#include <vector>
|
||||
+#include <memory>
|
||||
|
||||
#include <gtkmm.h>
|
||||
|
||||
@@ -91,16 +91,13 @@ class Crop final :
|
||||
void rotateCrop (int deg, bool hflip, bool vflip);
|
||||
|
||||
private:
|
||||
- struct CropRatio {
|
||||
- Glib::ustring label;
|
||||
- double value;
|
||||
- };
|
||||
-
|
||||
- std::vector<CropRatio> crop_ratios;
|
||||
+ class CropRatios;
|
||||
|
||||
void adjustCropToRatio();
|
||||
void updateCurrentRatio();
|
||||
|
||||
+ const std::unique_ptr<CropRatios> crop_ratios;
|
||||
+
|
||||
Gtk::CheckButton* fixr;
|
||||
MyComboBoxText* ratio;
|
||||
MyComboBoxText* orientation;
|
||||
63
RT_5.8_fix_nikon_z_exif.patch
Normal file
63
RT_5.8_fix_nikon_z_exif.patch
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
From 84b59f187aa8418e0b5f0986caa6a5a7e5f08136 Mon Sep 17 00:00:00 2001
|
||||
From: Anders Bennehag <anders@bennehag.com>
|
||||
Date: Sun, 21 Jun 2020 14:08:45 -0400
|
||||
Subject: [PATCH] createJPEGMarker(): Removes MakerNotes.ShotInfo from jpeg
|
||||
export
|
||||
|
||||
as it is 52Kb large on Nikon Z-series cameras, which results in
|
||||
jpeg exif tags being larger than allowed 65Kb limit.
|
||||
|
||||
Fixes https://github.com/Beep6581/RawTherapee/issues/5698
|
||||
---
|
||||
rtexif/rtexif.cc | 38 +++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 37 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc
|
||||
index c0038c067..f32a9feb1 100644
|
||||
--- a/rtexif/rtexif.cc
|
||||
+++ b/rtexif/rtexif.cc
|
||||
@@ -3248,7 +3248,43 @@ int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::pro
|
||||
TagDirectory* cl;
|
||||
|
||||
if (root) {
|
||||
- cl = (const_cast<TagDirectory*> (root))->clone (nullptr);
|
||||
+ cl = root->clone(nullptr);
|
||||
+
|
||||
+ // Drop unwanted tags before exporting
|
||||
+ // For example, Nikon Z-series has a 52Kb MakerNotes->ShotInfo tag
|
||||
+ // which does not fit into the 65Kb limit on JPEG exif tags
|
||||
+ const Tag* const make_tag = cl->getTag(271);
|
||||
+ if (make_tag && !std::strncmp((const char*)make_tag->getValue(), "NIKON CORPORATION", 17)) {
|
||||
+ [cl]()
|
||||
+ {
|
||||
+ Tag* const exif_tag = cl->getTag(34665);
|
||||
+ if (!exif_tag) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ TagDirectory* const exif_dir = exif_tag->getDirectory();
|
||||
+ if (!exif_dir) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ Tag* const make_notes_tag = exif_dir->getTag(37500);
|
||||
+ if (!make_notes_tag) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ TagDirectory* const maker_notes_dir = make_notes_tag->getDirectory();
|
||||
+ if (!maker_notes_dir) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ Tag* const shot_info_tag = maker_notes_dir->getTag(145);
|
||||
+ if (!shot_info_tag) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ shot_info_tag->setKeep(false);
|
||||
+ }();
|
||||
+ }
|
||||
} else {
|
||||
cl = new TagDirectory (nullptr, ifdAttribs, INTEL);
|
||||
}
|
||||
683
RT_5.8_glibc234.patch
Normal file
683
RT_5.8_glibc234.patch
Normal file
|
|
@ -0,0 +1,683 @@
|
|||
diff -udHrN -- a/RT_5.8_glibc234.patch b/RT_5.8_glibc234.patch
|
||||
--- a/RT_5.8_glibc234.patch 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ b/RT_5.8_glibc234.patch 2021-08-04 18:50:22.142646367 +0200
|
||||
@@ -0,0 +1,334 @@
|
||||
+diff --git a/rtengine/canon_cr3_decoder.cc b/rtengine/canon_cr3_decoder.cc
|
||||
+index ddd4b6172..1132b4e01 100644
|
||||
+--- a/rtengine/canon_cr3_decoder.cc
|
||||
++++ b/rtengine/canon_cr3_decoder.cc
|
||||
+@@ -670,7 +670,7 @@ std::uint32_t _byteswap_ulong(std::uint32_t x)
|
||||
+ #endif
|
||||
+
|
||||
+ struct LibRaw_abstract_datastream {
|
||||
+- IMFILE* ifp;
|
||||
++ rtengine::IMFILE* ifp;
|
||||
+
|
||||
+ void lock()
|
||||
+ {
|
||||
+diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc
|
||||
+index ef0b4e8dc..13a6b054a 100644
|
||||
+--- a/rtengine/dcraw.cc
|
||||
++++ b/rtengine/dcraw.cc
|
||||
+@@ -1963,7 +1963,7 @@ void CLASS phase_one_load_raw_c()
|
||||
+ #endif
|
||||
+ {
|
||||
+ int len[2], pred[2];
|
||||
+- IMFILE ifpthr = *ifp;
|
||||
++ rtengine::IMFILE ifpthr = *ifp;
|
||||
+ ifpthr.plistener = nullptr;
|
||||
+
|
||||
+ #ifdef _OPENMP
|
||||
+@@ -3317,7 +3317,7 @@ void CLASS sony_arw2_load_raw()
|
||||
+ {
|
||||
+ uchar *data = new (std::nothrow) uchar[raw_width + 1];
|
||||
+ merror(data, "sony_arw2_load_raw()");
|
||||
+- IMFILE ifpthr = *ifp;
|
||||
++ rtengine::IMFILE ifpthr = *ifp;
|
||||
+ int pos = ifpthr.pos;
|
||||
+ ushort pix[16];
|
||||
+
|
||||
+@@ -6331,7 +6331,7 @@ int CLASS parse_tiff_ifd (int base)
|
||||
+ unsigned sony_curve[] = { 0,0,0,0,0,4095 };
|
||||
+ unsigned *buf, sony_offset=0, sony_length=0, sony_key=0;
|
||||
+ struct jhead jh;
|
||||
+-/*RT*/ IMFILE *sfp;
|
||||
++/*RT*/ rtengine::IMFILE *sfp;
|
||||
+ /*RT*/ int pana_raw = 0;
|
||||
+
|
||||
+ if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0])
|
||||
+@@ -6895,7 +6895,7 @@ it under the terms of the one of two licenses as you choose:
|
||||
+ fread (buf, sony_length, 1, ifp);
|
||||
+ sony_decrypt (buf, sony_length/4, 1, sony_key);
|
||||
+ sfp = ifp;
|
||||
+-/*RT*/ ifp = fopen (buf, sony_length);
|
||||
++/*RT*/ ifp = rtengine::fopen (buf, sony_length);
|
||||
+ // if ((ifp = tmpfile())) {
|
||||
+ // fwrite (buf, sony_length, 1, ifp);
|
||||
+ // fseek (ifp, 0, SEEK_SET);
|
||||
+@@ -7203,7 +7203,7 @@ void CLASS parse_external_jpeg()
|
||||
+ {
|
||||
+ const char *file, *ext;
|
||||
+ char *jname, *jfile, *jext;
|
||||
+-/*RT*/ IMFILE *save=ifp;
|
||||
++/*RT*/ rtengine::IMFILE *save=ifp;
|
||||
+
|
||||
+ ext = strrchr (ifname, '.');
|
||||
+ file = strrchr (ifname, '/');
|
||||
+@@ -7231,7 +7231,7 @@ void CLASS parse_external_jpeg()
|
||||
+ *jext = '0';
|
||||
+ }
|
||||
+ if (strcmp (jname, ifname)) {
|
||||
+-/*RT*/ if ((ifp = fopen (jname))) {
|
||||
++/*RT*/ if ((ifp = rtengine::fopen (jname))) {
|
||||
+ // if ((ifp = fopen (jname, "rb"))) {
|
||||
+ if (verbose)
|
||||
+ fprintf (stderr,_("Reading metadata from %s ...\n"), jname);
|
||||
+diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h
|
||||
+index 10c7b9ba6..bc009e67c 100644
|
||||
+--- a/rtengine/dcraw.h
|
||||
++++ b/rtengine/dcraw.h
|
||||
+@@ -73,7 +73,7 @@ public:
|
||||
+
|
||||
+ protected:
|
||||
+ int exif_base, ciff_base, ciff_len;
|
||||
+- IMFILE *ifp;
|
||||
++ rtengine::IMFILE *ifp;
|
||||
+ FILE *ofp;
|
||||
+ short order;
|
||||
+ const char *ifname;
|
||||
+@@ -125,7 +125,7 @@ protected:
|
||||
+ int cur_buf_size; // buffer size
|
||||
+ uchar *cur_buf; // currently read block
|
||||
+ int fillbytes; // Counter to add extra byte for block size N*16
|
||||
+- IMFILE *input;
|
||||
++ rtengine::IMFILE *input;
|
||||
+ struct int_pair grad_even[3][41]; // tables of gradients
|
||||
+ struct int_pair grad_odd[3][41];
|
||||
+ ushort *linealloc;
|
||||
+@@ -278,7 +278,7 @@ void parse_redcine();
|
||||
+ class getbithuff_t
|
||||
+ {
|
||||
+ public:
|
||||
+- getbithuff_t(DCraw *p,IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
|
||||
++ getbithuff_t(DCraw *p,rtengine::IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
|
||||
+ unsigned operator()(int nbits, ushort *huff);
|
||||
+
|
||||
+ private:
|
||||
+@@ -288,7 +288,7 @@ private:
|
||||
+ DCraw *parent;
|
||||
+ unsigned bitbuf;
|
||||
+ int vbits, reset;
|
||||
+- IMFILE *&ifp;
|
||||
++ rtengine::IMFILE *&ifp;
|
||||
+ unsigned &zero_after_ff;
|
||||
+ };
|
||||
+ getbithuff_t getbithuff;
|
||||
+@@ -296,7 +296,7 @@ getbithuff_t getbithuff;
|
||||
+ class nikbithuff_t
|
||||
+ {
|
||||
+ public:
|
||||
+- explicit nikbithuff_t(IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
|
||||
++ explicit nikbithuff_t(rtengine::IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
|
||||
+ void operator()() {bitbuf = vbits = 0;};
|
||||
+ unsigned operator()(int nbits, ushort *huff);
|
||||
+ unsigned errorCount() { return errors; }
|
||||
+@@ -309,7 +309,7 @@ private:
|
||||
+ }
|
||||
+ unsigned bitbuf, errors;
|
||||
+ int vbits;
|
||||
+- IMFILE *&ifp;
|
||||
++ rtengine::IMFILE *&ifp;
|
||||
+ };
|
||||
+ nikbithuff_t nikbithuff;
|
||||
+
|
||||
+@@ -377,7 +377,7 @@ void parse_qt (int end);
|
||||
+ // ph1_bithuff(int nbits, ushort *huff);
|
||||
+ class ph1_bithuff_t {
|
||||
+ public:
|
||||
+- ph1_bithuff_t(DCraw *p, IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
|
||||
++ ph1_bithuff_t(DCraw *p, rtengine::IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
|
||||
+ unsigned operator()(int nbits, ushort *huff);
|
||||
+ unsigned operator()(int nbits);
|
||||
+ unsigned operator()();
|
||||
+@@ -411,7 +411,7 @@ private:
|
||||
+ }
|
||||
+
|
||||
+ short ℴ
|
||||
+- IMFILE* const ifp;
|
||||
++ rtengine::IMFILE* const ifp;
|
||||
+ UINT64 bitbuf;
|
||||
+ int vbits;
|
||||
+ };
|
||||
+@@ -429,11 +429,11 @@ void nokia_load_raw();
|
||||
+
|
||||
+ class pana_bits_t{
|
||||
+ public:
|
||||
+- pana_bits_t(IMFILE *i, unsigned &u, unsigned enc):
|
||||
++ pana_bits_t(rtengine::IMFILE *i, unsigned &u, unsigned enc):
|
||||
+ ifp(i), load_flags(u), vbits(0), encoding(enc) {}
|
||||
+ unsigned operator()(int nbits, unsigned *bytes=nullptr);
|
||||
+ private:
|
||||
+- IMFILE *ifp;
|
||||
++ rtengine::IMFILE *ifp;
|
||||
+ unsigned &load_flags;
|
||||
+ uchar buf[0x4000];
|
||||
+ int vbits;
|
||||
+diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc
|
||||
+index 7dde668eb..e551c9aad 100644
|
||||
+--- a/rtengine/dfmanager.cc
|
||||
++++ b/rtengine/dfmanager.cc
|
||||
+@@ -540,7 +540,7 @@ std::vector<badPix> *DFManager::getHotPixels ( const std::string &mak, const std
|
||||
+
|
||||
+ int DFManager::scanBadPixelsFile( Glib::ustring filename )
|
||||
+ {
|
||||
+- FILE *file = fopen( filename.c_str(), "r" );
|
||||
++ FILE *file = ::fopen( filename.c_str(), "r" );
|
||||
+
|
||||
+ if( !file ) {
|
||||
+ return false;
|
||||
+diff --git a/rtengine/myfile.cc b/rtengine/myfile.cc
|
||||
+index 842766dcf..2321d18bb 100644
|
||||
+--- a/rtengine/myfile.cc
|
||||
++++ b/rtengine/myfile.cc
|
||||
+@@ -70,7 +70,7 @@ int munmap(void *start, size_t length)
|
||||
+
|
||||
+ #ifdef MYFILE_MMAP
|
||||
+
|
||||
+-IMFILE* fopen (const char* fname)
|
||||
++rtengine::IMFILE* rtengine::fopen (const char* fname)
|
||||
+ {
|
||||
+ int fd;
|
||||
+
|
||||
+@@ -123,13 +123,13 @@ IMFILE* fopen (const char* fname)
|
||||
+ return mf;
|
||||
+ }
|
||||
+
|
||||
+-IMFILE* gfopen (const char* fname)
|
||||
++rtengine::IMFILE* rtengine::gfopen (const char* fname)
|
||||
+ {
|
||||
+ return fopen(fname);
|
||||
+ }
|
||||
+ #else
|
||||
+
|
||||
+-IMFILE* fopen (const char* fname)
|
||||
++rtengine::IMFILE* rtengine::fopen (const char* fname)
|
||||
+ {
|
||||
+
|
||||
+ FILE* f = g_fopen (fname, "rb");
|
||||
+@@ -152,7 +152,7 @@ IMFILE* fopen (const char* fname)
|
||||
+ return mf;
|
||||
+ }
|
||||
+
|
||||
+-IMFILE* gfopen (const char* fname)
|
||||
++rtengine::IMFILE* rtengine::gfopen (const char* fname)
|
||||
+ {
|
||||
+
|
||||
+ FILE* f = g_fopen (fname, "rb");
|
||||
+@@ -176,7 +176,7 @@ IMFILE* gfopen (const char* fname)
|
||||
+ }
|
||||
+ #endif //MYFILE_MMAP
|
||||
+
|
||||
+-IMFILE* fopen (unsigned* buf, int size)
|
||||
++rtengine::IMFILE* rtengine::fopen (unsigned* buf, int size)
|
||||
+ {
|
||||
+
|
||||
+ IMFILE* mf = new IMFILE;
|
||||
+@@ -190,7 +190,7 @@ IMFILE* fopen (unsigned* buf, int size)
|
||||
+ return mf;
|
||||
+ }
|
||||
+
|
||||
+-void fclose (IMFILE* f)
|
||||
++void rtengine::fclose (IMFILE* f)
|
||||
+ {
|
||||
+ #ifdef MYFILE_MMAP
|
||||
+
|
||||
+@@ -207,7 +207,7 @@ void fclose (IMFILE* f)
|
||||
+ delete f;
|
||||
+ }
|
||||
+
|
||||
+-int fscanf (IMFILE* f, const char* s ...)
|
||||
++int rtengine::fscanf (IMFILE* f, const char* s ...)
|
||||
+ {
|
||||
+ // fscanf not easily wrapped since we have no terminating \0 at end
|
||||
+ // of file data and vsscanf() won't tell us how many characters that
|
||||
+@@ -253,7 +253,7 @@ int fscanf (IMFILE* f, const char* s ...)
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+-char* fgets (char* s, int n, IMFILE* f)
|
||||
++char* rtengine::fgets (char* s, int n, IMFILE* f)
|
||||
+ {
|
||||
+
|
||||
+ if (f->pos >= f->size) {
|
||||
+@@ -270,7 +270,7 @@ char* fgets (char* s, int n, IMFILE* f)
|
||||
+ return s;
|
||||
+ }
|
||||
+
|
||||
+-void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
|
||||
++void rtengine::imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
|
||||
+ {
|
||||
+ f->plistener = plistener;
|
||||
+ f->progress_range = progress_range;
|
||||
+@@ -278,7 +278,7 @@ void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, doub
|
||||
+ f->progress_current = 0;
|
||||
+ }
|
||||
+
|
||||
+-void imfile_update_progress(IMFILE *f)
|
||||
++void rtengine::imfile_update_progress(IMFILE *f)
|
||||
+ {
|
||||
+ if (!f->plistener || f->progress_current < f->progress_next) {
|
||||
+ return;
|
||||
+diff --git a/rtengine/myfile.h b/rtengine/myfile.h
|
||||
+index 34b90c525..ae14ce31a 100644
|
||||
+--- a/rtengine/myfile.h
|
||||
++++ b/rtengine/myfile.h
|
||||
+@@ -30,8 +30,6 @@ namespace rtengine
|
||||
+
|
||||
+ class ProgressListener;
|
||||
+
|
||||
+-}
|
||||
+-
|
||||
+ struct IMFILE {
|
||||
+ int fd;
|
||||
+ ssize_t pos;
|
||||
+@@ -141,3 +139,5 @@ inline unsigned char* fdata(int offset, IMFILE* f)
|
||||
+
|
||||
+ int fscanf (IMFILE* f, const char* s ...);
|
||||
+ char* fgets (char* s, int n, IMFILE* f);
|
||||
++
|
||||
++}
|
||||
+diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc
|
||||
+index 8dc998862..cf500474f 100644
|
||||
+--- a/rtengine/rtthumbnail.cc
|
||||
++++ b/rtengine/rtthumbnail.cc
|
||||
+@@ -1965,7 +1965,7 @@ bool Thumbnail::writeImage (const Glib::ustring& fname)
|
||||
+
|
||||
+ Glib::ustring fullFName = fname + ".rtti";
|
||||
+
|
||||
+- FILE* f = g_fopen (fullFName.c_str (), "wb");
|
||||
++ FILE* f = ::g_fopen (fullFName.c_str (), "wb");
|
||||
+
|
||||
+ if (!f) {
|
||||
+ return false;
|
||||
+@@ -2008,7 +2008,7 @@ bool Thumbnail::readImage (const Glib::ustring& fname)
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+- FILE* f = g_fopen(fullFName.c_str (), "rb");
|
||||
++ FILE* f = ::g_fopen(fullFName.c_str (), "rb");
|
||||
+
|
||||
+ if (!f) {
|
||||
+ return false;
|
||||
+@@ -2239,7 +2239,7 @@ bool Thumbnail::writeData (const Glib::ustring& fname)
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+- FILE *f = g_fopen (fname.c_str (), "wt");
|
||||
++ FILE *f = ::g_fopen (fname.c_str (), "wt");
|
||||
+
|
||||
+ if (!f) {
|
||||
+ if (settings->verbose) {
|
||||
+@@ -2262,7 +2262,7 @@ bool Thumbnail::readEmbProfile (const Glib::ustring& fname)
|
||||
+ embProfile = nullptr;
|
||||
+ embProfileLength = 0;
|
||||
+
|
||||
+- FILE* f = g_fopen (fname.c_str (), "rb");
|
||||
++ FILE* f = ::g_fopen (fname.c_str (), "rb");
|
||||
+
|
||||
+ if (f) {
|
||||
+ if (!fseek (f, 0, SEEK_END)) {
|
||||
+@@ -2290,7 +2290,7 @@ bool Thumbnail::writeEmbProfile (const Glib::ustring& fname)
|
||||
+ {
|
||||
+
|
||||
+ if (embProfileData) {
|
||||
+- FILE* f = g_fopen (fname.c_str (), "wb");
|
||||
++ FILE* f = ::g_fopen (fname.c_str (), "wb");
|
||||
+
|
||||
+ if (f) {
|
||||
+ fwrite (embProfileData, 1, embProfileLength, f);
|
||||
diff -udHrN -- a/rtengine/canon_cr3_decoder.cc b/rtengine/canon_cr3_decoder.cc
|
||||
--- a/rtengine/canon_cr3_decoder.cc 2020-02-04 07:39:52.000000000 +0100
|
||||
+++ b/rtengine/canon_cr3_decoder.cc 2021-08-07 11:43:50.725202017 +0200
|
||||
@@ -662,7 +662,7 @@
|
||||
#endif
|
||||
|
||||
struct LibRaw_abstract_datastream {
|
||||
- IMFILE* ifp;
|
||||
+ rtengine::IMFILE* ifp;
|
||||
|
||||
void lock()
|
||||
{
|
||||
diff -udHrN -- a/rtengine/dcraw.cc b/rtengine/dcraw.cc
|
||||
--- a/rtengine/dcraw.cc 2020-02-04 07:39:52.000000000 +0100
|
||||
+++ b/rtengine/dcraw.cc 2021-08-07 11:43:50.736202141 +0200
|
||||
@@ -2025,7 +2025,7 @@
|
||||
#endif
|
||||
{
|
||||
int len[2], pred[2];
|
||||
- IMFILE ifpthr = *ifp;
|
||||
+ rtengine::IMFILE ifpthr = *ifp;
|
||||
ifpthr.plistener = nullptr;
|
||||
|
||||
#ifdef _OPENMP
|
||||
@@ -3380,7 +3380,7 @@
|
||||
{
|
||||
uchar *data = new (std::nothrow) uchar[raw_width + 1];
|
||||
merror(data, "sony_arw2_load_raw()");
|
||||
- IMFILE ifpthr = *ifp;
|
||||
+ rtengine::IMFILE ifpthr = *ifp;
|
||||
int pos = ifpthr.pos;
|
||||
ushort pix[16];
|
||||
|
||||
@@ -6394,7 +6394,7 @@
|
||||
unsigned sony_curve[] = { 0,0,0,0,0,4095 };
|
||||
unsigned *buf, sony_offset=0, sony_length=0, sony_key=0;
|
||||
struct jhead jh;
|
||||
-/*RT*/ IMFILE *sfp;
|
||||
+/*RT*/ rtengine::IMFILE *sfp;
|
||||
/*RT*/ int pana_raw = 0;
|
||||
|
||||
if (tiff_nifds >= sizeof tiff_ifd / sizeof tiff_ifd[0])
|
||||
@@ -6958,7 +6958,7 @@
|
||||
fread (buf, sony_length, 1, ifp);
|
||||
sony_decrypt (buf, sony_length/4, 1, sony_key);
|
||||
sfp = ifp;
|
||||
-/*RT*/ ifp = fopen (buf, sony_length);
|
||||
+/*RT*/ ifp = rtengine::fopen (buf, sony_length);
|
||||
// if ((ifp = tmpfile())) {
|
||||
// fwrite (buf, sony_length, 1, ifp);
|
||||
// fseek (ifp, 0, SEEK_SET);
|
||||
@@ -7264,7 +7264,7 @@
|
||||
{
|
||||
const char *file, *ext;
|
||||
char *jname, *jfile, *jext;
|
||||
-/*RT*/ IMFILE *save=ifp;
|
||||
+/*RT*/ rtengine::IMFILE *save=ifp;
|
||||
|
||||
ext = strrchr (ifname, '.');
|
||||
file = strrchr (ifname, '/');
|
||||
@@ -7292,7 +7292,7 @@
|
||||
*jext = '0';
|
||||
}
|
||||
if (strcmp (jname, ifname)) {
|
||||
-/*RT*/ if ((ifp = fopen (jname))) {
|
||||
+/*RT*/ if ((ifp = rtengine::fopen (jname))) {
|
||||
// if ((ifp = fopen (jname, "rb"))) {
|
||||
if (verbose)
|
||||
fprintf (stderr,_("Reading metadata from %s ...\n"), jname);
|
||||
diff -udHrN -- a/rtengine/dcraw.h b/rtengine/dcraw.h
|
||||
--- a/rtengine/dcraw.h 2020-02-04 07:39:52.000000000 +0100
|
||||
+++ b/rtengine/dcraw.h 2021-08-07 11:43:50.737202152 +0200
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
protected:
|
||||
int exif_base, ciff_base, ciff_len;
|
||||
- IMFILE *ifp;
|
||||
+ rtengine::IMFILE *ifp;
|
||||
FILE *ofp;
|
||||
short order;
|
||||
const char *ifname;
|
||||
@@ -125,7 +125,7 @@
|
||||
int cur_buf_size; // buffer size
|
||||
uchar *cur_buf; // currently read block
|
||||
int fillbytes; // Counter to add extra byte for block size N*16
|
||||
- IMFILE *input;
|
||||
+ rtengine::IMFILE *input;
|
||||
struct int_pair grad_even[3][41]; // tables of gradients
|
||||
struct int_pair grad_odd[3][41];
|
||||
ushort *linealloc;
|
||||
@@ -278,7 +278,7 @@
|
||||
class getbithuff_t
|
||||
{
|
||||
public:
|
||||
- getbithuff_t(DCraw *p,IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
|
||||
+ getbithuff_t(DCraw *p,rtengine::IMFILE *&i, unsigned &z):parent(p),bitbuf(0),vbits(0),reset(0),ifp(i),zero_after_ff(z){}
|
||||
unsigned operator()(int nbits, ushort *huff);
|
||||
|
||||
private:
|
||||
@@ -288,7 +288,7 @@
|
||||
DCraw *parent;
|
||||
unsigned bitbuf;
|
||||
int vbits, reset;
|
||||
- IMFILE *&ifp;
|
||||
+ rtengine::IMFILE *&ifp;
|
||||
unsigned &zero_after_ff;
|
||||
};
|
||||
getbithuff_t getbithuff;
|
||||
@@ -296,7 +296,7 @@
|
||||
class nikbithuff_t
|
||||
{
|
||||
public:
|
||||
- explicit nikbithuff_t(IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
|
||||
+ explicit nikbithuff_t(rtengine::IMFILE *&i):bitbuf(0),errors(0),vbits(0),ifp(i){}
|
||||
void operator()() {bitbuf = vbits = 0;};
|
||||
unsigned operator()(int nbits, ushort *huff);
|
||||
unsigned errorCount() { return errors; }
|
||||
@@ -309,7 +309,7 @@
|
||||
}
|
||||
unsigned bitbuf, errors;
|
||||
int vbits;
|
||||
- IMFILE *&ifp;
|
||||
+ rtengine::IMFILE *&ifp;
|
||||
};
|
||||
nikbithuff_t nikbithuff;
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
// ph1_bithuff(int nbits, ushort *huff);
|
||||
class ph1_bithuff_t {
|
||||
public:
|
||||
- ph1_bithuff_t(DCraw *p, IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
|
||||
+ ph1_bithuff_t(DCraw *p, rtengine::IMFILE *i, short &o):order(o),ifp(i),bitbuf(0),vbits(0){}
|
||||
unsigned operator()(int nbits, ushort *huff);
|
||||
unsigned operator()(int nbits);
|
||||
unsigned operator()();
|
||||
@@ -412,7 +412,7 @@
|
||||
}
|
||||
|
||||
short ℴ
|
||||
- IMFILE* const ifp;
|
||||
+ rtengine::IMFILE* const ifp;
|
||||
UINT64 bitbuf;
|
||||
int vbits;
|
||||
};
|
||||
@@ -430,11 +430,11 @@
|
||||
|
||||
class pana_bits_t{
|
||||
public:
|
||||
- pana_bits_t(IMFILE *i, unsigned &u, unsigned enc):
|
||||
+ pana_bits_t(rtengine::IMFILE *i, unsigned &u, unsigned enc):
|
||||
ifp(i), load_flags(u), vbits(0), encoding(enc) {}
|
||||
unsigned operator()(int nbits, unsigned *bytes=nullptr);
|
||||
private:
|
||||
- IMFILE *ifp;
|
||||
+ rtengine::IMFILE *ifp;
|
||||
unsigned &load_flags;
|
||||
uchar buf[0x4000];
|
||||
int vbits;
|
||||
diff -udHrN -- a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc
|
||||
--- a/rtengine/dfmanager.cc 2020-02-04 07:39:52.000000000 +0100
|
||||
+++ b/rtengine/dfmanager.cc 2021-08-07 11:43:50.738202163 +0200
|
||||
@@ -540,7 +540,7 @@
|
||||
|
||||
int DFManager::scanBadPixelsFile( Glib::ustring filename )
|
||||
{
|
||||
- FILE *file = fopen( filename.c_str(), "r" );
|
||||
+ FILE *file = ::fopen( filename.c_str(), "r" );
|
||||
|
||||
if( !file ) {
|
||||
return false;
|
||||
diff -udHrN -- a/rtengine/myfile.cc b/rtengine/myfile.cc
|
||||
--- a/rtengine/myfile.cc 2020-02-04 07:39:52.000000000 +0100
|
||||
+++ b/rtengine/myfile.cc 2021-08-07 11:43:50.738202163 +0200
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
#ifdef MYFILE_MMAP
|
||||
|
||||
-IMFILE* fopen (const char* fname)
|
||||
+rtengine::IMFILE* rtengine::fopen (const char* fname)
|
||||
{
|
||||
int fd;
|
||||
|
||||
@@ -123,13 +123,13 @@
|
||||
return mf;
|
||||
}
|
||||
|
||||
-IMFILE* gfopen (const char* fname)
|
||||
+rtengine::IMFILE* rtengine::gfopen (const char* fname)
|
||||
{
|
||||
return fopen(fname);
|
||||
}
|
||||
#else
|
||||
|
||||
-IMFILE* fopen (const char* fname)
|
||||
+rtengine::IMFILE* rtengine::fopen (const char* fname)
|
||||
{
|
||||
|
||||
FILE* f = g_fopen (fname, "rb");
|
||||
@@ -152,7 +152,7 @@
|
||||
return mf;
|
||||
}
|
||||
|
||||
-IMFILE* gfopen (const char* fname)
|
||||
+rtengine::IMFILE* rtengine::gfopen (const char* fname)
|
||||
{
|
||||
|
||||
FILE* f = g_fopen (fname, "rb");
|
||||
@@ -176,7 +176,7 @@
|
||||
}
|
||||
#endif //MYFILE_MMAP
|
||||
|
||||
-IMFILE* fopen (unsigned* buf, int size)
|
||||
+rtengine::IMFILE* rtengine::fopen (unsigned* buf, int size)
|
||||
{
|
||||
|
||||
IMFILE* mf = new IMFILE;
|
||||
@@ -190,7 +190,7 @@
|
||||
return mf;
|
||||
}
|
||||
|
||||
-void fclose (IMFILE* f)
|
||||
+void rtengine::fclose (IMFILE* f)
|
||||
{
|
||||
#ifdef MYFILE_MMAP
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
delete f;
|
||||
}
|
||||
|
||||
-int fscanf (IMFILE* f, const char* s ...)
|
||||
+int rtengine::fscanf (IMFILE* f, const char* s ...)
|
||||
{
|
||||
// fscanf not easily wrapped since we have no terminating \0 at end
|
||||
// of file data and vsscanf() won't tell us how many characters that
|
||||
@@ -253,7 +253,7 @@
|
||||
}
|
||||
|
||||
|
||||
-char* fgets (char* s, int n, IMFILE* f)
|
||||
+char* rtengine::fgets (char* s, int n, IMFILE* f)
|
||||
{
|
||||
|
||||
if (f->pos >= f->size) {
|
||||
@@ -270,7 +270,7 @@
|
||||
return s;
|
||||
}
|
||||
|
||||
-void imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
|
||||
+void rtengine::imfile_set_plistener(IMFILE *f, rtengine::ProgressListener *plistener, double progress_range)
|
||||
{
|
||||
f->plistener = plistener;
|
||||
f->progress_range = progress_range;
|
||||
@@ -278,7 +278,7 @@
|
||||
f->progress_current = 0;
|
||||
}
|
||||
|
||||
-void imfile_update_progress(IMFILE *f)
|
||||
+void rtengine::imfile_update_progress(IMFILE *f)
|
||||
{
|
||||
if (!f->plistener || f->progress_current < f->progress_next) {
|
||||
return;
|
||||
diff -udHrN -- a/rtengine/myfile.h b/rtengine/myfile.h
|
||||
--- a/rtengine/myfile.h 2020-02-04 07:39:52.000000000 +0100
|
||||
+++ b/rtengine/myfile.h 2021-08-07 11:43:50.739202175 +0200
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
class ProgressListener;
|
||||
|
||||
-}
|
||||
-
|
||||
struct IMFILE {
|
||||
int fd;
|
||||
ssize_t pos;
|
||||
@@ -141,3 +139,5 @@
|
||||
|
||||
int fscanf (IMFILE* f, const char* s ...);
|
||||
char* fgets (char* s, int n, IMFILE* f);
|
||||
+
|
||||
+}
|
||||
diff -udHrN -- a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc
|
||||
--- a/rtengine/rtthumbnail.cc 2020-02-04 07:39:52.000000000 +0100
|
||||
+++ b/rtengine/rtthumbnail.cc 2021-08-07 12:02:02.091503230 +0200
|
||||
@@ -1922,7 +1922,7 @@
|
||||
|
||||
Glib::ustring fullFName = fname + ".rtti";
|
||||
|
||||
- FILE* f = g_fopen (fullFName.c_str (), "wb");
|
||||
+ FILE* f = ::g_fopen (fullFName.c_str (), "wb");
|
||||
|
||||
if (!f) {
|
||||
return false;
|
||||
@@ -1965,7 +1965,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- FILE* f = g_fopen(fullFName.c_str (), "rb");
|
||||
+ FILE* f = ::g_fopen(fullFName.c_str (), "rb");
|
||||
|
||||
if (!f) {
|
||||
return false;
|
||||
@@ -2191,7 +2191,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
- FILE *f = g_fopen (fname.c_str (), "wt");
|
||||
+ FILE *f = ::g_fopen (fname.c_str (), "wt");
|
||||
|
||||
if (!f) {
|
||||
if (settings->verbose) {
|
||||
@@ -2214,7 +2214,7 @@
|
||||
embProfile = nullptr;
|
||||
embProfileLength = 0;
|
||||
|
||||
- FILE* f = g_fopen (fname.c_str (), "rb");
|
||||
+ FILE* f = ::g_fopen (fname.c_str (), "rb");
|
||||
|
||||
if (f) {
|
||||
if (!fseek (f, 0, SEEK_END)) {
|
||||
@@ -2242,7 +2242,7 @@
|
||||
{
|
||||
|
||||
if (embProfileData) {
|
||||
- FILE* f = g_fopen (fname.c_str (), "wb");
|
||||
+ FILE* f = ::g_fopen (fname.c_str (), "wb");
|
||||
|
||||
if (f) {
|
||||
fwrite (embProfileData, 1, embProfileLength, f);
|
||||
@@ -2257,7 +2257,7 @@
|
||||
bool Thumbnail::readAEHistogram (const Glib::ustring& fname)
|
||||
{
|
||||
|
||||
- FILE* f = g_fopen(fname.c_str(), "rb");
|
||||
+ FILE* f = ::g_fopen(fname.c_str(), "rb");
|
||||
|
||||
if (!f) {
|
||||
aeHistogram.reset();
|
||||
@@ -2280,7 +2280,7 @@
|
||||
{
|
||||
|
||||
if (aeHistogram) {
|
||||
- FILE* f = g_fopen (fname.c_str (), "wb");
|
||||
+ FILE* f = ::g_fopen (fname.c_str (), "wb");
|
||||
|
||||
if (f) {
|
||||
fwrite (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof (aeHistogram[0]), f);
|
||||
49
RT_5.8_system_klt.patch
Normal file
49
RT_5.8_system_klt.patch
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
From 9205b506b50c941ee13c78243f51a2e15d9fe16f Mon Sep 17 00:00:00 2001
|
||||
From: Mattia Verga <mattia.verga@tiscali.it>
|
||||
Date: Sun, 24 Nov 2019 13:48:12 +0100
|
||||
Subject: [PATCH] Fix linking against system klt
|
||||
|
||||
---
|
||||
rtengine/CMakeLists.txt | 6 ++++++
|
||||
rtengine/calc_distort.cc | 4 ++--
|
||||
2 files changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt
|
||||
index f58afde5e..711818a6d 100644
|
||||
--- a/rtengine/CMakeLists.txt
|
||||
+++ b/rtengine/CMakeLists.txt
|
||||
@@ -12,6 +12,11 @@ include_directories(${EXTRA_INCDIR}
|
||||
${LENSFUN_INCLUDE_DIRS}
|
||||
${RSVG_INCLUDE_DIRS}
|
||||
)
|
||||
+if(NOT WITH_SYSTEM_KLT)
|
||||
+ include_directories("${CMAKE_SOURCE_DIR}/rtengine/klt")
|
||||
+else()
|
||||
+ include_directories(${KLT_INCLUDE_DIRS})
|
||||
+endif()
|
||||
|
||||
link_directories("${PROJECT_SOURCE_DIR}/rtexif"
|
||||
${EXPAT_LIBRARY_DIRS}
|
||||
@@ -184,6 +189,7 @@ target_link_libraries(rtengine rtexif
|
||||
${ZLIB_LIBRARIES}
|
||||
${LENSFUN_LIBRARIES}
|
||||
${RSVG_LIBRARIES}
|
||||
+ ${KLT_LIBRARIES}
|
||||
)
|
||||
|
||||
install(FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
diff --git a/rtengine/calc_distort.cc b/rtengine/calc_distort.cc
|
||||
index 7af47adb2..3a7a4a1c4 100644
|
||||
--- a/rtengine/calc_distort.cc
|
||||
+++ b/rtengine/calc_distort.cc
|
||||
@@ -5,8 +5,8 @@ locations (before and after tracking) to text files and to PPM files,
|
||||
and prints the features to the screen.
|
||||
**********************************************************************/
|
||||
|
||||
-#include "klt/pnmio.h"
|
||||
-#include "klt/klt.h"
|
||||
+#include <pnmio.h>
|
||||
+#include <klt.h>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
set(GIT_DESCRIBE 5.9)
|
||||
set(GIT_BRANCH dev)
|
||||
set(GIT_COMMIT 4059ae5)
|
||||
set(GIT_COMMIT_DATE 2022-10-02)
|
||||
set(GIT_COMMITS_SINCE_TAG 0)
|
||||
set(GIT_COMMITS_SINCE_BRANCH 0)
|
||||
set(GIT_VERSION_NUMERIC_BS 0.0.0)
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
#!/bin/sh
|
||||
# example usage: ./create_ReleaseInfo.sh 5.9 68ec1a5 2022-05-25
|
||||
|
||||
VERSION=$1
|
||||
SHORTCOMMIT=$2
|
||||
DATE=$3
|
||||
|
||||
echo "set(GIT_DESCRIBE $VERSION)" > ReleaseInfo.cmake
|
||||
echo "set(GIT_BRANCH dev)" >> ReleaseInfo.cmake
|
||||
echo "set(GIT_COMMIT $SHORTCOMMIT)" >> ReleaseInfo.cmake
|
||||
echo "set(GIT_COMMIT_DATE $DATE)" >> ReleaseInfo.cmake
|
||||
echo "set(GIT_COMMITS_SINCE_TAG 0)" >> ReleaseInfo.cmake
|
||||
echo "set(GIT_COMMITS_SINCE_BRANCH 0)" >> ReleaseInfo.cmake
|
||||
echo "set(GIT_VERSION_NUMERIC_BS 0.0.0)" >> ReleaseInfo.cmake
|
||||
|
|
@ -1,40 +1,32 @@
|
|||
%global link_tcmalloc 1
|
||||
%global development 0
|
||||
|
||||
%if 0%{?development}
|
||||
%global commit 4059ae5bcad8e18443bf8f37bcff84de1dcc0d03
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
%endif
|
||||
|
||||
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||
ExcludeArch: %{ix86}
|
||||
|
||||
Name: rawtherapee
|
||||
%if 0%{?development}
|
||||
Version: 5.9~20221002git%{shortcommit}
|
||||
%else
|
||||
Version: 5.12
|
||||
%endif
|
||||
Version: 5.8
|
||||
Release: %autorelease
|
||||
Summary: Raw image processing software
|
||||
|
||||
License: GPL-3.0-or-later and AGPL-3.0-or-later and MIT-open-group and IJG and BSL-1.0 and Apache-2.0
|
||||
License: GPLv3 and MIT and IJG
|
||||
URL: http://www.rawtherapee.com/
|
||||
Source0: https://github.com/Beep6581/RawTherapee/releases/download/%{version}/%{name}-%{version}.tar.xz
|
||||
|
||||
%if 0%{?development}
|
||||
Source0: https://github.com/Beep6581/RawTherapee/archive/%{commit}/RawTherapee-%{commit}.tar.gz
|
||||
# File created with ./create_ReleaseInfo.sh 5.9 4059ae5 2022-10-02
|
||||
Source1: create_ReleaseInfo.sh
|
||||
Source2: ReleaseInfo.cmake
|
||||
%else
|
||||
#Source0: https://rawtherapee.com/shared/source/%%{name}-%%{version}.tar.xz
|
||||
Source0: https://github.com/Beep6581/RawTherapee/releases/download/%{version}/rawtherapee-%{version}.tar.xz
|
||||
%endif
|
||||
# Fix linking against system's KLT
|
||||
# Upstream PR https://github.com/Beep6581/RawTherapee/pull/5539
|
||||
Patch: RT_5.8_system_klt.patch
|
||||
|
||||
# Patch to fix segfault at startup
|
||||
# See upstream ticket https://github.com/RawTherapee/RawTherapee/issues/7532
|
||||
Patch: 0001-Fix-static-init-order-fiasco-crashes.patch
|
||||
Patch: 0001-Fix-typos.patch
|
||||
# Backport patch for fixing rhbz#1820907
|
||||
Patch: RT_5.8_fix_crop.patch
|
||||
|
||||
# Backport patch for fixing build with glibc 2.34
|
||||
# https://github.com/Beep6581/RawTherapee/issues/6324
|
||||
Patch: RT_5.8_glibc234.patch
|
||||
|
||||
# Backport patch for fixing Canon sRAW/mRAW
|
||||
# https://github.com/Beep6581/RawTherapee/issues/5898
|
||||
Patch: RT_5.8_fix_canon_sraw.patch
|
||||
|
||||
# Backport patch for fixing Nikon Z EXIF information
|
||||
# https://github.com/Beep6581/RawTherapee/issues/5808
|
||||
Patch: RT_5.8_fix_nikon_z_exif.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: desktop-file-utils
|
||||
|
|
@ -43,22 +35,20 @@ BuildRequires: klt-devel
|
|||
BuildRequires: libappstream-glib
|
||||
BuildRequires: libatomic
|
||||
|
||||
BuildRequires: pkgconfig(exiv2) >= 0.24
|
||||
BuildRequires: pkgconfig(expat) >= 2.1
|
||||
BuildRequires: pkgconfig(exiv2)
|
||||
BuildRequires: pkgconfig(expat)
|
||||
BuildRequires: pkgconfig(fftw3f)
|
||||
BuildRequires: pkgconfig(glib-2.0) >= 2.48
|
||||
BuildRequires: pkgconfig(glibmm-2.4) >= 2.48
|
||||
BuildRequires: pkgconfig(gtk+-3.0) >= 3.24.3
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
BuildRequires: pkgconfig(glibmm-2.4)
|
||||
BuildRequires: pkgconfig(gtk+-3.0)
|
||||
BuildRequires: pkgconfig(gtkmm-3.0)
|
||||
BuildRequires: pkgconfig(lcms2) >= 2.6
|
||||
BuildRequires: pkgconfig(lensfun) >= 0.2
|
||||
BuildRequires: pkgconfig(lcms2)
|
||||
BuildRequires: pkgconfig(lensfun)
|
||||
BuildRequires: pkgconfig(libcanberra)
|
||||
BuildRequires: pkgconfig(libiptcdata)
|
||||
BuildRequires: pkgconfig(libjpeg)
|
||||
BuildRequires: pkgconfig(libjxl)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(libraw)
|
||||
BuildRequires: pkgconfig(librsvg-2.0) >= 2.52
|
||||
BuildRequires: pkgconfig(librsvg-2.0)
|
||||
%if 0%{?link_tcmalloc}
|
||||
BuildRequires: pkgconfig(libtcmalloc)
|
||||
%endif
|
||||
|
|
@ -79,32 +69,30 @@ many parameters to enhance the raw picture before finally exporting it
|
|||
to some common image format.
|
||||
|
||||
%prep
|
||||
%if 0%{?development}
|
||||
%autosetup -p1 -n RawTherapee-%{commit}
|
||||
cp -p %SOURCE2 .
|
||||
%else
|
||||
%autosetup -p1 -n %{name}-%{version}
|
||||
%endif
|
||||
|
||||
# fix wrong line endings
|
||||
sed -i "s|\r||g" LICENSE.txt
|
||||
|
||||
# remove bundled KLT, so we're sure to use system provided KLT
|
||||
rm -rf rtengine/klt/
|
||||
|
||||
# remove bundled libraw, so we're sure to use system provided libraw
|
||||
rm -rf rtengine/libraw/
|
||||
|
||||
%build
|
||||
# do not build shared libs
|
||||
# https://github.com/Beep6581/RawTherapee/pull/5479
|
||||
%{cmake} \
|
||||
-DCMAKE_BUILD_TYPE=release \
|
||||
%{cmake} %{?BUILD_TESTS} \
|
||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||
-DLIBDIR=%{_libdir} \
|
||||
-DCMAKE_BUILD_TYPE=release \
|
||||
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
||||
-DAUTOMATED_BUILD_SYSTEM:BOOL=ON \
|
||||
-DCACHE_NAME_SUFFIX="" \
|
||||
-DCMAKE_CXX_FLAGS="$RPM_OPT_FLAGS" \
|
||||
-DCMAKE_C_FLAGS="$RPM_OPT_FLAGS" \
|
||||
%if 0%{?link_tcmalloc}
|
||||
-DENABLE_TCMALLOC=ON \
|
||||
%endif
|
||||
-DWITH_SYSTEM_KLT=ON \
|
||||
-DWITH_SYSTEM_LIBRAW="ON" \
|
||||
-DWITH_JXL="ON"
|
||||
-DWITH_SYSTEM_KLT=ON
|
||||
|
||||
%cmake_build
|
||||
|
||||
|
|
@ -123,8 +111,7 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/com.%{na
|
|||
|
||||
|
||||
%files
|
||||
%doc AUTHORS.txt RELEASE_NOTES.txt
|
||||
%license LICENSE licenses/DroidSansMonoDotted.txt licenses/sleef_LICENSE.txt licenses/jdatasrc
|
||||
%doc AUTHORS.txt LICENSE.txt RELEASE_NOTES.txt
|
||||
%{_mandir}/man1/%{name}.1.gz
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/%{name}-cli
|
||||
|
|
@ -132,7 +119,6 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/com.%{na
|
|||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/metainfo/com.%{name}.RawTherapee.appdata.xml
|
||||
%{_datadir}/icons/hicolor/*/apps/%{name}.png
|
||||
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
||||
|
||||
|
||||
%changelog
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (rawtherapee-5.12.tar.xz) = 0590a0852385bc85be2a33e5f978904f3a05385b5702f8960adb5aade67d549037245506c84a541d8a49bcc49fe7b71c765be875336cb86deb5c03fd4e3f4c23
|
||||
SHA512 (rawtherapee-5.8.tar.xz) = bc79586cd937dcaefc053e65faa2162de887d514e44980956d937c157c6d55c4f6e6a7a9b8f91f2d657ed2054814737b96d5d741674c1e5a961d7177433efe4e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue