From b26622553967e516201e57f6bd171365253fe73f Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Sun, 12 Mar 2017 22:16:22 +0100 Subject: [PATCH 1/3] Fix for issue https://github.com/Beep6581/RawTherapee/issues/3751 --- rtdata/themes/RawTherapee-GTK3-20_.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index 27d2b5f13..c1768f913 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -243,6 +243,13 @@ scale trough { margin: 6px 6px; /* have to be half of "scale slider / min-width min-height" */ background-color: #2A2A2A; } +scale.fine-tune trough { + margin: 5px; + padding: 1px; +} +scale.fine-tune trough highlight { + margin: -2px; +} scale:disabled trough { background-color: #444; border-color: #282828; From 5632c787a3b44f4987dfff33c52d85670d410613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=B6ssie?= Date: Sun, 19 Mar 2017 11:18:13 +0100 Subject: [PATCH 2/3] Don't return `XYZ` for `sRGB` (#3691) Also fix length of `ProfileContent` to match the old implementation. --- rtengine/iccstore.cc | 18 ++++++++++-------- rtengine/iccstore.h | 4 ++-- rtengine/simpleprocess.cc | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index a78304c09..4c749e3c4 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -1,12 +1,12 @@ /* * This file is part of RawTherapee. * - * Copyright(c) 2004-2010 Gabor Horvath + * Copyright (c) 2004-2010 Gabor Horvath * * RawTherapee is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. + * (at your option) any later version. * * RawTherapee is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -223,7 +223,7 @@ rtengine::ProfileContent::ProfileContent(const Glib::ustring& fileName) d[length] = 0; fclose(f); - data.assign(d, length + 1); + data.assign(d, length); delete[] d; } @@ -236,7 +236,7 @@ rtengine::ProfileContent::ProfileContent(cmsHPROFILE hProfile) if (bytesNeeded > 0) { char* d = new char[bytesNeeded + 1]; cmsSaveProfileToMem(hProfile, d, &bytesNeeded); - data.assign(d, bytesNeeded + 1); + data.assign(d, bytesNeeded); delete[] d; } } @@ -247,7 +247,7 @@ cmsHPROFILE rtengine::ProfileContent::toProfile() const return !data.empty() - ? cmsOpenProfileFromMem(data.data(), data.size()) + ? cmsOpenProfileFromMem(data.c_str(), data.size()) : nullptr; } @@ -690,7 +690,7 @@ cmsHPROFILE rtengine::ICCStore::getXYZProfile() const cmsHPROFILE rtengine::ICCStore::getsRGBProfile() const { - return implementation->getXYZProfile(); + return implementation->getsRGBProfile(); } std::vector rtengine::ICCStore::getProfiles(ProfileType type) const @@ -1025,7 +1025,8 @@ cmsHPROFILE rtengine::ICCStore::createFromMatrix(const double matrix[3][3], bool return p; } -cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManagementParams &icm, GammaValues &ga) { +cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManagementParams &icm, GammaValues &ga) +{ float p[6]; //primaries ga[6] = 0.0; @@ -1121,7 +1122,8 @@ cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManage } // WARNING: the caller must lock lcmsMutex -cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams::ColorManagementParams &icm, GammaValues &ga) { +cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams::ColorManagementParams &icm, GammaValues &ga) +{ bool pro = false; Glib::ustring outProfile; cmsHPROFILE outputProfile = nullptr; diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index 9562f3144..d0c5ef400 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -1,12 +1,12 @@ /* * This file is part of RawTherapee. * - * Copyright(c) 2004-2010 Gabor Horvath + * Copyright (c) 2004-2010 Gabor Horvath * * RawTherapee is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or - *(at your option) any later version. + * (at your option) any later version. * * RawTherapee is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index c7a05ab1a..ec0b31b3f 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1222,7 +1222,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p if (!useLCMS) { // use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generated by lab2rgb16 w/ gamma ProfileContent pc(jprof); - readyImg->setOutputProfile(pc.getData().data(), pc.getData().size()); + readyImg->setOutputProfile(pc.getData().c_str(), pc.getData().size()); } } else { // use the selected output profile if present, otherwise use LCMS2 profile generate by lab2rgb16 w/ gamma @@ -1242,7 +1242,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p } ProfileContent pc = ICCStore::getInstance()->getContent (params.icm.output); - readyImg->setOutputProfile(pc.getData().data(), pc.getData().size()); + readyImg->setOutputProfile(pc.getData().c_str(), pc.getData().size()); } } else { // No ICM From 2228159ff83a27477e94a5e6d8173095e22255a7 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Sun, 19 Mar 2017 18:41:35 +0100 Subject: [PATCH 3/3] Rawtherapee hanging on Windows if verbose = true, fixes #3768 --- rtgui/main.cc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/rtgui/main.cc b/rtgui/main.cc index 00cdc3b94..155d9f3ba 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -204,8 +204,7 @@ int main(int argc, char **argv) break; } - if(Console) { - AllocConsole(); + if(Console && AllocConsole()) { AttachConsole( GetCurrentProcessId() ) ; // Don't allow CTRL-C in console to terminate RT SetConsoleCtrlHandler( NULL, true ); @@ -243,16 +242,18 @@ int main(int argc, char **argv) } } - int ret = processLineParams( argc, argv); + if(argc > 1) { + int ret = processLineParams( argc, argv); - if( ret <= 0 ) { - if(consoleOpened) { - printf("Press any key to exit RawTherapee\n"); - FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); - getch(); + if( ret <= 0 ) { + if(consoleOpened) { + printf("Press any key to exit RawTherapee\n"); + FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); + getch(); + } + + return ret; } - - return ret; } }