From 09e988475723bdf3ac7e7d686959ed3f83e9c5dd Mon Sep 17 00:00:00 2001 From: Andy Dodd Date: Wed, 14 Dec 2022 19:05:49 -0500 Subject: [PATCH 01/13] iccstore: Allow loading profiles from user-writable configuration directory In addition to bundled profiles and the system ICC profile store, load profiles from a user-writable/user-specific directory On Linux, this is $HOME/.config/RawTherapee/iccprofiles/output - corresponding to "input" being already supported Partial fix for part of #6644 --- rtengine/iccstore.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 2f443522c..d7bd57564 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -454,6 +454,8 @@ public: if (loadAll) { loadProfiles(profilesDir, &fileProfiles, &fileProfileContents, nullptr, false); loadProfiles(userICCDir, &fileProfiles, &fileProfileContents, nullptr, false); + Glib::ustring user_output_icc_dir = Glib::build_filename(options.rtdir, "iccprofiles", "output"); + loadProfiles(user_output_icc_dir, &fileProfiles, &fileProfileContents, nullptr, false); } // Input profiles From 887cf9966526487dbe62d5628d52023059040a0f Mon Sep 17 00:00:00 2001 From: Matei George-Daniel Date: Sat, 18 Feb 2023 19:58:59 +0200 Subject: [PATCH 02/13] make dpfa lines mark safer --- rtengine/pdaflinesfilter.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rtengine/pdaflinesfilter.cc b/rtengine/pdaflinesfilter.cc index b5c72f7f4..60f2abcb6 100644 --- a/rtengine/pdaflinesfilter.cc +++ b/rtengine/pdaflinesfilter.cc @@ -275,7 +275,11 @@ int PDAFLinesFilter::mark(const array2D &rawData, PixelsMap &bpMap) for (int y = 1; y < H_-1; ++y) { int yy = pattern_[idx] + off; if (y == yy) { - int n = markLine(rawData, bpMap, y) + markLine(rawData, bpMap, y-1) + markLine(rawData, bpMap, y+1); + int n = 0; + n += markLine(rawData, bpMap, y); + n += (y-1 <= 0 ) ? 0 : markLine(rawData, bpMap, y-1); + n += (y+1 >= H_-1) ? 0 : markLine(rawData, bpMap, y+1); + if (n) { found += n; if (settings->verbose) { From 03fd015e7716781fc97abeb82def05dd975a325f Mon Sep 17 00:00:00 2001 From: Shiho Midorikawa Date: Mon, 27 Feb 2023 03:26:10 +0900 Subject: [PATCH 03/13] Compute return buffer size at ExifManager::createJPEGMarker and make the buffer in that --- rtengine/imageio.cc | 6 +++--- rtexif/rtexif.cc | 24 +++++++++++++----------- rtexif/rtexif.h | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index ce44d1ff4..fb7c9aee7 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -1027,7 +1027,7 @@ int ImageIO::savePNG (const Glib::ustring &fname, int bps) const #if defined(PNG_SKIP_sRGB_CHECK_PROFILE) && defined(PNG_SET_OPTION_SUPPORTED) png_set_option(png, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON); #endif - + png_infop info = png_create_info_struct(png); if (!info) { @@ -1227,12 +1227,12 @@ int ImageIO::saveJPEG (const Glib::ustring &fname, int quality, int subSamp) con jpeg_start_compress(&cinfo, TRUE); // buffer for exif and iptc markers - unsigned char* buffer = new unsigned char[165535]; //FIXME: no buffer size check so it can be overflowed in createJPEGMarker() for large tags, and then software will crash + unsigned char* buffer; unsigned int size; // assemble and write exif marker if (exifRoot) { - int size = rtexif::ExifManager::createJPEGMarker (exifRoot, *exifChange, cinfo.image_width, cinfo.image_height, buffer); + rtexif::ExifManager::createJPEGMarker (exifRoot, *exifChange, cinfo.image_width, cinfo.image_height, buffer, size); if (size > 0 && size < 65530) { jpeg_write_marker(&cinfo, JPEG_APP0 + 1, buffer, size); diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index a7125fb9a..a48db5229 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -3243,24 +3243,17 @@ std::vector ExifManager::getDefaultTIFFTags (TagDirectory* forthis) -int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, unsigned char* buffer) +int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, unsigned char *&buffer, unsigned &bufferSize) { // write tiff header - int offs = 6; - memcpy (buffer, "Exif\0\0", 6); + int offs = 6; // "Exif\0\0" ByteOrder order = INTEL; if (root) { order = root->getOrder (); } - sset2 ((unsigned short)order, buffer + offs, order); - offs += 2; - sset2 (42, buffer + offs, order); - offs += 2; - sset4 (8, buffer + offs, order); - TagDirectory* cl; if (root) { @@ -3322,11 +3315,20 @@ int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::pro } cl->sort (); - int size = cl->write (8, buffer + 6); + bufferSize = cl->calculateSize() + 8 + 6; + buffer = new unsigned char[bufferSize]; // this has to be deleted in caller + memcpy (buffer, "Exif\0\0", 6); + sset2 ((unsigned short)order, buffer + offs, order); + offs += 2; + sset2 (42, buffer + offs, order); + offs += 2; + sset4 (8, buffer + offs, order); + + int endOffs = cl->write (8, buffer + 6); delete cl; - return size + 6; + return endOffs; } int ExifManager::createPNGMarker(const TagDirectory* root, const rtengine::procparams::ExifPairs &changeList, int W, int H, int bps, const char* iptcdata, int iptclen, unsigned char *&buffer, unsigned &bufferSize) diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index 7b2f8ad23..beb21131a 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -379,7 +379,7 @@ public: /// @param forthis The byte order will be taken from the given directory. /// @return The ownership of the return tags is passed to the caller. static std::vector getDefaultTIFFTags (TagDirectory* forthis); - static int createJPEGMarker (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, unsigned char* buffer); + static int createJPEGMarker (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, unsigned char *&buffer, unsigned &bufferSize); static int createTIFFHeader (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, int bps, const char* profiledata, int profilelen, const char* iptcdata, int iptclen, unsigned char *&buffer, unsigned &bufferSize); static int createPNGMarker(const TagDirectory *root, const rtengine::procparams::ExifPairs &changeList, int W, int H, int bps, const char *iptcdata, int iptclen, unsigned char *&buffer, unsigned &bufferSize); }; From 62c1f34c4f68beeb1338609ba6065bb459baab0e Mon Sep 17 00:00:00 2001 From: Shiho Midorikawa Date: Mon, 27 Feb 2023 03:43:25 +0900 Subject: [PATCH 04/13] Separate IPTC/EXIF buffers --- rtengine/imageio.cc | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index fb7c9aee7..16f6a7246 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -1226,19 +1226,27 @@ int ImageIO::saveJPEG (const Glib::ustring &fname, int quality, int subSamp) con jpeg_start_compress(&cinfo, TRUE); - // buffer for exif and iptc markers - unsigned char* buffer; - unsigned int size; + // buffer for exif marker + unsigned char* exifBuffer = nullptr; + unsigned int exifBufferSize = 0; // assemble and write exif marker if (exifRoot) { - rtexif::ExifManager::createJPEGMarker (exifRoot, *exifChange, cinfo.image_width, cinfo.image_height, buffer, size); + rtexif::ExifManager::createJPEGMarker (exifRoot, *exifChange, cinfo.image_width, cinfo.image_height, exifBuffer, exifBufferSize); - if (size > 0 && size < 65530) { - jpeg_write_marker(&cinfo, JPEG_APP0 + 1, buffer, size); + if (exifBufferSize > 0 && exifBufferSize < 65530) { + jpeg_write_marker(&cinfo, JPEG_APP0 + 1, exifBuffer, exifBufferSize); } + } + if (exifBuffer != nullptr) { + delete [] exifBuffer; + } + + // buffer for iptc marker + unsigned char* iptcBuffer = new unsigned char[65535]; + // assemble and write iptc marker if (iptc) { unsigned char* iptcdata; @@ -1254,7 +1262,7 @@ int ImageIO::saveJPEG (const Glib::ustring &fname, int quality, int subSamp) con int bytes = 0; - if (!error && (bytes = iptc_jpeg_ps3_save_iptc (nullptr, 0, iptcdata, size, buffer, 65532)) < 0) { + if (!error && (bytes = iptc_jpeg_ps3_save_iptc (nullptr, 0, iptcdata, size, iptcBuffer, 65532)) < 0) { error = true; } @@ -1263,11 +1271,11 @@ int ImageIO::saveJPEG (const Glib::ustring &fname, int quality, int subSamp) con } if (!error) { - jpeg_write_marker(&cinfo, JPEG_APP0 + 13, buffer, bytes); + jpeg_write_marker(&cinfo, JPEG_APP0 + 13, iptcBuffer, bytes); } } - delete [] buffer; + delete [] iptcBuffer; // write icc profile to the output if (profileData) { From f759cff2fe4f6011c38039c6b5c077bbea69b79d Mon Sep 17 00:00:00 2001 From: Shiho Midorikawa Date: Mon, 27 Feb 2023 14:27:47 +0900 Subject: [PATCH 05/13] Fix separation mistake --- rtengine/imageio.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index 16f6a7246..23b0fafec 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -1250,9 +1250,10 @@ int ImageIO::saveJPEG (const Glib::ustring &fname, int quality, int subSamp) con // assemble and write iptc marker if (iptc) { unsigned char* iptcdata; + unsigned int iptcSize; bool error = false; - if (iptc_data_save (iptc, &iptcdata, &size)) { + if (iptc_data_save (iptc, &iptcdata, &iptcSize)) { if (iptcdata) { iptc_data_free_buf (iptc, iptcdata); } @@ -1262,7 +1263,7 @@ int ImageIO::saveJPEG (const Glib::ustring &fname, int quality, int subSamp) con int bytes = 0; - if (!error && (bytes = iptc_jpeg_ps3_save_iptc (nullptr, 0, iptcdata, size, iptcBuffer, 65532)) < 0) { + if (!error && (bytes = iptc_jpeg_ps3_save_iptc (nullptr, 0, iptcdata, iptcSize, iptcBuffer, 65532)) < 0) { error = true; } From 508ca583df991c1b413744b1c86fdfa43f165139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Mon, 13 Mar 2023 18:19:41 -0400 Subject: [PATCH 06/13] Issue #6708 - fix overlapping buffer strcpy - address sanitizer triggered an error on Fujifilm Finepix HS10 --- rtengine/dcraw.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 7a2a5b4d5..15c2f04fb 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -9807,9 +9807,9 @@ void CLASS identify() if (!strncasecmp (model, make, i) && model[i++] == ' ') memmove (model, model+i, 64-i); if (!strncmp (model,"FinePix ",8)) - strcpy (model, model+8); +/* RT */ memmove (model, model+8, 64-8); if (!strncmp (model,"Digital Camera ",15)) - strcpy (model, model+15); +/* RT */ memmove (model, model+15, 64-15); desc[511] = artist[63] = make[63] = model[63] = model2[63] = 0; if (!is_raw) goto notraw; From 005bfbc4952fe81c5459b1140011229742171033 Mon Sep 17 00:00:00 2001 From: Benitoite Date: Wed, 15 Mar 2023 10:21:18 -0700 Subject: [PATCH 07/13] Mac: add CR3 defalut handling --- tools/osx/Info.plist.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/osx/Info.plist.in b/tools/osx/Info.plist.in index 876d35e3a..2faa69f83 100644 --- a/tools/osx/Info.plist.in +++ b/tools/osx/Info.plist.in @@ -73,6 +73,8 @@ arw CR2 cr2 + CR3 + cr3 CRF crf CRW From 7a48aff7ee38b996d1f9d4b9786d4a2eb8391865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Fri, 7 Apr 2023 21:51:46 -0400 Subject: [PATCH 08/13] Issue #6735 - Remove memory leak when processing Fuji RAF converted to DNG --- rtexif/rtexif.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index a7125fb9a..4848299ad 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -1209,6 +1209,10 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) goto defsubdirs; } } else { + // In some circumstances, `value` may have been allocated, so + // delete it to prevent a leak. See issue + // https://github.com/Beep6581/RawTherapee/issues/6735 + delete [] value; // read value value = new unsigned char [valuesize + 1]; auto readSize = fread (value, 1, valuesize, f); From fcbe2182fde376521bc10ea76da710f334e4025e Mon Sep 17 00:00:00 2001 From: Shiho Midorikawa Date: Thu, 25 May 2023 03:13:07 +0900 Subject: [PATCH 09/13] Remove return value from ExifManager::createJPEGMarker --- rtexif/rtexif.cc | 6 ++---- rtexif/rtexif.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index a48db5229..111f11668 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -3243,7 +3243,7 @@ std::vector ExifManager::getDefaultTIFFTags (TagDirectory* forthis) -int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, unsigned char *&buffer, unsigned &bufferSize) +void ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, unsigned char *&buffer, unsigned &bufferSize) { // write tiff header @@ -3324,11 +3324,9 @@ int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::pro offs += 2; sset4 (8, buffer + offs, order); - int endOffs = cl->write (8, buffer + 6); + cl->write (8, buffer + 6); delete cl; - - return endOffs; } int ExifManager::createPNGMarker(const TagDirectory* root, const rtengine::procparams::ExifPairs &changeList, int W, int H, int bps, const char* iptcdata, int iptclen, unsigned char *&buffer, unsigned &bufferSize) diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index beb21131a..0b44bc47a 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -379,7 +379,7 @@ public: /// @param forthis The byte order will be taken from the given directory. /// @return The ownership of the return tags is passed to the caller. static std::vector getDefaultTIFFTags (TagDirectory* forthis); - static int createJPEGMarker (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, unsigned char *&buffer, unsigned &bufferSize); + static void createJPEGMarker (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, unsigned char *&buffer, unsigned &bufferSize); static int createTIFFHeader (const TagDirectory* root, const rtengine::procparams::ExifPairs& changeList, int W, int H, int bps, const char* profiledata, int profilelen, const char* iptcdata, int iptclen, unsigned char *&buffer, unsigned &bufferSize); static int createPNGMarker(const TagDirectory *root, const rtengine::procparams::ExifPairs &changeList, int W, int H, int bps, const char *iptcdata, int iptclen, unsigned char *&buffer, unsigned &bufferSize); }; From 362564c60f36b4fd31c23d5ae7d2ce8de579c2d2 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Mon, 29 May 2023 17:14:44 -0700 Subject: [PATCH 10/13] Automatically detect DLLs for Windows packages Use ldd to find dependencies in /mingw64/bin. --- .github/workflows/windows.yml | 67 +++-------------------------------- 1 file changed, 5 insertions(+), 62 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4ab10212c..fb0a45028 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -98,6 +98,10 @@ jobs: run: | echo "Listing shared library dependencies." ldd "./build/${{matrix.build_type}}/rawtherapee.exe" + echo "Finding DLLs to include." + DLLS=($(ldd "./build/${{matrix.build_type}}/rawtherapee.exe" | grep '/mingw64/bin/' | awk '{print($1)'})) + echo "Required DLLs are: ${DLLS[*]}" + echo "Getting workspace path." export BUILD_DIR="$(pwd)/build/${{matrix.build_type}}" echo "Build directory is '$BUILD_DIR'." @@ -110,68 +114,7 @@ jobs: "gdbus.exe" \ "gspawn-win64-helper.exe" \ "gspawn-win64-helper-console.exe" \ - "libatk-1.0-0.dll" \ - "libatkmm-1.6-1.dll" \ - "libbrotlicommon.dll" \ - "libbrotlidec.dll" \ - "libbz2-1.dll" \ - "libcairo-2.dll" \ - "libcairo-gobject-2.dll" \ - "libcairomm-1.0-1.dll" \ - "libdatrie-1.dll" \ - "libdeflate.dll" \ - "libepoxy-0.dll" \ - "libexpat-1.dll" \ - libffi-*.dll \ - "libfftw3f-3.dll" \ - "libfftw3f_omp-3.dll" \ - "libfontconfig-1.dll" \ - "libfreetype-6.dll" \ - "libfribidi-0.dll" \ - "libgcc_s_seh-1.dll" \ - "libgdk_pixbuf-2.0-0.dll" \ - "libgdk-3-0.dll" \ - "libgdkmm-3.0-1.dll" \ - "libgio-2.0-0.dll" \ - "libgiomm-2.4-1.dll" \ - "libglib-2.0-0.dll" \ - "libglibmm-2.4-1.dll" \ - "libgmodule-2.0-0.dll" \ - "libgobject-2.0-0.dll" \ - "libgomp-1.dll" \ - "libgraphite2.dll" \ - "libgtk-3-0.dll" \ - "libgtkmm-3.0-1.dll" \ - "libharfbuzz-0.dll" \ - "libiconv-2.dll" \ - "libintl-8.dll" \ - "libjbig-0.dll" \ - "libjpeg-8.dll" \ - "liblcms2-2.dll" \ - "liblensfun.dll" \ - "libLerc.dll" \ - "liblzma-5.dll" \ - "libpango-1.0-0.dll" \ - "libpangocairo-1.0-0.dll" \ - "libpangoft2-1.0-0.dll" \ - "libpangomm-1.4-1.dll" \ - "libpangowin32-1.0-0.dll" \ - "libpcre2-8-0.dll" \ - "libpixman-1-0.dll" \ - "libpng16-16.dll" \ - "librsvg-2-2.dll" \ - "libsharpyuv-0.dll" \ - "libsigc-2.0-0.dll" \ - "libstdc++-6.dll" \ - "libsystre-0.dll" \ - "libthai-0.dll" \ - "libtiff-6.dll" \ - "libtre-5.dll" \ - "libwebp-7.dll" \ - "libwinpthread-1.dll" \ - "libxml2-2.dll" \ - "libzstd.dll" \ - "zlib1.dll" \ + ${DLLS[*]} \ "$BUILD_DIR" cd - From 376d680b16da38436d70e206d19593446f43a111 Mon Sep 17 00:00:00 2001 From: Lawrence Lee <45837045+Lawrence37@users.noreply.github.com> Date: Sun, 4 Jun 2023 16:32:41 -0700 Subject: [PATCH 11/13] Add basic camconst entry for Canon EOS R8 The camera seems to have the same characteristics as the Canon EOS R6m2. The raw crops for the R6m2 are derived from standard and CRAW images for full-frame and 1.6 crop. The raw crops for the R8 are from standard and CRAW images for full-frame only, but for both standard and Dual Pixel. The Dual Pixel R8 images require 10 pixels cropped from the right side instead of 6. Thus, the full-frame crop needs adjustment. --- rtengine/camconst.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 352dc26e1..c4bf9b14a 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -1259,10 +1259,10 @@ Camera constants: }, { // Quality C - "make_model": "Canon EOS R6m2", + "make_model": ["Canon EOS R6m2", "Canon EOS R8"], "dcraw_matrix": [9539, -2795, -1224, -4175, 11998, 2458, -465, 1755, 6048], "raw_crop": [ - {"frame": [6188, 4120], "crop": [154, 96, 6028, 4024]}, + {"frame": [6188, 4120], "crop": [154, 96, 6024, 4024]}, {"frame": [3936, 2612], "crop": [156, 96, 3780, 2516]} ], "masked_areas": [ From 0404a47fb7c7acd70fcc943a34775f2688f3d52b Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 25 Jun 2023 08:02:53 +0200 Subject: [PATCH 12/13] LA Color and Light - Merge file - Screen : improve behavior (#6779) * Change merge secreen in LA color and light * Remove warning in console --- rtengine/iplocallab.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index e58c38faa..6db6b7627 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -18245,9 +18245,9 @@ void ImProcFunctions::Lab_Local( #endif for (int y = 0; y < bfh ; y++) { for (int x = 0; x < bfw; x++) { - tmpImageorig->r(y, x) = intp(lp.opacol, screen(tmpImageorig->r(y, x), tmpImagereserv->r(y, x), maxR), tmpImageorig->r(y, x)); - tmpImageorig->g(y, x) = intp(lp.opacol, screen(tmpImageorig->g(y, x), tmpImagereserv->g(y, x), maxG), tmpImageorig->g(y, x)); - tmpImageorig->b(y, x) = intp(lp.opacol, screen(tmpImageorig->b(y, x), tmpImagereserv->b(y, x), maxB), tmpImageorig->b(y, x)); + tmpImageorig->r(y, x) = intp(lp.opacol, screen(tmpImageorig->r(y, x), tmpImagereserv->r(y, x), 1.f), tmpImageorig->r(y, x)); + tmpImageorig->g(y, x) = intp(lp.opacol, screen(tmpImageorig->g(y, x), tmpImagereserv->g(y, x), 1.f), tmpImageorig->g(y, x)); + tmpImageorig->b(y, x) = intp(lp.opacol, screen(tmpImageorig->b(y, x), tmpImagereserv->b(y, x), 1.f), tmpImageorig->b(y, x)); } } } else if (lp.mergecolMethod == 12) { //darken only From b950477bc926e812430456f04d0d39b32d2c864a Mon Sep 17 00:00:00 2001 From: Hombre Date: Sun, 25 Jun 2023 17:42:34 -0700 Subject: [PATCH 13/13] Fix cropped curves widget --- rtgui/toolpanel.cc | 5 +++++ rtgui/toolpanel.h | 1 + 2 files changed, 6 insertions(+) diff --git a/rtgui/toolpanel.cc b/rtgui/toolpanel.cc index 6db30bb14..46899f1a2 100644 --- a/rtgui/toolpanel.cc +++ b/rtgui/toolpanel.cc @@ -47,6 +47,11 @@ ToolParamBlock::ToolParamBlock() { //GTK318 } +Gtk::SizeRequestMode ToolParamBlock::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_HEIGHT_FOR_WIDTH; +} + FoldableToolPanel::FoldableToolPanel(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11, bool useEnabled) : ToolPanel(toolName, need11), parentContainer(nullptr), exp(nullptr), lastEnabled(true) { if (!content) { diff --git a/rtgui/toolpanel.h b/rtgui/toolpanel.h index 5ec59c9c2..f22f6f771 100644 --- a/rtgui/toolpanel.h +++ b/rtgui/toolpanel.h @@ -70,6 +70,7 @@ class ToolParamBlock : { public: ToolParamBlock(); + Gtk::SizeRequestMode get_request_mode_vfunc () const override; }; class ToolPanel :