Merge branch 'dev' into preprocess_wb

This commit is contained in:
rom9 2020-03-02 20:54:48 +01:00
commit 50becdef31
68 changed files with 8465 additions and 2944 deletions

View File

@ -1,69 +1,96 @@
name: macOS build name: macOS build
on: on:
push push:
branches:
- dev
- patch**
- newlocallab
pull_request:
branches:
- dev
- newlocallab
release:
types:
- created
jobs: jobs:
build: build:
runs-on: macos-10.15
runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Install dependencies - name: Install dependencies
run: brew install gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun llvm expat pkgconfig libomp shared-mime-info run: |
- name: patch libiconv date -u
run: | mkdir build
mkdir libiconv && cd libiconv date +%s > build/stamp
wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz brew uninstall --ignore-dependencies libtiff
tar xf libiconv-1.16.tar.gz brew install libtiff gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun expat pkgconfig libomp shared-mime-info | tee -a depslog
cd libiconv-1.16 date -u
patch -p1 < "${GITHUB_WORKSPACE}/tools/osx/libiconv_1.16_rt.patch" echo "----====Pourage====----"
mkdir build && cd build cat depslog | grep Pouring
destDir="$(pwd)" zsh -c 'echo "Completed installation of dependencies in $(printf "%0.2f" $(($[$(date +%s)-$(cat build/stamp)]/$((60.))))) minutes"'
../configure --prefix=/opt/local --disable-static 'CFLAGS=-arch x86_64 -mmacosx-version-min=10.9' 'LDFLAGS=-arch x86_64 -mmacosx-version-min=10.9' CXXFLAGS="-arch x86_64 -mmacosx-version-min=10.9" - name: Configure build system
make --jobs env:
make DESTDIR="${destDir}" install CMAKE_CXX_STANDARD: 11
sudo mv opt/local /usr/local/opt/libiconv PKG_CONFIG_PATH: /usr/local/opt/libtiff/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig
- name: cmake RAW_THERAPEE_MAJOR: '5'
env: RAW_THERAPEE_MINOR: '8'
CMAKE_CXX_STANDARD: 11 C_FLAGS: >
PKG_CONFIG_PATH: /usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig -arch x86_64 -mtune=generic -Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include -I/usr/local/opt/gdk-pixbuf/include -I/usr/local/opt/libiconv/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/libtiff/include
RAW_THERAPEE_MAJOR: '5' run: |
RAW_THERAPEE_MINOR: '7' # GITHUB_REF is the ref that triggered the build, like
C_FLAGS: -Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include -I/usr/local/opt/gdk-pixbuf/include -I/usr/local/opt/libiconv/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/expat/include -I/usr/local/opt/llvm/include # refs/heads/new-feature - the next line parses that to REF: the branch
run: | # name only (new-feature)
# GITHUB_REF is the ref that triggered the build, like refs/heads/new-feature - the next line parses that to REF: the branch name only (new-feature) export REF=${GITHUB_REF##*/}
REF=${GITHUB_REF##*/} export C_FLAGS=$(echo -e $C_FLAGS | tr -d '\n')
mkdir build && cd build cd build && date -u && date +%s > configstamp
cmake \ cmake \
-DCMAKE_BUILD_TYPE="release" \ -DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -L/usr/local/opt/gdk-pixbuf/lib -L/usr/local/opt/libiconv/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib" \ -DCMAKE_EXE_LINKER_FLAGS="-L. -L/usr/local/lib -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/opt/gdk-pixbuf/lib -L/usr/local/opt/libiconv/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libffi/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/expat/lib" \
-DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${REF}" \ -DCACHE_NAME_SUFFIX="${RAW_THERAPEE_MAJOR}.${RAW_THERAPEE_MINOR}-${REF}" \
-DPROC_TARGET_NUMBER="2" \ -DPROC_TARGET_NUMBER="1" \
-DPROC_LABEL="generic processor" \ -DPROC_LABEL="generic processor" \
-DWITH_LTO="OFF" \ -DWITH_LTO="OFF" \
-DLENSFUNDBDIR="./share/lensfun" \ -DLENSFUNDBDIR="/Applications/RawTherapee.app/Contents/Resources/share/lensfun" \
-DOpenMP_C_FLAGS=-fopenmp=libomp \ -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang \
-DOpenMP_CXX_FLAGS=-fopenmp=libomp \ -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ \
-DOpenMP_C_LIB_NAMES="libomp" \ -DCMAKE_C_FLAGS="-arch x86_64 -Wno-pass-failed -Wno-deprecated-register -Wno-unused-command-line-argument" \
-DOpenMP_CXX_LIB_NAMES="libomp" \ -DCMAKE_CXX_FLAGS="-arch x86_64 -Wno-pass-failed -Wno-deprecated-register -Wno-unused-command-line-argument" \
-DOpenMP_libomp_LIBRARY="/usr/local/lib/libomp.dylib" \ -DOpenMP_C_FLAGS="${C_FLAGS}" \
-DOpenMP_C_FLAGS="${C_FLAGS}" \ -DOpenMP_CXX_FLAGS="${C_FLAGS}" \
-DOpenMP_CXX_FLAGS="${C_FLAGS}" \ -DOpenMP_C_LIB_NAMES=libomp \
-DCMAKE_AR="/usr/local/opt/llvm/bin/llvm-ar" \ -DOpenMP_CXX_LIB_NAMES=libomp \
-DCMAKE_RANLIB="/usr/local/opt/llvm/bin/llvm-ranlib" \ -DOpenMP_libomp_LIBRARY=/usr/local/lib/libomp.dylib \
.. -DCMAKE_AR=/usr/bin/ar \
make --jobs -DCMAKE_RANLIB=/usr/bin/ranlib \
make install -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
sudo make macosx_bundle ..
ARTIFACT=(RawTherapee*.zip) zsh -c 'echo "Configured in $(printf "%0.2f" $(($[$(date +%s)-$(cat configstamp)]/$((60.))))) minutes"'
echo "=== artifact: ${ARTIFACT}" - name: Compile RawTherapee
# defining environment variables for next step as per https://github.com/actions/starter-workflows/issues/68 run: |
echo "::set-env name=ARTIFACT_PATH::${GITHUB_WORKSPACE}/build/${ARTIFACT}" date -u && date +%s > build/compilestamp
echo "::set-env name=ARTIFACT_FILE::${ARTIFACT}" cd build
- uses: actions/upload-artifact@v1 export REF=${GITHUB_REF##*/}
with: make -j$(sysctl -a | grep machdep.cpu.thread_count | tail -c 2) install
name: ${{env.ARTIFACT_FILE}} zsh -c 'echo "Compiled in $(printf "%0.2f" $(($[$(date +%s)-$(cat compilestamp)]/$((60.))))) minutes"'
path: ${{env.ARTIFACT_PATH}} - name: Create application bundle
run: |
zsh
date +%s > build/bundlestamp && date -u && cd build
export REF=${GITHUB_REF##*/} && export LOCAL_PREFIX=/usr && sudo make macosx_bundle
export ARTIFACT=(RawTherapee*.zip)
echo "=== artifact: ${ARTIFACT}"
# defining environment variables for next step as per
# https://github.com/actions/starter-workflows/issues/68
echo "::set-env name=ARTIFACT_PATH::${GITHUB_WORKSPACE}/build/${ARTIFACT}"
echo "::set-env name=ARTIFACT_FILE::${ARTIFACT}"
zsh -c 'echo "Bundled in $(printf "%0.2f" $(($[$(date +%s)-$(cat bundlestamp)]/$((60.))))) minutes"'
exit
- uses: actions/upload-artifact@v1
with:
name: ${{env.ARTIFACT_FILE}}
path: ${{env.ARTIFACT_PATH}}
- name: Finish build
run: |
date -u
zsh -c 'echo "Build completed in $(printf "%0.2f" $(($[$(date +%s)-$(cat build/stamp)]/$((60.))))) minutes"'

View File

@ -13,3 +13,7 @@ Build flags: ${CXX_FLAGS}
Link flags: ${LFLAGS} Link flags: ${LFLAGS}
OpenMP support: ${OPTION_OMP} OpenMP support: ${OPTION_OMP}
MMAP support: ${WITH_MYFILE_MMAP} MMAP support: ${WITH_MYFILE_MMAP}
Build OS: ${BUILDINFO_OS}
Build date: ${BUILDINFO_DATE} UTC
Build epoch: ${BUILDINFO_EPOCH}
Build UUID: ${BUILDINFO_UUID}

View File

@ -1,23 +1,34 @@
cmake_minimum_required(VERSION 3.5) # Use of SOURCE_DIR target property begins at cmake 3.7
if(APPLE)
cmake_minimum_required(VERSION 3.7)
else()
cmake_minimum_required(VERSION 3.5)
endif()
# Compiler id for Apple Clang # Compiler id for Apple Clang
if(APPLE) if(APPLE)
cmake_policy(SET CMP0025 NEW) cmake_policy(SET CMP0025 NEW)
cmake_policy(SET CMP0037 NEW)
endif() endif()
# Must stay before the project() command: # Must stay before the project() command:
if(${CMAKE_EXTRA_GENERATOR} MATCHES "Eclipse CDT4") if(${CMAKE_EXTRA_GENERATOR} MATCHES "Eclipse CDT4")
set(CMAKE_CXX_COMPILER_ARG1 "-std=c++11" CACHE STRING "C++ version for eclipse" FORCE) set(CMAKE_CXX_COMPILER_ARG1
"-std=c++11"
CACHE STRING "C++ version for eclipse" FORCE)
# Users building with Eclipse should set CMAKE_ECLIPSE_VERSION through the # Users building with Eclipse should set CMAKE_ECLIPSE_VERSION through the
# command line to their current version of Eclipse: # command line to their current version of Eclipse:
#set(CMAKE_ECLIPSE_VERSION "4.6.0" CACHE STRING "Eclipse version" FORCE) # set(CMAKE_ECLIPSE_VERSION "4.6.0" CACHE STRING "Eclipse version" FORCE)
endif() endif()
project(RawTherapee) project(RawTherapee)
# The default target is Debug: # The default target is Debug:
if(CMAKE_BUILD_TYPE STREQUAL "") if(CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "One of: None Debug Release RelWithDebInfo MinSizeRel" FORCE) set(CMAKE_BUILD_TYPE
Debug
CACHE STRING "One of: None Debug Release RelWithDebInfo MinSizeRel"
FORCE)
endif() endif()
string(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE) string(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE)
@ -26,11 +37,15 @@ string(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION
message(FATAL_ERROR "Building RawTherapee requires using GCC version 4.9 or higher!") VERSION_LESS "4.9")
message(
FATAL_ERROR
"Building RawTherapee requires using GCC version 4.9 or higher!")
endif() endif()
# We might want to build using the old C++ ABI, even when using a new GCC version: # We might want to build using the old C++ ABI, even when using a new GCC
# version:
if(USE_OLD_CXX_ABI) if(USE_OLD_CXX_ABI)
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0) add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
endif() endif()
@ -46,30 +61,50 @@ message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
# Cache name suffix examples: "" = ~/.config/RawTherapee, "5" = ~/.config/RawTherapee-5, "_testing" = ~/.config/RawTherapee_testing # Cache name suffix examples: "" = ~/.config/RawTherapee, "5" =
# Use "" for stable releases and "5-dev" for anything else. # ~/.config/RawTherapee-5, "_testing" = ~/.config/RawTherapee_testing Use "" for
set(CACHE_NAME_SUFFIX "" CACHE STRING "RawTherapee's cache folder suffix") # stable releases and "5-dev" for anything else.
set(CACHE_NAME_SUFFIX
""
CACHE STRING "RawTherapee's cache folder suffix")
# By default we don't use a specific processor target, so PROC_TARGET_NUMBER is set to 0. # By default we don't use a specific processor target, so PROC_TARGET_NUMBER is
# Specify other values to optimize for specific processor architecture as listed in ProcessorTargets.cmake: # set to 0. Specify other values to optimize for specific processor architecture
set(PROC_TARGET_NUMBER 0 CACHE STRING "Selected target processor from the list above (taken from ProcessorTargets.cmake)") # as listed in ProcessorTargets.cmake:
set(PROC_TARGET_NUMBER
0
CACHE
STRING
"Selected target processor from the list above (taken from ProcessorTargets.cmake)"
)
# Set special compilation flags for rtengine which get added to CMAKE_CXX_FLAGS: # Set special compilation flags for rtengine which get added to CMAKE_CXX_FLAGS:
# Some Linux distros build with -O2 instead of -O3. We explicitly enable auto vectorization by using -ftree-vectorize # Some Linux distros build with -O2 instead of -O3. We explicitly enable auto
set(RTENGINE_CXX_FLAGS "-ftree-vectorize" CACHE STRING "Special compilation flags for RTEngine") # vectorization by using -ftree-vectorize
set(RTENGINE_CXX_FLAGS
"-ftree-vectorize"
CACHE STRING "Special compilation flags for RTEngine")
# Loads the ProcessorTargets list: # Loads the ProcessorTargets list:
include(ProcessorTargets.cmake) include(ProcessorTargets.cmake)
set(PROC_LABEL "undefined" CACHE STRING "Target processor label, unused if PROC_TARGET_NUMBER = 0 or 2") set(PROC_LABEL
set(PROC_FLAGS "" CACHE STRING "Target processor related build/link flags") "undefined"
CACHE STRING
"Target processor label, unused if PROC_TARGET_NUMBER = 0 or 2")
set(PROC_FLAGS
""
CACHE STRING "Target processor related build/link flags")
if((NOT (PROC_TARGET_NUMBER EQUAL 0)) AND (NOT (PROC_TARGET_NUMBER EQUAL 2))) if((NOT (PROC_TARGET_NUMBER EQUAL 0)) AND (NOT (PROC_TARGET_NUMBER EQUAL 2)))
set(PROC_LABEL ${PROC_TARGET_${PROC_TARGET_NUMBER}_LABEL}) set(PROC_LABEL ${PROC_TARGET_${PROC_TARGET_NUMBER}_LABEL})
endif() endif()
if(NOT(PROC_TARGET_NUMBER EQUAL 0)) if(NOT (PROC_TARGET_NUMBER EQUAL 0))
set(PROC_FLAGS ${PROC_TARGET_${PROC_TARGET_NUMBER}_FLAGS}) set(PROC_FLAGS ${PROC_TARGET_${PROC_TARGET_NUMBER}_FLAGS})
endif() endif()
if(UNIX AND PROC_LABEL STREQUAL "undefined") if(UNIX AND PROC_LABEL STREQUAL "undefined")
execute_process(COMMAND uname -p OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE cpu) execute_process(
COMMAND uname -p
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE cpu)
if("${cpu}" STREQUAL "unknown") if("${cpu}" STREQUAL "unknown")
set(PROC_LABEL "${CMAKE_SYSTEM_PROCESSOR}") set(PROC_LABEL "${CMAKE_SYSTEM_PROCESSOR}")
else() else()
@ -77,7 +112,8 @@ if(UNIX AND PROC_LABEL STREQUAL "undefined")
endif() endif()
endif() endif()
# If PROC_FORCED_LABEL exists, its value is loaded in PROC_LABEL to override the one from ProcessorTargets: # If PROC_FORCED_LABEL exists, its value is loaded in PROC_LABEL to override the
# one from ProcessorTargets:
if(DEFINED PROC_FORCED_LABEL) if(DEFINED PROC_FORCED_LABEL)
set(PROC_LABEL ${PROC_FORCED_LABEL}) set(PROC_LABEL ${PROC_FORCED_LABEL})
endif() endif()
@ -87,7 +123,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PROC_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PROC_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PROC_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PROC_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PROC_FLAGS}")
# Stop compilation on typos such as std:swap (missing colon will be detected as unused label): # Stop compilation on typos such as std:swap (missing colon will be detected as
# unused label):
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=unused-label") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=unused-label")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=delete-incomplete") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=delete-incomplete")
@ -106,21 +143,35 @@ endif()
include(FindUnalignedMalloc) include(FindUnalignedMalloc)
if(WIN32) if(WIN32)
# Add additional paths. Look in the MinGW path first, then in the Gtkmm path. # Add additional paths. Look in the MinGW path first, then in the Gtkmm
# If you wish to build some dependent libraries, you have to install them in MinGW to use them: # path. If you wish to build some dependent libraries, you have to install
set(CMAKE_PREFIX_PATH $ENV{MINGW_BASEPATH} $ENV{GTKMM_BASEPATH} CACHE STRING "Additional search paths") # them in MinGW to use them:
set(CMAKE_PREFIX_PATH
$ENV{MINGW_BASEPATH} $ENV{GTKMM_BASEPATH}
CACHE STRING "Additional search paths")
endif() endif()
if(APPLE) if(APPLE) # TODO make -mtune generic conditional and/or specifiable.
if(CMAKE_CXX_COMPILER MATCHES "g\\+\\+-mp-4.[5-8]" OR CMAKE_CXX_COMPILER_ARG1 MATCHES "g\\+\\+-mp-4.[5-8]") if(CMAKE_CXX_COMPILER MATCHES "g\\+\\+-mp-4.[5-8]"
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /usr/lib/libstdc++.6.dylib") OR CMAKE_CXX_COMPILER_ARG1 MATCHES "g\\+\\+-mp-4.[5-8]")
message(STATUS "CMAKE_CXX_COMPILER is MacPorts GCC.\n CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} /usr/lib/libstdc++.6.dylib -Wl,-headerpad_max_install_names -mtune=generic"
)
message(
STATUS
"CMAKE_CXX_COMPILER is MacPorts GCC.\n CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}"
)
endif() endif()
# Set minimum system version # Set minimum system version
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.9") set(CMAKE_CXX_FLAGS
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.9") "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}"
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -headerpad_max_install_names") )
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -Wl,-headerpad_max_install_names -mtune=generic"
)
endif() endif()
option(USE_EXPERIMENTAL_LANG_VERSIONS "Build with -std=c++0x" OFF) option(USE_EXPERIMENTAL_LANG_VERSIONS "Build with -std=c++0x" OFF)
@ -132,33 +183,53 @@ option(WITH_SAN "Build with run-time sanitizer" OFF)
option(WITH_PROF "Build with profiling instrumentation" OFF) option(WITH_PROF "Build with profiling instrumentation" OFF)
option(WITH_SYSTEM_KLT "Build using system KLT library." OFF) option(WITH_SYSTEM_KLT "Build using system KLT library." OFF)
option(OPTION_OMP "Build with OpenMP support" ON) option(OPTION_OMP "Build with OpenMP support" ON)
option(STRICT_MUTEX "True (recommended): MyMutex will behave like POSIX Mutex; False: MyMutex will behave like POSIX RecMutex; Note: forced to ON for Debug builds" ON) option(
option(TRACE_MYRWMUTEX "Trace custom R/W Mutex (Debug builds only); redirecting std::out to a file is strongly recommended!" OFF) STRICT_MUTEX
option(AUTO_GDK_FLUSH "Use gdk_flush on all gdk_thread_leave other than the GUI thread; set it ON if you experience X Server warning/errors" OFF) "True (recommended): MyMutex will behave like POSIX Mutex; False: MyMutex will behave like POSIX RecMutex; Note: forced to ON for Debug builds"
#option(TARGET32BIT "Build for 32-bit architecture when ON, otherwise 64-bit. Default is OFF" OFF) ON)
option(
TRACE_MYRWMUTEX
"Trace custom R/W Mutex (Debug builds only); redirecting std::out to a file is strongly recommended!"
OFF)
option(
AUTO_GDK_FLUSH
"Use gdk_flush on all gdk_thread_leave other than the GUI thread; set it ON if you experience X Server warning/errors"
OFF)
# option(TARGET32BIT "Build for 32-bit architecture when ON, otherwise 64-bit.
# Default is OFF" OFF)
option(ENABLE_TCMALLOC "Use the tcmalloc library if available" OFF) option(ENABLE_TCMALLOC "Use the tcmalloc library if available" OFF)
set(TCMALLOC_LIB_DIR "" CACHE PATH "Custom path for the tcmalloc library") set(TCMALLOC_LIB_DIR
""
CACHE PATH "Custom path for the tcmalloc library")
# Set installation directories: # Set installation directories:
if(WIN32 OR APPLE) if(WIN32 OR APPLE)
if(BUILD_BUNDLE) if(BUILD_BUNDLE)
message(STATUS "You have set BUILD_BUNDLE=ON but this is not necessary - the option is forced to ON for Windows and macOS.") message(
STATUS
"You have set BUILD_BUNDLE=ON but this is not necessary - the option is forced to ON for Windows and macOS."
)
endif() endif()
set(BUILD_BUNDLE ON FORCE) set(BUILD_BUNDLE ON FORCE)
endif() endif()
if(NOT DEFINED BUNDLE_BASE_INSTALL_DIR) if(NOT DEFINED BUNDLE_BASE_INSTALL_DIR)
if(APPLE) if(APPLE)
set(BUNDLE_BASE_INSTALL_DIR "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/MacOS") set(BUNDLE_BASE_INSTALL_DIR "${PROJECT_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/MacOS")
else() else()
set(BUNDLE_BASE_INSTALL_DIR "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}") set(BUNDLE_BASE_INSTALL_DIR "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
endif() endif()
endif() endif()
if(BUILD_BUNDLE) if(BUILD_BUNDLE)
set(BINDIR .) if(APPLE)
set(CMAKE_INSTALL_PREFIX "${BUNDLE_BASE_INSTALL_DIR}") set(BINDIR "${BUNDLE_BASE_INSTALL_DIR}")
set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/build")
else()
set(BINDIR .)
set(CMAKE_INSTALL_PREFIX "${BUNDLE_BASE_INSTALL_DIR}")
endif()
endif() endif()
if(NOT DEFINED BINDIR) if(NOT DEFINED BINDIR)
@ -168,7 +239,7 @@ endif()
if(NOT DEFINED DATADIR) if(NOT DEFINED DATADIR)
if(BUILD_BUNDLE) if(BUILD_BUNDLE)
if(APPLE) if(APPLE)
set(DATADIR "../../Resources") set(DATADIR "${PROJECT_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/Resources/share")
else() else()
set(DATADIR .) set(DATADIR .)
endif() endif()
@ -180,7 +251,7 @@ endif()
if(NOT DEFINED LIBDIR) if(NOT DEFINED LIBDIR)
if(BUILD_BUNDLE) if(BUILD_BUNDLE)
if(APPLE) if(APPLE)
set(LIBDIR "../../Frameworks") set(LIBDIR "${PROJECT_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/Frameworks")
else() else()
set(LIBDIR .) set(LIBDIR .)
endif() endif()
@ -200,7 +271,11 @@ endif()
if(NOT DEFINED DOCDIR) if(NOT DEFINED DOCDIR)
if(BUILD_BUNDLE) if(BUILD_BUNDLE)
set(DOCDIR "${DATADIR}/share/doc") if(APPLE)
set(DOCDIR "${DATADIR}/doc")
else()
set(DOCDIR "${DATADIR}/share/doc")
endif()
else() else()
set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee") set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee")
endif() endif()
@ -208,7 +283,11 @@ endif()
if(NOT DEFINED CREDITSDIR) if(NOT DEFINED CREDITSDIR)
if(BUILD_BUNDLE) if(BUILD_BUNDLE)
set(CREDITSDIR "${DATADIR}") if(APPLE)
set(CREDITSDIR "${DATADIR}")
else()
set(CREDITSDIR "${DATADIR}")
endif()
else() else()
set(CREDITSDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee") set(CREDITSDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee")
endif() endif()
@ -216,7 +295,11 @@ endif()
if(NOT DEFINED LICENCEDIR) if(NOT DEFINED LICENCEDIR)
if(BUILD_BUNDLE) if(BUILD_BUNDLE)
set(LICENCEDIR "${DATADIR}") if(APPLE)
set(LICENCEDIR "${CREDITSDIR}")
else()
set(LICENCEDIR "${DATADIR}")
endif()
else() else()
set(LICENCEDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee") set(LICENCEDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee")
endif() endif()
@ -225,7 +308,11 @@ endif()
if(NOT DEFINED DESKTOPDIR) if(NOT DEFINED DESKTOPDIR)
if(UNIX) if(UNIX)
if(BUILD_BUNDLE) if(BUILD_BUNDLE)
set(DESKTOPDIR "${DATADIR}/share/applications") if(APPLE)
set(DESKTOPDIR "${DATADIR}/applications")
else()
set(DESKTOPDIR "${DATADIR}/share/applications")
endif()
else() else()
set(DESKTOPDIR "${CMAKE_INSTALL_PREFIX}/share/applications") set(DESKTOPDIR "${CMAKE_INSTALL_PREFIX}/share/applications")
endif() endif()
@ -235,7 +322,11 @@ endif()
if(NOT DEFINED ICONSDIR) if(NOT DEFINED ICONSDIR)
if(UNIX) if(UNIX)
if(BUILD_BUNDLE) if(BUILD_BUNDLE)
set(ICONSDIR "${DATADIR}/share/icons") if(APPLE)
set(ICONSDIR "${DATADIR}/icons")
else()
set(ICONSDIR "${DATADIR}/share/icons")
endif()
else() else()
set(ICONSDIR "${CMAKE_INSTALL_PREFIX}/share/icons") set(ICONSDIR "${CMAKE_INSTALL_PREFIX}/share/icons")
endif() endif()
@ -245,30 +336,48 @@ endif()
if(NOT DEFINED APPDATADIR) if(NOT DEFINED APPDATADIR)
if(UNIX) if(UNIX)
if(BUILD_BUNDLE) if(BUILD_BUNDLE)
set(APPDATADIR "${DATADIR}/share/metainfo") if(APPLE)
set(APPDATADIR "${DATADIR}/metainfo")
else()
set(APPDATADIR "${DATADIR}/share/metainfo")
endif()
else() else()
set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo") set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo")
endif() endif()
endif() endif()
endif() endif()
if (NOT APPLE) if(NOT APPLE)
if(DEFINED LENSFUNDBDIR AND NOT IS_ABSOLUTE "${LENSFUNDBDIR}") if(DEFINED LENSFUNDBDIR AND NOT IS_ABSOLUTE "${LENSFUNDBDIR}")
set(LENSFUNDBDIR "${DATADIR}/${LENSFUNDBDIR}") set(LENSFUNDBDIR "${DATADIR}/${LENSFUNDBDIR}")
endif() endif()
endif() endif()
if(APPLE) if(APPLE)
if("${CODESIGNID}") if("${CODESIGNID}")
set(CODESIGNID "${CODESIGNID}" CACHE STRING "Codesigning Identity") set(CODESIGNID
"${CODESIGNID}"
CACHE STRING "Codesigning Identity")
endif() endif()
if("${NOTARY}") if("${NOTARY}")
set(NOTARY "${NOTARY}" CACHE STRING "Notarization Identity") set(NOTARY
"${NOTARY}"
CACHE STRING "Notarization Identity")
endif() endif()
if("${LOCAL_PREFIX}") if("${LOCAL_PREFIX}")
set(LOCAL_PREFIX "${LOCAL_PREFIX}" CACHE STRING "macos/gtk parent directory ie /usr or /opt") set(LOCAL_PREFIX
elseif(NOT DEFINED LOCAL_PREFIX) "${LOCAL_PREFIX}"
set(LOCAL_PREFIX "/usr") CACHE STRING "macos/gtk parent directory ie /usr or /opt")
else()
set(LOCAL_PREFIX
/usr
CACHE STRING "macos/gtk parent directory ie /usr or /opt")
endif()
if("${FANCY_DMG}")
set(FANCY_DMG
ON
CACHE BOOL
"Use the andreyvit/create-dmg script to make a fancy .dmg")
endif() endif()
endif() endif()
@ -276,7 +385,10 @@ endif()
if(NOT BUILD_BUNDLE) if(NOT BUILD_BUNDLE)
foreach(path BINDIR DATADIR LIBDIR DOCDIR CREDITSDIR LICENCEDIR) foreach(path BINDIR DATADIR LIBDIR DOCDIR CREDITSDIR LICENCEDIR)
if(NOT (IS_ABSOLUTE "${${path}}")) if(NOT (IS_ABSOLUTE "${${path}}"))
message(FATAL_ERROR "The ${path} path has to be absolute when using -DBUILD_BUNDLE=OFF") message(
FATAL_ERROR
"The ${path} path has to be absolute when using -DBUILD_BUNDLE=OFF"
)
endif() endif()
endforeach() endforeach()
endif() endif()
@ -305,11 +417,11 @@ endif()
find_package(PkgConfig) find_package(PkgConfig)
if(WIN32) if(WIN32)
pkg_check_modules (GTK REQUIRED gtk+-3.0>=3.22.24) pkg_check_modules(GTK REQUIRED gtk+-3.0>=3.22.24)
pkg_check_modules (GTKMM REQUIRED gtkmm-3.0>=3.22) pkg_check_modules(GTKMM REQUIRED gtkmm-3.0>=3.22)
else() else()
pkg_check_modules (GTK REQUIRED gtk+-3.0>=3.16) pkg_check_modules(GTK REQUIRED gtk+-3.0>=3.16)
pkg_check_modules (GTKMM REQUIRED gtkmm-3.0>=3.16) pkg_check_modules(GTKMM REQUIRED gtkmm-3.0>=3.16)
endif() endif()
if(GTK_VERSION VERSION_GREATER "3.24.1" AND GTK_VERSION VERSION_LESS "3.24.7") if(GTK_VERSION VERSION_GREATER "3.24.1" AND GTK_VERSION VERSION_LESS "3.24.7")
@ -318,19 +430,26 @@ if(GTK_VERSION VERSION_GREATER "3.24.1" AND GTK_VERSION VERSION_LESS "3.24.7")
else() else()
set(CERTAINTY "likely to") set(CERTAINTY "likely to")
endif() endif()
message(WARNING "\nWarning! You are using GTK+ version " ${GTK_VERSION} " which is " ${CERTAINTY} " have an issue where combobox menu scroll-arrows are missing when a Gtk::ComboBox list does not fit vertically on the screen. As a result, users of your build will not be able to select items in the following comboboxes: Processing Profiles, Film Simulation, and the camera and lens profiles in Profiled Lens Correction.\nIt is recommended that you either downgrade GTK+ to <= 3.24.1 or upgrade to >= 3.24.7.") message(
WARNING
"\nWarning! You are using GTK+ version "
${GTK_VERSION}
" which is "
${CERTAINTY}
" have an issue where combobox menu scroll-arrows are missing when a Gtk::ComboBox list does not fit vertically on the screen. As a result, users of your build will not be able to select items in the following comboboxes: Processing Profiles, Film Simulation, and the camera and lens profiles in Profiled Lens Correction.\nIt is recommended that you either downgrade GTK+ to <= 3.24.1 or upgrade to >= 3.24.7."
)
endif() endif()
pkg_check_modules (GLIB2 REQUIRED glib-2.0>=2.44) pkg_check_modules(GLIB2 REQUIRED glib-2.0>=2.44)
pkg_check_modules (GLIBMM REQUIRED glibmm-2.4>=2.44) pkg_check_modules(GLIBMM REQUIRED glibmm-2.4>=2.44)
pkg_check_modules (CAIROMM REQUIRED cairomm-1.0) pkg_check_modules(CAIROMM REQUIRED cairomm-1.0)
pkg_check_modules (GIO REQUIRED gio-2.0>=2.44) pkg_check_modules(GIO REQUIRED gio-2.0>=2.44)
pkg_check_modules (GIOMM REQUIRED giomm-2.4>=2.44) pkg_check_modules(GIOMM REQUIRED giomm-2.4>=2.44)
pkg_check_modules (GTHREAD REQUIRED gthread-2.0>=2.44) pkg_check_modules(GTHREAD REQUIRED gthread-2.0>=2.44)
pkg_check_modules (GOBJECT REQUIRED gobject-2.0>=2.44) pkg_check_modules(GOBJECT REQUIRED gobject-2.0>=2.44)
pkg_check_modules (SIGC REQUIRED sigc++-2.0>=2.3.1) pkg_check_modules(SIGC REQUIRED sigc++-2.0>=2.3.1)
pkg_check_modules (LENSFUN REQUIRED lensfun>=0.2) pkg_check_modules(LENSFUN REQUIRED lensfun>=0.2)
pkg_check_modules (RSVG REQUIRED librsvg-2.0>=2.40) pkg_check_modules(RSVG REQUIRED librsvg-2.0>=2.40)
if(WIN32) if(WIN32)
add_definitions(-DWIN32) add_definitions(-DWIN32)
@ -357,7 +476,7 @@ if(WITH_SYSTEM_KLT)
endif() endif()
# Check for libcanberra-gtk3 (sound events on Linux): # Check for libcanberra-gtk3 (sound events on Linux):
if(UNIX AND(NOT APPLE)) if(UNIX AND (NOT APPLE))
pkg_check_modules(CANBERRA-GTK REQUIRED libcanberra-gtk3) pkg_check_modules(CANBERRA-GTK REQUIRED libcanberra-gtk3)
endif() endif()
@ -368,9 +487,12 @@ endif()
if(WITH_LTO) if(WITH_LTO)
# Using LTO with older versions of binutils requires setting extra flags # Using LTO with older versions of binutils requires setting extra flags
set(BINUTILS_VERSION_MININUM "2.29") set(BINUTILS_VERSION_MININUM "2.29")
execute_process(COMMAND ar --version OUTPUT_VARIABLE BINUTILS_VERSION_DETECTED) execute_process(COMMAND ar --version
string(REGEX REPLACE ".* ([0-9.]+)\n.*" "\\1" BINUTILS_VERSION_DETECTED "${BINUTILS_VERSION_DETECTED}") OUTPUT_VARIABLE BINUTILS_VERSION_DETECTED)
if("${BINUTILS_VERSION_DETECTED}" VERSION_LESS "${BINUTILS_VERSION_MININUM}") string(REGEX REPLACE ".* ([0-9.]+)\n.*" "\\1" BINUTILS_VERSION_DETECTED
"${BINUTILS_VERSION_DETECTED}")
if("${BINUTILS_VERSION_DETECTED}" VERSION_LESS
"${BINUTILS_VERSION_MININUM}")
if(APPLE) if(APPLE)
if(!CMAKE_AR) if(!CMAKE_AR)
set(CMAKE_AR "/opt/local/bin/ar") set(CMAKE_AR "/opt/local/bin/ar")
@ -382,7 +504,15 @@ if(WITH_LTO)
set(CMAKE_AR "/usr/bin/gcc-ar") set(CMAKE_AR "/usr/bin/gcc-ar")
set(CMAKE_RANLIB "/usr/bin/gcc-ranlib") set(CMAKE_RANLIB "/usr/bin/gcc-ranlib")
endif() endif()
message(STATUS "Binutils version detected as less than " ${BINUTILS_VERSION_MININUM} " - setting CMake parameters to enable LTO linking:\n CMAKE_AR=\"" ${CMAKE_AR} "\"\n CMAKE_RANLIB=\"" ${CMAKE_RANLIB} "\"") message(
STATUS
"Binutils version detected as less than "
${BINUTILS_VERSION_MININUM}
" - setting CMake parameters to enable LTO linking:\n CMAKE_AR=\""
${CMAKE_AR}
"\"\n CMAKE_RANLIB=\""
${CMAKE_RANLIB}
"\"")
endif() endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto")
@ -393,7 +523,8 @@ endif()
if(WITH_SAN) if(WITH_SAN)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=${WITH_SAN}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=${WITH_SAN}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${WITH_SAN}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${WITH_SAN}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=${WITH_SAN}") set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -fsanitize=${WITH_SAN}")
endif() endif()
if(WITH_PROF) if(WITH_PROF)
@ -402,11 +533,14 @@ if(WITH_PROF)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
endif() endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Wunused-macros") set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Wunused-macros"
)
if(OPTION_OMP) if(OPTION_OMP)
find_package(OpenMP) find_package(OpenMP)
if(OPENMP_FOUND) if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -Werror=unknown-pragmas") set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -Werror=unknown-pragmas")
endif() endif()
endif() endif()
@ -420,13 +554,14 @@ if(OPENMP_FOUND)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${_f}) set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${_f})
endforeach() endforeach()
check_c_source_compiles( check_c_source_compiles(
"#include <fftw3.h> "#include <fftw3.h>
int main() int main()
{ {
fftwf_init_threads(); fftwf_init_threads();
fftwf_plan_with_nthreads(1); fftwf_plan_with_nthreads(1);
return 0; return 0;
}" _fftw3f_multithread) }"
_fftw3f_multithread)
if(_fftw3f_multithread) if(_fftw3f_multithread)
add_definitions(-DRT_FFTW3F_OMP) add_definitions(-DRT_FFTW3F_OMP)
else() else()
@ -444,30 +579,41 @@ get_filename_component(ABS_BINARY_DIR "${CMAKE_BINARY_DIR}" ABSOLUTE)
set(OUT_OF_SOURCE_BUILD TRUE) set(OUT_OF_SOURCE_BUILD TRUE)
if(ABS_SOURCE_DIR STREQUAL ABS_BINARY_DIR) if(ABS_SOURCE_DIR STREQUAL ABS_BINARY_DIR)
set(OUT_OF_SOURCE_BUILD FALSE) set(OUT_OF_SOURCE_BUILD FALSE)
message(WARNING "You are performing an in-source build. This is discouraged. For an explanation and the advantages of out-of-source builds, please refer to http://www.cmake.org/Wiki/CMake_FAQ#What_is_an_.22out-of-source.22_build.3F") message(
WARNING
"You are performing an in-source build. This is discouraged. For an explanation and the advantages of out-of-source builds, please refer to http://www.cmake.org/Wiki/CMake_FAQ#What_is_an_.22out-of-source.22_build.3F"
)
endif() endif()
# Remove files which could require manual work. # Remove files which could require manual work. We will remove this after some
# We will remove this after some time to have a clean build system without file modifications in the source tree again. (?) # time to have a clean build system without file modifications in the source
set(OOSB_FILES "${PROJECT_SOURCE_DIR}/rtdata/rawtherapee.desktop" "${PROJECT_SOURCE_DIR}/rtgui/version.h" "${PROJECT_SOURCE_DIR}/rtgui/config.h" "${PROJECT_SOURCE_DIR}/AboutThisBuild.txt") # tree again. (?)
set(OOSB_FILES
"${PROJECT_SOURCE_DIR}/rtdata/rawtherapee.desktop"
"${PROJECT_SOURCE_DIR}/rtgui/version.h"
"${PROJECT_SOURCE_DIR}/rtgui/config.h"
"${PROJECT_SOURCE_DIR}/AboutThisBuild.txt")
if(OUT_OF_SOURCE_BUILD) if(OUT_OF_SOURCE_BUILD)
foreach(f ${OOSB_FILES}) foreach(f ${OOSB_FILES})
file(REMOVE "${f}") file(REMOVE "${f}")
endforeach() endforeach()
endif() endif()
# Check for generated files in the source tree which should not be there when doing an out-of-source build. # Check for generated files in the source tree which should not be there when
# Without checking for this it might happen that old versions are used for the compilation: # doing an out-of-source build. Without checking for this it might happen that
# old versions are used for the compilation:
if(OUT_OF_SOURCE_BUILD) if(OUT_OF_SOURCE_BUILD)
foreach(f ${OOSB_FILES}) foreach(f ${OOSB_FILES})
if(EXISTS "${f}") if(EXISTS "${f}")
message(SEND_ERROR "Generated \"${f}\" found inside the source tree. Please remove it as it is a relic of the old build system and prevents valid compilation now.") message(
SEND_ERROR
"Generated \"${f}\" found inside the source tree. Please remove it as it is a relic of the old build system and prevents valid compilation now."
)
endif() endif()
endforeach() endforeach()
endif() endif()
### Start generating AboutThisBuild.txt # Start generating AboutThisBuild.txt Set the platform bit-depth:
# Set the platform bit-depth:
if(CMAKE_SIZEOF_VOID_P EQUAL 4) if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(PROC_BIT_DEPTH 32 bits) set(PROC_BIT_DEPTH 32 bits)
else() else()
@ -475,68 +621,91 @@ else()
endif() endif()
# Get compiler name and version. # Get compiler name and version.
# Only CMake > 2.8.7 knows CMAKE_*_COMPILER_VERSION
if(CMAKE_VERSION VERSION_GREATER 2.8.7)
get_filename_component(COMPILER_INFO ${CMAKE_C_COMPILER} NAME_WE) get_filename_component(COMPILER_INFO ${CMAKE_C_COMPILER} NAME_WE)
set(COMPILER_INFO "${COMPILER_INFO} ${CMAKE_C_COMPILER_VERSION}") set(COMPILER_INFO "${COMPILER_INFO} ${CMAKE_C_COMPILER_VERSION}")
else() if(NOT APPLE)
execute_process(COMMAND gcc -dumpversion OUTPUT_VARIABLE GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(
COMMAND gcc -dumpversion
OUTPUT_VARIABLE GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
set(COMPILER_INFO "gcc ${GCC_VERSION}") set(COMPILER_INFO "gcc ${GCC_VERSION}")
endif() endif()
# Get C++ and linker flags for rtengine (the GUI's C++ flags may have fewer flags): # Get C++ and linker flags for rtengine (the GUI's C++ flags may have fewer
set(CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPER_CMAKE_BUILD_TYPE}} ${RTENGINE_CXX_FLAGS}") # flags):
set(LFLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${UPPER_CMAKE_BUILD_TYPE}}") set(CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPER_CMAKE_BUILD_TYPE}} ${RTENGINE_CXX_FLAGS}"
)
set(LFLAGS
"${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${UPPER_CMAKE_BUILD_TYPE}}"
)
set(ABOUT_COMMAND_WITH_ARGS ${CMAKE_COMMAND} if(NOT APPLE)
-DPROJECT_SOURCE_DIR:STRING=${PROJECT_SOURCE_DIR} set(ABOUT_COMMAND_WITH_ARGS
-DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX} ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR:STRING=${PROJECT_SOURCE_DIR}
-DPROC_LABEL:STRING="${PROC_LABEL}" -DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX}
-DPROC_BIT_DEPTH:STRING="${PROC_BIT_DEPTH}" -DPROC_LABEL:STRING="${PROC_LABEL}"
-DBUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DPROC_BIT_DEPTH:STRING="${PROC_BIT_DEPTH}"
-DGTKMM_VERSION:STRING=${GTKMM_VERSION} -DBUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DOPTION_OMP:STRING=${OPTION_OMP} -DGTKMM_VERSION:STRING=${GTKMM_VERSION}
-DWITH_MYFILE_MMAP:STRING=${WITH_MYFILE_MMAP} -DOPTION_OMP:STRING=${OPTION_OMP}
-DLENSFUN_VERSION:STRING=${LENSFUN_VERSION}) -DWITH_MYFILE_MMAP:STRING=${WITH_MYFILE_MMAP}
-DLENSFUN_VERSION:STRING=${LENSFUN_VERSION})
endif()
if(WIN32) if(WIN32)
list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Windows list(
APPEND
ABOUT_COMMAND_WITH_ARGS
-DSYSTEM:STRING=Windows
-DCXX_FLAGS:STRING="${CXX_FLAGS}" -DCXX_FLAGS:STRING="${CXX_FLAGS}"
-DLFLAGS:STRING="${LFLAGS}" -DLFLAGS:STRING="${LFLAGS}"
-DCOMPILER_INFO:STRING="${COMPILER_INFO}" -DCOMPILER_INFO:STRING="${COMPILER_INFO}"
-DCMAKE_INSTALL_PREFIX:STRING="${CMAKE_INSTALL_PREFIX}" -DCMAKE_INSTALL_PREFIX:STRING="${CMAKE_INSTALL_PREFIX}"
-DBIT_DEPTH:STRING="${CMAKE_SIZEOF_VOID_P}") -DBIT_DEPTH:STRING="${CMAKE_SIZEOF_VOID_P}")
elseif(APPLE) elseif(APPLE)
list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Apple set(
-DCXX_FLAGS:STRING=${CXX_FLAGS} ABOUT_COMMAND_WITH_ARGS
-DLFLAGS:STRING=${LFLAGS} cmake -DPROJECT_SOURCE_DIR:STRING=${PROJECT_SOURCE_DIR} -P ${PROJECT_SOURCE_DIR}/UpdateInfo.cmake -DSYSTEM:STRING=Apple -DCXX_FLAGS:STRING=${CXX_FLAGS} -DLFLAGS:STRING=${LFLAGS} -DCOMPILER_INFO:STRING=${COMPILER_INFO} -DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX})
-DCOMPILER_INFO:STRING=${COMPILER_INFO})
else() else()
list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Linux list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Linux
-DCXX_FLAGS:STRING=${CXX_FLAGS} -DCXX_FLAGS:STRING=${CXX_FLAGS} -DLFLAGS:STRING=${LFLAGS}
-DLFLAGS:STRING=${LFLAGS} -DCOMPILER_INFO:STRING=${COMPILER_INFO})
-DCOMPILER_INFO:STRING=${COMPILER_INFO}) endif()
if(NOT APPLE)
list(APPEND
ABOUT_COMMAND_WITH_ARGS
-P "${PROJECT_SOURCE_DIR}/UpdateInfo.cmake")
endif() endif()
list(APPEND ABOUT_COMMAND_WITH_ARGS -P "${PROJECT_SOURCE_DIR}/UpdateInfo.cmake") add_custom_target(
UpdateInfo ALL
add_custom_target(UpdateInfo ALL
COMMAND ${ABOUT_COMMAND_WITH_ARGS} COMMAND ${ABOUT_COMMAND_WITH_ARGS}
COMMENT "Creating AboutThisBuild.txt and other version-dependent files") COMMENT "Creating AboutThisBuild.txt and other version-dependent files")
### End generating AboutThisBuild.txt # End generating AboutThisBuild.txt
install(FILES AUTHORS.txt DESTINATION "${CREDITSDIR}") install(FILES AUTHORS.txt DESTINATION "${CREDITSDIR}")
install(FILES LICENSE.txt DESTINATION "${LICENCEDIR}") install(FILES LICENSE.txt DESTINATION "${LICENCEDIR}")
install(FILES "${CMAKE_BINARY_DIR}/AboutThisBuild.txt" DESTINATION "${CREDITSDIR}") install(FILES "${CMAKE_BINARY_DIR}/AboutThisBuild.txt"
install(FILES RELEASE_NOTES.txt DESTINATION "${CREDITSDIR}" OPTIONAL) DESTINATION "${CREDITSDIR}")
install(
FILES RELEASE_NOTES.txt
DESTINATION "${CREDITSDIR}"
OPTIONAL)
# The standard location for man pages in Linux is /usr/share/man # The standard location for man pages in Linux is /usr/share/man Use "manpath"
# Use "manpath" to see the search paths for man pages on your system. # to see the search paths for man pages on your system.
if(BUILD_BUNDLE) if(BUILD_BUNDLE)
install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${DATADIR}/share/man/man1") if(APPLE)
install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1"
DESTINATION "${DATADIR}/man/man1")
else()
install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1"
DESTINATION "${DATADIR}/share/man/man1")
endif()
else() else()
install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1") install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1"
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1")
endif() endif()
if(WIN32) if(WIN32)
@ -544,7 +713,8 @@ if(WIN32)
endif() endif()
if(UNIX) if(UNIX)
install(FILES com.rawtherapee.RawTherapee.appdata.xml DESTINATION "${APPDATADIR}") install(FILES com.rawtherapee.RawTherapee.appdata.xml
DESTINATION "${APPDATADIR}")
endif() endif()
# check whether the used version of lensfun has lfDatabase::LoadDirectory # check whether the used version of lensfun has lfDatabase::LoadDirectory
@ -572,26 +742,31 @@ int main()
lfDatabase *db = 0; lfDatabase *db = 0;
bool b = db->LoadDirectory(0); bool b = db->LoadDirectory(0);
return 0; return 0;
}" LENSFUN_HAS_LOAD_DIRECTORY) }"
LENSFUN_HAS_LOAD_DIRECTORY)
set(TCMALLOC_LIB_DIR) set(TCMALLOC_LIB_DIR)
if(ENABLE_TCMALLOC) if(ENABLE_TCMALLOC)
if(TCMALLOC_LIB_DIR) if(TCMALLOC_LIB_DIR)
find_library(TCMALLOC_LIBRARIES tcmalloc PATHS ${TCMALLOC_LIB_DIR} NO_DEFAULT_PATH) find_library(TCMALLOC_LIBRARIES tcmalloc PATHS ${TCMALLOC_LIB_DIR}
NO_DEFAULT_PATH)
else() else()
find_library(TCMALLOC_LIBRARIES tcmalloc) find_library(TCMALLOC_LIBRARIES tcmalloc)
endif() endif()
if(TCMALLOC_LIBRARIES) if(TCMALLOC_LIBRARIES)
message(STATUS "using tcmalloc library in ${TCMALLOC_LIBRARIES}") message(STATUS "using tcmalloc library in ${TCMALLOC_LIBRARIES}")
else() else()
set(TCMALLOC_LIBRARIES "" CACHE INTERNAL "" FORCE) set(TCMALLOC_LIBRARIES
""
CACHE INTERNAL "" FORCE)
message(STATUS "tcmalloc not found") message(STATUS "tcmalloc not found")
endif() endif()
else() else()
set(TCMALLOC_LIBRARIES "" CACHE INTERNAL "" FORCE) set(TCMALLOC_LIBRARIES
""
CACHE INTERNAL "" FORCE)
endif() endif()
add_subdirectory(rtexif) add_subdirectory(rtexif)
add_subdirectory(rtengine) add_subdirectory(rtengine)
add_subdirectory(rtgui) add_subdirectory(rtgui)

View File

@ -1,5 +1,9 @@
# cmakefile executed within a makefile target # cmakefile executed within a makefile target
if(APPLE)
set(PROJECT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..")
endif()
# If we find ReleaseInfo.cmake we use the info from there and don't need Git to be installed # If we find ReleaseInfo.cmake we use the info from there and don't need Git to be installed
find_file(REL_INFO_FILE ReleaseInfo.cmake PATHS "${PROJECT_SOURCE_DIR}" NO_DEFAULT_PATH) find_file(REL_INFO_FILE ReleaseInfo.cmake PATHS "${PROJECT_SOURCE_DIR}" NO_DEFAULT_PATH)
if(REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) if(REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
@ -10,10 +14,10 @@ if(REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
find_program(GIT_CMD git PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin") find_program(GIT_CMD git PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin")
find_program(GIT_CMD git) find_program(GIT_CMD git)
set(SHELL "/bin/bash") set(SHELL "/bin/bash")
else(WIN32) # Linux else() # Linux
find_program(GIT_CMD git) find_program(GIT_CMD git)
set(SHELL "/bin/bash") set(SHELL "/bin/bash")
endif(WIN32) endif()
# Fail if Git is not installed # Fail if Git is not installed
if(GIT_CMD STREQUAL GIT_CMD-NOTFOUND) if(GIT_CMD STREQUAL GIT_CMD-NOTFOUND)
@ -64,14 +68,23 @@ if(REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
set(GIT_NUMERIC_VERSION_BS "${GIT_NUMERIC_VERSION_BS}.${GIT_COMMITS_SINCE_TAG}") set(GIT_NUMERIC_VERSION_BS "${GIT_NUMERIC_VERSION_BS}.${GIT_COMMITS_SINCE_TAG}")
endif() endif()
execute_process(COMMAND uname -mrs OUTPUT_VARIABLE BUILDINFO_OS OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND date -Ru OUTPUT_VARIABLE BUILDINFO_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND date +%s OUTPUT_VARIABLE BUILDINFO_EPOCH OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND uuidgen COMMAND tr "A-Z" "a-z" OUTPUT_VARIABLE BUILDINFO_UUID OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Git checkout information:") message(STATUS "Git checkout information:")
message(STATUS " Commit description: ${GIT_DESCRIBE}") message(STATUS " Commit description: ${GIT_DESCRIBE}")
message(STATUS " Branch: ${GIT_BRANCH}") message(STATUS " Branch: ${GIT_BRANCH}")
message(STATUS " Commit: ${GIT_COMMIT}") message(STATUS " Commit: ${GIT_COMMIT}")
message(STATUS " Commit date: ${GIT_COMMIT_DATE}") message(STATUS " Commit date: ${GIT_COMMIT_DATE}")
message(STATUS " Commits since tag: ${GIT_COMMITS_SINCE_TAG}") message(STATUS " Commits since tag: ${GIT_COMMITS_SINCE_TAG}")
message(STATUS " Commits since branch: ${GIT_COMMITS_SINCE_BRANCH}") message(STATUS " Commits since branch: ${GIT_COMMITS_SINCE_BRANCH}")
message(STATUS " Version (unreliable): ${GIT_NUMERIC_VERSION_BS}") message(STATUS " Version (unreliable): ${GIT_NUMERIC_VERSION_BS}")
message(STATUS "Build information:")
message(STATUS " Build OS: ${BUILDINFO_OS}")
message(STATUS " Build date: ${BUILDINFO_DATE} UTC")
message(STATUS " Epoch: ${BUILDINFO_EPOCH}")
message(STATUS " UUID: ${BUILDINFO_UUID}")
if(NOT DEFINED CACHE_NAME_SUFFIX) if(NOT DEFINED CACHE_NAME_SUFFIX)
set(CACHE_NAME_SUFFIX "${GIT_DESCRIBE}") set(CACHE_NAME_SUFFIX "${GIT_DESCRIBE}")
@ -79,10 +92,9 @@ if(REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
else() else()
message(STATUS "CACHE_NAME_SUFFIX is \"${CACHE_NAME_SUFFIX}\"") message(STATUS "CACHE_NAME_SUFFIX is \"${CACHE_NAME_SUFFIX}\"")
endif() endif()
else()
else(REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND)
include("${PROJECT_SOURCE_DIR}/ReleaseInfo.cmake") include("${PROJECT_SOURCE_DIR}/ReleaseInfo.cmake")
endif(REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) endif()
if(WIN32) if(WIN32)
if(BIT_DEPTH EQUAL 4) if(BIT_DEPTH EQUAL 4)
@ -97,12 +109,12 @@ if(WIN32)
set(ARCHITECTURE_ALLOWED "x64 ia64") set(ARCHITECTURE_ALLOWED "x64 ia64")
# installing in 64 bits mode for all 64 bits processors, even for itanium architecture # installing in 64 bits mode for all 64 bits processors, even for itanium architecture
set(INSTALL_MODE "x64 ia64") set(INSTALL_MODE "x64 ia64")
endif(BIT_DEPTH EQUAL 4) endif()
# set part of the output archive name # set part of the output archive name
set(SYSTEM_NAME "WinVista") set(SYSTEM_NAME "WinVista")
configure_file("${PROJECT_SOURCE_DIR}/tools/win/InnoSetup/WindowsInnoSetup.iss.in" "${CMAKE_BINARY_DIR}/rtdata/WindowsInnoSetup.iss") configure_file("${PROJECT_SOURCE_DIR}/tools/win/InnoSetup/WindowsInnoSetup.iss.in" "${CMAKE_BINARY_DIR}/rtdata/WindowsInnoSetup.iss")
endif(WIN32) endif()
# build version.h from template # build version.h from template
configure_file("${PROJECT_SOURCE_DIR}/rtgui/version.h.in" "${CMAKE_BINARY_DIR}/rtgui/version.h") configure_file("${PROJECT_SOURCE_DIR}/rtgui/version.h.in" "${CMAKE_BINARY_DIR}/rtgui/version.h")

View File

@ -24,7 +24,7 @@ mark_as_advanced(MACINTEGRATION_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set MACINTEGRATION_FOUND to TRUE if # handle the QUIETLY and REQUIRED arguments and set MACINTEGRATION_FOUND to TRUE if
# all listed variables are TRUE # all listed variables are TRUE
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MACINTEGRATION DEFAULT_MSG MACINTEGRATION_LIBRARY MACINTEGRATION_INCLUDE_DIR) find_package_handle_standard_args(MacIntegration DEFAULT_MSG MACINTEGRATION_LIBRARY MACINTEGRATION_INCLUDE_DIR)
if(MACINTEGRATION_FOUND) if(MACINTEGRATION_FOUND)
set(MacIntegration_LIBRARIES ${MACINTEGRATION_LIBRARY}) set(MacIntegration_LIBRARIES ${MACINTEGRATION_LIBRARY})

View File

@ -47,8 +47,8 @@ if(WIN32)
install(FILES ${FONTS} DESTINATION "${DATADIR}/fonts") install(FILES ${FONTS} DESTINATION "${DATADIR}/fonts")
endif() endif()
install(DIRECTORY ${PROFILESDIR} DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "*.pp3") install(DIRECTORY "${PROFILESDIR}" DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "*.pp3")
install(DIRECTORY ${THEMEDIR} DESTINATION "${DATADIR}") install(DIRECTORY "${THEMEDIR}" DESTINATION "${DATADIR}")
install(FILES ${IMG_SVG} DESTINATION "${DATADIR}/images") install(FILES ${IMG_SVG} DESTINATION "${DATADIR}/images")
install(FILES ${IMG_PNG} DESTINATION "${DATADIR}/images") install(FILES ${IMG_PNG} DESTINATION "${DATADIR}/images")
@ -57,19 +57,15 @@ install(FILES ${IMG_ICO} DESTINATION "${DATADIR}/images")
if(APPLE) if(APPLE)
# CMake escapes first item quote character. Do not remove 'DUMMY_VARIABLE=' # CMake escapes first item quote character. Do not remove 'DUMMY_VARIABLE='
set(MACOSX_BUNDLE_COMMAND DUMMY_VARIABLE= set(MACOSX_BUNDLE_COMMAND DUMMY_VARIABLE=
PROJECT_NAME="${PROJECT_NAME}" PROJECT_NAME=${PROJECT_NAME}
PROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}" PROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}"
CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
GTK_PREFIX="${GTK_PREFIX}") GTK_PREFIX="${GTK_PREFIX}")
if(PROC_BIT_DEPTH MATCHES 32) list(APPEND MACOSX_BUNDLE_COMMAND PROC_BIT_DEPTH=64)
list(APPEND MACOSX_BUNDLE_COMMAND PROC_BIT_DEPTH=32) list(APPEND MACOSX_BUNDLE_COMMAND sh ${PROJECT_SOURCE_DIR}/tools/osx/macosx_bundle.sh)
else()
list(APPEND MACOSX_BUNDLE_COMMAND PROC_BIT_DEPTH=64)
endif()
list(APPEND MACOSX_BUNDLE_COMMAND sh "${PROJECT_SOURCE_DIR}/tools/osx/macosx_bundle.sh")
add_custom_target(macosx_bundle add_custom_target(macosx_bundle
COMMAND ${MACOSX_BUNDLE_COMMAND} COMMAND ${MACOSX_BUNDLE_COMMAND}
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/build
COMMENT "Creating macOS bundle") COMMENT "Creating macOS bundle")
endif() endif()

View File

@ -728,6 +728,7 @@ HISTORY_MSG_491;White Balance
HISTORY_MSG_492;RGB Curves HISTORY_MSG_492;RGB Curves
HISTORY_MSG_493;L*a*b* Adjustments HISTORY_MSG_493;L*a*b* Adjustments
HISTORY_MSG_494;Capture Sharpening HISTORY_MSG_494;Capture Sharpening
HISTORY_MSG_CAT02PRESET;Cat02 automatic preset
HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@ -788,8 +789,20 @@ HISTORY_MSG_SHARPENING_CONTRAST;Sharpening - Contrast threshold
HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace HISTORY_MSG_SH_COLORSPACE;S/H - Colorspace
HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light HISTORY_MSG_SOFTLIGHT_ENABLED;Soft light
HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength HISTORY_MSG_SOFTLIGHT_STRENGTH;Soft light - Strength
HISTORY_MSG_TEMPOUT;CAM02 automatic temperature
HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor HISTORY_MSG_TM_FATTAL_ANCHOR;DRC - Anchor
HISTORY_MSG_TRANS_Method;Geometry - Method HISTORY_MSG_TRANS_Method;Geometry - Method
HISTORY_MSG_WAVCLARI;Clarity
HISTORY_MSG_WAVEDGS;Edge stopping
HISTORY_MSG_WAVMERGEC;Merge C
HISTORY_MSG_WAVMERGEL;Merge L
HISTORY_MSG_WAVRADIUS;Radius Shadows-Highlight
HISTORY_MSG_WAVSCALE;Scale
HISTORY_MSG_WAVSHOWMASK;Show wavelet mask
HISTORY_MSG_WAVSIGMA;Sigma
HISTORY_MSG_WAVSOFTRAD;Soft radius clarity
HISTORY_MSG_WAVSOFTRADEND;Soft radius final
HISTORY_MSG_WAVUSHAMET;Clarity method
HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT;Add
HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: <b>Alt-s</b> HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: <b>Alt-s</b>
HISTORY_SNAPSHOT;Snapshot HISTORY_SNAPSHOT;Snapshot
@ -1439,6 +1452,8 @@ TP_COLORAPP_MODEL;WP Model
TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\n<b>WB [RT] + [output]</b>: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\n<b>WB [RT+CAT02] + [output]</b>: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\n<b>Free temp+green + CAT02 + [output]:</b> temp and green are selected by the user, the output device's white balance is set in Viewing Conditions. TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\n<b>WB [RT] + [output]</b>: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\n<b>WB [RT+CAT02] + [output]</b>: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\n<b>Free temp+green + CAT02 + [output]:</b> temp and green are selected by the user, the output device's white balance is set in Viewing Conditions.
TP_COLORAPP_NEUTRAL;Reset TP_COLORAPP_NEUTRAL;Reset
TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values
TP_COLORAPP_PRESETCAT02;Preset cat02 automatic
TP_COLORAPP_PRESETCAT02_TIP;Set combobox, sliders, temp, green so that Cat02 automatic is preset.\nYou must change Cat02 adaptation Viewing conditions if need.\nYou can change Temperature and Tint Viewing conditions if need, and other settings if need.
TP_COLORAPP_RSTPRO;Red & skin-tones protection TP_COLORAPP_RSTPRO;Red & skin-tones protection
TP_COLORAPP_RSTPRO_TOOLTIP;Red &amp; skin-tones protection affects both sliders and curves. TP_COLORAPP_RSTPRO_TOOLTIP;Red &amp; skin-tones protection affects both sliders and curves.
TP_COLORAPP_SURROUND;Surround TP_COLORAPP_SURROUND;Surround
@ -1456,6 +1471,7 @@ TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode
TP_COLORAPP_TCMODE_LIGHTNESS;Lightness TP_COLORAPP_TCMODE_LIGHTNESS;Lightness
TP_COLORAPP_TCMODE_SATUR;Saturation TP_COLORAPP_TCMODE_SATUR;Saturation
TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant, always set Tint=1.\n\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant, always set Tint=1.\n\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504
TP_COLORAPP_TEMPOUT_TOOLTIP;Disable to chnage temperature and tint
TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 TP_COLORAPP_TONECIE;Tone mapping using CIECAM02
TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect.
TP_COLORAPP_VIEWING_ABSOLUTELUMINANCE_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16 cd/m²). TP_COLORAPP_VIEWING_ABSOLUTELUMINANCE_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16 cd/m²).
@ -2125,10 +2141,13 @@ TP_WAVELET_CH3;Link contrast levels
TP_WAVELET_CHCU;Curve TP_WAVELET_CHCU;Curve
TP_WAVELET_CHR;Chroma-contrast link strength TP_WAVELET_CHR;Chroma-contrast link strength
TP_WAVELET_CHRO;Saturated/pastel threshold TP_WAVELET_CHRO;Saturated/pastel threshold
TP_WAVELET_CHROMAFRAME;Chroma
TP_WAVELET_CHRO_TOOLTIP;Sets the wavelet level which will be the threshold between saturated and pastel colors.\n1-x: saturated\nx-9: pastel\n\nIf the value exceeds the amount of wavelet levels you are using then it will be ignored. TP_WAVELET_CHRO_TOOLTIP;Sets the wavelet level which will be the threshold between saturated and pastel colors.\n1-x: saturated\nx-9: pastel\n\nIf the value exceeds the amount of wavelet levels you are using then it will be ignored.
TP_WAVELET_CHR_TOOLTIP;Adjusts chroma as a function of "contrast levels" and "chroma-contrast link strength" TP_WAVELET_CHR_TOOLTIP;Adjusts chroma as a function of "contrast levels" and "chroma-contrast link strength"
TP_WAVELET_CHSL;Sliders TP_WAVELET_CHSL;Sliders
TP_WAVELET_CHTYPE;Chrominance method TP_WAVELET_CHTYPE;Chrominance method
TP_WAVELET_CLA;Clarity
TP_WAVELET_CLARI;Sharp-mask and Clarity
TP_WAVELET_COLORT;Opacity Red-Green TP_WAVELET_COLORT;Opacity Red-Green
TP_WAVELET_COMPCONT;Contrast TP_WAVELET_COMPCONT;Contrast
TP_WAVELET_COMPGAMMA;Compression gamma TP_WAVELET_COMPGAMMA;Compression gamma
@ -2211,6 +2230,8 @@ TP_WAVELET_MEDGREINF;First level
TP_WAVELET_MEDI;Reduce artifacts in blue sky TP_WAVELET_MEDI;Reduce artifacts in blue sky
TP_WAVELET_MEDILEV;Edge detection TP_WAVELET_MEDILEV;Edge detection
TP_WAVELET_MEDILEV_TOOLTIP;When you enable Edge Detection, it is recommanded:\n- to disabled low contrast levels to avoid artifacts,\n- to use high values of gradient sensitivity.\n\nYou can modulate the strength with 'refine' from Denoise and Refine. TP_WAVELET_MEDILEV_TOOLTIP;When you enable Edge Detection, it is recommanded:\n- to disabled low contrast levels to avoid artifacts,\n- to use high values of gradient sensitivity.\n\nYou can modulate the strength with 'refine' from Denoise and Refine.
TP_WAVELET_MERGEC;Merge Chroma
TP_WAVELET_MERGEL;Merge Luma
TP_WAVELET_NEUTRAL;Neutral TP_WAVELET_NEUTRAL;Neutral
TP_WAVELET_NOIS;Denoise TP_WAVELET_NOIS;Denoise
TP_WAVELET_NOISE;Denoise and Refine TP_WAVELET_NOISE;Denoise and Refine
@ -2225,19 +2246,24 @@ TP_WAVELET_OPACITYWL;Final local contrast
TP_WAVELET_OPACITYWL_TOOLTIP;Modify the final local contrast at the end of the wavelet treatment.\n\nThe left side represents the smallest local contrast, progressing to the largest local contrast on the right. TP_WAVELET_OPACITYWL_TOOLTIP;Modify the final local contrast at the end of the wavelet treatment.\n\nThe left side represents the smallest local contrast, progressing to the largest local contrast on the right.
TP_WAVELET_PASTEL;Pastel chroma TP_WAVELET_PASTEL;Pastel chroma
TP_WAVELET_PROC;Process TP_WAVELET_PROC;Process
TP_WAVELET_RADIUS;Radius Shadows - Highlight
TP_WAVELET_RE1;Reinforced TP_WAVELET_RE1;Reinforced
TP_WAVELET_RE2;Unchanged TP_WAVELET_RE2;Unchanged
TP_WAVELET_RE3;Reduced TP_WAVELET_RE3;Reduced
TP_WAVELET_RESCHRO;Chroma TP_WAVELET_RESCHRO;Intensity
TP_WAVELET_RESCON;Shadows TP_WAVELET_RESCON;Shadows
TP_WAVELET_RESCONH;Highlights TP_WAVELET_RESCONH;Highlights
TP_WAVELET_RESID;Residual Image TP_WAVELET_RESID;Residual Image
TP_WAVELET_SAT;Saturated chroma TP_WAVELET_SAT;Saturated chroma
TP_WAVELET_SETTINGS;Wavelet Settings TP_WAVELET_SETTINGS;Wavelet Settings
TP_WAVELET_SHA;Sharp mask
TP_WAVELET_SHOWMASK;Show wavelet 'mask'
TP_WAVELET_SIGMA;Sigma
TP_WAVELET_SKIN;Skin targetting/protection TP_WAVELET_SKIN;Skin targetting/protection
TP_WAVELET_SKIN_TOOLTIP;At -100 skin-tones are targetted.\nAt 0 all tones are treated equally.\nAt +100 skin-tones are protected while all other tones are affected. TP_WAVELET_SKIN_TOOLTIP;At -100 skin-tones are targetted.\nAt 0 all tones are treated equally.\nAt +100 skin-tones are protected while all other tones are affected.
TP_WAVELET_SKY;Sky targetting/protection TP_WAVELET_SKY;Sky targetting/protection
TP_WAVELET_SKY_TOOLTIP;At -100 sky-tones are targetted.\nAt 0 all tones are treated equally.\nAt +100 sky-tones are protected while all other tones are affected. TP_WAVELET_SKY_TOOLTIP;At -100 sky-tones are targetted.\nAt 0 all tones are treated equally.\nAt +100 sky-tones are protected while all other tones are affected.
TP_WAVELET_SOFTRAD;Soft Radius
TP_WAVELET_STREN;Strength TP_WAVELET_STREN;Strength
TP_WAVELET_STRENGTH;Strength TP_WAVELET_STRENGTH;Strength
TP_WAVELET_SUPE;Extra TP_WAVELET_SUPE;Extra
@ -2252,11 +2278,20 @@ TP_WAVELET_TILESFULL;Full image
TP_WAVELET_TILESIZE;Tiling method TP_WAVELET_TILESIZE;Tiling method
TP_WAVELET_TILESLIT;Little tiles TP_WAVELET_TILESLIT;Little tiles
TP_WAVELET_TILES_TOOLTIP;Processing the full image leads to better quality and is the recommended option, while using tiles is a fall-back solution for users with little RAM. Refer to RawPedia for memory requirements. TP_WAVELET_TILES_TOOLTIP;Processing the full image leads to better quality and is the recommended option, while using tiles is a fall-back solution for users with little RAM. Refer to RawPedia for memory requirements.
TP_WAVELET_TMEDGS;Edge stopping
TP_WAVELET_TMSCALE;Scale
TP_WAVELET_TMSTRENGTH;Compression strength TP_WAVELET_TMSTRENGTH;Compression strength
TP_WAVELET_TMSTRENGTH_TOOLTIP;Control the strength of tone mapping or contrast compression of the residual image. When the value is different from 0, the Strength and Gamma sliders of the Tone Mapping tool in the Exposure tab will become grayed out. TP_WAVELET_TMSTRENGTH_TOOLTIP;Control the strength of tone mapping or contrast compression of the residual image.
TP_WAVELET_TMTYPE;Compression method TP_WAVELET_TMTYPE;Compression method
TP_WAVELET_TON;Toning TP_WAVELET_TON;Toning
TP_WAVELET_USH;None
TP_WAVELET_USHARP;Clarity method
TP_WAVELET_USHARP_TOOLTIP;Origin : the source file is the file before Wavelet.\nWavelet : the source file is the file including wavelet threatment
TP_WAVELET_USH_TOOLTIP;If you select Sharp-mask, wavelet settings will be automatically positioned :\nBackground=black, Process=below, level=3...you can change level between 1 and 4.\n\nIf you select Clarity, wavelet settings will be automatically positioned :\nBackground=residual, Process=above, level=7..you can change level between 5 and 10 and wavelet levels.
TP_WBALANCE_AUTO;Auto TP_WBALANCE_AUTO;Auto
TP_WBALANCE_AUTOITCGREEN;Auto iterate temperature correlation
TP_WBALANCE_AUTOOLD;Auto RGB grey
TP_WBALANCE_AUTO_HEADER;Autos
TP_WBALANCE_CAMERA;Camera TP_WBALANCE_CAMERA;Camera
TP_WBALANCE_CLOUDY;Cloudy TP_WBALANCE_CLOUDY;Cloudy
TP_WBALANCE_CUSTOM;Custom TP_WBALANCE_CUSTOM;Custom
@ -2298,6 +2333,8 @@ TP_WBALANCE_SOLUX41;Solux 4100K
TP_WBALANCE_SOLUX47;Solux 4700K (vendor) TP_WBALANCE_SOLUX47;Solux 4700K (vendor)
TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery)
TP_WBALANCE_SPOTWB;Use the pipette to pick the white balance from a neutral patch in the preview. TP_WBALANCE_SPOTWB;Use the pipette to pick the white balance from a neutral patch in the preview.
TP_WBALANCE_STUDLABEL;Student Itcwb: %1
TP_WBALANCE_STUDLABEL_TOOLTIP;Display calculated Student correlation\nThe lower the student value, the better the correlation\nValues below 0.002 are excellent\nValues below 0.005 are very good\nValues below 0.01 are good\nValues below 0.05 are good enough\nValues above 0.5 are poor\nVery good Student test results does not mean that the WB is good, if the illuminant is non-standard the results are erratic.\nStudent=1000 means the calculations were not restarted but results are probably goods, use previous results
TP_WBALANCE_TEMPBIAS;AWB temperature bias TP_WBALANCE_TEMPBIAS;AWB temperature bias
TP_WBALANCE_TEMPBIAS_TOOLTIP;Allows to alter the computation of the "auto white balance"\nby biasing it towards warmer or cooler temperatures. The bias\nis expressed as a percentage of the computed temperature,\nso that the result is given by "computedTemp + computedTemp * bias". TP_WBALANCE_TEMPBIAS_TOOLTIP;Allows to alter the computation of the "auto white balance"\nby biasing it towards warmer or cooler temperatures. The bias\nis expressed as a percentage of the computed temperature,\nso that the result is given by "computedTemp + computedTemp * bias".
TP_WBALANCE_TEMPERATURE;Temperature TP_WBALANCE_TEMPERATURE;Temperature

View File

@ -9,6 +9,7 @@
# which can be useful if you want to keep the application and all the cache data in a single place, # which can be useful if you want to keep the application and all the cache data in a single place,
# an external HD for example # an external HD for example
MultiUser=true MultiUser=true
UseSystemTheme=false
[File Browser] [File Browser]
# Image filename extensions to be looked for, and their corresponding search state (0/1 -> skip/include) # Image filename extensions to be looked for, and their corresponding search state (0/1 -> skip/include)
@ -38,5 +39,6 @@ CustomProfileBuilder=
#ImgDefault=Neutral #ImgDefault=Neutral
[GUI] [GUI]
FontFamily=Helvetica Regular # Set the included font as default
CPFontFamily=Helvetica Regular FontFamily=Droid Sans Mono Slashed
CPFontFamily=Droid Sans Mono Slashed

View File

@ -1,35 +1,60 @@
include_directories(${EXTRA_INCDIR} if(EXTRA_INCDIR)
${EXPAT_INCLUDE_DIRS} include_directories("${EXTRA_INCDIR}")
${FFTW3F_INCLUDE_DIRS} endif()
${GLIB2_INCLUDE_DIRS} if(EXPAT_INCLUDE_DIRS)
${GLIBMM_INCLUDE_DIRS} include_directories("${EXPAT_INCLUDE_DIRS}")
${GOBJECT_INCLUDE_DIRS} endif()
${GTHREAD_INCLUDE_DIRS} if(FFTW3F_INCLUDE_DIRS)
${GTKMM_INCLUDE_DIRS} include_directories("${FFTW3F_INCLUDE_DIRS}")
${GTK_INCLUDE_DIRS} endif()
${IPTCDATA_INCLUDE_DIRS} if(GLIB2_INCLUDE_DIRS)
${LCMS_INCLUDE_DIRS} include_directories("${GLIB2_INCLUDE_DIRS}")
${LENSFUN_INCLUDE_DIRS} endif()
${RSVG_INCLUDE_DIRS} if(GLIBMM_INCLUDE_DIRS)
) include_directories("${GLIBMM_INCLUDE_DIRS}")
endif()
if(GOBJECT_INCLUDE_DIRS)
include_directories("${GOBJECT_INCLUDE_DIRS}")
endif()
if(GTHREAD_INCLUDE_DIRS)
include_directories("${GTHREAD_INCLUDE_DIRS}")
endif()
if(GTKMM_INCLUDE_DIRS)
include_directories("${GTKMM_INCLUDE_DIRS}")
endif()
if(GTK_INCLUDE_DIRS)
include_directories("${GTK_INCLUDE_DIRS}")
endif()
if(IPTCDATA_INCLUDE_DIRS)
include_directories("${IPTCDATA_INCLUDE_DIRS}")
endif()
if(LCMS_INCLUDE_DIRS)
include_directories("${LCMS_INCLUDE_DIRS}")
endif()
if(LENSFUN_INCLUDE_DIRS)
include_directories("${LENSFUN_INCLUDE_DIRS}")
endif()
if(RSVG_INCLUDE_DIRS)
include_directories("${RSVG_INCLUDE_DIRS}")
endif()
if(NOT WITH_SYSTEM_KLT) if(NOT WITH_SYSTEM_KLT)
include_directories("${CMAKE_SOURCE_DIR}/rtengine/klt") include_directories("${CMAKE_SOURCE_DIR}/rtengine/klt")
else() else()
include_directories(${KLT_INCLUDE_DIRS}) include_directories("${KLT_INCLUDE_DIRS}")
endif() endif()
link_directories("${PROJECT_SOURCE_DIR}/rtexif" link_directories("${PROJECT_SOURCE_DIR}/rtexif"
${EXPAT_LIBRARY_DIRS} "${EXPAT_LIBRARY_DIRS}"
${EXTRA_LIBDIR} "${EXTRA_LIBDIR}"
${FFTW3F_LIBRARY_DIRS} "${FFTW3F_LIBRARY_DIRS}"
${GLIB2_LIBRARY_DIRS} "${GLIB2_LIBRARY_DIRS}"
${GLIBMM_LIBRARY_DIRS} "${GLIBMM_LIBRARY_DIRS}"
${GOBJECT_LIBRARY_DIRS} "${GOBJECT_LIBRARY_DIRS}"
${GTHREAD_LIBRARY_DIRS} "${GTHREAD_LIBRARY_DIRS}"
${IPTCDATA_LIBRARY_DIRS} "${IPTCDATA_LIBRARY_DIRS}"
${LCMS_LIBRARY_DIRS} "${LCMS_LIBRARY_DIRS}"
${LENSFUN_LIBRARY_DIRS} "${LENSFUN_LIBRARY_DIRS}"
${RSVG_LIBRARY_DIRS} "${RSVG_LIBRARY_DIRS}"
) )
set(CAMCONSTSFILE "camconst.json") set(CAMCONSTSFILE "camconst.json")
@ -165,13 +190,13 @@ endif()
include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}") include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}")
add_library(rtengine STATIC ${RTENGINESOURCEFILES}) add_library(rtengine STATIC "${RTENGINESOURCEFILES}")
add_dependencies(rtengine UpdateInfo) add_dependencies(rtengine UpdateInfo)
# It may be nice to store library version too # It may be nice to store library version too
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
install(TARGETS rtengine DESTINATION ${LIBDIR}) install(TARGETS rtengine DESTINATION "${LIBDIR}")
endif() endif()
set_target_properties(rtengine PROPERTIES COMPILE_FLAGS "${RTENGINE_CXX_FLAGS}") set_target_properties(rtengine PROPERTIES COMPILE_FLAGS "${RTENGINE_CXX_FLAGS}")

View File

@ -254,7 +254,6 @@ public:
} }
// handy to sum up per thread histograms. #pragma omp simd speeds up the loop by about factor 3 for LUTu (uint32_t). // handy to sum up per thread histograms. #pragma omp simd speeds up the loop by about factor 3 for LUTu (uint32_t).
template<typename U = T, typename = typename std::enable_if<std::is_same<U, std::uint32_t>::value>::type>
LUT<T> & operator+=(const LUT<T>& rhs) LUT<T> & operator+=(const LUT<T>& rhs)
{ {
if (rhs.size == this->size) { if (rhs.size == this->size) {

View File

@ -941,6 +941,17 @@ void Color::rgbxyz (float r, float g, float b, float &x, float &y, float &z, con
z = ((xyz_rgb[2][0] * r + xyz_rgb[2][1] * g + xyz_rgb[2][2] * b)) ; z = ((xyz_rgb[2][0] * r + xyz_rgb[2][1] * g + xyz_rgb[2][2] * b)) ;
} }
void Color::rgbxyY(float r, float g, float b, float &x, float &y, float &Y, const float xyz_rgb[3][3])
{
const float xx = xyz_rgb[0][0] * r + xyz_rgb[0][1] * g + xyz_rgb[0][2] * b;
const float yy = xyz_rgb[1][0] * r + xyz_rgb[1][1] * g + xyz_rgb[1][2] * b;
const float zz = xyz_rgb[2][0] * r + xyz_rgb[2][1] * g + xyz_rgb[2][2] * b;
const float som = xx + yy + zz;
x = xx / som;
y = yy / som;
Y = yy / 65535.f;
}
void Color::rgbxyz (float r, float g, float b, float &x, float &y, float &z, const float xyz_rgb[3][3]) void Color::rgbxyz (float r, float g, float b, float &x, float &y, float &z, const float xyz_rgb[3][3])
{ {
x = ((xyz_rgb[0][0] * r + xyz_rgb[0][1] * g + xyz_rgb[0][2] * b)) ; x = ((xyz_rgb[0][0] * r + xyz_rgb[0][1] * g + xyz_rgb[0][2] * b)) ;
@ -1714,6 +1725,13 @@ void Color::Lab2XYZ(float L, float a, float b, float &x, float &y, float &z)
y = (LL > epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / kappa; y = (LL > epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / kappa;
} }
float Color::L2Y(float L)
{
const float LL = L / 327.68f;
const float fy = (c1By116 * LL) + c16By116; // (L+16)/116
return (LL > epskapf) ? 65535.f * fy * fy * fy : 65535.f * LL / kappaf;
}
void Color::L2XYZ(float L, float &x, float &y, float &z) // for black & white void Color::L2XYZ(float L, float &x, float &y, float &z) // for black & white
{ {
float LL = L / 327.68f; float LL = L / 327.68f;
@ -1756,19 +1774,6 @@ inline float Color::computeXYZ2Lab(float f)
} }
} }
inline float Color::computeXYZ2LabY(float f)
{
if (f < 0.f) {
return 327.68 * (kappa * f / MAXVALF);
} else if (f > 65535.f) {
return 327.68f * (116.f * xcbrtf(f / MAXVALF) - 16.f);
} else {
return cachefy[f];
}
}
void Color::RGB2Lab(float *R, float *G, float *B, float *L, float *a, float *b, const float wp[3][3], int width) void Color::RGB2Lab(float *R, float *G, float *B, float *L, float *a, float *b, const float wp[3][3], int width)
{ {

View File

@ -101,7 +101,6 @@ private:
#endif #endif
static float computeXYZ2Lab(float f); static float computeXYZ2Lab(float f);
static float computeXYZ2LabY(float f);
public: public:
@ -185,6 +184,16 @@ public:
static void init (); static void init ();
static void cleanup (); static void cleanup ();
static inline float computeXYZ2LabY(float f)
{
if (f < 0.f) {
return 327.68f * (kappa * f / MAXVALF);
} else if (f > 65535.f) {
return 327.68f * (116.f * xcbrtf(f / MAXVALF) - 16.f);
} else {
return cachefy[f];
}
}
/** /**
* @brief Extract luminance "sRGB" from red/green/blue values * @brief Extract luminance "sRGB" from red/green/blue values
@ -593,6 +602,7 @@ public:
* @param xyz_rgb[3][3] transformation matrix to use for the conversion * @param xyz_rgb[3][3] transformation matrix to use for the conversion
*/ */
static void rgbxyz (float r, float g, float b, float &x, float &y, float &z, const double xyz_rgb[3][3]); static void rgbxyz (float r, float g, float b, float &x, float &y, float &z, const double xyz_rgb[3][3]);
static void rgbxyY(float r, float g, float b, float &x, float &y, float &Y, const float xyz_rgb[3][3]);
static void rgbxyz (float r, float g, float b, float &x, float &y, float &z, const float xyz_rgb[3][3]); static void rgbxyz (float r, float g, float b, float &x, float &y, float &z, const float xyz_rgb[3][3]);
#ifdef __SSE2__ #ifdef __SSE2__
static void rgbxyz (vfloat r, vfloat g, vfloat b, vfloat &x, vfloat &y, vfloat &z, const vfloat xyz_rgb[3][3]); static void rgbxyz (vfloat r, vfloat g, vfloat b, vfloat &x, vfloat &y, vfloat &z, const vfloat xyz_rgb[3][3]);
@ -609,6 +619,7 @@ public:
*/ */
static void Lab2XYZ(float L, float a, float b, float &x, float &y, float &z); static void Lab2XYZ(float L, float a, float b, float &x, float &y, float &z);
static void L2XYZ(float L, float &x, float &y, float &z); static void L2XYZ(float L, float &x, float &y, float &z);
static float L2Y(float L);
#ifdef __SSE2__ #ifdef __SSE2__
static void Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, vfloat &z); static void Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, vfloat &z);

File diff suppressed because it is too large Load Diff

View File

@ -21,6 +21,7 @@
#include <cmath> #include <cmath>
#include <map> #include <map>
#include <string> #include <string>
#include "procparams.h"
namespace rtengine namespace rtengine
{ {
@ -53,6 +54,7 @@ public:
explicit ColorTemp (double e) : temp(-1.), green(-1.), equal (e), method("Custom") {} explicit ColorTemp (double e) : temp(-1.), green(-1.), equal (e), method("Custom") {}
ColorTemp (double t, double g, double e, const std::string &m); ColorTemp (double t, double g, double e, const std::string &m);
ColorTemp (double mulr, double mulg, double mulb, double e); ColorTemp (double mulr, double mulg, double mulb, double e);
static void tempxy(bool separated, int repref, float **Tx, float **Ty, float **Tz, float **Ta, float **Tb, float **TL, double *TX, double *TY, double *TZ, const procparams::WBParams & wbpar);
void update (const double rmul, const double gmul, const double bmul, const double equal, const double tempBias=0.0) void update (const double rmul, const double gmul, const double bmul, const double equal, const double tempBias=0.0)
{ {
@ -95,6 +97,8 @@ public:
static void temp2mulxyz (double tem, const std::string &method, double &Xxyz, double &Zxyz); static void temp2mulxyz (double tem, const std::string &method, double &Xxyz, double &Zxyz);
static void cieCAT02(double Xw, double Yw, double Zw, double &CAM02BB00, double &CAM02BB01, double &CAM02BB02, double &CAM02BB10, double &CAM02BB11, double &CAM02BB12, double &CAM02BB20, double &CAM02BB21, double &CAM02BB22, double adap ); static void cieCAT02(double Xw, double Yw, double Zw, double &CAM02BB00, double &CAM02BB01, double &CAM02BB02, double &CAM02BB10, double &CAM02BB11, double &CAM02BB12, double &CAM02BB20, double &CAM02BB21, double &CAM02BB22, double adap );
static void cieCAT02float(float Xw, float Yw, float Zw, float &CAM02BB00, float &CAM02BB01, float &CAM02BB02, float &CAM02BB10, float &CAM02BB11, float &CAM02BB12, float &CAM02BB20, float &CAM02BB21, float &CAM02BB22, float adap);
static void icieCAT02float(float Xw, float Yw, float Zw, float &iCAM02BB00, float &iCAM02BB01, float &iCAM02BB02, float &iCAM02BB10, float &iCAM02BB11, float &iCAM02BB12, float &iCAM02BB20, float &iCAM02BB21, float &iCAM02BB22, float adap);
bool operator== (const ColorTemp& other) const bool operator== (const ColorTemp& other) const
{ {
@ -162,6 +166,125 @@ public:
static const double ColorchechGreD1_spect[97]; static const double ColorchechGreD1_spect[97];
static const double ColorchechSGBlaN3_6_spect[97];//ColorChecker SG N3 static const double ColorchechSGBlaN3_6_spect[97];//ColorChecker SG N3
static const double JDC468_GraK14_44_spect[97];//468 K14 static const double JDC468_GraK14_44_spect[97];//468 K14
static const double JDC468_BluM5_spect[97]; //468 M5
static const double JDC468_BluD6_spect[97]; //468 D6
static const double JDC468_BluF4_spect[97]; //468 F4
static const double JDC468_RedG21va_spect[97]; //468 G21 modifié
static const double JDC468_RedI9_spect[97]; //468 I9
static const double JDC468_GreI8_spect[97]; //468 I8
static const double JDC468_GreQ7_spect[97]; //468 Q7
static const double ColorGreenM25_spect[97];
static const double ColorYellowkeltano_spect[97];
static const double ColorGreenalsi_spect[97];
static const double ColorRedpetunia_spect[97];
static const double ColorRedkurttu_spect[97];
static const double ColorRedlupiini_spect[97];
static const double ColorRedhevosminttu_spect[97];
static const double ColorRedneilikka_spect[97];
static const double ColorRedpelagornia_spect[97];
static const double ColorRedtalvio_spect[97];
static const double ColorBrownpoimulehti_spect[97];
static const double ColorOrangetuntematon_spect[97];
static const double ColorOrangetlehmus_spect[97];
static const double ColorOrangvaahtera_spect[97];
static const double ColorBrownlehmus_spect[97];
static const double ColorBrownuotiosammal_spect[97];
static const double ColorBlacksoil_spect[97];
static const double ColorGraynahjajaekaelae_spect[97];
static const double ColorGreennuotisammal_spect[97];
static const double ColorGreenleskenlehti_spect[97];
static const double ColorGreenlinnunkaali_spect[97];
static const double ColorGreenpelto_spect[97];
static const double ColorGreenrodvoikukka[97];
static const double ColorGreenlehmus[97];
static const double ColorGreenlinden[97];
static const double ColorYellowlehmus[97];
static const double ColorYellowsuikeroalpi[97];
static const double ColorYellowpensashanhikki1[97];
static const double ColorYellowpensashanhikki2[97];
static const double ColorBluehiidenvirna[97];
static const double ColorBluekurkkuyrtti[97];
static const double ColorPinksiankaersaemoe[97];
static const double ColorVioletharakankello[97];
static const double ColorVioletalsikeapila[97];
static const double ColorVioletakilleija[97];
static const double ColorOrangekehaekukka[97];
static const double ColorRedpihlaja[97];
static const double ColorVioletpetunia[97];
static const double ColorVioletorvokki[97];
static const double ColorBluesinisievikki[97];
static const double ColorBlueiisoppi[97];
static const double ColorBluelobelia[97];
static const double ColorWhiteojaka[97];
static const double ColorWhitepetunia[97];
static const double ColorWhitepelargonia[97];
static const double ColorWhitepaeivaen[97];
static const double JDC468_B14_75Redspect[97];
static const double Colorblue_spect[97];
static const double ColorGreenkoriste[97];
static const double ColorGreenpoimulehti[97];
static const double ColorGreenhopeapaju[97];
static const double ColorReduuden[97];
static const double ColorRedpajuan[97];
static const double ColorRedjaloan[97];
static const double ColorBlueukon[97];
static const double ColorBlueorvokki[97];
static const double ColorBluemalvikki[97];
static const double ColorBlackmaito[97];
static const double ColorOrangpihlaja[97];
static const double ColorBlackpihlaja[97];
static const double ColorViolA1_spect[97];
static const double ColorViolA4_spect[97];
static const double ColorViolA6_spect[97];
static const double ColorBlueSkyK3_spect[97];
static const double ColorBlueSkyK9_spect[97];
static const double ColorBlueSkyC4_spect[97];
static const double ColorBlueSkyC14_spect[97];
static const double ColorBlueSkyE4_spect[97];
static const double ColorBlueSkyM1_spect[97];
static const double ColorBlueSky2B1_spect[97];
static const double ColorBlueSkyT7_spect[97];
static const double ColorBlueSkyU19_spect[97];
static const double ColorBlueSkyU2_spect[97];
static const double ColorBlueSkyT17_spect[97];
static const double ColorBlackM8_spect[97];
static const double ColorBlackM12_spect[97];
static const double ColorBlackM13_spect[97];
static const double ColorWhite2B12_spect[97];
static const double ColorWhite2B14_spect[97];
static const double JDC468_Blackred97_spect[97];
static const double JDC468_Blackredbl443_spect[97];
static const double JDC468_Blackbl27_spect[97];
static const double JDC468_Blackbl28_spect[97];
static const double JDC468_Blackgr214_spect[97];
static const double JDC468_Blackbl436_spect[97];
static const double JDC468_Whitebl455_spect[97];
static const double JDC468_Blackvio101_spect[97];
static const double JDC468_Whitebl92_spect[97];
static const double JDC468_Greyredbl94_spect[97];
static const double JDC468_Blue32_spect[97];
static const double JDC468_Blue236_spect[97];
static const double JDC468_Gre300_spect[97];
static const double JDC468_Blue340_spect[97];
static const double JDC468_Gree110_spect[97];
static const double JDC468_Gree457_spect[97];
static const double JDC468_Yel241_spect[97];
static const double JDC468_Ora321_spect[97];
static const double JDC468_Yellow353_spect[97];
static const double JDC468_Mag465_spect[97];
static const double JDC468_Mag333_spect[97];
static const double JDC468_Mag203_spect[97];
static const double JDC468_OraO18_spect[97]; //468 O18
static const double JDC468_OraD17_spect[97]; //468 D17
static const double Fictif_61greyspect[97];//468 K15
static const double JDC468_K15_87greyspect[97];
static const double JDC468_YelN10_spect[97]; //468 N10
static const double JDC468_GreN7_spect[97]; //468 N7
static const double JDC468_GreA10_spect[97]; //468 A10
static const double JDC468_GreK7_spect[97]; //468 K7
static const double JDC468_PurE24_spect[97]; //468 E24
static const double JDC468_BluH10_spect[97];//468 H10 static const double JDC468_BluH10_spect[97];//468 H10
static const double ColabSkin35_15_17_spect[97];//Skin L 35 static const double ColabSkin35_15_17_spect[97];//Skin L 35
static const double ColabSkin57_22_18_spect[97];//Skin L 57 static const double ColabSkin57_22_18_spect[97];//Skin L 57
@ -195,6 +318,55 @@ public:
static const double ColabSkin70_7_32_spect[97];//Skin L 77 static const double ColabSkin70_7_32_spect[97];//Skin L 77
static const double ColabSky60_0_m31_spect[97];//Sky L=60 static const double ColabSky60_0_m31_spect[97];//Sky L=60
static const double ColabSky42_0_m24_spect[97];//Sky L=42 static const double ColabSky42_0_m24_spect[97];//Sky L=42
static const double J570_BlueB6_spect[97];//blue Cyan
static const double J570_BlueB15_spect[97];//blue Cyan
static const double J570_BlueC2_spect[97];//blue Cyan
static const double J570_BlueC14_spect[97];//blue Cyan
static const double J570_BlueC16_spect[97];//blue Cyan
static const double J570_BlueF1_spect[97];//blue Cyan
static const double J570_BlueF2_spect[97];//blue Cyan
static const double J570_BlueF10_spect[97];//blue Cyan
static const double J570_BlueF13_spect[97];//blue Cyan
static const double J570_BlueG9_spect[97];//blue Cyan
static const double J570_BlueG19_spect[97];//blue Cyan
static const double J570_BlueI5_spect[97];//blue Cyan
static const double J570_BlueH15_spect[97];//blue Cyan
static const double J570_BlueI3_spect[97];//blue Cyan
static const double J570_BlueI19_spect[97];//blue Cyan
static const double J570_BlueJ4_spect[97];//blue Cyan
static const double J570_BlueJ6_spect[97];//blue Cyan
static const double J570_BlueJ11_spect[97];//blue Cyan
static const double J570_BlueJ13_spect[97];//blue Cyan
static const double J570_BlueK5_spect[97];//blue Cyan
static const double J570_BlueN1_spect[97];//blue Cyan
static const double J570_BlueN4_spect[97];//blue Cyan
static const double J570_BlueO19_spect[97];//blue Cyan
static const double J570_BlueU8_spect[97];//blue Cyan
static const double J570_NeuN8_spect[97];//neutral
static const double J570_NeuN9_spect[97];//neutral
static const double J570_NeuO8_spect[97];//neutral
static const double J570_NeuO11_spect[97];//neutral
static const double J570_NeuD5_spect[97];//neutral
static const double J570_NeuE11_spect[97];//neutral
static const double J570_NeuK16_spect[97];//neutral
static const double J570_NeuM3_spect[97];//neutral
static const double J570_NeuN18_spect[97];//neutral
static const double J570_NeuQ1_spect[97];//neutral
static const double J570_NeuS7_spect[97];//neutral
static const double J570_NeuV10_spect[97];//neutral
static const double J570_NeuW18_spect[97];//neutral
static const double J570_NeuZ14_spect[97];//neutral
static const double J570_NeuC18_spect[97];//neutral
static const double J570_NeuD17_spect[97];//neutral
static const double J570_NeuJ11_spect[97];//neutral
static const double J570_NeuL4_spect[97];//neutral
static const double Colorlab_n72_n2_spect[97];
static const double Colorlab_10_n70_spect[97];
static const double Colorlab_n33_n70_spect[97];
static const double Colorlab_n8_n74_spect[97];
static const double Colorlab_19_n69_spect[97];
static const double Colorlab_n80_10_spect[97];
static const double Colorlab_n80_26_spect[97];
static void spectrum_to_xyz_daylight (double _m1, double _m2, double &x, double &y, double &z); static void spectrum_to_xyz_daylight (double _m1, double _m2, double &x, double &y, double &z);
static void spectrum_to_xyz_blackbody (double _temp, double &x, double &y, double &z); static void spectrum_to_xyz_blackbody (double _temp, double &x, double &y, double &z);

View File

@ -48,7 +48,11 @@ const float Daub4_anal16[2][16] ALIGNED16 = {//Daub 14
{0.f, 0.f, 0.055049715f, 0.28039564f, 0.515574245f, 0.33218624f, -0.10175691f, -0.158417505f, 0.05042335f, 0.057001725f, -0.026891225f, -0.01171997f, 0.008874895f, 0.0003037575f, -0.0012739524f, 0.0002501134f}, {0.f, 0.f, 0.055049715f, 0.28039564f, 0.515574245f, 0.33218624f, -0.10175691f, -0.158417505f, 0.05042335f, 0.057001725f, -0.026891225f, -0.01171997f, 0.008874895f, 0.0003037575f, -0.0012739524f, 0.0002501134f},
{ -0.0002501134f, -0.0012739524f, -0.0003037575f, 0.008874895f, 0.01171997f , -0.026891225f, -0.057001725f, 0.05042335f, 0.158417505f, -0.10175691f, -0.33218624f, 0.515574245f, -0.28039564f, 0.055049715f, 0.f, 0.f} { -0.0002501134f, -0.0012739524f, -0.0003037575f, 0.008874895f, 0.01171997f , -0.026891225f, -0.057001725f, 0.05042335f, 0.158417505f, -0.10175691f, -0.33218624f, 0.515574245f, -0.28039564f, 0.055049715f, 0.f, 0.f}
}; };
/*
// if necessary ?? we can add D20 !! const double Daub4_anal22[2][22] ALIGNED16 = {//Daub 20
{0., 0., 0.01885858, 0.13306109, 0.37278754, 0.48681406, 0.19881887, -0.1766681, -0.13855494, 0.09006372, 0.0658015, -0.05048328, -0.02082962, 0.0234849, 0.0025502185, -0.0075895, 0.0009866625, 0.0014088433, -0.00048497392, -0.0000823545, 0.00006617718, -0.000009379205},
{0.000009379205, -0.00006617718, 0.0000823545, 0.00048497392, -0.0014088433, -0.0009866627, 0.0075895, -0.0025502185, -0.0234849, 0.02082962, 0.05048328, -0.0658015, -0.09006372, 0.13855494, 0.1766681, -0.19881887, -0.48681406, -0.37278754, -0.13306109, -0.01885858, 0., 0.}
};
*/
} }

View File

@ -30,8 +30,9 @@
#include "procparams.h" #include "procparams.h"
#include "refreshmap.h" #include "refreshmap.h"
#include "rt_math.h" #include "rt_math.h"
#include "color.h"
#include "../rtgui/editcallbacks.h" #include "../rtgui/editcallbacks.h"
#include "guidedfilter.h"
namespace namespace
{ {
@ -50,7 +51,7 @@ namespace rtengine
Crop::Crop(ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow) Crop::Crop(ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow)
: PipetteBuffer(editDataProvider), origCrop(nullptr), laboCrop(nullptr), labnCrop(nullptr), : PipetteBuffer(editDataProvider), origCrop(nullptr), laboCrop(nullptr), labnCrop(nullptr),
cropImg (nullptr), transCrop (nullptr), cieCrop (nullptr), cropImg(nullptr), transCrop(nullptr), cieCrop(nullptr),
updating(false), newUpdatePending(false), skip(10), updating(false), newUpdatePending(false), skip(10),
cropx(0), cropy(0), cropw(-1), croph(-1), cropx(0), cropy(0), cropw(-1), croph(-1),
trafx(0), trafy(0), trafw(-1), trafh(-1), trafx(0), trafy(0), trafw(-1), trafh(-1),
@ -815,6 +816,7 @@ void Crop::update(int todo)
parent->ipf.workingtrc(workingCrop, workingCrop, cw, ch, 5, params.icm.workingProfile, params.icm.workingTRCGamma, params.icm.workingTRCSlope, parent->getCustomTransformOut(), false, true, true); parent->ipf.workingtrc(workingCrop, workingCrop, cw, ch, 5, params.icm.workingProfile, params.icm.workingTRCGamma, params.icm.workingTRCSlope, parent->getCustomTransformOut(), false, true, true);
} }
} }
double rrm, ggm, bbm; double rrm, ggm, bbm;
DCPProfileApplyState as; DCPProfileApplyState as;
DCPProfile *dcpProf = parent->imgsrc->getDCP(params.icm, as); DCPProfile *dcpProf = parent->imgsrc->getDCP(params.icm, as);
@ -824,6 +826,7 @@ void Crop::update(int todo)
params.toneCurve.saturation, parent->rCurve, parent->gCurve, parent->bCurve, parent->colourToningSatLimit, parent->colourToningSatLimitOpacity, parent->ctColorCurve, parent->ctOpacityCurve, parent->opautili, parent->clToningcurve, parent->cl2Toningcurve, params.toneCurve.saturation, parent->rCurve, parent->gCurve, parent->bCurve, parent->colourToningSatLimit, parent->colourToningSatLimitOpacity, parent->ctColorCurve, parent->ctOpacityCurve, parent->opautili, parent->clToningcurve, parent->cl2Toningcurve,
parent->customToneCurve1, parent->customToneCurve2, parent->beforeToneCurveBW, parent->afterToneCurveBW, rrm, ggm, bbm, parent->customToneCurve1, parent->customToneCurve2, parent->beforeToneCurveBW, parent->afterToneCurveBW, rrm, ggm, bbm,
parent->bwAutoR, parent->bwAutoG, parent->bwAutoB, dcpProf, as, histToneCurve); parent->bwAutoR, parent->bwAutoG, parent->bwAutoB, dcpProf, as, histToneCurve);
if (workingCrop != baseCrop) { if (workingCrop != baseCrop) {
delete workingCrop; delete workingCrop;
} }
@ -880,8 +883,8 @@ void Crop::update(int todo)
parent->ipf.MLsharpen(labnCrop); parent->ipf.MLsharpen(labnCrop);
if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) {
parent->ipf.MLmicrocontrast (labnCrop); parent->ipf.MLmicrocontrast(labnCrop);
parent->ipf.sharpening (labnCrop, params.sharpening, parent->sharpMask); parent->ipf.sharpening(labnCrop, params.sharpening, parent->sharpMask);
} }
} }
@ -971,15 +974,175 @@ void Crop::update(int todo)
LUTf wavclCurve; LUTf wavclCurve;
params.wavelet.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); params.wavelet.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL);
LabImage *unshar = nullptr;
Glib::ustring provis;
LabImage *provradius = nullptr;
bool procont = WaveParams.expcontrast;
bool prochro = WaveParams.expchroma;
bool proedge = WaveParams.expedge;
bool profin = WaveParams.expfinal;
bool proton = WaveParams.exptoning;
bool pronois = WaveParams.expnoise;
if(WaveParams.showmask) {
// WaveParams.showmask = false;
// WaveParams.expclari = true;
}
if (WaveParams.softrad > 0.f) {
provradius = new LabImage(labnCrop->W, labnCrop->H);
provradius->CopyFrom(labnCrop);
}
if ((WaveParams.ushamethod == "sharp" || WaveParams.ushamethod == "clari") && WaveParams.expclari && WaveParams.CLmethod != "all") {
unshar = new LabImage(labnCrop->W, labnCrop->H);
provis = params.wavelet.CLmethod;
params.wavelet.CLmethod = "all";
parent->ipf.ip_wavelet(labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, skip);
unshar->CopyFrom(labnCrop);
params.wavelet.CLmethod = provis;
WaveParams.expcontrast = false;
WaveParams.expchroma = false;
WaveParams.expedge = false;
WaveParams.expfinal = false;
WaveParams.exptoning = false;
WaveParams.expnoise = false;
}
parent->ipf.ip_wavelet(labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, skip); parent->ipf.ip_wavelet(labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, skip);
if ((WaveParams.ushamethod == "sharp" || WaveParams.ushamethod == "clari") && WaveParams.expclari && WaveParams.CLmethod != "all") {
WaveParams.expcontrast = procont;
WaveParams.expchroma = prochro;
WaveParams.expedge = proedge;
WaveParams.expfinal = profin;
WaveParams.exptoning = proton;
WaveParams.expnoise = pronois;
if (WaveParams.softrad > 0.f) {
array2D<float> ble(labnCrop->W, labnCrop->H);
array2D<float> guid(labnCrop->W, labnCrop->H);
Imagefloat *tmpImage = nullptr;
tmpImage = new Imagefloat(labnCrop->W, labnCrop->W);
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int ir = 0; ir < labnCrop->H ; ir++)
for (int jr = 0; jr < labnCrop->W; jr++) {
float X, Y, Z;
float L = provradius->L[ir][jr];
float a = provradius->a[ir][jr];
float b = provradius->b[ir][jr];
Color::Lab2XYZ(L, a, b, X, Y, Z);
guid[ir][jr] = Y / 32768.f;
float La = labnCrop->L[ir][jr];
float aa = labnCrop->a[ir][jr];
float ba = labnCrop->b[ir][jr];
Color::Lab2XYZ(La, aa, ba, X, Y, Z);
tmpImage->r(ir, jr) = X;
tmpImage->g(ir, jr) = Y;
tmpImage->b(ir, jr) = Z;
ble[ir][jr] = Y / 32768.f;
}
double epsilmax = 0.0001;
double epsilmin = 0.00001;
double aepsil = (epsilmax - epsilmin) / 90.f;
double bepsil = epsilmax - 100.f * aepsil;
double epsil = aepsil * WaveParams.softrad + bepsil;
float blur = 10.f / skip * (0.0001f + 0.8f * WaveParams.softrad);
rtengine::guidedFilter(guid, ble, ble, blur, epsil, false);
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int ir = 0; ir < labnCrop->H; ir++)
for (int jr = 0; jr < labnCrop->W; jr++) {
float X = tmpImage->r(ir, jr);
float Y = 32768.f * ble[ir][jr];
float Z = tmpImage->b(ir, jr);
float L, a, b;
Color::XYZ2Lab(X, Y, Z, L, a, b);
labnCrop->L[ir][jr] = L;
}
delete tmpImage;
}
}
if ((WaveParams.ushamethod == "sharp" || WaveParams.ushamethod == "clari") && WaveParams.expclari && WaveParams.CLmethod != "all") {
float mL = (float)(WaveParams.mergeL / 100.f);
float mC = (float)(WaveParams.mergeC / 100.f);
float mL0;
float mC0;
float background = 0.f;
int show = 0;
if ((WaveParams.CLmethod == "one" || WaveParams.CLmethod == "inf") && WaveParams.Backmethod == "black") {
mL0 = mC0 = 0.f;
mL = -1.5f * mL;
mC = -mC;
background = 12000.f;
show = 0;
} else if (WaveParams.CLmethod == "sup" && WaveParams.Backmethod == "resid") {
mL0 = mL;
mC0 = mC;
background = 0.f;
show = 0;
} else {
mL0 = mL = mC0 = mC = 0.f;
background = 0.f;
show = 0;
}
float indic = 1.f;
if(WaveParams.showmask){
mL0 = mC0 = -1.f;
indic = -1.f;
mL = fabs(mL);
mC = fabs(mC);
show = 1;
}
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int x = 0; x < labnCrop->H; x++)
for (int y = 0; y < labnCrop->W; y++) {
labnCrop->L[x][y] = LIM((1.f + mL0) * (unshar->L[x][y]) + show * background - mL * indic * labnCrop->L[x][y], 0.f, 32768.f);
labnCrop->a[x][y] = (1.f + mC0) * (unshar->a[x][y]) - mC * indic * labnCrop->a[x][y];
labnCrop->b[x][y] = (1.f + mC0) * (unshar->b[x][y]) - mC * indic * labnCrop->b[x][y];
}
delete unshar;
unshar = NULL;
if (WaveParams.softrad > 0.f) {
delete provradius;
provradius = NULL;
}
}
} }
parent->ipf.softLight(labnCrop); parent->ipf.softLight(labnCrop);
// }
// }
if (params.colorappearance.enabled) { if (params.colorappearance.enabled) {
float fnum = parent->imgsrc->getMetaData()->getFNumber(); // F number float fnum = parent->imgsrc->getMetaData()->getFNumber(); // F number
float fiso = parent->imgsrc->getMetaData()->getISOSpeed() ; // ISO float fiso = parent->imgsrc->getMetaData()->getISOSpeed() ; // ISO

View File

@ -360,8 +360,8 @@ void RawImageSource::eahd_demosaic ()
int wh = 0; int wh = 0;
for (int dmi = 0; dmi < 9; dmi++) { for (int d = 0; d < 9; ++d) {
wh += (dLmaph[dmi] <= eL) * (dCamaph[dmi] <= eCa) * (dCbmaph[dmi] <= eCb); wh += (dLmaph[d] <= eL) * (dCamaph[d] <= eCa) * (dCbmaph[d] <= eCb);
} }
homh[imx][j - 1] += wh; homh[imx][j - 1] += wh;
@ -376,8 +376,8 @@ void RawImageSource::eahd_demosaic ()
int wv = 0; int wv = 0;
for (int dmi = 0; dmi < 9; dmi++) { for (int d = 0; d < 9; ++d) {
wv += (dLmapv[dmi] <= eL) * (dCamapv[dmi] <= eCa) * (dCbmapv[dmi] <= eCb); wv += (dLmapv[d] <= eL) * (dCamapv[d] <= eCa) * (dCbmapv[d] <= eCb);
} }
homv[imx][j - 1] += wv; homv[imx][j - 1] += wv;

View File

@ -27,7 +27,7 @@
#include "imagedimensions.h" #include "imagedimensions.h"
#include "LUT.h" #include "LUT.h"
#include "rt_math.h" #include "rt_math.h"
#include "procparams.h"
#include "../rtgui/threadutils.h" #include "../rtgui/threadutils.h"
#define TR_NONE 0 #define TR_NONE 0
@ -111,6 +111,10 @@ public:
{ {
rm = gm = bm = 1.0; rm = gm = bm = 1.0;
} }
virtual void getAutoWBMultipliersitc(double &tempref, double &greenref, double &tempitc, double &greenitc, float &studgood, int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w, double &rm, double &gm, double &bm, const procparams::WBParams & wbpar, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw)
{
rm = gm = bm = 1.0;
}
}; };

View File

@ -26,6 +26,8 @@
#include "coord2d.h" #include "coord2d.h"
#include "imagedata.h" #include "imagedata.h"
#include "rtengine.h" #include "rtengine.h"
#include "colortemp.h"
#include "array2D.h"
template<typename T> template<typename T>
class LUT; class LUT;
@ -96,8 +98,7 @@ public:
virtual void retinex (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &deh, const procparams::ToneCurveParams& Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {}; virtual void retinex (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &deh, const procparams::ToneCurveParams& Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {};
virtual void retinexPrepareCurves (const procparams::RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {}; virtual void retinexPrepareCurves (const procparams::RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {};
virtual void retinexPrepareBuffers (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI) {}; virtual void retinexPrepareBuffers (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI) {};
virtual void flushRawData () {}; virtual void flush () = 0;
virtual void flushRGB () {};
virtual void HLRecovery_Global (const procparams::ToneCurveParams &hrp) {}; virtual void HLRecovery_Global (const procparams::ToneCurveParams &hrp) {};
virtual void HLRecovery_inpaint (float** red, float** green, float** blue) {}; virtual void HLRecovery_inpaint (float** red, float** green, float** blue) {};
@ -118,8 +119,11 @@ public:
virtual void convertColorSpace (Imagefloat* image, const procparams::ColorManagementParams &cmp, const ColorTemp &wb) = 0; // DIRTY HACK: this method is derived in rawimagesource and strimagesource, but (...,RAWParams raw) will be used ONLY for raw images virtual void convertColorSpace (Imagefloat* image, const procparams::ColorManagementParams &cmp, const ColorTemp &wb) = 0; // DIRTY HACK: this method is derived in rawimagesource and strimagesource, but (...,RAWParams raw) will be used ONLY for raw images
virtual void getAutoWBMultipliers (double &rm, double &gm, double &bm) = 0; virtual void getAutoWBMultipliers (double &rm, double &gm, double &bm) = 0;
virtual void getAutoWBMultipliersitc(double &tempref, double &greenref, double &tempitc, double & greenitc, float &studgood, int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w, double &rm, double &gm, double &bm, const procparams::WBParams & wbpar, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) = 0;
virtual ColorTemp getWB () const = 0; virtual ColorTemp getWB () const = 0;
virtual ColorTemp getSpotWB (std::vector<Coord2D> &red, std::vector<Coord2D> &green, std::vector<Coord2D> &blue, int tran, double equal) = 0; virtual ColorTemp getSpotWB (std::vector<Coord2D> &red, std::vector<Coord2D> &green, std::vector<Coord2D> &blue, int tran, double equal) = 0;
virtual void WBauto(double &tempref, double &greenref, array2D<float> &redloc, array2D<float> &greenloc, array2D<float> &blueloc, int bfw, int bfh, double &avg_rm, double &avg_gm, double &avg_bm, double &tempitc, double &greenitc, float &studgood, bool &twotimes, const procparams::WBParams & wbpar, int begx, int begy, int yEn, int xEn, int cx, int cy, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) = 0;
virtual void getrgbloc(int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w) = 0;
virtual double getDefGain () const virtual double getDefGain () const
{ {

View File

@ -36,6 +36,7 @@
#include "lcp.h" #include "lcp.h"
#include "procparams.h" #include "procparams.h"
#include "refreshmap.h" #include "refreshmap.h"
#include "guidedfilter.h"
#include "../rtgui/options.h" #include "../rtgui/options.h"
@ -55,11 +56,12 @@ ImProcCoordinator::ImProcCoordinator() :
fattal_11_dcrop_cache(nullptr), fattal_11_dcrop_cache(nullptr),
previmg(nullptr), previmg(nullptr),
workimg(nullptr), workimg(nullptr),
ncie (nullptr), ncie(nullptr),
imgsrc (nullptr), imgsrc(nullptr),
lastAwbEqual (0.), lastAwbEqual(0.),
lastAwbTempBias (0.0), lastAwbTempBias(0.0),
monitorIntent (RI_RELATIVE), lastAwbauto(""),
monitorIntent(RI_RELATIVE),
softProof(false), softProof(false),
gamutCheck(false), gamutCheck(false),
sharpMask(false), sharpMask(false),
@ -194,12 +196,12 @@ ImProcCoordinator::~ImProcCoordinator()
imgsrc->decreaseRef(); imgsrc->decreaseRef();
if(customTransformIn) { if (customTransformIn) {
cmsDeleteTransform(customTransformIn); cmsDeleteTransform(customTransformIn);
customTransformIn = nullptr; customTransformIn = nullptr;
} }
if(customTransformOut) { if (customTransformOut) {
cmsDeleteTransform(customTransformOut); cmsDeleteTransform(customTransformOut);
customTransformOut = nullptr; customTransformOut = nullptr;
} }
@ -231,11 +233,12 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
MyMutex::MyLock processingLock(mProcessing); MyMutex::MyLock processingLock(mProcessing);
bool highDetailNeeded = options.prevdemo == PD_Sidecar ? true : (todo & M_HIGHQUAL); bool highDetailNeeded = options.prevdemo == PD_Sidecar ? true : (todo & M_HIGHQUAL);
// printf("metwb=%s \n", params->wb.method.c_str());
// Check if any detail crops need high detail. If not, take a fast path short cut // Check if any detail crops need high detail. If not, take a fast path short cut
if (!highDetailNeeded) { if (!highDetailNeeded) {
for (size_t i = 0; i < crops.size(); i++) { for (size_t i = 0; i < crops.size(); i++) {
if (crops[i]->get_skip() == 1) { // skip=1 -> full resolution if (crops[i]->get_skip() == 1) { // skip=1 -> full resolution
highDetailNeeded = true; highDetailNeeded = true;
break; break;
} }
@ -252,7 +255,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
RAWParams rp = params->raw; RAWParams rp = params->raw;
ColorManagementParams cmp = params->icm; ColorManagementParams cmp = params->icm;
LCurveParams lcur = params->labCurve; LCurveParams lcur = params->labCurve;
if (!highDetailNeeded) { if (!highDetailNeeded) {
// if below 100% magnification, take a fast path // if below 100% magnification, take a fast path
if (rp.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::NONE) && rp.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::MONO)) { if (rp.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::NONE) && rp.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::MONO)) {
@ -279,9 +282,11 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
imgsrc->setCurrentFrame(params->raw.bayersensor.imageNum); imgsrc->setCurrentFrame(params->raw.bayersensor.imageNum);
imgsrc->preprocess(rp, params->lensProf, params->coarse); imgsrc->preprocess(rp, params->lensProf, params->coarse);
if (flatFieldAutoClipListener && rp.ff_AutoClipControl) { if (flatFieldAutoClipListener && rp.ff_AutoClipControl) {
flatFieldAutoClipListener->flatFieldAutoClipValueChanged(imgsrc->getFlatFieldAutoClipValue()); flatFieldAutoClipListener->flatFieldAutoClipValueChanged(imgsrc->getFlatFieldAutoClipValue());
} }
imgsrc->getRAWHistogram(histRedRaw, histGreenRaw, histBlueRaw); imgsrc->getRAWHistogram(histRedRaw, histGreenRaw, histBlueRaw);
highDetailPreprocessComputed = highDetailNeeded; highDetailPreprocessComputed = highDetailNeeded;
@ -327,8 +332,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
printf("Demosaic X-Trans image with using method: %s\n", rp.xtranssensor.method.c_str()); printf("Demosaic X-Trans image with using method: %s\n", rp.xtranssensor.method.c_str());
} }
} }
if(imgsrc->getSensorType() == ST_BAYER) {
if(params->raw.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::PIXELSHIFT)) { if (imgsrc->getSensorType() == ST_BAYER) {
if (params->raw.bayersensor.method != RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::PIXELSHIFT)) {
imgsrc->setBorder(params->raw.bayersensor.border); imgsrc->setBorder(params->raw.bayersensor.border);
} else { } else {
imgsrc->setBorder(std::max(params->raw.bayersensor.border, 2)); imgsrc->setBorder(std::max(params->raw.bayersensor.border, 2));
@ -336,6 +342,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
} else if (imgsrc->getSensorType() == ST_FUJI_XTRANS) { } else if (imgsrc->getSensorType() == ST_FUJI_XTRANS) {
imgsrc->setBorder(params->raw.xtranssensor.border); imgsrc->setBorder(params->raw.xtranssensor.border);
} }
bool autoContrast = imgsrc->getSensorType() == ST_BAYER ? params->raw.bayersensor.dualDemosaicAutoContrast : params->raw.xtranssensor.dualDemosaicAutoContrast; bool autoContrast = imgsrc->getSensorType() == ST_BAYER ? params->raw.bayersensor.dualDemosaicAutoContrast : params->raw.xtranssensor.dualDemosaicAutoContrast;
double contrastThreshold = imgsrc->getSensorType() == ST_BAYER ? params->raw.bayersensor.dualDemosaicContrast : params->raw.xtranssensor.dualDemosaicContrast; double contrastThreshold = imgsrc->getSensorType() == ST_BAYER ? params->raw.bayersensor.dualDemosaicContrast : params->raw.xtranssensor.dualDemosaicContrast;
imgsrc->demosaic(rp, autoContrast, contrastThreshold, params->pdsharpening.enabled); imgsrc->demosaic(rp, autoContrast, contrastThreshold, params->pdsharpening.enabled);
@ -343,7 +350,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if (imgsrc->getSensorType() == ST_BAYER && bayerAutoContrastListener && autoContrast) { if (imgsrc->getSensorType() == ST_BAYER && bayerAutoContrastListener && autoContrast) {
bayerAutoContrastListener->autoContrastChanged(contrastThreshold); bayerAutoContrastListener->autoContrastChanged(contrastThreshold);
} else if (imgsrc->getSensorType() == ST_FUJI_XTRANS && xtransAutoContrastListener && autoContrast) { } else if (imgsrc->getSensorType() == ST_FUJI_XTRANS && xtransAutoContrastListener && autoContrast) {
xtransAutoContrastListener->autoContrastChanged(autoContrast ? contrastThreshold : -1.0);
xtransAutoContrastListener->autoContrastChanged(contrastThreshold);
} }
// if a demosaic happened we should also call getimage later, so we need to set the M_INIT flag // if a demosaic happened we should also call getimage later, so we need to set the M_INIT flag
todo |= (M_INIT | M_CSHARP); todo |= (M_INIT | M_CSHARP);
@ -381,6 +389,12 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
} }
} }
if (todo & (M_INIT | M_LINDENOISE | M_HDR)) {
if (params->wb.method == "autitcgreen") {
imgsrc->getrgbloc(0, 0, fh, fw, 0, 0, fh, fw);
}
}
if ((todo & (M_RETINEX | M_INIT)) && params->retinex.enabled) { if ((todo & (M_RETINEX | M_INIT)) && params->retinex.enabled) {
bool dehacontlutili = false; bool dehacontlutili = false;
bool mapcontlutili = false; bool mapcontlutili = false;
@ -397,6 +411,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
} }
} }
const bool autowb = (params->wb.method == "autold" || params->wb.method == "autitcgreen");
if (settings->verbose) {
printf("automethod=%s \n", params->wb.method.c_str());
}
if (todo & (M_INIT | M_LINDENOISE | M_HDR)) { if (todo & (M_INIT | M_LINDENOISE | M_HDR)) {
MyMutex::MyLock initLock(minit); // Also used in crop window MyMutex::MyLock initLock(minit); // Also used in crop window
@ -408,28 +426,53 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
} }
currWB = ColorTemp(params->wb.temperature, params->wb.green, params->wb.equal, params->wb.method); currWB = ColorTemp(params->wb.temperature, params->wb.green, params->wb.equal, params->wb.method);
float studgood = 1000.f;
if (!params->wb.enabled) { if (!params->wb.enabled) {
currWB = ColorTemp(); currWB = ColorTemp();
} else if (params->wb.method == "Camera") { } else if (params->wb.method == "Camera") {
currWB = imgsrc->getWB(); currWB = imgsrc->getWB();
} else if (params->wb.method == "Auto") { lastAwbauto = ""; //reinitialize auto
if (lastAwbEqual != params->wb.equal || lastAwbTempBias != params->wb.tempBias) { } else if (autowb) {
if (lastAwbEqual != params->wb.equal || lastAwbTempBias != params->wb.tempBias || lastAwbauto != params->wb.method) {
double rm, gm, bm; double rm, gm, bm;
imgsrc->getAutoWBMultipliers(rm, gm, bm); double tempitc = 5000.f;
double greenitc = 1.;
currWBitc = imgsrc->getWB();
double tempref = currWBitc.getTemp() * (1. + params->wb.tempBias);
double greenref = currWBitc.getGreen();
if (settings->verbose && params->wb.method == "autitcgreen") {
printf("tempref=%f greref=%f\n", tempref, greenref);
}
imgsrc->getAutoWBMultipliersitc(tempref, greenref, tempitc, greenitc, studgood, 0, 0, fh, fw, 0, 0, fh, fw, rm, gm, bm, params->wb, params->icm, params->raw);
if (params->wb.method == "autitcgreen") {
params->wb.temperature = tempitc;
params->wb.green = greenitc;
currWB = ColorTemp(params->wb.temperature, params->wb.green, 1., params->wb.method);
currWB.getMultipliers(rm, gm, bm);
}
if (rm != -1.) { if (rm != -1.) {
autoWB.update(rm, gm, bm, params->wb.equal, params->wb.tempBias); double bias = params->wb.tempBias;
if (params->wb.method == "autitcgreen") {
bias = 0.;
}
autoWB.update(rm, gm, bm, params->wb.equal, bias);
lastAwbEqual = params->wb.equal; lastAwbEqual = params->wb.equal;
lastAwbTempBias = params->wb.tempBias; lastAwbTempBias = params->wb.tempBias;
lastAwbauto = params->wb.method;
} else { } else {
lastAwbEqual = -1.; lastAwbEqual = -1.;
lastAwbTempBias = 0.0; lastAwbTempBias = 0.0;
lastAwbauto = "";
autoWB.useDefaults(params->wb.equal); autoWB.useDefaults(params->wb.equal);
} }
//double rr,gg,bb;
//autoWB.getMultipliers(rr,gg,bb);
} }
currWB = autoWB; currWB = autoWB;
@ -440,9 +483,13 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
params->wb.green = currWB.getGreen(); params->wb.green = currWB.getGreen();
} }
if (params->wb.method == "Auto" && awbListener && params->wb.enabled) { if (autowb && awbListener && params->wb.method == "autitcgreen") {
awbListener->WBChanged(params->wb.temperature, params->wb.green); awbListener->WBChanged(params->wb.temperature, params->wb.green, studgood);
} }
if (autowb && awbListener && params->wb.method == "autold") {
awbListener->WBChanged(params->wb.temperature, params->wb.green, -1.f);
}
/* /*
GammaValues g_a; GammaValues g_a;
@ -605,7 +652,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
} }
} }
if (todo & (M_AUTOEXP | M_RGBCURVE)) { if (todo & (M_AUTOEXP | M_RGBCURVE)) {
if (params->icm.workingTRC == "Custom") { //exec TRC IN free if (params->icm.workingTRC == "Custom") { //exec TRC IN free
if (oprevi == orig_prev) { if (oprevi == orig_prev) {
oprevi = new Imagefloat(pW, pH); oprevi = new Imagefloat(pW, pH);
@ -617,17 +664,21 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if (profile == "sRGB" || profile == "Adobe RGB" || profile == "ProPhoto" || profile == "WideGamut" || profile == "BruceRGB" || profile == "Beta RGB" || profile == "BestRGB" || profile == "Rec2020" || profile == "ACESp0" || profile == "ACESp1") { if (profile == "sRGB" || profile == "Adobe RGB" || profile == "ProPhoto" || profile == "WideGamut" || profile == "BruceRGB" || profile == "Beta RGB" || profile == "BestRGB" || profile == "Rec2020" || profile == "ACESp0" || profile == "ACESp1") {
const int cw = oprevi->getWidth(); const int cw = oprevi->getWidth();
const int ch = oprevi->getHeight(); const int ch = oprevi->getHeight();
// put gamma TRC to 1 // put gamma TRC to 1
if(customTransformIn) { if (customTransformIn) {
cmsDeleteTransform(customTransformIn); cmsDeleteTransform(customTransformIn);
customTransformIn = nullptr; customTransformIn = nullptr;
} }
ipf.workingtrc(oprevi, oprevi, cw, ch, -5, params->icm.workingProfile, 2.4, 12.92310, customTransformIn, true, false, true); ipf.workingtrc(oprevi, oprevi, cw, ch, -5, params->icm.workingProfile, 2.4, 12.92310, customTransformIn, true, false, true);
//adjust TRC //adjust TRC
if(customTransformOut) { if (customTransformOut) {
cmsDeleteTransform(customTransformOut); cmsDeleteTransform(customTransformOut);
customTransformOut = nullptr; customTransformOut = nullptr;
} }
ipf.workingtrc(oprevi, oprevi, cw, ch, 5, params->icm.workingProfile, params->icm.workingTRCGamma, params->icm.workingTRCSlope, customTransformOut, false, true, true); ipf.workingtrc(oprevi, oprevi, cw, ch, 5, params->icm.workingProfile, params->icm.workingTRCGamma, params->icm.workingTRCSlope, customTransformOut, false, true, true);
} }
} }
@ -635,7 +686,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if ((todo & M_RGBCURVE) || (todo & M_CROP)) { if ((todo & M_RGBCURVE) || (todo & M_CROP)) {
// if (hListener) oprevi->calcCroppedHistogram(params, scale, histCropped); // if (hListener) oprevi->calcCroppedHistogram(params, scale, histCropped);
//complexCurve also calculated pre-curves histogram depending on crop //complexCurve also calculated pre-curves histogram depending on crop
CurveFactory::complexCurve(params->toneCurve.expcomp, params->toneCurve.black / 65535.0, CurveFactory::complexCurve(params->toneCurve.expcomp, params->toneCurve.black / 65535.0,
@ -729,7 +780,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
DCPProfileApplyState as; DCPProfileApplyState as;
DCPProfile *dcpProf = imgsrc->getDCP(params->icm, as); DCPProfile *dcpProf = imgsrc->getDCP(params->icm, as);
ipf.rgbProc (oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, params->toneCurve.saturation, ipf.rgbProc(oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, params->toneCurve.saturation,
rCurve, gCurve, bCurve, colourToningSatLimit, colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, as, histToneCurve); rCurve, gCurve, bCurve, colourToningSatLimit, colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, as, histToneCurve);
if (params->blackwhite.enabled && params->blackwhite.autoc && abwListener) { if (params->blackwhite.enabled && params->blackwhite.autoc && abwListener) {
@ -814,17 +865,214 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
wavcontlutili = false; wavcontlutili = false;
CurveFactory::curveWavContL(wavcontlutili, params->wavelet.wavclCurve, wavclCurve, scale == 1 ? 1 : 16); CurveFactory::curveWavContL(wavcontlutili, params->wavelet.wavclCurve, wavclCurve, scale == 1 ? 1 : 16);
if ((params->wavelet.enabled)) { if ((params->wavelet.enabled)) {
WaveletParams WaveParams = params->wavelet; WaveletParams WaveParams = params->wavelet;
WaveParams.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); WaveParams.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL);
int kall = 0; int kall = 0;
LabImage *unshar = nullptr;
Glib::ustring provis;
LabImage *provradius = nullptr;
bool procont = WaveParams.expcontrast;
bool prochro = WaveParams.expchroma;
bool proedge = WaveParams.expedge;
bool profin = WaveParams.expfinal;
bool proton = WaveParams.exptoning;
bool pronois = WaveParams.expnoise;
if(WaveParams.showmask) {
// WaveParams.showmask = false;
// WaveParams.expclari = true;
}
if (WaveParams.softrad > 0.f) {
provradius = new LabImage(pW, pH);
provradius->CopyFrom(nprevl);
}
if ((WaveParams.ushamethod == "sharp" || WaveParams.ushamethod == "clari") && WaveParams.expclari && WaveParams.CLmethod != "all") {
unshar = new LabImage(pW, pH);
provis = params->wavelet.CLmethod;
params->wavelet.CLmethod = "all";
ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, scale);
unshar->CopyFrom(nprevl);
params->wavelet.CLmethod = provis;
WaveParams.expcontrast = false;
WaveParams.expchroma = false;
WaveParams.expedge = false;
WaveParams.expfinal = false;
WaveParams.exptoning = false;
WaveParams.expnoise = false;
}
ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, scale); ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, scale);
if ((WaveParams.ushamethod == "sharp" || WaveParams.ushamethod == "clari") && WaveParams.expclari && WaveParams.CLmethod != "all") {
WaveParams.expcontrast = procont;
WaveParams.expchroma = prochro;
WaveParams.expedge = proedge;
WaveParams.expfinal = profin;
WaveParams.exptoning = proton;
WaveParams.expnoise = pronois;
if (WaveParams.softrad > 0.f) {
array2D<float> ble(pW, pH);
array2D<float> guid(pW, pH);
Imagefloat *tmpImage = nullptr;
tmpImage = new Imagefloat(pW, pH);
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int ir = 0; ir < pH; ir++)
for (int jr = 0; jr < pW; jr++) {
float X, Y, Z;
float L = provradius->L[ir][jr];
float a = provradius->a[ir][jr];
float b = provradius->b[ir][jr];
Color::Lab2XYZ(L, a, b, X, Y, Z);
guid[ir][jr] = Y / 32768.f;
float La = nprevl->L[ir][jr];
float aa = nprevl->a[ir][jr];
float ba = nprevl->b[ir][jr];
Color::Lab2XYZ(La, aa, ba, X, Y, Z);
tmpImage->r(ir, jr) = X;
tmpImage->g(ir, jr) = Y;
tmpImage->b(ir, jr) = Z;
ble[ir][jr] = Y / 32768.f;
}
double epsilmax = 0.0001;
double epsilmin = 0.00001;
double aepsil = (epsilmax - epsilmin) / 90.f;
double bepsil = epsilmax - 100.f * aepsil;
double epsil = aepsil * WaveParams.softrad + bepsil;
float blur = 10.f / scale * (0.0001f + 0.8f * WaveParams.softrad);
// rtengine::guidedFilter(guid, ble, ble, blur, 0.001, multiTh);
rtengine::guidedFilter(guid, ble, ble, blur, epsil, false);
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int ir = 0; ir < pH; ir++)
for (int jr = 0; jr < pW; jr++) {
float X = tmpImage->r(ir, jr);
float Y = 32768.f * ble[ir][jr];
float Z = tmpImage->b(ir, jr);
float L, a, b;
Color::XYZ2Lab(X, Y, Z, L, a, b);
nprevl->L[ir][jr] = L;
}
delete tmpImage;
}
}
if ((WaveParams.ushamethod == "sharp" || WaveParams.ushamethod == "clari") && WaveParams.expclari && WaveParams.CLmethod != "all") {
float mL = (float)(WaveParams.mergeL / 100.f);
float mC = (float)(WaveParams.mergeC / 100.f);
float mL0;
float mC0;
float background = 0.f;
int show = 0;
if ((WaveParams.CLmethod == "one" || WaveParams.CLmethod == "inf") && WaveParams.Backmethod == "black") {
mL0 = mC0 = 0.f;
mL = - 1.5f * mL;
mC = -mC;
background = 12000.f;
show = 0;
} else if (WaveParams.CLmethod == "sup" && WaveParams.Backmethod == "resid") {
mL0 = mL;
mC0 = mC;
background = 0.f;
show = 0;
} else {
mL0 = mL = mC0 = mC = 0.f;
background = 0.f;
show = 0;
}
float indic = 1.f;
if(WaveParams.showmask){
mL0 = mC0 = -1.f;
indic = -1.f;
mL = fabs(mL);
mC = fabs(mC);
show = 1;
}
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int x = 0; x < pH; x++)
for (int y = 0; y < pW; y++) {
nprevl->L[x][y] = LIM((1.f + mL0) * (unshar->L[x][y]) + show * background - mL * indic * nprevl->L[x][y], 0.f, 32768.f);
nprevl->a[x][y] = (1.f + mC0) * (unshar->a[x][y]) - mC * indic * nprevl->a[x][y];
nprevl->b[x][y] = (1.f + mC0) * (unshar->b[x][y]) - mC * indic * nprevl->b[x][y];
}
delete unshar;
unshar = NULL;
/*
if (WaveParams.softrad > 0.f) {
array2D<float> ble(pW, pH);
array2D<float> guid(pW, pH);
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int ir = 0; ir < pH; ir++)
for (int jr = 0; jr < pW; jr++) {
ble[ir][jr] = (nprevl->L[ir][jr] - provradius->L[ir][jr]) / 32768.f;
guid[ir][jr] = provradius->L[ir][jr] / 32768.f;
}
double epsilmax = 0.001;
double epsilmin = 0.0001;
double aepsil = (epsilmax - epsilmin) / 90.f;
double bepsil = epsilmax - 100.f * aepsil;
double epsil = aepsil * WaveParams.softrad + bepsil;
float blur = 10.f / scale * (0.001f + 0.8f * WaveParams.softrad);
// rtengine::guidedFilter(guid, ble, ble, blur, 0.001, multiTh);
rtengine::guidedFilter(guid, ble, ble, blur, epsil, false);
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int ir = 0; ir < pH; ir++)
for (int jr = 0; jr < pW; jr++) {
nprevl->L[ir][jr] = provradius->L[ir][jr] + 32768.f * ble[ir][jr];
}
}
*/
if (WaveParams.softrad > 0.f) {
delete provradius;
provradius = NULL;
}
}
} }
ipf.softLight(nprevl); ipf.softLight(nprevl);
if (params->colorappearance.enabled) { if (params->colorappearance.enabled) {
// L histo and Chroma histo for ciecam // L histo and Chroma histo for ciecam
@ -897,17 +1145,22 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
ipf.ciecam_02float(ncie, float (adap), pW, 2, nprevl, params.get(), customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 0 , scale, execsharp, d, dj, yb, 1); ipf.ciecam_02float(ncie, float (adap), pW, 2, nprevl, params.get(), customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 0 , scale, execsharp, d, dj, yb, 1);
if ((params->colorappearance.autodegree || params->colorappearance.autodegreeout) && acListener && params->colorappearance.enabled) { if ((params->colorappearance.autodegree || params->colorappearance.autodegreeout) && acListener && params->colorappearance.enabled && !params->colorappearance.presetcat02) {
acListener->autoCamChanged(100.* (double)d, 100.* (double)dj); acListener->autoCamChanged(100.* (double)d, 100.* (double)dj);
} }
if (params->colorappearance.autoadapscen && acListener && params->colorappearance.enabled) { if (params->colorappearance.autoadapscen && acListener && params->colorappearance.enabled && !params->colorappearance.presetcat02) {
acListener->adapCamChanged(adap); //real value of adapt scene acListener->adapCamChanged(adap); //real value of adapt scene
} }
if (params->colorappearance.autoybscen && acListener && params->colorappearance.enabled) { if (params->colorappearance.autoybscen && acListener && params->colorappearance.enabled && !params->colorappearance.presetcat02) {
acListener->ybCamChanged((int) yb); //real value Yb scene acListener->ybCamChanged((int) yb); //real value Yb scene
} }
if (params->colorappearance.enabled && params->colorappearance.presetcat02 && params->colorappearance.autotempout) {
acListener->wbCamChanged(params->wb.temperature, params->wb.green); //real temp and tint
}
} else { } else {
// CIECAM is disabled, we free up its image buffer to save some space // CIECAM is disabled, we free up its image buffer to save some space
if (ncie) { if (ncie) {
@ -976,6 +1229,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
hListener->histogramChanged(histRed, histGreen, histBlue, histLuma, histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRedRaw, histGreenRaw, histBlueRaw, histChroma, histLRETI); hListener->histogramChanged(histRed, histGreen, histBlue, histLuma, histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRedRaw, histGreenRaw, histBlueRaw, histChroma, histLRETI);
} }
} }
if (orig_prev != oprevi) { if (orig_prev != oprevi) {
delete oprevi; delete oprevi;
oprevi = nullptr; oprevi = nullptr;
@ -1137,18 +1391,27 @@ bool ImProcCoordinator::getAutoWB(double& temp, double& green, double equal, dou
{ {
if (imgsrc) { if (imgsrc) {
if (lastAwbEqual != equal || lastAwbTempBias != tempBias) { if (lastAwbEqual != equal || lastAwbTempBias != tempBias || lastAwbauto != params->wb.method) {
// Issue 2500 MyMutex::MyLock lock(minit); // Also used in crop window // Issue 2500 MyMutex::MyLock lock(minit); // Also used in crop window
double rm, gm, bm; double rm, gm, bm;
imgsrc->getAutoWBMultipliers(rm, gm, bm); params->wb.method = "autold";//same result as before muliple Auto WB
// imgsrc->getAutoWBMultipliers(rm, gm, bm);
double tempitc = 5000.;
double greenitc = 1.;
float studgood = 1000.f;
double tempref, greenref;
imgsrc->getAutoWBMultipliersitc(tempref, greenref, tempitc, greenitc, studgood, 0, 0, fh, fw, 0, 0, fh, fw, rm, gm, bm, params->wb, params->icm, params->raw);
if (rm != -1) { if (rm != -1) {
autoWB.update(rm, gm, bm, equal, tempBias); autoWB.update(rm, gm, bm, equal, tempBias);
lastAwbEqual = equal; lastAwbEqual = equal;
lastAwbTempBias = tempBias; lastAwbTempBias = tempBias;
lastAwbauto = params->wb.method;
} else { } else {
lastAwbEqual = -1.; lastAwbEqual = -1.;
autoWB.useDefaults(equal); autoWB.useDefaults(equal);
lastAwbauto = "";
lastAwbTempBias = 0.0; lastAwbTempBias = 0.0;
} }
} }
@ -1323,7 +1586,7 @@ void ImProcCoordinator::saveInputICCReference(const Glib::ustring& fname, bool a
if (params->wb.method == "Camera") { if (params->wb.method == "Camera") {
currWB = imgsrc->getWB(); currWB = imgsrc->getWB();
} else if (params->wb.method == "Auto") { } else if (params->wb.method == "autold") {
if (lastAwbEqual != params->wb.equal || lastAwbTempBias != params->wb.tempBias) { if (lastAwbEqual != params->wb.equal || lastAwbTempBias != params->wb.tempBias) {
double rm, gm, bm; double rm, gm, bm;
imgsrc->getAutoWBMultipliers(rm, gm, bm); imgsrc->getAutoWBMultipliers(rm, gm, bm);

View File

@ -73,9 +73,13 @@ protected:
ColorTemp currWB; ColorTemp currWB;
ColorTemp autoWB; ColorTemp autoWB;
ColorTemp currWBloc;
ColorTemp autoWBloc;
ColorTemp currWBitc;
double lastAwbEqual; double lastAwbEqual;
double lastAwbTempBias; double lastAwbTempBias;
Glib::ustring lastAwbauto;
Glib::ustring monitorProfile; Glib::ustring monitorProfile;
RenderingIntent monitorIntent; RenderingIntent monitorIntent;

View File

@ -3658,7 +3658,8 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
delete vCurve; delete vCurve;
} }
shadowsHighlights(lab); // shadowsHighlights(lab);
shadowsHighlights(lab, params->sh.enabled, params->sh.lab,params->sh.highlights ,params->sh.shadows, params->sh.radius, scale, params->sh.htonalwidth, params->sh.stonalwidth);
if (params->localContrast.enabled) { if (params->localContrast.enabled) {
// Alberto's local contrast // Alberto's local contrast

View File

@ -200,29 +200,29 @@ public:
int pitch, int scale, const int luma, const int chroma/*, LUTf & Lcurve, LUTf & abcurve*/); int pitch, int scale, const int luma, const int chroma/*, LUTf & Lcurve, LUTf & abcurve*/);
void Tile_calc(int tilesize, int overlap, int kall, int imwidth, int imheight, int &numtiles_W, int &numtiles_H, int &tilewidth, int &tileheight, int &tileWskip, int &tileHskip); void Tile_calc(int tilesize, int overlap, int kall, int imwidth, int imheight, int &numtiles_W, int &numtiles_H, int &tilewidth, int &tileheight, int &tileWskip, int &tileHskip);
void ip_wavelet(LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, LUTf &wavclCurve, int skip); void ip_wavelet(LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, const LUTf &wavclCurve, int skip);
void WaveletcontAllL(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_L, void WaveletcontAllL(LabImage * lab, float **varhue, float **varchrom, const wavelet_decomposition &WaveletCoeffs_L,
struct cont_params &cp, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* ChCurve, bool Chutili); struct cont_params &cp, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* ChCurve, bool Chutili);
void WaveletcontAllLfinal(wavelet_decomposition &WaveletCoeffs_L, struct cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL); void WaveletcontAllLfinal(const wavelet_decomposition &WaveletCoeffs_L, const cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
void WaveletcontAllAB(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, const WavOpacityCurveW & waOpacityCurveW, void WaveletcontAllAB(LabImage * lab, float **varhue, float **varchrom, const wavelet_decomposition &WaveletCoeffs_a, const WavOpacityCurveW & waOpacityCurveW,
struct cont_params &cp, const bool useChannelA); struct cont_params &cp, const bool useChannelA);
void WaveletAandBAllAB(wavelet_decomposition &WaveletCoeffs_a, wavelet_decomposition &WaveletCoeffs_b, void WaveletAandBAllAB(const wavelet_decomposition &WaveletCoeffs_a, const wavelet_decomposition &WaveletCoeffs_b,
struct cont_params &cp, FlatCurve* hhcurve, bool hhutili); const cont_params &cp, FlatCurve* hhcurve, bool hhutili);
void ContAllL(float **koeLi, float *maxkoeLi, bool lipschitz, int maxlvl, LabImage * lab, float **varhue, float **varchrom, float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp, void ContAllL(float **koeLi, float *maxkoeLi, bool lipschitz, int maxlvl, LabImage * lab, float **varhue, float **varchrom, float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp,
int W_L, int H_L, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* ChCurve, bool Chutili); int W_L, int H_L, int skip, float *mean, float *sigma, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* ChCurve, bool Chutili);
void finalContAllL(float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp, void finalContAllL(float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, const cont_params &cp,
int W_L, int H_L, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL); int W_L, int H_L, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL);
void ContAllAB(LabImage * lab, int maxlvl, float **varhue, float **varchrom, float ** WavCoeffs_a, float * WavCoeffs_a0, int level, int dir, const WavOpacityCurveW & waOpacityCurveW, struct cont_params &cp, void ContAllAB(LabImage * lab, int maxlvl, float **varhue, float **varchrom, float ** WavCoeffs_a, float * WavCoeffs_a0, int level, int dir, const WavOpacityCurveW & waOpacityCurveW, struct cont_params &cp,
int W_ab, int H_ab, const bool useChannelA); int W_ab, int H_ab, const bool useChannelA);
void Evaluate2(wavelet_decomposition &WaveletCoeffs_L, void Evaluate2(const wavelet_decomposition &WaveletCoeffs_L,
float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN); float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN);
void Eval2(float ** WavCoeffs_L, int level, void Eval2(float ** WavCoeffs_L, int level,
int W_L, int H_L, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN); int W_L, int H_L, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN);
void Aver(float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min); void Aver(float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min);
void Sigma(float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg); void Sigma(float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg);
void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr); void calckoe(float ** WavCoeffs_LL, const cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr);
@ -270,7 +270,8 @@ public:
void ToneMapFattal02(Imagefloat *rgb); void ToneMapFattal02(Imagefloat *rgb);
void localContrast(LabImage *lab); void localContrast(LabImage *lab);
void colorToningLabGrid(LabImage *lab, int xstart, int xend, int ystart, int yend, bool MultiThread); void colorToningLabGrid(LabImage *lab, int xstart, int xend, int ystart, int yend, bool MultiThread);
void shadowsHighlights(LabImage *lab); //void shadowsHighlights(LabImage *lab);
void shadowsHighlights(LabImage *lab, bool ena, int labmode, int hightli, int shado, int rad, int scal, int hltonal, int shtonal);
void softLight(LabImage *lab); void softLight(LabImage *lab);
void labColorCorrectionRegions(LabImage *lab); void labColorCorrectionRegions(LabImage *lab);

View File

@ -31,22 +31,22 @@
#include "procparams.h" #include "procparams.h"
#include "sleef.h" #include "sleef.h"
namespace rtengine namespace rtengine {
//modifications to pass parameters needs by locallab, to avoid 2 functions - no change in process - J.Desmis march 2019
void ImProcFunctions::shadowsHighlights(LabImage *lab, bool ena, int labmode, int hightli, int shado, int rad, int scal, int hltonal, int shtonal)
{ {
if (!ena || (!hightli && !shado)){
void ImProcFunctions::shadowsHighlights(LabImage *lab)
{
if (!params->sh.enabled || (!params->sh.highlights && !params->sh.shadows)){
return; return;
} }
const int width = lab->W; const int width = lab->W;
const int height = lab->H; const int height = lab->H;
const bool lab_mode = params->sh.lab; const bool lab_mode = labmode;
array2D<float> mask(width, height); array2D<float> mask(width, height);
array2D<float> L(width, height); array2D<float> L(width, height);
const float radius = params->sh.radius * 10 / scale; // const float radius = params->sh.radius * 10 / scale;
const float radius = float(rad) * 10 / scal;
LUTf f(lab_mode ? 32768 : 65536); LUTf f(lab_mode ? 32768 : 65536);
TMatrix ws = ICCStore::getInstance()->workingSpaceMatrix(params->icm.workingProfile); TMatrix ws = ICCStore::getInstance()->workingSpaceMatrix(params->icm.workingProfile);
@ -193,12 +193,12 @@ void ImProcFunctions::shadowsHighlights(LabImage *lab)
} }
}; };
if (params->sh.highlights > 0) { if (hightli > 0) {
apply(params->sh.highlights * 0.7, params->sh.htonalwidth, true); apply(hightli * 0.7, hltonal, true);
} }
if (params->sh.shadows > 0) { if (shado > 0) {
apply(params->sh.shadows * 0.6, params->sh.stonalwidth, false); apply(shado * 0.6, shtonal, false);
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1305,9 +1305,12 @@ bool WBParams::operator !=(const WBParams& other) const
const std::vector<WBEntry>& WBParams::getWbEntries() const std::vector<WBEntry>& WBParams::getWbEntries()
{ {
static const std::vector<WBEntry> wb_entries = { static const std::vector<WBEntry> wb_entries = {
{"Camera", WBEntry::Type::CAMERA, M("TP_WBALANCE_CAMERA"), 0, 1.f, 1.f, 0.f}, {"Camera", WBEntry::Type::CAMERA, M("TP_WBALANCE_CAMERA"), 0, 1.f, 1.f, 0.f},
{"Auto", WBEntry::Type::AUTO, M("TP_WBALANCE_AUTO"), 0, 1.f, 1.f, 0.f}, {"autitcgreen", WBEntry::Type::AUTO, M("TP_WBALANCE_AUTOITCGREEN"), 0, 1.f, 1.f, 0.f},
{"autold", WBEntry::Type::AUTO, M("TP_WBALANCE_AUTOOLD"), 0, 1.f, 1.f, 0.f},
{"Daylight", WBEntry::Type::DAYLIGHT, M("TP_WBALANCE_DAYLIGHT"), 5300, 1.f, 1.f, 0.f}, {"Daylight", WBEntry::Type::DAYLIGHT, M("TP_WBALANCE_DAYLIGHT"), 5300, 1.f, 1.f, 0.f},
{"Cloudy", WBEntry::Type::CLOUDY, M("TP_WBALANCE_CLOUDY"), 6200, 1.f, 1.f, 0.f}, {"Cloudy", WBEntry::Type::CLOUDY, M("TP_WBALANCE_CLOUDY"), 6200, 1.f, 1.f, 0.f},
{"Shade", WBEntry::Type::SHADE, M("TP_WBALANCE_SHADE"), 7600, 1.f, 1.f, 0.f}, {"Shade", WBEntry::Type::SHADE, M("TP_WBALANCE_SHADE"), 7600, 1.f, 1.f, 0.f},
@ -1341,7 +1344,6 @@ const std::vector<WBEntry>& WBParams::getWbEntries()
// Should remain the last one // Should remain the last one
{"Custom", WBEntry::Type::CUSTOM, M("TP_WBALANCE_CUSTOM"), 0, 1.f, 1.f, 0.f} {"Custom", WBEntry::Type::CUSTOM, M("TP_WBALANCE_CUSTOM"), 0, 1.f, 1.f, 0.f}
}; };
return wb_entries; return wb_entries;
} }
@ -1387,10 +1389,12 @@ ColorAppearanceParams::ColorAppearanceParams() :
datacie(false), datacie(false),
tonecie(false), tonecie(false),
tempout(5000), tempout(5000),
autotempout(true),
ybout(18), ybout(18),
greenout(1.0), greenout(1.0),
tempsc(5000), tempsc(5000),
greensc(1.0) greensc(1.0),
presetcat02(false)
{ {
} }
@ -1432,10 +1436,12 @@ bool ColorAppearanceParams::operator ==(const ColorAppearanceParams& other) cons
&& datacie == other.datacie && datacie == other.datacie
&& tonecie == other.tonecie && tonecie == other.tonecie
&& tempout == other.tempout && tempout == other.tempout
&& autotempout == other.autotempout
&& ybout == other.ybout && ybout == other.ybout
&& greenout == other.greenout && greenout == other.greenout
&& tempsc == other.tempsc && tempsc == other.tempsc
&& greensc == other.greensc; && greensc == other.greensc
&& presetcat02 == other.presetcat02;
} }
bool ColorAppearanceParams::operator !=(const ColorAppearanceParams& other) const bool ColorAppearanceParams::operator !=(const ColorAppearanceParams& other) const
@ -2228,8 +2234,13 @@ WaveletParams::WaveletParams() :
bluemed(0), bluemed(0),
greenhigh(0), greenhigh(0),
bluehigh(0), bluehigh(0),
mergeL(40.),
mergeC(20.),
softrad(0.),
softradend(0.),
lipst(false), lipst(false),
avoid(false), avoid(false),
showmask(false),
tmr(false), tmr(false),
strength(100), strength(100),
balance(0), balance(0),
@ -2243,6 +2254,7 @@ WaveletParams::WaveletParams() :
expfinal(false), expfinal(false),
exptoning(false), exptoning(false),
expnoise(false), expnoise(false),
expclari(false),
Lmethod(4), Lmethod(4),
CLmethod("all"), CLmethod("all"),
Backmethod("grey"), Backmethod("grey"),
@ -2250,6 +2262,7 @@ WaveletParams::WaveletParams() :
daubcoeffmethod("4_"), daubcoeffmethod("4_"),
CHmethod("without"), CHmethod("without"),
Medgreinf("less"), Medgreinf("less"),
ushamethod("clari"),
CHSLmethod("SL"), CHSLmethod("SL"),
EDmethod("CU"), EDmethod("CU"),
NPmethod("none"), NPmethod("none"),
@ -2257,10 +2270,13 @@ WaveletParams::WaveletParams() :
TMmethod("cont"), TMmethod("cont"),
Dirmethod("all"), Dirmethod("all"),
HSmethod("with"), HSmethod("with"),
sigma(1.0),
rescon(0), rescon(0),
resconH(0), resconH(0),
reschro(0), reschro(0),
tmrs(0), tmrs(0),
edgs(1.4),
scale(1.),
gamma(1), gamma(1),
sup(0), sup(0),
sky(0.0), sky(0.0),
@ -2278,8 +2294,9 @@ WaveletParams::WaveletParams() :
edgrad(15), edgrad(15),
edgval(0), edgval(0),
edgthresh(10), edgthresh(10),
thr(35), thr(30),
thrH(65), thrH(70),
radius(40),
skinprotect(0.0), skinprotect(0.0),
hueskin(-5, 25, 170, 120, false), hueskin(-5, 25, 170, 120, false),
hueskin2(-260, -250, -130, -140, false), hueskin2(-260, -250, -130, -140, false),
@ -2317,8 +2334,13 @@ bool WaveletParams::operator ==(const WaveletParams& other) const
&& bluemed == other.bluemed && bluemed == other.bluemed
&& greenhigh == other.greenhigh && greenhigh == other.greenhigh
&& bluehigh == other.bluehigh && bluehigh == other.bluehigh
&& mergeL == other.mergeL
&& mergeC == other.mergeC
&& softrad == other.softrad
&& softradend == other.softradend
&& lipst == other.lipst && lipst == other.lipst
&& avoid == other.avoid && avoid == other.avoid
&& showmask == other.showmask
&& tmr == other.tmr && tmr == other.tmr
&& strength == other.strength && strength == other.strength
&& balance == other.balance && balance == other.balance
@ -2337,6 +2359,7 @@ bool WaveletParams::operator ==(const WaveletParams& other) const
&& expedge == other.expedge && expedge == other.expedge
&& expresid == other.expresid && expresid == other.expresid
&& expfinal == other.expfinal && expfinal == other.expfinal
&& expclari == other.expclari
&& exptoning == other.exptoning && exptoning == other.exptoning
&& expnoise == other.expnoise && expnoise == other.expnoise
&& Lmethod == other.Lmethod && Lmethod == other.Lmethod
@ -2346,6 +2369,7 @@ bool WaveletParams::operator ==(const WaveletParams& other) const
&& daubcoeffmethod == other.daubcoeffmethod && daubcoeffmethod == other.daubcoeffmethod
&& CHmethod == other.CHmethod && CHmethod == other.CHmethod
&& Medgreinf == other.Medgreinf && Medgreinf == other.Medgreinf
&& ushamethod == other.ushamethod
&& CHSLmethod == other.CHSLmethod && CHSLmethod == other.CHSLmethod
&& EDmethod == other.EDmethod && EDmethod == other.EDmethod
&& NPmethod == other.NPmethod && NPmethod == other.NPmethod
@ -2353,10 +2377,13 @@ bool WaveletParams::operator ==(const WaveletParams& other) const
&& TMmethod == other.TMmethod && TMmethod == other.TMmethod
&& Dirmethod == other.Dirmethod && Dirmethod == other.Dirmethod
&& HSmethod == other.HSmethod && HSmethod == other.HSmethod
&& sigma == other.sigma
&& rescon == other.rescon && rescon == other.rescon
&& resconH == other.resconH && resconH == other.resconH
&& reschro == other.reschro && reschro == other.reschro
&& tmrs == other.tmrs && tmrs == other.tmrs
&& edgs == other.edgs
&& scale == other.scale
&& gamma == other.gamma && gamma == other.gamma
&& sup == other.sup && sup == other.sup
&& sky == other.sky && sky == other.sky
@ -2376,6 +2403,7 @@ bool WaveletParams::operator ==(const WaveletParams& other) const
&& edgthresh == other.edgthresh && edgthresh == other.edgthresh
&& thr == other.thr && thr == other.thr
&& thrH == other.thrH && thrH == other.thrH
&& radius == other.radius
&& skinprotect == other.skinprotect && skinprotect == other.skinprotect
&& hueskin == other.hueskin && hueskin == other.hueskin
&& hueskin2 == other.hueskin2 && hueskin2 == other.hueskin2
@ -3226,12 +3254,14 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->colorappearance.surrsource, "Color appearance", "SurrSource", colorappearance.surrsource, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.surrsource, "Color appearance", "SurrSource", colorappearance.surrsource, keyFile);
saveToKeyfile(!pedited || pedited->colorappearance.gamut, "Color appearance", "Gamut", colorappearance.gamut, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.gamut, "Color appearance", "Gamut", colorappearance.gamut, keyFile);
saveToKeyfile(!pedited || pedited->colorappearance.tempout, "Color appearance", "Tempout", colorappearance.tempout, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.tempout, "Color appearance", "Tempout", colorappearance.tempout, keyFile);
saveToKeyfile(!pedited || pedited->colorappearance.autotempout, "Color appearance", "Autotempout", colorappearance.autotempout, keyFile);
saveToKeyfile(!pedited || pedited->colorappearance.greenout, "Color appearance", "Greenout", colorappearance.greenout, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.greenout, "Color appearance", "Greenout", colorappearance.greenout, keyFile);
saveToKeyfile(!pedited || pedited->colorappearance.tempsc, "Color appearance", "Tempsc", colorappearance.tempsc, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.tempsc, "Color appearance", "Tempsc", colorappearance.tempsc, keyFile);
saveToKeyfile(!pedited || pedited->colorappearance.greensc, "Color appearance", "Greensc", colorappearance.greensc, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.greensc, "Color appearance", "Greensc", colorappearance.greensc, keyFile);
saveToKeyfile(!pedited || pedited->colorappearance.ybout, "Color appearance", "Ybout", colorappearance.ybout, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.ybout, "Color appearance", "Ybout", colorappearance.ybout, keyFile);
saveToKeyfile(!pedited || pedited->colorappearance.datacie, "Color appearance", "Datacie", colorappearance.datacie, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.datacie, "Color appearance", "Datacie", colorappearance.datacie, keyFile);
saveToKeyfile(!pedited || pedited->colorappearance.tonecie, "Color appearance", "Tonecie", colorappearance.tonecie, keyFile); saveToKeyfile(!pedited || pedited->colorappearance.tonecie, "Color appearance", "Tonecie", colorappearance.tonecie, keyFile);
saveToKeyfile(!pedited || pedited->colorappearance.presetcat02, "Color appearance", "Presetcat02", colorappearance.presetcat02, keyFile);
const std::map<ColorAppearanceParams::TcMode, const char*> ca_mapping = { const std::map<ColorAppearanceParams::TcMode, const char*> ca_mapping = {
{ColorAppearanceParams::TcMode::LIGHT, "Lightness"}, {ColorAppearanceParams::TcMode::LIGHT, "Lightness"},
@ -3477,6 +3507,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->wavelet.bluehigh, "Wavelet", "CBbluehigh", wavelet.bluehigh, keyFile); saveToKeyfile(!pedited || pedited->wavelet.bluehigh, "Wavelet", "CBbluehigh", wavelet.bluehigh, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.bluemed, "Wavelet", "CBbluemed", wavelet.bluemed, keyFile); saveToKeyfile(!pedited || pedited->wavelet.bluemed, "Wavelet", "CBbluemed", wavelet.bluemed, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.bluelow, "Wavelet", "CBbluelow", wavelet.bluelow, keyFile); saveToKeyfile(!pedited || pedited->wavelet.bluelow, "Wavelet", "CBbluelow", wavelet.bluelow, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.mergeL, "Wavelet", "MergeL", wavelet.mergeL, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.mergeC, "Wavelet", "MergeC", wavelet.mergeC, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.softrad, "Wavelet", "Softrad", wavelet.softrad, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.softradend, "Wavelet", "Softradend", wavelet.softradend, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.expcontrast, "Wavelet", "Expcontrast", wavelet.expcontrast, keyFile); saveToKeyfile(!pedited || pedited->wavelet.expcontrast, "Wavelet", "Expcontrast", wavelet.expcontrast, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.expchroma, "Wavelet", "Expchroma", wavelet.expchroma, keyFile); saveToKeyfile(!pedited || pedited->wavelet.expchroma, "Wavelet", "Expchroma", wavelet.expchroma, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.expedge, "Wavelet", "Expedge", wavelet.expedge, keyFile); saveToKeyfile(!pedited || pedited->wavelet.expedge, "Wavelet", "Expedge", wavelet.expedge, keyFile);
@ -3484,6 +3518,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->wavelet.expfinal, "Wavelet", "Expfinal", wavelet.expfinal, keyFile); saveToKeyfile(!pedited || pedited->wavelet.expfinal, "Wavelet", "Expfinal", wavelet.expfinal, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.exptoning, "Wavelet", "Exptoning", wavelet.exptoning, keyFile); saveToKeyfile(!pedited || pedited->wavelet.exptoning, "Wavelet", "Exptoning", wavelet.exptoning, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.expnoise, "Wavelet", "Expnoise", wavelet.expnoise, keyFile); saveToKeyfile(!pedited || pedited->wavelet.expnoise, "Wavelet", "Expnoise", wavelet.expnoise, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.expclari, "Wavelet", "Expclari", wavelet.expclari, keyFile);
for (int i = 0; i < 9; i++) { for (int i = 0; i < 9; i++) {
std::stringstream ss; std::stringstream ss;
@ -3518,6 +3553,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->wavelet.chroma, "Wavelet", "ThresholdChroma", wavelet.chroma, keyFile); saveToKeyfile(!pedited || pedited->wavelet.chroma, "Wavelet", "ThresholdChroma", wavelet.chroma, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.CHmethod, "Wavelet", "CHromaMethod", wavelet.CHmethod, keyFile); saveToKeyfile(!pedited || pedited->wavelet.CHmethod, "Wavelet", "CHromaMethod", wavelet.CHmethod, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.Medgreinf, "Wavelet", "Medgreinf", wavelet.Medgreinf, keyFile); saveToKeyfile(!pedited || pedited->wavelet.Medgreinf, "Wavelet", "Medgreinf", wavelet.Medgreinf, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.ushamethod, "Wavelet", "Ushamethod", wavelet.ushamethod, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.CHSLmethod, "Wavelet", "CHSLromaMethod", wavelet.CHSLmethod, keyFile); saveToKeyfile(!pedited || pedited->wavelet.CHSLmethod, "Wavelet", "CHSLromaMethod", wavelet.CHSLmethod, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.EDmethod, "Wavelet", "EDMethod", wavelet.EDmethod, keyFile); saveToKeyfile(!pedited || pedited->wavelet.EDmethod, "Wavelet", "EDMethod", wavelet.EDmethod, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.NPmethod, "Wavelet", "NPMethod", wavelet.NPmethod, keyFile); saveToKeyfile(!pedited || pedited->wavelet.NPmethod, "Wavelet", "NPMethod", wavelet.NPmethod, keyFile);
@ -3545,13 +3581,18 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->wavelet.edgval, "Wavelet", "Edgval", wavelet.edgval, keyFile); saveToKeyfile(!pedited || pedited->wavelet.edgval, "Wavelet", "Edgval", wavelet.edgval, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.edgthresh, "Wavelet", "ThrEdg", wavelet.edgthresh, keyFile); saveToKeyfile(!pedited || pedited->wavelet.edgthresh, "Wavelet", "ThrEdg", wavelet.edgthresh, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.avoid, "Wavelet", "AvoidColorShift", wavelet.avoid, keyFile); saveToKeyfile(!pedited || pedited->wavelet.avoid, "Wavelet", "AvoidColorShift", wavelet.avoid, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.showmask, "Wavelet", "Showmask", wavelet.showmask, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.tmr, "Wavelet", "TMr", wavelet.tmr, keyFile); saveToKeyfile(!pedited || pedited->wavelet.tmr, "Wavelet", "TMr", wavelet.tmr, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.sigma, "Wavelet", "Sigma", wavelet.sigma, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.rescon, "Wavelet", "ResidualcontShadow", wavelet.rescon, keyFile); saveToKeyfile(!pedited || pedited->wavelet.rescon, "Wavelet", "ResidualcontShadow", wavelet.rescon, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.resconH, "Wavelet", "ResidualcontHighlight", wavelet.resconH, keyFile); saveToKeyfile(!pedited || pedited->wavelet.resconH, "Wavelet", "ResidualcontHighlight", wavelet.resconH, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.thr, "Wavelet", "ThresholdResidShadow", wavelet.thr, keyFile); saveToKeyfile(!pedited || pedited->wavelet.thr, "Wavelet", "ThresholdResidShadow", wavelet.thr, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.thrH, "Wavelet", "ThresholdResidHighLight", wavelet.thrH, keyFile); saveToKeyfile(!pedited || pedited->wavelet.thrH, "Wavelet", "ThresholdResidHighLight", wavelet.thrH, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.radius, "Wavelet", "Residualradius", wavelet.radius, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.reschro, "Wavelet", "Residualchroma", wavelet.reschro, keyFile); saveToKeyfile(!pedited || pedited->wavelet.reschro, "Wavelet", "Residualchroma", wavelet.reschro, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.tmrs, "Wavelet", "ResidualTM", wavelet.tmrs, keyFile); saveToKeyfile(!pedited || pedited->wavelet.tmrs, "Wavelet", "ResidualTM", wavelet.tmrs, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.edgs, "Wavelet", "ResidualEDGS", wavelet.edgs, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.scale, "Wavelet", "ResidualSCALE", wavelet.scale, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.gamma, "Wavelet", "Residualgamma", wavelet.gamma, keyFile); saveToKeyfile(!pedited || pedited->wavelet.gamma, "Wavelet", "Residualgamma", wavelet.gamma, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.sky, "Wavelet", "HueRangeResidual", wavelet.sky, keyFile); saveToKeyfile(!pedited || pedited->wavelet.sky, "Wavelet", "HueRangeResidual", wavelet.sky, keyFile);
saveToKeyfile(!pedited || pedited->wavelet.hueskin2, "Wavelet", "HueRange", wavelet.hueskin2.toVector(), keyFile); saveToKeyfile(!pedited || pedited->wavelet.hueskin2, "Wavelet", "HueRange", wavelet.hueskin2.toVector(), keyFile);
@ -4151,10 +4192,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Vibrance", "PastSatTog", pedited, vibrance.pastsattog, pedited->vibrance.pastsattog); assignFromKeyfile(keyFile, "Vibrance", "PastSatTog", pedited, vibrance.pastsattog, pedited->vibrance.pastsattog);
assignFromKeyfile(keyFile, "Vibrance", "SkinTonesCurve", pedited, vibrance.skintonescurve, pedited->vibrance.skintonescurve); assignFromKeyfile(keyFile, "Vibrance", "SkinTonesCurve", pedited, vibrance.skintonescurve, pedited->vibrance.skintonescurve);
} }
if (keyFile.has_group("White Balance")) { if (keyFile.has_group("White Balance")) {
assignFromKeyfile(keyFile, "White Balance", "Enabled", pedited, wb.enabled, pedited->wb.enabled); assignFromKeyfile(keyFile, "White Balance", "Enabled", pedited, wb.enabled, pedited->wb.enabled);
assignFromKeyfile(keyFile, "White Balance", "Setting", pedited, wb.method, pedited->wb.method); assignFromKeyfile(keyFile, "White Balance", "Setting", pedited, wb.method, pedited->wb.method);
if (wb.method == "Auto") {
wb.method = "autold";
}
assignFromKeyfile(keyFile, "White Balance", "Temperature", pedited, wb.temperature, pedited->wb.temperature); assignFromKeyfile(keyFile, "White Balance", "Temperature", pedited, wb.temperature, pedited->wb.temperature);
assignFromKeyfile(keyFile, "White Balance", "Green", pedited, wb.green, pedited->wb.green); assignFromKeyfile(keyFile, "White Balance", "Green", pedited, wb.green, pedited->wb.green);
assignFromKeyfile(keyFile, "White Balance", "Equal", pedited, wb.equal, pedited->wb.equal); assignFromKeyfile(keyFile, "White Balance", "Equal", pedited, wb.equal, pedited->wb.equal);
@ -4210,12 +4253,14 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Color appearance", "SurrSource", pedited, colorappearance.surrsource, pedited->colorappearance.surrsource); assignFromKeyfile(keyFile, "Color appearance", "SurrSource", pedited, colorappearance.surrsource, pedited->colorappearance.surrsource);
assignFromKeyfile(keyFile, "Color appearance", "Gamut", pedited, colorappearance.gamut, pedited->colorappearance.gamut); assignFromKeyfile(keyFile, "Color appearance", "Gamut", pedited, colorappearance.gamut, pedited->colorappearance.gamut);
assignFromKeyfile(keyFile, "Color appearance", "Tempout", pedited, colorappearance.tempout, pedited->colorappearance.tempout); assignFromKeyfile(keyFile, "Color appearance", "Tempout", pedited, colorappearance.tempout, pedited->colorappearance.tempout);
assignFromKeyfile(keyFile, "Color appearance", "Autotempout", pedited, colorappearance.autotempout, pedited->colorappearance.autotempout);
assignFromKeyfile(keyFile, "Color appearance", "Greenout", pedited, colorappearance.greenout, pedited->colorappearance.greenout); assignFromKeyfile(keyFile, "Color appearance", "Greenout", pedited, colorappearance.greenout, pedited->colorappearance.greenout);
assignFromKeyfile(keyFile, "Color appearance", "Tempsc", pedited, colorappearance.tempsc, pedited->colorappearance.tempsc); assignFromKeyfile(keyFile, "Color appearance", "Tempsc", pedited, colorappearance.tempsc, pedited->colorappearance.tempsc);
assignFromKeyfile(keyFile, "Color appearance", "Greensc", pedited, colorappearance.greensc, pedited->colorappearance.greensc); assignFromKeyfile(keyFile, "Color appearance", "Greensc", pedited, colorappearance.greensc, pedited->colorappearance.greensc);
assignFromKeyfile(keyFile, "Color appearance", "Ybout", pedited, colorappearance.ybout, pedited->colorappearance.ybout); assignFromKeyfile(keyFile, "Color appearance", "Ybout", pedited, colorappearance.ybout, pedited->colorappearance.ybout);
assignFromKeyfile(keyFile, "Color appearance", "Datacie", pedited, colorappearance.datacie, pedited->colorappearance.datacie); assignFromKeyfile(keyFile, "Color appearance", "Datacie", pedited, colorappearance.datacie, pedited->colorappearance.datacie);
assignFromKeyfile(keyFile, "Color appearance", "Tonecie", pedited, colorappearance.tonecie, pedited->colorappearance.tonecie); assignFromKeyfile(keyFile, "Color appearance", "Tonecie", pedited, colorappearance.tonecie, pedited->colorappearance.tonecie);
assignFromKeyfile(keyFile, "Color appearance", "Presetcat02", pedited, colorappearance.presetcat02, pedited->colorappearance.presetcat02);
const std::map<std::string, ColorAppearanceParams::TcMode> tc_mapping = { const std::map<std::string, ColorAppearanceParams::TcMode> tc_mapping = {
{"Lightness", ColorAppearanceParams::TcMode::LIGHT}, {"Lightness", ColorAppearanceParams::TcMode::LIGHT},
@ -4626,8 +4671,13 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Wavelet", "CBbluehigh", pedited, wavelet.bluehigh, pedited->wavelet.bluehigh); assignFromKeyfile(keyFile, "Wavelet", "CBbluehigh", pedited, wavelet.bluehigh, pedited->wavelet.bluehigh);
assignFromKeyfile(keyFile, "Wavelet", "CBbluemed", pedited, wavelet.bluemed, pedited->wavelet.bluemed); assignFromKeyfile(keyFile, "Wavelet", "CBbluemed", pedited, wavelet.bluemed, pedited->wavelet.bluemed);
assignFromKeyfile(keyFile, "Wavelet", "CBbluelow", pedited, wavelet.bluelow, pedited->wavelet.bluelow); assignFromKeyfile(keyFile, "Wavelet", "CBbluelow", pedited, wavelet.bluelow, pedited->wavelet.bluelow);
assignFromKeyfile(keyFile, "Wavelet", "MergeL", pedited, wavelet.mergeL, pedited->wavelet.mergeL);
assignFromKeyfile(keyFile, "Wavelet", "MergeC", pedited, wavelet.mergeC, pedited->wavelet.mergeC);
assignFromKeyfile(keyFile, "Wavelet", "Softrad", pedited, wavelet.softrad, pedited->wavelet.softrad);
assignFromKeyfile(keyFile, "Wavelet", "Softradend", pedited, wavelet.softradend, pedited->wavelet.softradend);
assignFromKeyfile(keyFile, "Wavelet", "Lipst", pedited, wavelet.lipst, pedited->wavelet.lipst); assignFromKeyfile(keyFile, "Wavelet", "Lipst", pedited, wavelet.lipst, pedited->wavelet.lipst);
assignFromKeyfile(keyFile, "Wavelet", "AvoidColorShift", pedited, wavelet.avoid, pedited->wavelet.avoid); assignFromKeyfile(keyFile, "Wavelet", "AvoidColorShift", pedited, wavelet.avoid, pedited->wavelet.avoid);
assignFromKeyfile(keyFile, "Wavelet", "Showmask", pedited, wavelet.showmask, pedited->wavelet.showmask);
assignFromKeyfile(keyFile, "Wavelet", "TMr", pedited, wavelet.tmr, pedited->wavelet.tmr); assignFromKeyfile(keyFile, "Wavelet", "TMr", pedited, wavelet.tmr, pedited->wavelet.tmr);
if (ppVersion < 331) { // wavelet.Lmethod was a string before version 331 if (ppVersion < 331) { // wavelet.Lmethod was a string before version 331
@ -4648,6 +4698,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Wavelet", "DaubMethod", pedited, wavelet.daubcoeffmethod, pedited->wavelet.daubcoeffmethod); assignFromKeyfile(keyFile, "Wavelet", "DaubMethod", pedited, wavelet.daubcoeffmethod, pedited->wavelet.daubcoeffmethod);
assignFromKeyfile(keyFile, "Wavelet", "CHromaMethod", pedited, wavelet.CHmethod, pedited->wavelet.CHmethod); assignFromKeyfile(keyFile, "Wavelet", "CHromaMethod", pedited, wavelet.CHmethod, pedited->wavelet.CHmethod);
assignFromKeyfile(keyFile, "Wavelet", "Medgreinf", pedited, wavelet.Medgreinf, pedited->wavelet.Medgreinf); assignFromKeyfile(keyFile, "Wavelet", "Medgreinf", pedited, wavelet.Medgreinf, pedited->wavelet.Medgreinf);
assignFromKeyfile(keyFile, "Wavelet", "Ushamethod", pedited, wavelet.ushamethod, pedited->wavelet.ushamethod);
assignFromKeyfile(keyFile, "Wavelet", "CHSLromaMethod", pedited, wavelet.CHSLmethod, pedited->wavelet.CHSLmethod); assignFromKeyfile(keyFile, "Wavelet", "CHSLromaMethod", pedited, wavelet.CHSLmethod, pedited->wavelet.CHSLmethod);
assignFromKeyfile(keyFile, "Wavelet", "EDMethod", pedited, wavelet.EDmethod, pedited->wavelet.EDmethod); assignFromKeyfile(keyFile, "Wavelet", "EDMethod", pedited, wavelet.EDmethod, pedited->wavelet.EDmethod);
assignFromKeyfile(keyFile, "Wavelet", "NPMethod", pedited, wavelet.NPmethod, pedited->wavelet.NPmethod); assignFromKeyfile(keyFile, "Wavelet", "NPMethod", pedited, wavelet.NPmethod, pedited->wavelet.NPmethod);
@ -4655,10 +4706,13 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Wavelet", "TMMethod", pedited, wavelet.TMmethod, pedited->wavelet.TMmethod); assignFromKeyfile(keyFile, "Wavelet", "TMMethod", pedited, wavelet.TMmethod, pedited->wavelet.TMmethod);
assignFromKeyfile(keyFile, "Wavelet", "HSMethod", pedited, wavelet.HSmethod, pedited->wavelet.HSmethod); assignFromKeyfile(keyFile, "Wavelet", "HSMethod", pedited, wavelet.HSmethod, pedited->wavelet.HSmethod);
assignFromKeyfile(keyFile, "Wavelet", "DirMethod", pedited, wavelet.Dirmethod, pedited->wavelet.Dirmethod); assignFromKeyfile(keyFile, "Wavelet", "DirMethod", pedited, wavelet.Dirmethod, pedited->wavelet.Dirmethod);
assignFromKeyfile(keyFile, "Wavelet", "Sigma", pedited, wavelet.sigma, pedited->wavelet.sigma);
assignFromKeyfile(keyFile, "Wavelet", "ResidualcontShadow", pedited, wavelet.rescon, pedited->wavelet.rescon); assignFromKeyfile(keyFile, "Wavelet", "ResidualcontShadow", pedited, wavelet.rescon, pedited->wavelet.rescon);
assignFromKeyfile(keyFile, "Wavelet", "ResidualcontHighlight", pedited, wavelet.resconH, pedited->wavelet.resconH); assignFromKeyfile(keyFile, "Wavelet", "ResidualcontHighlight", pedited, wavelet.resconH, pedited->wavelet.resconH);
assignFromKeyfile(keyFile, "Wavelet", "Residualchroma", pedited, wavelet.reschro, pedited->wavelet.reschro); assignFromKeyfile(keyFile, "Wavelet", "Residualchroma", pedited, wavelet.reschro, pedited->wavelet.reschro);
assignFromKeyfile(keyFile, "Wavelet", "ResidualTM", pedited, wavelet.tmrs, pedited->wavelet.tmrs); assignFromKeyfile(keyFile, "Wavelet", "ResidualTM", pedited, wavelet.tmrs, pedited->wavelet.tmrs);
assignFromKeyfile(keyFile, "Wavelet", "ResidualEDGS", pedited, wavelet.edgs, pedited->wavelet.edgs);
assignFromKeyfile(keyFile, "Wavelet", "ResidualSCALE", pedited, wavelet.scale, pedited->wavelet.scale);
assignFromKeyfile(keyFile, "Wavelet", "Residualgamma", pedited, wavelet.gamma, pedited->wavelet.gamma); assignFromKeyfile(keyFile, "Wavelet", "Residualgamma", pedited, wavelet.gamma, pedited->wavelet.gamma);
assignFromKeyfile(keyFile, "Wavelet", "ContExtra", pedited, wavelet.sup, pedited->wavelet.sup); assignFromKeyfile(keyFile, "Wavelet", "ContExtra", pedited, wavelet.sup, pedited->wavelet.sup);
assignFromKeyfile(keyFile, "Wavelet", "HueRangeResidual", pedited, wavelet.sky, pedited->wavelet.sky); assignFromKeyfile(keyFile, "Wavelet", "HueRangeResidual", pedited, wavelet.sky, pedited->wavelet.sky);
@ -4678,6 +4732,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Wavelet", "ThrEdg", pedited, wavelet.edgthresh, pedited->wavelet.edgthresh); assignFromKeyfile(keyFile, "Wavelet", "ThrEdg", pedited, wavelet.edgthresh, pedited->wavelet.edgthresh);
assignFromKeyfile(keyFile, "Wavelet", "ThresholdResidShadow", pedited, wavelet.thr, pedited->wavelet.thr); assignFromKeyfile(keyFile, "Wavelet", "ThresholdResidShadow", pedited, wavelet.thr, pedited->wavelet.thr);
assignFromKeyfile(keyFile, "Wavelet", "ThresholdResidHighLight", pedited, wavelet.thrH, pedited->wavelet.thrH); assignFromKeyfile(keyFile, "Wavelet", "ThresholdResidHighLight", pedited, wavelet.thrH, pedited->wavelet.thrH);
assignFromKeyfile(keyFile, "Wavelet", "Residualradius", pedited, wavelet.radius, pedited->wavelet.radius);
assignFromKeyfile(keyFile, "Wavelet", "ContrastCurve", pedited, wavelet.ccwcurve, pedited->wavelet.ccwcurve); assignFromKeyfile(keyFile, "Wavelet", "ContrastCurve", pedited, wavelet.ccwcurve, pedited->wavelet.ccwcurve);
assignFromKeyfile(keyFile, "Wavelet", "OpacityCurveRG", pedited, wavelet.opacityCurveRG, pedited->wavelet.opacityCurveRG); assignFromKeyfile(keyFile, "Wavelet", "OpacityCurveRG", pedited, wavelet.opacityCurveRG, pedited->wavelet.opacityCurveRG);
assignFromKeyfile(keyFile, "Wavelet", "OpacityCurveBY", pedited, wavelet.opacityCurveBY, pedited->wavelet.opacityCurveBY); assignFromKeyfile(keyFile, "Wavelet", "OpacityCurveBY", pedited, wavelet.opacityCurveBY, pedited->wavelet.opacityCurveBY);
@ -4854,6 +4909,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Wavelet", "Expfinal", pedited, wavelet.expfinal, pedited->wavelet.expfinal); assignFromKeyfile(keyFile, "Wavelet", "Expfinal", pedited, wavelet.expfinal, pedited->wavelet.expfinal);
assignFromKeyfile(keyFile, "Wavelet", "Exptoning", pedited, wavelet.exptoning, pedited->wavelet.exptoning); assignFromKeyfile(keyFile, "Wavelet", "Exptoning", pedited, wavelet.exptoning, pedited->wavelet.exptoning);
assignFromKeyfile(keyFile, "Wavelet", "Expnoise", pedited, wavelet.expnoise, pedited->wavelet.expnoise); assignFromKeyfile(keyFile, "Wavelet", "Expnoise", pedited, wavelet.expnoise, pedited->wavelet.expnoise);
assignFromKeyfile(keyFile, "Wavelet", "Expclari", pedited, wavelet.expclari, pedited->wavelet.expclari);
} }
if (keyFile.has_group("Directional Pyramid Equalizer")) { if (keyFile.has_group("Directional Pyramid Equalizer")) {

View File

@ -676,10 +676,12 @@ struct ColorAppearanceParams {
bool datacie; bool datacie;
bool tonecie; bool tonecie;
int tempout; int tempout;
bool autotempout;
int ybout; int ybout;
double greenout; double greenout;
int tempsc; int tempsc;
double greensc; double greensc;
bool presetcat02;
ColorAppearanceParams(); ColorAppearanceParams();
@ -1200,9 +1202,14 @@ struct WaveletParams {
int bluemed; int bluemed;
int greenhigh; int greenhigh;
int bluehigh; int bluehigh;
double mergeL;
double mergeC;
double softrad;
double softradend;
bool lipst; bool lipst;
bool avoid; bool avoid;
bool showmask;
bool tmr; bool tmr;
int strength; int strength;
int balance; int balance;
@ -1216,6 +1223,7 @@ struct WaveletParams {
bool expfinal; bool expfinal;
bool exptoning; bool exptoning;
bool expnoise; bool expnoise;
bool expclari;
int Lmethod; int Lmethod;
Glib::ustring CLmethod; Glib::ustring CLmethod;
@ -1224,6 +1232,7 @@ struct WaveletParams {
Glib::ustring daubcoeffmethod; Glib::ustring daubcoeffmethod;
Glib::ustring CHmethod; Glib::ustring CHmethod;
Glib::ustring Medgreinf; Glib::ustring Medgreinf;
Glib::ustring ushamethod;
Glib::ustring CHSLmethod; Glib::ustring CHSLmethod;
Glib::ustring EDmethod; Glib::ustring EDmethod;
Glib::ustring NPmethod; Glib::ustring NPmethod;
@ -1231,10 +1240,13 @@ struct WaveletParams {
Glib::ustring TMmethod; Glib::ustring TMmethod;
Glib::ustring Dirmethod; Glib::ustring Dirmethod;
Glib::ustring HSmethod; Glib::ustring HSmethod;
double sigma;
int rescon; int rescon;
int resconH; int resconH;
int reschro; int reschro;
double tmrs; double tmrs;
double edgs;
double scale;
double gamma; double gamma;
int sup; int sup;
double sky; double sky;
@ -1254,6 +1266,7 @@ struct WaveletParams {
int edgthresh; int edgthresh;
int thr; int thr;
int thrH; int thrH;
int radius;
double skinprotect; double skinprotect;
Threshold<int> hueskin; Threshold<int> hueskin;
Threshold<int> hueskin2; Threshold<int> hueskin2;

File diff suppressed because it is too large Load Diff

View File

@ -26,6 +26,7 @@
#include "colortemp.h" #include "colortemp.h"
#include "iimage.h" #include "iimage.h"
#include "imagesource.h" #include "imagesource.h"
#include "procparams.h"
#define HR_SCALE 2 #define HR_SCALE 2
@ -86,11 +87,13 @@ protected:
// the interpolated green plane: // the interpolated green plane:
array2D<float> green; array2D<float> green;
array2D<float> greenloc;
// the interpolated red plane: // the interpolated red plane:
array2D<float> red; array2D<float> red;
array2D<float> redloc;
// the interpolated blue plane: // the interpolated blue plane:
array2D<float> blue; array2D<float> blue;
// the interpolated green plane: array2D<float> blueloc;
array2D<float>* greenCache; array2D<float>* greenCache;
// the interpolated red plane: // the interpolated red plane:
array2D<float>* redCache; array2D<float>* redCache;
@ -108,6 +111,7 @@ protected:
void hlRecovery (const std::string &method, float* red, float* green, float* blue, int width, float* hlmax); void hlRecovery (const std::string &method, float* red, float* green, float* blue, int width, float* hlmax);
void transformRect (const PreviewProps &pp, int tran, int &sx1, int &sy1, int &width, int &height, int &fw); void transformRect (const PreviewProps &pp, int tran, int &sx1, int &sy1, int &width, int &height, int &fw);
void transformPosition (int x, int y, int tran, int& tx, int& ty); void transformPosition (int x, int y, int tran, int& tx, int& ty);
void ItcWB(bool extra, double &tempref, double &greenref, double &tempitc, double &greenitc, float &studgood, array2D<float> &redloc, array2D<float> &greenloc, array2D<float> &blueloc, int bfw, int bfh, double &avg_rm, double &avg_gm, double &avg_bm, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw, const procparams::WBParams & wbpar);
unsigned FC(int row, int col) const; unsigned FC(int row, int col) const;
inline void getRowStartEnd (int x, int &start, int &end); inline void getRowStartEnd (int x, int &start, int &end);
@ -126,8 +130,7 @@ public:
void retinex (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &deh, const procparams::ToneCurveParams& Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) override; void retinex (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &deh, const procparams::ToneCurveParams& Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) override;
void retinexPrepareCurves (const procparams::RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) override; void retinexPrepareCurves (const procparams::RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) override;
void retinexPrepareBuffers (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI) override; void retinexPrepareBuffers (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI) override;
void flushRawData () override; void flush () override;
void flushRGB () override;
void HLRecovery_Global (const procparams::ToneCurveParams &hrp) override; void HLRecovery_Global (const procparams::ToneCurveParams &hrp) override;
void refinement(int PassCount); void refinement(int PassCount);
void setBorder(unsigned int rawBorder) override {border = rawBorder;} void setBorder(unsigned int rawBorder) override {border = rawBorder;}
@ -139,6 +142,9 @@ public:
void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const float black[4]); void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const float black[4]);
void copyOriginalPixels(const procparams::RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData ); void copyOriginalPixels(const procparams::RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData );
void scaleColors (int winx, int winy, int winw, int winh, const procparams::RAWParams &raw, array2D<float> &rawData); // raw for cblack void scaleColors (int winx, int winy, int winw, int winh, const procparams::RAWParams &raw, array2D<float> &rawData); // raw for cblack
void WBauto(double &tempref, double &greenref, array2D<float> &redloc, array2D<float> &greenloc, array2D<float> &blueloc, int bfw, int bfh, double &avg_rm, double &avg_gm, double &avg_bm, double &tempitc, double &greenitc, float &studgood, bool &twotimes, const procparams::WBParams & wbpar, int begx, int begy, int yEn, int xEn, int cx, int cy, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) override;
void getAutoWBMultipliersitc(double &tempref, double &greenref, double &tempitc, double &greenitc, float &studgood, int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w, double &rm, double &gm, double &bm, const procparams::WBParams & wbpar, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) override;
void getrgbloc(int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w) override;
void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const procparams::ToneCurveParams &hrp, const procparams::RAWParams &raw) override; void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const procparams::ToneCurveParams &hrp, const procparams::RAWParams &raw) override;
eSensorType getSensorType () const override; eSensorType getSensorType () const override;

View File

@ -44,6 +44,12 @@ constexpr T pow4(T x)
return SQR(SQR(x)); return SQR(SQR(x));
} }
template<typename T>
constexpr T pow5(T x)
{
return x * pow4(x);
}
template<typename T> template<typename T>
constexpr const T& min(const T& a) constexpr const T& min(const T& a)
{ {

View File

@ -355,6 +355,8 @@ public :
virtual void autoCamChanged(double ccam, double ccamout) = 0; virtual void autoCamChanged(double ccam, double ccamout) = 0;
virtual void adapCamChanged(double cadap) = 0; virtual void adapCamChanged(double cadap) = 0;
virtual void ybCamChanged(int yb) = 0; virtual void ybCamChanged(int yb) = 0;
virtual void wbCamChanged(double tem, double tin) = 0;
}; };
class AutoChromaListener class AutoChromaListener
@ -391,7 +393,7 @@ class AutoWBListener
{ {
public: public:
virtual ~AutoWBListener() = default; virtual ~AutoWBListener() = default;
virtual void WBChanged(double temp, double green) = 0; virtual void WBChanged(double temp, double green, float studgood) = 0;
}; };
class FrameCountListener class FrameCountListener

View File

@ -1130,7 +1130,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
double cam_g = colorMatrix[1][0] * camwbRed + colorMatrix[1][1] * camwbGreen + colorMatrix[1][2] * camwbBlue; double cam_g = colorMatrix[1][0] * camwbRed + colorMatrix[1][1] * camwbGreen + colorMatrix[1][2] * camwbBlue;
double cam_b = colorMatrix[2][0] * camwbRed + colorMatrix[2][1] * camwbGreen + colorMatrix[2][2] * camwbBlue; double cam_b = colorMatrix[2][0] * camwbRed + colorMatrix[2][1] * camwbGreen + colorMatrix[2][2] * camwbBlue;
currWB = ColorTemp (cam_r, cam_g, cam_b, params.wb.equal); currWB = ColorTemp (cam_r, cam_g, cam_b, params.wb.equal);
} else if (params.wb.method == "Auto") { } else if (params.wb.method == "autold") {
currWB = ColorTemp (autoWBTemp, autoWBGreen, wbEqual, "Custom"); currWB = ColorTemp (autoWBTemp, autoWBGreen, wbEqual, "Custom");
} }

View File

@ -81,6 +81,14 @@ public:
double level0_cbdl; double level0_cbdl;
double level123_cbdl; double level123_cbdl;
Glib::ustring lensfunDbDirectory; // The directory containing the lensfun database. If empty, the system defaults will be used, as described in https://lensfun.github.io/manual/latest/dbsearch.html Glib::ustring lensfunDbDirectory; // The directory containing the lensfun database. If empty, the system defaults will be used, as described in https://lensfun.github.io/manual/latest/dbsearch.html
int itcwb_thres;
bool itcwb_sort;
int itcwb_greenrange;
int itcwb_greendeltatemp;
bool itcwb_forceextra;
int itcwb_sizereference;
int itcwb_delta;
enum class ThumbnailInspectorMode { enum class ThumbnailInspectorMode {
JPEG, JPEG,

File diff suppressed because it is too large Load Diff

View File

@ -32,6 +32,8 @@
namespace rtengine namespace rtengine
{ {
using namespace procparams;
ProcParams* params;
template<class T> void freeArray (T** a, int H) template<class T> void freeArray (T** a, int H)
{ {
@ -309,6 +311,27 @@ void StdImageSource::getAutoExpHistogram (LUTu & histogram, int& histcompr)
} }
} }
void StdImageSource::WBauto(double &tempref, double &greenref, array2D<float> &redloc, array2D<float> &greenloc, array2D<float> &blueloc, int bfw, int bfh, double &avg_rm, double &avg_gm, double &avg_bm, double &tempitc, double &greenitc, float &studgood, bool &twotimes, const WBParams & wbpar, int begx, int begy, int yEn, int xEn, int cx, int cy, const ColorManagementParams &cmp, const RAWParams &raw)
{
}
void StdImageSource::getAutoWBMultipliersitc(double &tempref, double &greenref, double &tempitc, double &greenitc, float &studgood, int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w, double &rm, double &gm, double &bm, const WBParams & wbpar, const ColorManagementParams &cmp, const RAWParams &raw)
{
if (redAWBMul != -1.) {
rm = redAWBMul;
gm = greenAWBMul;
bm = blueAWBMul;
return;
}
img->getAutoWBMultipliersitc(tempref, greenref, tempitc, greenitc,studgood, begx, begy, yEn, xEn, cx, cy, bf_h, bf_w, rm, gm, bm, params->wb, params->icm, params->raw);
redAWBMul = rm;
greenAWBMul = gm;
blueAWBMul = bm;
}
void StdImageSource::getAutoWBMultipliers (double &rm, double &gm, double &bm) void StdImageSource::getAutoWBMultipliers (double &rm, double &gm, double &bm)
{ {
if (redAWBMul != -1.) { if (redAWBMul != -1.) {
@ -340,7 +363,7 @@ ColorTemp StdImageSource::getSpotWB (std::vector<Coord2D> &red, std::vector<Coor
return ColorTemp (reds / rn * img_r, greens / gn * img_g, blues / bn * img_b, equal); return ColorTemp (reds / rn * img_r, greens / gn * img_g, blues / bn * img_b, equal);
} }
void StdImageSource::flushRGB() { void StdImageSource::flush() {
img->allocate(0, 0); img->allocate(0, 0);
}; };

View File

@ -20,6 +20,7 @@
#include "colortemp.h" #include "colortemp.h"
#include "imagesource.h" #include "imagesource.h"
#include "procparams.h"
namespace rtengine namespace rtengine
{ {
@ -57,12 +58,15 @@ public:
int load (const Glib::ustring &fname) override; int load (const Glib::ustring &fname) override;
void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const procparams::ToneCurveParams &hrp, const procparams::RAWParams &raw) override; void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const procparams::ToneCurveParams &hrp, const procparams::RAWParams &raw) override;
void getrgbloc (int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w) override {};
ColorTemp getWB () const override ColorTemp getWB () const override
{ {
return wb; return wb;
} }
void getAutoWBMultipliers (double &rm, double &gm, double &bm) override; void getAutoWBMultipliers (double &rm, double &gm, double &bm) override;
ColorTemp getSpotWB (std::vector<Coord2D> &red, std::vector<Coord2D> &green, std::vector<Coord2D> &blue, int tran, double equal) override; ColorTemp getSpotWB (std::vector<Coord2D> &red, std::vector<Coord2D> &green, std::vector<Coord2D> &blue, int tran, double equal) override;
void WBauto(double &tempref, double &greenref, array2D<float> &redloc, array2D<float> &greenloc, array2D<float> &blueloc, int bfw, int bfh, double &avg_rm, double &avg_gm, double &avg_bm, double &tempitc, double &greenitc, float &studgood, bool &twotimes, const procparams::WBParams & wbpar, int begx, int begy, int yEn, int xEn, int cx, int cy, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) override;
void getAutoWBMultipliersitc(double &tempref, double &greenref, double &tempitc, double &greenitc, float &studgood, int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w, double &rm, double &gm, double &bm, const procparams::WBParams & wbpar, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) override;
eSensorType getSensorType() const override {return ST_NONE;} eSensorType getSensorType() const override {return ST_NONE;}
bool isMono() const override {return false;} bool isMono() const override {return false;}
@ -114,7 +118,7 @@ public:
void getRawValues(int x, int y, int rotate, int &R, int &G, int &B) override { R = G = B = 0;} void getRawValues(int x, int y, int rotate, int &R, int &G, int &B) override { R = G = B = 0;}
void flushRGB () override; void flush () override;
void captureSharpening(const procparams::CaptureSharpeningParams &sharpeningParams, bool showMask, double &conrastThreshold, double &radius) override {}; void captureSharpening(const procparams::CaptureSharpeningParams &sharpeningParams, bool showMask, double &conrastThreshold, double &radius) override {};
}; };

View File

@ -18,12 +18,12 @@ if(WIN32)
link_directories(. "${PROJECT_SOURCE_DIR}/rtexif" ${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS} ${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS} ${LENSFUN_LIBRARY_DIRS}) link_directories(. "${PROJECT_SOURCE_DIR}/rtexif" ${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS} ${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS} ${LENSFUN_LIBRARY_DIRS})
else() else()
set_target_properties(rtexif PROPERTIES COMPILE_FLAGS " -fPIC") set_target_properties(rtexif PROPERTIES COMPILE_FLAGS " -fPIC")
include_directories(${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS}) include_directories("${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS}")
link_directories(${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS} ${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS} ${LENSFUN_LIBRARY_DIRS}) link_directories("${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS} ${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS} ${LENSFUN_LIBRARY_DIRS}")
endif() endif()
include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}") include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}")
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
install(TARGETS rtexif DESTINATION ${LIBDIR}) install(TARGETS rtexif DESTINATION "${LIBDIR}")
endif() endif()

View File

@ -845,7 +845,7 @@ public:
{195, "Canon EF 35-105mm f/4.5-5.6 USM"}, {195, "Canon EF 35-105mm f/4.5-5.6 USM"},
{196, "Canon EF 75-300mm f/4-5.6 USM"}, {196, "Canon EF 75-300mm f/4-5.6 USM"},
{197, "Canon EF 75-300mm f/4-5.6 IS USM or Sigma Lens"}, {197, "Canon EF 75-300mm f/4-5.6 IS USM or Sigma Lens"},
{197, "Sigma 18-300mm f/3.5-6.3 DC Macro OS HS"}, {197, "Sigma 18-300mm f/3.5-6.3 DC Macro OS HSM"},
{198, "Canon EF 50mm f/1.4 USM or Other Lens"}, {198, "Canon EF 50mm f/1.4 USM or Other Lens"},
{198, "Zeiss Otus 55mm f/1.4 ZE"}, {198, "Zeiss Otus 55mm f/1.4 ZE"},
{198, "Zeiss Otus 85mm f/1.4 ZE"}, {198, "Zeiss Otus 85mm f/1.4 ZE"},

View File

@ -131,6 +131,7 @@ public:
lenses["00 32 10"] = "Olympus M.Zuiko Digital ED 12-200mm f/3.5-6.3"; lenses["00 32 10"] = "Olympus M.Zuiko Digital ED 12-200mm f/3.5-6.3";
lenses["00 33 00"] = "Olympus Zuiko Digital 25mm f/2.8"; lenses["00 33 00"] = "Olympus Zuiko Digital 25mm f/2.8";
lenses["00 34 00"] = "Olympus Zuiko Digital ED 9-18mm f/4.0-5.6"; lenses["00 34 00"] = "Olympus Zuiko Digital ED 9-18mm f/4.0-5.6";
lenses["00 34 10"] = "Olympus M.Zuiko Digital ED 12-45mm f/4.0 Pro";
lenses["00 35 00"] = "Olympus Zuiko Digital 14-54mm f/2.8-3.5 II"; lenses["00 35 00"] = "Olympus Zuiko Digital 14-54mm f/2.8-3.5 II";
lenses["01 01 00"] = "Sigma 18-50mm f/3.5-5.6 DC"; lenses["01 01 00"] = "Sigma 18-50mm f/3.5-5.6 DC";
lenses["01 01 10"] = "Sigma 30mm f/2.8 EX DN"; lenses["01 01 10"] = "Sigma 30mm f/2.8 EX DN";

View File

@ -782,6 +782,7 @@ public:
choices.insert (p_t (256 * 4 + 2, "smc PENTAX-FA 80-320mm f/4.5-5.6")); choices.insert (p_t (256 * 4 + 2, "smc PENTAX-FA 80-320mm f/4.5-5.6"));
choices.insert (p_t (256 * 4 + 3, "smc PENTAX-FA 43mm f/1.9 Limited")); choices.insert (p_t (256 * 4 + 3, "smc PENTAX-FA 43mm f/1.9 Limited"));
choices.insert (p_t (256 * 4 + 6, "smc PENTAX-FA 35-80mm f/4-5.6")); choices.insert (p_t (256 * 4 + 6, "smc PENTAX-FA 35-80mm f/4-5.6"));
choices.insert (p_t (256 * 4 + 8, "Irix 150mm f/2.8 Macro"));
choices.insert (p_t (256 * 4 + 9, "Irix 11mm f/4 Firefly")); choices.insert (p_t (256 * 4 + 9, "Irix 11mm f/4 Firefly"));
choices.insert (p_t (256 * 4 + 10, "Irix 15mm f/2.4")); choices.insert (p_t (256 * 4 + 10, "Irix 15mm f/2.4"));
choices.insert (p_t (256 * 4 + 12, "smc PENTAX-FA 50mm f/1.4")); choices.insert (p_t (256 * 4 + 12, "smc PENTAX-FA 50mm f/1.4"));
@ -938,6 +939,7 @@ public:
choices.insert (p_t (256 * 8 + 62, "HD PENTAX-D FA 24-70mm f/2.8 ED SDM WR")); choices.insert (p_t (256 * 8 + 62, "HD PENTAX-D FA 24-70mm f/2.8 ED SDM WR"));
choices.insert (p_t (256 * 8 + 63, "HD PENTAX-D FA 15-30mm f/2.8 ED SDM WR")); choices.insert (p_t (256 * 8 + 63, "HD PENTAX-D FA 15-30mm f/2.8 ED SDM WR"));
choices.insert (p_t (256 * 8 + 64, "HD PENTAX-D FA* 50mm f/1.4 SDM AW")); choices.insert (p_t (256 * 8 + 64, "HD PENTAX-D FA* 50mm f/1.4 SDM AW"));
choices.insert (p_t (256 * 8 + 65, "HD PENTAX-D FA 70-210mm f/4 ED SDM WR"));
choices.insert (p_t (256 * 8 + 196, "HD PENTAX-DA* 11-18mm f/2.8 ED DC AW")); choices.insert (p_t (256 * 8 + 196, "HD PENTAX-DA* 11-18mm f/2.8 ED DC AW"));
choices.insert (p_t (256 * 8 + 197, "HD PENTAX-DA 55-300mm f/4.5-6.3 ED PLM WR RE")); choices.insert (p_t (256 * 8 + 197, "HD PENTAX-DA 55-300mm f/4.5-6.3 ED PLM WR RE"));
choices.insert (p_t (256 * 8 + 198, "smc PENTAX-DA L 18-50mm f/4-5.6 DC WR RE")); choices.insert (p_t (256 * 8 + 198, "smc PENTAX-DA L 18-50mm f/4-5.6 DC WR RE"));

View File

@ -1126,6 +1126,7 @@ public:
choices.insert (p_t (49458, "Tamron 17-28mm f/2.8 Di III RXD")); choices.insert (p_t (49458, "Tamron 17-28mm f/2.8 Di III RXD"));
choices.insert (p_t (49459, "Tamron 35mm f/2.8 Di III OSD M1:2")); choices.insert (p_t (49459, "Tamron 35mm f/2.8 Di III OSD M1:2"));
choices.insert (p_t (49460, "Tamron 24mm f/2.8 Di III OSD M1:2")); choices.insert (p_t (49460, "Tamron 24mm f/2.8 Di III OSD M1:2"));
choices.insert (p_t (49461, "Tamron 20mm f/2.8 Di III OSD M1:2"));
choices.insert (p_t (49712, "Tokina FiRIN 20mm f/2 FE AF")); choices.insert (p_t (49712, "Tokina FiRIN 20mm f/2 FE AF"));
choices.insert (p_t (49713, "Tokina FiRIN 100mm f/2.8 FE MACRO")); choices.insert (p_t (49713, "Tokina FiRIN 100mm f/2.8 FE MACRO"));
choices.insert (p_t (50480, "Sigma 30mm f/1.4 DC DN | C")); choices.insert (p_t (50480, "Sigma 30mm f/1.4 DC DN | C"));
@ -1152,6 +1153,7 @@ public:
choices.insert (p_t (50514, "Sigma 45mm f/2.8 DG DN | C")); choices.insert (p_t (50514, "Sigma 45mm f/2.8 DG DN | C"));
choices.insert (p_t (50515, "Sigma 35mm f/1.2 DG DN | A")); choices.insert (p_t (50515, "Sigma 35mm f/1.2 DG DN | A"));
choices.insert (p_t (50516, "Sigma 14-24mm f/2.8 DG DN | A")); choices.insert (p_t (50516, "Sigma 14-24mm f/2.8 DG DN | A"));
choices.insert (p_t (50517, "Sigma 24-70mm f/2.8 DG DN | A"));
choices.insert (p_t (50992, "Voigtlander SUPER WIDE-HELIAR 15mm f/4.5 III")); choices.insert (p_t (50992, "Voigtlander SUPER WIDE-HELIAR 15mm f/4.5 III"));
choices.insert (p_t (50993, "Voigtlander HELIAR-HYPER WIDE 10mm f/5.6")); choices.insert (p_t (50993, "Voigtlander HELIAR-HYPER WIDE 10mm f/5.6"));
choices.insert (p_t (50994, "Voigtlander ULTRA WIDE-HELIAR 12mm f/5.6 III")); choices.insert (p_t (50994, "Voigtlander ULTRA WIDE-HELIAR 12mm f/5.6 III"));

View File

@ -165,13 +165,13 @@ set(NONCLISOURCEFILES
zoompanel.cc zoompanel.cc
) )
include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}") include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
if(APPLE) if(APPLE)
find_package(MacIntegration REQUIRED) find_package(MacIntegration REQUIRED)
# At the time of writing CMake has no module finder for gtkmacintegration so here we have it hard-coded, if installed via macports it should be in /opt/local/... # At the time of writing CMake has no module finder for gtkmacintegration so here we have it hard-coded, if installed via macports it should be in /opt/local/...
set(EXTRA_LIB_RTGUI ${MacIntegration_LIBRARIES}) set(EXTRA_LIB_RTGUI "${MacIntegration_LIBRARIES}")
set(EXTRA_INCDIR ${EXTRA_INCDIR} ${MacIntegration_INCLUDE_DIRS}) set(EXTRA_INCDIR "${EXTRA_INCDIR}" "${MacIntegration_INCLUDE_DIRS}")
endif() endif()
if(WIN32) if(WIN32)
@ -237,16 +237,16 @@ else()
endif() endif()
# Excluding libatomic needed by Clang/FreeBSD, #3636 # Excluding libatomic needed by Clang/FreeBSD, #3636
if(OPENMP_FOUND AND NOT APPLE AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") if(OPENMP_FOUND AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
set(EXTRA_LIB_RTGUI ${EXTRA_LIB_RTGUI} "atomic") set(EXTRA_LIB_RTGUI "${EXTRA_LIB_RTGUI}" "atomic")
endif() endif()
# Create config.h which defines where data are stored # Create config.h which defines where data are stored
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h") configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h")
# Create new executables targets # Create new executables targets
add_executable(rth ${EXTRA_SRC_NONCLI} ${NONCLISOURCEFILES}) add_executable(rth "${EXTRA_SRC_NONCLI}" "${NONCLISOURCEFILES}")
add_executable(rth-cli ${EXTRA_SRC_CLI} ${CLISOURCEFILES}) add_executable(rth-cli "${EXTRA_SRC_CLI}" "${CLISOURCEFILES}")
# Add dependencies to executables targets # Add dependencies to executables targets
add_dependencies(rth UpdateInfo) add_dependencies(rth UpdateInfo)
@ -312,5 +312,5 @@ target_link_libraries(rth-cli rtengine
) )
# Install executables # Install executables
install(TARGETS rth DESTINATION ${BINDIR}) install(TARGETS rth DESTINATION "${BINDIR}")
install(TARGETS rth-cli DESTINATION ${BINDIR}) install(TARGETS rth-cli DESTINATION "${BINDIR}")

View File

@ -84,6 +84,7 @@ enum {
ADDSET_WA_SKINPROTECT, ADDSET_WA_SKINPROTECT,
ADDSET_WA_THRR, ADDSET_WA_THRR,
ADDSET_WA_THRRH, ADDSET_WA_THRRH,
ADDSET_WA_RADIUS,
ADDSET_WA_THRES, ADDSET_WA_THRES,
ADDSET_WA_THRESHOLD, ADDSET_WA_THRESHOLD,
ADDSET_WA_THRESHOLD2, ADDSET_WA_THRESHOLD2,
@ -101,6 +102,8 @@ enum {
ADDSET_WA_EDGEDETECTTHR, ADDSET_WA_EDGEDETECTTHR,
ADDSET_WA_EDGEDETECTTHR2, ADDSET_WA_EDGEDETECTTHR2,
ADDSET_WA_TMRS, ADDSET_WA_TMRS,
ADDSET_WA_EDGS,
ADDSET_WA_SCALE,
ADDSET_WA_GAMMA, ADDSET_WA_GAMMA,
ADDSET_RETI_STR, ADDSET_RETI_STR,
ADDSET_RETI_NEIGH, ADDSET_RETI_NEIGH,

View File

@ -171,7 +171,7 @@ void BatchToolPanelCoordinator::initSession ()
shadowshighlights->setAdjusterBehavior (false, false); shadowshighlights->setAdjusterBehavior (false, false);
dirpyrequalizer->setAdjusterBehavior (false, false, false); dirpyrequalizer->setAdjusterBehavior (false, false, false);
wavelet->setAdjusterBehavior (false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false); wavelet->setAdjusterBehavior (false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false);
dirpyrdenoise->setAdjusterBehavior (false, false, false, false, false, false, false); dirpyrdenoise->setAdjusterBehavior (false, false, false, false, false, false, false);
bayerprocess->setAdjusterBehavior(false, false, false, false, false, false); bayerprocess->setAdjusterBehavior(false, false, false, false, false, false);
xtransprocess->setAdjusterBehavior(false, false); xtransprocess->setAdjusterBehavior(false, false);
@ -219,7 +219,7 @@ void BatchToolPanelCoordinator::initSession ()
blackwhite->setAdjusterBehavior (options.baBehav[ADDSET_BLACKWHITE_HUES], options.baBehav[ADDSET_BLACKWHITE_GAMMA]); blackwhite->setAdjusterBehavior (options.baBehav[ADDSET_BLACKWHITE_HUES], options.baBehav[ADDSET_BLACKWHITE_GAMMA]);
shadowshighlights->setAdjusterBehavior (options.baBehav[ADDSET_SH_HIGHLIGHTS], options.baBehav[ADDSET_SH_SHADOWS]); shadowshighlights->setAdjusterBehavior (options.baBehav[ADDSET_SH_HIGHLIGHTS], options.baBehav[ADDSET_SH_SHADOWS]);
dirpyrequalizer->setAdjusterBehavior (options.baBehav[ADDSET_DIRPYREQ], options.baBehav[ADDSET_DIRPYREQ_THRESHOLD], options.baBehav[ADDSET_DIRPYREQ_SKINPROTECT]); dirpyrequalizer->setAdjusterBehavior (options.baBehav[ADDSET_DIRPYREQ], options.baBehav[ADDSET_DIRPYREQ_THRESHOLD], options.baBehav[ADDSET_DIRPYREQ_SKINPROTECT]);
wavelet->setAdjusterBehavior (options.baBehav[ADDSET_WA], options.baBehav[ADDSET_WA_THRESHOLD], options.baBehav[ADDSET_WA_THRESHOLD2], options.baBehav[ADDSET_WA_THRES], options.baBehav[ADDSET_WA_CHRO], options.baBehav[ADDSET_WA_CHROMA], options.baBehav[ADDSET_WA_CONTRAST], options.baBehav[ADDSET_WA_SKINPROTECT], options.baBehav[ADDSET_WA_RESCHRO], options.baBehav[ADDSET_WA_TMRS], options.baBehav[ADDSET_WA_RESCON], options.baBehav[ADDSET_WA_RESCONH], options.baBehav[ADDSET_WA_THRR], options.baBehav[ADDSET_WA_THRRH], options.baBehav[ADDSET_WA_SKYPROTECT], options.baBehav[ADDSET_WA_EDGRAD], options.baBehav[ADDSET_WA_EDGVAL], options.baBehav[ADDSET_WA_STRENGTH], options.baBehav[ADDSET_WA_GAMMA], options.baBehav[ADDSET_WA_EDGEDETECT], options.baBehav[ADDSET_WA_EDGEDETECTTHR], options.baBehav[ADDSET_WA_EDGEDETECTTHR2]); wavelet->setAdjusterBehavior (options.baBehav[ADDSET_WA], options.baBehav[ADDSET_WA_THRESHOLD], options.baBehav[ADDSET_WA_THRESHOLD2], options.baBehav[ADDSET_WA_THRES], options.baBehav[ADDSET_WA_CHRO], options.baBehav[ADDSET_WA_CHROMA], options.baBehav[ADDSET_WA_CONTRAST], options.baBehav[ADDSET_WA_SKINPROTECT], options.baBehav[ADDSET_WA_RESCHRO], options.baBehav[ADDSET_WA_TMRS], options.baBehav[ADDSET_WA_EDGS], options.baBehav[ADDSET_WA_SCALE], options.baBehav[ADDSET_WA_RESCON], options.baBehav[ADDSET_WA_RESCONH], options.baBehav[ADDSET_WA_THRR], options.baBehav[ADDSET_WA_THRRH], options.baBehav[ADDSET_WA_RADIUS], options.baBehav[ADDSET_WA_SKYPROTECT], options.baBehav[ADDSET_WA_EDGRAD], options.baBehav[ADDSET_WA_EDGVAL], options.baBehav[ADDSET_WA_STRENGTH], options.baBehav[ADDSET_WA_GAMMA], options.baBehav[ADDSET_WA_EDGEDETECT], options.baBehav[ADDSET_WA_EDGEDETECTTHR], options.baBehav[ADDSET_WA_EDGEDETECTTHR2]);
dirpyrdenoise->setAdjusterBehavior (options.baBehav[ADDSET_DIRPYRDN_LUMA], options.baBehav[ADDSET_DIRPYRDN_LUMDET], options.baBehav[ADDSET_DIRPYRDN_CHROMA], options.baBehav[ADDSET_DIRPYRDN_CHROMARED], options.baBehav[ADDSET_DIRPYRDN_CHROMABLUE], options.baBehav[ADDSET_DIRPYRDN_GAMMA], options.baBehav[ADDSET_DIRPYRDN_PASSES]); dirpyrdenoise->setAdjusterBehavior (options.baBehav[ADDSET_DIRPYRDN_LUMA], options.baBehav[ADDSET_DIRPYRDN_LUMDET], options.baBehav[ADDSET_DIRPYRDN_CHROMA], options.baBehav[ADDSET_DIRPYRDN_CHROMARED], options.baBehav[ADDSET_DIRPYRDN_CHROMABLUE], options.baBehav[ADDSET_DIRPYRDN_GAMMA], options.baBehav[ADDSET_DIRPYRDN_PASSES]);
bayerprocess->setAdjusterBehavior(options.baBehav[ADDSET_BAYER_FALSE_COLOR_SUPPRESSION], options.baBehav[ADDSET_BAYER_ITER], options.baBehav[ADDSET_BAYER_DUALDEMOZCONTRAST], options.baBehav[ADDSET_BAYER_PS_SIGMA], options.baBehav[ADDSET_BAYER_PS_SMOOTH], options.baBehav[ADDSET_BAYER_PS_EPERISO]); bayerprocess->setAdjusterBehavior(options.baBehav[ADDSET_BAYER_FALSE_COLOR_SUPPRESSION], options.baBehav[ADDSET_BAYER_ITER], options.baBehav[ADDSET_BAYER_DUALDEMOZCONTRAST], options.baBehav[ADDSET_BAYER_PS_SIGMA], options.baBehav[ADDSET_BAYER_PS_SMOOTH], options.baBehav[ADDSET_BAYER_PS_EPERISO]);
xtransprocess->setAdjusterBehavior(options.baBehav[ADDSET_BAYER_FALSE_COLOR_SUPPRESSION], options.baBehav[ADDSET_BAYER_DUALDEMOZCONTRAST]); xtransprocess->setAdjusterBehavior(options.baBehav[ADDSET_BAYER_FALSE_COLOR_SUPPRESSION], options.baBehav[ADDSET_BAYER_DUALDEMOZCONTRAST]);
@ -335,8 +335,11 @@ void BatchToolPanelCoordinator::initSession ()
if (options.baBehav[ADDSET_WA_RESCONH]) { pparams.wavelet.resconH = 0; } if (options.baBehav[ADDSET_WA_RESCONH]) { pparams.wavelet.resconH = 0; }
if (options.baBehav[ADDSET_WA_RESCHRO]) { pparams.wavelet.reschro = 0; } if (options.baBehav[ADDSET_WA_RESCHRO]) { pparams.wavelet.reschro = 0; }
if (options.baBehav[ADDSET_WA_TMRS]) { pparams.wavelet.tmrs = 0; } if (options.baBehav[ADDSET_WA_TMRS]) { pparams.wavelet.tmrs = 0; }
if (options.baBehav[ADDSET_WA_EDGS]) { pparams.wavelet.edgs = 0; }
if (options.baBehav[ADDSET_WA_SCALE]) { pparams.wavelet.scale = 0; }
if (options.baBehav[ADDSET_WA_THRR]) { pparams.wavelet.thr = 0; } if (options.baBehav[ADDSET_WA_THRR]) { pparams.wavelet.thr = 0; }
if (options.baBehav[ADDSET_WA_THRRH]) { pparams.wavelet.thrH = 0; } if (options.baBehav[ADDSET_WA_THRRH]) { pparams.wavelet.thrH = 0; }
if (options.baBehav[ADDSET_WA_RADIUS]) { pparams.wavelet.radius = 0; }
if (options.baBehav[ADDSET_WA_SKYPROTECT]) { pparams.wavelet.sky = 0; } if (options.baBehav[ADDSET_WA_SKYPROTECT]) { pparams.wavelet.sky = 0; }
if (options.baBehav[ADDSET_WA_EDGRAD]) { pparams.wavelet.edgrad = 0; } if (options.baBehav[ADDSET_WA_EDGRAD]) { pparams.wavelet.edgrad = 0; }
if (options.baBehav[ADDSET_WA_EDGVAL]) { pparams.wavelet.edgval = 0; } if (options.baBehav[ADDSET_WA_EDGVAL]) { pparams.wavelet.edgval = 0; }

View File

@ -25,6 +25,7 @@
#include "guiutils.h" #include "guiutils.h"
#include "options.h" #include "options.h"
#include "rtimage.h" #include "rtimage.h"
#include "eventmapper.h"
#include "../rtengine/color.h" #include "../rtengine/color.h"
#include "../rtengine/procparams.h" #include "../rtengine/procparams.h"
@ -217,8 +218,16 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
milestones.push_back ( GradientMilestone (0., 0., 0., 0.) ); milestones.push_back ( GradientMilestone (0., 0., 0., 0.) );
milestones.push_back ( GradientMilestone (1., 1., 1., 1.) ); milestones.push_back ( GradientMilestone (1., 1., 1., 1.) );
auto m = ProcEventMapper::getInstance();
Evcatpreset = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_CAT02PRESET");
EvCATAutotempout = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_TEMPOUT");
//preset button cat02
presetcat02 = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_PRESETCAT02")));
presetcat02->set_tooltip_markup (M("TP_COLORAPP_PRESETCAT02_TIP"));
presetcat02conn = presetcat02->signal_toggled().connect( sigc::mem_fun(*this, &ColorAppearance::presetcat02pressed));
pack_start (*presetcat02, Gtk::PACK_SHRINK);
// ------------------------ Process #1: Converting to CIECAM // ----------------------- Process #1: Converting to CIECAM
// Process 1 frame // Process 1 frame
@ -618,6 +627,8 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance"
greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1)); greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1));
ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_MEANLUMINANCE"), 5, 90, 1, 18)); ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_MEANLUMINANCE"), 5, 90, 1, 18));
tempout->set_tooltip_markup (M ("TP_COLORAPP_TEMP_TOOLTIP")); tempout->set_tooltip_markup (M ("TP_COLORAPP_TEMP_TOOLTIP"));
tempout->throwOnButtonRelease();
tempout->addAutoButton (M ("TP_COLORAPP_TEMPOUT_TOOLTIP"));
tempout->show(); tempout->show();
greenout->show(); greenout->show();
@ -759,6 +770,7 @@ void ColorAppearance::neutral_pressed ()
qcontrast->resetValue (false); qcontrast->resetValue (false);
colorh->resetValue (false); colorh->resetValue (false);
tempout->resetValue (false); tempout->resetValue (false);
tempout->setAutoValue (true);
greenout->resetValue (false); greenout->resetValue (false);
ybout->resetValue (false); ybout->resetValue (false);
tempsc->resetValue (false); tempsc->resetValue (false);
@ -801,6 +813,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
tcmodeconn.block (true); tcmodeconn.block (true);
tcmode2conn.block (true); tcmode2conn.block (true);
tcmode3conn.block (true); tcmode3conn.block (true);
presetcat02conn.block (true);
shape->setCurve (pp->colorappearance.curve); shape->setCurve (pp->colorappearance.curve);
shape2->setCurve (pp->colorappearance.curve2); shape2->setCurve (pp->colorappearance.curve2);
shape3->setCurve (pp->colorappearance.curve3); shape3->setCurve (pp->colorappearance.curve3);
@ -808,7 +821,11 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
toneCurveMode2->set_active (toUnderlying(pp->colorappearance.curveMode2)); toneCurveMode2->set_active (toUnderlying(pp->colorappearance.curveMode2));
toneCurveMode3->set_active (toUnderlying(pp->colorappearance.curveMode3)); toneCurveMode3->set_active (toUnderlying(pp->colorappearance.curveMode3));
curveMode3Changed(); // This will set the correct sensitive state of depending Adjusters curveMode3Changed(); // This will set the correct sensitive state of depending Adjusters
presetcat02->set_active(pp->colorappearance.presetcat02);
nexttemp = pp->wb.temperature;
nextgreen = pp->wb.green;
if (pedited) { if (pedited) {
degree->setEditedState (pedited->colorappearance.degree ? Edited : UnEdited); degree->setEditedState (pedited->colorappearance.degree ? Edited : UnEdited);
degreeout->setEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited); degreeout->setEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited);
@ -842,6 +859,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
adapscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoadapscen); adapscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoadapscen);
ybscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoybscen); ybscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoybscen);
set_inconsistent (multiImage && !pedited->colorappearance.enabled); set_inconsistent (multiImage && !pedited->colorappearance.enabled);
tempout->setAutoInconsistent (multiImage && !pedited->colorappearance.autotempout);
shape->setUnChanged (!pedited->colorappearance.curve); shape->setUnChanged (!pedited->colorappearance.curve);
shape2->setUnChanged (!pedited->colorappearance.curve2); shape2->setUnChanged (!pedited->colorappearance.curve2);
@ -858,6 +876,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
if (!pedited->colorappearance.curveMode3) { if (!pedited->colorappearance.curveMode3) {
toneCurveMode3->set_active (3); toneCurveMode3->set_active (3);
} }
presetcat02->set_inconsistent(!pedited->colorappearance.presetcat02);
} }
@ -967,6 +986,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
lastAutoAdapscen = pp->colorappearance.autoadapscen; lastAutoAdapscen = pp->colorappearance.autoadapscen;
lastAutoDegreeout = pp->colorappearance.autodegreeout; lastAutoDegreeout = pp->colorappearance.autodegreeout;
lastAutoybscen = pp->colorappearance.autoybscen; lastAutoybscen = pp->colorappearance.autoybscen;
lastAutotempout = pp->colorappearance.autotempout;
degree->setValue (pp->colorappearance.degree); degree->setValue (pp->colorappearance.degree);
degree->setAutoValue (pp->colorappearance.autodegree); degree->setAutoValue (pp->colorappearance.autodegree);
@ -989,10 +1009,15 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
qcontrast->setValue (pp->colorappearance.qcontrast); qcontrast->setValue (pp->colorappearance.qcontrast);
colorh->setValue (pp->colorappearance.colorh); colorh->setValue (pp->colorappearance.colorh);
tempout->setValue (pp->colorappearance.tempout); tempout->setValue (pp->colorappearance.tempout);
tempout->setAutoValue (pp->colorappearance.autotempout);
greenout->setValue (pp->colorappearance.greenout); greenout->setValue (pp->colorappearance.greenout);
ybout->setValue (pp->colorappearance.ybout); ybout->setValue (pp->colorappearance.ybout);
tempsc->setValue (pp->colorappearance.tempsc); tempsc->setValue (pp->colorappearance.tempsc);
greensc->setValue (pp->colorappearance.greensc); greensc->setValue (pp->colorappearance.greensc);
presetcat02conn.block (true);
presetcat02->set_active (pp->colorappearance.presetcat02);
presetcat02conn.block (false);
lastpresetcat02 = pp->colorappearance.presetcat02;
tcmode3conn.block (false); tcmode3conn.block (false);
tcmode2conn.block (false); tcmode2conn.block (false);
@ -1041,10 +1066,12 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited)
pp->colorappearance.curve2 = shape2->getCurve (); pp->colorappearance.curve2 = shape2->getCurve ();
pp->colorappearance.curve3 = shape3->getCurve (); pp->colorappearance.curve3 = shape3->getCurve ();
pp->colorappearance.tempout = tempout->getValue (); pp->colorappearance.tempout = tempout->getValue ();
pp->colorappearance.autotempout = tempout->getAutoValue ();
pp->colorappearance.greenout = greenout->getValue (); pp->colorappearance.greenout = greenout->getValue ();
pp->colorappearance.ybout = ybout->getValue (); pp->colorappearance.ybout = ybout->getValue ();
pp->colorappearance.tempsc = tempsc->getValue (); pp->colorappearance.tempsc = tempsc->getValue ();
pp->colorappearance.greensc = greensc->getValue (); pp->colorappearance.greensc = greensc->getValue ();
pp->colorappearance.presetcat02 = presetcat02->get_active();
int tcMode = toneCurveMode->get_active_row_number(); int tcMode = toneCurveMode->get_active_row_number();
@ -1114,6 +1141,8 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited)
pedited->colorappearance.ybout = ybout->getEditedState (); pedited->colorappearance.ybout = ybout->getEditedState ();
pedited->colorappearance.tempsc = tempsc->getEditedState (); pedited->colorappearance.tempsc = tempsc->getEditedState ();
pedited->colorappearance.greensc = greensc->getEditedState (); pedited->colorappearance.greensc = greensc->getEditedState ();
pedited->colorappearance.presetcat02 = presetcat02->get_inconsistent ();
pedited->colorappearance.autotempout = !tempout->getAutoInconsistent();
} }
@ -1309,6 +1338,130 @@ void ColorAppearance::badpix_toggled () {
} }
*/ */
void ColorAppearance::presetcat02pressed ()
{
if (presetcat02->get_active ()) {
disableListener();
jlight->resetValue (false);
qbright->resetValue (false);
chroma->resetValue (false);
schroma->resetValue (false);
mchroma->resetValue (false);
rstprotection->resetValue (false);
contrast->resetValue (false);
qcontrast->resetValue (false);
colorh->resetValue (false);
tempout->resetValue (false);
greenout->resetValue (false);
ybout->resetValue (false);
tempsc->resetValue (false);
greensc->resetValue (false);
badpixsl->resetValue (false);
wbmodel->set_active (0);
toneCurveMode->set_active (0);
toneCurveMode2->set_active (0);
toneCurveMode3->set_active (0);
shape->reset();
shape2->reset();
shape3->reset();
gamutconn.block (true);
gamut->set_active (true);
gamutconn.block (false);
degree->setAutoValue (true);
degree->resetValue (false);
adapscen->resetValue (false);
adapscen->setAutoValue (true);
degreeout->resetValue (false);
degreeout->setAutoValue (true);
ybscen->resetValue (false);
ybscen->setAutoValue (true);
surrsrc->set_active (0);
wbmodel->set_active (2);
tempsc->resetValue (false);
greensc->resetValue (false);
adapscen->setValue(400.);
ybscen->setValue(18);
surround->set_active (0);
adaplum->setValue(400.);
degreeout->setValue(70);
ybout->setValue(18);
tempout->setValue (nexttemp);
greenout->setValue (nextgreen);
enableListener();
} else {
disableListener();
/* jlight->resetValue (false);
qbright->resetValue (false);
chroma->resetValue (false);
schroma->resetValue (false);
mchroma->resetValue (false);
rstprotection->resetValue (false);
contrast->resetValue (false);
qcontrast->resetValue (false);
colorh->resetValue (false);
tempout->resetValue (false);
greenout->resetValue (false);
ybout->resetValue (false);
tempsc->resetValue (false);
greensc->resetValue (false);
badpixsl->resetValue (false);
wbmodel->set_active (0);
toneCurveMode->set_active (0);
toneCurveMode2->set_active (0);
toneCurveMode3->set_active (0);
shape->reset();
shape2->reset();
shape3->reset();
gamutconn.block (true);
gamut->set_active (true);
gamutconn.block (false);
*/
degree->setAutoValue (true);
degree->resetValue (false);
adapscen->resetValue (false);
adapscen->setAutoValue (true);
degreeout->resetValue (false);
degreeout->setAutoValue (true);
ybscen->resetValue (false);
ybscen->setAutoValue (true);
surrsrc->set_active (0);
wbmodel->set_active (0);
tempsc->resetValue (false);
greensc->resetValue (false);
adapscen->resetValue (false);
ybscen->resetValue (false);
surround->set_active (0);
adaplum->resetValue (false);
degreeout->resetValue (false);
ybout->resetValue (false);
tempout->resetValue (false);
greenout->resetValue (false);
enableListener();
}
if (batchMode) {
if (presetcat02->get_inconsistent()) {
presetcat02->set_inconsistent (false);
presetcat02conn.block (true);
presetcat02->set_active (false);
presetcat02conn.block (false);
} else if (lastpresetcat02) {
presetcat02->set_inconsistent (true);
}
lastpresetcat02 = presetcat02->get_active ();
}
if (listener) {
if (presetcat02->get_active ()) {
listener->panelChanged (Evcatpreset, M ("GENERAL_ENABLED"));
} else {
listener->panelChanged (Evcatpreset, M ("GENERAL_DISABLED"));
}
}
}
void ColorAppearance::datacie_toggled () void ColorAppearance::datacie_toggled ()
{ {
@ -1470,6 +1623,10 @@ void ColorAppearance::autoCamChanged (double ccam, double ccamout)
void ColorAppearance::adapCamChanged (double cadap) void ColorAppearance::adapCamChanged (double cadap)
{ {
if(presetcat02->get_active()){
return;
}
idle_register.add( idle_register.add(
[this, cadap]() -> bool [this, cadap]() -> bool
{ {
@ -1481,8 +1638,28 @@ void ColorAppearance::adapCamChanged (double cadap)
); );
} }
void ColorAppearance::wbCamChanged (double temp, double tin)
{
idle_register.add(
[this, temp, tin]() -> bool
{
disableListener();
tempout->setValue(temp);
greenout->setValue(tin);
enableListener();
return false;
}
);
}
void ColorAppearance::ybCamChanged (int ybsc) void ColorAppearance::ybCamChanged (int ybsc)
{ {
if(presetcat02->get_active()){
return;
}
idle_register.add( idle_register.add(
[this, ybsc]() -> bool [this, ybsc]() -> bool
{ {
@ -1602,7 +1779,16 @@ void ColorAppearance::adjusterAutoToggled(Adjuster* a)
ybscen->setAutoInconsistent (true); ybscen->setAutoInconsistent (true);
} }
lastAutoybscen = ybscen->getAutoValue(); lastAutotempout = tempout->getAutoValue();
if (tempout->getAutoInconsistent()) {
tempout->setAutoInconsistent (false);
tempout->setAutoValue (false);
} else if (lastAutotempout) {
tempout->setAutoInconsistent (true);
}
lastAutotempout = tempout->getAutoValue();
} }
@ -1649,6 +1835,15 @@ void ColorAppearance::adjusterAutoToggled(Adjuster* a)
} }
} }
if (a == tempout) {
if (tempout->getAutoInconsistent()) {
listener->panelChanged (EvCATAutotempout, M ("GENERAL_UNCHANGED"));
} else if (tempout->getAutoValue()) {
listener->panelChanged (EvCATAutotempout, M ("GENERAL_ENABLED"));
} else {
listener->panelChanged (EvCATAutotempout, M ("GENERAL_DISABLED"));
}
}
} }
} }

View File

@ -63,10 +63,11 @@ public:
void autoCamChanged (double ccam, double ccamout) override; void autoCamChanged (double ccam, double ccamout) override;
bool autoCamComputed_ (); bool autoCamComputed_ ();
void adapCamChanged (double cadap) override; void adapCamChanged (double cadap) override;
void wbCamChanged(double tem, double tin) override;
bool adapCamComputed_ (); bool adapCamComputed_ ();
void ybCamChanged (int yb) override; void ybCamChanged (int yb) override;
bool ybCamComputed_ (); bool ybCamComputed_ ();
void presetcat02pressed ();
void curveChanged (CurveEditor* ce) override; void curveChanged (CurveEditor* ce) override;
void curveMode1Changed (); void curveMode1Changed ();
bool curveMode1Changed_ (); bool curveMode1Changed_ ();
@ -99,6 +100,8 @@ public:
void writeOptions (std::vector<int> &tpOpen); void writeOptions (std::vector<int> &tpOpen);
private: private:
rtengine::ProcEvent Evcatpreset;
rtengine::ProcEvent EvCATAutotempout;
bool bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr<Gtk::Tooltip>& tooltip); bool bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr<Gtk::Tooltip>& tooltip);
bool srTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr<Gtk::Tooltip>& tooltip); bool srTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr<Gtk::Tooltip>& tooltip);
void foldAllButMe (GdkEventButton* event, MyExpander *expander); void foldAllButMe (GdkEventButton* event, MyExpander *expander);
@ -143,6 +146,9 @@ private:
Gtk::CheckButton* tonecie; Gtk::CheckButton* tonecie;
// Gtk::CheckButton* sharpcie; // Gtk::CheckButton* sharpcie;
Gtk::Button* neutral; Gtk::Button* neutral;
Gtk::CheckButton* presetcat02;
sigc::connection presetcat02conn;
MyComboBoxText* surrsrc; MyComboBoxText* surrsrc;
sigc::connection surrsrcconn; sigc::connection surrsrcconn;
@ -168,10 +174,14 @@ private:
bool lastAutoAdapscen; bool lastAutoAdapscen;
bool lastAutoDegreeout; bool lastAutoDegreeout;
bool lastAutoybscen; bool lastAutoybscen;
bool lastAutotempout;
bool lastsurr; bool lastsurr;
bool lastgamut; bool lastgamut;
bool lastdatacie; bool lastdatacie;
bool lasttonecie; bool lasttonecie;
bool lastpresetcat02;
double nexttemp;
double nextgreen;
IdleRegister idle_register; IdleRegister idle_register;
}; };

View File

@ -22,10 +22,19 @@
#cmakedefine BUILD_BUNDLE #cmakedefine BUILD_BUNDLE
#cmakedefine HAVE_UNALIGNED_MALLOC #cmakedefine HAVE_UNALIGNED_MALLOC
#ifdef __APPLE__
#define DATA_SEARCH_PATH "/Applications/RawTherapee.app/Contents/Resources/share"
#define DOC_SEARCH_PATH "/Applications/RawTherapee.app/Contents/Resources"
#define CREDITS_SEARCH_PATH "/Applications/RawTherapee.app/Contents/Resources"
#define LICENCE_SEARCH_PATH "/Applications/RawTherapee.app/Contents/Resources"
#define LENSFUN_DB_PATH "${LENSFUNDBDIR}"
#else
#define DATA_SEARCH_PATH "${DATADIR}" #define DATA_SEARCH_PATH "${DATADIR}"
#define DOC_SEARCH_PATH "${DOCDIR}" #define DOC_SEARCH_PATH "${DOCDIR}"
#define CREDITS_SEARCH_PATH "${CREDITSDIR}" #define CREDITS_SEARCH_PATH "${CREDITSDIR}"
#define LICENCE_SEARCH_PATH "${LICENCEDIR}" #define LICENCE_SEARCH_PATH "${LICENCEDIR}"
#define LENSFUN_DB_PATH "${LENSFUNDBDIR}" #define LENSFUN_DB_PATH "${LENSFUNDBDIR}"
#endif
#endif #endif

View File

@ -31,8 +31,8 @@ EdgePreservingDecompositionUI::EdgePreservingDecompositionUI () : FoldableToolPa
strength = Gtk::manage(new Adjuster (M("TP_EPD_STRENGTH"), -1.0, 2.0, 0.01, 0.5)); strength = Gtk::manage(new Adjuster (M("TP_EPD_STRENGTH"), -1.0, 2.0, 0.01, 0.5));
gamma = Gtk::manage(new Adjuster (M("TP_EPD_GAMMA"), 0.8, 1.5, 0.01, 1.)); gamma = Gtk::manage(new Adjuster (M("TP_EPD_GAMMA"), 0.8, 1.5, 0.01, 1.));
edgeStopping = Gtk::manage(new Adjuster (M("TP_EPD_EDGESTOPPING"), 0.1, 4.0, 0.01, 0.5)); edgeStopping = Gtk::manage(new Adjuster (M("TP_EPD_EDGESTOPPING"), 0.1, 4.0, 0.01, 1.4));
scale = Gtk::manage(new Adjuster (M("TP_EPD_SCALE"), 0.1, 10.0, 0.01, 0.1)); scale = Gtk::manage(new Adjuster (M("TP_EPD_SCALE"), 0.1, 10.0, 0.01, 1.0));
reweightingIterates = Gtk::manage(new Adjuster (M("TP_EPD_REWEIGHTINGITERATES"), 0, 9, 1, 0)); reweightingIterates = Gtk::manage(new Adjuster (M("TP_EPD_REWEIGHTINGITERATES"), 0, 9, 1, 0));
strength->setAdjusterListener(this); strength->setAdjusterListener(this);

View File

@ -590,6 +590,13 @@ void Options::setDefaults()
rtSettings.amchroma = 40;//between 20 and 140 low values increase effect..and also artifacts, high values reduces rtSettings.amchroma = 40;//between 20 and 140 low values increase effect..and also artifacts, high values reduces
rtSettings.level0_cbdl = 0; rtSettings.level0_cbdl = 0;
rtSettings.level123_cbdl = 30; rtSettings.level123_cbdl = 30;
rtSettings.itcwb_thres = 34;//between 10 to 55
rtSettings.itcwb_sort = false;
rtSettings.itcwb_greenrange = 0;//between 0 to 2
rtSettings.itcwb_greendeltatemp = 2;//between 0 and 4
rtSettings.itcwb_forceextra = true;
rtSettings.itcwb_sizereference = 3;//between 1 and 5
rtSettings.itcwb_delta = 1;//between 0 and 5
rtSettings.protectred = 60; rtSettings.protectred = 60;
rtSettings.protectredh = 0.3; rtSettings.protectredh = 0.3;
@ -1494,6 +1501,35 @@ void Options::readFromFile(Glib::ustring fname)
rtSettings.level123_cbdl = keyFile.get_double("Color Management", "CBDLlevel123"); rtSettings.level123_cbdl = keyFile.get_double("Color Management", "CBDLlevel123");
} }
if (keyFile.has_key("Color Management", "Itcwb_thres")) {
rtSettings.itcwb_thres = keyFile.get_integer("Color Management", "Itcwb_thres");
}
if (keyFile.has_key("Color Management", "Itcwb_sort")) {
rtSettings.itcwb_sort = keyFile.get_boolean("Color Management", "Itcwb_sort");
}
if (keyFile.has_key("Color Management", "Itcwb_forceextra")) {
rtSettings.itcwb_forceextra = keyFile.get_boolean("Color Management", "Itcwb_forceextra");
}
if (keyFile.has_key("Color Management", "Itcwb_greenrange")) {
rtSettings.itcwb_greenrange = keyFile.get_integer("Color Management", "Itcwb_greenrange");
}
if (keyFile.has_key("Color Management", "Itcwb_greendeltatemp")) {
rtSettings.itcwb_greendeltatemp = keyFile.get_integer("Color Management", "Itcwb_greendeltatemp");
}
if (keyFile.has_key("Color Management", "Itcwb_sizereference")) {
rtSettings.itcwb_sizereference = keyFile.get_integer("Color Management", "Itcwb_sizereference");
}
if (keyFile.has_key("Color Management", "Itcwb_delta")) {
rtSettings.itcwb_delta = keyFile.get_integer("Color Management", "Itcwb_delta");
}
//if (keyFile.has_key ("Color Management", "Colortoningab")) rtSettings.colortoningab = keyFile.get_double("Color Management", "Colortoningab"); //if (keyFile.has_key ("Color Management", "Colortoningab")) rtSettings.colortoningab = keyFile.get_double("Color Management", "Colortoningab");
//if (keyFile.has_key ("Color Management", "Decaction")) rtSettings.decaction = keyFile.get_double("Color Management", "Decaction"); //if (keyFile.has_key ("Color Management", "Decaction")) rtSettings.decaction = keyFile.get_double("Color Management", "Decaction");
@ -2158,6 +2194,14 @@ void Options::saveToFile(Glib::ustring fname)
//keyFile.set_boolean ("Color Management", "Ciebadpixgauss", rtSettings.ciebadpixgauss); //keyFile.set_boolean ("Color Management", "Ciebadpixgauss", rtSettings.ciebadpixgauss);
keyFile.set_double("Color Management", "CBDLlevel0", rtSettings.level0_cbdl); keyFile.set_double("Color Management", "CBDLlevel0", rtSettings.level0_cbdl);
keyFile.set_double("Color Management", "CBDLlevel123", rtSettings.level123_cbdl); keyFile.set_double("Color Management", "CBDLlevel123", rtSettings.level123_cbdl);
keyFile.set_integer("Color Management", "Itcwb_thres", rtSettings.itcwb_thres);
keyFile.set_boolean("Color Management", "Itcwb_sort", rtSettings.itcwb_sort);
keyFile.set_integer("Color Management", "Itcwb_greenrange", rtSettings.itcwb_greenrange);
keyFile.set_integer("Color Management", "Itcwb_greendeltatemp", rtSettings.itcwb_greendeltatemp);
keyFile.set_boolean("Color Management", "Itcwb_forceextra", rtSettings.itcwb_forceextra);
keyFile.set_integer("Color Management", "Itcwb_sizereference", rtSettings.itcwb_sizereference);
keyFile.set_integer("Color Management", "Itcwb_delta", rtSettings.itcwb_delta);
//keyFile.set_double ("Color Management", "Colortoningab", rtSettings.colortoningab); //keyFile.set_double ("Color Management", "Colortoningab", rtSettings.colortoningab);
//keyFile.set_double ("Color Management", "Decaction", rtSettings.decaction); //keyFile.set_double ("Color Management", "Decaction", rtSettings.decaction);
keyFile.set_string("Color Management", "ClutsDirectory", clutsDir); keyFile.set_string("Color Management", "ClutsDirectory", clutsDir);
@ -2270,8 +2314,18 @@ void Options::load(bool lightweight)
const gchar* path; const gchar* path;
Glib::ustring dPath; Glib::ustring dPath;
#ifdef __APPLE__
// Build Application Support directory path for macOS.
const char* homedir = g_getenv("HOME"); // This returns the current container data dir in ~/Library
std::string homebuf{homedir};
int homelength = strlen(homebuf.c_str());
homebuf[homelength-44] = '\0'; // Terminate string after ${HOME}/Library
std::string homeconfig{homebuf};
std::strcat(&homeconfig[0], "/Application Support/RawTherapee/config");
path = homeconfig.c_str();
#else
path = g_getenv("RT_SETTINGS"); path = g_getenv("RT_SETTINGS");
#endif
if (path != nullptr) { if (path != nullptr) {
rtdir = Glib::ustring(path); rtdir = Glib::ustring(path);
@ -2280,6 +2334,7 @@ void Options::load(bool lightweight)
throw Error(msg); throw Error(msg);
} }
} else { } else {
#ifdef WIN32 #ifdef WIN32
WCHAR pathW[MAX_PATH] = {0}; WCHAR pathW[MAX_PATH] = {0};
@ -2312,9 +2367,14 @@ void Options::load(bool lightweight)
rtdir = Glib::build_filename(argv0, "mysettings"); rtdir = Glib::build_filename(argv0, "mysettings");
} }
// Modify the path of the cache folder to the one provided in RT_CACHE environment variable // Modify the path of the cache folder to the one provided in RT_CACHE environment variable. Build the cache folder name in macOS.
#ifdef __APPLE__
std::string homecache{homebuf};
std::strcat(&homecache[0], "/Application Support/RawTherapee/cache");
path = homecache.c_str();
#else
path = g_getenv("RT_CACHE"); path = g_getenv("RT_CACHE");
#endif
if (path != nullptr) { if (path != nullptr) {
cacheBaseDir = Glib::ustring(path); cacheBaseDir = Glib::ustring(path);
@ -2323,6 +2383,7 @@ void Options::load(bool lightweight)
throw Error(msg); throw Error(msg);
} }
} }
// No environment variable provided, so falling back to the multi user mode, if enabled // No environment variable provided, so falling back to the multi user mode, if enabled
else if (options.multiUser) { else if (options.multiUser) {
#ifdef WIN32 #ifdef WIN32

View File

@ -20,7 +20,15 @@
#include <set> #include <set>
#include <vector> #include <vector>
#if defined __has_include
#if __has_include(<gtkmm/enums.h>)
#include <gtkmm/enums.h> #include <gtkmm/enums.h>
#else
#include <gtkmm-3.0/gtkmm/enums.h>
#endif
#else
#include <gtkmm/enums.h>
#endif
#include "../rtengine/settings.h" #include "../rtengine/settings.h"
#include <exception> #include <exception>

View File

@ -243,10 +243,12 @@ void ParamsEdited::set(bool v)
colorappearance.curveMode2 = v; colorappearance.curveMode2 = v;
colorappearance.curveMode3 = v; colorappearance.curveMode3 = v;
colorappearance.tempout = v; colorappearance.tempout = v;
colorappearance.autotempout = v;
colorappearance.greenout = v; colorappearance.greenout = v;
colorappearance.ybout = v; colorappearance.ybout = v;
colorappearance.tempsc = v; colorappearance.tempsc = v;
colorappearance.greensc = v; colorappearance.greensc = v;
colorappearance.presetcat02 = v;
//colorBoost.amount = v; //colorBoost.amount = v;
//colorBoost.avoidclip = v; //colorBoost.avoidclip = v;
@ -483,8 +485,14 @@ void ParamsEdited::set(bool v)
wavelet.bluemed = v; wavelet.bluemed = v;
wavelet.bluelow = v; wavelet.bluelow = v;
wavelet.lipst = v; wavelet.lipst = v;
wavelet.mergeL = v;
wavelet.mergeC = v;
wavelet.softrad = v;
wavelet.softradend = v;
wavelet.Medgreinf = v; wavelet.Medgreinf = v;
wavelet.ushamethod = v;
wavelet.avoid = v; wavelet.avoid = v;
wavelet.showmask = v;
wavelet.tmr = v; wavelet.tmr = v;
wavelet.Lmethod = v; wavelet.Lmethod = v;
wavelet.CLmethod = v; wavelet.CLmethod = v;
@ -499,10 +507,13 @@ void ParamsEdited::set(bool v)
wavelet.TMmethod = v; wavelet.TMmethod = v;
wavelet.HSmethod = v; wavelet.HSmethod = v;
wavelet.Dirmethod = v; wavelet.Dirmethod = v;
wavelet.sigma = v;
wavelet.rescon = v; wavelet.rescon = v;
wavelet.resconH = v; wavelet.resconH = v;
wavelet.reschro = v; wavelet.reschro = v;
wavelet.tmrs = v; wavelet.tmrs = v;
wavelet.edgs = v;
wavelet.scale = v;
wavelet.gamma = v; wavelet.gamma = v;
wavelet.sup = v; wavelet.sup = v;
wavelet.sky = v; wavelet.sky = v;
@ -522,6 +533,7 @@ void ParamsEdited::set(bool v)
wavelet.edgthresh = v; wavelet.edgthresh = v;
wavelet.thr = v; wavelet.thr = v;
wavelet.thrH = v; wavelet.thrH = v;
wavelet.radius = v;
wavelet.skinprotect = v; wavelet.skinprotect = v;
wavelet.hueskin = v; wavelet.hueskin = v;
wavelet.hueskin2 = v; wavelet.hueskin2 = v;
@ -548,6 +560,7 @@ void ParamsEdited::set(bool v)
// wavelet.enaedge = v; // wavelet.enaedge = v;
// wavelet.enares = v; // wavelet.enares = v;
wavelet.expfinal = v; wavelet.expfinal = v;
wavelet.expclari = v;
wavelet.expcontrast = v; wavelet.expcontrast = v;
wavelet.expchroma = v; wavelet.expchroma = v;
wavelet.expedge = v; wavelet.expedge = v;
@ -825,10 +838,12 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
colorappearance.curveMode2 = colorappearance.curveMode2 && p.colorappearance.curveMode2 == other.colorappearance.curveMode2; colorappearance.curveMode2 = colorappearance.curveMode2 && p.colorappearance.curveMode2 == other.colorappearance.curveMode2;
colorappearance.curveMode3 = colorappearance.curveMode3 && p.colorappearance.curveMode3 == other.colorappearance.curveMode3; colorappearance.curveMode3 = colorappearance.curveMode3 && p.colorappearance.curveMode3 == other.colorappearance.curveMode3;
colorappearance.tempout = colorappearance.tempout && p.colorappearance.tempout == other.colorappearance.tempout; colorappearance.tempout = colorappearance.tempout && p.colorappearance.tempout == other.colorappearance.tempout;
colorappearance.autotempout = colorappearance.autotempout && p.colorappearance.autotempout == other.colorappearance.autotempout;
colorappearance.greenout = colorappearance.greenout && p.colorappearance.greenout == other.colorappearance.greenout; colorappearance.greenout = colorappearance.greenout && p.colorappearance.greenout == other.colorappearance.greenout;
colorappearance.ybout = colorappearance.ybout && p.colorappearance.ybout == other.colorappearance.ybout; colorappearance.ybout = colorappearance.ybout && p.colorappearance.ybout == other.colorappearance.ybout;
colorappearance.tempsc = colorappearance.tempsc && p.colorappearance.tempsc == other.colorappearance.tempsc; colorappearance.tempsc = colorappearance.tempsc && p.colorappearance.tempsc == other.colorappearance.tempsc;
colorappearance.greensc = colorappearance.greensc && p.colorappearance.greensc == other.colorappearance.greensc; colorappearance.greensc = colorappearance.greensc && p.colorappearance.greensc == other.colorappearance.greensc;
colorappearance.presetcat02 = colorappearance.presetcat02 && p.colorappearance.presetcat02 == other.colorappearance.presetcat02;
//colorBoost.amount = colorBoost.amount && p.colorBoost.amount == other.colorBoost.amount; //colorBoost.amount = colorBoost.amount && p.colorBoost.amount == other.colorBoost.amount;
//colorBoost.avoidclip = colorBoost.avoidclip && p.colorBoost.avoidclip == other.colorBoost.avoidclip; //colorBoost.avoidclip = colorBoost.avoidclip && p.colorBoost.avoidclip == other.colorBoost.avoidclip;
@ -1068,8 +1083,14 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
wavelet.greenlow = wavelet.greenlow && p.wavelet.greenlow == other.wavelet.greenlow; wavelet.greenlow = wavelet.greenlow && p.wavelet.greenlow == other.wavelet.greenlow;
wavelet.bluelow = wavelet.bluelow && p.wavelet.bluelow == other.wavelet.bluelow; wavelet.bluelow = wavelet.bluelow && p.wavelet.bluelow == other.wavelet.bluelow;
wavelet.lipst = wavelet.lipst && p.wavelet.lipst == other.wavelet.lipst; wavelet.lipst = wavelet.lipst && p.wavelet.lipst == other.wavelet.lipst;
wavelet.Medgreinf = wavelet.Medgreinf && p.wavelet.Medgreinf == other.wavelet.Medgreinf; wavelet.bluehigh = wavelet.bluehigh && p.wavelet.bluehigh == other.wavelet.bluehigh;
wavelet.mergeL = wavelet.mergeL && p.wavelet.mergeL == other.wavelet.mergeL;
wavelet.mergeC = wavelet.mergeC && p.wavelet.mergeC == other.wavelet.mergeC;
wavelet.softrad = wavelet.softrad && p.wavelet.softrad == other.wavelet.softrad;
wavelet.softradend = wavelet.softradend && p.wavelet.softradend == other.wavelet.softradend;
wavelet.ushamethod = wavelet.ushamethod && p.wavelet.ushamethod == other.wavelet.ushamethod;
wavelet.avoid = wavelet.avoid && p.wavelet.avoid == other.wavelet.avoid; wavelet.avoid = wavelet.avoid && p.wavelet.avoid == other.wavelet.avoid;
wavelet.showmask = wavelet.showmask && p.wavelet.showmask == other.wavelet.showmask;
wavelet.tmr = wavelet.tmr && p.wavelet.tmr == other.wavelet.tmr; wavelet.tmr = wavelet.tmr && p.wavelet.tmr == other.wavelet.tmr;
wavelet.Lmethod = wavelet.Lmethod && p.wavelet.Lmethod == other.wavelet.Lmethod; wavelet.Lmethod = wavelet.Lmethod && p.wavelet.Lmethod == other.wavelet.Lmethod;
wavelet.CLmethod = wavelet.CLmethod && p.wavelet.CLmethod == other.wavelet.CLmethod; wavelet.CLmethod = wavelet.CLmethod && p.wavelet.CLmethod == other.wavelet.CLmethod;
@ -1084,10 +1105,13 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
wavelet.TMmethod = wavelet.TMmethod && p.wavelet.TMmethod == other.wavelet.TMmethod; wavelet.TMmethod = wavelet.TMmethod && p.wavelet.TMmethod == other.wavelet.TMmethod;
wavelet.HSmethod = wavelet.HSmethod && p.wavelet.HSmethod == other.wavelet.HSmethod; wavelet.HSmethod = wavelet.HSmethod && p.wavelet.HSmethod == other.wavelet.HSmethod;
wavelet.Dirmethod = wavelet.Dirmethod && p.wavelet.Dirmethod == other.wavelet.Dirmethod; wavelet.Dirmethod = wavelet.Dirmethod && p.wavelet.Dirmethod == other.wavelet.Dirmethod;
wavelet.sigma = wavelet.sigma && p.wavelet.sigma == other.wavelet.sigma;
wavelet.rescon = wavelet.rescon && p.wavelet.rescon == other.wavelet.rescon; wavelet.rescon = wavelet.rescon && p.wavelet.rescon == other.wavelet.rescon;
wavelet.resconH = wavelet.resconH && p.wavelet.resconH == other.wavelet.resconH; wavelet.resconH = wavelet.resconH && p.wavelet.resconH == other.wavelet.resconH;
wavelet.reschro = wavelet.reschro && p.wavelet.reschro == other.wavelet.reschro; wavelet.reschro = wavelet.reschro && p.wavelet.reschro == other.wavelet.reschro;
wavelet.tmrs = wavelet.tmrs && p.wavelet.tmrs == other.wavelet.tmrs; wavelet.tmrs = wavelet.tmrs && p.wavelet.tmrs == other.wavelet.tmrs;
wavelet.edgs = wavelet.edgs && p.wavelet.edgs == other.wavelet.edgs;
wavelet.scale = wavelet.scale && p.wavelet.scale == other.wavelet.scale;
wavelet.gamma = wavelet.gamma && p.wavelet.gamma == other.wavelet.gamma; wavelet.gamma = wavelet.gamma && p.wavelet.gamma == other.wavelet.gamma;
wavelet.sup = wavelet.sup && p.wavelet.sup == other.wavelet.sup; wavelet.sup = wavelet.sup && p.wavelet.sup == other.wavelet.sup;
wavelet.sky = wavelet.sky && p.wavelet.sky == other.wavelet.sky; wavelet.sky = wavelet.sky && p.wavelet.sky == other.wavelet.sky;
@ -1107,6 +1131,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
wavelet.edgthresh = wavelet.edgthresh && p.wavelet.edgthresh == other.wavelet.edgthresh; wavelet.edgthresh = wavelet.edgthresh && p.wavelet.edgthresh == other.wavelet.edgthresh;
wavelet.thr = wavelet.thr && p.wavelet.thr == other.wavelet.thr; wavelet.thr = wavelet.thr && p.wavelet.thr == other.wavelet.thr;
wavelet.thrH = wavelet.thrH && p.wavelet.thrH == other.wavelet.thrH; wavelet.thrH = wavelet.thrH && p.wavelet.thrH == other.wavelet.thrH;
wavelet.radius = wavelet.radius && p.wavelet.radius == other.wavelet.radius;
wavelet.hueskin = wavelet.hueskin && p.wavelet.hueskin == other.wavelet.hueskin; wavelet.hueskin = wavelet.hueskin && p.wavelet.hueskin == other.wavelet.hueskin;
wavelet.hueskin2 = wavelet.hueskin2 && p.wavelet.hueskin2 == other.wavelet.hueskin2; wavelet.hueskin2 = wavelet.hueskin2 && p.wavelet.hueskin2 == other.wavelet.hueskin2;
wavelet.hllev = wavelet.hllev && p.wavelet.hllev == other.wavelet.hllev; wavelet.hllev = wavelet.hllev && p.wavelet.hllev == other.wavelet.hllev;
@ -1135,6 +1160,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
wavelet.expfinal = wavelet.expfinal && p.wavelet.expfinal == other.wavelet.expfinal; wavelet.expfinal = wavelet.expfinal && p.wavelet.expfinal == other.wavelet.expfinal;
wavelet.exptoning = wavelet.exptoning && p.wavelet.exptoning == other.wavelet.exptoning; wavelet.exptoning = wavelet.exptoning && p.wavelet.exptoning == other.wavelet.exptoning;
wavelet.expnoise = wavelet.expnoise && p.wavelet.expnoise == other.wavelet.expnoise; wavelet.expnoise = wavelet.expnoise && p.wavelet.expnoise == other.wavelet.expnoise;
wavelet.expclari = wavelet.expclari && p.wavelet.expclari == other.wavelet.expclari;
for (int level = 0; level < 9; ++level) { for (int level = 0; level < 9; ++level) {
wavelet.c[level] = wavelet.c[level] && p.wavelet.c[level] == other.wavelet.c[level]; wavelet.c[level] = wavelet.c[level] && p.wavelet.c[level] == other.wavelet.c[level];
@ -1998,6 +2024,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.colorappearance.tempout = mods.colorappearance.tempout; toEdit.colorappearance.tempout = mods.colorappearance.tempout;
} }
if (colorappearance.autotempout) {
toEdit.colorappearance.autotempout = mods.colorappearance.autotempout;
}
if (colorappearance.greenout) { if (colorappearance.greenout) {
toEdit.colorappearance.greenout = mods.colorappearance.greenout; toEdit.colorappearance.greenout = mods.colorappearance.greenout;
} }
@ -2067,6 +2097,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.colorappearance.tonecie = mods.colorappearance.tonecie; toEdit.colorappearance.tonecie = mods.colorappearance.tonecie;
} }
if (colorappearance.presetcat02) {
toEdit.colorappearance.presetcat02 = mods.colorappearance.presetcat02;
}
// if (colorappearance.sharpcie) toEdit.colorappearance.sharpcie = mods.colorappearance.sharpcie; // if (colorappearance.sharpcie) toEdit.colorappearance.sharpcie = mods.colorappearance.sharpcie;
if (impulseDenoise.enabled) { if (impulseDenoise.enabled) {
toEdit.impulseDenoise.enabled = mods.impulseDenoise.enabled; toEdit.impulseDenoise.enabled = mods.impulseDenoise.enabled;
@ -2875,6 +2909,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.wavelet.bluelow = mods.wavelet.bluelow; toEdit.wavelet.bluelow = mods.wavelet.bluelow;
} }
if (wavelet.mergeL) {
toEdit.wavelet.mergeL = mods.wavelet.mergeL;
}
if (wavelet.mergeC) {
toEdit.wavelet.mergeC = mods.wavelet.mergeC;
}
if (wavelet.softrad) {
toEdit.wavelet.softrad = mods.wavelet.softrad;
}
if (wavelet.softradend) {
toEdit.wavelet.softradend = mods.wavelet.softradend;
}
if (wavelet.lipst) { if (wavelet.lipst) {
toEdit.wavelet.lipst = mods.wavelet.lipst; toEdit.wavelet.lipst = mods.wavelet.lipst;
} }
@ -2883,10 +2933,18 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.wavelet.Medgreinf = mods.wavelet.Medgreinf; toEdit.wavelet.Medgreinf = mods.wavelet.Medgreinf;
} }
if (wavelet.ushamethod) {
toEdit.wavelet.ushamethod = mods.wavelet.ushamethod;
}
if (wavelet.avoid) { if (wavelet.avoid) {
toEdit.wavelet.avoid = mods.wavelet.avoid; toEdit.wavelet.avoid = mods.wavelet.avoid;
} }
if (wavelet.showmask) {
toEdit.wavelet.showmask = mods.wavelet.showmask;
}
if (wavelet.tmr) { if (wavelet.tmr) {
toEdit.wavelet.tmr = mods.wavelet.tmr; toEdit.wavelet.tmr = mods.wavelet.tmr;
} }
@ -2959,6 +3017,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.wavelet.thrH = dontforceSet && options.baBehav[ADDSET_WA_THRRH] ? toEdit.wavelet.thrH + mods.wavelet.thrH : mods.wavelet.thrH; toEdit.wavelet.thrH = dontforceSet && options.baBehav[ADDSET_WA_THRRH] ? toEdit.wavelet.thrH + mods.wavelet.thrH : mods.wavelet.thrH;
} }
if (wavelet.radius) {
toEdit.wavelet.radius = dontforceSet && options.baBehav[ADDSET_WA_RADIUS] ? toEdit.wavelet.radius + mods.wavelet.radius : mods.wavelet.radius;
}
if (wavelet.sup) { if (wavelet.sup) {
toEdit.wavelet.sup = mods.wavelet.sup; toEdit.wavelet.sup = mods.wavelet.sup;
} }
@ -3052,6 +3114,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.wavelet.expfinal = mods.wavelet.expfinal; toEdit.wavelet.expfinal = mods.wavelet.expfinal;
} }
if (wavelet.expclari) {
toEdit.wavelet.expclari = mods.wavelet.expclari;
}
if (wavelet.exptoning) { if (wavelet.exptoning) {
toEdit.wavelet.exptoning = mods.wavelet.exptoning; toEdit.wavelet.exptoning = mods.wavelet.exptoning;
} }
@ -3092,6 +3158,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.wavelet.edgeampli = mods.wavelet.edgeampli; toEdit.wavelet.edgeampli = mods.wavelet.edgeampli;
} }
if (wavelet.sigma) {
toEdit.wavelet.sigma = mods.wavelet.sigma;
}
if (wavelet.resconH) { if (wavelet.resconH) {
toEdit.wavelet.resconH = dontforceSet && options.baBehav[ADDSET_WA_RESCONH] ? toEdit.wavelet.resconH + mods.wavelet.resconH : mods.wavelet.resconH; toEdit.wavelet.resconH = dontforceSet && options.baBehav[ADDSET_WA_RESCONH] ? toEdit.wavelet.resconH + mods.wavelet.resconH : mods.wavelet.resconH;
} }
@ -3104,6 +3174,14 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.wavelet.tmrs = dontforceSet && options.baBehav[ADDSET_WA_TMRS] ? toEdit.wavelet.tmrs + mods.wavelet.tmrs : mods.wavelet.tmrs; toEdit.wavelet.tmrs = dontforceSet && options.baBehav[ADDSET_WA_TMRS] ? toEdit.wavelet.tmrs + mods.wavelet.tmrs : mods.wavelet.tmrs;
} }
if (wavelet.edgs) {
toEdit.wavelet.edgs = dontforceSet && options.baBehav[ADDSET_WA_EDGS] ? toEdit.wavelet.edgs + mods.wavelet.edgs : mods.wavelet.edgs;
}
if (wavelet.scale) {
toEdit.wavelet.scale = dontforceSet && options.baBehav[ADDSET_WA_SCALE] ? toEdit.wavelet.scale + mods.wavelet.scale : mods.wavelet.scale;
}
if (wavelet.gamma) { if (wavelet.gamma) {
toEdit.wavelet.gamma = dontforceSet && options.baBehav[ADDSET_WA_GAMMA] ? toEdit.wavelet.gamma + mods.wavelet.gamma : mods.wavelet.gamma; toEdit.wavelet.gamma = dontforceSet && options.baBehav[ADDSET_WA_GAMMA] ? toEdit.wavelet.gamma + mods.wavelet.gamma : mods.wavelet.gamma;
} }

View File

@ -290,10 +290,12 @@ struct ColorAppearanceParamsEdited {
bool datacie; bool datacie;
bool tonecie; bool tonecie;
bool tempout; bool tempout;
bool autotempout;
bool greenout; bool greenout;
bool ybout; bool ybout;
bool tempsc; bool tempsc;
bool greensc; bool greensc;
bool presetcat02;
}; };
struct DirPyrDenoiseParamsEdited { struct DirPyrDenoiseParamsEdited {
@ -502,7 +504,9 @@ struct WaveletParamsEdited {
bool cbenab; bool cbenab;
bool lipst; bool lipst;
bool Medgreinf; bool Medgreinf;
bool ushamethod;
bool avoid; bool avoid;
bool showmask;
bool tmr; bool tmr;
bool c[9]; bool c[9];
bool ch[9]; bool ch[9];
@ -519,10 +523,13 @@ struct WaveletParamsEdited {
bool Tilesmethod; bool Tilesmethod;
bool daubcoeffmethod; bool daubcoeffmethod;
bool Dirmethod; bool Dirmethod;
bool sigma;
bool rescon; bool rescon;
bool resconH; bool resconH;
bool reschro; bool reschro;
bool tmrs; bool tmrs;
bool edgs;
bool scale;
bool gamma; bool gamma;
bool sup; bool sup;
bool sky; bool sky;
@ -542,6 +549,7 @@ struct WaveletParamsEdited {
bool edgthresh; bool edgthresh;
bool thr; bool thr;
bool thrH; bool thrH;
bool radius;
bool skinprotect; bool skinprotect;
bool hueskin; bool hueskin;
bool hueskin2; bool hueskin2;
@ -568,6 +576,10 @@ struct WaveletParamsEdited {
bool bluemed; bool bluemed;
bool greenhigh; bool greenhigh;
bool bluehigh; bool bluehigh;
bool mergeL;
bool mergeC;
bool softrad;
bool softradend;
bool expcontrast; bool expcontrast;
bool expchroma; bool expchroma;
bool expedge; bool expedge;
@ -575,6 +587,7 @@ struct WaveletParamsEdited {
bool expfinal; bool expfinal;
bool exptoning; bool exptoning;
bool expnoise; bool expnoise;
bool expclari;
}; };
struct DirPyrEqualizerParamsEdited { struct DirPyrEqualizerParamsEdited {

View File

@ -389,8 +389,11 @@ Gtk::Widget* Preferences::getBatchProcPanel ()
appendBehavList (mi, M ("TP_WAVELET_THR"), ADDSET_WA_THRR, true); appendBehavList (mi, M ("TP_WAVELET_THR"), ADDSET_WA_THRR, true);
appendBehavList (mi, M ("TP_WAVELET_RESCONH"), ADDSET_WA_RESCONH, true); appendBehavList (mi, M ("TP_WAVELET_RESCONH"), ADDSET_WA_RESCONH, true);
appendBehavList (mi, M ("TP_WAVELET_THRH"), ADDSET_WA_THRRH, true); appendBehavList (mi, M ("TP_WAVELET_THRH"), ADDSET_WA_THRRH, true);
appendBehavList (mi, M ("TP_WAVELET_RADIUS"), ADDSET_WA_RADIUS, true);
appendBehavList (mi, M ("TP_WAVELET_RESCHRO"), ADDSET_WA_RESCHRO, true); appendBehavList (mi, M ("TP_WAVELET_RESCHRO"), ADDSET_WA_RESCHRO, true);
appendBehavList (mi, M ("TP_WAVELET_TMSTRENGTH"), ADDSET_WA_TMRS, true); appendBehavList (mi, M ("TP_WAVELET_TMSTRENGTH"), ADDSET_WA_TMRS, true);
appendBehavList (mi, M ("TP_WAVELET_TMEDGS"), ADDSET_WA_EDGS, true);
appendBehavList (mi, M ("TP_WAVELET_TMSCALE"), ADDSET_WA_SCALE, true);
appendBehavList (mi, M ("TP_WAVELET_SKY"), ADDSET_WA_SKYPROTECT, true); appendBehavList (mi, M ("TP_WAVELET_SKY"), ADDSET_WA_SKYPROTECT, true);
appendBehavList (mi, M ("TP_WAVELET_CONTRA"), ADDSET_WA_CONTRAST, true); appendBehavList (mi, M ("TP_WAVELET_CONTRA"), ADDSET_WA_CONTRAST, true);
appendBehavList (mi, M ("TP_WAVELET_STRENGTH"), ADDSET_WA_STRENGTH, true); appendBehavList (mi, M ("TP_WAVELET_STRENGTH"), ADDSET_WA_STRENGTH, true);

View File

@ -216,7 +216,7 @@ const ProcParams& Thumbnail::getProcParamsU ()
double ct; double ct;
getCamWB (ct, pparams->wb.green); getCamWB (ct, pparams->wb.green);
pparams->wb.temperature = ct; pparams->wb.temperature = ct;
} else if (pparams->wb.method == "Auto") { } else if (pparams->wb.method == "autold") {
double ct; double ct;
getAutoWB (ct, pparams->wb.green, pparams->wb.equal, pparams->wb.tempBias); getAutoWB (ct, pparams->wb.green, pparams->wb.equal, pparams->wb.tempBias);
pparams->wb.temperature = ct; pparams->wb.temperature = ct;

File diff suppressed because it is too large Load Diff

View File

@ -52,7 +52,8 @@ public:
void autoOpenCurve() override; void autoOpenCurve() override;
void curveChanged(CurveEditor* ce) override; void curveChanged(CurveEditor* ce) override;
void read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr) override; void read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr) override;
void setAdjusterBehavior(bool multiplieradd, bool thresholdadd, bool threshold2add, bool thresadd, bool chroadd, bool chromaadd, bool contrastadd, bool skinadd, bool reschroadd, bool tmrsadd, bool resconadd, bool resconHadd, bool thradd, bool thrHadd, bool skyadd, bool edgradadd, bool edgvaladd, bool strengthadd, bool gammaadd, bool edgedetectadd, bool edgedetectthradd, bool edgedetectthr2add); // void setAdjusterBehavior(bool multiplieradd, bool thresholdadd, bool threshold2add, bool thresadd, bool chroadd, bool chromaadd, bool contrastadd, bool skinadd, bool reschroadd, bool tmrsadd, bool resconadd, bool resconHadd, bool thradd, bool thrHadd, bool skyadd, bool edgradadd, bool edgvaladd, bool strengthadd, bool gammaadd, bool edgedetectadd, bool edgedetectthradd, bool edgedetectthr2add);
void setAdjusterBehavior (bool multiplieradd, bool thresholdadd, bool threshold2add, bool thresadd, bool chroadd, bool chromaadd, bool contrastadd, bool skinadd, bool reschroadd, bool tmrsadd, bool edgsadd, bool scaleadd, bool resconadd, bool resconHadd, bool thradd, bool thrHadd, bool radiusadd, bool skyadd, bool edgradadd, bool edgvaladd, bool strengthadd, bool gammaadd, bool edgedetectadd, bool edgedetectthradd, bool edgedetectthr2add);
void setBatchMode(bool batchMode) override; void setBatchMode(bool batchMode) override;
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override; void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
void setEditProvider(EditDataProvider *provider) override; void setEditProvider(EditDataProvider *provider) override;
@ -67,6 +68,18 @@ public:
void adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR) override; void adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR) override;
private: private:
rtengine::ProcEvent EvWavenaclari;
rtengine::ProcEvent EvWavushamet;
rtengine::ProcEvent EvWavmergeL;
rtengine::ProcEvent EvWavmergeC;
rtengine::ProcEvent EvWavsoftrad;
rtengine::ProcEvent EvWavsoftradend;
rtengine::ProcEvent EvWavshowmask;
rtengine::ProcEvent EvWavedgs;
rtengine::ProcEvent EvWavscale;
rtengine::ProcEvent EvWavradius;
rtengine::ProcEvent EvWavsigma;
void foldAllButMe(GdkEventButton* event, MyExpander *expander); void foldAllButMe(GdkEventButton* event, MyExpander *expander);
void colorForValue(double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller) override; void colorForValue(double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller) override;
@ -84,6 +97,7 @@ private:
void TMmethodChanged(); void TMmethodChanged();
void TilesmethodChanged(); void TilesmethodChanged();
void avoidToggled(); void avoidToggled();
void showmaskToggled ();
void cbenabToggled(); void cbenabToggled();
void contrastMinusPressed(); void contrastMinusPressed();
void contrastPlusPressed(); void contrastPlusPressed();
@ -99,6 +113,7 @@ private:
void tmrToggled(); void tmrToggled();
void updatewavLabel (); void updatewavLabel ();
void wavChanged(double nlevel) override; void wavChanged(double nlevel) override;
void ushamethodChanged();
void HSmethodUpdateUI(); void HSmethodUpdateUI();
void CHmethodUpdateUI(); void CHmethodUpdateUI();
@ -150,14 +165,18 @@ private:
Gtk::CheckButton* const lipst; Gtk::CheckButton* const lipst;
Gtk::CheckButton* const avoid; Gtk::CheckButton* const avoid;
Gtk::CheckButton* const tmr; Gtk::CheckButton* const tmr;
Gtk::CheckButton* const showmask;
Gtk::Button* const neutralchButton; Gtk::Button* const neutralchButton;
Adjuster* correction[9]; Adjuster* correction[9];
Adjuster* correctionch[9]; Adjuster* correctionch[9];
Adjuster* const sigma;
Adjuster* const rescon; Adjuster* const rescon;
Adjuster* const resconH; Adjuster* const resconH;
Adjuster* const reschro; Adjuster* const reschro;
Adjuster* const tmrs; Adjuster* const tmrs;
Adjuster* const edgs;
Adjuster* const scale;
Adjuster* const gamma; Adjuster* const gamma;
Adjuster* const sup; Adjuster* const sup;
Adjuster* const sky; Adjuster* const sky;
@ -167,6 +186,7 @@ private:
Adjuster* const contrast; Adjuster* const contrast;
Adjuster* const thr; Adjuster* const thr;
Adjuster* const thrH; Adjuster* const thrH;
Adjuster* const radius;
Adjuster* const skinprotect; Adjuster* const skinprotect;
Adjuster* const edgrad; Adjuster* const edgrad;
Adjuster* const edgval; Adjuster* const edgval;
@ -200,6 +220,11 @@ private:
Adjuster* const edgedetectthr2; Adjuster* const edgedetectthr2;
Adjuster* const edgesensi; Adjuster* const edgesensi;
Adjuster* const edgeampli; Adjuster* const edgeampli;
Adjuster* const mergeL;
Adjuster* const mergeC;
Adjuster* const softrad;
Adjuster* const softradend;
MyComboBoxText* const Lmethod; MyComboBoxText* const Lmethod;
sigc::connection Lmethodconn; sigc::connection Lmethodconn;
MyComboBoxText* const CHmethod; MyComboBoxText* const CHmethod;
@ -228,13 +253,18 @@ private:
sigc::connection Dirmethodconn; sigc::connection Dirmethodconn;
MyComboBoxText* const Medgreinf; MyComboBoxText* const Medgreinf;
sigc::connection MedgreinfConn; sigc::connection MedgreinfConn;
MyComboBoxText* const ushamethod;
sigc::connection ushamethodconn;
Gtk::Frame* const chanMixerHLFrame; Gtk::Frame* const chanMixerHLFrame;
Gtk::Frame* const chanMixerMidFrame; Gtk::Frame* const chanMixerMidFrame;
Gtk::Frame* const chanMixerShadowsFrame; Gtk::Frame* const chanMixerShadowsFrame;
Gtk::Frame* const chromaFrame;
Gtk::Label* const wavLabels; Gtk::Label* const wavLabels;
Gtk::Label* const labmC; Gtk::Label* const labmC;
Gtk::Label* const labmNP; Gtk::Label* const labmNP;
Gtk::Label* const usharpLabel;
MyExpander* const expchroma; MyExpander* const expchroma;
MyExpander* const expcontrast; MyExpander* const expcontrast;
MyExpander* const expedge; MyExpander* const expedge;
@ -244,18 +274,20 @@ private:
MyExpander* const expresid; MyExpander* const expresid;
MyExpander* const expsettings; MyExpander* const expsettings;
MyExpander* const exptoning; MyExpander* const exptoning;
MyExpander* const expclari;
Gtk::HBox* const neutrHBox; Gtk::HBox* const neutrHBox;
Gtk::HBox* const usharpHBox;
sigc::connection enableChromaConn, enableContrastConn, enableEdgeConn, enableFinalConn; sigc::connection enableChromaConn, enableContrastConn, enableEdgeConn, enableFinalConn, enableclariConn;
sigc::connection enableNoiseConn, enableResidConn, enableToningConn; sigc::connection enableNoiseConn, enableResidConn, enableToningConn;
sigc::connection medianConn, avoidConn, tmrConn, medianlevConn, linkedgConn, lipstConn, cbenabConn, neutralconn; sigc::connection medianConn, avoidConn, tmrConn, medianlevConn, linkedgConn, lipstConn, cbenabConn, neutralconn, showmaskConn;
sigc::connection neutralPressedConn; sigc::connection neutralPressedConn;
sigc::connection contrastPlusPressedConn; sigc::connection contrastPlusPressedConn;
sigc::connection contrastMinusPressedConn; sigc::connection contrastMinusPressedConn;
sigc::connection neutralchPressedConn; sigc::connection neutralchPressedConn;
bool lastmedian, lastmedianlev, lastlinkedg, lastavoid, lastlipst, lasttmr, lastcbenab; bool lastmedian, lastmedianlev, lastlinkedg, lastavoid, lastlipst, lasttmr, lastcbenab, lastshowmask;
int nextnlevel; int nextnlevel;
IdleRegister idle_register; IdleRegister idle_register;

View File

@ -142,7 +142,7 @@ static double wbTemp2Slider(double temp)
return sval; return sval;
} }
WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WBALANCE_LABEL"), false, true), wbp(nullptr), wblistener(nullptr) WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WBALANCE_LABEL"), true, true), wbp(nullptr), wblistener(nullptr)
{ {
Gtk::Grid* methodgrid = Gtk::manage(new Gtk::Grid()); Gtk::Grid* methodgrid = Gtk::manage(new Gtk::Grid());
@ -175,6 +175,14 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
row[methodColumns.colId] = i + 100; row[methodColumns.colId] = i + 100;
} }
if (currType == WBEntry::Type::AUTO) {
// Creating the auto category
row = *(refTreeModel->append());
row[methodColumns.colIcon] = wbPixbufs[toUnderlying(currType)];
row[methodColumns.colLabel] = M("TP_WBALANCE_AUTO_HEADER");
row[methodColumns.colId] = i + 100;
}
if (currType == WBEntry::Type::WATER) { if (currType == WBEntry::Type::WATER) {
// Creating the under water subcategory header // Creating the under water subcategory header
row = *(refTreeModel->append()); row = *(refTreeModel->append());
@ -213,6 +221,7 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
|| currType == WBEntry::Type::WATER || currType == WBEntry::Type::WATER
|| currType == WBEntry::Type::FLASH || currType == WBEntry::Type::FLASH
|| currType == WBEntry::Type::LED || currType == WBEntry::Type::LED
|| currType == WBEntry::Type::AUTO
) { ) {
childrow = *(refTreeModel->append(row.children())); childrow = *(refTreeModel->append(row.children()));
childrow[methodColumns.colIcon] = wbPixbufs[toUnderlying(currType)]; childrow[methodColumns.colIcon] = wbPixbufs[toUnderlying(currType)];
@ -315,6 +324,9 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
Gtk::Image* itempbiasL = Gtk::manage (new RTImage ("circle-blue-small.png")); Gtk::Image* itempbiasL = Gtk::manage (new RTImage ("circle-blue-small.png"));
Gtk::Image* itempbiasR = Gtk::manage (new RTImage ("circle-yellow-small.png")); Gtk::Image* itempbiasR = Gtk::manage (new RTImage ("circle-yellow-small.png"));
StudLabel = Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER));
StudLabel->set_tooltip_text(M("TP_WBALANCE_STUDLABEL_TOOLTIP"));
temp = Gtk::manage (new Adjuster (M("TP_WBALANCE_TEMPERATURE"), MINTEMP, MAXTEMP, 5, CENTERTEMP, itempL, itempR, &wbSlider2Temp, &wbTemp2Slider)); temp = Gtk::manage (new Adjuster (M("TP_WBALANCE_TEMPERATURE"), MINTEMP, MAXTEMP, 5, CENTERTEMP, itempL, itempR, &wbSlider2Temp, &wbTemp2Slider));
green = Gtk::manage (new Adjuster (M("TP_WBALANCE_GREEN"), MINGREEN, MAXGREEN, 0.001, 1.0, igreenL, igreenR)); green = Gtk::manage (new Adjuster (M("TP_WBALANCE_GREEN"), MINGREEN, MAXGREEN, 0.001, 1.0, igreenL, igreenR));
equal = Gtk::manage (new Adjuster (M("TP_WBALANCE_EQBLUERED"), MINEQUAL, MAXEQUAL, 0.001, 1.0, iblueredL, iblueredR)); equal = Gtk::manage (new Adjuster (M("TP_WBALANCE_EQBLUERED"), MINEQUAL, MAXEQUAL, 0.001, 1.0, iblueredL, iblueredR));
@ -335,6 +347,7 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB
boxgreen->pack_start(*igreenL); boxgreen->pack_start(*igreenL);
boxgreen->pack_start(*green); boxgreen->pack_start(*green);
boxgreen->pack_start(*igreenR);*/ boxgreen->pack_start(*igreenR);*/
pack_start(*StudLabel);
pack_start (*temp); pack_start (*temp);
//pack_start (*boxgreen); //pack_start (*boxgreen);
@ -448,6 +461,7 @@ void WhiteBalance::optChanged ()
methconn.block(prevState); methconn.block(prevState);
return; return;
} }
StudLabel->hide();
if (opt != row[methodColumns.colId]) { if (opt != row[methodColumns.colId]) {
@ -463,6 +477,12 @@ void WhiteBalance::optChanged ()
const WBEntry& currMethod = WBParams::getWbEntries()[methodId]; const WBEntry& currMethod = WBParams::getWbEntries()[methodId];
tempBias->set_sensitive(currMethod.type == WBEntry::Type::AUTO); tempBias->set_sensitive(currMethod.type == WBEntry::Type::AUTO);
bool autit = (currMethod.ppLabel == "autitcgreen");
if (autit) {
StudLabel->show();
} else {
StudLabel->hide();
}
switch (currMethod.type) { switch (currMethod.type) {
case WBEntry::Type::CAMERA: case WBEntry::Type::CAMERA:
@ -547,6 +567,8 @@ void WhiteBalance::optChanged ()
void WhiteBalance::spotPressed () void WhiteBalance::spotPressed ()
{ {
StudLabel->hide();
if (wblistener) { if (wblistener) {
wblistener->spotWBRequested (getSize()); wblistener->spotWBRequested (getSize());
} }
@ -683,6 +705,13 @@ void WhiteBalance::read (const ProcParams* pp, const ParamsEdited* pedited)
} }
tempBias->set_sensitive(wbValues.type == WBEntry::Type::AUTO); tempBias->set_sensitive(wbValues.type == WBEntry::Type::AUTO);
bool autit = (wbValues.ppLabel == "autitcgreen");
if (autit) {
StudLabel->show();
} else {
StudLabel->hide();
}
} }
setEnabled(pp->wb.enabled); setEnabled(pp->wb.enabled);
@ -868,7 +897,7 @@ int WhiteBalance::_setActiveMethod(Glib::ustring &label, Gtk::TreeModel::Childre
if (row[methodColumns.colLabel] == label) { if (row[methodColumns.colLabel] == label) {
method->set_active(iter); method->set_active(iter);
found = method->get_active_row_number(); found = row[methodColumns.colId];
} }
if (found != -1) { if (found != -1) {
@ -901,15 +930,19 @@ inline Gtk::TreeRow WhiteBalance::getActiveMethod ()
return *(method->get_active()); return *(method->get_active());
} }
void WhiteBalance::WBChanged(double temperature, double greenVal) void WhiteBalance::WBChanged(double temperature, double greenVal, float studgood)
{ {
idle_register.add( idle_register.add(
[this, temperature, greenVal]() -> bool [this, temperature, greenVal, studgood]() -> bool
{ {
disableListener(); disableListener();
setEnabled(true); setEnabled(true);
temp->setValue(temperature); temp->setValue(temperature);
green->setValue(greenVal); green->setValue(greenVal);
StudLabel->set_text(
Glib::ustring::compose(M("TP_WBALANCE_STUDLABEL"),
Glib::ustring::format(std::fixed, std::setprecision(4), studgood))
);
temp->setDefault(temperature); temp->setDefault(temperature);
green->setDefault(greenVal); green->setDefault(greenVal);
enableListener(); enableListener();

View File

@ -43,6 +43,9 @@ class WhiteBalance final : public ToolParamBlock, public AdjusterListener, publi
WBLT_PP WBLT_PP
}; };
private:
Gtk::Label* StudLabel;
protected: protected:
class MethodColumns : public Gtk::TreeModel::ColumnRecord class MethodColumns : public Gtk::TreeModel::ColumnRecord
{ {
@ -119,7 +122,7 @@ public:
wblistener = l; wblistener = l;
} }
void setWB (int temp, double green); void setWB (int temp, double green);
void WBChanged (double temp, double green) override; void WBChanged (double temp, double green, float studgood) override;
void setAdjusterBehavior (bool tempadd, bool greenadd, bool equaladd, bool tempbiasadd); void setAdjusterBehavior (bool tempadd, bool greenadd, bool equaladd, bool tempbiasadd);
void trimValues (rtengine::procparams::ProcParams* pp) override; void trimValues (rtengine::procparams::ProcParams* pp) override;

View File

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>RawTherapee-bin</string>
<key>CFBundleIdentifier</key>
<string>com.rawtherapee.rawtherapee</string>
</dict>
</plist>

View File

@ -1,7 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>LSEnvironment</key>
<dict>
<key>XDG_DATA_DIRS</key>
<string>/Applications/RawTherapee.app/Contents/Resources/share</string>
<key>DYLD_FALLBACK_LIBRARY_PATH</key>
<string>/Applications/RawTherapee.app/Contents/Frameworks</string>
<key>GTK_PATH</key>
<string>/Applications/RawTherapee.app/Contents/Frameworks</string>
<key>GTK_IM_MODULE_FILE</key>
<string>/Applications/RawTherapee.app/Contents/Resources/etc/gtk-3.0/gtk.immodules</string>
<key>GTK_MODULES</key>
<string>/Applications/RawTherapee.app/Contents/Frameworks/im-quartz.so</string>
<key>XDG_DATA_HOME</key>
<string>/Applications/RawTherapee.app/Contents/Resources/share</string>
<key>GSETTINGS_SCHEMA_DIR</key>
<string>/Applications/RawTherapee.app/Contents/Resources/share/glib-2.0/schemas</string>
<key>GDK_PIXBUF_MODULE_FILE</key>
<string>/Applications/RawTherapee.app/Contents/Resources/etc/gtk-3.0/gdk-pixbuf.loaders</string>
<key>GDK_PIXBUF_MODULEDIR</key>
<string>/Applications/RawTherapee.app/Contents/Frameworks</string>
<key>FONTCONFIG_PATH</key>
<string>/Applications/RawTherapee.app/Contents/Resources/etc/fonts</string>
<key>LIBDIR</key>
<string>/Applications/RawTherapee.app/Contents/Frameworks</string>
<key>DATADIR</key>
<string>/Applications/RawTherapee.app/Contents/Resources</string>
<key>GDK_RENDERING</key>
<string>similar</string>
<key>GTK_OVERLAY_SCROLLING</key>
<string>0</string>
<key>GDK_NATIVE_WINDOWS</key>
<string>1</string>
</dict>
<key>ATSApplicationFontsPath</key>
<string>etc/fonts</string>
<key>LSMultipleInstancesProhibited</key>
<true />
<key>LSMinimumSystemVersion</key>
<string>@minimum_macos_version@</string>
<key>CFBundleDevelopmentRegion</key> <key>CFBundleDevelopmentRegion</key>
<string>English</string> <string>English</string>
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
@ -21,7 +59,7 @@
<key>CFBundleTypeRole</key> <key>CFBundleTypeRole</key>
<string>Editor</string> <string>Editor</string>
<key>LSIsAppleDefaultForType</key> <key>LSIsAppleDefaultForType</key>
<true/> <true />
<key>LSItemContentTypes</key> <key>LSItemContentTypes</key>
<array> <array>
<string>com.rawtherapee.pp3</string> <string>com.rawtherapee.pp3</string>
@ -115,7 +153,7 @@
<key>CFBundleIconFile</key> <key>CFBundleIconFile</key>
<string>rawtherapee.icns</string> <string>rawtherapee.icns</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>com.rawtherapee.rawtherapee</string> <string>com.rawtherapee.RawTherapee</string>
<key>CFBundleInfoDictionaryVersion</key> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
@ -133,7 +171,7 @@
<string>@arch@</string> <string>@arch@</string>
</array> </array>
<key>NSHighResolutionCapable</key> <key>NSHighResolutionCapable</key>
<true/> <true />
<key>NSHumanReadableCopyright</key> <key>NSHumanReadableCopyright</key>
<string>Copyright © 2004-2010 Gábor Horváth, 2010-2017 RawTherapee Development Team</string> <string>Copyright © 2004-2010 Gábor Horváth, 2010-2017 RawTherapee Development Team</string>
<key>UTExportedTypeDeclarations</key> <key>UTExportedTypeDeclarations</key>
@ -164,4 +202,4 @@
</dict> </dict>
</array> </array>
</dict> </dict>
</plist> </plist>

View File

@ -1,33 +0,0 @@
#!/bin/sh
# GIMP has this next line regarding raising the number-of-open-files limit:
ulimit -n 7000
cd "$(dirname "$0")" || exit 1
cwd="$(pwd)"
app="/Applications/RawTherapee.app"
lib="${app}/Contents/Frameworks"
resources="${app}/Contents/Resources"
etc="${resources}/etc"
export XDG_DATA_DIRS="${resources}/share"
export DYLD_FALLBACK_LIBRARY_PATH="${lib}"
export GTK_PATH="${lib}/gtk-3.0/3.0.0"
export XDG_DATA_HOME="${resources}/share"
export GSETTINGS_SCHEMA_DIR="${resources}/share/glib-2.0/schemas"
export GDK_PIXBUF_MODULE_FILE="${etc}/gtk-3.0/gdk-pixbuf.loaders"
export GDK_PIXBUF_MODULEDIR="${lib}"
export RT_SETTINGS="${HOME}/Library/Application Support/RawTherapee/config"
export RT_CACHE="${HOME}/Library/Application Support/RawTherapee/cache"
# Strip out system argument
case "$1" in
-psn_*) shift ;;
esac
# Prevent crash when directory name contains special characters
AppleLocale=`defaults read -g AppleLocale`
export LANG=${AppleLocale%@*}.UTF-8
exec "${app}/Contents/MacOS/bin/rawtherapee-bin" "$@"

View File

@ -1,30 +0,0 @@
diff --git a/lib/iconv.c b/lib/iconv.c
index 3785296..24a0f07 100644
--- a/lib/iconv.c
+++ b/lib/iconv.c
@@ -607,4 +607,25 @@ strong_alias (libiconv, iconv)
strong_alias (libiconv_close, iconv_close)
#endif
+#undef iconv_open
+#undef iconv
+#undef iconv_close
+
+LIBICONV_DLL_EXPORTED iconv_t iconv_open (const char* tocode, const char* fromcode)
+{
+ return libiconv_open(tocode, fromcode);
+}
+
+LIBICONV_DLL_EXPORTED size_t iconv (iconv_t icd,
+ ICONV_CONST char * * inbuf, size_t *inbytesleft,
+ char * * outbuf, size_t *outbytesleft)
+{
+ return libiconv(icd, inbuf, inbytesleft, outbuf, outbytesleft);
+}
+
+LIBICONV_DLL_EXPORTED int iconv_close (iconv_t icd)
+{
+ return libiconv_close(icd);
+}
+
#endif

View File

@ -1,30 +0,0 @@
diff --git a/lib/iconv.c b/lib/iconv.c
index 31853a7..630a498 100644
--- a/lib/iconv.c
+++ b/lib/iconv.c
@@ -611,4 +611,25 @@ strong_alias (libiconv, iconv)
strong_alias (libiconv_close, iconv_close)
#endif
+#undef iconv_open
+#undef iconv
+#undef iconv_close
+
+LIBICONV_DLL_EXPORTED iconv_t iconv_open (const char* tocode, const char* fromcode)
+{
+ return libiconv_open(tocode, fromcode);
+}
+
+LIBICONV_DLL_EXPORTED size_t iconv (iconv_t icd,
+ ICONV_CONST char * * inbuf, size_t *inbytesleft,
+ char * * outbuf, size_t *outbytesleft)
+{
+ return libiconv(icd, inbuf, inbytesleft, outbuf, outbytesleft);
+}
+
+LIBICONV_DLL_EXPORTED int iconv_close (iconv_t icd)
+{
+ return libiconv_close(icd);
+}
+
#endif

View File

@ -34,27 +34,43 @@ function CheckLink {
done done
} }
function ModifyInstallNames {
find -E "${CONTENTS}" -type f -regex '.*/(rawtherapee-cli|rawtherapee|.*\.(dylib|so))' | while read -r x; do
msg "Modifying install names: ${x}"
{
# id
if [[ ${x:(-6)} == ".dylib" ]] || [[ f${x:(-3)} == ".so" ]]; then
install_name_tool -id /Applications/"${LIB}"/$(basename ${x}) ${x}
fi
GetDependencies "${x}" | while read -r y
do
install_name_tool -change ${y} /Applications/"${LIB}"/$(basename ${y}) ${x}
done
} | bash -v
done
}
# Source check # Source check
if [[ ! -d "${CMAKE_BUILD_TYPE}" ]]; then if [[ ! -d $CMAKE_BUILD_TYPE ]]; then
msgError "${PWD}/${CMAKE_BUILD_TYPE} folder does not exist. Please execute 'make install' first." msgError "${PWD}/${CMAKE_BUILD_TYPE} folder does not exist. Please execute 'make install' first."
exit 1 exit 1
fi fi
# Update project version # Update project version
if [[ -x "$(which git)" && -d "${PROJECT_SOURCE_DIR}/.git" ]]; then if [[ -x $(which git) && -d $PROJECT_SOURCE_DIR/.git ]]; then
### This section is copied from tools/generateReleaseInfo ### This section is copied from tools/generateReleaseInfo
# Get version description. # Get version description.
# Depending on whether you checked out a branch (dev) or a tag (release), # Depending on whether you checked out a branch (dev) or a tag (release),
# "git describe" will return "5.0-gtk2-2-g12345678" or "5.0-gtk2", respectively. # "git describe" will return "5.0-gtk2-2-g12345678" or "5.0-gtk2", respectively.
gitDescribe="$(git describe --tags --always)" gitDescribe="$(git describe --tags --always)"
# Apple requires a numeric version of the form n.n.n # Apple requires a numeric version of the form n.n.n
# https://goo.gl/eWDQv6 # https://goo.gl/eWDQv6
# Get number of commits since tagging. This is what gitDescribe uses. # Get number of commits since tagging. This is what gitDescribe uses.
# Works when checking out branch, tag or commit. # Works when checking out branch, tag or commit.
gitCommitsSinceTag="$(git rev-list --count HEAD --not $(git tag --merged HEAD))" gitCommitsSinceTag="$(git rev-list --count HEAD --not $(git tag --merged HEAD))"
# Create numeric version. # Create numeric version.
# This version is nonsense, either don't use it at all or use it only where you have no other choice, e.g. Inno Setup's VersionInfoVersion. # This version is nonsense, either don't use it at all or use it only where you have no other choice, e.g. Inno Setup's VersionInfoVersion.
# Strip everything after hyphen, e.g. "5.0-gtk2" -> "5.0", "5.1-rc1" -> "5.1" (ergo BS). # Strip everything after hyphen, e.g. "5.0-gtk2" -> "5.0", "5.1-rc1" -> "5.1" (ergo BS).
@ -65,14 +81,13 @@ if [[ -x "$(which git)" && -d "${PROJECT_SOURCE_DIR}/.git" ]]; then
gitVersionNumericBS="${gitVersionNumericBS}.${gitCommitsSinceTag}" # Remove everything until after first hyphen: 5.0 gitVersionNumericBS="${gitVersionNumericBS}.${gitCommitsSinceTag}" # Remove everything until after first hyphen: 5.0
fi fi
### Copy end. ### Copy end.
PROJECT_FULL_VERSION="$gitDescribe" PROJECT_FULL_VERSION="$gitDescribe"
PROJECT_VERSION="$gitVersionNumericBS" PROJECT_VERSION="$gitVersionNumericBS"
fi fi
MINIMUM_SYSTEM_VERSION="$(otool -l "${CMAKE_BUILD_TYPE}"/MacOS/rawtherapee | grep -A2 'LC_VERSION_MIN_MACOSX' | awk '$1 ~ /version/ { printf $2 }')" MINIMUM_SYSTEM_VERSION="$(otool -l "${CMAKE_BUILD_TYPE}"/MacOS/rawtherapee | grep -A2 'LC_VERSION_MIN_MACOSX' | awk '$1 ~ /version/ { printf $2 }')"
if [[ -z "${MINIMUM_SYSTEM_VERSION}" ]]; then if [[ -z $MINIMUM_SYSTEM_VERSION ]]; then
MINIMUM_SYSTEM_VERSION="$(sw_vers -productVersion | cut -d. -f-2)" MINIMUM_SYSTEM_VERSION="$(sw_vers -productVersion | cut -d. -f-2)"
fi fi
@ -89,9 +104,33 @@ GTK_PREFIX: ${GTK_PREFIX}
PWD: ${PWD} PWD: ${PWD}
__EOS__ __EOS__
LOCAL_PREFIX="$(cmake .. -LA -N | grep "LOCAL_PREFIX" | cut -d "=" -f2)" minimum_macos_version=${MINIMUM_SYSTEM_VERSION}
EXPATLIB="$(cmake .. -LA -N | grep "pkgcfg_lib_EXPAT_expat" | cut -d "=" -f2)"
# Retreive cached values from cmake
#In: LOCAL_PREFIX:STRING=/opt
#Out: /opt
LOCAL_PREFIX="$(cmake .. -L -N | grep LOCAL_PREFIX)"; LOCAL_PREFIX="${LOCAL_PREFIX#*=}"
#In: pkgcfg_lib_EXPAT_expat:FILEPATH=/opt/local/lib/libexpat.dylib
#Out: /opt/local/lib/libexpat.dylib
EXPATLIB="$(cmake .. -LA -N | grep pkgcfg_lib_EXPAT_expat)"; pkgcfg_lib_EXPAT_expat="${pkgcfg_lib_EXPAT_expat#*=}"
#In: CODESIGNID:STRING=Developer ID Application: Doctor Who (1234567890)
#Out: Developer ID Application: Doctor Who (1234567890)
CODESIGNID="$(cmake .. -L -N | grep CODESIGNID)"; CODESIGNID="${CODESIGNID#*=}"
#In: NOTARY:STRING=--username drwho@bbc.com --password abcd-efgh-hijk-lmno
#Out: --username drwho@bbc.com --password abcd-efgh-hijk-lmno
NOTARY="$(cmake .. -L -N | grep NOTARY)"; NOTARY="${NOTARY#*=}"
# In: FANCY_DMG:BOOL=ON
# Out: ON
FANCY_DMG="$(cmake .. -L -N | grep FANCY_DMG)"; FANCY_DMG="${FANCY_DMG#*=}"
if [[ -n $FANCY_DMG ]]; then
echo "Fancy .dmg build is ON."
fi
APP="${PROJECT_NAME}.app" APP="${PROJECT_NAME}.app"
CONTENTS="${APP}/Contents" CONTENTS="${APP}/Contents"
RESOURCES="${CONTENTS}/Resources" RESOURCES="${CONTENTS}/Resources"
@ -102,17 +141,27 @@ EXECUTABLE="${MACOS}/rawtherapee"
GDK_PREFIX="${LOCAL_PREFIX}/local/" GDK_PREFIX="${LOCAL_PREFIX}/local/"
msg "Removing old files:" msg "Removing old files:"
rm -rf "${APP}" "${PROJECT_NAME}_*.dmg" "*zip" rm -rf "${APP}" *.dmg *.zip
msg "Creating bundle container:" msg "Creating bundle container:"
install -d "${RESOURCES}" \ install -d "${RESOURCES}"
"${MACOS}" \ install -d "${MACOS}"
"${LIB}" \ install -d "${LIB}"
"${ETC}" install -d "${ETC}"
msg "Copying release files:" msg "Copying binary executable files."
ditto "${CMAKE_BUILD_TYPE}/MacOS" "${MACOS}" ditto "${CMAKE_BUILD_TYPE}/MacOS" "${MACOS}"
ditto "Resources" "${RESOURCES}"
msg "Copying Resources directory."
cp AboutThisBuild.txt "${RESOURCES}"
ditto "${CMAKE_BUILD_TYPE}/Resources" "${RESOURCES}"
echo "\n--------\n" >> "${RESOURCES}/AboutThisBuild.txt"
echo "Bundle system: $(sysctl -n machdep.cpu.brand_string)" >> "${RESOURCES}/AboutThisBuild.txt"
echo "Bundle OS: $(sw_vers -productName) $(sw_vers -productVersion) $(sw_vers -buildVersion) $(uname -mrs)" >> "${RESOURCES}/AboutThisBuild.txt"
echo "Bundle date: $(date -Ru) UTC" >> "${RESOURCES}/AboutThisBuild.txt"
echo "Bundle epoch: $(date +%s)" >> "${RESOURCES}/AboutThisBuild.txt"
echo "Bundle UUID: $(uuidgen|tr 'A-Z' 'a-z')" >> "${RESOURCES}/AboutThisBuild.txt"
# Copy the Lensfun database into the app bundle # Copy the Lensfun database into the app bundle
mkdir -p "${RESOURCES}/share/lensfun" mkdir -p "${RESOURCES}/share/lensfun"
@ -124,9 +173,12 @@ ditto ${LOCAL_PREFIX}/local/lib/liblensfun.2.dylib "${CONTENTS}/Frameworks/lible
# Copy libomp to Frameworks # Copy libomp to Frameworks
ditto ${LOCAL_PREFIX}/local/lib/libomp.dylib "${CONTENTS}/Frameworks" ditto ${LOCAL_PREFIX}/local/lib/libomp.dylib "${CONTENTS}/Frameworks"
msg "Copying dependencies from ${GTK_PREFIX}:" msg "Copying dependencies from ${GTK_PREFIX}."
CheckLink "${EXECUTABLE}" CheckLink "${EXECUTABLE}"
# dylib install names
ModifyInstallNames
# Copy libjpeg-turbo ("62") into the app bundle # Copy libjpeg-turbo ("62") into the app bundle
ditto ${LOCAL_PREFIX}/local/lib/libjpeg.62.dylib "${CONTENTS}/Frameworks/libjpeg.62.dylib" ditto ${LOCAL_PREFIX}/local/lib/libjpeg.62.dylib "${CONTENTS}/Frameworks/libjpeg.62.dylib"
@ -168,11 +220,6 @@ ditto "${LIB}"/gtk-3.0/3*/immodules/*.{dylib,so} "${LIB}"
rm -r "${LIB}"/gtk-3.0 rm -r "${LIB}"/gtk-3.0
rm -r "${LIB}"/gdk-pixbuf-2.0 rm -r "${LIB}"/gdk-pixbuf-2.0
msg "Build glib database:"
mkdir -p ${RESOURCES}/share/glib-2.0
ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/glib-2.0/schemas
"${LOCAL_PREFIX}/local/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas"
# GTK+3 themes # GTK+3 themes
msg "Copy GTK+3 theme and icon resources:" msg "Copy GTK+3 theme and icon resources:"
ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css
@ -189,32 +236,15 @@ ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/icons/Adwaita/index.theme
"${LOCAL_PREFIX}/local/bin/gtk-update-icon-cache" "${RESOURCES}/share/icons/Adwaita" "${LOCAL_PREFIX}/local/bin/gtk-update-icon-cache" "${RESOURCES}/share/icons/Adwaita"
ditto "${LOCAL_PREFIX}/local/share/icons/hicolor" "${RESOURCES}/share/icons/hicolor" ditto "${LOCAL_PREFIX}/local/share/icons/hicolor" "${RESOURCES}/share/icons/hicolor"
# Install names
find -E "${CONTENTS}" -type f -regex '.*/(rawtherapee-cli|rawtherapee|.*\.(dylib|so))' | while read -r x; do
msg "Modifying install names: ${x}"
{
# id
case ${x} in *.dylib) echo " install_name_tool -id '@rpath/$(basename "${x}")' '${x}'";; esac
# names
GetDependencies "${x}" | while read -r y; do
echo " install_name_tool -change '${y}' '@rpath/$(basename "${y}")' '${x}'"
done
} | bash -v
done
# fix @rpath in Frameworks
msg "Registering @rpath in Frameworks folder:"
for frameworklibs in ${CONTENTS}/Frameworks/* ; do
echo " install_name_tool -delete_rpath /opt/local/lib '${frameworklibs}'" | bash -v
echo " install_name_tool -add_rpath /Applications/RawTherapee.app/Contents/Frameworks '${frameworklibs}'" | bash -v
done
# pixbuf loaders & immodules # pixbuf loaders & immodules
msg "Build GTK3 databases:" msg "Build GTK3 databases:"
"${LOCAL_PREFIX}"/local/bin/gdk-pixbuf-query-loaders "${LIB}"/libpix*.so > "${ETC}"/gtk-3.0/gdk-pixbuf.loaders "${LOCAL_PREFIX}"/local/bin/gdk-pixbuf-query-loaders "${LIB}"/libpix*.so > "${ETC}"/gtk-3.0/gdk-pixbuf.loaders
"${LOCAL_PREFIX}"/local/bin/gtk-query-immodules-3.0 "${LIB}"/im-* > "${ETC}"/gtk-3.0/gtk.immodules "${LOCAL_PREFIX}"/local/bin/gtk-query-immodules-3.0 "${LIB}"/im-* > "${ETC}"/gtk-3.0/gtk.immodules
sed -i "" -e "s|${PWD}/RawTherapee.app/Contents/|/Applications/RawTherapee.app/Contents/|" "${ETC}/gtk-3.0/gdk-pixbuf.loaders" "${ETC}/gtk-3.0/gtk.immodules" sed -i "" -e "s|${PWD}/RawTherapee.app/Contents/|/Applications/RawTherapee.app/Contents/|" "${ETC}/gtk-3.0/gdk-pixbuf.loaders" "${ETC}/gtk-3.0/gtk.immodules"
sed -i "" -e "s|/opt/local/|/usr/|" "${ETC}/gtk-3.0/gtk.immodules" sed -i "" -e "s|/opt/local/|/Applications/RawTherapee.app/Contents/Frameworks/|" "${ETC}/gtk-3.0/gtk.immodules"
# Install names
ModifyInstallNames
# Mime directory # Mime directory
msg "Copying shared files from ${GTK_PREFIX}:" msg "Copying shared files from ${GTK_PREFIX}:"
@ -222,65 +252,70 @@ ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/mime
msg "Installing required application bundle files:" msg "Installing required application bundle files:"
PROJECT_SOURCE_DATA_DIR="${PROJECT_SOURCE_DIR}/tools/osx" PROJECT_SOURCE_DATA_DIR="${PROJECT_SOURCE_DIR}/tools/osx"
ditto "${PROJECT_SOURCE_DIR}/build/Resources" "${RESOURCES}" ditto "${CMAKE_BUILD_TYPE}/Resources" "${RESOURCES}"
# Executable loader ditto "${PROJECT_SOURCE_DIR}/rtdata/fonts" "${ETC}/fonts"
# Note: executable is renamed to 'rawtherapee-bin'.
mkdir "${MACOS}/bin"
ditto "${MACOS}/rawtherapee" "${MACOS}/bin/rawtherapee-bin"
rm "${MACOS}/rawtherapee"
install -m 0755 "${PROJECT_SOURCE_DATA_DIR}/executable_loader.in" "${MACOS}/rawtherapee"
# App bundle resources # App bundle resources
ditto "${PROJECT_SOURCE_DATA_DIR}/"{rawtherapee,profile}.icns "${RESOURCES}" ditto "${PROJECT_SOURCE_DATA_DIR}/"{rawtherapee,profile}.icns "${RESOURCES}"
ditto "${PROJECT_SOURCE_DATA_DIR}/PkgInfo" "${CONTENTS}" ditto "${PROJECT_SOURCE_DATA_DIR}/PkgInfo" "${CONTENTS}"
install -m 0644 "${PROJECT_SOURCE_DATA_DIR}/Info.plist.in" "${CONTENTS}/Info.plist" install -m 0644 "${PROJECT_SOURCE_DATA_DIR}/Info.plist.in" "${CONTENTS}/Info.plist"
install -m 0644 "${PROJECT_SOURCE_DATA_DIR}/Info.plist-bin.in" "${CONTENTS}/MacOS/bin/Info.plist"
sed -i "" -e "s|@version@|${PROJECT_FULL_VERSION}| sed -i "" -e "s|@version@|${PROJECT_FULL_VERSION}|
s|@shortVersion@|${PROJECT_VERSION}| s|@shortVersion@|${PROJECT_VERSION}|
s|@arch@|${arch}|" \ s|@arch@|${arch}|" \
"${CONTENTS}/Info.plist" "${CONTENTS}/Info.plist"
plutil -convert xml1 "${CONTENTS}/Info.plist" plutil -convert binary1 "${CONTENTS}/Info.plist"
plutil -convert xml1 "${CONTENTS}/MacOS/bin/Info.plist" update-mime-database -V "${RESOURCES}/share/mime"
update-mime-database -V "${CONTENTS}/Resources/share/mime"
msg "Build glib database:"
mkdir -p ${RESOURCES}/share/glib-2.0
ditto {"${LOCAL_PREFIX}/local","${RESOURCES}"}/share/glib-2.0/schemas
"${LOCAL_PREFIX}/local/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas"
# Append an LC_RPATH # Append an LC_RPATH
msg "Registering @rpath into the executable:" msg "Registering @rpath into the main executable."
echo " install_name_tool -add_rpath /Applications/RawTherapee.app/Contents/Frameworks '${MACOS}/bin/rawtherapee-bin'" | bash -v install_name_tool -add_rpath /Applications/"${LIB}" "${EXECUTABLE}"
echo " install_name_tool -add_rpath /Applications/RawTherapee.app/Contents/Frameworks '${EXECUTABLE}-cli'" | bash -v
# Sign the app ModifyInstallNames
msg "Codesigning:"
CODESIGNID="$(cmake .. -LA -N | grep "CODESIGNID" | cut -d "=" -f2)" # fix @rpath in Frameworks
if ! test -z "$CODESIGNID" ; then msg "Registering @rpath in Frameworks folder."
install -m 0644 "${PROJECT_SOURCE_DATA_DIR}/rt.entitlements" "${CONTENTS}/Entitlements.plist" for frameworklibs in "${LIB}"/*{dylib,so}; do
plutil -convert xml1 "${CONTENTS}/Entitlements.plist" install_name_tool -delete_rpath ${LOCAL_PREFIX}/local/lib "${frameworklibs}"
install -m 0644 "${PROJECT_SOURCE_DATA_DIR}/rt-bin.entitlements" "${CONTENTS}/MacOS/bin/Entitlements.plist" install_name_tool -add_rpath /Applications/"${LIB}" "${frameworklibs}"
plutil -convert xml1 "${CONTENTS}/MacOS/bin/Entitlements.plist"
codesign -v -s "${CODESIGNID}" -i "com.rawtherapee.rawtherapee-bin" -o runtime --timestamp --entitlements "${APP}/Contents/MacOS/bin/Entitlements.plist" "${APP}/Contents/MacOS/bin/rawtherapee-bin"
for frameworklibs in ${CONTENTS}/Frameworks/* ; do
codesign -v -s "${CODESIGNID}" -i "com.rawtherapee.rawtherapee-bin" -o runtime --timestamp "${frameworklibs}"
done done
codesign --deep --preserve-metadata=identifier,entitlements,runtime --timestamp --strict -v -s "${CODESIGNID}" -i "com.rawtherapee.RawTherapee" -o runtime --entitlements "${CONTENTS}/Entitlements.plist" "${APP}" install_name_tool -delete_rpath RawTherapee.app/Contents/Frameworks "${EXECUTABLE}"-cli
spctl -a -vvvv "${APP}" install_name_tool -add_rpath @executable_path "${EXECUTABLE}"-cli
# Codesign the app
if [[ -n $CODESIGNID ]]; then
msg "Codesigning Application."
install -m 0644 "${PROJECT_SOURCE_DATA_DIR}"/rt.entitlements "${CMAKE_BUILD_TYPE}"/rt.entitlements
plutil -convert binary1 "${CMAKE_BUILD_TYPE}"/rt.entitlements
mv "${EXECUTABLE}"-cli "${LIB}"
for frameworklibs in "${LIB}"/*; do
codesign -v -s "${CODESIGNID}" -i com.rawtherapee.RawTherapee --force --verbose -o runtime --timestamp "${frameworklibs}"
done
codesign --timestamp --strict -v -s "${CODESIGNID}" -i com.rawtherapee.RawTherapee -o runtime --entitlements "${CMAKE_BUILD_TYPE}"/rt.entitlements "${APP}"
spctl -a -vvvv "${APP}"
fi fi
# Notarize the app # Notarize the app
NOTARY="$(cmake .. -LA -N | grep "NOTARY" | cut -d "=" -f2)" if [[ -n $NOTARY ]]; then
if ! test -z "$NOTARY" ; then
msg "Notarizing the application:" msg "Notarizing the application:"
ditto -c -k --sequesterRsrc --keepParent "${APP}" "${APP}.zip" ditto -c -k --sequesterRsrc --keepParent "${APP}" "${APP}.zip"
uuid=`xcrun altool --notarize-app --primary-bundle-id "com.rawtherapee.RawTherapee" ${NOTARY} --file "${APP}.zip" 2>&1 | grep 'RequestUUID' | awk '{ print $3 }'` uuid=`xcrun altool --notarize-app --primary-bundle-id "com.rawtherapee.RawTherapee" ${NOTARY} --file "${APP}.zip" 2>&1 | grep 'RequestUUID' | awk '{ print $3 }'`
echo "Result= $uuid" # Display identifier string echo "Result= $uuid" # Display identifier string
sleep 15 sleep 15
while : while :
do do
fullstatus=`xcrun altool --notarization-info "$uuid" ${NOTARY} 2>&1` # get the status fullstatus=`xcrun altool --notarization-info "$uuid" ${NOTARY} 2>&1` # get the status
status1=`echo "$fullstatus" | grep 'Status\:' | awk '{ print $2 }'` status1=`echo "$fullstatus" | grep 'Status\:' | awk '{ print $2 }'`
if [ "$status1" = "success" ]; then if [[ $status1 = "success" ]]; then
xcrun stapler staple *app # staple the ticket xcrun stapler staple *app # staple the ticket
xcrun stapler validate -v *app xcrun stapler validate -v *app
echo "Notarization success" echo "Notarization success"
break break
elif [ "$status1" = "in" ]; then elif [[ $status1 = "in" ]]; then
echo "Notarization still in progress, sleeping for 15 seconds and trying again" echo "Notarization still in progress, sleeping for 15 seconds and trying again"
sleep 15 sleep 15
else else
@ -293,38 +328,55 @@ fi
function CreateDmg { function CreateDmg {
local srcDir="$(mktemp -dt $$)" local srcDir="$(mktemp -dt $$)"
msg "Preparing disk image sources at ${srcDir}:" msg "Preparing disk image sources at ${srcDir}:"
cp -R "${APP}" "${srcDir}" cp -R "${APP}" "${srcDir}"
ditto AboutThisBuild.txt "${srcDir}" cp "${RESOURCES}"/share/LICENSE.txt "${srcDir}"
ln -s /Applications "${srcDir}" ln -s /Applications "${srcDir}"
# Web bookmarks # Web bookmarks
function CreateWebloc { function CreateWebloc {
defaults write "${srcDir}/$1" URL "$2" defaults write "${srcDir}/$1" URL "$2"
mv "${srcDir}/$1".{plist,webloc} mv "${srcDir}/$1".{plist,webloc}
} }
CreateWebloc 'Website' 'http://www.rawtherapee.com/' CreateWebloc 'Website' 'https://www.rawtherapee.com/'
CreateWebloc 'Manual' 'http://rawpedia.rawtherapee.com/' CreateWebloc 'Documentation' 'https://rawpedia.rawtherapee.com/'
CreateWebloc 'Forum' 'https://discuss.pixls.us/c/software/rawtherapee'
CreateWebloc 'Report Bug' 'https://github.com/Beep6581/RawTherapee/issues/new'
# Disk image name # Disk image name
dmg_name="${PROJECT_NAME// /_}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}" dmg_name="${PROJECT_NAME// /_}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}"
lower_build_type="$(tr '[:upper:]' '[:lower:]' <<< "$CMAKE_BUILD_TYPE")" lower_build_type="$(tr '[:upper:]' '[:lower:]' <<< "$CMAKE_BUILD_TYPE")"
if [[ ${lower_build_type} != release ]]; then if [[ $lower_build_type != release ]]; then
dmg_name="${dmg_name}_${lower_build_type}" dmg_name="${dmg_name}_${lower_build_type}"
fi fi
msg "Creating disk image:" msg "Creating disk image:"
hdiutil create -format UDBZ -fs HFS+ -srcdir "${srcDir}" -volname "${PROJECT_NAME}_${PROJECT_FULL_VERSION}" "${dmg_name}.dmg" if [[ ! -z $FANCY_DMG ]]; then
echo "Building Fancy .dmg"
mkdir "${srcDir}/.background"
cp -R "${PROJECT_SOURCE_DATA_DIR}/rtdmg.icns" "${srcDir}/.VolumeIcon.icns"
cp -R "${PROJECT_SOURCE_DATA_DIR}/rtdmg-bkgd.png" "${srcDir}/.background/background.png"
SetFile -c incC "${srcDir}/.VolumeIcon.icns"
create-dmg "${dmg_name}.dmg" "${srcDir}" \
--volname "${PROJECT_NAME}_${PROJECT_FULL_VERSION}" \
--volicon "${srcDir}/.VolumeIcon.icns" \
--sandbox-safe \
--no-internet-enable \
--eula LICENSE.txt \
--hdiutil-verbose \
--rez /Library/Developer/CommandLineTools/usr/bin/Rez
else
hdiutil create -format UDBZ -fs HFS+ -srcdir "${srcDir}" -volname "${PROJECT_NAME}_${PROJECT_FULL_VERSION}" "${dmg_name}.dmg"
fi
# Sign disk image # Sign disk image
if ! test -z "$CODESIGNID" ; then if [[ -n $CODESIGNID ]]; then
codesign --deep --force -v -s "${CODESIGNID}" --timestamp "${dmg_name}.dmg" codesign --deep --force -v -s "${CODESIGNID}" --timestamp "${dmg_name}.dmg"
fi fi
# Notarize the dmg # Notarize the dmg
if ! test -z "$NOTARY"; then
if ! test -z "$NOTARY" ; then
msg "Notarizing the dmg:" msg "Notarizing the dmg:"
zip "${dmg_name}.dmg.zip" "${dmg_name}.dmg" zip "${dmg_name}.dmg.zip" "${dmg_name}.dmg"
uuid=`xcrun altool --notarize-app --primary-bundle-id "com.rawtherapee" ${NOTARY} --file "${dmg_name}.dmg.zip" 2>&1 | grep 'RequestUUID' | awk '{ print $3 }'` uuid=`xcrun altool --notarize-app --primary-bundle-id "com.rawtherapee" ${NOTARY} --file "${dmg_name}.dmg.zip" 2>&1 | grep 'RequestUUID' | awk '{ print $3 }'`
@ -334,31 +386,31 @@ function CreateDmg {
do do
fullstatus=`xcrun altool --notarization-info "$uuid" ${NOTARY} 2>&1` # get the status fullstatus=`xcrun altool --notarization-info "$uuid" ${NOTARY} 2>&1` # get the status
status1=`echo "$fullstatus" | grep 'Status\:' | awk '{ print $2 }'` status1=`echo "$fullstatus" | grep 'Status\:' | awk '{ print $2 }'`
if [ "$status1" = "success" ]; then if [[ $status1 = "success" ]]; then
xcrun stapler staple "${dmg_name}.dmg" # staple the ticket xcrun stapler staple "${dmg_name}.dmg" # staple the ticket
xcrun stapler validate -v "${dmg_name}.dmg" xcrun stapler validate -v "${dmg_name}.dmg"
echo "dmg Notarization success" echo "dmg Notarization success"
break break
elif [ "$status1" = "in" ]; then elif [[ $status1 = "in" ]]; then
echo "dmg Notarization still in progress, sleeping for 15 seconds and trying again" echo "dmg Notarization still in progress, sleeping for 15 seconds and trying again"
sleep 15 sleep 15
else else
echo "dmg Notarization failed fullstatus below" echo "dmg Notarization failed fullstatus below"
echo "$fullstatus" echo "$fullstatus"
exit 1 exit 1
fi fi
done done
fi fi
# Zip disk image for redistribution # Zip disk image for redistribution
msg "Zipping disk image for redistribution:" msg "Zipping disk image for redistribution:"
zip "${dmg_name}.zip" "${dmg_name}.dmg"
zip "${dmg_name}.zip" "${dmg_name}.dmg" AboutThisBuild.txt
rm "${dmg_name}.dmg" rm "${dmg_name}.dmg"
msg "Removing disk image caches:" msg "Removing disk image caches:"
rm -rf "${srcDir}" rm -rf "${srcDir}"
} }
CreateDmg CreateDmg
msg "Finishing build:" msg "Finishing build:"
echo "Script complete." echo "Script complete."
#
# TODO filter out the benign errors

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.inherit</key>
<true/>
</dict>
</plist>

View File

@ -1,20 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>application-identifier</key> <key>application-identifier</key>
<string>com.rawtherapee.rawtherapee</string> <string>com.rawtherapee.RawTherapee</string>
<key>com.apple.security.temporary-exception.files.absolute-path.read-write</key> <key>com.apple.security.temporary-exception.files.absolute-path.read-write</key>
<array> <array>
<string>&quot;/&quot;</string> <string>/</string>
</array> </array>
<key>com.apple.security.cs.allow-dyld-environment-variables</key> <key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/> <true />
<key>com.apple.security.files.user-selected.read-write</key> <key>com.apple.security.files.user-selected.read-write</key>
<true/> <true />
<key>com.apple.security.app-sandbox</key> <key>com.apple.security.app-sandbox</key>
<true/> <true />
<key>com.apple.security.files.downloads.read-write</key> <key>com.apple.security.files.downloads.read-write</key>
<true/> <true />
</dict> </dict>
</plist> </plist>

BIN
tools/osx/rtdmg-bkgd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 KiB

BIN
tools/osx/rtdmg.icns Normal file

Binary file not shown.