diff --git a/.travis.yml b/.travis.yml.fixme similarity index 62% rename from .travis.yml rename to .travis.yml.fixme index 6ef54e62a..0aa85f3b4 100644 --- a/.travis.yml +++ b/.travis.yml.fixme @@ -9,14 +9,15 @@ compiler: os: - linux -branches: - only: - - master +#branches: +# only: +# - master notifications: irc: channels: - "chat.freenode.net#rawtherapee" + skip_join: true template: - "%{repository}/%{branch} (%{commit} - %{author}): %{build_url}: %{message}" email: @@ -29,9 +30,11 @@ env: before_install: - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + - sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ xenial main" - sudo apt-get -qq update - - sudo apt-get install build-essential cmake curl g++-6 gcc-6 git libbz2-dev libcanberra-gtk-dev libexiv2-dev libexpat-dev libfftw3-dev libglibmm-2.4-dev libgtk2.0-dev libgtkmm-2.4-dev libiptcdata0-dev libjpeg8-dev liblcms2-dev libpng12-dev libsigc++-2.0-dev libtiff5-dev zlib1g-dev + - sudo apt-get install gcc-6 g++-6 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 + - sudo apt-get install build-essential cmake curl git libbz2-dev libcanberra-gtk3-dev libexiv2-dev libexpat-dev libfftw3-dev libglibmm-2.4-dev libgtk-3-dev libgtkmm-3.0-dev libiptcdata0-dev libjpeg8-dev liblcms2-dev libpng12-dev libsigc++-2.0-dev libtiff5-dev zlib1g-dev before_script: - mkdir build diff --git a/AUTHORS.txt b/AUTHORS.txt index 6aebfcf6e..0ad8438eb 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -15,6 +15,7 @@ Developement contributors, in last name alphabetical order: Flössie Jean-Christophe Frisch Ilias Giarimis + Alberto Griggio Steve Herrell Philippe Hupé Wolfgang Kuehnel @@ -45,6 +46,7 @@ Other contributors (profiles, ideas, mockups, testing, forum activity, translati André Gauthier Sébastien Guyader M. Dávid Gyurkó + JK Han (pinholecam) Arturs Jekabsons Marián Kyral Oscar de Lama @@ -55,6 +57,8 @@ Other contributors (profiles, ideas, mockups, testing, forum activity, translati Wim ter Meer Alberto Righetto Kostia (Kildor) Romanov + Kalle Söderman Johan Thor + Vitalis Tiknius TooWaBoo Colin Walker diff --git a/AboutThisBuild.cmake b/AboutThisBuild.cmake deleted file mode 100644 index 2163ed0cb..000000000 --- a/AboutThisBuild.cmake +++ /dev/null @@ -1,53 +0,0 @@ -# cmakefile executed within a makefile target - -# 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) -if (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) - # we look for the git command in this paths by order of preference - if (WIN32) - find_program(GIT_CMD git.exe HINTS ENV Path PATH_SUFFIXES ../) - elseif (APPLE) - find_program(GIT_CMD git PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin") - find_program(GIT_CMD git) - set (SHELL "/bin/bash") - else (WIN32) # Linux - find_program(GIT_CMD git) - set (SHELL "/bin/bash") - endif (WIN32) - - # Fail if Git is not installed - if (GIT_CMD STREQUAL GIT_CMD-NOTFOUND) - message(FATAL_ERROR "git command not found!") - else () - message(STATUS "git command found: ${GIT_CMD}") - endif () - - execute_process(COMMAND ${GIT_CMD} symbolic-ref --short -q HEAD OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") - execute_process(COMMAND ${GIT_CMD} describe --tags --always OUTPUT_VARIABLE GIT_VERSION_WHOLE OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") - string(REGEX REPLACE "-g.*" "" GIT_VERSION ${GIT_VERSION_WHOLE}) - string(REPLACE "-" "." GIT_VERSION ${GIT_VERSION}) - execute_process(COMMAND ${GIT_CMD} rev-parse --verify HEAD OUTPUT_VARIABLE GIT_CHANGESET OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") - string(REGEX REPLACE ".*-(.*)-g.*" "\\1" GIT_TAGDISTANCE ${GIT_VERSION_WHOLE}) - if (NOT DEFINED CACHE_NAME_SUFFIX) - string(REGEX REPLACE "-.*" "" CACHE_NAME_SUFFIX ${GIT_VERSION_WHOLE}) - message(STATUS "CACHE_NAME_SUFFIX was not defined, it is now \"${CACHE_NAME_SUFFIX}\"") - elseif (CACHE_NAME_SUFFIX STREQUAL "latesttag") - string(REGEX REPLACE "-.*" "" CACHE_NAME_SUFFIX ${GIT_VERSION_WHOLE}) - message(STATUS "CACHE_NAME_SUFFIX was \"latesttag\", it is now \"${CACHE_NAME_SUFFIX}\"") - else () - message(STATUS "CACHE_NAME_SUFFIX is \"${CACHE_NAME_SUFFIX}\"") - endif () -else (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) - include("${PROJECT_SOURCE_DIR}/ReleaseInfo.cmake") -endif (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) - -if (VERSION_SUFFIX STREQUAL "") - set (GIT_VERSION_SUFFIX "${GIT_VERSION}") -else () - set (GIT_VERSION_SUFFIX "${GIT_VERSION} ${VERSION_SUFFIX}") -endif () - -# build version.h from template -configure_file ("${PROJECT_SOURCE_DIR}/rtgui/version.h.in" "${CMAKE_BINARY_DIR}/rtgui/version.h") -# build AboutThisBuild.txt from template -configure_file ("${PROJECT_SOURCE_DIR}/AboutThisBuild.txt.in" "${CMAKE_BINARY_DIR}/AboutThisBuild.txt") diff --git a/AboutThisBuild.txt.in b/AboutThisBuild.txt.in index b8ae4be1a..ea3269c09 100644 --- a/AboutThisBuild.txt.in +++ b/AboutThisBuild.txt.in @@ -1,6 +1,7 @@ +Version: ${GIT_DESCRIBE} Branch: ${GIT_BRANCH} -Version: ${GIT_VERSION_SUFFIX} -Changeset: ${GIT_CHANGESET} +Commit: ${GIT_COMMIT} +Commit date: ${GIT_COMMIT_DATE} Compiler: ${COMPILER_INFO} Processor: ${PROC_LABEL} System: ${SYSTEM} @@ -11,4 +12,3 @@ Build flags: ${CXX_FLAGS} Link flags: ${LFLAGS} OpenMP support: ${OPTION_OMP} MMAP support: ${WITH_MYFILE_MMAP} - diff --git a/CMakeLists.txt b/CMakeLists.txt index 0173856b1..685b418bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,407 +1,445 @@ -if (WIN32) - cmake_minimum_required(VERSION 2.8.4) -else (WIN32) - cmake_minimum_required(VERSION 2.6) -endif (WIN32) +if(WIN32) + cmake_minimum_required(VERSION 2.8.4) +else() + cmake_minimum_required(VERSION 2.6) +endif() -# must stay before the 'project' command +# Must stay before the PROJECT() command: if(${CMAKE_EXTRA_GENERATOR} MATCHES "Eclipse CDT4") - 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 command line to their current version of Eclipse - #set(CMAKE_ECLIPSE_VERSION "4.6.0" CACHE STRING "Eclipse version" 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 + # command line to their current version of Eclipse: + #set(CMAKE_ECLIPSE_VERSION "4.6.0" CACHE STRING "Eclipse version" FORCE) endif() PROJECT(RawTherapee) -# the default target is 'Debug' -if (CMAKE_BUILD_TYPE STREQUAL "") - set (CMAKE_BUILD_TYPE Debug CACHE STRING "One of: None Debug Release RelWithDebInfo MinSizeRel." FORCE) -endif () +# The default target is Debug: +if(CMAKE_BUILD_TYPE STREQUAL "") + set (CMAKE_BUILD_TYPE Debug CACHE STRING "One of: None Debug Release RelWithDebInfo MinSizeRel" FORCE) +endif() -string (TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE) +string(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE) -# Set required C and C++ standards and check GCC version -SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11") -SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") +# Set required C and C++ standards and check GCC version: +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") +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") - message(FATAL_ERROR "Building RawTherapee requires using GCC version 4.9 or higher!") + message(FATAL_ERROR "Building RawTherapee requires using GCC version 4.9 or higher!") endif() -# We might want to build using the old C++ ABI, even when using a new GCC version -if (USE_OLD_CXX_ABI) - add_definitions (-D_GLIBCXX_USE_CXX11_ABI=0) +# We might want to build using the old C++ ABI, even when using a new GCC version: +if(USE_OLD_CXX_ABI) + add_definitions (-D_GLIBCXX_USE_CXX11_ABI=0) endif() -if (UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG") - add_definitions (-D_DEBUG) -else () - add_definitions (-DNDEBUG) - add_definitions (-D_DNDEBUG) -endif () +if(UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG") + add_definitions (-D_DEBUG) +else() + add_definitions (-DNDEBUG) + add_definitions (-D_DNDEBUG) +endif() message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/") -# Examples: "" = ~/.config/RawTherapee, "latesttag" = ~/.config/RawTherapee4.2, "_testing" = ~/.config/RawTherapee_testing -set (CACHE_NAME_SUFFIX "" CACHE STRING "RawTherapee's cache folder suffix") +# Cache name suffix examples: "" = ~/.config/RawTherapee, "5" = ~/.config/RawTherapee-5, "_testing" = ~/.config/RawTherapee_testing +# Use "" for 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 specific processor target, so PROC_TARGET_NUMBER is set to 0. If can specify other values to select specific -# processor targets, which list can be found in ProcessorTargets.cmake. -set (PROC_TARGET_NUMBER 0 CACHE STRING "Selected target processor from the list above (taken from ProcessorTargets.cmake)") +# By default we don't use a specific processor target, so PROC_TARGET_NUMBER is set to 0. +# Specify other values to optimize for specific processor architecture as listed in ProcessorTargets.cmake: +set(PROC_TARGET_NUMBER 0 CACHE STRING "Selected target processor from the list above (taken from ProcessorTargets.cmake)") -# The following line set special compilation flags for RTEngine, and will be added to CMAKE_CXX_FLAGS -set (RTENGINE_CXX_FLAGS "" CACHE STRING "Special compilation flags for RTEngine") +# Set special compilation flags for rtengine which get added to CMAKE_CXX_FLAGS: +set(RTENGINE_CXX_FLAGS "" CACHE STRING "Special compilation flags for RTEngine") -#loading the processor targets list -include (ProcessorTargets.cmake) -set (PROC_LABEL "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))) - set (PROC_LABEL ${PROC_TARGET_${PROC_TARGET_NUMBER}_LABEL}) -endif () -if (NOT(PROC_TARGET_NUMBER EQUAL 0)) - set (PROC_FLAGS ${PROC_TARGET_${PROC_TARGET_NUMBER}_FLAGS}) -endif () -if (UNIX AND PROC_LABEL STREQUAL "undefined") +# Loads the ProcessorTargets list: +include(ProcessorTargets.cmake) +set(PROC_LABEL "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))) + set(PROC_LABEL ${PROC_TARGET_${PROC_TARGET_NUMBER}_LABEL}) +endif() +if(NOT(PROC_TARGET_NUMBER EQUAL 0)) + set(PROC_FLAGS ${PROC_TARGET_${PROC_TARGET_NUMBER}_FLAGS}) +endif() +if(UNIX AND PROC_LABEL STREQUAL "undefined") 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}") - else () - set (PROC_LABEL "${cpu}") - endif () -endif () + else() + set(PROC_LABEL "${cpu}") + endif() +endif() -# if it exists, the PROC_FORCED_LABEL value is loaded in PROC_LABEL to override the one of ProcessorTargets -if (DEFINED PROC_FORCED_LABEL) - set (PROC_LABEL ${PROC_FORCED_LABEL}) -endif (DEFINED PROC_FORCED_LABEL) +# If PROC_FORCED_LABEL exists, its value is loaded in PROC_LABEL to override the one from ProcessorTargets: +if(DEFINED PROC_FORCED_LABEL) + set(PROC_LABEL ${PROC_FORCED_LABEL}) +endif() -# adding the proc flags to the build flags +# Add the proc flags to the build flags: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PROC_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PROC_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PROC_FLAGS}") -#stop compile on typos like 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") -if (WIN32) - # we additionnally look in the MinGW path first then in the Gtkmm path, - # so if you wish to build some dependant library, you have to install them in MinGW to use them +if(WIN32) + # Add additional paths. Look in the MinGW path first, then in the Gtkmm path. + # If you wish to build some dependent libraries, you have to install them in MinGW to use them: set(CMAKE_PREFIX_PATH $ENV{MINGW_BASEPATH} $ENV{GTKMM_BASEPATH} CACHE STRING "Additional search paths") -endif (WIN32) +endif() -if (APPLE) - if (CMAKE_CXX_COMPILER MATCHES "g\\+\\+-mp-4.[5-8]" OR - CMAKE_CXX_COMPILER_ARG1 MATCHES "g\\+\\+-mp-4.[5-8]") - set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /usr/lib/libstdc++.6.dylib") - message (STATUS "CMAKE_CXX_COMPILER is MacPorts GCC.\n CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}") - endif () -endif (APPLE) +if(APPLE) + if(CMAKE_CXX_COMPILER MATCHES "g\\+\\+-mp-4.[5-8]" OR CMAKE_CXX_COMPILER_ARG1 MATCHES "g\\+\\+-mp-4.[5-8]") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /usr/lib/libstdc++.6.dylib") + message(STATUS "CMAKE_CXX_COMPILER is MacPorts GCC.\n CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}") + endif() -option(USE_EXPERIMENTAL_LANG_VERSIONS "Build RT with -std=c++0x" OFF) -option (BUILD_SHARED "Build rawtherapee with shared libraries" OFF) -option (WITH_BZIP "Build with Bzip2 support" ON) -option (WITH_MYFILE_MMAP "Build using memory mapped file" ON) -option (WITH_LTO "Build with link-time optimizations" OFF) -option (WITH_SAN "Build with run-time sanitizer" OFF) -option (WITH_PROF "Build with profiling instrumentation" OFF) -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 (TRACE_MYRWMUTEX "Trace RT's 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) + # Set minimum system version + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.9") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.9") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -headerpad_max_install_names") +endif() -# set install directories -if (WIN32 OR APPLE) +option(USE_EXPERIMENTAL_LANG_VERSIONS "Build with -std=c++0x" OFF) +option(BUILD_SHARED "Build with shared libraries" OFF) +option(WITH_MYFILE_MMAP "Build using memory mapped file" ON) +option(WITH_LTO "Build with link-time optimizations" OFF) +option(WITH_SAN "Build with run-time sanitizer" OFF) +option(WITH_PROF "Build with profiling instrumentation" OFF) +option(WITH_SYSTEM_KLT "Build using system KLT library." OFF) +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(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) + +# Set installation directories: +if(WIN32 OR APPLE) + 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.") + endif() set (BUILD_BUNDLE ON FORCE) -endif(WIN32 OR APPLE) +endif() -if (NOT DEFINED BUNDLE_BASE_INSTALL_DIR) - set (BUNDLE_BASE_INSTALL_DIR "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}") -endif (NOT DEFINED BUNDLE_BASE_INSTALL_DIR) +if(NOT DEFINED BUNDLE_BASE_INSTALL_DIR) + if(APPLE) + set(BUNDLE_BASE_INSTALL_DIR "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/MacOS") + else() + set(BUNDLE_BASE_INSTALL_DIR "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}") + endif() +endif() -if (BUILD_BUNDLE) - set (BINDIR .) - set (CMAKE_INSTALL_PREFIX "${BUNDLE_BASE_INSTALL_DIR}") -endif (BUILD_BUNDLE) +if(BUILD_BUNDLE) + set(BINDIR .) + set(CMAKE_INSTALL_PREFIX "${BUNDLE_BASE_INSTALL_DIR}") +endif() -if (NOT DEFINED BINDIR) - set (BINDIR "${CMAKE_INSTALL_PREFIX}/bin") -endif (NOT DEFINED BINDIR) +if(NOT DEFINED BINDIR) + set(BINDIR "${CMAKE_INSTALL_PREFIX}/bin") +endif() -if (NOT DEFINED DATADIR) - if (BUILD_BUNDLE) - set (DATADIR .) - else (BUILD_BUNDLE) - set (DATADIR "${CMAKE_INSTALL_PREFIX}/share/rawtherapee") - endif (BUILD_BUNDLE) -endif (NOT DEFINED DATADIR) +if(NOT DEFINED DATADIR) + if(BUILD_BUNDLE) + if(APPLE) + set(DATADIR "../Resources") + else() + set(DATADIR .) + endif() + else() + set(DATADIR "${CMAKE_INSTALL_PREFIX}/share/rawtherapee") + endif() +endif() -if (NOT DEFINED LIBDIR) - if (BUILD_BUNDLE) - set (LIBDIR .) - else (BUILD_BUNDLE) +if(NOT DEFINED LIBDIR) + if(BUILD_BUNDLE) + if(APPLE) + set(LIBDIR "../Frameworks") + else() + set(LIBDIR .) + endif() + else() # Respect CMAKE_INSTALL_LIBDIR if set - if (DEFINED CMAKE_INSTALL_LIBDIR) - if (IS_ABSOLUTE "${LIBDIR}") - set (LIBDIR "${CMAKE_INSTALL_LIBDIR}") - else (IS_ABSOLUTE "${LIBDIR}") - set (LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") - endif (IS_ABSOLUTE "${LIBDIR}") - else (DEFINED CMAKE_INSTALL_LIBDIR) - set (LIBDIR "${CMAKE_INSTALL_PREFIX}/lib") - endif (DEFINED CMAKE_INSTALL_LIBDIR) - endif (BUILD_BUNDLE) -endif (NOT DEFINED LIBDIR) + if(DEFINED CMAKE_INSTALL_LIBDIR) + if(IS_ABSOLUTE "${LIBDIR}") + set(LIBDIR "${CMAKE_INSTALL_LIBDIR}") + else() + set(LIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + endif() + else() + set(LIBDIR "${CMAKE_INSTALL_PREFIX}/lib") + endif() + endif() +endif() -if (NOT DEFINED DOCDIR) - if (BUILD_BUNDLE) - set (DOCDIR ./doc) - else (BUILD_BUNDLE) - set (DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee") - endif (BUILD_BUNDLE) -endif (NOT DEFINED DOCDIR) +if(NOT DEFINED DOCDIR) + if(BUILD_BUNDLE) + set(DOCDIR "${DATADIR}/share/doc") + else() + set(DOCDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee") + endif() +endif() -if (NOT DEFINED CREDITSDIR) - if (BUILD_BUNDLE) - set (CREDITSDIR .) - else (BUILD_BUNDLE) - set (CREDITSDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee") - endif (BUILD_BUNDLE) -endif (NOT DEFINED CREDITSDIR) +if(NOT DEFINED CREDITSDIR) + if(BUILD_BUNDLE) + set(CREDITSDIR "${DATADIR}") + else() + set(CREDITSDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee") + endif() +endif() -if (NOT DEFINED LICENCEDIR) - if (BUILD_BUNDLE) - set (LICENCEDIR .) - else (BUILD_BUNDLE) - set (LICENCEDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee") - endif (BUILD_BUNDLE) -endif (NOT DEFINED LICENCEDIR) +if(NOT DEFINED LICENCEDIR) + if(BUILD_BUNDLE) + set(LICENCEDIR "${DATADIR}") + else() + set(LICENCEDIR "${CMAKE_INSTALL_PREFIX}/share/doc/rawtherapee") + endif() +endif() -if (NOT DEFINED DESKTOPDIR) - if (UNIX) - set (DESKTOPDIR "${CMAKE_INSTALL_PREFIX}/share/applications") - endif (UNIX) -endif (NOT DEFINED DESKTOPDIR) +if(NOT DEFINED DESKTOPDIR) + if(UNIX) + if(BUILD_BUNDLE) + set(DESKTOPDIR "${DATADIR}/share/applications") + else() + set(DESKTOPDIR "${CMAKE_INSTALL_PREFIX}/share/applications") + endif() + endif() +endif() -if (NOT DEFINED ICONSDIR) - if (UNIX) - set (ICONSDIR "${CMAKE_INSTALL_PREFIX}/share/icons") - endif (UNIX) -endif (NOT DEFINED ICONSDIR) +if(NOT DEFINED ICONSDIR) + if(UNIX) + if(BUILD_BUNDLE) + set(ICONSDIR "${DATADIR}/share/icons") + else() + set(ICONSDIR "${CMAKE_INSTALL_PREFIX}/share/icons") + endif() + endif() +endif() -if (NOT DEFINED APPDATADIR) - if (UNIX) - set (APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/appdata") - endif (UNIX) -endif (NOT DEFINED APPDATADIR) +if(NOT DEFINED APPDATADIR) + if(UNIX) + if(BUILD_BUNDLE) + set(APPDATADIR "${DATADIR}/share/metainfo") + else() + set(APPDATADIR "${CMAKE_INSTALL_PREFIX}/share/metainfo") + endif() + endif() +endif() -# non-bundle builds has to use absolute paths -if (NOT BUILD_BUNDLE AND - NOT (IS_ABSOLUTE "${BINDIR}" AND IS_ABSOLUTE "${DATADIR}" AND IS_ABSOLUTE "${LIBDIR}" AND - IS_ABSOLUTE "${DOCDIR}" AND IS_ABSOLUTE "${CREDITSDIR}" AND IS_ABSOLUTE "${LICENCEDIR}")) - message (FATAL_ERROR "The paths has to be absolute or use -DBUILD_BUNDLE=ON") -endif () +# Enforce absolute paths for non-bundle builds: +if(NOT BUILD_BUNDLE) + foreach(path BINDIR DATADIR LIBDIR DOCDIR CREDITSDIR LICENCEDIR) + if(NOT (IS_ABSOLUTE "${${path}}")) + message (FATAL_ERROR "The ${path} path has to be absolute when using -DBUILD_BUNDLE=OFF") + endif() + endforeach() +endif() -# MyMutex -if (STRICT_MUTEX OR UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG") - add_definitions (-DSTRICT_MUTEX=1) -else (STRICT_MUTEX OR UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG") - add_definitions (-DSTRICT_MUTEX=0) -endif (STRICT_MUTEX OR UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG") +# MyMutex: +if(STRICT_MUTEX OR UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG") + add_definitions(-DSTRICT_MUTEX=1) +else() + add_definitions(-DSTRICT_MUTEX=0) +endif() -# MyRWMutex -if (TRACE_MYRWMUTEX) - add_definitions (-DTRACE_MYRWMUTEX=1) -else (TRACE_MYRWMUTEX) - add_definitions (-DTRACE_MYRWMUTEX=0) -endif (TRACE_MYRWMUTEX) +# MyRWMutex: +if(TRACE_MYRWMUTEX) + add_definitions(-DTRACE_MYRWMUTEX=1) +else() + add_definitions(-DTRACE_MYRWMUTEX=0) +endif() -if (AUTO_GDK_FLUSH) - add_definitions (-DAUTO_GDK_FLUSH=1) -else (AUTO_GDK_FLUSH) - add_definitions (-DAUTO_GDK_FLUSH=0) -endif (AUTO_GDK_FLUSH) +if(AUTO_GDK_FLUSH) + add_definitions(-DAUTO_GDK_FLUSH=1) +else() + add_definitions(-DAUTO_GDK_FLUSH=0) +endif() -# check for libraries +# Check for libraries: find_package(PkgConfig) -pkg_check_modules (GTK REQUIRED gtk+-2.0>=2.12) -pkg_check_modules (GLIB2 REQUIRED glib-2.0>=2.16) -pkg_check_modules (GLIBMM REQUIRED glibmm-2.4>=2.16) -pkg_check_modules (GTKMM REQUIRED gtkmm-2.4>=2.22) -pkg_check_modules (GIO REQUIRED gio-2.0>=2.16) -pkg_check_modules (GIOMM REQUIRED giomm-2.4>=2.12) -pkg_check_modules (GTHREAD REQUIRED gthread-2.0>=2.16) -pkg_check_modules (GOBJECT REQUIRED gobject-2.0>=2.16) -pkg_check_modules (SIGC REQUIRED sigc++-2.0) -# NOTE: The new mechanism has been tested with BUILD_SHARED = OFF -if (WIN32) - add_definitions (-DWIN32) - add_definitions (-D_WIN32) - if (MINGW) - add_definitions (-D__MINGW32__) - endif (MINGW) - if (CMAKE_SIZEOF_VOID_P EQUAL 4) - add_definitions (-DWINVER=0x0501) - endif (CMAKE_SIZEOF_VOID_P EQUAL 4) - set (EXTRA_LIB "-lws2_32 -lshlwapi") -endif (WIN32) -# you may need lcms v1.xx for older version : pkg_check_modules (LCMS REQUIRED lcms<=1.99) -pkg_check_modules (LCMS REQUIRED lcms2) -find_package (EXPAT REQUIRED expat>=2.0) -pkg_check_modules (FFTW3F REQUIRED fftw3f) -pkg_check_modules (IPTCDATA REQUIRED libiptcdata) -find_package (JPEG REQUIRED) -find_package (PNG REQUIRED) -find_package (TIFF REQUIRED) -find_package (ZLIB REQUIRED) +pkg_check_modules (GTK REQUIRED gtk+-3.0>=3.16) +pkg_check_modules (GLIB2 REQUIRED glib-2.0>=2.44) +pkg_check_modules (GLIBMM REQUIRED glibmm-2.4>=2.44) +pkg_check_modules (GTKMM REQUIRED gtkmm-3.0>=3.16) +pkg_check_modules (CAIROMM REQUIRED cairomm-1.0) +pkg_check_modules (GIO REQUIRED gio-2.0>=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 (GOBJECT REQUIRED gobject-2.0>=2.44) +pkg_check_modules (SIGC REQUIRED sigc++-2.0>=2.3.1) -# link witz bzip -if (WITH_BZIP) - find_package(BZip2) - if (BZIP2_FOUND) - add_definitions (-DBZIP_SUPPORT) - set (EXTRA_INCDIR ${BZIP2_INCLUDE_DIR}) - set (EXTRA_LIB ${EXTRA_LIB} ${BZIP2_LIBRARIES}) - endif (BZIP2_FOUND) -endif (WITH_BZIP) +if(WIN32) + add_definitions(-DWIN32) + add_definitions(-D_WIN32) + if(MINGW) + add_definitions(-D__MINGW32__) + endif() + if(CMAKE_SIZEOF_VOID_P EQUAL 4) + add_definitions(-DWINVER=0x0501) + endif() + set(EXTRA_LIB "-lws2_32 -lshlwapi") +endif() -#Check for libcanberra-gtk (sound events on Linux) -if (UNIX AND (NOT APPLE)) - pkg_check_modules (CANBERRA-GTK REQUIRED libcanberra-gtk) -endif (UNIX AND (NOT APPLE)) +pkg_check_modules(LCMS REQUIRED lcms2>=2.6) +pkg_check_modules(EXPAT REQUIRED expat>=2.1) +pkg_check_modules(FFTW3F REQUIRED fftw3f) +pkg_check_modules(IPTCDATA REQUIRED libiptcdata) +find_package(JPEG REQUIRED) +find_package(PNG REQUIRED) +find_package(TIFF REQUIRED) +find_package(ZLIB REQUIRED) +if(WITH_SYSTEM_KLT) + find_package(KLT REQUIRED) +endif() -if (WITH_MYFILE_MMAP) - add_definitions (-DMYFILE_MMAP) -endif (WITH_MYFILE_MMAP) +# Check for libcanberra-gtk3 (sound events on Linux): +if(UNIX AND(NOT APPLE)) + pkg_check_modules(CANBERRA-GTK REQUIRED libcanberra-gtk3) +endif() -if (WITH_LTO) - SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto") - SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto") - SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto") -endif (WITH_LTO) +if(WITH_MYFILE_MMAP) + add_definitions(-DMYFILE_MMAP) +endif() -if (WITH_SAN) - SET (CMAKE_C_FLAGS "${CMAKE_C_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}") -endif (WITH_SAN) +if(WITH_LTO) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -flto") +endif() -if (WITH_PROF) - SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pg") - SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") - SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") -endif (WITH_PROF) +if(WITH_SAN) + SET(CMAKE_C_FLAGS "${CMAKE_C_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}") +endif() -if (OPTION_OMP) +if(WITH_PROF) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pg") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") +endif() + +if(OPTION_OMP) find_package(OpenMP) - if (OPENMP_FOUND) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -Werror=unknown-pragmas") - endif (OPENMP_FOUND) -endif (OPTION_OMP) + if(OPENMP_FOUND) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -Werror=unknown-pragmas -Wall -Wno-unused-result -Wno-deprecated-declarations") + endif() +endif() -# find out whether we are building out of source +# Find out whether we are building out of source: get_filename_component(ABS_SOURCE_DIR "${PROJECT_SOURCE_DIR}" ABSOLUTE) get_filename_component(ABS_BINARY_DIR "${CMAKE_BINARY_DIR}" ABSOLUTE) -set (OUT_OF_SOURCE_BUILD TRUE) -if (ABS_SOURCE_DIR STREQUAL ABS_BINARY_DIR) - 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") -endif () +set(OUT_OF_SOURCE_BUILD TRUE) +if(ABS_SOURCE_DIR STREQUAL ABS_BINARY_DIR) + 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") +endif() -# XXX remove files triggering the below check to prevent every developer from -# needing manual manual work. We will remove this after some time to have a -# clean build system without file modifications in the source tree again. +# Remove files which could require manual work. +# We will remove this after some time to have a clean build system without file modifications in the source 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}) - file (REMOVE "${f}") - endforeach(f) -endif () + file(REMOVE "${f}") + endforeach() +endif() -# check for generated files in the source tree which should not be there when -# doing out of source builds. Without checking for this it might happen that old -# versions are used for the compilation -if (OUT_OF_SOURCE_BUILD) +# Check for generated files in the source tree which should not be there when 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) foreach(f ${OOSB_FILES}) - 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.") - endif () - endforeach(f) -endif () + 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.") + endif() + endforeach() +endif() -## BEGIN: Generating AboutThisBuild.txt -# set the bit number information of the platform -if (CMAKE_SIZEOF_VOID_P EQUAL 4) - set(PROC_BIT_DEPTH 32 bits) -elseif (CMAKE_SIZEOF_VOID_P EQUAL 8) - set(PROC_BIT_DEPTH 64 bits) -endif (CMAKE_SIZEOF_VOID_P EQUAL 4) +### Start generating AboutThisBuild.txt +# Set the platform bit-depth: +if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(PROC_BIT_DEPTH 32 bits) +else() + set(PROC_BIT_DEPTH 64 bits) +endif() -# Get comiler 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) - set(COMPILER_INFO "${COMPILER_INFO} ${CMAKE_C_COMPILER_VERSION}") -else () - execute_process(COMMAND gcc -dumpversion OUTPUT_VARIABLE GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) - set(COMPILER_INFO "gcc ${GCC_VERSION}") -endif () +# 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) + set(COMPILER_INFO "${COMPILER_INFO} ${CMAKE_C_COMPILER_VERSION}") +else() + execute_process(COMMAND gcc -dumpversion OUTPUT_VARIABLE GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) + set(COMPILER_INFO "gcc ${GCC_VERSION}") +endif() -# Get c++ and linker flags for rtengine (the gui's c++ flags may have less flags) +# Get C++ and linker flags for rtengine (the GUI's C++ flags may have fewer flags): 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} - -DPROJECT_SOURCE_DIR:STRING=${PROJECT_SOURCE_DIR} - -DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX} - -DPROC_LABEL:STRING="${PROC_LABEL}" - -DPROC_BIT_DEPTH:STRING="${PROC_BIT_DEPTH}" - -DBUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - -DVERSION_SUFFIX:STRING=${VERSION_SUFFIX} - -DGTKMM_VERSION:STRING=${GTKMM_VERSION} - -DOPTION_OMP:STRING=${OPTION_OMP} - -DWITH_MYFILE_MMAP:STRING=${WITH_MYFILE_MMAP}) + -DPROJECT_SOURCE_DIR:STRING=${PROJECT_SOURCE_DIR} + -DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX} + -DPROC_LABEL:STRING="${PROC_LABEL}" + -DPROC_BIT_DEPTH:STRING="${PROC_BIT_DEPTH}" + -DBUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DGTKMM_VERSION:STRING=${GTKMM_VERSION} + -DOPTION_OMP:STRING=${OPTION_OMP} + -DWITH_MYFILE_MMAP:STRING=${WITH_MYFILE_MMAP}) -if (WIN32) - list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Windows - -DCXX_FLAGS:STRING="${CXX_FLAGS}" - -DLFLAGS:STRING="${LFLAGS}" - -DCOMPILER_INFO:STRING="${COMPILER_INFO}") -elseif (APPLE) - list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Apple - -DCXX_FLAGS:STRING=${CXX_FLAGS} - -DLFLAGS:STRING=${LFLAGS} - -DCOMPILER_INFO:STRING=${COMPILER_INFO}) -else (WIN32) - list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Linux - -DCXX_FLAGS:STRING=${CXX_FLAGS} - -DLFLAGS:STRING=${LFLAGS} - -DCOMPILER_INFO:STRING=${COMPILER_INFO}) -endif (WIN32) +if(WIN32) + list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Windows + -DCXX_FLAGS:STRING="${CXX_FLAGS}" + -DLFLAGS:STRING="${LFLAGS}" + -DCOMPILER_INFO:STRING="${COMPILER_INFO}" + -DCMAKE_INSTALL_PREFIX:STRING="${CMAKE_INSTALL_PREFIX}" + -DBIT_DEPTH:STRING="${CMAKE_SIZEOF_VOID_P}") +elseif(APPLE) + list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Apple + -DCXX_FLAGS:STRING=${CXX_FLAGS} + -DLFLAGS:STRING=${LFLAGS} + -DCOMPILER_INFO:STRING=${COMPILER_INFO}) +else() + list(APPEND ABOUT_COMMAND_WITH_ARGS -DSYSTEM:STRING=Linux + -DCXX_FLAGS:STRING=${CXX_FLAGS} + -DLFLAGS:STRING=${LFLAGS} + -DCOMPILER_INFO:STRING=${COMPILER_INFO}) +endif() -list(APPEND ABOUT_COMMAND_WITH_ARGS -P "${PROJECT_SOURCE_DIR}/AboutThisBuild.cmake") +list(APPEND ABOUT_COMMAND_WITH_ARGS -P "${PROJECT_SOURCE_DIR}/UpdateInfo.cmake") -add_custom_target(AboutFile ALL +add_custom_target(UpdateInfo ALL COMMAND ${ABOUT_COMMAND_WITH_ARGS} - COMMENT "Creating the about file") + 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 LICENSE.txt DESTINATION "${LICENCEDIR}") -install (FILES "${CMAKE_BINARY_DIR}/AboutThisBuild.txt" DESTINATION "${CREDITSDIR}") -install (FILES RELEASE_NOTES.txt DESTINATION "${CREDITSDIR}" OPTIONAL) -if (WIN32) - install (DIRECTORY "licenses" DESTINATION "${LICENCEDIR}") -endif (WIN32) -if (UNIX) - install (FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1") - install (FILES rawtherapee.appdata.xml DESTINATION "${APPDATADIR}") -endif (UNIX) +install(FILES AUTHORS.txt DESTINATION "${CREDITSDIR}") +install(FILES LICENSE.txt DESTINATION "${LICENCEDIR}") +install(FILES "${CMAKE_BINARY_DIR}/AboutThisBuild.txt" DESTINATION "${CREDITSDIR}") +install(FILES RELEASE_NOTES.txt DESTINATION "${CREDITSDIR}" OPTIONAL) -add_subdirectory (rtexif) -add_subdirectory (rtengine) -add_subdirectory (rtgui) -add_subdirectory (rtdata) +# The standard location for man pages in Linux is /usr/share/man +# Use "manpath" to see the search paths for man pages on your system. +if(BUILD_BUNDLE) + install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${DATADIR}/share/man/man1") +else() + install(FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1") +endif() + +if(WIN32) + install(DIRECTORY "licenses" DESTINATION "${LICENCEDIR}") +endif() + +if(UNIX) + install(FILES rawtherapee.appdata.xml DESTINATION "${APPDATADIR}") +endif() + +add_subdirectory(rtexif) +add_subdirectory(rtengine) +add_subdirectory(rtgui) +add_subdirectory(rtdata) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..5cdfd8d5b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,19 @@ +## Thank You +Thank you for showing interest in contributing to RawTherapee. It is people such as yourself who make this program and project possible. + +## Contribute as a Tester +The most useful feedback is based on the latest development code, and in the case of crashes should include a stack backtrace made using a debug build. +- Compilation instructions for Linux: + - http://rawpedia.rawtherapee.com/Linux +- Compilation instructions for Windows: + - http://rawpedia.rawtherapee.com/Windows +- Compilation instructions for macOS: + - http://rawpedia.rawtherapee.com/MacOS +- How to write useful bug reports including how to get stack backtraces: + - http://rawpedia.rawtherapee.com/How_to_write_useful_bug_reports + +## Contributing as a Programmer +- Announce and discuss your plans in GitHub before starting work. +- Keep branches small so that completed and working features can be merged into the "dev" branch often, and so that they can be abandoned if they head in the wrong direction. +- Use C++11 +- Code must be run through astyle version 3 or newer before being merged. diff --git a/LICENSE.txt b/LICENSE.txt index 1e9ad695f..44a4cfcc8 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,6 @@ RawTherapee - A powerful, cross-platform raw image processing program. Copyright (C) 2004-2012 Gabor Horvath + Copyright (C) 2010-2017 RawTherapee development team. RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/README.md b/README.md index 93dbfec59..62a91a2bb 100644 --- a/README.md +++ b/README.md @@ -40,5 +40,5 @@ http://rawpedia.rawtherapee.com/Linux Windows: http://rawpedia.rawtherapee.com/Windows -OS X: -http://rawpedia.rawtherapee.com/OS_X +macOS: +http://rawpedia.rawtherapee.com/macOS diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index 1c78bcd39..5affd4b39 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -1,21 +1,51 @@ -RAWTHERAPEE DEVELOPMENT RELEASE NOTES -------------------------------------- +RAWTHERAPEE 5.2 RELEASE NOTES +----------------------------- +This is a development version of RawTherapee. We update the code almost daily. Every few months, once enough changes have accumulated and the code is stabilized, we make a new official release. Every code change between these releases is known as a "development" version, and this is one of them. -This is a development version of RawTherapee. We update the code every day, which means the smallest number in the version changes every day, and every few months when new features are finalized and known bugs are fixed we release a stable version. Every minor version in-between those stable versions is known as a "development" version, and this build is one of them. +RawTherapee provides you with a selection of powerful tools with which you can practice the art of developing raw photos. Be sure to read RawPedia to understand how each tool works so that you may make the most of it. +http://rawpedia.rawtherapee.com/ +A great place to start is the "Getting Started" article. Click on "Main page" in the top-left corner when you have finished reading that article to see all other articles. While we only commit tested and relatively stable code and so the development versions should be fairly stable, you should be aware that: -- They only had limited testing, so there may be bugs unknown to us. -- You should report these bugs so they get fixed for the stable release. See www.rawpedia.rawtherapee.com/How_to_write_useful_bug_reports The way new tools work in the development versions is likely to change as we tweak and tune them, so your processing profiles may produce different results when used in a future stable versions. -- Bugs present in the stable versions get fixed, and until a new stable version is released these fixes are present in these development versions, thereby making the development version "more stable" than the previous stable version. At the same time, new features may introduce new bugs :) This is a trade-off you should be aware of. +- Development versions only had limited testing, so there may be bugs unknown to us. +- You should report these bugs so that they get fixed for the next stable release. See + www.rawpedia.rawtherapee.com/How_to_write_useful_bug_reports +- The way new tools work in the development versions is likely to change as we tweak and tune them, so your processing profiles may produce different results when used in a future stable version. +- Bugs present in the stable versions get fixed in the development versions, and make it into the next stable version when we make a new official release. That means that in some ways the development versions can be "more stable" than the latest stable release. At the same time, new features may introduce new bugs. This is a trade-off you should be aware of. + +News Relevant to Photographers +------------------------------ +RawTherapee supports most raw formats, including some unusual ones like those from cameras using Foveon and X-Trans sensors. If you're wondering whether it supports your camera's raw format, first download RawTherapee and try for yourself. If a raw format is not supported it will either not open, or the preview in the Editor tab will appear black, white, or have a strong color cast - usually magenta. In that case, read the "Adding Support for New Raw Formats" RawPedia article. In order to use RawTherapee efficiently you should know that: - You can scroll all panels using the mouse scroll-wheel. - You can right-click on a tool's name to automatically expand it while collapsing all others. - To change slider values or drop-down list items with the mouse scroll-wheel, hold the Shift key. This is so that you can safely scroll the panels without accidentally changing a slider or other tool setting. - All curves support the Shift and Ctrl keys while dragging a point. Shift+drag makes the point snap to meaningful axes (top, bottom, diagonal, other), while Ctrl+drag makes your mouse movement super-fine for precise point positioning. -- There are many keyboard shortcuts which make working with RawTherapee much faster and give you greater control, make sure you familiarize yourself with them on RawPedia's Keyboard Shortcuts page! +- There are many keyboard shortcuts which make working with RawTherapee much faster and give you greater control. Make sure you familiarize yourself with them on RawPedia's "Keyboard Shortcuts" page! -Refer to RawPedia for information about RawTherapee's tools and how to use them. +New features since 5.2: +- To be filled in once 5.3 is released. + +News Relevant to Package Maintainers +------------------------------------ +In general: +- Requires GTK+ version >=3.16, though 3.22 is recommended. +- RawTherapee 5 requires GCC-4.9 or higher, or Clang. +- Do not use -ffast-math, it will not make RawTherapee faster but will introduce artifacts. +- Use -O3, it will make RawTherapee faster with no known side-effects. +- For stable releases use -DCACHE_NAME_SUFFIX="" +- For development builds and release-candidates use -DCACHE_NAME_SUFFIX="5-dev" + +Changes since 5.2: +- To be filled in once 5.3 is released. + +News Relevant to Developers +--------------------------- +- Announce and discuss your plans in GitHub before starting work. +- Keep branches small so that completed and working features can be merged into the "dev" branch often, and so that they can be abandoned if they head in the wrong direction. +- Use C++11. +- Code must be run through astyle. DOCUMENTATION ------------- @@ -24,14 +54,19 @@ http://rawpedia.rawtherapee.com/ REPORTING BUGS -------------- -Find out how to write good bug reports and get stack-backtraces here: +If you found a problem, don't keep it to yourself. Read the "How to write useful bug reports" article to get the problem fixed: http://rawpedia.rawtherapee.com/How_to_write_useful_bug_reports +FORUM +----- +RawTherapee shares a forum with users and developers of other Free/Libre/Open Source Software: +https://discuss.pixls.us/c/software/rawtherapee + LIVE CHAT WITH USERS AND DEVELOPERS -------------------------------------- - Network: freenode - Server: chat.freenode.net - Channel #rawtherapee +  Network: freenode +  Server:  chat.freenode.net +  Channel: #rawtherapee You can use freenode webchat to communicate without installing anything: http://webchat.freenode.net/?randomnick=1&channels=rawtherapee&prompt=1 @@ -46,4 +81,3 @@ REVISION HISTORY ---------------- The complete changelog is available at: https://github.com/Beep6581/RawTherapee/commits/ - diff --git a/UpdateInfo.cmake b/UpdateInfo.cmake new file mode 100644 index 000000000..8ffaf0636 --- /dev/null +++ b/UpdateInfo.cmake @@ -0,0 +1,110 @@ +# cmakefile executed within a makefile target + +# 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) +if (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) + # we look for the git command in this paths by order of preference + if (WIN32) + find_program(GIT_CMD git.exe HINTS ENV Path PATH_SUFFIXES ../) + elseif (APPLE) + find_program(GIT_CMD git PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin") + find_program(GIT_CMD git) + set (SHELL "/bin/bash") + else (WIN32) # Linux + find_program(GIT_CMD git) + set (SHELL "/bin/bash") + endif (WIN32) + + # Fail if Git is not installed + if (GIT_CMD STREQUAL GIT_CMD-NOTFOUND) + message(FATAL_ERROR "git command not found!") + else () + message(STATUS "git command found: ${GIT_CMD}") + endif () + + # Get version description. + # 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. + execute_process(COMMAND ${GIT_CMD} describe --tags --always OUTPUT_VARIABLE GIT_DESCRIBE OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + + # Get branch name. + # Will return empty if you checked out a commit or tag. Empty string handled later. + execute_process(COMMAND ${GIT_CMD} symbolic-ref --short -q HEAD OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + + # Get commit hash. + execute_process(COMMAND ${GIT_CMD} rev-parse --short --verify HEAD OUTPUT_VARIABLE GIT_COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + + # Get commit date, YYYY-MM-DD. + execute_process(COMMAND ${GIT_CMD} show -s --format=%cd --date=format:%Y-%m-%d OUTPUT_VARIABLE GIT_COMMIT_DATE OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + + # Get number of commits since tagging. This is what "GIT_DESCRIBE" uses. + # Works when checking out branch, tag or commit. + # Get a list of all tags in repo: + execute_process(COMMAND ${GIT_CMD} tag --merged HEAD OUTPUT_VARIABLE GIT_TAG WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + # Replace newlines with semicolons so that it can be split: + string(REPLACE "\n" ";" GIT_TAG_LIST "${GIT_TAG}") + execute_process(COMMAND ${GIT_CMD} rev-list --count HEAD --not ${GIT_TAG_LIST} OUTPUT_VARIABLE GIT_COMMITS_SINCE_TAG OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + + # Get number of commits since branching. + # Works when checking out branch, tag or commit. + execute_process(COMMAND ${GIT_CMD} rev-list --count HEAD --not --tags OUTPUT_VARIABLE GIT_COMMITS_SINCE_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") + + # If user checked-out something which is not a branch, use the description as branch name. + if (GIT_BRANCH STREQUAL "") + set (GIT_BRANCH "${GIT_DESCRIBE}") + endif() + + # 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. + # Strip everything after hyphen, e.g. "5.0-gtk2" -> "5.0", "5.1-rc1" -> "5.1" (ergo BS). + if (GIT_COMMITS_SINCE_TAG STREQUAL "") + set (GIT_NUMERIC_VERSION_BS "0.0.0") + else () + string(REGEX REPLACE "-.*" "" GIT_NUMERIC_VERSION_BS ${GIT_DESCRIBE}) + set(GIT_NUMERIC_VERSION_BS "${GIT_NUMERIC_VERSION_BS}.${GIT_COMMITS_SINCE_TAG}") + endif () + + message(STATUS "Git checkout information:") + message(STATUS " Commit description: ${GIT_DESCRIBE}") + message(STATUS " Branch: ${GIT_BRANCH}") + message(STATUS " Commit: ${GIT_COMMIT}") + message(STATUS " Commit date: ${GIT_COMMIT_DATE}") + message(STATUS " Commits since tag: ${GIT_COMMITS_SINCE_TAG}") + message(STATUS " Commits since branch: ${GIT_COMMITS_SINCE_BRANCH}") + message(STATUS " Version (unreliable): ${GIT_NUMERIC_VERSION_BS}") + + if (NOT DEFINED CACHE_NAME_SUFFIX) + set(CACHE_NAME_SUFFIX "${GIT_DESCRIBE}") + message(STATUS "CACHE_NAME_SUFFIX was not defined, it is now \"${CACHE_NAME_SUFFIX}\"") + else () + message(STATUS "CACHE_NAME_SUFFIX is \"${CACHE_NAME_SUFFIX}\"") + endif () + +else (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) + include("${PROJECT_SOURCE_DIR}/ReleaseInfo.cmake") +endif (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) + +if (WIN32) + if (BIT_DEPTH EQUAL 4) + set(BUILD_BIT_DEPTH 32) + # 32 bits builds has to be installable on 64 bits system, to support WinXP/64. + set(ARCHITECTURE_ALLOWED "x86 x64 ia64") + # installing in 32 bits mode even on 64 bits OS and architecture + set(INSTALL_MODE "") + elseif (BIT_DEPTH EQUAL 8) + set(BUILD_BIT_DEPTH 64) + # Restricting the 64 bits builds to 64 bits systems only + set(ARCHITECTURE_ALLOWED "x64 ia64") + # installing in 64 bits mode for all 64 bits processors, even for itanium architecture + set(INSTALL_MODE "x64 ia64") + endif (BIT_DEPTH EQUAL 4) + # set part of the output archive name + set(SYSTEM_NAME "WinVista") + + configure_file ("${PROJECT_SOURCE_DIR}/tools/win/InnoSetup/WindowsInnoSetup.iss.in" "${CMAKE_BINARY_DIR}/rtdata/WindowsInnoSetup.iss") +endif (WIN32) + +# build version.h from template +configure_file ("${PROJECT_SOURCE_DIR}/rtgui/version.h.in" "${CMAKE_BINARY_DIR}/rtgui/version.h") +# build AboutThisBuild.txt from template +configure_file ("${PROJECT_SOURCE_DIR}/AboutThisBuild.txt.in" "${CMAKE_BINARY_DIR}/AboutThisBuild.txt") diff --git a/cmake/modules/FindKLT.cmake b/cmake/modules/FindKLT.cmake new file mode 100644 index 000000000..f6d28d999 --- /dev/null +++ b/cmake/modules/FindKLT.cmake @@ -0,0 +1,66 @@ +# - Try to find KLT +# Once done this will define +# +# KLT_FOUND - system has KLT +# KLT_INCLUDE_DIRS - the KLT include directory +# KLT_LIBRARIES - Link these to use KLT +# KLT_DEFINITIONS - Compiler switches required for using KLT +# +# Copyright (c) 2009 Andreas Schneider +# updated for KLT by Dan Horák +# +# Redistribution and use is allowed according to the terms of the New +# BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + + +if(KLT_LIBRARIES AND KLT_INCLUDE_DIRS) + # in cache already + set(KLT_FOUND TRUE) +else() + find_path(KLT_INCLUDE_DIR + NAMES + klt.h + PATHS + /usr/include + /usr/local/include + /opt/local/include + /sw/include + ${CMAKE_INSTALL_PREFIX}/include + PATH_SUFFIXES + klt + ) + mark_as_advanced(KLT_INCLUDE_DIR) + + find_library(KLT_LIBRARY + NAMES + klt + PATHS + /usr/lib64 + /usr/lib + /usr/local/lib + /opt/local/lib + /sw/lib + ${CMAKE_INSTALL_PREFIX}/lib + ) + mark_as_advanced(KLT_LIBRARY) + + set(KLT_INCLUDE_DIRS ${KLT_INCLUDE_DIR}) + + set(KLT_LIBRARIES ${KLT_LIBRARY}) + + if(KLT_INCLUDE_DIRS AND KLT_LIBRARIES) + set(KLT_FOUND TRUE) + endif() + + if(KLT_FOUND) + if(NOT KLT_FIND_QUIETLY) + message(STATUS "Found KLT: ${KLT_LIBRARIES}") + endif() + else() + message(STATUS "KLT not found.") + endif() + + mark_as_advanced(KLT_INCLUDE_DIRS KLT_LIBRARIES) +endif() diff --git a/cmake/modules/FindMacIntegration.cmake b/cmake/modules/FindMacIntegration.cmake index 9518dfa8a..a67c31baa 100644 --- a/cmake/modules/FindMacIntegration.cmake +++ b/cmake/modules/FindMacIntegration.cmake @@ -12,12 +12,12 @@ # Copyright 2010 henrik andersson #============================================================================= -SET(MACINTEGRATION_FIND_REQUIRED ${MacIntegration_FIND_REQUIRED}) +set(MACINTEGRATION_FIND_REQUIRED ${MacIntegration_FIND_REQUIRED}) -find_path(MACINTEGRATION_INCLUDE_DIR gtkosxapplication.h PATH_SUFFIXES gtkmacintegration gtkmacintegration-gtk2) +find_path(MACINTEGRATION_INCLUDE_DIR gtkosxapplication.h PATH_SUFFIXES gtkmacintegration gtkmacintegration-gtk3) mark_as_advanced(MACINTEGRATION_INCLUDE_DIR) -set(MACINTEGRATION_NAMES ${MACINTEGRATION_NAMES} gtkmacintegration libgtkmacintegration gtkmacintegration-gtk2 libgtkmacintegration-gtk2) +set(MACINTEGRATION_NAMES ${MACINTEGRATION_NAMES} gtkmacintegration libgtkmacintegration gtkmacintegration-gtk3 libgtkmacintegration-gtk3) find_library(MACINTEGRATION_LIBRARY NAMES ${MACINTEGRATION_NAMES}) mark_as_advanced(MACINTEGRATION_LIBRARY) @@ -26,7 +26,7 @@ mark_as_advanced(MACINTEGRATION_LIBRARY) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(MACINTEGRATION DEFAULT_MSG MACINTEGRATION_LIBRARY MACINTEGRATION_INCLUDE_DIR) -IF(MACINTEGRATION_FOUND) - SET(MacIntegration_LIBRARIES ${MACINTEGRATION_LIBRARY}) - SET(MacIntegration_INCLUDE_DIRS ${MACINTEGRATION_INCLUDE_DIR}) -ENDIF(MACINTEGRATION_FOUND) +if(MACINTEGRATION_FOUND) + set(MacIntegration_LIBRARIES ${MACINTEGRATION_LIBRARY}) + set(MacIntegration_INCLUDE_DIRS ${MACINTEGRATION_INCLUDE_DIR}) +endif() diff --git a/doc/manpage/rawtherapee.1 b/doc/manpage/rawtherapee.1 index bbd2a4f44..5e3024a99 100644 --- a/doc/manpage/rawtherapee.1 +++ b/doc/manpage/rawtherapee.1 @@ -1,4 +1,4 @@ -.TH RAWTHERAPEE 1 "July 05, 2016" +.TH RAWTHERAPEE 1 "May 10, 2017" .SH NAME RawTherapee - An advanced, cross-platform program for developing raw photos. .SH DESCRIPTION @@ -14,11 +14,14 @@ RawTherapee - An advanced, cross-platform program for developing raw photos. The pipe symbol | indicates a choice of one or the other. The dash symbol - denotes a range of possible values from one to the other. .SH SYNOPSIS + RawTherapee GUI rawtherapee Start File Browser inside folder. rawtherapee Start Image Editor with file. - rawtherapee -c | Convert files in batch with default parameters. - rawtherapee -c | Convert files in batch with your own settings. - rawtherapee [-o |-O ] [-s|-S] [-p [-p ...] ] [-d] [ -j[1-100] [-js<1-3>] | [-b<8|16>] [-t[z] | [-n]] ] [-Y] -c + + RawTherapee CLI + rawtherapee-cli -c | Convert files in batch using default parameters. + rawtherapee-cli -c | Convert files in batch using your own settings. + rawtherapee-cli [-o |-O ] [-q] [-a] [-s|-S] [-p [-p ...] ] [-d] [ -j[1-100] [-js<1-3>] | [-b<8|16>] [-t[z] | [-n]] ] [-Y] -c .SH OPTIONS -c Specify one or more input files. -c must be the last option. @@ -26,6 +29,9 @@ RawTherapee - An advanced, cross-platform program for developing raw photos. Saves output file alongside input file if -o is not specified. -O | Set output file or folder and copy pp3 file into it. Saves output file alongside input file if -O is not specified. + -q Quick-start mode. Does not load cached files to speedup start time. + -a Process all supported image file types when specifying a folder, even those + not currently selected in Preferences > File Browser > Parsed Extensions. -s Use the existing sidecar file to build the processing parameters, e.g. for photo.raw there should be a photo.raw.pp3 file in the same folder. If the sidecar file does not exist, neutral values will be used. diff --git a/rawtherapee.appdata.xml b/rawtherapee.appdata.xml index 1e3af1747..c1a1bf6a7 100644 --- a/rawtherapee.appdata.xml +++ b/rawtherapee.appdata.xml @@ -1,6 +1,6 @@ - - + + rawtherapee.desktop CC-BY-SA-4.0 GPL-3.0+ @@ -15,11 +15,27 @@

- http://rawtherapee.com/images/screenshots/rt-42_07-hdr-landscape.jpg - http://rawtherapee.com/images/screenshots/rt-42_03-macro-detail-toning.jpg - http://rawtherapee.com/images/screenshots/rt-42_05-cow-bw-toning.jpg - http://rawtherapee.com/images/screenshots/rt-42_08-fb-metadata.jpg - http://rawtherapee.com/images/screenshots/rt-42_09-queue.jpg + + http://rawpedia.rawtherapee.com/images/9/99/Rt-5-misty1.jpg + + + http://rawpedia.rawtherapee.com/images/2/2f/Rt-5-cc24-lcp.jpg + + + http://rawtherapee.com/images/screenshots/rt-42_07-hdr-landscape.jpg + + + http://rawtherapee.com/images/screenshots/rt-42_03-macro-detail-toning.jpg + + + http://rawtherapee.com/images/screenshots/rt-42_05-cow-bw-toning.jpg + + + http://rawtherapee.com/images/screenshots/rt-42_08-fb-metadata.jpg + + + http://rawtherapee.com/images/screenshots/rt-42_09-queue.jpg + raw @@ -29,5 +45,5 @@ graphics http://rawtherapee.com/ - contactus_at_rawtherapee.com -
+ contactus@rawtherapee.com + diff --git a/rawtherapee.astylerc b/rawtherapee.astylerc index 3a0b1ea2f..bcea16b96 100644 --- a/rawtherapee.astylerc +++ b/rawtherapee.astylerc @@ -4,3 +4,5 @@ indent-switches break-blocks pad-oper convert-tabs +pad-first-paren-out +pad-header diff --git a/rtdata/CMakeLists.txt b/rtdata/CMakeLists.txt index ad8fe3421..e320969c3 100644 --- a/rtdata/CMakeLists.txt +++ b/rtdata/CMakeLists.txt @@ -1,112 +1,72 @@ -file (GLOB LANGUAGEFILES "languages/*") -file (GLOB SOUNDFILES "sounds/*") -file (GLOB INPUTICCFILES "iccprofiles/input/*") -file (GLOB OUTPUTICCFILES "iccprofiles/output/*") -file (GLOB DCPFILES "dcpprofiles/*") -file (GLOB FONTS "fonts/*") -set (PROFILESDIR "profiles") +file(GLOB LANGUAGEFILES "languages/*") +file(GLOB SOUNDFILES "sounds/*") +file(GLOB INPUTICCFILES "iccprofiles/input/*") +file(GLOB OUTPUTICCFILES "iccprofiles/output/*") +file(GLOB DCPFILES "dcpprofiles/*") +file(GLOB FONTS "fonts/*") + +set(PROFILESDIR "profiles") +set(IMAGESDIR "images") + # THEMEDIR includes subfolders for image resources for some themes; doing the normal glob won't work. -set (THEMEDIR "themes") -set (IMAGESDIR "images") +set(THEMEDIR "themes") -if (WIN32) +if(WIN32) set(OPTIONSFILE "options/options.win") -elseif (APPLE) +elseif(APPLE) set(OPTIONSFILE "options/options.osx") -else (WIN32) +else() set(OPTIONSFILE "options/options.lin") -endif (WIN32) +endif() -if (WIN32) - if (CMAKE_SIZEOF_VOID_P EQUAL 4) - set(BUILD_BIT_DEPTH 32) - # 32 bits builds has to be installable on 64 bits system, to support WinXP/64. - set(ARCHITECTURE_ALLOWED "x86 x64 ia64") - # installing in 32 bits mode even on 64 bits OS and architecture - set(INSTALL_MODE "") - # set part of the output archive name - set(SYSTEM_NAME "WinXP") - elseif (CMAKE_SIZEOF_VOID_P EQUAL 8) - set(BUILD_BIT_DEPTH 64) - # Restricting the 64 bits builds to 64 bits systems only - set(ARCHITECTURE_ALLOWED "x64 ia64") - # installing in 64 bits mode for all 64 bits processors, even for itanium architecture - set(INSTALL_MODE "x64 ia64") - # set part of the output archive name - set(SYSTEM_NAME "WinVista") - endif (CMAKE_SIZEOF_VOID_P EQUAL 4) +if(WIN32) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss" DESTINATION ${BINDIR}) +endif() - # 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) - if (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) - # we look for the git command in this paths by order of preference - find_file(GIT_CMD git.exe HINTS ENV Path PATH_SUFFIXES ../) +if(UNIX) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/icons/rawtherapee.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop") + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop" DESTINATION ${DESKTOPDIR}) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi16-app-rawtherapee.png" DESTINATION "${ICONSDIR}/hicolor/16x16/apps" RENAME rawtherapee.png) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi24-app-rawtherapee.png" DESTINATION "${ICONSDIR}/hicolor/24x24/apps" RENAME rawtherapee.png) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi32-app-rawtherapee.png" DESTINATION "${ICONSDIR}/hicolor/32x32/apps" RENAME rawtherapee.png) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi48-app-rawtherapee.png" DESTINATION "${ICONSDIR}/hicolor/48x48/apps" RENAME rawtherapee.png) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi128-app-rawtherapee.png" DESTINATION "${ICONSDIR}/hicolor/128x128/apps" RENAME rawtherapee.png) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi256-app-rawtherapee.png" DESTINATION "${ICONSDIR}/hicolor/256x256/apps" RENAME rawtherapee.png) +endif() - # Fail if Git is not installed - if (GIT_CMD STREQUAL GIT_CMD-NOTFOUND) - message(FATAL_ERROR "git command not found!") - else () - message(STATUS "git command found: ${GIT_CMD}") - endif () +install(FILES ${IMAGEFILES} DESTINATION "${DATADIR}/images") +install(FILES ${LANGUAGEFILES} DESTINATION "${DATADIR}/languages") +install(FILES ${SOUNDFILES} DESTINATION "${DATADIR}/sounds") +install(FILES ${INPUTICCFILES} DESTINATION "${DATADIR}/iccprofiles/input") +install(FILES ${OUTPUTICCFILES} DESTINATION "${DATADIR}/iccprofiles/output") +install(FILES ${DCPFILES} DESTINATION "${DATADIR}/dcpprofiles") +install(FILES ${OPTIONSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ RENAME options) +if(WIN32) + install(FILES ${FONTS} DESTINATION "${DATADIR}/fonts") +endif() - execute_process(COMMAND ${GIT_CMD} describe --tags --always OUTPUT_VARIABLE GIT_VERSION_WHOLE OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}") - string(REGEX REPLACE "-.*" "" GIT_VERSION ${GIT_VERSION_WHOLE}) - string(REGEX REPLACE ".*-(.*)-g.*" "\\1" GIT_TAGDISTANCE ${GIT_VERSION_WHOLE}) - else (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) - include("${PROJECT_SOURCE_DIR}/ReleaseInfo.cmake") - endif (REL_INFO_FILE STREQUAL REL_INFO_FILE-NOTFOUND) +install(DIRECTORY ${PROFILESDIR} DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "*.pp3") +install(DIRECTORY ${THEMEDIR} DESTINATION "${DATADIR}") +install(DIRECTORY ${IMAGESDIR} DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "index.theme") +install(DIRECTORY ${IMAGESDIR} DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "*.png") - configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/../tools/win/InnoSetup/WindowsInnoSetup.iss.in" "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss") - install (FILES "${CMAKE_CURRENT_BINARY_DIR}/WindowsInnoSetup.iss" DESTINATION ${BINDIR}) -endif (WIN32) - -if (UNIX) - configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/icons/rawtherapee.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop") - install (FILES "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop" DESTINATION ${DESKTOPDIR}) - install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi16-app-rawtherapee.png" DESTINATION "${ICONSDIR}/hicolor/16x16/apps" RENAME rawtherapee.png) - install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi24-app-rawtherapee.png" DESTINATION "${ICONSDIR}/hicolor/24x24/apps" RENAME rawtherapee.png) - install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi32-app-rawtherapee.png" DESTINATION "${ICONSDIR}/hicolor/32x32/apps" RENAME rawtherapee.png) - install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi48-app-rawtherapee.png" DESTINATION "${ICONSDIR}/hicolor/48x48/apps" RENAME rawtherapee.png) - install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi128-app-rawtherapee.png" DESTINATION "${ICONSDIR}/hicolor/128x128/apps" RENAME rawtherapee.png) - install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/icons/hi256-app-rawtherapee.png" DESTINATION "${ICONSDIR}/hicolor/256x256/apps" RENAME rawtherapee.png) -endif (UNIX) - -install (FILES ${IMAGEFILES} DESTINATION "${DATADIR}/images") -install (FILES ${LANGUAGEFILES} DESTINATION "${DATADIR}/languages") -install (FILES ${SOUNDFILES} DESTINATION "${DATADIR}/sounds") -install (FILES ${INPUTICCFILES} DESTINATION "${DATADIR}/iccprofiles/input") -install (FILES ${OUTPUTICCFILES} DESTINATION "${DATADIR}/iccprofiles/output") -install (FILES ${DCPFILES} DESTINATION "${DATADIR}/dcpprofiles") -if (WIN32) - install (FILES ${FONTS} DESTINATION "${DATADIR}/fonts") -endif (WIN32) -install (DIRECTORY ${PROFILESDIR} DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "*.pp3") -install (DIRECTORY ${THEMEDIR} DESTINATION "${DATADIR}") -install (DIRECTORY ${IMAGESDIR} DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "index.theme") -install (DIRECTORY ${IMAGESDIR} DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "*.png") -install (FILES ${OPTIONSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ RENAME options) - -if (WIN32) - install (FILES "${PROJECT_SOURCE_DIR}/doc/manpage/rawtherapee.1" DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man1") -endif (WIN32) - -if (APPLE) - # CMake escapes first item quote character. Do not remove 'DUMMY_VARIABLE='. - set (MACOSX_BUNDLE_COMMAND DUMMY_VARIABLE= - PROJECT_NAME="${PROJECT_NAME}" - PROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}" - CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" - GTK_PREFIX="${GTK_PREFIX}") - if (PROC_BIT_DEPTH MATCHES 32) - list (APPEND MACOSX_BUNDLE_COMMAND PROC_BIT_DEPTH=32) - elseif (PROC_BIT_DEPTH MATCHES 64) - list (APPEND MACOSX_BUNDLE_COMMAND PROC_BIT_DEPTH=64) - endif (PROC_BIT_DEPTH MATCHES 32) - list (APPEND MACOSX_BUNDLE_COMMAND sh "${PROJECT_SOURCE_DIR}/tools/osx/macosx_bundle.sh") +if(APPLE) + # CMake escapes first item quote character. Do not remove 'DUMMY_VARIABLE=' + set(MACOSX_BUNDLE_COMMAND DUMMY_VARIABLE= + PROJECT_NAME="${PROJECT_NAME}" + PROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}" + CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" + GTK_PREFIX="${GTK_PREFIX}") + if(PROC_BIT_DEPTH MATCHES 32) + list(APPEND MACOSX_BUNDLE_COMMAND PROC_BIT_DEPTH=32) + 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 COMMAND ${MACOSX_BUNDLE_COMMAND} WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" - COMMENT "Creating Mac OS X bundle") -endif (APPLE) + COMMENT "Creating macOS bundle") +endif() diff --git a/rtdata/dcpprofiles/Canon EOS 20D.dcp b/rtdata/dcpprofiles/Canon EOS 20D.dcp index 0dfc1c80b..1ce4c5d0b 100644 Binary files a/rtdata/dcpprofiles/Canon EOS 20D.dcp and b/rtdata/dcpprofiles/Canon EOS 20D.dcp differ diff --git a/rtdata/dcpprofiles/Canon EOS 40D.dcp b/rtdata/dcpprofiles/Canon EOS 40D.dcp index 98cf8ce09..a6117dfa5 100644 Binary files a/rtdata/dcpprofiles/Canon EOS 40D.dcp and b/rtdata/dcpprofiles/Canon EOS 40D.dcp differ diff --git a/rtdata/dcpprofiles/Canon EOS 50D.dcp b/rtdata/dcpprofiles/Canon EOS 50D.dcp new file mode 100644 index 000000000..a99da9e61 Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS 50D.dcp differ diff --git a/rtdata/dcpprofiles/Canon EOS 6D.dcp b/rtdata/dcpprofiles/Canon EOS 6D.dcp index 65919144c..3dc00a95f 100644 Binary files a/rtdata/dcpprofiles/Canon EOS 6D.dcp and b/rtdata/dcpprofiles/Canon EOS 6D.dcp differ diff --git a/rtdata/dcpprofiles/Canon EOS 7D Mark II.dcp b/rtdata/dcpprofiles/Canon EOS 7D Mark II.dcp new file mode 100644 index 000000000..1c153e82a Binary files /dev/null and b/rtdata/dcpprofiles/Canon EOS 7D Mark II.dcp differ diff --git a/rtdata/dcpprofiles/Canon EOS 7D.dcp b/rtdata/dcpprofiles/Canon EOS 7D.dcp index f6425f3c5..dd31e64f5 100644 Binary files a/rtdata/dcpprofiles/Canon EOS 7D.dcp and b/rtdata/dcpprofiles/Canon EOS 7D.dcp differ diff --git a/rtdata/dcpprofiles/Canon PowerShot G7 X.dcp b/rtdata/dcpprofiles/Canon PowerShot G7 X.dcp index 3a6c7800f..bcfdfcdf4 100644 Binary files a/rtdata/dcpprofiles/Canon PowerShot G7 X.dcp and b/rtdata/dcpprofiles/Canon PowerShot G7 X.dcp differ diff --git a/rtdata/dcpprofiles/Canon PowerShot S110.dcp b/rtdata/dcpprofiles/Canon PowerShot S110.dcp index 7f310af24..9a372a36f 100644 Binary files a/rtdata/dcpprofiles/Canon PowerShot S110.dcp and b/rtdata/dcpprofiles/Canon PowerShot S110.dcp differ diff --git a/rtdata/dcpprofiles/Fujifilm X-T1.dcp b/rtdata/dcpprofiles/FUJIFILM X-Pro2.dcp similarity index 90% rename from rtdata/dcpprofiles/Fujifilm X-T1.dcp rename to rtdata/dcpprofiles/FUJIFILM X-Pro2.dcp index 5d6c48b28..1172b17bb 100644 Binary files a/rtdata/dcpprofiles/Fujifilm X-T1.dcp and b/rtdata/dcpprofiles/FUJIFILM X-Pro2.dcp differ diff --git a/rtdata/dcpprofiles/Pentax K10D.dcp b/rtdata/dcpprofiles/FUJIFILM X-T1.dcp similarity index 89% rename from rtdata/dcpprofiles/Pentax K10D.dcp rename to rtdata/dcpprofiles/FUJIFILM X-T1.dcp index bad56c5d7..fb9ecff4d 100644 Binary files a/rtdata/dcpprofiles/Pentax K10D.dcp and b/rtdata/dcpprofiles/FUJIFILM X-T1.dcp differ diff --git a/rtdata/dcpprofiles/FUJIFILM X-T20.dcp b/rtdata/dcpprofiles/FUJIFILM X-T20.dcp new file mode 100644 index 000000000..1c631fd2a Binary files /dev/null and b/rtdata/dcpprofiles/FUJIFILM X-T20.dcp differ diff --git a/rtdata/dcpprofiles/FUJIFILM X100S.dcp b/rtdata/dcpprofiles/FUJIFILM X100S.dcp new file mode 100644 index 000000000..962d58469 Binary files /dev/null and b/rtdata/dcpprofiles/FUJIFILM X100S.dcp differ diff --git a/rtdata/dcpprofiles/Fujifilm X100T.dcp b/rtdata/dcpprofiles/FUJIFILM X100T.dcp similarity index 90% rename from rtdata/dcpprofiles/Fujifilm X100T.dcp rename to rtdata/dcpprofiles/FUJIFILM X100T.dcp index 1fa827c5d..b2823ccce 100644 Binary files a/rtdata/dcpprofiles/Fujifilm X100T.dcp and b/rtdata/dcpprofiles/FUJIFILM X100T.dcp differ diff --git a/rtdata/dcpprofiles/LG Mobile LG-H815.dcp b/rtdata/dcpprofiles/LG Mobile LG-H815.dcp new file mode 100644 index 000000000..d8a4539db Binary files /dev/null and b/rtdata/dcpprofiles/LG Mobile LG-H815.dcp differ diff --git a/rtdata/dcpprofiles/NIKON D300.dcp b/rtdata/dcpprofiles/NIKON D300.dcp new file mode 100644 index 000000000..008383c59 Binary files /dev/null and b/rtdata/dcpprofiles/NIKON D300.dcp differ diff --git a/rtdata/dcpprofiles/Nikon D7200.dcp b/rtdata/dcpprofiles/NIKON D5600.dcp similarity index 89% rename from rtdata/dcpprofiles/Nikon D7200.dcp rename to rtdata/dcpprofiles/NIKON D5600.dcp index 01e5cfa13..00367d43d 100644 Binary files a/rtdata/dcpprofiles/Nikon D7200.dcp and b/rtdata/dcpprofiles/NIKON D5600.dcp differ diff --git a/rtdata/dcpprofiles/NIKON D600.dcp b/rtdata/dcpprofiles/NIKON D600.dcp new file mode 100644 index 000000000..039989c2c Binary files /dev/null and b/rtdata/dcpprofiles/NIKON D600.dcp differ diff --git a/rtdata/dcpprofiles/Sony ILCE-6000.dcp b/rtdata/dcpprofiles/NIKON D7200.dcp similarity index 89% rename from rtdata/dcpprofiles/Sony ILCE-6000.dcp rename to rtdata/dcpprofiles/NIKON D7200.dcp index 5ef8c4d31..742bd3ead 100644 Binary files a/rtdata/dcpprofiles/Sony ILCE-6000.dcp and b/rtdata/dcpprofiles/NIKON D7200.dcp differ diff --git a/rtdata/dcpprofiles/NIKON D750.dcp b/rtdata/dcpprofiles/NIKON D750.dcp new file mode 100644 index 000000000..6dcef8386 Binary files /dev/null and b/rtdata/dcpprofiles/NIKON D750.dcp differ diff --git a/rtdata/dcpprofiles/NIKON D80.dcp b/rtdata/dcpprofiles/NIKON D80.dcp new file mode 100644 index 000000000..965c358aa Binary files /dev/null and b/rtdata/dcpprofiles/NIKON D80.dcp differ diff --git a/rtdata/dcpprofiles/NIKON D810.dcp b/rtdata/dcpprofiles/NIKON D810.dcp new file mode 100644 index 000000000..2a32a1376 Binary files /dev/null and b/rtdata/dcpprofiles/NIKON D810.dcp differ diff --git a/rtdata/dcpprofiles/Nikon D300.dcp b/rtdata/dcpprofiles/Nikon D300.dcp deleted file mode 100644 index 3b1100b9d..000000000 Binary files a/rtdata/dcpprofiles/Nikon D300.dcp and /dev/null differ diff --git a/rtdata/dcpprofiles/Nikon D750.dcp b/rtdata/dcpprofiles/Nikon D750.dcp deleted file mode 100644 index ad9cd5679..000000000 Binary files a/rtdata/dcpprofiles/Nikon D750.dcp and /dev/null differ diff --git a/rtdata/dcpprofiles/OLYMPUS E-M10.dcp b/rtdata/dcpprofiles/OLYMPUS E-M10.dcp new file mode 100644 index 000000000..d10459c83 Binary files /dev/null and b/rtdata/dcpprofiles/OLYMPUS E-M10.dcp differ diff --git a/rtdata/dcpprofiles/OLYMPUS E-M1MarkII.dcp b/rtdata/dcpprofiles/OLYMPUS E-M1MarkII.dcp new file mode 100644 index 000000000..f32d01302 Binary files /dev/null and b/rtdata/dcpprofiles/OLYMPUS E-M1MarkII.dcp differ diff --git a/rtdata/dcpprofiles/Pentax K-5 II.dcp b/rtdata/dcpprofiles/PENTAX K-5 II.dcp similarity index 89% rename from rtdata/dcpprofiles/Pentax K-5 II.dcp rename to rtdata/dcpprofiles/PENTAX K-5 II.dcp index 6eef2206a..307a40689 100644 Binary files a/rtdata/dcpprofiles/Pentax K-5 II.dcp and b/rtdata/dcpprofiles/PENTAX K-5 II.dcp differ diff --git a/rtdata/dcpprofiles/Pentax K-5.dcp b/rtdata/dcpprofiles/PENTAX K-5.dcp similarity index 92% rename from rtdata/dcpprofiles/Pentax K-5.dcp rename to rtdata/dcpprofiles/PENTAX K-5.dcp index 52fbb7d85..c3e496fab 100644 Binary files a/rtdata/dcpprofiles/Pentax K-5.dcp and b/rtdata/dcpprofiles/PENTAX K-5.dcp differ diff --git a/rtdata/dcpprofiles/PENTAX K10D.dcp b/rtdata/dcpprofiles/PENTAX K10D.dcp new file mode 100644 index 000000000..cda2456d0 Binary files /dev/null and b/rtdata/dcpprofiles/PENTAX K10D.dcp differ diff --git a/rtdata/dcpprofiles/Ricoh Pentax K-3.dcp b/rtdata/dcpprofiles/Panasonic DMC-GX85.dcp similarity index 89% rename from rtdata/dcpprofiles/Ricoh Pentax K-3.dcp rename to rtdata/dcpprofiles/Panasonic DMC-GX85.dcp index 1eead1a2b..82d722a8c 100644 Binary files a/rtdata/dcpprofiles/Ricoh Pentax K-3.dcp and b/rtdata/dcpprofiles/Panasonic DMC-GX85.dcp differ diff --git a/rtdata/dcpprofiles/RICOH PENTAX K-1.dcp b/rtdata/dcpprofiles/RICOH PENTAX K-1.dcp new file mode 100644 index 000000000..87028cba6 Binary files /dev/null and b/rtdata/dcpprofiles/RICOH PENTAX K-1.dcp differ diff --git a/rtdata/dcpprofiles/RICOH PENTAX K-3.dcp b/rtdata/dcpprofiles/RICOH PENTAX K-3.dcp new file mode 100644 index 000000000..f04e0b2ad Binary files /dev/null and b/rtdata/dcpprofiles/RICOH PENTAX K-3.dcp differ diff --git a/rtdata/dcpprofiles/SONY ILCE-6000.dcp b/rtdata/dcpprofiles/SONY ILCE-6000.dcp new file mode 100644 index 000000000..d0d1c3ae5 Binary files /dev/null and b/rtdata/dcpprofiles/SONY ILCE-6000.dcp differ diff --git a/rtdata/dcpprofiles/Sony ILCE-7M2.dcp b/rtdata/dcpprofiles/SONY ILCE-7M2.dcp similarity index 89% rename from rtdata/dcpprofiles/Sony ILCE-7M2.dcp rename to rtdata/dcpprofiles/SONY ILCE-7M2.dcp index 6d886e491..b46343181 100644 Binary files a/rtdata/dcpprofiles/Sony ILCE-7M2.dcp and b/rtdata/dcpprofiles/SONY ILCE-7M2.dcp differ diff --git a/rtdata/dcpprofiles/SONY SLT-A99V.dcp b/rtdata/dcpprofiles/SONY SLT-A99V.dcp new file mode 100644 index 000000000..94a0767ed Binary files /dev/null and b/rtdata/dcpprofiles/SONY SLT-A99V.dcp differ diff --git a/rtdata/dcpprofiles/YI TECHNOLOGY M1.dcp b/rtdata/dcpprofiles/YI TECHNOLOGY M1.dcp new file mode 100644 index 000000000..d21ace365 Binary files /dev/null and b/rtdata/dcpprofiles/YI TECHNOLOGY M1.dcp differ diff --git a/rtdata/icons/rawtherapee.desktop.in b/rtdata/icons/rawtherapee.desktop.in index 41911b4ac..a573f19d3 100644 --- a/rtdata/icons/rawtherapee.desktop.in +++ b/rtdata/icons/rawtherapee.desktop.in @@ -6,10 +6,10 @@ GenericName=Raw photo editor GenericName[cs]=Editor raw obrázků GenericName[fr]=Éditeur d'images raw GenericName[pl]=Edytor zdjęć raw -Comment=An advanced photo development program -Comment[cs]=Program pro konverzi a zpracování digitálních raw fotografií. -Comment[fr]=Logiciel de conversion et de traitement de photos numériques de format raw (but de capteur). -Comment[pl]=Zaawansowany program do wywoływania zdjęć +Comment=An advanced raw photo development program +Comment[cs]=Program pro konverzi a zpracování digitálních raw fotografií +Comment[fr]=Logiciel de conversion et de traitement de photos numériques de format raw (but de capteur) +Comment[pl]=Zaawansowany program do wywoływania zdjęć typu raw Icon=rawtherapee Exec=rawtherapee %f Terminal=false diff --git a/rtdata/images/Dark/actions/expanderClosed.png b/rtdata/images/Dark/actions/expanderClosed.png index 1de089570..559f201db 100644 Binary files a/rtdata/images/Dark/actions/expanderClosed.png and b/rtdata/images/Dark/actions/expanderClosed.png differ diff --git a/rtdata/images/Dark/actions/expanderDisabled.png b/rtdata/images/Dark/actions/expanderDisabled.png index 1593dc5b5..7e35c7266 100644 Binary files a/rtdata/images/Dark/actions/expanderDisabled.png and b/rtdata/images/Dark/actions/expanderDisabled.png differ diff --git a/rtdata/images/Dark/actions/expanderEnabled.png b/rtdata/images/Dark/actions/expanderEnabled.png index a3d16f51c..33e8515af 100644 Binary files a/rtdata/images/Dark/actions/expanderEnabled.png and b/rtdata/images/Dark/actions/expanderEnabled.png differ diff --git a/rtdata/images/Dark/actions/expanderInconsistent.png b/rtdata/images/Dark/actions/expanderInconsistent.png index 06619ca10..e19f8e106 100644 Binary files a/rtdata/images/Dark/actions/expanderInconsistent.png and b/rtdata/images/Dark/actions/expanderInconsistent.png differ diff --git a/rtdata/images/Dark/actions/expanderOpened.png b/rtdata/images/Dark/actions/expanderOpened.png index 176e99dae..9a7f161ee 100644 Binary files a/rtdata/images/Dark/actions/expanderOpened.png and b/rtdata/images/Dark/actions/expanderOpened.png differ diff --git a/rtdata/images/Dark/actions/zoom-100-identifier.png b/rtdata/images/Dark/actions/zoom-100-identifier.png index 45d8f2bef..7452d50dd 100644 Binary files a/rtdata/images/Dark/actions/zoom-100-identifier.png and b/rtdata/images/Dark/actions/zoom-100-identifier.png differ diff --git a/rtdata/images/Light/actions/expanderClosed.png b/rtdata/images/Light/actions/expanderClosed.png index 90d1269aa..81a7d85ab 100644 Binary files a/rtdata/images/Light/actions/expanderClosed.png and b/rtdata/images/Light/actions/expanderClosed.png differ diff --git a/rtdata/images/Light/actions/expanderDisabled.png b/rtdata/images/Light/actions/expanderDisabled.png index 27b1ed1d7..8fcef1b01 100644 Binary files a/rtdata/images/Light/actions/expanderDisabled.png and b/rtdata/images/Light/actions/expanderDisabled.png differ diff --git a/rtdata/images/Light/actions/expanderEnabled.png b/rtdata/images/Light/actions/expanderEnabled.png index 402d4aae2..7e2006eb3 100644 Binary files a/rtdata/images/Light/actions/expanderEnabled.png and b/rtdata/images/Light/actions/expanderEnabled.png differ diff --git a/rtdata/images/Light/actions/expanderInconsistent.png b/rtdata/images/Light/actions/expanderInconsistent.png index 9f87059dc..3c2339b60 100644 Binary files a/rtdata/images/Light/actions/expanderInconsistent.png and b/rtdata/images/Light/actions/expanderInconsistent.png differ diff --git a/rtdata/images/Light/actions/expanderOpened.png b/rtdata/images/Light/actions/expanderOpened.png index e53435263..5b003e3f7 100644 Binary files a/rtdata/images/Light/actions/expanderOpened.png and b/rtdata/images/Light/actions/expanderOpened.png differ diff --git a/rtdata/images/Light/actions/zoom-100-identifier.png b/rtdata/images/Light/actions/zoom-100-identifier.png index 390fdebf2..a07b63b83 100644 Binary files a/rtdata/images/Light/actions/zoom-100-identifier.png and b/rtdata/images/Light/actions/zoom-100-identifier.png differ diff --git a/rtdata/images/rt-logo-large.png b/rtdata/images/rt-logo-large.png index 3639139da..f2cde46b7 100644 Binary files a/rtdata/images/rt-logo-large.png and b/rtdata/images/rt-logo-large.png differ diff --git a/rtdata/images/rt-logo-medium.png b/rtdata/images/rt-logo-medium.png new file mode 100644 index 000000000..a2c2366f1 Binary files /dev/null and b/rtdata/images/rt-logo-medium.png differ diff --git a/rtdata/images/rt-logo-small.png b/rtdata/images/rt-logo-small.png new file mode 100644 index 000000000..cf306e433 Binary files /dev/null and b/rtdata/images/rt-logo-small.png differ diff --git a/rtdata/images/rt-logo-tiny.png b/rtdata/images/rt-logo-tiny.png new file mode 100644 index 000000000..f1034f149 Binary files /dev/null and b/rtdata/images/rt-logo-tiny.png differ diff --git a/rtdata/images/rt-logo.png b/rtdata/images/rt-logo.png deleted file mode 100644 index c56193604..000000000 Binary files a/rtdata/images/rt-logo.png and /dev/null differ diff --git a/rtdata/images/rt_splash.svg b/rtdata/images/rt_splash.svg new file mode 100644 index 000000000..8048ccb97 --- /dev/null +++ b/rtdata/images/rt_splash.svg @@ -0,0 +1,1054 @@ + + + + + RawTherapee Splash Screen + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + RawTherapee Splash Screen + + + Morgan Hardwood + + + + + rawtherapee + logo + splash + + + www.rawtherapee.com + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Apply glow effects using filters. You might need to ungroup the circle elements before applying. You can change the flood color of the "ring shadow" effect to make it white if you want to make the logo usable on a dark background. For logo specifics, refer to rt_logo.svg "Raw": font ITC Eras Std Ultra, appears in Inkscape as ITC Eras Standard - Ultra-Bold, 60pt, -3px spacing between characters."Therapee": font ITC Eras Std Medium, appears in Inkscape as ITC Eras Standard - Medium, 60pt, +1px spacing between characters.Version: font ITC Eras Std Bold, appears in Inkscape as ITC Eras Standard - Bold, 64pt, skewed -3°. RawTherapee splash screen design version 1.1 from 2017-01-28 | www.rawtherapee.com +     + Raw + Therapee + GNU GPLv3 + 5 + . 2 + + Development + + + + diff --git a/rtdata/images/splash.png b/rtdata/images/splash.png index 2dbec173e..2a0806946 100644 Binary files a/rtdata/images/splash.png and b/rtdata/images/splash.png differ diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index f73df46a7..ff700b720 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -95,7 +95,6 @@ FILEBROWSER_DELETEDLGMSG;Segur que voleu esborrar els %1 fitxers? FILEBROWSER_DELETEDLGMSGINCLPROC;Segur que voleu suprimir els fitxers %1 seleccionats incloent la versió processada a la cua? FILEBROWSER_EMPTYTRASH;Buida paperera FILEBROWSER_EMPTYTRASHHINT;Buida permanentment la paperera -FILEBROWSER_EXEC_CPB;Constructor de perfils propis FILEBROWSER_EXTPROGMENU;Obre amb FILEBROWSER_FLATFIELD;Camp pla FILEBROWSER_MOVETODARKFDIR;Canvia al directori de camps foscos @@ -184,7 +183,6 @@ HISTOGRAM_TOOLTIP_R;Mostra/amaga l'histograma VERMELL HISTOGRAM_TOOLTIP_RAW;Mostra/Amaga l'histograma RAW HISTORY_CHANGED;Canviat HISTORY_CUSTOMCURVE;Corba particular -HISTORY_DELSNAPSHOT;Esborra HISTORY_FROMCLIPBOARD;Del portapapers HISTORY_LABEL;Història HISTORY_MSG_1;Imatge oberta @@ -362,47 +360,23 @@ HISTORY_MSG_173;RS - Detall de la luminància HISTORY_NEWSNAPSHOT;Afegeix HISTORY_SNAPSHOT;Instantània HISTORY_SNAPSHOTS;Instantànies -IPTCPANEL_AUTHOR;Autor -IPTCPANEL_AUTHORSPOSITION;Tractament o títol de l'autor -IPTCPANEL_AUTHORSPOSITIONHINT;Títol del(s) creador(s) de l'objecte (By-line Title). -IPTCPANEL_CAPTION;Text descriptiu -IPTCPANEL_CAPTIONHINT;Un text de descripció de les dades (Caption - Abstract). -IPTCPANEL_CAPTIONWRITER;Autor de la descripció -IPTCPANEL_CAPTIONWRITERHINT;Nom de qui ha escrit, editat o corregit la imatge o la descripció (Writer - Editor). IPTCPANEL_CATEGORY;Classificació -IPTCPANEL_CATEGORYHINT;Classificació de la imatge, segons el proveïdor (Category). IPTCPANEL_CITY;Ciutat -IPTCPANEL_CITYHINT;Ciutat d'origen de la imatge (City). IPTCPANEL_COPYHINT;Copiar dades actuals IPTC al portapapers -IPTCPANEL_COPYRIGHT;Copyright -IPTCPANEL_COPYRIGHTHINT;Qualsevol notificació necessària sobre copyright (Copyright Notice). IPTCPANEL_COUNTRY;País -IPTCPANEL_COUNTRYHINT;Nom del país o lloc on va ser creada la imatge (Country - Primary Location Name). IPTCPANEL_CREDIT;Crèdit IPTCPANEL_CREDITHINT;Identitat del proveïdor de la imatge, no necessàriament el propietari/creador (Credit). IPTCPANEL_DATECREATED;Data de creació -IPTCPANEL_DATECREATEDHINT;Data en què va ser creat el contingut intel·lectual de la imatge; Format: AAAAMMDD (Date Created). IPTCPANEL_EMBEDDED;Encastat IPTCPANEL_EMBEDDEDHINT;Restaurar les dades IPTC encastades al fitxer d'imatge IPTCPANEL_HEADLINE;Capçalera -IPTCPANEL_HEADLINEHINT;Una nota publicable que és una sinopsi dels continguts de la imatge (Headline). IPTCPANEL_INSTRUCTIONS;Instruccions -IPTCPANEL_INSTRUCTIONSHINT;Altres instruccions editorials sobre l'ús de la imatge (Special Instructions). IPTCPANEL_KEYWORDS;Paraules clau -IPTCPANEL_KEYWORDSHINT;Paraules clau que faciliten la recerca de la imatge (Keywords). IPTCPANEL_PASTEHINT;Enganxa les dades IPTC del portapapers -IPTCPANEL_PROVINCE;Regió -IPTCPANEL_PROVINCEHINT;Regió/Estat d'origen de la imatge (Province-State). IPTCPANEL_RESET;Reinici IPTCPANEL_RESETHINT;Reinici perfil per omissió IPTCPANEL_SOURCE;Font -IPTCPANEL_SOURCEHINT;Propietari original del contingut intel·lectual de la imatge (Source). -IPTCPANEL_SUPPCATEGORIES;Classif. detallada -IPTCPANEL_SUPPCATEGORIESHINT;Precisió sobre el tema de la imatge (Supplemental Categories). IPTCPANEL_TITLE;Títol -IPTCPANEL_TITLEHINT;Referència breu de la imatge (Object Name). -IPTCPANEL_TRANSREFERENCE;Refer. transmissió -IPTCPANEL_TRANSREFERENCEHINT;Codi que indica el lloc de la transmissió original (Original Transmission Reference). MAIN_BUTTON_FULLSCREEN;Pantalla sencera MAIN_BUTTON_PREFERENCES;Preferències MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;Afeg. imatge actual a la cua de procés.\nDrecera: Ctrl+B @@ -504,8 +478,6 @@ PARTIALPASTE_PERSPECTIVE;Perspectiva PARTIALPASTE_PREPROCESS_GREENEQUIL;Equilibri verd PARTIALPASTE_PREPROCESS_LINEDENOISE;Filtre línia de soroll PARTIALPASTE_RAWCACORR_AUTO;Auto-correcció AC -PARTIALPASTE_RAWCACORR_CABLUE;AC blau -PARTIALPASTE_RAWCACORR_CARED;AC vermell PARTIALPASTE_RAWEXPOS_BLACK;Nivell negre PARTIALPASTE_RAWEXPOS_LINEAR;Factor de corr. linear de punt blanc PARTIALPASTE_RAWEXPOS_PRESER;Corr. punt blanc preservant HL (EV) @@ -546,8 +518,6 @@ PREFERENCES_DARKFRAMESHOTS;trets PREFERENCES_DARKFRAMETEMPLATES;plantilles PREFERENCES_DATEFORMAT;Format de data PREFERENCES_DATEFORMATHINT;Podeu fer servir les següents cadenes formatades:\n%y : any\n%m : mes\n%d : dia\n\nPer exemple, el format de data hongarès és:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Idioma per omissió -PREFERENCES_DEFAULTTHEME;Tema per omissió PREFERENCES_DIRDARKFRAMES;Carpeta de marcs foscos PREFERENCES_DIRHOME;directori home PREFERENCES_DIRLAST;Últim directori usat @@ -617,7 +587,6 @@ PREFERENCES_SHOWEXPOSURECOMPENSATION;Mostra compensació d'exposició PREFERENCES_SHTHRESHOLD;Llindar pèrdues en foscos PREFERENCES_SINGLETAB;Mode simple treball PREFERENCES_SINGLETABVERTAB;Mode simple treball, vistes verticals -PREFERENCES_SLIMUI;Interfície senzilla PREFERENCES_SND_BATCHQUEUEDONE;Procs. de la cua fets PREFERENCES_SND_HELP;Poseu el path o bé no res (res=silenci). A Windows useu "SystemDefault", "SystemAsterisk" etc. pels sons del sistema. PREFERENCES_SND_LNGEDITPROCDONE;Process. d'editor fet @@ -631,7 +600,6 @@ PREFERENCES_TAB_SOUND;Sons PREFERENCES_TP_LABEL;Panell d'eines: PREFERENCES_TP_USEICONORTEXT;Usa les icones tab en comptes de text PREFERENCES_TP_VSCROLLBAR;Amaga la barra d'eines vertical -PREFERENCES_USESYSTEMTHEME; Usa tema del sistema PREFERENCES_WORKFLOW;Flux de treball PROFILEPANEL_COPYPPASTE;Paràmetres a copiar PROFILEPANEL_LABEL;Perfils de postprocés @@ -733,8 +701,6 @@ TP_DIRPYREQUALIZER_LUMAFINEST;Més fi TP_DIRPYREQUALIZER_LUMANEUTRAL;Neutral TP_DIRPYREQUALIZER_THRESHOLD;Llindar TP_DISTORTION_AMOUNT;Quantitat -TP_DISTORTION_AUTO;Auto correcció de distorsió -TP_DISTORTION_AUTO_TIP;(Experimental) Correc. automàtica de distorsió de lent per algunes càmeres (M4/3, algunes compactes DC, etc.) TP_DISTORTION_LABEL;Distorsió TP_EPD_EDGESTOPPING;Aturant a les vores TP_EPD_LABEL;Mapejant tons @@ -803,7 +769,6 @@ TP_ICM_INPUTPROFILE;Perfil d'entrada TP_ICM_LABEL;Gestió de color TP_ICM_NOICM;No cap ICM: Sortida sRGB TP_ICM_OUTPUTPROFILE;Perfil de sortida -TP_ICM_SAVEREFERENCE;Desa com a imatge de ref. als perfils TP_ICM_TONECURVE;Usa la corba de to DCP. TP_ICM_TONECURVE_TOOLTIP;Habilita l'ús de corbes de to incloses en els perfils DCP. TP_ICM_WORKINGPROFILE;Perfil de treball @@ -999,10 +964,25 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_EQUALIZER;Bypass Wavelet Levels !EXPORT_BYPASS_RAW_LMMSE_ITERATIONS;Bypass [raw] LMMSE Enhancement Steps +!EXPORT_PIPELINE;Processing pipeline +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !FILEBROWSER_COLORLABEL_TOOLTIP;Color label.\n\nUse dropdown menu or shortcuts:\nShift-Ctrl-0 No Color\nShift-Ctrl-1 Red\nShift-Ctrl-2 Yellow\nShift-Ctrl-3 Green\nShift-Ctrl-4 Blue\nShift-Ctrl-5 Purple !FILEBROWSER_POPUPCOLORLABEL0;Label: None !FILEBROWSER_POPUPCOLORLABEL1;Label: Red @@ -1021,6 +1001,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWNOTTRASHHINT;Show only non-deleted images. !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !FILEBROWSER_UNRANK_TOOLTIP;Unrank.\nShortcut: Shift-0 @@ -1036,6 +1017,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !GENERAL_AUTO;Automatic !GENERAL_CLOSE;Close !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_174;CIECAM02 @@ -1223,7 +1205,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -1275,12 +1257,12 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1293,8 +1275,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -1306,8 +1288,58 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 !MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronize the File Browser or Filmstrip with the Editor to reveal the thumbnail of the currently opened image, and clear any active filters.\nShortcut: x\n\nAs above, but without clearing active filters:\nShortcut: y\n(Note that the thumbnail of the opened image will not be shown if filtered out). @@ -1315,6 +1347,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1341,7 +1374,10 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PARTIALPASTE_PREPROCESS_DEADPIXFILT;Dead pixel filter !PARTIALPASTE_PREPROCESS_HOTPIXFILT;Hot pixel filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_WAVELETGROUP;Wavelet Levels !PREFERENCES_AUTLISLOW;Low @@ -1362,7 +1398,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1370,7 +1407,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_CUSTPROFBUILDKEYFORMAT;Keys format !PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1387,7 +1425,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1400,6 +1439,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1407,9 +1447,10 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color !PREFERENCES_NAVIGATIONFRAME;Navigation !PREFERENCES_NOISE;Noise Reduction @@ -1420,7 +1461,12 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels @@ -1433,7 +1479,9 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1447,6 +1495,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PROFILEPANEL_GLOBALPROFILES;Bundled profiles !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROGRESSBAR_NOIMAGES;No images found !PROGRESSBAR_SNAPSHOT_ADDED;Snapshot added @@ -1519,11 +1568,11 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1543,8 +1592,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1555,6 +1604,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1566,9 +1616,11 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1587,10 +1639,14 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1695,6 +1751,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_DIRPYREQUALIZER_SKIN;Skin targetting/protection !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_GAMMA;Gamma !TP_EPD_TOOLTIP;Tone mapping is possible in L*a*b* mode (standard) and CIECAM02 mode.\n\nWhen in L*a*b* mode, tone mapping can also be used on the residual image of the Wavelet Levels tool.\n\nTo engage CIECAM02 tone mapping mode enable the following settings:\n1. CIECAM02\n2. Algorithm="Brightness + Colorfulness (QM)"\n3. "Tone mapping using CIECAM02 brightness (Q)" !TP_EXPOSURE_TCMODE_LUMINANCE;Luminance @@ -1722,17 +1779,17 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_GRADIENT_STRENGTH_TOOLTIP;Filter strength in stops. !TP_HLREC_ENA_TOOLTIP;Could be activated by Auto Levels. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. @@ -1769,16 +1826,77 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_RAWEXPOS_BLACK_GREEN;Green !TP_RAWEXPOS_BLACK_RED;Red !TP_RAWEXPOS_RGB;Red, Green, Blue +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL !TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* !TP_RETINEX_CONTEDIT_LH;Hue equalizer @@ -2028,6 +2146,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_WAVELET_TON;Toning !TP_WBALANCE_EQBLUERED;Blue/Red equalizer !TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behavior of "white balance" by modulating the blue/red balance.\nThis can be useful when shooting conditions:\na) are far from the standard illuminant (e.g. underwater),\nb) are far from conditions where calibrations were performed,\nc) where the matrices or ICC profiles are unsuitable. +!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_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 !TP_WBALANCE_WATER_HEADER;UnderWater diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index 72753272c..2fd87fe5e 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -69,7 +69,6 @@ FILEBROWSER_DELETEDLGLABEL;确认删除 FILEBROWSER_DELETEDLGMSG;确定删除所选的%1个文件? FILEBROWSER_EMPTYTRASH;清空垃圾箱 FILEBROWSER_EMPTYTRASHHINT;永久清空垃圾箱 -FILEBROWSER_EXEC_CPB;自定义档案制作工具 FILEBROWSER_EXTPROGMENU;调用程序... FILEBROWSER_NEW_NAME;新名称: FILEBROWSER_OPENDEFAULTVIEWER;Windows 默认阅览工具 (序列) @@ -152,7 +151,6 @@ HISTOGRAM_TOOLTIP_L;显示/隐藏 CIELAB 亮度直方图 HISTOGRAM_TOOLTIP_R;显示/隐藏 红色直方图 HISTORY_CHANGED;已更改 HISTORY_CUSTOMCURVE;自定义曲线 -HISTORY_DELSNAPSHOT;移除快照 HISTORY_FROMCLIPBOARD;从剪贴板 HISTORY_LABEL;历史 HISTORY_MSG_1;图片加载完 @@ -276,47 +274,23 @@ HISTORY_NEWSNAPSHOT;新建快照 HISTORY_NEWSNAPSHOT_TOOLTIP;快捷键:Alt-s HISTORY_SNAPSHOT;快照 HISTORY_SNAPSHOTS;系列快照 -IPTCPANEL_AUTHOR;作者 -IPTCPANEL_AUTHORSPOSITION;作者职位 -IPTCPANEL_AUTHORSPOSITIONHINT;作者头衔 -IPTCPANEL_CAPTION;标题 -IPTCPANEL_CAPTIONHINT;文字说明 -IPTCPANEL_CAPTIONWRITER;说明作者 -IPTCPANEL_CAPTIONWRITERHINT;参与创作人员 IPTCPANEL_CATEGORY;类别 -IPTCPANEL_CATEGORYHINT;提供者所认为的作品类别 IPTCPANEL_CITY;城市 -IPTCPANEL_CITYHINT;图片来自城市 IPTCPANEL_COPYHINT;将IPTC设置复制到剪贴板 -IPTCPANEL_COPYRIGHT;版权 -IPTCPANEL_COPYRIGHTHINT;版权信息 IPTCPANEL_COUNTRY;国家 -IPTCPANEL_COUNTRYHINT;图片来自国家 IPTCPANEL_CREDIT;提供者 IPTCPANEL_CREDITHINT;图片提供者,未必是作者 IPTCPANEL_DATECREATED;创作日期 -IPTCPANEL_DATECREATEDHINT;图片创作日期,格式:年月日补零(YYYYMMDD) IPTCPANEL_EMBEDDED;内嵌 IPTCPANEL_EMBEDDEDHINT;将IPTC数据重置为图片内嵌数据 IPTCPANEL_HEADLINE;摘要 -IPTCPANEL_HEADLINEHINT;可发布的内容简介 IPTCPANEL_INSTRUCTIONS;指令 -IPTCPANEL_INSTRUCTIONSHINT;写给编辑的特殊要求 IPTCPANEL_KEYWORDS;关键词 -IPTCPANEL_KEYWORDSHINT;用于信息索引 IPTCPANEL_PASTEHINT;粘贴剪贴板内的IPTC设置 -IPTCPANEL_PROVINCE;省份 -IPTCPANEL_PROVINCEHINT;图片来自省份 IPTCPANEL_RESET;重置 IPTCPANEL_RESETHINT;重置为默认配置 IPTCPANEL_SOURCE;来源 -IPTCPANEL_SOURCEHINT;图片内容知识产权所有人 -IPTCPANEL_SUPPCATEGORIES;附加类别 -IPTCPANEL_SUPPCATEGORIESHINT;进一步细分类别 IPTCPANEL_TITLE;标题 -IPTCPANEL_TITLEHINT;作品的名称 -IPTCPANEL_TRANSREFERENCE;传输基准 -IPTCPANEL_TRANSREFERENCEHINT;原始发送地点代码 MAIN_BUTTON_FULLSCREEN;全屏幕 MAIN_BUTTON_PREFERENCES;参数设置 MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;将当前图片放入处理序列中\n快捷键: Ctrl+b @@ -412,8 +386,6 @@ PARTIALPASTE_PERSPECTIVE;视角 PARTIALPASTE_PREPROCESS_GREENEQUIL;绿平衡 PARTIALPASTE_PREPROCESS_LINEDENOISE;线性噪点滤镜 PARTIALPASTE_RAWCACORR_AUTO;CA自动更正 -PARTIALPASTE_RAWCACORR_CABLUE;CA蓝 -PARTIALPASTE_RAWCACORR_CARED;CA红 PARTIALPASTE_RAWGROUP;Raw设置 PARTIALPASTE_RESIZE;缩放 PARTIALPASTE_RGBCURVES;RGB曲线 @@ -445,8 +417,6 @@ PREFERENCES_D60;6000K PREFERENCES_D65;6500K PREFERENCES_DATEFORMAT;日期格式 PREFERENCES_DATEFORMATHINT;可以使用下列控制符:\n%y : 年\n%m : 月h\n%d : 日\n\n例如,中文日期格式:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;缺省语言 -PREFERENCES_DEFAULTTHEME;默认主题 PREFERENCES_DIRHOME;用户文件路径 PREFERENCES_DIRLAST;上次访问路径 PREFERENCES_DIROTHER;其他 @@ -498,7 +468,6 @@ PREFERENCES_TAB_GENERAL;一般 PREFERENCES_TAB_IMPROC;图片处理 PREFERENCES_TAB_SOUND;音效 PREFERENCES_TP_LABEL;工具栏 -PREFERENCES_USESYSTEMTHEME;使用系统主题 PREFERENCES_WORKFLOW;排版 PROFILEPANEL_LABEL;处理参数配置 PROFILEPANEL_LOADDLGLABEL;加载处理参数为... @@ -625,8 +594,6 @@ TP_DIRPYREQUALIZER_LUMAFINEST;最佳 TP_DIRPYREQUALIZER_LUMANEUTRAL;自然 TP_DIRPYREQUALIZER_THRESHOLD;阀值 TP_DISTORTION_AMOUNT;程度 -TP_DISTORTION_AUTO;自动畸变矫正 -TP_DISTORTION_AUTO_TIP;自动进行一些相机的镜头畸变矫正 TP_DISTORTION_LABEL;畸变 TP_EPD_LABEL;色阶映射 TP_EPD_SCALE;拉伸 @@ -695,7 +662,6 @@ TP_ICM_INPUTPROFILE;输入配置 TP_ICM_LABEL;ICM TP_ICM_NOICM;No ICM: sRGB配置 TP_ICM_OUTPUTPROFILE;输出配置 -TP_ICM_SAVEREFERENCE;保存参考图片用于生成配置信息 TP_ICM_TONECURVE;使用 DCP 色调曲线 TP_ICM_WORKINGPROFILE;当前配置 TP_IMPULSEDENOISE_LABEL;降低电磁干扰 @@ -829,10 +795,21 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !CURVEEDITOR_PARAMETRIC;Parametric !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. !EXIFFILTER_EXPOSURECOMPENSATION;Exposure compensation (EV) !EXIFFILTER_METADATAFILTER;Enable metadata filters +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction !EXPORT_BYPASS_DIRPYREQUALIZER;Bypass Contrast by Detail Levels @@ -849,7 +826,11 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !EXPORT_BYPASS_SHARPENMICRO;Bypass Microcontrast !EXPORT_BYPASS_SH_HQ;Bypass Sharp Mask Shadows/Highlights !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. +!EXPORT_PIPELINE;Processing pipeline !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... !FILEBROWSER_APPLYPROFILE_PARTIAL;Apply - partial @@ -872,6 +853,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !FILEBROWSER_POPUPRANK;Rank !FILEBROWSER_POPUPRANK0;Unrank !FILEBROWSER_QUERYHINT;Type filenames to search for. Supports partial filenames. Separate the search terms using commas, e.g.\n1001,1004,1199\n\nExclude search terms by prefixing them with !=\ne.g.\n!=1001,1004,1199\n\nShortcuts:\nCtrl-f - focus the Find box,\nEnter - search,\nEsc - clear the Find box,\nShift-Esc - defocus the Find box. +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 !FILEBROWSER_SHOWCOLORLABEL2HINT;Show images labeled Yellow.\nShortcut: Alt-2 !FILEBROWSER_SHOWCOLORLABEL3HINT;Show images labeled Green.\nShortcut: Alt-3 @@ -895,6 +877,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -1140,7 +1123,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -1192,12 +1175,12 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1210,8 +1193,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -1223,13 +1206,64 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 !MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronize the File Browser or Filmstrip with the Editor to reveal the thumbnail of the currently opened image, and clear any active filters.\nShortcut: x\n\nAs above, but without clearing active filters:\nShortcut: y\n(Note that the thumbnail of the opened image will not be shown if filtered out). !MAIN_MSG_IMAGEUNPROCESSED;This command requires all selected images to be queue-processed first. !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d @@ -1264,6 +1298,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PARTIALPASTE_PREPROCESS_DEADPIXFILT;Dead pixel filter !PARTIALPASTE_PREPROCESS_HOTPIXFILT;Hot pixel filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -1271,7 +1306,9 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_WAVELETGROUP;Wavelet Levels !PREFERENCES_AUTLISLOW;Low @@ -1290,7 +1327,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1302,6 +1340,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DARKFRAME;Dark-Frame !PREFERENCES_DARKFRAMEFOUND;Found !PREFERENCES_DARKFRAMESHOTS;shots @@ -1311,7 +1350,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_EDITORLAYOUT;Editor Layout !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELDSDIR;Flat-fields directory !PREFERENCES_FLATFIELDSHOTS;shots @@ -1325,7 +1364,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1340,6 +1380,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1354,9 +1395,10 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1372,12 +1414,17 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files @@ -1388,14 +1435,15 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. !PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done !PREFERENCES_SND_TRESHOLDSECS;After seconds !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1413,6 +1461,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PROFILEPANEL_LOADPPASTE;Parameters to load !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_PASTEPPASTE;Parameters to paste +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save !PROGRESSBAR_PROCESSING_PROFILESAVED;Processing profile saved @@ -1460,11 +1509,11 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1484,8 +1533,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1496,6 +1545,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1504,9 +1554,11 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORAPP_LABEL_SCENE;Scene Conditions !TP_COLORAPP_LABEL_VIEWING;Viewing Conditions !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1519,10 +1571,14 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORAPP_TCMODE_LABEL1;Curve mode 1 !TP_COLORAPP_TCMODE_LABEL2;Curve mode 2 !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1634,6 +1690,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_DIRPYREQUALIZER_SKIN;Skin targetting/protection !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma !TP_EPD_REWEIGHTINGITERATES;Reweighting iterates @@ -1656,27 +1713,27 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_GRADIENT_STRENGTH_TOOLTIP;Filter strength in stops. !TP_HLREC_ENA_TOOLTIP;Could be activated by Auto Levels. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. !TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_LABCURVE_CHROMA_TOOLTIP;To apply B&W toning, set Chromaticity to -100. !TP_LABCURVE_CURVEEDITOR_A_RANGE1;Green Saturated !TP_LABCURVE_CURVEEDITOR_A_RANGE2;Green Pastel @@ -1733,21 +1790,82 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD;Method !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD !TP_RAW_FALSECOLOR;False color suppression steps +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL !TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* @@ -2036,5 +2154,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_WBALANCE_LED_LSI;LSI Lumelex 2040 !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) +!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_TUNGSTEN;Tungsten !ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: Alt-f diff --git a/rtdata/languages/Chinese (Traditional) b/rtdata/languages/Chinese (Traditional) index a8101c373..61a805d6c 100644 --- a/rtdata/languages/Chinese (Traditional) +++ b/rtdata/languages/Chinese (Traditional) @@ -89,7 +89,6 @@ HISTOGRAM_TOOLTIP_L;顯示/隱藏e CIELAB 亮度直方圖 HISTOGRAM_TOOLTIP_R;顯示/隱藏 紅色直方圖 HISTORY_CHANGED;Changed HISTORY_CUSTOMCURVE;自定義曲線 -HISTORY_DELSNAPSHOT;移除快照 HISTORY_FROMCLIPBOARD;From clipboard HISTORY_LABEL;歷史 HISTORY_MSG_1;圖片載入完 @@ -176,47 +175,23 @@ HISTORY_MSG_81;Resize enabled HISTORY_NEWSNAPSHOT;新建快照 HISTORY_SNAPSHOT;快照 HISTORY_SNAPSHOTS;系列快照 -IPTCPANEL_AUTHOR;Author -IPTCPANEL_AUTHORSPOSITION;Author's position -IPTCPANEL_AUTHORSPOSITIONHINT;Title of the creator or creators of the object (By-line Title). -IPTCPANEL_CAPTION;Caption -IPTCPANEL_CAPTIONHINT;A textual description of the data (Caption - Abstract) -IPTCPANEL_CAPTIONWRITER;Caption Writer -IPTCPANEL_CAPTIONWRITERHINT;The name of the person involved in the writing, editing or correcting the image or caption/abstract (Writer - Editor IPTCPANEL_CATEGORY;Category -IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider (Category). IPTCPANEL_CITY;City -IPTCPANEL_CITYHINT;City of image origin (City). IPTCPANEL_COPYHINT;Copy IPTC settings to clipboard -IPTCPANEL_COPYRIGHT;Copyright -IPTCPANEL_COPYRIGHTHINT;Any necessary copyright notice (Copyright Notice). IPTCPANEL_COUNTRY;Country -IPTCPANEL_COUNTRYHINT;The name of the country/primary location where the image was created (Country - Primary Location Name). IPTCPANEL_CREDIT;Credit IPTCPANEL_CREDITHINT;Identifies the provider of the image, not necessarily the owner/creator (Credit). IPTCPANEL_DATECREATED;Date Created -IPTCPANEL_DATECREATEDHINT;The date the intellectual content of the image was created; Format: JJJJMMTT (Date Created). IPTCPANEL_EMBEDDED;Embedded IPTCPANEL_EMBEDDEDHINT;Reset to IPTC data embedded in the image file IPTCPANEL_HEADLINE;Headline -IPTCPANEL_HEADLINEHINT;A publishable entry providing a synopsis of the contents of the image (Headline). IPTCPANEL_INSTRUCTIONS;Instructions -IPTCPANEL_INSTRUCTIONSHINT;Other editorial instructions concerning the use of the image (Special Instructions). IPTCPANEL_KEYWORDS;Keywords -IPTCPANEL_KEYWORDSHINT;Used to indicate specific information retrieval words (keywords). IPTCPANEL_PASTEHINT;Paste IPTC settings from clipboard -IPTCPANEL_PROVINCE;Province -IPTCPANEL_PROVINCEHINT;The Province/State where the image originates (Province-State). IPTCPANEL_RESET;Reset IPTCPANEL_RESETHINT;Reset to profile default IPTCPANEL_SOURCE;Source -IPTCPANEL_SOURCEHINT;The original owner of the intellectual content of the image (Source). -IPTCPANEL_SUPPCATEGORIES;Suppl. Categories -IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image (Supplemental Categories). IPTCPANEL_TITLE;Title -IPTCPANEL_TITLEHINT;A shorthand reference for the image (Object Name). -IPTCPANEL_TRANSREFERENCE;Trans. Reference -IPTCPANEL_TRANSREFERENCEHINT;A code representing the location of original transmission (Original Transmission Reference). MAIN_BUTTON_PREFERENCES;參數設置 MAIN_BUTTON_PUTTOQUEUE;Put to queue MAIN_BUTTON_SAVE;儲存圖片 @@ -278,8 +253,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;高光提示 PREFERENCES_DATEFORMAT;日期格式 PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y : year\n%m : month\n%d : day\n\nFor example, the hungarian date format is:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;預設語言 -PREFERENCES_DEFAULTTHEME;Default theme PREFERENCES_DIRHOME;用戶檔路徑 PREFERENCES_DIRLAST;上次訪問路徑 PREFERENCES_DIROTHER;其他 @@ -405,7 +378,6 @@ TP_ICM_INPUTPROFILE;輸入配置 TP_ICM_LABEL;ICM TP_ICM_NOICM;No ICM: sRGB配置 TP_ICM_OUTPUTPROFILE;輸出配置 -TP_ICM_SAVEREFERENCE;Save reference image for profiling TP_ICM_WORKINGPROFILE;當前配置 TP_RESIZE_H;高: TP_RESIZE_HEIGHT;Height @@ -483,12 +455,23 @@ TP_WBALANCE_TEMPERATURE;色溫 !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. !EXIFFILTER_EXPOSURECOMPENSATION;Exposure compensation (EV) !EXIFFILTER_FILETYPE;File type !EXIFFILTER_METADATAFILTER;Enable metadata filters +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -511,8 +494,12 @@ TP_WBALANCE_TEMPERATURE;色溫 !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -528,7 +515,6 @@ TP_WBALANCE_TEMPERATURE;色溫 !FILEBROWSER_CURRENT_NAME;Current name: !FILEBROWSER_DARKFRAME;Dark-frame !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -563,6 +549,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -594,6 +581,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !GENERAL_NONE;None !GENERAL_OPEN;Open !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -875,7 +863,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -927,12 +915,12 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -945,8 +933,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -958,8 +946,58 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -978,6 +1016,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d @@ -1051,8 +1090,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -1061,7 +1099,9 @@ TP_WBALANCE_TEMPERATURE;色溫 !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves !PARTIALPASTE_SHARPENEDGE;Edges @@ -1090,7 +1130,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1102,7 +1143,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1115,7 +1157,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_EDITORLAYOUT;Editor Layout !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field !PREFERENCES_FLATFIELDFOUND;Found @@ -1131,7 +1173,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1146,6 +1189,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1161,9 +1205,10 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1179,13 +1224,18 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROPERTY;Property +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files @@ -1196,15 +1246,16 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. !PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done !PREFERENCES_SND_TRESHOLDSECS;After seconds !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1213,7 +1264,6 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -!PREFERENCES_USESYSTEMTHEME;Use system theme !PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) !PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' !PREFERENCES_WLONE;One level @@ -1226,6 +1276,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save !PROGRESSBAR_LOADINGTHUMBS;Loading thumbnails... @@ -1318,11 +1369,11 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1342,8 +1393,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1354,6 +1405,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1365,9 +1417,11 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1386,10 +1440,14 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1515,8 +1573,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_THRESHOLD;Threshold !TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma !TP_EPD_LABEL;Tone Mapping @@ -1580,18 +1637,17 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1600,11 +1656,12 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_ICM_INPUTNONE;No profile !TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift @@ -1691,21 +1748,82 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD;Method !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD !TP_RAW_FALSECOLOR;False color suppression steps +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2025,6 +2143,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_WBALANCE_SOLUX41;Solux 4100K !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) +!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_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 015dc1a7d..31b2255bb 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -35,6 +35,9 @@ #34 2015-07-09 updated by mkyral #35 2015-11-24 updated by mkyral #36 2016-10-18 updated by mkyral +#37 2017-01-10 updated by mkyral +#38 2017-04-26 updated by mkyral +#39 2017-07-21 updated by mkyral ABOUT_TAB_BUILD;Verze ABOUT_TAB_CREDITS;Zásluhy @@ -70,6 +73,15 @@ CURVEEDITOR_TOOLTIPPASTE;Vložit křivku ze schránky. CURVEEDITOR_TOOLTIPSAVE;Uložit současnou křivku. CURVEEDITOR_TYPE;Typ DIRBROWSER_FOLDERS;Složky +DYNPROFILEEDITOR_DELETE;Smazat +DYNPROFILEEDITOR_EDIT;Upravit +DYNPROFILEEDITOR_EDIT_RULE;Upravit pravidlo dynamického profilu +DYNPROFILEEDITOR_ENTRY_TOOLTIP;Porovnávání rozlišuje velikost písmen.\nPro vložení regulárního výrazu přidejte\nprefix "re:". +DYNPROFILEEDITOR_MOVE_DOWN;Posunout dolů +DYNPROFILEEDITOR_MOVE_UP;Posunout nahoru +DYNPROFILEEDITOR_NEW;Nový +DYNPROFILEEDITOR_NEW_RULE;Nové pravidlo dynamického profilu +DYNPROFILEEDITOR_PROFILE;Profil zpracování EDITWINDOW_TITLE;Editace obrázku EDIT_OBJECT_TOOLTIP;V náhledovém okně zobrazí widget umožňující přizpůsobení nástroje. EDIT_PIPETTE_TOOLTIP;Pro přidání bodu na křivku, podržte klávesu Ctrl a klikněte levým tlačítkem na vybraný bod v náhledu obrázku.\nPro úpravu bodu podržte klávesu Ctrl a klikněte levým tlačítkem na odpovídající oblast v náhledu, následně uvolněte klávesu Ctrl (pokud si přejete jemné změny) a za stálého držení levého tlačítka myši pohybujte myší nahoru a dolů což bude posouvat bod na křivce nahoru a dolů. @@ -96,6 +108,7 @@ EXIFPANEL_RESETALL;Obnovit vše EXIFPANEL_RESETALLHINT;Obnoví původní hodnoty u všech štítků. EXIFPANEL_RESETHINT;Obnoví původní hodnoty u vybraných štítků. EXIFPANEL_SUBDIRECTORY;Podadresář +EXPORT_BYPASS;Kroky zpracování pro přeskočení EXPORT_BYPASS_ALL;Vybrat / Zrušit výběr všeho EXPORT_BYPASS_DEFRINGE;Vynechat odstranění lemu EXPORT_BYPASS_DIRPYRDENOISE;Vynechat redukci šumu @@ -118,8 +131,12 @@ EXPORT_FASTEXPORTOPTIONS;Volby rychlého exportu EXPORT_INSTRUCTIONS;Volba rychlého exportu umožňuje potlačit vybrané nastavení procesu vyvolání a zkrátit tak čas a zdroje potřebné pro zpracování fronty tím, že se pro vyvolání použije nastavení rychlého exportu. Tato metoda je doporučována pro rychlejší vyvolání obrázků v nižším rozlišení v případě, že je důležitá rychlost, nebo pokud je požadováno vyvolání jednoho nebo více obrázků v nižším rozlišení bez změny uložených parametrů vyvolání. EXPORT_MAXHEIGHT;Maximální výška: EXPORT_MAXWIDTH;Maximální šířka: +EXPORT_PIPELINE;Fronta zpracování EXPORT_PUTTOQUEUEFAST; Vložit do fronty pro rychlý export EXPORT_RAW_DMETHOD;Metoda demozajkování +EXPORT_USE_FAST_PIPELINE;Vyhrazený (kompletní zpracování zmenšeného obrázku) +EXPORT_USE_FAST_PIPELINE_TIP;Použije vyhrazenou frontu zpracování v režimu rychlého exportu a vymění tak kvalitu za rychlost. Zmenšení obrázku se provede co nejdříve po zahájení zpracování, na rozdíl od standardního zpracování, kde se provádí až na závěr. Zrychlení může být velmi významné, ale připravte se na artefakty a celkové zhoršení kvality výstupu. +EXPORT_USE_NORMAL_PIPELINE;Standardní (přeskočí některé kroky, zmenší až na konci) EXTPROGTARGET_1;raw EXTPROGTARGET_2;Zpracování fronty FILEBROWSER_ADDDELTEMPLATE;Přidat/Smazat šablony... @@ -129,7 +146,7 @@ FILEBROWSER_AUTODARKFRAME;Automatický tmavý snímek FILEBROWSER_AUTOFLATFIELD;Auto Flat Field FILEBROWSER_BROWSEPATHBUTTONHINT;Klikněte pro výběr cesty. FILEBROWSER_BROWSEPATHHINT;Vložte cestu pro procházení.\n\nKlávesové zkratky:\nCtrl-o pro přepnutí do adresního řádku.\nEnter/ Ctrl-Enter pro procházení ;\nEsc pro zrušení změn.\nShift-Esc pro zrušení přepnutí.\n\nZkratky pro cesty:\n~\t- domácí složka uživatele.\n!\t- složka s obrázky uživatele. -FILEBROWSER_CACHE;Metipaměť +FILEBROWSER_CACHE;Mezipaměť FILEBROWSER_CACHECLEARFROMFULL;Vymazat z mezipaměti - úplně FILEBROWSER_CACHECLEARFROMPARTIAL;Vymazat z mezipaměti - částečně FILEBROWSER_CLEARPROFILE;Smazat @@ -142,7 +159,6 @@ FILEBROWSER_DELETEDLGMSG;Jste si jisti, že chcete vymazat %1 vybraných FILEBROWSER_DELETEDLGMSGINCLPROC;Jste si jisti, že chcete vymazat %1 vybraných souborů včetně výstupů dávkového zpracování? FILEBROWSER_EMPTYTRASH;Vysypat koš FILEBROWSER_EMPTYTRASHHINT;Trvale smazat soubory z koše, -FILEBROWSER_EXEC_CPB;Vlastní generátor profilu FILEBROWSER_EXTPROGMENU;Otevřít pomocí FILEBROWSER_FLATFIELD;Flat Field FILEBROWSER_MOVETODARKFDIR;Přesunout do složky tmavých snímků @@ -192,6 +208,7 @@ FILEBROWSER_RANK3_TOOLTIP;Hodnocení 3 *\nZkratka: Shift-3 FILEBROWSER_RANK4_TOOLTIP;Hodnocení 4 *\nZkratka: Shift-4 FILEBROWSER_RANK5_TOOLTIP;Hodnocení 5 *\nZkratka: Shift-5 FILEBROWSER_RENAMEDLGLABEL;Přejmenování souboru +FILEBROWSER_RESETDEFAULTPROFILE;Vrátit se k původnímu FILEBROWSER_SELECTDARKFRAME;Výběr tmavého snímku... FILEBROWSER_SELECTFLATFIELD;Výběr Flat Field... FILEBROWSER_SHOWCOLORLABEL1HINT;Ukázat obrázky s červeným štítkem.\nZkratka: Alt-1 @@ -204,7 +221,7 @@ FILEBROWSER_SHOWEDITEDHINT;Ukázat upravené obrázky.\nZkratka: 7 FILEBROWSER_SHOWEDITEDNOTHINT;Ukázat neupravené obrázky.\nZkratka: 6 FILEBROWSER_SHOWEXIFINFO;Zobrazit Exif informace.\n\nZkratky:\ni - režim více karet editoru,\nAlt-i - režim jedné karty editoru. FILEBROWSER_SHOWNOTTRASHHINT;Zobrazit pouze nesmazané obrázky. -FILEBROWSER_SHOWORIGINALHINT;Zobrazí pouze originální obrázky.\n\nPokud existuje několik obrázků se stejným názvem, ale rozdílnými příponami, bude jako originál vybrán ten, jehož přípona je nejvýše v seznamu příponve Volby > Prohlížeč souborů > Analyzované přípony. +FILEBROWSER_SHOWORIGINALHINT;Zobrazí pouze originální obrázky.\n\nPokud existuje několik obrázků se stejným názvem, ale rozdílnými příponami, bude jako originál vybrán ten, jehož přípona je nejvýše v seznamu přípon veVolby > Prohlížeč souborů > Analyzované přípony. FILEBROWSER_SHOWRANK1HINT;Ukázat obrázky hodnocené jednou hvězdičkou.\nZkratka: 1 FILEBROWSER_SHOWRANK2HINT;Ukázat obrázky hodnocené dvěma hvězdičkami.\nZkratka: 2 FILEBROWSER_SHOWRANK3HINT;Ukázat obrázky hodnocené třemi hvězdičkami.\nZkratka: 3 @@ -264,7 +281,6 @@ HISTOGRAM_TOOLTIP_R;Skrýt/Zobrazit histogram červené. HISTOGRAM_TOOLTIP_RAW;Skrýt/Zobrazit raw histogram. HISTORY_CHANGED;Změněno HISTORY_CUSTOMCURVE;Vlastní křivka -HISTORY_DELSNAPSHOT;Odstranit HISTORY_FROMCLIPBOARD;Ze schránky HISTORY_LABEL;Historie HISTORY_MSG_1;Fotka načtena @@ -625,7 +641,7 @@ HISTORY_MSG_356;Vlnka - DH - Maximální práh HISTORY_MSG_357;Vlnka - Odšumění - Propojení s DH HISTORY_MSG_358;Vlnka - Paleta - Kontrast úrovní barevnost HISTORY_MSG_359;Vypálené/Mrtvé - Práh -HISTORY_MSG_360;MT - Gama +HISTORY_MSG_360;TM - Gama HISTORY_MSG_361;Vlnka - Dokončení - Vyvážení barev HISTORY_MSG_362;Vlnka - Zůstatek - Kompresní metoda HISTORY_MSG_363;Vlnka - Zůstatek - Síla komprese @@ -695,7 +711,7 @@ HISTORY_MSG_426;Retinex - Korekce odstínu HISTORY_MSG_427;Výstupní záměr reprodukce HISTORY_MSG_428;Záměr reprodukce monitoru HISTORY_MSG_429;Retinex - Průchody -HISTORY_MSG_430;Retinex - Přenos gradientu +HISTORY_MSG_430;Retinex - Gradient přenosu HISTORY_MSG_431;Retinex - Síla gradientu HISTORY_MSG_432;Retinex - M - Světla HISTORY_MSG_433;Retinex - M - Světla tóny @@ -708,52 +724,69 @@ HISTORY_MSG_439;Retinex - Zpracování HISTORY_MSG_440;Metoda KdDÚ HISTORY_MSG_441;Retinex - Přenos zisku HISTORY_MSG_442;Retinex - Měřítko -HISTORY_MSG_443;Kompenzace výstupního černého bodu +HISTORY_MSG_443;Výstupní kompenzace černého bodu +HISTORY_MSG_444;VB - Zdůraznění teploty +HISTORY_MSG_445;Raw dílčí snímek +HISTORY_MSG_449;PS - přizpůsobení ISO +HISTORY_MSG_452;PS - Ukázat pohyb +HISTORY_MSG_453;PS - Zobrazit jen masku +HISTORY_MSG_457;PS - Kontrola červená/modrá +HISTORY_MSG_462;PS - Kontrola zelená +HISTORY_MSG_464;PS - Maska pohybové neostrosti +HISTORY_MSG_465;PS - Poloměr rozostření +HISTORY_MSG_468;PS - Vyplnit díry +HISTORY_MSG_469;PS - Medián +HISTORY_MSG_471;PS - korekce pohybu +HISTORY_MSG_472;PS - plynulé přechody +HISTORY_MSG_473;PS - Použít LMMSE +HISTORY_MSG_474;PS - korekce +HISTORY_MSG_475;PS - korekce kanálu HISTORY_NEWSNAPSHOT;Přidat HISTORY_NEWSNAPSHOT_TOOLTIP;Zkratka: Alt-s HISTORY_SNAPSHOT;Snímek HISTORY_SNAPSHOTS;Snímky -IPTCPANEL_AUTHOR;Autor -IPTCPANEL_AUTHORSPOSITION;Autorova pozice -IPTCPANEL_AUTHORSPOSITIONHINT;Titul/pozice autora nebo autorů obrázku (By-line Title). -IPTCPANEL_CAPTION;Popis -IPTCPANEL_CAPTIONHINT;Textový popis dat (Popis - Shrnutí) -IPTCPANEL_CAPTIONWRITER;Popisovač -IPTCPANEL_CAPTIONWRITERHINT;Jméno osoby, která vložila, změnila nebo opravila obrázek nebo popis/shrnutí (Autor - Editor) IPTCPANEL_CATEGORY;Kategorie -IPTCPANEL_CATEGORYHINT;Obsah obrázku dle názoru dodavatele (Kategorie). +IPTCPANEL_CATEGORYHINT;Identifikuje předmět obrázku dle názoru dodavatele. IPTCPANEL_CITY;Město -IPTCPANEL_CITYHINT;Místo vzniku obrázku (Město). +IPTCPANEL_CITYHINT;Vložte jméno města, které je na na fotografii. IPTCPANEL_COPYHINT;Zkopíruj IPTC nastavení do schránky. -IPTCPANEL_COPYRIGHT;Copyright -IPTCPANEL_COPYRIGHTHINT;Autorská práva (Copyright Notice). +IPTCPANEL_COPYRIGHT;Autorská práva +IPTCPANEL_COPYRIGHTHINT;Zadejte text upozorňující na autorská práva k obrázku, například: ©2008 Jane Doe. IPTCPANEL_COUNTRY;Země -IPTCPANEL_COUNTRYHINT;Jméno země/lokace kde byl obrázek vytvořen (Země - Lokace). +IPTCPANEL_COUNTRYHINT;Vložte jméno země, která je na na fotografii. +IPTCPANEL_CREATOR;Vytvořil +IPTCPANEL_CREATORHINT;Vložte jméno osoby, která tuto fotografii pořídila. +IPTCPANEL_CREATORJOBTITLE;Pracovní pozice autora +IPTCPANEL_CREATORJOBTITLEHINT;Vložte pracovní pozici osoby, která je zapsána v poli Vytvořil. IPTCPANEL_CREDIT;Zásluhy -IPTCPANEL_CREDITHINT;Dodavatel obrázku, ne nutně vlastník/autor (Credit). +IPTCPANEL_CREDITHINT;Komu mají být připsány zásluhy při publikaci. IPTCPANEL_DATECREATED;Datum vytvoření -IPTCPANEL_DATECREATEDHINT;Datum kdy byl duševní obsah obrázku vytvořen; Formát: RRRRMMDD (Datum vytvoření). +IPTCPANEL_DATECREATEDHINT;Vložte datum, kdy byla fotografie pořízena. +IPTCPANEL_DESCRIPTION;Popis +IPTCPANEL_DESCRIPTIONHINT;Vložte "titulek" popisující kdo, co a proč je na snímku. Toto může zahrnovat jména lidí a/nebo jejich roli v ději, který je na snímku. +IPTCPANEL_DESCRIPTIONWRITER;Popsal +IPTCPANEL_DESCRIPTIONWRITERHINT;Vložte jméno osoby, která vložila, změnila nebo opravila popis obrázku. IPTCPANEL_EMBEDDED;Uložené IPTCPANEL_EMBEDDEDHINT;Obnov IPTC data z obrázku. IPTCPANEL_HEADLINE;Nadpis -IPTCPANEL_HEADLINEHINT;Zveřejnitelný krátký popis obrázku (Nadpis). +IPTCPANEL_HEADLINEHINT;Vložte krátký publikovatelný popis nebo shrnutí obsahu obrázku. IPTCPANEL_INSTRUCTIONS;Instrukce -IPTCPANEL_INSTRUCTIONSHINT;Další instrukce vztahující se k obrázku (Speciální instrukce). +IPTCPANEL_INSTRUCTIONSHINT;Vložte informace o zákazech nebo jiných omezeních, které nejsou pokryty polem Autorská práva. IPTCPANEL_KEYWORDS;Klíčová slova -IPTCPANEL_KEYWORDSHINT;Jednoslovná hesla popisující obrázek (Klíčová slova). +IPTCPANEL_KEYWORDSHINT;Vložte klíčová slova, termíny nebo fráze vyjadřující předmět na obrázku. IPTCPANEL_PASTEHINT;Vložit IPTC nastavení ze schránky. -IPTCPANEL_PROVINCE;Kraj -IPTCPANEL_PROVINCEHINT;Kraj/stát kde byl obrázek vytvořen (Kraj-Stát). +IPTCPANEL_PROVINCE;Kraj nebo stát +IPTCPANEL_PROVINCEHINT;Vložte jméno kraje nebo státu, která je na na fotografii. IPTCPANEL_RESET;Obnovit IPTCPANEL_RESETHINT;Obnovit výchozí profil. IPTCPANEL_SOURCE;Zdroj -IPTCPANEL_SOURCEHINT;Původní vlastník intelektuálního obsahu obrázku (Zdroj). -IPTCPANEL_SUPPCATEGORIES;Dodat. kategorie -IPTCPANEL_SUPPCATEGORIESHINT;Upřesňující popis obsahu obrázku (Dodatečné kategorie). +IPTCPANEL_SOURCEHINT;Vložte nebo změňte jméno osoby nebo společnosti která je součástí dodavatelského řetězce, například osoba nebo entita od které jste tento obrázek získali. +IPTCPANEL_SUPPCATEGORIES;Doplňující kategorie +IPTCPANEL_SUPPCATEGORIESHINT;Upřesňující popis objektu na obrázku. IPTCPANEL_TITLE;Titulek -IPTCPANEL_TITLEHINT;Zkrácený popis obrázku (Jméno obrázku). -IPTCPANEL_TRANSREFERENCE;Trans. reference -IPTCPANEL_TRANSREFERENCEHINT;Kód místa, odkud byl převzat originální obrázek (Original Transmission Reference). +IPTCPANEL_TITLEHINT;Vložte krátké, popisné a lidsky čitelné jméno obrázku. Například název souboru. +IPTCPANEL_TRANSREFERENCE;Číslo úlohy +IPTCPANEL_TRANSREFERENCEHINT;Zadejte číslo nebo identifikátor potřebný v pracovním postupu nebo pro sledování. MAIN_BUTTON_FULLSCREEN;Celá obrazovka MAIN_BUTTON_NAVNEXT_TOOLTIP;Přejít k dalšímu obrázku relativnímu k obrázku otevřenému v editoru.\nZkratka: Shift-F4\n\nPřejít k dalšímu obrázku relativnímu k vybranému náhledu v prohlížeči souborů nebo na filmovém pásu:\nZkratka: F4 MAIN_BUTTON_NAVPREV_TOOLTIP;Přejít k předchozímu obrázku relativnímu k obrázku otevřenému v editoru.\nZkratka: Shift-F3\n\nPřejít k předchozímu obrázku relativnímu k vybranému náhledu v prohlížeči souborů nebo na filmovém pásu:\nZkratka: F3 @@ -764,7 +797,7 @@ MAIN_BUTTON_SAVE_TOOLTIP;Uložit současný obrázek.\nZkratka: Ctrl+s MAIN_BUTTON_SENDTOEDITOR;Upravit obrázek v externím editoru MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Editovat současný obrázek v externím editoru.\nZkratka: Ctrl+e MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP;Zobrazit/skrýt všechny postranní panely.\nZkratka: m -MAIN_BUTTON_UNFULLSCREEN;Ukončit mód celé obrazovky +MAIN_BUTTON_UNFULLSCREEN;Ukončit režim celé obrazovky MAIN_FRAME_BATCHQUEUE;Fronta MAIN_FRAME_BATCHQUEUE_TOOLTIP;Fronta zpracování.\nZkratka: Ctrl-F3 MAIN_FRAME_EDITOR;Editor @@ -787,18 +820,19 @@ MAIN_MSG_OPERATIONCANCELLED;Operace zrušena MAIN_MSG_PATHDOESNTEXIST;Cesta\n\n%1\n\nneexistuje. Nastavte prosím správnou cestu v okně "Volby". MAIN_MSG_QOVERWRITE;Chcete jej přepsat? MAIN_MSG_SETPATHFIRST;K použití této funkce musíte nejprve zadat cílovou cestu\nv okně "Volby"! +MAIN_MSG_TOOMANYOPENEDITORS;Příliš mnoho otevřených editorů.\nPro pokračování nejprve některý ukončete. MAIN_MSG_WRITEFAILED;Chyba zápisu\n"%1"\n\nUjistěte se, že složka existuje a máte práva do ní zapisovat. MAIN_TAB_COLOR;Barvy MAIN_TAB_COLOR_TOOLTIP;Zkratka: Alt-c MAIN_TAB_DETAIL;Detaily MAIN_TAB_DETAIL_TOOLTIP;Zkratka: Alt-d -MAIN_TAB_DEVELOP; Vyvolání +MAIN_TAB_DEVELOP; Dávková editace MAIN_TAB_EXIF;Exif -MAIN_TAB_EXPORT; Rychlý export +MAIN_TAB_EXPORT; Rychlý export MAIN_TAB_EXPOSURE;Expozice MAIN_TAB_EXPOSURE_TOOLTIP;Zkratka: Alt-e -MAIN_TAB_FILTER; Filtr -MAIN_TAB_INSPECT; Prohlížení +MAIN_TAB_FILTER; Filtr +MAIN_TAB_INSPECT; Prohlížení MAIN_TAB_IPTC;IPTC MAIN_TAB_METADATA;Metadata MAIN_TAB_METADATA_TOOLTIP;Zkratka: Alt-m @@ -888,8 +922,7 @@ PARTIALPASTE_PREPROCESS_HOTPIXFILT;Filtr vypálených pixelů PARTIALPASTE_PREPROCESS_LINEDENOISE;Filtrovat linkové rušení PARTIALPASTE_PRSHARPENING;Doostření po změně velikosti PARTIALPASTE_RAWCACORR_AUTO;Automatická korekce CA -PARTIALPASTE_RAWCACORR_CABLUE;CA modrá -PARTIALPASTE_RAWCACORR_CARED;CA červená +PARTIALPASTE_RAWCACORR_CAREDBLUE;CA červená a modrá PARTIALPASTE_RAWEXPOS_BLACK;Úrovně černé PARTIALPASTE_RAWEXPOS_LINEAR;Korekce bílého bodu PARTIALPASTE_RAWEXPOS_PRESER;Zachování světel @@ -898,7 +931,9 @@ PARTIALPASTE_RAW_DCBENHANCE;Vylepšení DCB PARTIALPASTE_RAW_DCBITERATIONS;Průchody DCB PARTIALPASTE_RAW_DMETHOD;Metoda demozajkování PARTIALPASTE_RAW_FALSECOLOR;Potlačení chybných barev +PARTIALPASTE_RAW_IMAGENUM;Dílčí snímek PARTIALPASTE_RAW_LMMSEITERATIONS;Kroky rozšíření LMMSE +PARTIALPASTE_RAW_PIXELSHIFT;PixelShift PARTIALPASTE_RESIZE;Změna velikosti PARTIALPASTE_RETINEX;Retinex PARTIALPASTE_RGBCURVES;RGB křivky @@ -941,6 +976,7 @@ PREFERENCES_CLIPPINGIND;Indikace oříznutí PREFERENCES_CLUTSCACHE;Mezipaměť HaldCLUT PREFERENCES_CLUTSCACHE_LABEL;Maximální počet přednačtených CLUTů PREFERENCES_CLUTSDIR;Složka HaldCLUT +PREFERENCES_CMMBPC;Kompenzace černého bodu PREFERENCES_CURVEBBOXPOS;Pozice tlačítek pro kopírování a vložení křivky PREFERENCES_CURVEBBOXPOS_ABOVE;Nad PREFERENCES_CURVEBBOXPOS_BELOW;Pod @@ -965,8 +1001,6 @@ PREFERENCES_DATEFORMAT;Formát data PREFERENCES_DATEFORMATHINT;Lze použít následující formátovací řetězce:\n%y\t- rok (year)\n%m\t- měsíc (month)\n%d\t- den (day)\n\nNapříklad český formát data:\n%d. %m. %y PREFERENCES_DAUB_LABEL;Použít D6 Daubechiesové vlnky namísto D4 PREFERENCES_DAUB_TOOLTIP;Nástroje Redukce šumu a Úrovně vlnky používají Daubechiesové mateřskou vlnku. Pokud místo D4 vyberete D6 zvýší se počet ortogonálních Daubechiesové koeficientů a pravděpodobně zvýší kvalitu úrovní malého měřítka. Není zde rozdíl ve spotřebě paměti nebo délce zpracování. -PREFERENCES_DEFAULTLANG;Výchozí jazyk -PREFERENCES_DEFAULTTHEME;Výchozí vzhled PREFERENCES_DIRDARKFRAMES;Složka tmavých snímků PREFERENCES_DIRHOME;Domovská složka PREFERENCES_DIRLAST;Poslední navštívená složka @@ -978,7 +1012,7 @@ PREFERENCES_EDITORLAYOUT;Rozvržení editoru PREFERENCES_EXPAUT;Expert PREFERENCES_EXTERNALEDITOR;Externí editor PREFERENCES_FBROWSEROPTS;Volby prohlížeče souborů / náhledů -PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Jednořádková lišta nástrojů v prohlížeči souborů (vypněte na nízkých rozlišeních) +PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Jednořádková lišta nástrojů v prohlížeči souborů\n(vypněte na nízkých rozlišeních) PREFERENCES_FILEFORMAT;Formát souboru PREFERENCES_FILMSIMULATION;Simulace filmu PREFERENCES_FLATFIELD;Flat Field @@ -991,7 +1025,7 @@ PREFERENCES_FLUOF7;Fluorescenční F7 PREFERENCES_FLUOF11;Fluorescenční F11 PREFERENCES_FORIMAGE;Pro ostatní fotografie PREFERENCES_FORRAW;Pro raw fotografie -PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Stejná velikost náhledu v panelu Editoru a v Prohlížeči souborů +PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Stejná velikost náhledu ve filmovém pásu a v Prohlížeči souborů PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Rozdílné velikosti náhledů znamenají delší dobu zpracování při přepínání mezi obrázkem v záložce Editoru a Prohlížečem souborů. PREFERENCES_GIMPPATH;GIMP instalační složka PREFERENCES_GREY;Yb svítivost výstupního zařízení (%) @@ -1035,9 +1069,10 @@ PREFERENCES_MENUGROUPRANK;Skupina "Hodnocení" PREFERENCES_MENUOPTIONS;Volby místní nabídky PREFERENCES_METADATA;Metadata PREFERENCES_MIN;Velmi malá (100x115) -PREFERENCES_MONBPC;Kompenzace černého bodu pro L*a*b*->Přizpůsobení pro monitor -PREFERENCES_MONINTENT;Výchozí záměr monitoru -PREFERENCES_MONPROFILE;Výchozí profil monitoru +PREFERENCES_MONINTENT;Výchozí reprodukční záměr +PREFERENCES_MONITOR;Monitor +PREFERENCES_MONPROFILE;Výchozí barevný profil +PREFERENCES_MONPROFILE_WARNOSX;Na MacOS je podporováno pouze sRGB. PREFERENCES_MULTITAB;Mód více karet editoru PREFERENCES_MULTITABDUALMON;Mód více karet editoru ve vlastním okně PREFERENCES_NAVGUIDEBRUSH;Barva vodítek navigátoru @@ -1047,7 +1082,7 @@ PREFERENCES_OUTDIR;Výstupní složka PREFERENCES_OUTDIRFOLDER;Ulož do souboru PREFERENCES_OUTDIRFOLDERHINT;Uložit obrázky do vybrané složky. PREFERENCES_OUTDIRTEMPLATE;Použít šablonu -PREFERENCES_OUTDIRTEMPLATEHINT;Lze použít následující formátovací řetězce:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nTyto formátovací řetězce reprezentují různé části cesty k uložené fotografii, některé vlastnosti fotografie nebo pořadí v dávce.\n\nNapříklad pokud má zpracovávaná fotografie následující cestu:\n/home/tomas/fotky/2010-10-31/dsc0042.nef,\nmají jednotlivé formátovací řetězce tento význam:\n%d4 = home\n%d3 = tomas\n%d2 = fotky\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tomas/fotky/2010-10-31/\n%p2 = /home/tomas/fotky/\n%p3 = /home/tomas/\n%p4 = /home/\n\n%r bude nahrazeno hodnocením fotografie. Pokud není fotografie ohodnocena, bude %r nahrazeno '0'. Pokud je fotografie v koši, bude %r nahrazeno 'x'.\n\n%s1, %s2, atd. bude nahrazeno pořadím v dávce doplněném na 1 až 9 číslic. Každé spuštění zpracování fronty jej vždy nastaví na jedna a po každé zpracované fotografii se o jedna zvýší .\n\nPokud si přejete uložit výstupní obrázek vedle originálu, napište:\n%p1/%f\n\nPokud si jej ale přejete uložit do adresáře "zpracovano" ve stejném adresáři jako otevřený obrázek, napište:\n%p1/zpracovano/%f\n\nPro uložení výstupního obrázku do adresáře "/home/tom/fotky/zpracovano/2010-10-31", napište:\n%p2/zpracovano/%d1/%f +PREFERENCES_OUTDIRTEMPLATEHINT;Lze použít následující formátovací řetězce:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nTyto formátovací řetězce reprezentují různé části cesty k uložené fotografii, některé vlastnosti fotografie nebo pořadí v dávce.\n\nNapříklad pokud má zpracovávaná fotografie následující cestu:\n/home/tomas/fotky/2010-10-31/dsc0042.nef,\nmají jednotlivé formátovací řetězce tento význam:\n%d4 = home\n%d3 = tomas\n%d2 = fotky\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tomas/fotky/2010-10-31/\n%p2 = /home/tomas/fotky/\n%p3 = /home/tomas/\n%p4 = /home/\n\n%r bude nahrazeno hodnocením fotografie. Pokud není fotografie ohodnocena, bude %r nahrazeno '0'. Pokud je fotografie v koši, bude %r nahrazeno 'x'.\n\n%s1, %s2, atd. bude nahrazeno pořadím v dávce doplněném na 1 až 9 číslic. Každé spuštění zpracování fronty jej vždy nastaví na jedna a po každé zpracované fotografii se o jedna zvýší .\n\nPokud si přejete uložit výstupní obrázek vedle originálu, napište:\n%p1/%f\n\nPokud si jej ale přejete uložit do adresáře "zpracovano" ve stejném adresáři jako otevřený obrázek, napište:\n%p1/zpracovano/%f\n\nPro uložení výstupního obrázku do adresáře\n"/home/tom/fotky/zpracovano/2010-10-31", napište:\n%p2/zpracovano/%d1/%f PREFERENCES_OVERLAY_FILENAMES;Překrýt jména souborů na náhledech v prohlížeči souborů PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP;Překrýt jména souborů na náhledech v editoru PREFERENCES_OVERWRITEOUTPUTFILE;Přepsat existující soubory @@ -1062,20 +1097,25 @@ PREFERENCES_PREVDEMO;Metoda demozajkování náhledu PREFERENCES_PREVDEMO_FAST;Rychlá PREFERENCES_PREVDEMO_LABEL;Metoda demozajkování pro náhled při přiblížení menším než 100%: PREFERENCES_PREVDEMO_SIDECAR;Stejná jako v PP3 +PREFERENCES_PRINTER;Tiskárna (obtah) PREFERENCES_PROFILEHANDLING;Řízení profilů zpracování PREFERENCES_PROFILELOADPR;Priorita nahrávání profilů zpracování PREFERENCES_PROFILEPRCACHE;Profil v mezipaměti -PREFERENCES_PROFILEPRFILE;Profil uložený se zdrojovým souborem -PREFERENCES_PROFILESAVECACHE;Ukládat parametry zpracování do mezipaměti -PREFERENCES_PROFILESAVEINPUT;Ukládat parametry zpracování spolu se zdrojovým souborem +PREFERENCES_PROFILEPRFILE;Profil uložený se vstupním souborem +PREFERENCES_PROFILESAVEBOTH;Ukládat profil zpracování do mezipaměti a zároveň i se vstupním souborem +PREFERENCES_PROFILESAVECACHE;Ukládat profil zpracování do mezipaměti +PREFERENCES_PROFILESAVEINPUT;Ukládat profil zpracování spolu se vstupním souborem +PREFERENCES_PROFILESAVELOCATION;Místo uložení profilů zpracování PREFERENCES_PROFILE_NONE;Nic PREFERENCES_PROPERTY;Vlastnost +PREFERENCES_PRTINTENT;Reprodukční záměr +PREFERENCES_PRTPROFILE;Barevný profil PREFERENCES_PSPATH;Instalační složka Adobe Photoshop PREFERENCES_REMEMBERZOOMPAN;Zapamatovat si procento přiblížení a posun obrázku PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Zapamatovat si procento přiblížení a posun aktuálního obrázku a použít tyto hodnoty při otevírání nového obrázku.\n\nTato volba funguje pouze v režimu "Mód jedné karty editoru" a volba "Metoda demozajkování pro náhled při přiblížení menším než 100%" je nastavena na "Stejně jako v PP3". PREFERENCES_RGBDTL_LABEL;Maximální počet vláken pro redukci šumu a úrovně vlnky PREFERENCES_RGBDTL_TOOLTIP;Pro automatické nastavení maximálního možného počtu vláken ponechte nastaveno na "0". Čím více vláken běží paralelně, tím rychlejší je výpočet. Paměťové nároky najdete na RawPedii. -PREFERENCES_SELECTFONT;Vyberte globální písmo +PREFERENCES_SELECTFONT;Vyberte hlavní písmo PREFERENCES_SELECTFONT_COLPICKER;Vybrat písmo pro Průzkumníka barev PREFERENCES_SELECTLANG;Volba jazyka PREFERENCES_SELECTTHEME;Zvolit vzhled @@ -1091,7 +1131,6 @@ PREFERENCES_SHTHRESHOLD;Práh oříznutých stínů PREFERENCES_SIMPLAUT;Režim nástrojů PREFERENCES_SINGLETAB;Mód jedné karty editoru PREFERENCES_SINGLETABVERTAB;Mód jedné karty editoru, svislé karty -PREFERENCES_SLIMUI;Štíhlé rozhraní PREFERENCES_SMA;Malá (250x287) PREFERENCES_SND_BATCHQUEUEDONE;Zpracování fronty dokončeno PREFERENCES_SND_HELP;Vložte cestu k souboru pro nastavení zvuku nebo ponechte prázdné (bez zvuku).\nVe Windows zadejte "SystemDefault", "SystemAsterisk" a podobně.\nNa Linuxu použijte "complete", "window-attention" a další. @@ -1101,6 +1140,7 @@ PREFERENCES_STARTUPIMDIR;Složka obrázků při spuštění PREFERENCES_STDAUT;Běžný PREFERENCES_TAB_BROWSER;Prohlížeč souborů PREFERENCES_TAB_COLORMGR;Správa barev +PREFERENCES_TAB_DYNAMICPROFILE;Pravidla dynamických profilů PREFERENCES_TAB_GENERAL;Obecné PREFERENCES_TAB_IMPROC;Zpracování obrázku PREFERENCES_TAB_PERFORMANCE;Výkon a kvalita @@ -1113,7 +1153,6 @@ PREFERENCES_TP_USEICONORTEXT;V záhlaví karty zobrazit ikonu namísto textu PREFERENCES_TP_VSCROLLBAR;Skrýt svislou posuvnou lištu PREFERENCES_TUNNELMETADATA;Zkopírovat nezměněná Exif/IPTC/XMP metadata do výstupního souboru PREFERENCES_USEBUNDLEDPROFILES;Použít přiložené profily -PREFERENCES_USESYSTEMTHEME;Použít systémový motiv PREFERENCES_VIEW;Nastavení vyvážení bílé výstupních zařízení (monitor, TV, projektor, rámeček a jiné) PREFERENCES_WAVLEV;Zvýšit úroveň vlnkové transformace v nejvyšší kvalitě PREFERENCES_WLONE;Jedna úroveň @@ -1129,6 +1168,7 @@ PROFILEPANEL_MODE_TIP;Režim uplatnění profilu zpracování.\n\nTlačítko je PROFILEPANEL_MYPROFILES;Mé profily PROFILEPANEL_PASTEPPASTE;Parametry pro vložení PROFILEPANEL_PCUSTOM;Vlastní +PROFILEPANEL_PDYNAMIC;Dynamiký PROFILEPANEL_PFILE;Ze souboru PROFILEPANEL_PINTERNAL;Neutrální PROFILEPANEL_PLASTSAVED;Poslední uschovaný @@ -1172,8 +1212,8 @@ SAVEDLG_SUBSAMP_TOOLTIP;Nejlepší komprese:\nJ:a:b 4:2:0\nh/v 2/2\nO polovinu s SAVEDLG_TIFFUNCOMPRESSED;Nekomprimovaný TIFF SAVEDLG_WARNFILENAME;Soubor bude pojmenován SHCSELECTOR_TOOLTIP;Klikněte pravým tlačítkem myši pro obnovení výchozí pozice těchto tří posuvníků. -SOFTPROOF_GAMUTCHECK_TOOLTIP;Pokud je aktivní, indikuje šedou barvou pixely, které se dostaly mimo paletu výstupního profilu. -SOFTPROOF_TOOLTIP;Jemně korekční\nPokud je aktivní. můžete simulovat vykreslení generované výstupním profilem nástroje ICM. Velmi užitečné pro simulaci tiskových výstupů. +SOFTPROOF_GAMUTCHECK_TOOLTIP;Pokud je aktivní, budou pixely mimo barevnou paletu výstupního profilu označeny šedou barvou. +SOFTPROOF_TOOLTIP;Jemně korekční\nPokud je aktivní, umožní vám simulovat vykreslení dle výstupního profilu ICM. Nejužitečnější pro simulaci tiskového výstupu. THRESHOLDSELECTOR_B;Dole THRESHOLDSELECTOR_BL;Dole vlevo THRESHOLDSELECTOR_BR;Dole vpravo @@ -1222,7 +1262,7 @@ TP_BWMIX_MIXC;Míchání TP_BWMIX_NEUTRAL;Vrátit míchání TP_BWMIX_NEUTRAL_TIP;Vrátí všechny hodnoty (filtry, mixéry kanálů) na výchozí pozice. TP_BWMIX_RGBLABEL;R: %1%% G: %2%% B: %3%% Celkem: %4%% -TP_BWMIX_RGBLABEL_HINT;Výsledné RGB faktory po započtení všech mixérů\n"Celkem" zobrazí souček aktuálně aplikovaných RGB hodnot:\n- vždy 100% v relativním režimu\n- více (světlejší) nebo méně (tmavší) než 100% v absolutním režimu. +TP_BWMIX_RGBLABEL_HINT;Výsledné RGB faktory po započtení všech mixérů\n"Celkem" zobrazí součet aktuálně aplikovaných RGB hodnot:\n- vždy 100% v relativním režimu\n- více (světlejší) nebo méně (tmavší) než 100% v absolutním režimu. TP_BWMIX_RGB_TOOLTIP;Mísení RGB kanálů. Jako vodítko můžete použít uložená přednastavení.\nPovšimněte si prosím, že záporné hodnoty mohou vést ke vzniku artefaktů nebo chybnému chování. TP_BWMIX_SETTING;Uložené předvolby TP_BWMIX_SETTING_TOOLTIP;Různá přednastavení (filmy, krajina, ...) nebo vlastní míchání kanálů. @@ -1266,7 +1306,7 @@ TP_COLORAPP_ADAPTSCENE;Svítivost scény TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolutní jas scény prostředí(cd/m²).\n 1) Vypočítáno z Exifu:\nRychlost závěrky - citlivost - clona - expoziční korekce fotoaparátu.\n 2) Vypočítáno z hodnoty raw bílého bodu a expoziční kompenzace Rawtherapee. TP_COLORAPP_ADAPTVIEWING;Svítivost prohlížení (cd/m²) TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolutní jas prostředí prohlížení\n(obvykle 16cd/m²). -TP_COLORAPP_ADAP_AUTO_TOOLTIP;Pokud je povoleno (doporučeno), RT vypočítá optimální hodnotu z Exif dat.\nPokud si přejete zadat hodnotu ručně, nejprve zrušte zatržení tohoto pole. +TP_COLORAPP_ADAP_AUTO_TOOLTIP;Pokud je povoleno (doporučeno), RT vypočítá optimální hodnotu z Exif dat.\nPokud si přejete zadat hodnotu ručně, nejprve zrušte zatržení tohoto pole. TP_COLORAPP_ALGO;Algoritmus TP_COLORAPP_ALGO_ALL;Vše TP_COLORAPP_ALGO_JC;Světlost + Barevnost (JC) @@ -1274,7 +1314,7 @@ TP_COLORAPP_ALGO_JS;Světlost + Nasycení (JS) TP_COLORAPP_ALGO_QM;Jas a pestrobarevnost (QM) TP_COLORAPP_ALGO_TOOLTIP;Umožňuje vybrat mezi podmnožinou nebo všemi parametry. TP_COLORAPP_BADPIXSL;Filtr vypálených/mrtvých pixelů -TP_COLORAPP_BADPIXSL_TOOLTIP;Potlačení vypálených/mrtvých (jasně zabarvených) pixelů.\n0 = Bez efektu\n1 = Medián\n2 = Gaussovo.\nPopřípadě obrázek upravte tak, aby jste se vyhnuli velmi tmavým stínům.\n\nTyto artefakty vznikají díky omezením CIECAM02. +TP_COLORAPP_BADPIXSL_TOOLTIP;Potlačení vypálených/mrtvých (jasně zabarvených) pixelů.\n0 = Bez efektu\n1 = Medián\n2 = Gaussův.\nPopřípadě obrázek upravte tak, aby jste se vyhnuli velmi tmavým stínům.\n\nTyto artefakty vznikají díky omezením CIECAM02. TP_COLORAPP_BRIGHT;Jas (O) TP_COLORAPP_BRIGHT_TOOLTIP;Jas v CIECAM02 bere v potaz svítivost bílé a rozdíly jasů mezi L*a*b* a RGB. TP_COLORAPP_CHROMA;Barevnost (C) @@ -1321,7 +1361,7 @@ TP_COLORAPP_SURROUND_DIM;Tlumené TP_COLORAPP_SURROUND_EXDARK;Velmi tmavé TP_COLORAPP_SURROUND_TOOLTIP;Změní tóny a barvy dle podmínek prohlížení na výstupním zařízení\n\nPrůměrné: Průměrné osvětlení prostředí (standardní). Obrázek nebude změněn.\n\nTlumené: Tlumené prostředí (TV). Obrázek bude mírně ztmaven.\n\nTmavé: Tmavé prostředí (projektor). Obrázek bude více tmavý.\n\nVelmi tmavé: Velmi tmavé prostředí (cutsheet). Obrázek bude velmi tmavý. TP_COLORAPP_SURSOURCE;Tmavé okolí -TP_COLORAPP_SURSOURCE_TOOLTIP;Může být použito pokud má zdrojový obrázek tmavý okraj. +TP_COLORAPP_SURSOURCE_TOOLTIP;Může být použito, pokud má vstupní obrázek tmavý okraj. TP_COLORAPP_TCMODE_BRIGHTNESS;Jas TP_COLORAPP_TCMODE_CHROMA;Barevnost TP_COLORAPP_TCMODE_COLORF;Pestrobarevnost @@ -1409,7 +1449,7 @@ TP_DIRPYRDENOISE_CCCURVE;Křivka barevnosti TP_DIRPYRDENOISE_CHROMA;Barevnost - Hlavní TP_DIRPYRDENOISE_CHROMAFR;Barevnost TP_DIRPYRDENOISE_CTYPE;Metoda -TP_DIRPYRDENOISE_CTYPE_TOOLTIP;Ručně\nOvlivňuje celý obrázek.\nVolby redukce šumu nastavujete ručně.\n\nCelková automazika\nOvlivňuje celý obrázek.\nPro výpočet parametrů celkové redukce barevného šumu je použito 9 zón.\n\nVíce zónová automatika\nBez náhledu - funguje pouze při ukládání, přesto je možné pomocí funkce "Náhled" získat alespoň částečnou představu o výsledku, Nastavení jsou aplikována na centrální dlaždici.\nObrázek je rozdělen na dlaždice (V závislosti na velikosti obrázku jich bude 10 až 70) a pro každou dlaždici bude vypočítáno vhodné nastavení redukce barevného šumu.\n\nNáhled\nOvlivňuje celý obrázek.\nPro výpočet celkového nastavení redukce barevného šumu je použita viditelná část obrázku. +TP_DIRPYRDENOISE_CTYPE_TOOLTIP;Ručně\nOvlivňuje celý obrázek.\nVolby redukce šumu nastavujete ručně.\n\nCelková automatika\nOvlivňuje celý obrázek.\nPro výpočet parametrů celkové redukce barevného šumu je použito 9 zón.\n\nVíce zónová automatika\nBez náhledu - funguje pouze při ukládání, přesto je možné pomocí funkce "Náhled" získat alespoň částečnou představu o výsledku, Nastavení jsou aplikována na centrální dlaždici.\nObrázek je rozdělen na dlaždice (V závislosti na velikosti obrázku jich bude 10 až 70) a pro každou dlaždici bude vypočítáno vhodné nastavení redukce barevného šumu.\n\nNáhled\nOvlivňuje celý obrázek.\nPro výpočet celkového nastavení redukce barevného šumu je použita viditelná část obrázku. TP_DIRPYRDENOISE_CUR;Křivka TP_DIRPYRDENOISE_CURVEEDITOR_CC;Barevnost TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Zvýší (násobí) hodnoty všech barevných posuvníků.\nKřivka vám umožní nastavit sílu redukce barevného šumu jako funkci barvy. Například pro zvýšení účinku v oblastech s nízkým nasycení a snížení v oblastech s vysokým nasycením. @@ -1471,8 +1511,7 @@ TP_DIRPYREQUALIZER_SKIN_TOOLTIP;Hodnota -100: zaměřeno na pleťové tóny.\nH TP_DIRPYREQUALIZER_THRESHOLD;Práh TP_DIRPYREQUALIZER_TOOLTIP;Počet pokusů pro redukci artefaktů vzniklých přenosem barvy (odstín, barevnost a jas) pleti na zbytek obrázku. TP_DISTORTION_AMOUNT;Míra -TP_DISTORTION_AUTO;Automatická korekce zkreslení -TP_DISTORTION_AUTO_TIP;Automatická korekce zkreslení objektivu pro některé fotoaparáty (Micro 4/3, některé kompakty a jiné). +TP_DISTORTION_AUTO_TIP;Automaticky opraví zkreslení objektivu v raw souborech podle vložených JPEG obrázků (pokud existují a byly automaticky opraveny fotoaparátem). TP_DISTORTION_LABEL;Korekce zkreslení TP_EPD_EDGESTOPPING;Zachování hran TP_EPD_GAMMA;Gama @@ -1559,7 +1598,6 @@ TP_ICM_APPLYLOOKTABLE_TOOLTIP;Použije vloženou DCP tabulku vzhledu. Nastavení TP_ICM_BLENDCMSMATRIX;Smísení ICC světel s matici TP_ICM_BLENDCMSMATRIX_TOOLTIP;Povolit obnovení vypálených jasů při použití ICC profilů založených na LUT. TP_ICM_BPC;Kompenzace černého bodu -TP_ICM_BPC_TOOLTIP;Povolte pokud chcete, aby se kanál svítivosti vešel do výstupního barevného prostoru s pevným bílým bodem TP_ICM_DCPILLUMINANT;Osvětlení TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolované TP_ICM_DCPILLUMINANT_TOOLTIP;Vyberte které vložené DCP osvětlení se má použít. Ve výchozím stavu se použije "interpolované", což je mix mezi dvěma osvětleními založenými na vyvážení bílé. Nastavené je dostupné pouze v případě, že je povoleno dvojité DCP osvětlení s podporou interpolace. @@ -1579,7 +1617,7 @@ TP_ICM_LABEL;Správa barev TP_ICM_NOICM;Bez ICM: sRGB výstup TP_ICM_OUTPUTPROFILE;Výstupní barevný prostor TP_ICM_PROFILEINTENT;Záměr reprodukce -TP_ICM_SAVEREFERENCE;Uložit referenční obrázek pro profilování +TP_ICM_SAVEREFERENCE;Uložit referenční obrázek TP_ICM_SAVEREFERENCE_APPLYWB;Aplikovat vyvážení bílé TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Obecně se vyvážení bílé aplikuje při ukládání obrázku pro vytvoření ICC profilů a neaplikuje při vytváření DCP profilů. TP_ICM_SAVEREFERENCE_TOOLTIP;Uloží lineární TIFF obrázek před aplikováním vstupního profilu. Výsledek může být použit pro kalibraci a generování profilu fotoaparátu. @@ -1672,21 +1710,82 @@ TP_RAWEXPOS_LINEAR;Korekce bílého bodu TP_RAWEXPOS_PRESER;Zachování světel TP_RAWEXPOS_RGB;Červená, telená, modrá TP_RAWEXPOS_TWOGREEN;Spojit zelené +TP_RAW_1PASSMEDIUM;Jeden průchod (střední) +TP_RAW_3PASSBEST;Tři průchody (nejlepší) +TP_RAW_AHD;AHD +TP_RAW_AMAZE;AMaZE +TP_RAW_DCB;DCB TP_RAW_DCBENHANCE;Vylepšení DCB TP_RAW_DCBITERATIONS;Počet průchodů DCB TP_RAW_DMETHOD;Metoda TP_RAW_DMETHOD_PROGRESSBAR;%1 demozajkování... TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Vylepšení demozajkování... -TP_RAW_DMETHOD_TOOLTIP;Poznámka: IGV a LMMSE jsou určeny pro obrázky s vysokým ISO, kde pomáhají redukci šumu minimalizovat posterizaci a vyžehlený vzhled. +TP_RAW_DMETHOD_TOOLTIP;Poznámka: IGV a LMMSE jsou určeny pro obrázky s vysokým ISO, kde pomáhají redukci šumu minimalizovat posterizaci a vyžehlený vzhled.\n\nPixel Shift je určen pro soubory Pentax Pixel Shift.\nPro soubory neobsahující Pixel Shift data je použita metoda AMaZE. +TP_RAW_EAHD;EAHD TP_RAW_FALSECOLOR;Počet kroků potlačování chybných barev +TP_RAW_FAST;Rychlá TP_RAW_HD;Práh TP_RAW_HD_TOOLTIP;Nižší hodnoty učiní detekci vypálených/mrtvých bodů agresivnější, ale falešná hlášení mohou vést k artefaktům. Pokud po povolení filtru vypálených/mrtvých bodů zpozorujete výskyt artefaktů, postupně snižujte prahovou hodnotu až do jejich vymizení. +TP_RAW_HPHD;HPHD +TP_RAW_IGV;IGV +TP_RAW_IMAGENUM;Dílčí snímek +TP_RAW_IMAGENUM_TOOLTIP;Některé raw snímky obsahují několik podsnímků (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nV případě, že je pro demozajkování použita jiná metoda než Pixel Shift, tato volba určí, který podsnímek se použije.\n\nPokud je použita Pixel Shift metoda demozajkování na Pixel Shift raw soubory, budou použity všechny podsnímky a tato volba určí, který snímek bude použit pro pohyblivé části. TP_RAW_LABEL;Demozajkování +TP_RAW_LMMSE;LMMSE TP_RAW_LMMSEITERATIONS;Kroky rozšíření LMMSE TP_RAW_LMMSE_TOOLTIP;Přidá gamu (krok 1) - přidá mediány (kroky 2, až 4) a následně přidá (kroky 5 a 6) vyčištění artefaktů a vylepšení poměru signálu a šumu. +TP_RAW_MONO;Mono +TP_RAW_NONE;Žádná (zobrazí strukturu senzoru) +TP_RAW_PIXELSHIFT;Pixel Shift +TP_RAW_PIXELSHIFTADAPTIVE;Přizpůsobivá detekce +TP_RAW_PIXELSHIFTBLUR;Maska pohybové neostrosti +TP_RAW_PIXELSHIFTEPERISO;Přizpůsobení ISO +TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;Výchozí hodnota 0 by měla dostačovat pro základní hodnoty ISO.\nDetekci pohybu na vyšších hodnotách ISO vylepšíte navýšením této hodnoty.\nZvyšujte po malých krocích a sledujte přitom masku pohybu. +TP_RAW_PIXELSHIFTEQUALBRIGHT;Vyrovnat jas snímků +TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Korekce po kanálech +TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Zapnuto: Nezávislá korekce jednotlivých RGB kanálů.\nVypnuto: Použije se stejná hodnota pro všechny kanály. +TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Vyrovná jas ostatních snímků podle jasu vybraného snímku.\nPokud jsou ve snímku přeexponované oblasti, vyberte jasnější snímek abyste zamezili výskytu purpurové barvy v přeexponovaných oblastech nebo povolte korekci pohybu. +TP_RAW_PIXELSHIFTEXP0;Testovací +TP_RAW_PIXELSHIFTGREEN;Kontrolovat zelený kanál na pohyb +TP_RAW_PIXELSHIFTHOLEFILL;Vyplnit díry v masce pohybu +TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Vyplnit díry v masce pohybu +TP_RAW_PIXELSHIFTLMMSE;Použít LMMSE pro části s pohybem +TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Pro oblasti s pohybem použít LMMSE namísto AMaZE.\nUžitečné pro fotografie s vysokým ISO. +TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 nový práh +TP_RAW_PIXELSHIFTMEDIAN;Použít medián pro části s pohybem +TP_RAW_PIXELSHIFTMEDIAN3;Vyjmout vybraný snímek z mediánu +TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Vyjme vybraný snímek z mediánu.\nUžitečné, pokud se pohybující se objekty překrývají jen ve druhém a třetím. +TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Pro oblasti s pohybem použijte medián všech snímků namísto vybraného.\nOdstraní objekty, které jsou na všech snímcích na různých místech.\nVytvoří efekt pohybu pro pomalu se pohybující (překrývající se) objekty. +TP_RAW_PIXELSHIFTMM_AUTO;Automatická +TP_RAW_PIXELSHIFTMM_CUSTOM;Vlastní +TP_RAW_PIXELSHIFTMM_OFF;Vypnuto +TP_RAW_PIXELSHIFTMOTION;Úroveň kontroly pohybu (zastaralé) +TP_RAW_PIXELSHIFTMOTIONCORRECTION;Míra korekce pohybu v zelené +TP_RAW_PIXELSHIFTMOTIONMETHOD;Korekce pohybu +TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 znamená bez detekce pohybu.\n1 - 99 znamená, že pohybu bude detekován dle této hodnoty. Pro zvýšení míry detekce použijte vyšší hodnotu.\n100 znamená, že bude použito AMaZE demozajkování snímku. +TP_RAW_PIXELSHIFTNONGREENAMAZE;Kontrolovat červené/modré AMaZE +TP_RAW_PIXELSHIFTNONGREENCROSS;Kontrolovat pohyb v červeném a modrém kanálu +TP_RAW_PIXELSHIFTNONGREENCROSS2;Kontrolovat zelené AMaZE +TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Kontrolovat červenou/modrou vodorovně +TP_RAW_PIXELSHIFTNONGREENVERTICAL;Kontrolovat červenou/modrou svisle +TP_RAW_PIXELSHIFTNREADISO;nRead +TP_RAW_PIXELSHIFTPRNU;PRNU (%) +TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Váha červené a modré +TP_RAW_PIXELSHIFTSHOWMOTION;Ukázat masku pohybu +TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Ukázat pouze masku pohybu +TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Ukázat masku pohybu bez obrázku. +TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Překryje obrázek maskou, která ukazuje oblasti s pohybem. +TP_RAW_PIXELSHIFTSIGMA;Poloměr rozostření +TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;Výchozí poloměr 1,0 většinou velmi dobře funguje pro základní ISO.\nU snímků s vysokým ISO poloměr zvětšete. Hodnota 5,0 je dobrým výchozím bodem.\nBěhem změny hodnoty sledujte masku pohybu. +TP_RAW_PIXELSHIFTSMOOTH;Hladké přechody +TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Vyhlazení přechodů mezi oblastmi s pohybem a bez pohybu.\nNastavte na 0 pro vypnutí vyhlazování přechodů.\nNastavte na 1 pro získání AMaZE/LMMSE výsledku pro vybraný snímek (závisí na tom, zda je vybrána volba "Použít LMMSE") nebo mediánu všech čtyř snímků (pokud je vybrána volba "Použít medián"). +TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev faktor modrý +TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev faktor zelený +TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev faktor červený TP_RAW_SENSOR_BAYER_LABEL;Snímač s Bayerovou maskou -TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;Tří průchodová dává lepší výsledky (doporučeno pro fotky s níským ISO).\nJednoprůchodová je téměř k nerozeznání od tří průchodové pro vysoké ISO a je rychlejší. +TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;Tří průchodová dává lepší výsledky (doporučeno pro fotky s nízkým ISO).\nJednoprůchodová je téměř k nerozeznání od tří průchodové pro vysoké ISO a je rychlejší. TP_RAW_SENSOR_XTRANS_LABEL;Senzory s X-Trans maticí +TP_RAW_VNG4;VNG4 TP_RESIZE_APPLIESTO;Aplikovat na: TP_RESIZE_CROPPEDAREA;Oblast ořezu TP_RESIZE_FITBOX;Výřez @@ -1746,7 +1845,7 @@ TP_RETINEX_MAP;Metoda masky TP_RETINEX_MAP_GAUS;Gaussova maska TP_RETINEX_MAP_MAPP;Ostrá maska (částečná vlnka) TP_RETINEX_MAP_MAPT;Ostrá maska (kompletní vlnka) -TP_RETINEX_MAP_METHOD_TOOLTIP;Použít masku generovanou Gaussovou funkcí výše (poloměr, metoda) pro omezení halo efektu a artefaktů.\n\nPouze křivka: na masku je aplikována diagonální křivka kontrastu.\nPozor na artefakty!\n\nGaussova maska: originální maska je upravena Gaussovým rozostřením.\nRychlé.\n\nOstrá maska: na originální masku se použije vlnka.\nPomalé. +TP_RETINEX_MAP_METHOD_TOOLTIP;Použít masku výše generovanou Gaussovou funkcí (Poloměr, Metoda) k omezení halo efektu a artefaktů.\n\nPouze křivka: použije na masku diagonální křivku kontrastu .\nPozor na vznik artefaktů!\n\nGaussova maska: vygeneruje a použije gaussově rozostřenou originální masku.\nRychlé.\n\nOstrá maska: vygeneruje a použije vlnkovou transformaci nad originální maskou.\nPomalé. TP_RETINEX_MAP_NONE;Žádná TP_RETINEX_MEDIAN;Přenos filtru mediánu TP_RETINEX_METHOD;Metoda @@ -1776,7 +1875,7 @@ TP_RETINEX_VARIANCE;Kontrast TP_RETINEX_VARIANCE_TOOLTIP;Nízká odchylka zvyšuje místní kontrast a nasycení, ale může vést ke vzniku artefaktů. TP_RETINEX_VIEW;Zpracování TP_RETINEX_VIEW_MASK;Maska -TP_RETINEX_VIEW_METHOD_TOOLTIP;Běžné - běžné zobrazení.\nMaska - zobrazí masku.\nNeostrá maska - zobrazí obrázek s neostrou maskou s velkým poloměrem.\nPřenos - Auto/Pevný - zobrazí soubor mapy přenosu před jakoukoli úpravou kontrastu a jasu.\n\nUpozornění: maska neodpovídá realitě. Je zesílena, aby byla lépe vidět. +TP_RETINEX_VIEW_METHOD_TOOLTIP;Standard - Normální displej.\nMaska - Maska displeje.\nNeostrá maska - Zobrazí obrázek s vysokým poloměrem neostré masky.\nPřenos - Automatický/Pevný - Zobrazí mapu přenosu souboru, před jakoukoli akcí s jasem a kontrastem.\n\nUpozornění: maska neodpovídá realitě, ale je, pro zvýšení názornosti, zesílena. TP_RETINEX_VIEW_NONE;Běžné TP_RETINEX_VIEW_TRAN;Přenos - Automatický TP_RETINEX_VIEW_TRAN2;Přenos - Pevný @@ -1818,7 +1917,6 @@ TP_SHARPENING_RLD_AMOUNT;Míra TP_SHARPENING_RLD_DAMPING;Útlum TP_SHARPENING_RLD_ITERATIONS;Počet průchodů TP_SHARPENING_THRESHOLD;Práh -TP_SHARPENING_TOOLTIP;S CIECAM02 očekávejte mírně odlišný efekt. Pokud pozorujete rozdíly, upravte dle potřeby. TP_SHARPENING_USM;Maskování rozostření TP_SHARPENMICRO_AMOUNT;Kvantita TP_SHARPENMICRO_LABEL;Mikrokontrast @@ -1865,7 +1963,7 @@ TP_WAVELET_B2;Zůstatek TP_WAVELET_BACKGROUND;Pozadí TP_WAVELET_BACUR;Křivka TP_WAVELET_BALANCE;Vyvážení kontrastu d/v-h -TP_WAVELET_BALANCE_TOOLTIP;Změní vyvážení mezi směry vlnky: svisle-vodorovně a uhlopříčně.\nPokud je aktivován kontrast, barevnost nebo zbytkové tónové mapování je efekt díky vyvážení zesílen. +TP_WAVELET_BALANCE_TOOLTIP;Změní vyvážení mezi směry vlnky: svisle-vodorovně a úhlopříčně.\nPokud je aktivován kontrast, barevnost nebo zbytkové tónové mapování je efekt díky vyvážení zesílen. TP_WAVELET_BALCHRO;Vyvážení barev TP_WAVELET_BALCHRO_TOOLTIP;Pokud je povoleno, křivka nebo posuvníky "Vyvážení kontrastu" ovlivňují i vyvážení barev. TP_WAVELET_BANONE;Nic @@ -1896,7 +1994,7 @@ TP_WAVELET_CONTRAST_MINUS;Kontrast - TP_WAVELET_CONTRAST_PLUS;Kontrast + TP_WAVELET_CONTRA_TOOLTIP;Změní kontrast zůstatku obrazu. TP_WAVELET_CTYPE;Ovládání barevnosti -TP_WAVELET_CURVEEDITOR_CC_TOOLTIP;Mění lokální kontrast jako funkci originálního lokálního kontrastu(úsečka).\nNízké hodnoty na úsečce představují malý lokální kontrast (skutečné hodnoty okolo10..20).\n50% z úsečky představuje průměrný lokální kontrast (skutečné hodnoty okolo 100..300).\n66% z úsečky představuje představuje standardní odchylku lokálního kontrastu (skutečné hodnoty okolo 300..800).\n100% z úsečky představuje maximální lokální kontrast (skutečné hodnoty okolo 3000..8000). +TP_WAVELET_CURVEEDITOR_CC_TOOLTIP;Mění lokální kontrast jako funkci originálního lokálního kontrastu(úsečka).\nNízké hodnoty na úsečce představují malý lokální kontrast (skutečné hodnoty okolo 10..20).\n50% z úsečky představuje průměrný lokální kontrast (skutečné hodnoty okolo 100..300).\n66% z úsečky představuje představuje standardní odchylku lokálního kontrastu (skutečné hodnoty okolo 300..800).\n100% z úsečky představuje maximální lokální kontrast (skutečné hodnoty okolo 3000..8000). TP_WAVELET_CURVEEDITOR_CH;Kontrast úrovní=f(Barevnost) TP_WAVELET_CURVEEDITOR_CH_TOOLTIP;Mění kontrast každé úrovně jako funkci odstínu.\nDejte pozor, abyste nepřepsali změny udělané v podnástroji Paleta nástroje Odstín.\nZměny křivky se projeví pouze v případě, že posuvníky kontrastu úrovní vlnky nejsou nastaveny na nulu. TP_WAVELET_CURVEEDITOR_CL;L @@ -2052,6 +2150,8 @@ TP_WBALANCE_SOLUX41;Solux 4100K TP_WBALANCE_SOLUX47;Solux 4700K (vendor) TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) TP_WBALANCE_SPOTWB;Bodové vyvážení +TP_WBALANCE_TEMPBIAS;AVB - Zdůraznění teploty +TP_WBALANCE_TEMPBIAS_TOOLTIP;Dovolí ovlivnit výpočet "automatického vyvážení bílé"\nzdůrazněním teplejší nebo chladnější teploty. Toto zdůraznění\nje vyjádřeno v procentech vypočtené teploty a výsledek\nlze vyjádřit vzorcem "vypočtenáTeplota + vypočtenáTeplota * zdůraznění". TP_WBALANCE_TEMPERATURE;Teplota TP_WBALANCE_TUNGSTEN;Wolfram TP_WBALANCE_WATER1;Pod vodou 1 @@ -2065,3 +2165,29 @@ ZOOMPANEL_ZOOMFITSCREEN;Přizpůsobit obrázek obrazovce\nZkratka: f ZOOMPANEL_ZOOMIN;Přiblížit\nZkratka: + ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - +!!!!!!!!!!!!!!!!!!!!!!!!! +! Untranslated keys follow; remove the ! prefix after an entry is translated. +!!!!!!!!!!!!!!!!!!!!!!!!! + +!DONT_SHOW_AGAIN;Don't show this message again. +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language +!PREFERENCES_THEME;Theme +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index 43f10eacd..de3163d21 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -83,7 +83,6 @@ HISTOGRAM_TOOLTIP_L;Vis/skjul CIELAB histogram HISTOGRAM_TOOLTIP_R;Vis/skjul rødt histogram HISTORY_CHANGED;Ændret HISTORY_CUSTOMCURVE;Tilpasset kurve -HISTORY_DELSNAPSHOT;Slet HISTORY_FROMCLIPBOARD;Fra udklipsholder HISTORY_LABEL;Historie HISTORY_MSG_1;Foto indlæst @@ -170,47 +169,23 @@ HISTORY_MSG_81;Resize enabled HISTORY_NEWSNAPSHOT;Tilføj... HISTORY_SNAPSHOT;Snapshot HISTORY_SNAPSHOTS;Snapshots -IPTCPANEL_AUTHOR;Forfatter -IPTCPANEL_AUTHORSPOSITION;Forfatterens stilling -IPTCPANEL_AUTHORSPOSITIONHINT;Stillingsbetegnelse for skaberen eller skaberne af objektet (byline titel). -IPTCPANEL_CAPTION;Billedtekst -IPTCPANEL_CAPTIONHINT;En beskrivelse af informationerne i tekstform. -IPTCPANEL_CAPTIONWRITER;Skribent på billedtekst -IPTCPANEL_CAPTIONWRITERHINT;Navnet på den person, der har været indblandet i at skrive, redigere eller korrekturlæse billedet eller billedteksten. IPTCPANEL_CATEGORY;Kategori -IPTCPANEL_CATEGORYHINT;Identificerer billedets emne efter skaberens mening. IPTCPANEL_CITY;By -IPTCPANEL_CITYHINT;Byen, hvor billedet er taget.. IPTCPANEL_COPYHINT;Kopier IPTC-indstillinger til udklipsholder. -IPTCPANEL_COPYRIGHT;Copyright -IPTCPANEL_COPYRIGHTHINT;Enhver nødvendig copyright-oplysning. IPTCPANEL_COUNTRY;Land -IPTCPANEL_COUNTRYHINT;Navnet på det land, hvor billedet blev taget. IPTCPANEL_CREDIT;Anerkendelse IPTCPANEL_CREDITHINT;Identificerer den, der stiller billedet til rådighed, ikke nødvendigvis ejeren/skaberen. IPTCPANEL_DATECREATED;Dato skabt -IPTCPANEL_DATECREATEDHINT;Den dato, hvor det intellektuelle indhold i billedet blev skabt; Format: ÅÅÅÅMMDD (Date Created). IPTCPANEL_EMBEDDED;Indlejret IPTCPANEL_EMBEDDEDHINT;Genskab til indlejrede IPTC-data i billedfilen IPTCPANEL_HEADLINE;Overskrift -IPTCPANEL_HEADLINEHINT;En indførsel, som kan udgives og giver en opsummering af billedets indhold. IPTCPANEL_INSTRUCTIONS;Instruktioner -IPTCPANEL_INSTRUCTIONSHINT;Andre redaktionelle instruktioner angående billedets brug. IPTCPANEL_KEYWORDS;Søgeord -IPTCPANEL_KEYWORDSHINT;Bruges til at angive særlige søgbare ord. IPTCPANEL_PASTEHINT;Indsæt IPTC-indstillinger fra udklipsholder -IPTCPANEL_PROVINCE;Provins -IPTCPANEL_PROVINCEHINT;Provinsen/delstaten, hvor billedet stammer fra. IPTCPANEL_RESET;Genskab IPTCPANEL_RESETHINT;Genskab til profilstandard IPTCPANEL_SOURCE;Kilde -IPTCPANEL_SOURCEHINT;Den originale ejer af billedets intellektuelle indhold. -IPTCPANEL_SUPPCATEGORIES;Suppl. katergorier -IPTCPANEL_SUPPCATEGORIESHINT;Yderligere angivelse af billedets emne. IPTCPANEL_TITLE;Titel -IPTCPANEL_TITLEHINT;En kort beskrivelse af billedet. -IPTCPANEL_TRANSREFERENCE;Overleveringsreference -IPTCPANEL_TRANSREFERENCEHINT;En kode, der repræsenterer placeringen for den originale overlevering. MAIN_BUTTON_PREFERENCES;Indstillinger MAIN_BUTTON_SAVE;Gem billede MAIN_BUTTON_SENDTOEDITOR;Send til redigeringsprogram @@ -269,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maksimal miniaturehøjde PREFERENCES_CLIPPINGIND;Indikator for udbrændte områder PREFERENCES_DATEFORMAT;Datoformat PREFERENCES_DATEFORMATHINT;Du kan bruge følgende formatindstillinger:\n%y : år\n%m : måned\n%d : dag\n\nDet typiske datoformat i danmark er:\n%d/%m/%y -PREFERENCES_DEFAULTLANG;Sprog -PREFERENCES_DEFAULTTHEME;Tema PREFERENCES_DIRHOME;Standardmappe PREFERENCES_DIRLAST;Sidst anvendte mappe PREFERENCES_DIROTHER;Andet @@ -396,7 +369,6 @@ TP_ICM_INPUTPROFILE;Input profil TP_ICM_LABEL;ICM TP_ICM_NOICM;No ICM: sRGB output TP_ICM_OUTPUTPROFILE;Output profil -TP_ICM_SAVEREFERENCE;Gem referencebillede til profilering TP_ICM_WORKINGPROFILE;Arbejdsprofil TP_RAW_DMETHOD;Metode TP_RAW_FALSECOLOR;Antal trin til undertrykkelse af forkert farve @@ -475,12 +447,23 @@ TP_WBALANCE_TEMPERATURE;Temperatur !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. !EXIFFILTER_EXPOSURECOMPENSATION;Exposure compensation (EV) !EXIFFILTER_FILETYPE;File type !EXIFFILTER_METADATAFILTER;Enable metadata filters +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -503,8 +486,12 @@ TP_WBALANCE_TEMPERATURE;Temperatur !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -520,7 +507,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !FILEBROWSER_CURRENT_NAME;Current name: !FILEBROWSER_DARKFRAME;Dark-frame !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -555,6 +541,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -590,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -871,7 +859,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -923,12 +911,12 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -941,8 +929,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -954,8 +942,58 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -975,6 +1013,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d @@ -1049,8 +1088,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -1059,7 +1097,9 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves !PARTIALPASTE_SHARPENEDGE;Edges @@ -1088,7 +1128,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1100,7 +1141,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1113,7 +1155,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_EDITORLAYOUT;Editor Layout !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field !PREFERENCES_FLATFIELDFOUND;Found @@ -1129,7 +1171,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1144,6 +1187,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1159,9 +1203,10 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1177,13 +1222,18 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROPERTY;Property +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files @@ -1194,15 +1244,16 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. !PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done !PREFERENCES_SND_TRESHOLDSECS;After seconds !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1211,7 +1262,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -!PREFERENCES_USESYSTEMTHEME;Use system theme !PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) !PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' !PREFERENCES_WLONE;One level @@ -1224,6 +1274,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save !PROGRESSBAR_LOADINGTHUMBS;Loading thumbnails... @@ -1316,11 +1367,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1340,8 +1391,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1352,6 +1403,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1363,9 +1415,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1384,10 +1438,14 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1513,8 +1571,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_THRESHOLD;Threshold !TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma !TP_EPD_LABEL;Tone Mapping @@ -1578,18 +1635,17 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1598,11 +1654,12 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_ICM_INPUTNONE;No profile !TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift @@ -1689,19 +1746,80 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2024,6 +2142,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_WBALANCE_SOLUX41;Solux 4100K !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) +!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_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 8d1c44b60..346cdf264 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -29,6 +29,19 @@ #28 2016-03-19 Erweiterung/Korrekturen (TooWaBoo) RT4.2.880 #29 2016-05-24 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1005 #30 2016-09-30 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1234 +#31 2016-12-01 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1408 +#32 2016-12-29 Erweiterung/Korrekturen (TooWaBoo) RT4.2.1464 +#33 2017-01-04 Erweiterung/Korrekturen/Soft-Proofing (TooWaBoo) RT4.2.1477 +#34 2017-01-07 IPTC (TooWaBoo) RT4.2.1492 +#35 2017-02-18 AWB bias (TooWaBoo) RT 5.0 r1 +#36 2017-02-23 Korrekturen (TooWaBoo) RT 5.0 r1 +#37 2017-03-06 Dynamisches Profil (TooWaBoo) RT 5.0 r1 +#38 2017-03-26 Pixel Shift (TooWaBoo) RT 5.0 r1 +#39 06.04.2017 Fast Export (TooWaBoo) RT 5.0 r1 +#40 30.04.2017 Erweiterung/Korrekturen (TooWaBoo) RT 5.0 r1 +#41 03.05.2017 Erweiterung/Korrekturen (TooWaBoo) RT 5.0 r1 +#42 13.05.2017 Erweiterung (TooWaBoo) RT 5.0 r1 +#43 21.07.2017 Erweiterung (TooWaBoo) RT 5.1 ABOUT_TAB_BUILD;Version ABOUT_TAB_CREDITS;Danksagungen @@ -64,8 +77,17 @@ CURVEEDITOR_TOOLTIPPASTE;Kurve aus Zwischenablage einfügen CURVEEDITOR_TOOLTIPSAVE;Kurve speichern CURVEEDITOR_TYPE;Typ: DIRBROWSER_FOLDERS;Ordner +DYNPROFILEEDITOR_DELETE;Löschen +DYNPROFILEEDITOR_EDIT;Ändern +DYNPROFILEEDITOR_EDIT_RULE;Profilregel ändern +DYNPROFILEEDITOR_ENTRY_TOOLTIP;Groß-/Kleinschreibung wird NICHT berücksichtigt.\nFür einen regulären Ausdruck benutzen Sie bitte\n"re:" als Prefix. +DYNPROFILEEDITOR_MOVE_DOWN;Runter +DYNPROFILEEDITOR_MOVE_UP;Hoch +DYNPROFILEEDITOR_NEW;Neu +DYNPROFILEEDITOR_NEW_RULE;Profilregel erstellen +DYNPROFILEEDITOR_PROFILE;Profil EDITWINDOW_TITLE;Bildbearbeitung -EDIT_OBJECT_TOOLTIP;Schaltet das Einstellungswerkzeug im Vorschaubild ein/aus +EDIT_OBJECT_TOOLTIP;Schaltet das Einstellungswerkzeug\nim Vorschaubild ein/aus EDIT_PIPETTE_TOOLTIP;Um einen Punkt der Kurve hinzuzufügen, halten Sie die Strg-Taste gedrückt und klicken mit der linke Maustaste auf die gewünschte Stelle in der Vorschau.\nUm den Punkt anzupassen, halten Sie die Strg-Taste gedrückt und klicken Sie mit der linken Maustaste auf den entsprechenden Bereich in der Vorschau. Dann lassen Sie die Strg-Taste los (es sei denn, Sie möchten eine Feineinstellung vornehmen) und bewegen die Maus bei gedrückter linker Maustaste nach oben oder unten, um den Punkt auf der Kurve zu bewegen. EXIFFILTER_APERTURE;Blende EXIFFILTER_CAMERA;Kamera @@ -90,13 +112,14 @@ EXIFPANEL_RESETALL;Alle zurücksetzen EXIFPANEL_RESETALLHINT;Alle Attribute auf die ursprünglichen Werte zurücksetzen EXIFPANEL_RESETHINT;Gewählte Attribute auf die ursprünglichen Werte zurücksetzen EXIFPANEL_SUBDIRECTORY;Unterverzeichnis +EXPORT_BYPASS;Verarbeitungsschritte überspringen EXPORT_BYPASS_ALL;Alle/Keine auswählen EXPORT_BYPASS_DEFRINGE;Farbsaum entfernen überspringen EXPORT_BYPASS_DIRPYRDENOISE;Rauschreduzierung überspringen EXPORT_BYPASS_DIRPYREQUALIZER;Detailebenenkontrast überspringen EXPORT_BYPASS_EQUALIZER;Waveletebenen überspringen EXPORT_BYPASS_RAW_CA;CA-Korrektur überspringen [RAW] -EXPORT_BYPASS_RAW_CCSTEPS;Falschfarbenunterdrückung überspringen\n[RAW] +EXPORT_BYPASS_RAW_CCSTEPS;Falschfarbenreduzierung überspringen\n[RAW] EXPORT_BYPASS_RAW_DCB_ENHANCE;DCB-Verbesserungsstufen überspringen\n[RAW] EXPORT_BYPASS_RAW_DCB_ITERATIONS;DCB-Interationen überspringen [RAW] EXPORT_BYPASS_RAW_DF;Dunkelbild überspringen [RAW] @@ -110,10 +133,14 @@ EXPORT_BYPASS_SHARPENMICRO;Mikrokontrast überspringen EXPORT_BYPASS_SH_HQ;Schatten/Lichter überspringen\n(Schärfemaske) EXPORT_FASTEXPORTOPTIONS;Schnell-Export - Einstellungen EXPORT_INSTRUCTIONS;Die Einstellungen zum schnellen Export\nerlauben es, zeit- und ressourcenintensive\nEntwicklungsschritte zu überspringen und dafür\ndie Warteschlangenverarbeitung mit\nschnellen Export-Einstellungen auszuführen.\nDieses Vorgehen wird zur schnelleren\nGenerierung von gering aufgelösten Bildern\nempfohlen, falls es auf die Geschwindigkeit\nankommt oder für ein oder mehrere Bilder\nandere Ausgabegrößen gewünscht werden,\nohne Änderungen an deren gespeicherten\nParameter vornehmen zu müssen. -EXPORT_MAXHEIGHT;Maximale Höhe: -EXPORT_MAXWIDTH;Maximale Breite: +EXPORT_MAXHEIGHT;Maximale Höhe: +EXPORT_MAXWIDTH;Maximale Breite: +EXPORT_PIPELINE;Verarbeitungspipeline EXPORT_PUTTOQUEUEFAST; Zur Warteschlange “Schneller Export“ hinzufügen EXPORT_RAW_DMETHOD;Demosaikmethode +EXPORT_USE_FAST_PIPELINE;Priorität Geschwindigkeit +EXPORT_USE_FAST_PIPELINE_TIP;Wendet alle Bearbeitungsschritte, im Gegensatz\nzu „Standard“ , auf das bereits skalierte Bild an.\nDadurch steigt die Verarbeitungsgeschwindigkeit\nauf Kosten der Qualität. +EXPORT_USE_NORMAL_PIPELINE;Standard EXTPROGTARGET_1;RAW EXTPROGTARGET_2;Stapelverarbeitung beendet FILEBROWSER_ADDDELTEMPLATE;Vorlagen hinzufügen/entfernen... @@ -136,7 +163,6 @@ FILEBROWSER_DELETEDLGMSG;Möchten Sie wirklich %1 Datei(en) unwiderruflich lösc FILEBROWSER_DELETEDLGMSGINCLPROC;Möchten Sie wirklich %1 Datei(en) unwiderruflich löschen, mit allen aus der Stapelverarbeitung resultierenden zugehörigen Ausgabedateien? FILEBROWSER_EMPTYTRASH;Papierkorb leeren FILEBROWSER_EMPTYTRASHHINT;Dateien endgültig aus Papierkorb löschen -FILEBROWSER_EXEC_CPB;Benutzerdef. Bildprofilgenerator ausführen FILEBROWSER_EXTPROGMENU;Öffnen mit FILEBROWSER_FLATFIELD;Weißbild FILEBROWSER_MOVETODARKFDIR;In Dunkelbild-Verzeichnis verschieben @@ -186,6 +212,7 @@ FILEBROWSER_RANK3_TOOLTIP;Bewertung 3 ***\nTaste: Umschalt + 3 FILEBROWSER_RANK4_TOOLTIP;Bewertung 4 ****\nTaste: Umschalt + 4 FILEBROWSER_RANK5_TOOLTIP;Bewertung 5 *****\nTaste: Umschalt + 5 FILEBROWSER_RENAMEDLGLABEL;Datei umbenennen +FILEBROWSER_RESETDEFAULTPROFILE;Profil auf Vorgabe zurücksetzen FILEBROWSER_SELECTDARKFRAME;Dunkelbild wählen... FILEBROWSER_SELECTFLATFIELD;Weißbild wählen... FILEBROWSER_SHOWCOLORLABEL1HINT;Nur rot markierte Bilder anzeigen\nTaste: Alt + 1 @@ -210,9 +237,9 @@ FILEBROWSER_SHOWTRASHHINT;Inhalt des Papierkorbs anzeigen\nTaste: Strg + FILEBROWSER_SHOWUNCOLORHINT;Nur unmarkierte Bilder anzeigen\nTaste: Alt + 0 FILEBROWSER_SHOWUNRANKHINT;Nur unbewertete Bilder anzeigen\nTaste: 0 FILEBROWSER_STARTPROCESSING;Verarbeitung starten -FILEBROWSER_STARTPROCESSINGHINT;Verarbeitung und Speichern der Bilder in der Warteschlange starten.\nTaste: Strg + s +FILEBROWSER_STARTPROCESSINGHINT;Verarbeitung und Speicherung der\nBilder starten.\nTaste: Strg + s FILEBROWSER_STOPPROCESSING;Verarbeitung stoppen -FILEBROWSER_STOPPROCESSINGHINT;Verarbeitung der Bilder stoppen\nTaste: Strg + s +FILEBROWSER_STOPPROCESSINGHINT;Verarbeitung der Bilder abbrechen.\nTaste: Strg + s FILEBROWSER_THUMBSIZE;Miniaturbildgröße FILEBROWSER_TOOLTIP_STOPPROCESSING;Bei neuem Job die Verarbeitung automatisch starten FILEBROWSER_UNRANK_TOOLTIP;Bewertung entfernen\nTaste: Umschalt + 0 @@ -237,7 +264,7 @@ GENERAL_DISABLE;Deaktivieren GENERAL_DISABLED;Deaktiviert GENERAL_ENABLE;Aktivieren GENERAL_ENABLED;Aktiviert -GENERAL_FILE;Datei: +GENERAL_FILE;Datei: GENERAL_LANDSCAPE;Quer GENERAL_NA;n/a GENERAL_NO;Nein @@ -249,16 +276,15 @@ GENERAL_SAVE;Speichern GENERAL_UNCHANGED;(Unverändert) GENERAL_WARNING;Warnung HISTOGRAM_TOOLTIP_B;Blau-Histogramm ein-/ausblenden -HISTOGRAM_TOOLTIP_BAR;RGB-Anzeigeleiste ein-/ausblenden\n\nZum Fixieren/Lösen der Anzeige muss mit der rechten Maustaste ins Bildfenster geklickt werden +HISTOGRAM_TOOLTIP_BAR;RGB-Anzeigeleiste ein-/ausblenden\n\nZum Fixieren/Lösen der Anzeige muss mit der\nrechten Maustaste ins Bildfenster geklickt werden. HISTOGRAM_TOOLTIP_CHRO;Chromatizität-Histogramm ein/ausblenden HISTOGRAM_TOOLTIP_FULL;Skaliertes Histogramm ein/ausschalten HISTOGRAM_TOOLTIP_G;Grün-Histogramm ein-/ausblenden HISTOGRAM_TOOLTIP_L;CIELab-Luminanz-Histogramm ein-/ausblenden HISTOGRAM_TOOLTIP_R;Rot-Histogramm ein-/ausblenden -HISTOGRAM_TOOLTIP_RAW;Zwischen normalen Histogrammen und\nRAW-Histogrammen umschalten +HISTOGRAM_TOOLTIP_RAW;Zwischen normalen Histogrammen und\nRAW-Histogrammen umschalten. HISTORY_CHANGED;Geändert HISTORY_CUSTOMCURVE;Benutzerdefiniert -HISTORY_DELSNAPSHOT;Entfernen HISTORY_FROMCLIPBOARD;Aus der Zwischenablage HISTORY_LABEL;Historie HISTORY_MSG_1;(Bild geladen) @@ -267,7 +293,7 @@ HISTORY_MSG_3;(Profil geändert) HISTORY_MSG_4;(Historie durchsuchen) HISTORY_MSG_5;(Belichtung) - Helligkeit HISTORY_MSG_6;(Belichtung) - Kontrast -HISTORY_MSG_7;(Belichtung) - Schwarzwert +HISTORY_MSG_7;(Belichtung)\nSchwarzwert HISTORY_MSG_8;(Belichtung)\nBelichtungskorrektur HISTORY_MSG_9;(Belichtung)\nLichterkompression HISTORY_MSG_10;(Belichtung)\nSchattenkompression @@ -283,7 +309,7 @@ HISTORY_MSG_19;(L*a*b*) - L-Kurve HISTORY_MSG_20;(Schärfung) HISTORY_MSG_21;(Schärfung) - USM\nRadius HISTORY_MSG_22;(Schärfung) - USM\nIntensität -HISTORY_MSG_23;(Schärfung) - USM\nSchwellenwert +HISTORY_MSG_23;(Schärfung) - USM\nSchwelle HISTORY_MSG_24;(Schärfung) - USM\nNur Kanten schärfen HISTORY_MSG_25;(Schärfung) - USM\nKantenschärfung\nRadius HISTORY_MSG_26;(Schärfung) - USM\nKantenschärfung\nKantentoleranz @@ -348,7 +374,7 @@ HISTORY_MSG_84;(Objektivkorrektur)\nPerspektive HISTORY_MSG_85;(Objektivkorrektur)\nProfil HISTORY_MSG_86;(RGB-Kurven)\nHelligkeitsmodus HISTORY_MSG_87;(Impulsrauschred.) -HISTORY_MSG_88;(Impulsrauschred.)\nSchwellenwert +HISTORY_MSG_88;(Impulsrauschred.)\nSchwelle HISTORY_MSG_89;(Rauschreduzierung) HISTORY_MSG_90;(Rauschreduzierung)\nLuminanz HISTORY_MSG_91;(Rauschreduzierung)\nChrominanz (Master) @@ -367,21 +393,21 @@ HISTORY_MSG_103;(HSV) - Dynamik (V) HISTORY_MSG_104;(HSV) HISTORY_MSG_105;(Farbsaum entfernen) HISTORY_MSG_106;(Farbsaum entfernen)\nRadius -HISTORY_MSG_107;(Farbsaum entfernen)\nSchwellenwert -HISTORY_MSG_108;(Belichtung)\nLichterkompression\nSchwellenwert +HISTORY_MSG_107;(Farbsaum entfernen)\nSchwelle +HISTORY_MSG_108;(Belichtung)\nLichterkompression\nSchwelle HISTORY_MSG_109;(Skalieren) - Begrenzungsrahmen HISTORY_MSG_110;(Skalieren) - Anwenden auf: HISTORY_MSG_111;(L*a*b*) - Farbverschiebung\nvermeiden HISTORY_MSG_112;--unused-- HISTORY_MSG_113;(L*a*b*) - Hautfarbtöne\nschützen -HISTORY_MSG_114;(Sensor Bayer-Matrix)\nFarbinterpolation\nDCB-Iterationen -HISTORY_MSG_115;(Sensor-Matrix)\nFarbinterpolation\nFalschfarbenunterdrückung -HISTORY_MSG_116;(Sensor Bayer-Matrix)\nFarbinterpolation\nDCB-Verbesserung -HISTORY_MSG_117;(Sensor Bayer-Matrix)\nChromatische Aberration\nRot -HISTORY_MSG_118;(Sensor Bayer-Matrix)\nChromatische Aberration\nBlau -HISTORY_MSG_119;(Sensor Bayer-Matrix)\nVorverarbeitung\nZeilenrauschfilter -HISTORY_MSG_120;(Sensor Bayer-Matrix)\nVorverarbeitung\nGrün-Ausgleich -HISTORY_MSG_121;(Sensor Bayer-Matrix)\nChromatische Aberration\nAutomatische Korrektur +HISTORY_MSG_114;(Sensor-Matrix)\nFarbinterpolation\nDCB-Iterationen +HISTORY_MSG_115;(Sensor-Matrix)\nFarbinterpolation\nFalschfarbenreduzierung +HISTORY_MSG_116;(Sensor-Matrix)\nFarbinterpolation\nDCB-Verbesserung +HISTORY_MSG_117;(Sensor-Matrix)\nChromatische Aberration\nRot +HISTORY_MSG_118;(Sensor-Matrix)\nChromatische Aberration\nBlau +HISTORY_MSG_119;(Sensor-Matrix)\nVorverarbeitung\nZeilenrauschfilter +HISTORY_MSG_120;(Sensor-Matrix)\nVorverarbeitung\nGrün-Ausgleich +HISTORY_MSG_121;(Sensor-Matrix)\nChromatische Aberration\nAutomatische Korrektur HISTORY_MSG_122;(Dunkelbild)\nAutomatische Auswahl HISTORY_MSG_123;(Dunkelbild) - Datei HISTORY_MSG_124;(Weißpunkt)\nKorrekturfaktor @@ -397,11 +423,11 @@ HISTORY_MSG_133;(Farbmanagement)\nAusgabeprofil\nAusgabe-Gamma HISTORY_MSG_134;(Farbmanagement)\nAusgabeprofil\nGamma HISTORY_MSG_135;(Farbmanagement)\nAusgabeprofil\nFreies Gamma HISTORY_MSG_136;(Farbmanagement)\nAusgabeprofil\nGradient (linear) -HISTORY_MSG_137;(Sensor Bayer-Matrix)\nSchwarzpunkt - Grün 1 -HISTORY_MSG_138;(Sensor Bayer-Matrix)\nSchwarzpunkt - Rot -HISTORY_MSG_139;(Sensor Bayer-Matrix)\nSchwarzpunkt - Blau -HISTORY_MSG_140;(Sensor Bayer-Matrix)\nSchwarzpunkt - Grün 2 -HISTORY_MSG_141;(Sensor Bayer-Matrix)\nSchwarzpunkt\nGrün-Werte angleichen +HISTORY_MSG_137;(Sensor-Matrix)\nSchwarzpunkt - Grün 1 +HISTORY_MSG_138;(Sensor-Matrix)\nSchwarzpunkt - Rot +HISTORY_MSG_139;(Sensor-Matrix)\nSchwarzpunkt - Blau +HISTORY_MSG_140;(Sensor-Matrix)\nSchwarzpunkt - Grün 2 +HISTORY_MSG_141;(Sensor-Matrix)\nSchwarzpunkt\nGrün-Werte angleichen HISTORY_MSG_142;(Kantenschärfung)\nIterationen HISTORY_MSG_143;(Kantenschärfung)\nIntensität HISTORY_MSG_144;(Mikrokontrast)\nIntensität @@ -417,7 +443,7 @@ HISTORY_MSG_153;(Dynamik)\nGesättigte Töne HISTORY_MSG_154;(Dynamik)\nHautfarbtöne schützen HISTORY_MSG_155;(Dynamik)\nFarbverschiebungen\nvermeiden HISTORY_MSG_156;(Dynamik)\nPastell und gesättigte\nTöne koppeln -HISTORY_MSG_157;(Dynamik)\nPastell/gesättigte Töne\nSchwellenwert +HISTORY_MSG_157;(Dynamik)\nPastell/gesättigte Töne\nSchwelle HISTORY_MSG_158;(Dynamikkompression)\nIntensität HISTORY_MSG_159;(Dynamikkompression)\nKantenschutz HISTORY_MSG_160;(Dynamikkompression)\nFaktor @@ -461,14 +487,14 @@ HISTORY_MSG_197;(CIECAM02) - Farbkurve HISTORY_MSG_198;(CIECAM02) - Farbkurve\nModus HISTORY_MSG_199;(CIECAM02) - Ausgabe-\nHistogramm anzeigen HISTORY_MSG_200;(CIECAM02)\nDynamikkompression -HISTORY_MSG_201;(Rauschreduzierung)\nDelta-Chrominanz\nRot/Grün -HISTORY_MSG_202;(Rauschreduzierung)\nDelta-Chrominanz\nBlau/Gelb +HISTORY_MSG_201;(Rauschreduzierung)\nDelta-Chrominanz\nRot / Grün +HISTORY_MSG_202;(Rauschreduzierung)\nDelta-Chrominanz\nBlau / Gelb HISTORY_MSG_203;(Rauschreduzierung)\nMethode -HISTORY_MSG_204;(Sensor Bayer-Matrix)\nFarbinterpolation\nLMMSE-Verbesserung -HISTORY_MSG_205;(CIECAM02)\nBetrachtungsbed.\nHot/Bad-Pixelfilter +HISTORY_MSG_204;(Sensor-Matrix)\nFarbinterpolation\nLMMSE-Verbesserung +HISTORY_MSG_205;(CIECAM02)\nBetrachtungsbed.\nHot / Bad-Pixelfilter HISTORY_MSG_206;(CIECAM02) - Szene\nAuto-Leuchtstärke HISTORY_MSG_207;(Farbsaum entfernen)\nFarbtonkurve -HISTORY_MSG_208;(Weißabgleich)\nBlau/Rot-Korrektur +HISTORY_MSG_208;(Weißabgleich)\nBlau / Rot-Korrektur HISTORY_MSG_210;(Grauverlaufsfilter)\nRotationswinkel HISTORY_MSG_211;(Grauverlaufsfilter) HISTORY_MSG_212;(Vignettierungsfilter)\nIntensität @@ -508,7 +534,7 @@ HISTORY_MSG_245;(Objektivkorrektur)\nVignettierung - Zentrum HISTORY_MSG_246;(L*a*b*) - CL-Kurve HISTORY_MSG_247;(L*a*b*) - LH-Kurve HISTORY_MSG_248;(L*a*b*) - HH-Kurve -HISTORY_MSG_249;(Detailebenenkontrast)\nSchwellenwert +HISTORY_MSG_249;(Detailebenenkontrast)\nSchwelle HISTORY_MSG_250;(Rauschreduzierung)\nVerbesserung HISTORY_MSG_251;(Schwarz/Weiß)\nAlgorithmus HISTORY_MSG_252;(Detailebenenkontrast)\nHautfarbtöne schützen @@ -522,15 +548,15 @@ HISTORY_MSG_259;(Farbanpassungen)\nDeckkraftkurve HISTORY_MSG_260;(Farbanpassungen)\na*[b*]-Transparenz HISTORY_MSG_261;(Farbanpassungen)\nMethode HISTORY_MSG_262;(Farbanpassungen)\nb*-Transparenz -HISTORY_MSG_263;(Farbanpassungen)\nSchatten - Blau/Rot -HISTORY_MSG_264;(Farbanpassungen)\nSchatten - Cyan/Grün -HISTORY_MSG_265;(Farbanpassungen)\nSchatten - Gelb/Blau -HISTORY_MSG_266;(Farbanpassungen)\nMitten - Blau/Rot -HISTORY_MSG_267;(Farbanpassungen)\nMitten - Cyan/Grün -HISTORY_MSG_268;(Farbanpassungen)\nMitten - Gelb/Blau -HISTORY_MSG_269;(Farbanpassungen)\nLichter - Blau/Rot -HISTORY_MSG_270;(Farbanpassungen)\nLichter - Cyan/Grün -HISTORY_MSG_271;(Farbanpassungen)\nLichter - Gelb/Blau +HISTORY_MSG_263;(Farbanpassungen)\nSchatten - Blau / Rot +HISTORY_MSG_264;(Farbanpassungen)\nSchatten - Cyan / Grün +HISTORY_MSG_265;(Farbanpassungen)\nSchatten - Gelb / Blau +HISTORY_MSG_266;(Farbanpassungen)\nMitten - Blau / Rot +HISTORY_MSG_267;(Farbanpassungen)\nMitten - Cyan / Grün +HISTORY_MSG_268;(Farbanpassungen)\nMitten - Gelb / Blau +HISTORY_MSG_269;(Farbanpassungen)\nLichter - Blau / Rot +HISTORY_MSG_270;(Farbanpassungen)\nLichter - Cyan / Grün +HISTORY_MSG_271;(Farbanpassungen)\nLichter - Gelb / Blau HISTORY_MSG_272;(Farbanpassungen)\nFarbausgleich HISTORY_MSG_273;(Farbanpassungen)\nZurücksetzen HISTORY_MSG_274;(Farbanpassungen)\nSättigung Schatten @@ -541,7 +567,7 @@ HISTORY_MSG_278;(Farbanpassungen)\nLuminanz schützen HISTORY_MSG_279;(Farbanpassungen)\nSchatten HISTORY_MSG_280;(Farbanpassungen)\nLichter HISTORY_MSG_281;(Farbanpassungen)\nSättigung schützen\nIntensität -HISTORY_MSG_282;(Farbanpassungen)\nSättigung schützen\nSchwellenwert +HISTORY_MSG_282;(Farbanpassungen)\nSättigung schützen\nSchwelle HISTORY_MSG_283;(Farbanpassungen)\nIntensität HISTORY_MSG_284;(Farbanpassungen)\nSättigung schützen\nAutomatisch HISTORY_MSG_285;(Rauschreduzierung)\nMedianmethode @@ -549,9 +575,9 @@ HISTORY_MSG_286;(Rauschreduzierung)\nMediantyp HISTORY_MSG_287;(Rauschreduzierung)\nMedianiterationen HISTORY_MSG_288;(Weißbild)\nKontrolle zu heller Bereiche HISTORY_MSG_289;(Weißbild)\nAuto-Kontrolle zu\nheller Bereiche -HISTORY_MSG_290;(Sensor X-Trans-Matrix)\nSchwarzpunkt - Rot -HISTORY_MSG_291;(Sensor X-Trans-Matrix)\nSchwarzpunkt - Grün -HISTORY_MSG_292;(Sensor X-Trans-Matrix)\nSchwarzpunkt - Blau +HISTORY_MSG_290;(Sensor-Matrix)\nSchwarzpunkt - Rot +HISTORY_MSG_291;(Sensor-Matrix)\nSchwarzpunkt - Grün +HISTORY_MSG_292;(Sensor-Matrix)\nSchwarzpunkt - Blau HISTORY_MSG_293;(Filmsimulation) HISTORY_MSG_294;(Filmsimulation)\nIntensität HISTORY_MSG_295;(Filmsimulation) - Film @@ -571,7 +597,7 @@ HISTORY_MSG_308;(Wavelet) - Einstellungen\nVerarbeitungsrichtung HISTORY_MSG_309;(Wavelet)\nKantenschärfung\nDetails HISTORY_MSG_310;(Wavelet) - Restbild\nHimmelsfarbtöne\nschützen HISTORY_MSG_311;(Wavelet) - Einstellungen\nAnzahl der Ebenen -HISTORY_MSG_312;(Wavelet) - Restbild\nSchatten Schwellenwert +HISTORY_MSG_312;(Wavelet) - Restbild\nSchatten Schwelle HISTORY_MSG_313;(Wavelet) - Farbe\nEbenengrenze HISTORY_MSG_314;(Wavelet) - Gamut\nArtefakte reduzieren HISTORY_MSG_315;(Wavelet) - Restbild\nKontrast @@ -588,14 +614,14 @@ HISTORY_MSG_325;(Wavelet) - Farbe\nGesättigte Farben HISTORY_MSG_326;(Wavelet) - Farbe\nChrominanzethode HISTORY_MSG_327;(Wavelet) - Kontrast\nAnwenden auf HISTORY_MSG_328;(Wavelet) - Farbe\nFarb-Kontrast-\nVerknüpfung -HISTORY_MSG_329;(Wavelet) - Tönung\nDeckkraft Rot/Grün -HISTORY_MSG_330;(Wavelet) - Tönung\nDeckkraft Blau/Gelb +HISTORY_MSG_329;(Wavelet) - Tönung\nDeckkraft Rot / Grün +HISTORY_MSG_330;(Wavelet) - Tönung\nDeckkraft Blau / Gelb HISTORY_MSG_331;(Wavelet)\nKontrastebenen\nExtra HISTORY_MSG_332;(Wavelet)- -Einstellungen\nKachelgröße HISTORY_MSG_333;(Wavelet) - Restbild\nSchatten HISTORY_MSG_334;(Wavelet) - Restbild\nBuntheit HISTORY_MSG_335;(Wavelet) - Restbild\nLichter -HISTORY_MSG_336;(Wavelet) - Restbild\nLichter Schwellenwert +HISTORY_MSG_336;(Wavelet) - Restbild\nLichter Schwelle HISTORY_MSG_337;(Wavelet) - Restbild\nHimmelsfarbton HISTORY_MSG_338;(Wavelet)\nKantenschärfung\nRadius HISTORY_MSG_339;(Wavelet)\nKantenschärfung\nIntensität @@ -614,11 +640,11 @@ HISTORY_MSG_351;(Wavelet) - Restbild\nHH-Kurve HISTORY_MSG_352;(Wavelet) - Einstellungen\nHintergrund HISTORY_MSG_353;(Wavelet)\nKantenschärfung\nGradientenempfindlichkeit HISTORY_MSG_354;(Wavelet)\nKantenschärfung\nErweiterter Algorithmus -HISTORY_MSG_355;(Wavelet)\nKantenschärfung\nSchwellenwert niedrig -HISTORY_MSG_356;(Wavelet)\nKantenschärfung\nSchwellenwert hoch +HISTORY_MSG_355;(Wavelet)\nKantenschärfung\nSchwelle niedrig +HISTORY_MSG_356;(Wavelet)\nKantenschärfung\nSchwelle hoch HISTORY_MSG_357;(Wavelet)\nRauschreduzierung\nSchärfung verknüpfen HISTORY_MSG_358;(Wavelet) - Gamut\nKontrastkurve -HISTORY_MSG_359;(Vorverarbeitung)\nHot/Dead-Pixel-Filter\nSchwellenwert +HISTORY_MSG_359;(Vorverarbeitung)\nHot / Dead-Pixel-Filter\nSchwelle HISTORY_MSG_360;(Dynamikkompression)\nGamma HISTORY_MSG_361;(Wavelet) - Endretusche\nFarbausgleich HISTORY_MSG_362;(Wavelet) - Restbild\nKompression @@ -633,7 +659,7 @@ HISTORY_MSG_370;(Wavelet) - Endretusche\nLokale Kontrastkurve HISTORY_MSG_371;(Skalieren) - Schärfen HISTORY_MSG_372;(Skalieren) - Schärfen\nUSM - Radius HISTORY_MSG_373;(Skalieren) - Schärfen\nUSM - Intensität -HISTORY_MSG_374;(Skalieren) - Schärfen\nUSM - Schwellenwert +HISTORY_MSG_374;(Skalieren) - Schärfen\nUSM - Schwelle HISTORY_MSG_375;(Skalieren) - Schärfen\nUSM - Nur Kanten\nschärfen HISTORY_MSG_376;(Skalieren) - Schärfen\nUSM - Kantenschärfung\nRadius HISTORY_MSG_377;(Skalieren) - Schärfen\nUSM - Kantentoleranz @@ -645,12 +671,12 @@ HISTORY_MSG_382;(Skalieren) - Schärfen\nRLD - Intensität HISTORY_MSG_383;(Skalieren) - Schärfen\nRLD - Dämpfung HISTORY_MSG_384;(Skalieren) - Schärfen\nRLD - Iterationen HISTORY_MSG_385;(Wavelet) - Restbild\nFarbausgleich -HISTORY_MSG_386;(Wavelet) - Restbild\nFarbausgleich\nLichter Grün/Cyan -HISTORY_MSG_387;(Wavelet) - Restbild\nFarbausgleich\nLichter Blau/Gelb -HISTORY_MSG_388;(Wavelet) - Restbild\nFarbausgleich\nMitten Grün/Cyan -HISTORY_MSG_389;(Wavelet) - Restbild\nFarbausgleich\nMitten Blau/Gelb -HISTORY_MSG_390;(Wavelet) - Restbild\nFarbausgleich\nSchatten Grün/Cyan -HISTORY_MSG_391;(Wavelet) - Restbild\nFarbausgleich\nSchatten Blau/Gelb +HISTORY_MSG_386;(Wavelet) - Restbild\nFarbausgleich\nLichter Grün / Cyan +HISTORY_MSG_387;(Wavelet) - Restbild\nFarbausgleich\nLichter Blau / Gelb +HISTORY_MSG_388;(Wavelet) - Restbild\nFarbausgleich\nMitten Grün / Cyan +HISTORY_MSG_389;(Wavelet) - Restbild\nFarbausgleich\nMitten Blau / Gelb +HISTORY_MSG_390;(Wavelet) - Restbild\nFarbausgleich\nSchatten Grün / Cyan +HISTORY_MSG_391;(Wavelet) - Restbild\nFarbausgleich\nSchatten Blau / Gelb HISTORY_MSG_392;(Wavelet) - Restbild\nFarbausgleich HISTORY_MSG_393;(Farbmanagement)\nEingangsfarbprofil\nDCP - Look-Tabelle HISTORY_MSG_394;(Farbmanagement)\nEingangsfarbprofil\nDCP - Basisbelichtung @@ -677,13 +703,13 @@ HISTORY_MSG_414;(Retinex) - Einstellungen\nKorrekturen\nLuminanz(L) - L*a*b* HISTORY_MSG_415;(Retinex) - Einstellungen\nTransmission\nTransmissionskurve HISTORY_MSG_416;(Retinex) HISTORY_MSG_417;(Retinex) - Einstellungen\nTransmission\nMedianfilter -HISTORY_MSG_418;(Retinex) - Einstellungen\nTransmission\nSchwellenwert +HISTORY_MSG_418;(Retinex) - Einstellungen\nTransmission\nSchwelle HISTORY_MSG_419;(Retinex) - Farbraum HISTORY_MSG_420;(Retinex) - Einstellungen\nHSL-Kurve HISTORY_MSG_421;(Retinex) - Einstellungen\nKorrekturen\nGammakorrektur HISTORY_MSG_422;(Retinex) - Einstellungen\nGamma HISTORY_MSG_423;(Retinex) - Einstellungen\nGammasteigung -HISTORY_MSG_424;(Retinex) - Einstellungen\nHL-Schwellenwert +HISTORY_MSG_424;(Retinex) - Einstellungen\nHL-Schwelle HISTORY_MSG_425;(Retinex) - Einstellungen\nBasis-Logarithmus HISTORY_MSG_426;(Retinex) - Einstellungen\nKorrekturen - Farbton (H) HISTORY_MSG_427;Ausgabe-Rendering-Intent @@ -702,57 +728,91 @@ HISTORY_MSG_439;(Retinex) - Vorschau HISTORY_MSG_440;(Detailebenenkontrast)\nProzessreihenfolge HISTORY_MSG_441;(Retinex) - Einstellungen\nVerstärkung und Ausgleich\nTransmissionsverstärkung HISTORY_MSG_442;(Retinex) - Einstellungen\nTransmission - Skalierung +HISTORY_MSG_443;(Farbmanagement)\nAusgabeprofil\nSchwarzpunkt-Kompensation +HISTORY_MSG_444;(Weißabgleich)\nAWB-Temperatur-Korrektur +HISTORY_MSG_445;(Sensor-Matrix)\nFarbinterpolation\nUnterbild +HISTORY_MSG_446;EvPixelShiftMotion +HISTORY_MSG_447;EvPixelShiftMotionCorrection +HISTORY_MSG_448;EvPixelShiftStddevFactorGreen +HISTORY_MSG_449;(Sensor-Matrix)\nFarbinterpolation\nISO-Anpassung +HISTORY_MSG_450;EvPixelShiftNreadIso +HISTORY_MSG_451;EvPixelShiftPrnu +HISTORY_MSG_452;(Sensor-Matrix)\nFarbinterpolation\nBewegungsmaske\nanzeigen +HISTORY_MSG_453;(Sensor-Matrix)\nFarbinterpolation\nNur Maske anzeigen +HISTORY_MSG_454;EvPixelShiftAutomatic +HISTORY_MSG_455;EvPixelShiftNonGreenHorizontal +HISTORY_MSG_456;EvPixelShiftNonGreenVertical +HISTORY_MSG_457;(Sensor-Matrix)\nFarbinterpolation\nBewegung im Rot/Blau-\nKanal erkennen +HISTORY_MSG_458;EvPixelShiftStddevFactorRed +HISTORY_MSG_459;EvPixelShiftStddevFactorBlue +HISTORY_MSG_460;EvPixelShiftGreenAmaze +HISTORY_MSG_461;EvPixelShiftNonGreenAmaze +HISTORY_MSG_462;(Sensor-Matrix)\nFarbinterpolation\nBewegung im Grün-\nKanal erkennen +HISTORY_MSG_463;EvPixelShiftRedBlueWeight +HISTORY_MSG_464;(Sensor-Matrix)\nFarbinterpolation\nUnschärfebewegungsmaske +HISTORY_MSG_465;(Sensor-Matrix)\nFarbinterpolation\nUnschärferadius +HISTORY_MSG_466;EvPixelShiftSum +HISTORY_MSG_467;EvPixelShiftExp0 +HISTORY_MSG_468;(Sensor-Matrix)\nFarbinterpolation\nLücken in der Bewegungs-\nmaske erkennen +HISTORY_MSG_469;(Sensor-Matrix)\nFarbinterpolation\nMedian +HISTORY_MSG_470;EvPixelShiftMedian3 +HISTORY_MSG_471;(Sensor-Matrix)\nFarbinterpolation\nBewegungskorrektur +HISTORY_MSG_472;(Sensor-Matrix)\nFarbinterpolation\nWeicher Übergang +HISTORY_MSG_473;(Sensor-Matrix)\nFarbinterpolation\nLMMSE für Bewegungs-\nteile verwenden +HISTORY_MSG_474;(Sensor-Matrix)\nFarbinterpolation\nFrame-Helligkeit angleichen +HISTORY_MSG_475;(Sensor-Matrix)\nFarbinterpolation)\nAusgleich pro Kanal HISTORY_NEWSNAPSHOT;Hinzufügen HISTORY_NEWSNAPSHOT_TOOLTIP;Taste: Alt + s HISTORY_SNAPSHOT;Schnappschuss HISTORY_SNAPSHOTS;Schnappschüsse -IPTCPANEL_AUTHOR;Autor -IPTCPANEL_AUTHORSPOSITION;Position des\nAutors -IPTCPANEL_AUTHORSPOSITIONHINT;Titel des Autors oder der Autoren (By-line Title) -IPTCPANEL_CAPTION;Bildbeschreibung -IPTCPANEL_CAPTIONHINT;Beschreibung des Bildinhaltes (Caption - Abstract) -IPTCPANEL_CAPTIONWRITER;Autor der\nBildbeschreibung -IPTCPANEL_CAPTIONWRITERHINT;Name der Person die beim Bild mitgewirkt hat (Writer - Editor) IPTCPANEL_CATEGORY;Kategorie -IPTCPANEL_CATEGORYHINT;3-stelliger Code, der die Kategorie des Bildes beschreibt (Category). +IPTCPANEL_CATEGORYHINT;Beschreibt das Thema des Bildes nach\nMeinung des Anbieters. IPTCPANEL_CITY;Stadt -IPTCPANEL_CITYHINT;Aufnahmeort: Stadt (City) -IPTCPANEL_COPYHINT;IPTC-Werte in die Zwischenablage kopieren -IPTCPANEL_COPYRIGHT;Copyright -IPTCPANEL_COPYRIGHTHINT;Urheberrechtshinweis (Copyright Notice) +IPTCPANEL_CITYHINT;Tragen Sie den Namen der Stadt ein, in dem\ndieses Bild aufgenommen wurde. +IPTCPANEL_COPYHINT;IPTC-Werte in die Zwischenablage kopieren. +IPTCPANEL_COPYRIGHT;Urheberrechtsvermerk +IPTCPANEL_COPYRIGHTHINT;Enthält jeglichen notwendigen Urheberrechtsvermerk wie\nz.B. © Copyright 2014 Erika Mustermann, all rights reserved. IPTCPANEL_COUNTRY;Land -IPTCPANEL_COUNTRYHINT;Aufnahmeort: Land (Country - Primary Location Name) -IPTCPANEL_CREDIT;Bildrechte -IPTCPANEL_CREDITHINT;Identifiziert den Anbieter des Bildes, es muss nicht der Eigentümer sein (Credit) -IPTCPANEL_DATECREATED;Erstellt am -IPTCPANEL_DATECREATEDHINT;Erstellungsdatum des Bildes\nFormat: JJJJMMTT +IPTCPANEL_COUNTRYHINT;Tragen Sie den Namen des Landes ein, in dem\ndieses Bild aufgenommen wurde. +IPTCPANEL_CREATOR;Ersteller +IPTCPANEL_CREATORHINT;Tragen Sie den Namen der Person ein,\ndie dieses Bild erstellt hat. +IPTCPANEL_CREATORJOBTITLE;Berufsbezeichnung des Erstellers +IPTCPANEL_CREATORJOBTITLEHINT;Geben Sie die Berufsbezeichnung der Person ein,\ndie im Feld Ersteller aufgeführt ist. +IPTCPANEL_CREDIT;Danksagung +IPTCPANEL_CREDITHINT;Geben Sie ein, wer aufgeführt werden muss,\nwenn das Bild veröffentlicht wird. +IPTCPANEL_DATECREATED;Erstellungsdatum +IPTCPANEL_DATECREATEDHINT;Geben Sie das Erstellungdatum des Bildes ein. +IPTCPANEL_DESCRIPTION;Beschreibung +IPTCPANEL_DESCRIPTIONHINT;Beschreiben Sie kurz "Wer", "Was" und "Warum",\nwas passiert in dem Bild und welche Rolle\nspielen die dargestellten Personen. +IPTCPANEL_DESCRIPTIONWRITER;Verfasser der Beschreibung +IPTCPANEL_DESCRIPTIONWRITERHINT;Tragen Sie den Namen der Person ein, die beim\nSchreiben, Ändern oder Korrigieren der Bildbe-\nschreibung involviert war. IPTCPANEL_EMBEDDED;Eingebettet IPTCPANEL_EMBEDDEDHINT;Setzt auf die im Bild eingebetteten IPTC-Daten zurück. -IPTCPANEL_HEADLINE;Bildtitel -IPTCPANEL_HEADLINEHINT;Eine Beschreibung über den Inhalt des Bildes. Kann auch als Überschrift dienen. -IPTCPANEL_INSTRUCTIONS;Hinweise -IPTCPANEL_INSTRUCTIONSHINT;Besondere Hinweise bezüglich der Nutzung des Bildes (Special Instructions) -IPTCPANEL_KEYWORDS;Schlagwörter -IPTCPANEL_KEYWORDSHINT;Stichwörter für das spätere Wiederfinden der Bilder (Keywords) +IPTCPANEL_HEADLINE;Überschrift +IPTCPANEL_HEADLINEHINT;Tragen Sie eine kurze veröffentlichbare\nSynopsis, oder eine Zusammenfassung\ndes Bildinhalts ein. +IPTCPANEL_INSTRUCTIONS;Anweisungen +IPTCPANEL_INSTRUCTIONSHINT;Geben Sie weitere redaktionelle Anweisungen bezüglich\ndes Gebrauchs des Bildes ein, wie z. B. Sperrfristen,\nNutzungsbeschränkungen oder Warnungen, die nicht\nschon im Urheberrechtsvermerk aufgeführt sind. +IPTCPANEL_KEYWORDS;Stichwörter +IPTCPANEL_KEYWORDSHINT;Geben Sie beliebig viele Schlüsselwörter\nvon Ausdrücken oder Phrasen ein, um das\nThema des Bildes zu beschreiben. IPTCPANEL_PASTEHINT;IPTC-Werte aus der Zwischenablage einfügen -IPTCPANEL_PROVINCE;Provinz -IPTCPANEL_PROVINCEHINT;Aufnahmeort: Provinz (Province-State) +IPTCPANEL_PROVINCE;Bundesland / Kanton +IPTCPANEL_PROVINCEHINT;Tragen Sie den Namen des Bundeslandes / Kanton\nein, in dem dieses Bild aufgenommen wurde. IPTCPANEL_RESET;Zurücksetzen IPTCPANEL_RESETHINT;Auf die im Profil gespeicherten Werte zurücksetzen IPTCPANEL_SOURCE;Quelle -IPTCPANEL_SOURCEHINT;Der ursprüngliche Eigentümer des Bildes (Source) -IPTCPANEL_SUPPCATEGORIES;Zusätzliche\nKategorien -IPTCPANEL_SUPPCATEGORIESHINT;Zusätzliche wählbare Bildoptimierungen +IPTCPANEL_SOURCEHINT;Tragen Sie den Namen einer Person oder einer\nFirma ein, von der Sie das Bild erhalten haben\nund die eine wesentliche Rolle in der Lieferkette\nspielt. +IPTCPANEL_SUPPCATEGORIES;Weitere Kategorien +IPTCPANEL_SUPPCATEGORIESHINT;Weitere Kategorien um das Thema\ndes Bildes genauer zu spezifizieren. IPTCPANEL_TITLE;Titel -IPTCPANEL_TITLEHINT;Kurztitel des Bildes (Object Name) -IPTCPANEL_TRANSREFERENCE;Übertragungs-\nreferenz -IPTCPANEL_TRANSREFERENCEHINT;Ein Code, der den ursprünglichen Ort der Übertragung definiert (Original Transmission Reference) +IPTCPANEL_TITLEHINT;Geben Sie einen kurzen lesbaren Namen\nfür das Bild ein, z.B. den Dateinamen. +IPTCPANEL_TRANSREFERENCE;Verarbeitungs-ID +IPTCPANEL_TRANSREFERENCEHINT;Geben Sie eine Kennung zur Kontrolle oder\nVerfolgung des Arbeitsablaufes ein. MAIN_BUTTON_FULLSCREEN;Vollbild\nTaste: F11 -MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigiert zum nächsten Miniaturbild in der Dateiverwaltung oder Filmstreifen bezogen auf das ausgewählte Miniaturbild.\nTaste: F4\n\nNavigiert zum nächsten Miniaturbild in der Dateiverwaltung oder Filmstreifen bezogen auf auf das im Editor geöffnete Bild.\nTaste: Umschalt + F4 -MAIN_BUTTON_NAVPREV_TOOLTIP;Navigiert zum vorherigen Miniaturbild in der Dateiverwaltung oder Filmstreifen bezogen auf das ausgewählte Miniaturbild.\nTaste: F3\n\nNavigiert zum vorherigen Miniaturbild in der Dateiverwaltung oder Filmstreifen bezogen auf auf das im Editor geöffnete Bild.\nTaste: Umschalt + F3 -MAIN_BUTTON_NAVSYNC_TOOLTIP;Selektiert das Miniaturbild des aktuell geöffneten Bildes in der Dateiverwaltung und des Filmstreifens. Es werden alle aktiven Filter gelöscht.\nTaste: x\n\nWie oben, jedoch ohne Löschung aktiver Filter. Das Miniaturbild des geöffneten Bildes wird nicht angezeigt, wenn es herausgefiltert wurde.\nTaste: y +MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigiert zum nächsten Miniaturbild in der\nDateiverwaltung oder Filmstreifen bezogen\nauf das ausgewählte Miniaturbild.\nTaste: F4\n\nNavigiert zum nächsten Miniaturbild in der\nDateiverwaltung oder Filmstreifen bezogen\nauf auf das im Editor geöffnete Bild.\nTaste: Umschalt + F4 +MAIN_BUTTON_NAVPREV_TOOLTIP;Navigiert zum vorherigen Miniaturbild in der\nDateiverwaltung oder Filmstreifen bezogen\nauf das ausgewählte Miniaturbild.\nTaste: F3\n\nNavigiert zum vorherigen Miniaturbild in der\nDateiverwaltung oder Filmstreifen bezogen\nauf auf das im Editor geöffnete Bild.\nTaste: Umschalt + F3 +MAIN_BUTTON_NAVSYNC_TOOLTIP;Selektiert das Miniaturbild des aktuell geöffneten\nBildes in der Dateiverwaltung und des Filmstreifens.\nEs werden alle aktiven Filter gelöscht.\nTaste: x\n\nWie oben, jedoch ohne Löschung aktiver Filter. Das\nMiniaturbild des geöffneten Bildes wird nicht angezeigt,\nwenn es herausgefiltert wurde.\nTaste: y MAIN_BUTTON_PREFERENCES;Einstellungen -MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;Bild in Warteschlange hinzufügen\nTaste: Strg + b +MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;Bild zur Warteschlange hinzufügen\nTaste: Strg + b MAIN_BUTTON_SAVE_TOOLTIP;Bild speichern\nTaste: Strg + s MAIN_BUTTON_SENDTOEDITOR;Bild im externen Editor öffnen MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Bild im externen Editor öffnen\nTaste: Strg + e @@ -780,18 +840,19 @@ MAIN_MSG_OPERATIONCANCELLED;Ausführung abgebrochen MAIN_MSG_PATHDOESNTEXIST;Der Pfad\n\n%1\n\nexistiert nicht. Bitte setzen Sie den richtigen Pfad in den Einstellungen. MAIN_MSG_QOVERWRITE;Möchten Sie die Datei überschreiben? MAIN_MSG_SETPATHFIRST;Um diese Funktion zu nutzen, müssen Sie zuerst in den Einstellungen einen Zielpfad setzen. +MAIN_MSG_TOOMANYOPENEDITORS;Zu viele geöffnete Editorfenster.\nUm fortzufahren, schließen sie bitte ein Editorfenster. MAIN_MSG_WRITEFAILED;Fehler beim Schreiben von\n\n"%1"\n\nStellen Sie sicher, dass das Verzeichnis existiert und dass Sie Schreibrechte besitzen. MAIN_TAB_COLOR;Farbe MAIN_TAB_COLOR_TOOLTIP;Taste: Alt + c MAIN_TAB_DETAIL;Details MAIN_TAB_DETAIL_TOOLTIP;Taste: Alt + d -MAIN_TAB_DEVELOP;Entwickeln +MAIN_TAB_DEVELOP; Batchbearbeitung MAIN_TAB_EXIF;Exif -MAIN_TAB_EXPORT;Exportieren +MAIN_TAB_EXPORT; Exportieren MAIN_TAB_EXPOSURE;Belichtung MAIN_TAB_EXPOSURE_TOOLTIP;Taste: Alt + e -MAIN_TAB_FILTER; Filter -MAIN_TAB_INSPECT; Prüfen +MAIN_TAB_FILTER; Filter +MAIN_TAB_INSPECT; Prüfen MAIN_TAB_IPTC;IPTC MAIN_TAB_METADATA;Metadaten MAIN_TAB_METADATA_TOOLTIP;Taste: Alt + m @@ -804,12 +865,12 @@ MAIN_TAB_WAVELET_TOOLTIP;Taste: Alt + w MAIN_TOOLTIP_BACKCOLOR0;Hintergrundfarbe der Vorschau basierend auf dem: Oberflächendesign\nTaste: 9 MAIN_TOOLTIP_BACKCOLOR1;Hintergrundfarbe der Vorschau: Schwarz\nTaste: 9 MAIN_TOOLTIP_BACKCOLOR2;Hintergrundfarbe der Vorschau: Weiß\nTaste: 9 -MAIN_TOOLTIP_BEFOREAFTERLOCK;Vorher-Ansicht Sperren/Entsperren\n\nGesperrt: Friert die Vorher-Ansicht ein, so dass sich die Gesamtwirkung mehrerer Bearbeitungsschritte beurteilen lässt.\n\nEntsperrt: Die Vorher-Ansicht hinkt dem aktuellen Bild immer einen Bearbeitungsschritt hinterher. +MAIN_TOOLTIP_BEFOREAFTERLOCK;Vorher-Ansicht: Sperren / Entsperren\n\nGesperrt: Friert die Vorher-Ansicht ein, so\ndass sich die Gesamtwirkung mehrerer\nBearbeitungsschritte beurteilen lässt.\n\nEntsperrt: Die Vorher-Ansicht hinkt dem\naktuellen Bild immer einen Bearbeitungs-\nschritt hinterher. MAIN_TOOLTIP_HIDEHP;Linkes Bedienfeld ein-/ausblenden\nTaste: l MAIN_TOOLTIP_INDCLIPPEDH;Anzeige zu heller Bereiche ein-/ausschalten\nTaste: < MAIN_TOOLTIP_INDCLIPPEDS;Anzeige zu dunkler Bereiche ein-/ausschalten\nTaste: > MAIN_TOOLTIP_PREVIEWB;Vorschau Blau-Kanal\nTaste: b -MAIN_TOOLTIP_PREVIEWFOCUSMASK;Vorschau Fokusmaske\nTaste: Umschalt + f\n\nPräziser bei Bildern mit geringer Tiefenschärfe, niedrigem Rauschen und bei hoher Vergrößerung. +MAIN_TOOLTIP_PREVIEWFOCUSMASK;Vorschau Fokusmaske\nTaste: Umschalt + f\n\nPräziser bei Bildern mit geringer Tiefenschärfe,\nniedrigem Rauschen und bei hoher Vergrößerung. MAIN_TOOLTIP_PREVIEWG;Vorschau Grün-Kanal\nTaste: g MAIN_TOOLTIP_PREVIEWL;Vorschau Helligkeit\nTaste: v\n\n0.299·R + 0.587·G + 0.114·B MAIN_TOOLTIP_PREVIEWR;Vorschau Rot-Kanal\nTaste: r @@ -817,7 +878,7 @@ MAIN_TOOLTIP_QINFO;Bildinformationen ein-/ausblenden\nTaste: i MAIN_TOOLTIP_SHOWHIDELP1;Linkes Bedienfeld ein-/ausblenden\nTaste: l MAIN_TOOLTIP_SHOWHIDERP1;Rechtes Bedienfeld ein-/ausblenden\nTaste: Alt + l MAIN_TOOLTIP_SHOWHIDETP1;Oberes Bedienfeld ein-/ausblenden\nTaste: Umschalt + l -MAIN_TOOLTIP_THRESHOLD;Schwellenwert +MAIN_TOOLTIP_THRESHOLD;Schwelle MAIN_TOOLTIP_TOGGLE;Vorher/Nachher-Ansicht ein-/ausschalten\nTaste: Umschalt + b MONITOR_PROFILE_SYSTEM;Systemvorgabe NAVIGATOR_B;B: @@ -834,28 +895,28 @@ NAVIGATOR_XY_FULL;Breite = %1, Höhe = %2 NAVIGATOR_XY_NA;x: --, y: -- OPTIONS_DEFIMG_MISSING;Die Standard-Profile für Nicht-RAW-Bilder wurden nicht gefunden oder nicht festgelegt.\n\nBitte prüfen Sie das Profil-Verzeichnis, es fehlt möglicherweise oder ist beschädigt.\n\nEs werden stattdessen interne Standardwerte verwendet. OPTIONS_DEFRAW_MISSING;Die Standard-Profile für RAW-Bilder wurden nicht gefunden oder nicht festgelegt.\n\nBitte prüfen Sie das Profil-Verzeichnis, es fehlt möglicherweise oder ist beschädigt.\n\nEs werden stattdessen interne Standardwerte verwendet. -PARTIALPASTE_BASICGROUP;Grundeinstellungen +PARTIALPASTE_BASICGROUP;Basisparameter PARTIALPASTE_CACORRECTION;Farbsaum entfernen PARTIALPASTE_CHANNELMIXER;RGB-Kanalmixer PARTIALPASTE_CHANNELMIXERBW;Schwarz/Weiß PARTIALPASTE_COARSETRANS;Drehen / Spiegeln PARTIALPASTE_COLORAPP;CIE Color Appearance Model 2002 -PARTIALPASTE_COLORGROUP;Farbeinstellungen +PARTIALPASTE_COLORGROUP;Farbparameter PARTIALPASTE_COLORTONING;Farbanpassungen PARTIALPASTE_COMMONTRANSFORMPARAMS;Auto-Füllen -PARTIALPASTE_COMPOSITIONGROUP;Gestaltungseinstellungen +PARTIALPASTE_COMPOSITIONGROUP;Gestaltungsparameter PARTIALPASTE_CROP;Ausschnitt PARTIALPASTE_DARKFRAMEAUTOSELECT;Dunkelbild: Automatische Auswahl PARTIALPASTE_DARKFRAMEFILE;Dunkelbild: Datei PARTIALPASTE_DEFRINGE;Farbsaum entfernen (Defringe) -PARTIALPASTE_DETAILGROUP;Detaileinstellungen +PARTIALPASTE_DETAILGROUP;Detailparameter PARTIALPASTE_DIALOGLABEL;Selektives Einfügen des Bearbeitungsprofils PARTIALPASTE_DIRPYRDENOISE;Rauschreduzierung PARTIALPASTE_DIRPYREQUALIZER;Detailebenenkontrast PARTIALPASTE_DISTORTION;Verzeichnungskorrektur PARTIALPASTE_EPD;Dynamikkompression PARTIALPASTE_EQUALIZER;Anzahl der Ebenen -PARTIALPASTE_EVERYTHING;Alle Einstellungen aktivieren / deaktivieren +PARTIALPASTE_EVERYTHING;Alle Parameter aktivieren / deaktivieren PARTIALPASTE_EXIFCHANGES;Änderungen an Exif-Daten PARTIALPASTE_EXPOSURE;Belichtung PARTIALPASTE_FILMSIMULATION;Filmsimulation @@ -881,8 +942,7 @@ PARTIALPASTE_PREPROCESS_HOTPIXFILT;Vorverarbeitung: Hot-Pixel-Filter PARTIALPASTE_PREPROCESS_LINEDENOISE;Vorverarbeitung: Zeilenrauschfilter PARTIALPASTE_PRSHARPENING;Schärfung nach Größenänderung PARTIALPASTE_RAWCACORR_AUTO;Chromatische Aberration: Automatische Korrektur -PARTIALPASTE_RAWCACORR_CABLUE;Chromatische Aberration: Blau -PARTIALPASTE_RAWCACORR_CARED;Chromatische Aberration: Rot +PARTIALPASTE_RAWCACORR_CAREDBLUE;Chromatische Aberration: Rot & Blau PARTIALPASTE_RAWEXPOS_BLACK;Weißpunkt: Schwarzpegel PARTIALPASTE_RAWEXPOS_LINEAR;Weißpunkt: Korrekturfaktor PARTIALPASTE_RAWEXPOS_PRESER;Weißpunkt: Lichter schützen (EV) @@ -890,8 +950,10 @@ PARTIALPASTE_RAWGROUP;RAW PARTIALPASTE_RAW_DCBENHANCE;Farbinterpolation: DCB-Verbesserung PARTIALPASTE_RAW_DCBITERATIONS;Farbinterpolation: Anzahl der DCB-Iterationen PARTIALPASTE_RAW_DMETHOD;Farbinterpolation: Methode -PARTIALPASTE_RAW_FALSECOLOR;Farbinterpolation: Falschfarbenunterdrückung +PARTIALPASTE_RAW_FALSECOLOR;Farbinterpolation: Falschfarbenreduzierung +PARTIALPASTE_RAW_IMAGENUM;Farbinterpolation: Unterbild PARTIALPASTE_RAW_LMMSEITERATIONS;Farbinterpolation: LMMSE-Verbesserungsstufen +PARTIALPASTE_RAW_PIXELSHIFT;Farbinterpolation: Pixel Shift PARTIALPASTE_RESIZE;Skalieren PARTIALPASTE_RETINEX;Retinex (Bildschleier entfernen) PARTIALPASTE_RGBCURVES;RGB-Kurven @@ -911,7 +973,7 @@ PREFERENCES_AUTLISMAX;Max.-Durchschnitt aller Kacheln PREFERENCES_AUTLISSTD;Hoch PREFERENCES_AUTLISVLOW;Keine PREFERENCES_AUTLOW;Niedrig -PREFERENCES_AUTOMONPROFILE;Autom. das für den aktuellen Monitor festgelegte Profil verwenden +PREFERENCES_AUTOMONPROFILE;Automatisch das für den aktuellen Monitor festgelegte Profil verwenden. PREFERENCES_AUTSTD;Standard PREFERENCES_BATCH_PROCESSING;Stapelverarbeitung PREFERENCES_BEHADDALL;Alle hinzufügen @@ -934,6 +996,7 @@ PREFERENCES_CLIPPINGIND;Anzeige zu heller/dunkler Bereiche PREFERENCES_CLUTSCACHE;HaldCLUT-Zwischenspeicher PREFERENCES_CLUTSCACHE_LABEL;Maximale Anzahl CLUTs im Zwischenspeicher PREFERENCES_CLUTSDIR;HaldCLUT-Verzeichnis +PREFERENCES_CMMBPC;Schwarzpunkt-Kompensation PREFERENCES_CURVEBBOXPOS;Position der Kurven-Buttons PREFERENCES_CURVEBBOXPOS_ABOVE;Oben PREFERENCES_CURVEBBOXPOS_BELOW;Unten @@ -958,8 +1021,6 @@ PREFERENCES_DATEFORMAT;Format PREFERENCES_DATEFORMATHINT;Die folgenden Variablen können verwendet werden:\n%y : Jahr\n%m : Monat\n%d : Tag\n\nBeispiele:\n%d.%m.%y (übliche deutsche Datumsschreibweise)\n%y-%m-%d (Datumsformat nach ISO 8601 und EN 28601) PREFERENCES_DAUB_LABEL;Benutze Daubechies D6-Wavelets anstatt D4 PREFERENCES_DAUB_TOOLTIP;Rauschreduzierung und Waveletebenen verwenden ein Debauchies Mutter-Wavelet. Wenn Sie D6 statt D4 wählen, erhöhen Sie die Anzahl der orthogonalen Daubechies-Koeffizienten, was die Qualität bei niedrigen Ebenen verbessern kann. Es gibt keinen Unterschied zwischen D4 und D6 im Speicherverbrauch oder in der Verarbeitungszeit. -PREFERENCES_DEFAULTLANG;Sprache für Menüs und Dialoge -PREFERENCES_DEFAULTTHEME;Oberflächendesign PREFERENCES_DIRDARKFRAMES;Dunkelbild-Verzeichnis PREFERENCES_DIRHOME;Benutzer-Verzeichnis PREFERENCES_DIRLAST;Zuletzt geöffnetes Verzeichnis @@ -988,20 +1049,20 @@ PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Gleiche Miniaturbildgröße in der Dateiver PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Unterschiedliche Miniaturbildgrößen benötigen mehr Verarbeitungszeit beim Wechsel zwischen der Dateiverwaltung und dem Editor PREFERENCES_GIMPPATH;GIMP Installationsverzeichnis PREFERENCES_GREY;Yb-Luminanz (%) des Ausgabegerätes -PREFERENCES_GREY05;Yb=05 CIE L#30 -PREFERENCES_GREY10;Yb=10 CIE L#40 -PREFERENCES_GREY15;Yb=15 CIE L#45 -PREFERENCES_GREY18;Yb=18 CIE L#50 -PREFERENCES_GREY23;Yb=23 CIE L#55 -PREFERENCES_GREY30;Yb=30 CIE L#60 -PREFERENCES_GREY40;Yb=40 CIE L#70 +PREFERENCES_GREY05;Yb = 05 CIE L#30 +PREFERENCES_GREY10;Yb = 10 CIE L#40 +PREFERENCES_GREY15;Yb = 15 CIE L#45 +PREFERENCES_GREY18;Yb = 18 CIE L#50 +PREFERENCES_GREY23;Yb = 23 CIE L#55 +PREFERENCES_GREY30;Yb = 30 CIE L#60 +PREFERENCES_GREY40;Yb = 40 CIE L#70 PREFERENCES_GREYSC;Szenen-Yb-Luminanz (%) -PREFERENCES_GREYSC18;Yb=18 CIE L#49 +PREFERENCES_GREYSC18;Yb = 18 CIE L#49 PREFERENCES_GREYSCA;Automatisch PREFERENCES_HISTOGRAMPOSITIONLEFT;Histogramm linksseitig PREFERENCES_HISTOGRAMWORKING;Das Arbeitsprofil zur Darstellung des Haupthistogramms verwenden -PREFERENCES_HISTOGRAM_TOOLTIP;Wenn aktiviert wird das Arbeitsprofil für die Darstellung des Haupthistogramms, andernfalls das des gammakorrigierten Ausgangsprofil, verwendet. -PREFERENCES_HLTHRESHOLD;Lichter - Schwellenwert +PREFERENCES_HISTOGRAM_TOOLTIP;Wenn aktiviert wird das Arbeitsprofil für die Darstellung des\nHaupthistogramms, andernfalls das des gammakorrigierten\nAusgangsprofil, verwendet. +PREFERENCES_HLTHRESHOLD;Lichter - Schwelle PREFERENCES_ICCDIR;ICC-Profile-Verzeichnis PREFERENCES_IMG_RELOAD_NEEDED;Änderungen werden nur auf neu geöffnete Bilder angewendet PREFERENCES_IMPROCPARAMS;Standard-Bildverarbeitungsparameter @@ -1029,7 +1090,9 @@ PREFERENCES_MENUOPTIONS;Menüoptionen PREFERENCES_METADATA;Metadaten PREFERENCES_MIN;Mini (100x115) PREFERENCES_MONINTENT;Standard-Rendering-Intent -PREFERENCES_MONPROFILE;Standard-Monitor-Profil +PREFERENCES_MONITOR;Monitor +PREFERENCES_MONPROFILE;Standardfarbprofil +PREFERENCES_MONPROFILE_WARNOSX;Aufgrund einer macOS-Limitierung wird nur sRGB unterstützt. PREFERENCES_MULTITAB;Multi-Reitermodus PREFERENCES_MULTITABDUALMON;Multi-Reitermodus (auf zweitem Monitor, wenn verfügbar) PREFERENCES_NAVGUIDEBRUSH;Farbe der Navigationshilfe @@ -1037,7 +1100,7 @@ PREFERENCES_NAVIGATIONFRAME;Navigation PREFERENCES_NOISE;Rauschreduzierung PREFERENCES_OUTDIR;Ausgabeverzeichnis PREFERENCES_OUTDIRFOLDER;In dieses Verzeichnis speichern -PREFERENCES_OUTDIRFOLDERHINT;Alle Dateien ausgewähltem Verzeichnis speichern. +PREFERENCES_OUTDIRFOLDERHINT;Alle Dateien im ausgewählten Verzeichnis speichern. PREFERENCES_OUTDIRTEMPLATE;Dynamisches Verzeichnis verwenden PREFERENCES_OUTDIRTEMPLATEHINT;Die folgenden Variablen können verwendet werden:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nDiese Variablen beinhalten bestimmte Teile des Verzeichnispfades, in welchem sich das Bild befindet, oder Attribute des Bildes.\n\nWenn zum Beispiel /home/tom/photos/2010-10-31/dsc0042.nef geöffnet wurde, dann haben die Variablen den folgenden Inhalt:\n%d4 = home\n%d3 = tom\n%d2 = photos\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tom/photos/2010-10-31\n%p2 = /home/tom/photos\n%p3 = /home/tom\n%p4 = /home\n\nWenn Sie die Ausgabedatei in dasselbe Verzeichnis wie das Originalbild speichern wollen, dann wählen Sie:\n%p1/%f\n\nWenn Sie die Ausgabedatei in ein Unterverzeichnis mit dem Namen "converted" schreiben wollen, dann wählen Sie:\n%p1/converted/%f\n\nWenn Sie die Ausgabedatei im Verzeichnispfad "/home/tom/photos/converted" speichern wollen, dort jedoch in einem mit dem Namen des Ursprungsverzeichnisses betitelten Unterverzeichnis, dann wählen Sie:\n%p2/converted/%d1/%f\n\nDie Variable %r enthält die Bewertung des Bildes. PREFERENCES_OVERLAY_FILENAMES;Bildinformationen überlagern die Miniaturbilder in der Dateiverwaltung @@ -1054,20 +1117,26 @@ PREFERENCES_PREVDEMO;Farbinterpolation PREFERENCES_PREVDEMO_FAST;Schnell PREFERENCES_PREVDEMO_LABEL;Demosaikmethode für 100%-Ansicht PREFERENCES_PREVDEMO_SIDECAR;Wie im Bildverarbeitungsprofil vorgegeben +PREFERENCES_PRINTER;Drucker (Soft-Proofing) PREFERENCES_PROFILEHANDLING;Behandlung der Bearbeitungsprofile PREFERENCES_PROFILELOADPR;Priorität der Profile beim Laden -PREFERENCES_PROFILEPRCACHE;Bearbeitungsprofil im Zwischenspeicher +PREFERENCES_PROFILEPRCACHE;Bearbeitungsprofil im Festplatten-Cache PREFERENCES_PROFILEPRFILE;Bearbeitungsprofil, welches geladener Datei beiliegt (Sidecar) -PREFERENCES_PROFILESAVECACHE;Verarbeitungsparameter im Zwischenspeicher speichern +PREFERENCES_PROFILESAVEBOTH;Verarbeitungsparameter im Festplatten-Cache und zusammen mit der Datei speichern +PREFERENCES_PROFILESAVECACHE;Verarbeitungsparameter im Festplatten-Cache speichern PREFERENCES_PROFILESAVEINPUT;Verarbeitungsparameter zusammen mit Datei speichern (Sidecar) +PREFERENCES_PROFILESAVELOCATION;Speicherort der Profile PREFERENCES_PROFILE_NONE;Kein Farbprofil PREFERENCES_PROPERTY;Eigenschaft +PREFERENCES_PRTINTENT;Rendering-Intent +PREFERENCES_PRTPROFILE;Farbprofil PREFERENCES_PSPATH;Adobe Photoshop Installationsverzeichnis PREFERENCES_REMEMBERZOOMPAN;Zoom und Bildposition merken -PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Öffnen eines neuen Bildes mit den Zoom- und Positionswerten des vorangegangenen Bildes.\n\nFunktioniert nur unter folgenden Bedingungen:\nEin-Reitermodus aktiv\n“Demosaikmethode für 100%-Ansicht“ muss auf “Wie im Bildverarbeitungsprofil vorgegeben“ eingestellt sein. +PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Öffnen eines neuen Bildes mit den Zoom- und Positionswerten\ndes vorangegangenen Bildes.\n\nFunktioniert nur unter folgenden Bedingungen:\nEin-Reitermodus aktiv\n“Demosaikmethode für 100%-Ansicht“ muss auf “Wie im Bild-\nverarbeitungsprofil vorgegeben“ eingestellt sein. PREFERENCES_RGBDTL_LABEL;Maximale Anzahl Threads für Rauschreduzierung PREFERENCES_RGBDTL_TOOLTIP;Die Rauschreduzierung benötigt mindestens 128MB RAM für ein 10 Megapixel-Bild oder 512MB für ein 40 Megapixel-Bild, und zusätzlich 128MB RAM pro Thread. Je mehr Threads parallel ablaufen, desto schneller ist die Berechnung. Bei Einstellung "0" werden so viele Threads wie möglich benutzt. PREFERENCES_SELECTFONT;Schriftart +PREFERENCES_SELECTFONT_COLPICKER;Schriftart für die Farbwähler PREFERENCES_SELECTLANG;Sprache PREFERENCES_SELECTTHEME;Oberflächendesign (erfordert Neustart) PREFERENCES_SERIALIZE_TIFF_READ;TIFF-Bilder @@ -1078,11 +1147,10 @@ PREFERENCES_SHOWBASICEXIF;Exif-Daten anzeigen PREFERENCES_SHOWDATETIME;Datum und Uhrzeit anzeigen PREFERENCES_SHOWEXPOSURECOMPENSATION;Belichtungskorrektur anfügen PREFERENCES_SHOWFILMSTRIPTOOLBAR;Toolbar oberhalb des Filmstreifens anzeigen -PREFERENCES_SHTHRESHOLD;Schatten - Schwellenwert +PREFERENCES_SHTHRESHOLD;Schatten - Schwelle PREFERENCES_SIMPLAUT;Werkzeugmodus PREFERENCES_SINGLETAB;Ein-Reitermodus PREFERENCES_SINGLETABVERTAB;Ein-Reitermodus (vertikale Reiter) -PREFERENCES_SLIMUI;Kompakte Oberfläche PREFERENCES_SMA;Klein (250x287) PREFERENCES_SND_BATCHQUEUEDONE;Warteschlange abgearbeitet PREFERENCES_SND_HELP;Geben Sie einen Pfad zu einer Sounddatei oder einen Systemklang ein.\n\nBeispiel Systemklänge:\nWindows: SystemDefault, SystemAsterisk ...\nLinux: complete, window-attention ...\n @@ -1092,6 +1160,7 @@ PREFERENCES_STARTUPIMDIR;Bildverzeichnis beim Programmstart PREFERENCES_STDAUT;Standard PREFERENCES_TAB_BROWSER;Dateiverwaltung PREFERENCES_TAB_COLORMGR;Farbmanagement +PREFERENCES_TAB_DYNAMICPROFILE;Dynamisches Profil PREFERENCES_TAB_GENERAL;Allgemein PREFERENCES_TAB_IMPROC;Bildbearbeitung PREFERENCES_TAB_PERFORMANCE;Performance & Qualität @@ -1104,7 +1173,6 @@ PREFERENCES_TP_USEICONORTEXT;Symbole statt Text in Karteireitern PREFERENCES_TP_VSCROLLBAR;Keine vertikale Scrollbar PREFERENCES_TUNNELMETADATA;Exif/XMP unverändert in die Ausgabedatei übernehmen. PREFERENCES_USEBUNDLEDPROFILES;Standardprofile verwenden -PREFERENCES_USESYSTEMTHEME;Systemoberfläche verwenden PREFERENCES_VIEW;Weißabgleich-Einstellung des Ausgabegerätes (Monitor, TV, Projektor, usw.) PREFERENCES_WAVLEV;Die Qualität von Waveletebenen erhöhen PREFERENCES_WLONE;Eine Ebene @@ -1116,19 +1184,20 @@ PROFILEPANEL_GLOBALPROFILES;Standardprofile PROFILEPANEL_LABEL;Bearbeitungsprofile PROFILEPANEL_LOADDLGLABEL;Bearbeitungsparameter laden... PROFILEPANEL_LOADPPASTE;Zu ladende Parameter -PROFILEPANEL_MODE_TIP;Ist der Button aktiviert, werden Teilprofile als vollständige Profile geladen. Fehlende Parameter werden durch Standardwerte aufgefüllt. +PROFILEPANEL_MODE_TIP;Ist der Button aktiviert, werden Teilprofile\nals vollständige Profile geladen.\nFehlende Parameter werden durch\nStandardwerte aufgefüllt. PROFILEPANEL_MYPROFILES;Meine Profile PROFILEPANEL_PASTEPPASTE;Einzufügende Parameter PROFILEPANEL_PCUSTOM;Benutzerdefiniert +PROFILEPANEL_PDYNAMIC;Dynamisches Profil PROFILEPANEL_PFILE;Aus Datei PROFILEPANEL_PINTERNAL;Neutral PROFILEPANEL_PLASTSAVED;Zuletzt gespeichert PROFILEPANEL_SAVEDLGLABEL;Bearbeitungsprofil speichern... PROFILEPANEL_SAVEPPASTE;Zu speichernde Parameter -PROFILEPANEL_TOOLTIPCOPY;Profil in Zwischenablage kopieren\n\nStrg-Taste beim Anklicken gedrückt halten, um zu kopierende Parameter auszuwählen. -PROFILEPANEL_TOOLTIPLOAD;Profil aus Datei laden\n\nStrg-Taste beim Anklicken gedrückt halten,\num zu ladende Parameter auszuwählen -PROFILEPANEL_TOOLTIPPASTE;Profil aus Zwischenablage einfügen\n\nStrg-Taste beim Anklicken gedrückt halten, um einzufügende Parameter auszuwählen. -PROFILEPANEL_TOOLTIPSAVE;Profil speichern\n\nStrg-Taste beim Anklicken gedrückt halten,\num zu speichernde Parameter auszuwählen +PROFILEPANEL_TOOLTIPCOPY;Profil in Zwischenablage kopieren\n\nStrg-Taste beim Klicken festhalten, um\nzu kopierende Parameter auszuwählen. +PROFILEPANEL_TOOLTIPLOAD;Profil aus Datei laden\n\nStrg-Taste beim Klicken festhalten, um\nzu ladende Parameter auszuwählen. +PROFILEPANEL_TOOLTIPPASTE;Profil aus Zwischenablage einfügen\n\nStrg-Taste beim Klicken festhalten, um\neinzufügende Parameter auszuwählen. +PROFILEPANEL_TOOLTIPSAVE;Profil speichern\n\nStrg-Taste beim Klicken festhalten, um\nzu speichernde Parameter auszuwählen. PROGRESSBAR_LOADING;Lade Bild... PROGRESSBAR_LOADINGTHUMBS;Lade Miniaturbilder... PROGRESSBAR_LOADJPEG;Lade JPEG... @@ -1145,7 +1214,7 @@ PROGRESSBAR_SNAPSHOT_ADDED;Schnappschuss hinzugefügt PROGRESSDLG_PROFILECHANGEDINBROWSER;Profil wurde in der Dateiverwaltung geändert QINFO_ISO;ISO QINFO_NOEXIF;Keine Exif-Daten vorhanden. -SAVEDLG_AUTOSUFFIX;Suffix anfügen, falls unter dem Namen bereits eine Datei existiert +SAVEDLG_AUTOSUFFIX;Suffix anfügen, wenn die Datei bereits existiert SAVEDLG_FILEFORMAT;Dateiformat SAVEDLG_FORCEFORMATOPTS;Erzwinge Speicheroptionen SAVEDLG_JPEGQUAL;JPEG-Qualität @@ -1163,14 +1232,17 @@ SAVEDLG_SUBSAMP_TOOLTIP;Beste Kompression: 4:2:0\nAusgeglichen: 4:2:2\nBeste Qua SAVEDLG_TIFFUNCOMPRESSED;Unkomprimiertes TIFF SAVEDLG_WARNFILENAME;Die Datei wird gespeichert als SHCSELECTOR_TOOLTIP;Um die 3 Regler zurückzusetzen, rechte Maustaste klicken. +SOFTPROOF_GAMUTCHECK_TOOLTIP;Wenn eingeschaltet, werden die Pixel, die\naußerhalb des Gamut-Farbbereichs liegen,\nin Grau angezeigt. +SOFTPROOF_TOOLTIP;Soft-Proofing:\n\nWenn eingeschaltet, wird das Rendern mit dem\nAusgabefarbprofil simuliert.\nVorzugsweise für die Simulation der Druckausgabe. THRESHOLDSELECTOR_B;Unten THRESHOLDSELECTOR_BL;Unten-Links THRESHOLDSELECTOR_BR;Unten-Rechts -THRESHOLDSELECTOR_HINT;Umschalt-Taste halten, um individuelle Kontrollpunkte zu verschieben. +THRESHOLDSELECTOR_HINT;Umschalt-Taste halten, um individuelle\nKontrollpunkte zu verschieben. THRESHOLDSELECTOR_T;Oben THRESHOLDSELECTOR_TL;Oben-Links THRESHOLDSELECTOR_TR;Oben-Rechts -TOOLBAR_TOOLTIP_CROP;Ausschnitt wählen\nTaste: c\n\nZum Verschieben des Ausschnitts muss die Umschalttaste gedrückt gehalten werden +TOOLBAR_TOOLTIP_COLORPICKER;Farbwähler\n\nWenn eingeschaltet:\n- Mit der linken Maustaste können Sie einen Farbwähler setzen.\n- Zum Verschieben, linke Maustaste festhalten.\n- Umschalttaste + Rechts-Klick entfernt alle Farbwähler.\n- Rechts-Klick auf den Farbwählerbutton blendet die Farbwähler ein/aus\n- Rechts-Klick in einen freien Bereich schaltet auf das Hand-Werkzeug zurück. +TOOLBAR_TOOLTIP_CROP;Ausschnitt wählen\nTaste: c\n\nZum Verschieben des Ausschnitts,\nUmschalttaste festhalten. TOOLBAR_TOOLTIP_HAND;Hand-Werkzeug\nTaste: h TOOLBAR_TOOLTIP_STRAIGHTEN;Ausrichten / Drehen\nTaste: s\n\nRichtet das Bild entlang einer Leitlinie aus. TOOLBAR_TOOLTIP_WB;Weißabgleich manuell setzen\nTaste: w @@ -1181,13 +1253,13 @@ TP_BWMIX_ALGO_TOOLTIP;Linear liefert ein lineares Ergebnis\nSpezialeff TP_BWMIX_AUTOCH;Auto TP_BWMIX_AUTOCH_TIP;Automatische Berechnung der RGB-Werte. TP_BWMIX_CC_ENABLED;Komplemantärfarbe anpassen -TP_BWMIX_CC_TOOLTIP;Aktiviert die automatische Anpassung der Komplementärfarbe im ROYGCBPM-Modus +TP_BWMIX_CC_TOOLTIP;Aktiviert die automatische Anpassung der\nKomplementärfarbe im ROYGCBPM-Modus TP_BWMIX_CHANNEL;Luminanzequalizer TP_BWMIX_CURVEEDITOR1;“Bevor“-Kurve TP_BWMIX_CURVEEDITOR2;“Danach“-Kurve -TP_BWMIX_CURVEEDITOR_AFTER_TOOLTIP;Die Tonwertkurve wird NACH der Schwarz/Weiß-Konvertierung angewendet. -TP_BWMIX_CURVEEDITOR_BEFORE_TOOLTIP;Die Tonwertkurve wird VOR der Schwarz/Weiß-Konvertierung angewendet. -TP_BWMIX_CURVEEDITOR_LH_TOOLTIP;Luminanz als Funktion des Farbtons L=f(H). Zu hohe Werte können zu Artefakten führen. +TP_BWMIX_CURVEEDITOR_AFTER_TOOLTIP;Die Tonwertkurve wird NACH der Schwarz/Weiß-\nKonvertierung angewendet. +TP_BWMIX_CURVEEDITOR_BEFORE_TOOLTIP;Die Tonwertkurve wird VOR der Schwarz/Weiß-\nKonvertierung angewendet. +TP_BWMIX_CURVEEDITOR_LH_TOOLTIP;Luminanz als Funktion des Farbtons L = f(H).\nZu hohe Werte können zu Artefakten führen. TP_BWMIX_FILTER;Farbfilter TP_BWMIX_FILTER_BLUE;Blau TP_BWMIX_FILTER_BLUEGREEN;Blau-Grün @@ -1213,7 +1285,7 @@ TP_BWMIX_RGBLABEL;R: %1%% G: %2%% B: %3%% Gesamt: %4%% TP_BWMIX_RGBLABEL_HINT;RGB-Faktoren\n\nGesamt: Summe aller RGB-Werte.\n- immer 100% im Modus Relativ\n- höher (heller), oder niedriger (dunkler) 100% im Modus Absolut TP_BWMIX_RGB_TOOLTIP;Mischen Sie die Kanäle. Verwenden Sie die Vorgaben zur Orientierung.\nNegative Werte können zu Artefakten führen. TP_BWMIX_SETTING;Voreinstellung -TP_BWMIX_SETTING_TOOLTIP;Voreinstellungen für den Kanalmixer (Film, Landschaft, ...). +TP_BWMIX_SETTING_TOOLTIP;Voreinstellungen für den Kanalmixer (Film, Landschaft, ...). TP_BWMIX_SET_HIGHCONTAST;Hoher Kontrast TP_BWMIX_SET_HIGHSENSIT;Hohe Empfindlichkeit TP_BWMIX_SET_HYPERPANCHRO;Hyper-Panchromatisch @@ -1240,7 +1312,7 @@ TP_CACORRECTION_RED;Rot TP_CBDL_AFT;Nach Schwarz / Weiß TP_CBDL_BEF;Vor Schwarz / Weiß TP_CBDL_METHOD;Prozessreihenfolge -TP_CBDL_METHOD_TOOLTIP;Wählen Sie, ob der Detailebenenkontrast nach dem Schwarz/Weiß-Werkzeug abgearbeitet wird (ermöglicht das Arbeiten im L*a*b*-Farbraum), oder vor ihm (ermöglicht das Arbeiten im RGB-Farbraum). +TP_CBDL_METHOD_TOOLTIP;Wählen Sie, ob der Detailebenenkontrast nach\ndem Schwarz/Weiß-Werkzeug abgearbeitet wird\n(ermöglicht das Arbeiten im L*a*b*-Farbraum),\noder vor ihm (ermöglicht das Arbeiten im RGB-\nFarbraum). TP_CHMIXER_BLUE;Blau-Kanal TP_CHMIXER_GREEN;Grün-Kanal TP_CHMIXER_LABEL;RGB-Kanalmixer @@ -1254,28 +1326,28 @@ TP_COLORAPP_ADAPTSCENE;Leuchtstärke (cd/m²) TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute Luminanz der Szenenleuchstärket\n(normalerweise 2000cd/m²) TP_COLORAPP_ADAPTVIEWING;Leuchtstärke (cd/m²) TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute Luminanz der Betrachtungsumgebung\n(normalerweise 16cd/m²) -TP_COLORAPP_ADAP_AUTO_TOOLTIP;Wenn aktiviert (empfohlen), werden die optimalen Werte aus den Exif-Daten automatisch berechnet. +TP_COLORAPP_ADAP_AUTO_TOOLTIP;Wenn aktiviert (empfohlen), werden die optimalen\nWerte aus den Exif-Daten automatisch berechnet. TP_COLORAPP_ALGO;Algorithmus TP_COLORAPP_ALGO_ALL;Alle TP_COLORAPP_ALGO_JC;Helligkeit + Buntheit (JH) TP_COLORAPP_ALGO_JS;Helligkeit + Sättigung (JS) TP_COLORAPP_ALGO_QM;Helligkeit + Farbigkeit (QM) -TP_COLORAPP_ALGO_TOOLTIP;Auswahl zwischen Parameter-Teilmengen und allen Parametern -TP_COLORAPP_BADPIXSL;Hot/Bad-Pixelfilter -TP_COLORAPP_BADPIXSL_TOOLTIP;Unterdrückt “Hot/Bad“-Pixel\n\n0 = keine Auswirkung\n1 = Mittel\n2 = Gaussian +TP_COLORAPP_ALGO_TOOLTIP;Auswahl zwischen Parameter-Teilmengen\nund allen Parametern +TP_COLORAPP_BADPIXSL;Hot / Bad-Pixelfilter +TP_COLORAPP_BADPIXSL_TOOLTIP;Unterdrückt “Hot / Bad“-Pixel\n\n0 = keine Auswirkung\n1 = Mittel\n2 = Gaussian TP_COLORAPP_BRIGHT;Helligkeit (Q) TP_COLORAPP_BRIGHT_TOOLTIP;Helligkeit in CIECAM02 berücksichtigt die Weißintensität und unterscheidet sich von L*a*b* und RGB-Helligkeit TP_COLORAPP_CHROMA;Buntheit (H) TP_COLORAPP_CHROMA_M;Farbigkeit (M) -TP_COLORAPP_CHROMA_M_TOOLTIP;Die Farbigkeit in CIECAM02 unterscheidet sich von L*a*b*- und RGB-Farbigkeit +TP_COLORAPP_CHROMA_M_TOOLTIP;Die Farbigkeit in CIECAM02 unterscheidet sich\nvon L*a*b*- und RGB-Farbigkeit TP_COLORAPP_CHROMA_S;Sättigung (S) -TP_COLORAPP_CHROMA_S_TOOLTIP;Sättigung in CIECAM02 unterscheidet sich von L*a*b* und RGB Sättigung -TP_COLORAPP_CHROMA_TOOLTIP;Buntheit in CIECAM02 unterscheidet sich von L*a*b* und RGB-Buntheit +TP_COLORAPP_CHROMA_S_TOOLTIP;Sättigung in CIECAM02 unterscheidet sich\nvon L*a*b* und RGB Sättigung +TP_COLORAPP_CHROMA_TOOLTIP;Buntheit in CIECAM02 unterscheidet sich\nvon L*a*b* und RGB-Buntheit TP_COLORAPP_CIECAT_DEGREE;CAT02 Adaptation TP_COLORAPP_CONTRAST;Kontrast (J) TP_COLORAPP_CONTRAST_Q;Kontrast (Q) -TP_COLORAPP_CONTRAST_Q_TOOLTIP;Kontrast (Q) in CIECAM02 unterscheidet sich vom L*a*b*- und RGB-Kontrast -TP_COLORAPP_CONTRAST_TOOLTIP;Kontrast (J) in CIECAM02 unterscheidet sich vom L*a*b*- und RGB-Kontrast +TP_COLORAPP_CONTRAST_Q_TOOLTIP;Kontrast (Q) in CIECAM02 unterscheidet sich\nvom L*a*b*- und RGB-Kontrast +TP_COLORAPP_CONTRAST_TOOLTIP;Kontrast (J) in CIECAM02 unterscheidet sich\nvom L*a*b*- und RGB-Kontrast TP_COLORAPP_CURVEEDITOR1;Tonwertkurve 1 TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Zeigt das Histogramm von L (L*a*b*) vor CIECAM02.\nWenn "CIECAM02-Ausgabe-Histogramm in Kurven anzeigen" aktiviert ist, wird das Histogramm von J oder Q nach CIECAM02-Anpassungen angezeigt.\n\nJ und Q werden nicht im Haupt-Histogramm angezeigt.\nFür die endgültige Ausgabe verwenden Sie das Haupt-Histogramm. TP_COLORAPP_CURVEEDITOR2;Tonwertkurve 2 @@ -1283,8 +1355,8 @@ TP_COLORAPP_CURVEEDITOR2_TOOLTIP;Gleiche Verwendung wie bei der zweiten Belichtu TP_COLORAPP_CURVEEDITOR3;Farbkurve TP_COLORAPP_CURVEEDITOR3_TOOLTIP;Korrigiert Buntheit, Sättigung oder Farbigkeit.\n\nZeigt das Histogramm der Chromatizität (L*a*b* ) VOR den CIECAM02-Änderungen an.\nWenn "CIECAM02-Ausgabe-Histogramm in Kurven anzeigen" aktiviert ist, wird das Histogramm von C, S oder M NACH den CIECAM02-Änderungen angezeigt.\n\nC, S und M werden nicht im Haupt-Histogramm angezeigt.\nFür die endgültige Ausgabe verwenden Sie das Haupt-Histogramm. TP_COLORAPP_DATACIE;CIECAM02-Ausgabe-Histogramm in\nKurven anzeigen -TP_COLORAPP_DATACIE_TOOLTIP;Wenn aktiviert, zeigen die Histogramme der CIECAM02-Kurven die angenäherten Werte/Bereiche für J oder Q und C, S oder M NACH den CIECAM02-Anpassungen an. Das betrifft nicht das Haupt-Histogramm.\n\nWenn deaktiviert, zeigen die Histogramme der CIECAM02-Kurven die L*a*b*-Werte VOR den CIECAM02-Anpassungen an. -TP_COLORAPP_DEGREE_AUTO_TOOLTIP;Wenn aktiviert (emfohlen), berechnet RT einen optimalen Wert der von CAT02 und CIECAM02 verwendet wird.\nUm den Wert manuell zu setzen, muss die Option deaktiviert sein (Werte über 64 sind empfohlen). +TP_COLORAPP_DATACIE_TOOLTIP;Wenn aktiviert, zeigen die Histogramme\nder CIECAM02-Kurven die angenäherten\nWerte/Bereiche für J oder Q und C, S oder M\nNACH den CIECAM02-Anpassungen an. Das\nbetrifft nicht das Haupt-Histogramm.\n\nWenn deaktiviert, zeigen die Histogramme\nder CIECAM02-Kurven die L*a*b*-Werte\nVOR den CIECAM02-Anpassungen an. +TP_COLORAPP_DEGREE_AUTO_TOOLTIP;Wenn aktiviert (empfohlen), wird ein optimaler\nWert berechnet, der von CAT02 und CIECAM02\nverwendet wird.\nUm den Wert manuell zu setzen, muss die Option\ndeaktiviert sein (Werte über 64 sind empfohlen). TP_COLORAPP_DEGREE_TOOLTIP;Umfang der “CIE Chromatic Adaptation Transform 2002“ TP_COLORAPP_GAMUT;Gamutkontrolle (L*a*b*) TP_COLORAPP_GAMUT_TOOLTIP;Gamutkontrolle im L*a*b*-Modus erlauben. @@ -1295,9 +1367,9 @@ TP_COLORAPP_LABEL_CAM02;Bildanpassungen TP_COLORAPP_LABEL_SCENE;Umgebungsbedingungen (Szene) TP_COLORAPP_LABEL_VIEWING;Betrachtungsbedingungen TP_COLORAPP_LIGHT;Helligkeit (J) -TP_COLORAPP_LIGHT_TOOLTIP;Helligkeit in CIECAM02 unterscheidet sich von L*a*b* und RGB Helligkeit +TP_COLORAPP_LIGHT_TOOLTIP;Helligkeit in CIECAM02 unterscheidet sich\nvon L*a*b* und RGB Helligkeit TP_COLORAPP_MODEL;Weißpunktmodell -TP_COLORAPP_MODEL_TOOLTIP;Weißabgleich [RT] + [Ausgabe]:\nRT's Weißabgleich wird für die Szene verwendet, CIECAM02 auf D50 gesetzt und der Weißabgleich des Ausgabegerätes kann unter Einstellungen > Farb-Management eingestellt werden.\n\nWeißabgleich [RT+CAT02] + [Ausgabe]:\nRT's Weißabgleich wird für CAT02 verwendet und der Weißabgleich des Ausgabegerätes kann unter Einstellungen > Farb-Management eingestellt werden. +TP_COLORAPP_MODEL_TOOLTIP;Weißabgleich [RT] + [Ausgabe]:\nRT's Weißabgleich wird für die Szene verwendet,\nCIECAM02 auf D50 gesetzt und der Weißabgleich\ndes Ausgabegerätes kann unter:\nEinstellungen > Farb-Management\neingestellt werden.\n\nWeißabgleich [RT+CAT02] + [Ausgabe]:\nRT's Weißabgleich wird für CAT02 verwendet und\nder Weißabgleich des Ausgabegerätes kann unter\nEinstellungen > Farb-Management\neingestellt werden. TP_COLORAPP_RSTPRO;Hautfarbtöne schützen TP_COLORAPP_RSTPRO_TOOLTIP;Hautfarbtöne schützen\nWirkt sich auf Regler und Kurven aus. TP_COLORAPP_SHARPCIE;--unused-- @@ -1307,9 +1379,9 @@ TP_COLORAPP_SURROUND_AVER;Durchschnitt TP_COLORAPP_SURROUND_DARK;Dunkel TP_COLORAPP_SURROUND_DIM;Gedimmt TP_COLORAPP_SURROUND_EXDARK;Extrem Dunkel (Cutsheet) -TP_COLORAPP_SURROUND_TOOLTIP;Verändert Töne und Farben unter Berücksichtigung der Betrachtungsbedingungen des Ausgabegerätes.\n\nDurchschnitt:\nDurchschnittliche Lichtumgebung (standard)\nDas Bild wird nicht angepasst\n\nGedimmt:\nGedimmte Umgebung (TV)\ndas Bild wird leicht dunkel\n\nDunkel:\nDunkle Umgebung (Projektor)\nDas Bild wird dunkler\n\nExtrem Dunkel:\nExtrem Dunkle Umgebung\nDas Bild wird sehr dunkel +TP_COLORAPP_SURROUND_TOOLTIP;Verändert Töne und Farben unter Berücksichtigung der\nBetrachtungsbedingungen des Ausgabegerätes.\n\nDurchschnitt:\nDurchschnittliche Lichtumgebung (Standard).\nDas Bild wird nicht angepasst.\n\nGedimmt:\nGedimmte Umgebung (TV). Das Bild wird leicht dunkel.\n\nDunkel:\nDunkle Umgebung (Projektor). Das Bild wird dunkler.\n\nExtrem dunkel:\nExtrem dunkle Umgebung. Das Bild wird sehr dunkel. TP_COLORAPP_SURSOURCE;Dunkle Umgebung -TP_COLORAPP_SURSOURCE_TOOLTIP;Kann verwendet werden, wenn das Quellbild einen schwarzen Rahmen besitzt. +TP_COLORAPP_SURSOURCE_TOOLTIP;Kann verwendet werden, wenn das Quellbild\neinen schwarzen Rahmen besitzt. TP_COLORAPP_TCMODE_BRIGHTNESS;Helligkeit (Q) TP_COLORAPP_TCMODE_CHROMA;Buntheit (H) TP_COLORAPP_TCMODE_COLORF;Farbigkeit (M) @@ -1328,7 +1400,7 @@ TP_COLORTONING_BALANCE;Farbausgleich TP_COLORTONING_BY;o C/L TP_COLORTONING_CHROMAC;Deckkraft TP_COLORTONING_COLOR;Farbe -TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP;Buntheitsdeckkraft als Funktion der Luminanz oB=f(L) +TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP;Buntheitsdeckkraft als Funktion der Luminanz oB = f(L) TP_COLORTONING_HIGHLIGHT;Lichter TP_COLORTONING_HUE;Farbton TP_COLORTONING_LAB;L*a*b*-Überlagerung @@ -1337,7 +1409,7 @@ TP_COLORTONING_LUMA;Luminanz TP_COLORTONING_LUMAMODE;Luminanz schützen TP_COLORTONING_LUMAMODE_TOOLTIP;Wenn aktiviert, wird die Luminanz der Farben Rot, Grün, Cyan, Blau... geschützt. TP_COLORTONING_METHOD;Methode -TP_COLORTONING_METHOD_TOOLTIP;L*a*b*-Überlagerung, RGB-Regler und RGB-Kurven verwenden eine interpolierte Farbüberlagerung.\n\nFarbausgleich (Schatten/Mitten/Lichter) und Sättigung (2-Farben) verwenden direkte Farben. +TP_COLORTONING_METHOD_TOOLTIP;L*a*b*-Überlagerung, RGB-Regler und RGB-Kurven\nverwenden eine interpolierte Farbüberlagerung.\n\nFarbausgleich (Schatten/Mitten/Lichter) und Sättigung\n(2-Farben) verwenden direkte Farben. TP_COLORTONING_MIDTONES;Mitten TP_COLORTONING_NEUTRAL;Regler zurücksetzen TP_COLORTONING_NEUTRAL_TIP;Alle Werte auf Standard zurücksetzen\n(Schatten, Mitten, Lichter) @@ -1346,7 +1418,7 @@ TP_COLORTONING_RGBCURVES;RGB-Kurven TP_COLORTONING_RGBSLIDERS;RGB-Regler TP_COLORTONING_SA;Sättigung schützen TP_COLORTONING_SATURATEDOPACITY;Intensität -TP_COLORTONING_SATURATIONTHRESHOLD;Schwellenwert +TP_COLORTONING_SATURATIONTHRESHOLD;Schwelle TP_COLORTONING_SHADOWS;Schatten TP_COLORTONING_SPLITCO;Schatten/Mitten/Lichter TP_COLORTONING_SPLITCOCO;Farbausgleich (Schatten/Mitten/Lichter) @@ -1356,7 +1428,7 @@ TP_COLORTONING_STRENGTH;Intensität TP_COLORTONING_TWO2;Spezial-Farbe (2 Farben) TP_COLORTONING_TWOALL;Spezial-Farbe TP_COLORTONING_TWOBY;Spezial a* und b* -TP_COLORTONING_TWOCOLOR_TOOLTIP;Standardfarbe:\nLinearer Verlauf, a* = b*.\n\nSpezial-Farbe:\nLinearer Verlauf, a* = b*, aber nicht verbunden\n\nSpezial a* und b*:\nLinearer Verlauf, nicht verbunden, mit unterschiedlichen Kurven für a* und b*. Bevorzugt für spezielle Effekte.\n\nSpezial-Farbe (2 Farben):\nBesser vorhersehbar +TP_COLORTONING_TWOCOLOR_TOOLTIP;Standardfarbe:\nLinearer Verlauf, a* = b*.\n\nSpezial-Farbe:\nLinearer Verlauf, a* = b*, aber nicht verbunden\n\nSpezial a* und b*:\nLinearer Verlauf, nicht verbunden, mit unterschiedlichen\nKurven für a* und b*. Bevorzugt für spezielle Effekte.\n\nSpezial-Farbe (2 Farben):\nBesser vorhersehbar TP_COLORTONING_TWOSTD;Standardfarbe TP_CROP_FIXRATIO;Format TP_CROP_GTDIAGONALS;Diagonalregel @@ -1380,7 +1452,7 @@ TP_DARKFRAME_AUTOSELECT;Automatische Auswahl TP_DARKFRAME_LABEL;Dunkelbild TP_DEFRINGE_LABEL;Farbsaum entfernen (Defringe) TP_DEFRINGE_RADIUS;Radius -TP_DEFRINGE_THRESHOLD;Schwellenwert +TP_DEFRINGE_THRESHOLD;Schwelle TP_DIRPYRDENOISE_3X3;3×3 TP_DIRPYRDENOISE_3X3_SOFT;3×3 weich TP_DIRPYRDENOISE_5X5;5×5 @@ -1391,21 +1463,21 @@ TP_DIRPYRDENOISE_ABM;Nur Farbe TP_DIRPYRDENOISE_AUT;Automatisch Global TP_DIRPYRDENOISE_AUTO;Automatisch Global TP_DIRPYRDENOISE_AUTO_TOOLTIP;Bewertung des Farbrauschens.\nDie Bewertung ist ungenau und sehr subjektiv! -TP_DIRPYRDENOISE_BLUE;Delta-Chrominanz Blau/Gelb -TP_DIRPYRDENOISE_C2TYPE_TOOLTIP;Benutzerdefiniert:\nManuelle Anpassung der Chrominanz-Rauschreduzierung.\n\nAutomatisch Global:\nEs werden 9 Zonen für die Berechnung der Chrominanz-Rauschreduzierung verwendet.\n\nVorschau:\nNur der sichbare Teil des Bildes wird für die Berechnung der Chrominanz-Rauschreduzierung verwendet. +TP_DIRPYRDENOISE_BLUE;Delta-Chrominanz Blau / Gelb +TP_DIRPYRDENOISE_C2TYPE_TOOLTIP;Benutzerdefiniert:\nManuelle Anpassung der Chrominanz-Rauschreduzierung.\n\nAutomatisch Global:\nEs werden 9 Zonen für die Berechnung der Chrominanz-\nRauschreduzierung verwendet.\n\nVorschau:\nNur der sichbare Teil des Bildes wird für die Berechnung\nder Chrominanz-Rauschreduzierung verwendet. TP_DIRPYRDENOISE_CCCURVE;Chrominanzkurve TP_DIRPYRDENOISE_CHROMA;Chrominanz (Master) TP_DIRPYRDENOISE_CHROMAFR;Chrominanz TP_DIRPYRDENOISE_CTYPE;Methode -TP_DIRPYRDENOISE_CTYPE_TOOLTIP;Benutzerdefiniert:\nManuelle Anpassung der Chrominanz-Rauschreduzierung.\n\nAutomatisch Global:\nEs werden 9 Zonen für die Berechnung der Chrominanz-Rauschreduzierung verwendet.\n\nAuto-Multizonen:\nKeine Voransicht - wird erst beim Speichern angewendet.\nAbhängig von der Bildgröße, wird das Bild in ca. 10 bis 70 Kacheln aufgeteilt. Für jede Kachel wird die Chrominanz-Rauschreduzierung individuell berechnet.\n\nVorschau:\nNur der sichbare Teil des Bildes wird für die Berechnung der Chrominanz-Rauschreduzierung verwendet. +TP_DIRPYRDENOISE_CTYPE_TOOLTIP;Benutzerdefiniert:\nManuelle Anpassung der Chrominanz-Rauschreduzierung.\n\nAutomatisch Global:\nEs werden 9 Zonen für die Berechnung der Chrominanz-\nRauschreduzierung verwendet.\n\nAuto-Multizonen:\nKeine Voransicht - wird erst beim Speichern angewendet.\nAbhängig von der Bildgröße, wird das Bild in ca. 10 bis 70\nKacheln aufgeteilt. Für jede Kachel wird die Chrominanz-\nRauschreduzierung individuell berechnet.\n\nVorschau:\nNur der sichbare Teil des Bildes wird für die Berechnung\nder Chrominanz-Rauschreduzierung verwendet. TP_DIRPYRDENOISE_CUR;Kurve TP_DIRPYRDENOISE_CURVEEDITOR_CC;Farbe -TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Erhöht den Wert aller Chrominanz-Regler und regelt die Chrominanz-Rauschreduzierung als Funktion der Chromatizität. Die Intensität kann über Kontrollpunkte für schwach bis intensiv gesättigte Farben unterschiedlich eingestellt werden. +TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Erhöht den Wert aller Chrominanz-Regler und\nregelt die Chrominanz-Rauschreduzierung als\nFunktion der Chromatizität. Die Intensität kann über\nKontrollpunkte für schwach bis intensiv gesättigte\nFarben unterschiedlich eingestellt werden. TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Moduliert die Wirkung der Luminanz-Rauschreduzierung TP_DIRPYRDENOISE_ENH;Erweiterter Modus TP_DIRPYRDENOISE_ENH_TOOLTIP;Erhöht die Qualität der Rauschreduzierung auf Kosten einer um 20% erhöhten Verarbeitungszeit. TP_DIRPYRDENOISE_GAMMA;Gamma -TP_DIRPYRDENOISE_GAMMA_TOOLTIP;Mit Gamma kann die Intensität der Rauschreduzierung über den Farbbereich variiert werden. Bei kleinen Werten sind nur dunkle Farbtöne betroffen, bei größeren Werten wird der Effekt auf hellere Töne ausgeweitet. +TP_DIRPYRDENOISE_GAMMA_TOOLTIP;Mit Gamma kann die Intensität der\nRauschreduzierung über den Farbbereich\nvariiert werden. Bei kleinen Werten sind\nnur dunkle Farbtöne betroffen, bei\ngrößeren Werten wird der Effekt auf\nhellere Töne ausgeweitet. TP_DIRPYRDENOISE_LAB;L*a*b* TP_DIRPYRDENOISE_LABEL;Rauschreduzierung TP_DIRPYRDENOISE_LABM;L*a*b* @@ -1423,31 +1495,31 @@ TP_DIRPYRDENOISE_MEDMETHOD;Medianmethode TP_DIRPYRDENOISE_MEDTYPE;Mediantyp TP_DIRPYRDENOISE_METHOD;Methode TP_DIRPYRDENOISE_METHOD11;Qualität -TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Einstellung der Qualität der Rauschreduzierung. Die Einstellung “Hoch“ verbessert die Rauschreduzierung auf Kosten der Verarbeitungszeit. -TP_DIRPYRDENOISE_METHOD_TOOLTIP;Für RAW-Bilder kann entweder die RGB- oder L*a*b*-Methode verwendet werden.\n\nFür andere Bilder wird unabhängig von der Auswahl immer die L*a*b*-Methode verwendet. -TP_DIRPYRDENOISE_METM_TOOLTIP;Bei der Methode “Nur Luminanz“ und “L*a*b*“, wird der Medianfilter nach den Waveletschritten verarbeitet.\nBei RGB wird der Medianfilter am Ende der Rauschreduzierung verarbeitet. -TP_DIRPYRDENOISE_MET_TOOLTIP;Einen Medianfilter mit der gewünschten Fenstergröße auswählen. Je größer das Fenster, umso länger dauert die Verarbeitungszeit.\n\n3×3 weich: Nutzt 5 Pixel in einem 3×3-Pixelfenster.\n3×3: Nutzt 9 Pixel in einem 3×3-Pixelfenster.\n5×5 weich: Nutzt 13 Pixel in einem 5×5-Pixelfenster.\n5×5: Nutzt 25 Pixel in einem 5×5-Pixelfenster.\n7×7: Nutzt 49 Pixel in einem 7×7-Pixelfenster.\n9×9: Nutzt 81 Pixel in einem 9×9-Pixelfenster.\n\nManchmal ist das Ergebnis mit einem kleineren Fenster und mehreren Iterationen besser, als mit einem größeren und nur einer Iteration. -TP_DIRPYRDENOISE_NOISELABEL;Rauschen: Mittelwert=%1 Hoch=%2 +TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Einstellung der Qualität der Rauschreduzierung.\nDie Einstellung “Hoch“ verbessert die Rausch-\nreduzierung auf Kosten der Verarbeitungszeit. +TP_DIRPYRDENOISE_METHOD_TOOLTIP;Für RAW-Bilder kann entweder die RGB-\noder L*a*b*-Methode verwendet werden.\n\nFür andere Bilder wird unabhängig von der\nAuswahl immer die L*a*b*-Methode verwendet. +TP_DIRPYRDENOISE_METM_TOOLTIP;Bei der Methode “Nur Luminanz“ und “L*a*b*“,\nwird der Medianfilter nach den Waveletschritten\nverarbeitet.\nBei RGB wird der Medianfilter am Ende der\nRauschreduzierung verarbeitet. +TP_DIRPYRDENOISE_MET_TOOLTIP;Einen Medianfilter mit der gewünschten Fenstergröße auswählen.\nJe größer das Fenster, umso länger dauert die Verarbeitungszeit.\n\n3×3 weich: Nutzt 5 Pixel in einem 3×3-Pixelfenster.\n3×3: Nutzt 9 Pixel in einem 3×3-Pixelfenster.\n5×5 weich: Nutzt 13 Pixel in einem 5×5-Pixelfenster.\n5×5: Nutzt 25 Pixel in einem 5×5-Pixelfenster.\n7×7: Nutzt 49 Pixel in einem 7×7-Pixelfenster.\n9×9: Nutzt 81 Pixel in einem 9×9-Pixelfenster.\n\nManchmal ist das Ergebnis mit einem kleineren Fenster und mehreren Iterationen besser, als mit einem größeren und nur einer Iteration. +TP_DIRPYRDENOISE_NOISELABEL;Rauschen: Mittelwert = %1 Hoch = %2 TP_DIRPYRDENOISE_NOISELABELEMPTY;Rauschen: Mittelwert = --- Hoch = --- -TP_DIRPYRDENOISE_NRESID_TOOLTIP;Zeigt das Restrauschen des sichtbaren Bildbereichs in der 100%-Ansicht an.\n\n<50: Sehr wenig Rauschen\n50 - 100: Wenig Rauschen\n100 - 300: Durchschnittliches Rauschen\n>300: Hohes Rauschen\n\nDie Werte unterscheiden sich im L*a*b*- und RGB-Modus. Die RGB-Werte sind ungenauer, da der RGB-Modus Luminanz und Chrominanz nicht komplett trennt. +TP_DIRPYRDENOISE_NRESID_TOOLTIP;Zeigt das Restrauschen des sichtbaren Bildbereichs\nin der 100%-Ansicht an.\n\n<50: Sehr wenig Rauschen\n50 - 100: Wenig Rauschen\n100 - 300: Durchschnittliches Rauschen\n>300: Hohes Rauschen\n\nDie Werte unterscheiden sich im L*a*b*- und RGB-Modus.\nDie RGB-Werte sind ungenauer, da der RGB-Modus\nLuminanz und Chrominanz nicht komplett trennt. TP_DIRPYRDENOISE_PASSES;Medianiterationen -TP_DIRPYRDENOISE_PASSES_TOOLTIP;Manchmal führt ein kleines 3×3-Fenster mit mehreren Iterationen zu besseren Ergebnissen als ein 7×7-Fenster mit nur einer Iteration. +TP_DIRPYRDENOISE_PASSES_TOOLTIP;Manchmal führt ein kleines 3×3-Fenster mit\nmehreren Iterationen zu besseren Ergebnissen\nals ein 7×7-Fenster mit nur einer Iteration. TP_DIRPYRDENOISE_PON;Auto-Multizonen TP_DIRPYRDENOISE_PRE;Vorschau TP_DIRPYRDENOISE_PREV;Vorschau -TP_DIRPYRDENOISE_PREVLABEL;Vorschaugröße=%1, Zentrum: Px=%2 Py=%2 -TP_DIRPYRDENOISE_RED;Delta-Chrominanz Rot/Grün +TP_DIRPYRDENOISE_PREVLABEL;Vorschaugröße = %1, Zentrum: Px = %2 Py = %2 +TP_DIRPYRDENOISE_RED;Delta-Chrominanz Rot / Grün TP_DIRPYRDENOISE_RGB;RGB TP_DIRPYRDENOISE_RGBM;RGB TP_DIRPYRDENOISE_SHAL;Standard TP_DIRPYRDENOISE_SHALBI;Hoch TP_DIRPYRDENOISE_SLI;Regler -TP_DIRPYRDENOISE_TILELABEL;Kachelgröße=%1 Zentrum: Tx=%2 Ty=%2 +TP_DIRPYRDENOISE_TILELABEL;Kachelgröße = %1 Zentrum: Tx = %2 Ty = %2 TP_DIRPYREQUALIZER_ALGO;Hautfarbtonbereich TP_DIRPYREQUALIZER_ALGO_TOOLTIP;Fein: Ist näher an den Hautfarbtönen und minimiert den Einfluss auf andere Farben.\n\nGrob: Minimiert Artefakte. TP_DIRPYREQUALIZER_ARTIF;Artefakte reduzieren TP_DIRPYREQUALIZER_HUESKIN;Hautfarbton -TP_DIRPYREQUALIZER_HUESKIN_TOOLTIP;Wenn Sie den Bereich signifikant nach Links oder Rechts verschieben müssen, ist der Weißabgleich nicht richtig gewählt.\n\nWählen Sie den eingeschlossenen Bereich so eng wie möglich, um den Einfluss auf benachbarte Farben zu verhindern. +TP_DIRPYREQUALIZER_HUESKIN_TOOLTIP;Wenn Sie den Bereich signifikant nach Links\noder Rechts verschieben müssen, ist der\nWeißabgleich nicht richtig gewählt.\nWählen Sie den eingeschlossenen Bereich so\neng wie möglich, um den Einfluss auf benachbarte\nFarben zu verhindern. TP_DIRPYREQUALIZER_LABEL;Detailebenenkontrast TP_DIRPYREQUALIZER_LUMACOARSEST;Grob TP_DIRPYREQUALIZER_LUMACONTRAST_MINUS;Kontrast - @@ -1456,11 +1528,10 @@ TP_DIRPYREQUALIZER_LUMAFINEST;Fein TP_DIRPYREQUALIZER_LUMANEUTRAL;Neutral TP_DIRPYREQUALIZER_SKIN;Hautfarbtöne schützen TP_DIRPYREQUALIZER_SKIN_TOOLTIP;-100: Nur Farben innerhalb des Bereichs werden verändert.\n0: Alle Farben werden gleich behandelt.\n+100: Nur Farben außerhalb des Bereichs werden verändert. -TP_DIRPYREQUALIZER_THRESHOLD;Schwellenwert -TP_DIRPYREQUALIZER_TOOLTIP;Verringert Artefakte an den Übergängen zwischen Hautfarbtöne und dem Rest des Bildes. +TP_DIRPYREQUALIZER_THRESHOLD;Schwelle +TP_DIRPYREQUALIZER_TOOLTIP;Verringert Artefakte an den Übergängen\nzwischen Hautfarbtöne und dem Rest\ndes Bildes. TP_DISTORTION_AMOUNT;Intensität -TP_DISTORTION_AUTO;Autom. Verzeichnungskorrektur -TP_DISTORTION_AUTO_TIP;Objektivverzeichnungen automatisch korrigieren (nur für bestimmte Kameras, z.B. Micro 4/3, einige Kompaktkameras, usw.) +TP_DISTORTION_AUTO_TIP;Korrigiert die Verzeichnung in RAW-Bildern durch Vergleich mit dem eingebetten JPEG, falls dieses existiert und die Verzeichnung durch die Kamera korrigiert wurde. TP_DISTORTION_LABEL;Verzeichnungskorrektur TP_EPD_EDGESTOPPING;Kantenschutz TP_EPD_GAMMA;Gamma @@ -1470,13 +1541,13 @@ TP_EPD_SCALE;Faktor TP_EPD_STRENGTH;Intensität TP_EPD_TOOLTIP;Dynamikkompression ist mit dem L*a*b*- und CIECAM02-Modus möglich.\n\nFür den CIECAM02-Modus müssen folgende Optionen aktiviert sein:\n1. CIECAM02\n2. Algorithmus = Helligkeit + Farbigkeit (QM)\n3. Dynamikkompression mittels CIECAM02-Helligkeit (Q) TP_EXPOSURE_AUTOLEVELS;Auto -TP_EXPOSURE_AUTOLEVELS_TIP;Automatische Belichtungseinstellung basierend auf Bildanalyse +TP_EXPOSURE_AUTOLEVELS_TIP;Automatische Belichtungseinstellung\nbasierend auf Bildanalyse. TP_EXPOSURE_BLACKLEVEL;Schwarzwert TP_EXPOSURE_BRIGHTNESS;Helligkeit TP_EXPOSURE_CLIP;Clip %: -TP_EXPOSURE_CLIP_TIP;Anteil der Pixel, die sich bei automatischer Belichtungseinstellung im Bereich der Spitzlichter und Schatten befinden sollen +TP_EXPOSURE_CLIP_TIP;Anteil der Pixel, die sich bei automatischer\nBelichtungseinstellung im Bereich der\nSpitzlichter und Schatten befinden sollen. TP_EXPOSURE_COMPRHIGHLIGHTS;Lichterkompression -TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD;Lichterkompression Schwellenwert +TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD;Lichterkompression Schwelle TP_EXPOSURE_COMPRSHADOWS;Schattenkompression TP_EXPOSURE_CONTRAST;Kontrast TP_EXPOSURE_CURVEEDITOR1;Tonwertkurve 1 @@ -1507,7 +1578,7 @@ TP_FLATFIELD_BT_HORIZONTAL;Horizontal TP_FLATFIELD_BT_VERTHORIZ;Vertikal + Horizontal TP_FLATFIELD_BT_VERTICAL;Vertikal TP_FLATFIELD_CLIPCONTROL;Kontrolle zu heller Bereiche -TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Verhindert das Abschneiden der Lichter. Wenn vor dem Anwenden des Weißbildes schon abgeschnittene Lichter vorhanden sind, kann es zu einem Farbstich kommen. +TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Verhindert das Abschneiden der Lichter. Wenn\nvor dem Anwenden des Weißbildes schon\nabgeschnittene Lichter vorhanden sind, kann\nes zu einem Farbstich kommen. TP_FLATFIELD_LABEL;Weißbild TP_GAMMA_CURV;Gamma TP_GAMMA_FREE;Freies Gamma @@ -1529,7 +1600,7 @@ TP_GRADIENT_STRENGTH_TOOLTIP;Filterstärke in Blendenstufen TP_HLREC_BLEND;Überlagerung TP_HLREC_CIELAB;CIELab-Überlagerung TP_HLREC_COLOR;Farbübertragung -TP_HLREC_ENA_TOOLTIP;Wird bei Verwendung der automatischen Belichtungskorrektur möglicherweise aktiviert +TP_HLREC_ENA_TOOLTIP;Wird bei Verwendung der automatischen\nBelichtungskorrektur möglicherweise\naktiviert. TP_HLREC_LABEL;Lichter rekonstruieren TP_HLREC_LUMINANCE;Luminanz wiederherstellen TP_HLREC_METHOD;Methode: @@ -1539,25 +1610,26 @@ TP_HSVEQUALIZER_LABEL;Farbton (H) / Sättigung (S) / Dynamik (V) TP_HSVEQUALIZER_SAT;S TP_HSVEQUALIZER_VAL;V TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Basisbelichtung -TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Den eingebetteten DCP-Basisbelichtungsausgleich anwenden. Die Einstellung ist nur verfügbar wenn sie vom Eingangsfarbprofil unterstützt wird. +TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Die eingebettete DCP-Basisbelichtung verwenden.\nDie Einstellung ist nur verfügbar wenn sie vom\nEingangsfarbprofil unterstützt wird. TP_ICM_APPLYHUESATMAP;Basistabelle -TP_ICM_APPLYHUESATMAP_TOOLTIP;Die eingebettete DCP-Basistabelle anwenden. Die Einstellung ist nur verfügbar wenn sie vom Eingangsfarbprofil unterstützt wird. +TP_ICM_APPLYHUESATMAP_TOOLTIP;Die eingebettete DCP-Basistabelle verwenden.\nDie Einstellung ist nur verfügbar wenn sie vom\nEingangsfarbprofil unterstützt wird. TP_ICM_APPLYLOOKTABLE;“Look“-Tabelle -TP_ICM_APPLYLOOKTABLE_TOOLTIP;Die eingebettete DCP-“Look“-Tabelle anwenden. Die Einstellung ist nur verfügbar wenn sie vom Eingangsfarbprofil unterstützt wird. +TP_ICM_APPLYLOOKTABLE_TOOLTIP;Die eingebettete DCP-“Look“-Tabelle verwenden.\nDie Einstellung ist nur verfügbar wenn sie vom\nEingangsfarbprofil unterstützt wird. TP_ICM_BLENDCMSMATRIX;ICC Lichter mit Matrix überlagern TP_ICM_BLENDCMSMATRIX_TOOLTIP;Stellt bei Verwendung von LUT-basierten ICC-Profilen die Lichter wieder her. +TP_ICM_BPC;Schwarzpunkt-Kompensation TP_ICM_DCPILLUMINANT;Illumination TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpoliert -TP_ICM_DCPILLUMINANT_TOOLTIP;DCP-Illumination auswählen.\nVorgabe ist Interpoliert. Die Einstellung ist nur verfügbar wenn sie vom Eingangsfarbprofil unterstützt wird. +TP_ICM_DCPILLUMINANT_TOOLTIP;DCP-Illumination auswählen. Vorgabe ist\nInterpoliert. Die Einstellung ist nur verfügbar\nwenn sie vom Eingangsfarbprofil unterstützt\nwird. TP_ICM_INPUTCAMERA;Kamera-Standard TP_ICM_INPUTCAMERAICC;Kameraspezifisches Profil -TP_ICM_INPUTCAMERAICC_TOOLTIP;Verwendet RawTherapees kameraspezifisches DCP/ICC-Eingangsfarbprofil, welches präziser als eine einfache Matrix ist -TP_ICM_INPUTCAMERA_TOOLTIP;Benutzt eine einfache Farbmatrix von DCRAW, eine erweiterte RawTherapee-Version oder eine aus einem DNG. +TP_ICM_INPUTCAMERAICC_TOOLTIP;Verwendet RawTherapees kameraspezifisches\nDCP/ICC-Eingangsfarbprofil, welches präziser als\neine einfache Matrix ist +TP_ICM_INPUTCAMERA_TOOLTIP;Benutzt eine einfache Farbmatrix von DCRAW,\neine erweiterte RawTherapee-Version oder eine\naus einem DNG. TP_ICM_INPUTCUSTOM;DCP/ICC-Profil TP_ICM_INPUTCUSTOM_TOOLTIP;Eigenes DCP/ICC-Farbprofil verwenden TP_ICM_INPUTDLGLABEL;DCP/ICC-Profil wählen... TP_ICM_INPUTEMBEDDED;Eingebettetes Profil verwenden -TP_ICM_INPUTEMBEDDED_TOOLTIP;Farbprofil verwenden, das in Nicht-RAW-Bildern eingebettet ist +TP_ICM_INPUTEMBEDDED_TOOLTIP;Farbprofil verwenden, das in Nicht-RAW-Bildern\neingebettet ist TP_ICM_INPUTNONE;Kein Profil TP_ICM_INPUTNONE_TOOLTIP;Kein Eingangsfarbprofil verwenden TP_ICM_INPUTPROFILE;Eingangsfarbprofil @@ -1565,17 +1637,17 @@ TP_ICM_LABEL;Farbmanagement TP_ICM_NOICM;Kein ICM: sRGB-Ausgabe TP_ICM_OUTPUTPROFILE;Ausgabeprofil TP_ICM_PROFILEINTENT;Rendering Intent -TP_ICM_SAVEREFERENCE;Referenzbild für Profil speichern +TP_ICM_SAVEREFERENCE;Referenzbild speichern TP_ICM_SAVEREFERENCE_APPLYWB;Weißabgleich anwenden TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Um ICC-Profile zu erstellen, den Weißabgleich beim Speichern anwenden. Um DCP-Profile zu erstellen, den Weißabgleich NICHT beim Speichern anwenden. -TP_ICM_SAVEREFERENCE_TOOLTIP;Speichert das lineare TIFF-Bild bevor das Eingangsfarbprofil angewendet wird. Das Ergebnis kann zu Kalibrierungsaufgaben und zum Erstellen von Kameraprofilen verwendet werden. +TP_ICM_SAVEREFERENCE_TOOLTIP;Speichert das lineare TIFF-Bild bevor das\nEingangsfarbprofil angewendet wird. Das\nErgebnis kann zu Kalibrierungsaufgaben\nund zum Erstellen von Kameraprofilen\nverwendet werden. TP_ICM_TONECURVE;Tonwertkurve -TP_ICM_TONECURVE_TOOLTIP;Eingebettete DCP-Tonwertkurve verwenden. Die Einstellung ist nur verfügbar wenn sie vom Eingangsfarbprofil unterstützt wird. +TP_ICM_TONECURVE_TOOLTIP;Eingebettete DCP-Tonwertkurve verwenden.\nDie Einstellung ist nur verfügbar wenn sie\nvom Eingangsfarbprofil unterstützt wird. TP_ICM_WORKINGPROFILE;Arbeitsfarbraum TP_IMPULSEDENOISE_LABEL;Impulsrauschreduzierung -TP_IMPULSEDENOISE_THRESH;Schwellenwert +TP_IMPULSEDENOISE_THRESH;Schwelle TP_LABCURVE_AVOIDCOLORSHIFT;Farbverschiebungen vermeiden -TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Anpassung der Farben an den Arbeitsfarbraum und Anwendung der Munsellkorrektur. +TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Anpassung der Farben an den Arbeitsfarbraum\nund Anwendung der Munsellkorrektur. TP_LABCURVE_BRIGHTNESS;Helligkeit TP_LABCURVE_CHROMATICITY;Chromatizität TP_LABCURVE_CHROMA_TOOLTIP;Für Schwarz/Weiß setzen Sie die Chromatizität auf -100. @@ -1594,23 +1666,23 @@ TP_LABCURVE_CURVEEDITOR_CC_RANGE1;Neutral TP_LABCURVE_CURVEEDITOR_CC_RANGE2;Matt TP_LABCURVE_CURVEEDITOR_CC_RANGE3;Pastell TP_LABCURVE_CURVEEDITOR_CC_RANGE4;Gesättigt -TP_LABCURVE_CURVEEDITOR_CC_TOOLTIP;Chromatizität als Funktion der Chromatizität C=f(C) +TP_LABCURVE_CURVEEDITOR_CC_TOOLTIP;Chromatizität als Funktion der Chromatizität C = f(C) TP_LABCURVE_CURVEEDITOR_CH;CH -TP_LABCURVE_CURVEEDITOR_CH_TOOLTIP;Chromatizität als Funktion des Farbtons C=f(H) +TP_LABCURVE_CURVEEDITOR_CH_TOOLTIP;Chromatizität als Funktion des Farbtons C = f(H) TP_LABCURVE_CURVEEDITOR_CL;CL -TP_LABCURVE_CURVEEDITOR_CL_TOOLTIP;Chromatizität als Funktion der Luminanz C=f(L) +TP_LABCURVE_CURVEEDITOR_CL_TOOLTIP;Chromatizität als Funktion der Luminanz C = f(L) TP_LABCURVE_CURVEEDITOR_HH;HH -TP_LABCURVE_CURVEEDITOR_HH_TOOLTIP;Farbton als Funktion des Farbtons H=f(H) +TP_LABCURVE_CURVEEDITOR_HH_TOOLTIP;Farbton als Funktion des Farbtons H = f(H) TP_LABCURVE_CURVEEDITOR_LC;LC -TP_LABCURVE_CURVEEDITOR_LC_TOOLTIP;Luminanz als Funktion der Chromatizität L=f(C) +TP_LABCURVE_CURVEEDITOR_LC_TOOLTIP;Luminanz als Funktion der Chromatizität L = f(C) TP_LABCURVE_CURVEEDITOR_LH;LH -TP_LABCURVE_CURVEEDITOR_LH_TOOLTIP;Luminanz als Funktion des Farbtons L=f(H) -TP_LABCURVE_CURVEEDITOR_LL_TOOLTIP;Luminanz als Funktion der Luminanz L=f(L) +TP_LABCURVE_CURVEEDITOR_LH_TOOLTIP;Luminanz als Funktion des Farbtons L = f(H) +TP_LABCURVE_CURVEEDITOR_LL_TOOLTIP;Luminanz als Funktion der Luminanz L = f(L) TP_LABCURVE_LABEL;L*a*b* - Anpassungen TP_LABCURVE_LCREDSK;LC-Kurve auf Hautfarbtöne beschränken -TP_LABCURVE_LCREDSK_TIP;Wenn aktiviert, wird die LC-Kurve auf Hautfarbtöne beschränkt.\nWenn deaktiviert, wird die LC-Kurve auf alle Farbtöne angewendet. +TP_LABCURVE_LCREDSK_TIP;Wenn aktiviert, wird die LC-Kurve auf\nHautfarbtöne beschränkt.\nWenn deaktiviert, wird die LC-Kurve auf\nalle Farbtöne angewendet. TP_LABCURVE_RSTPROTECTION;Hautfarbtöne schützen -TP_LABCURVE_RSTPRO_TOOLTIP;Kann mit dem Chromatizitätsregler und der CC-Kurve verwendet werden. +TP_LABCURVE_RSTPRO_TOOLTIP;Kann mit dem Chromatizitätsregler und\nder CC-Kurve verwendet werden. TP_LENSGEOM_AUTOCROP;Auto-Schneiden TP_LENSGEOM_FILL;Auto-Füllen TP_LENSGEOM_LABEL;Objektivkorrekturen @@ -1619,7 +1691,7 @@ TP_LENSPROFILE_USECA;CA korrigieren TP_LENSPROFILE_USEDIST;Verzeichnung korrigieren TP_LENSPROFILE_USEVIGN;Vignettierung korrigieren TP_NEUTRAL;Zurücksetzen -TP_NEUTRAL_TIP;Belichtungseinstellungen auf neutrale Werte zurücksetzen +TP_NEUTRAL_TIP;Belichtungseinstellungen auf\nneutrale Werte zurücksetzen TP_PCVIGNETTE_FEATHER;Bereich TP_PCVIGNETTE_FEATHER_TOOLTIP;Bereich:\n0 = nur Bildecken\n50 = halbe Strecke zum Mittelpunkt\n100 = bis zum Mittelpunkt TP_PCVIGNETTE_LABEL;Vignettierungsfilter @@ -1631,7 +1703,7 @@ TP_PERSPECTIVE_HORIZONTAL;Horizontal TP_PERSPECTIVE_LABEL;Perspektive TP_PERSPECTIVE_VERTICAL;Vertikal TP_PFCURVE_CURVEEDITOR_CH;Farbton -TP_PFCURVE_CURVEEDITOR_CH_TOOLTIP;Regelt die Intensität der Farbsaumentfernung nach Farben. Je höher die Kurve desto stärker ist der Effekt. +TP_PFCURVE_CURVEEDITOR_CH_TOOLTIP;Regelt die Intensität der Farbsaumentfernung\nnach Farben. Je höher die Kurve desto stärker\nist der Effekt. TP_PREPROCESS_DEADPIXFILT;Dead-Pixel-Filter TP_PREPROCESS_DEADPIXFILT_TOOLTIP;Entfernt tote Pixel TP_PREPROCESS_GREENEQUIL;Grün-Ausgleich @@ -1641,7 +1713,7 @@ TP_PREPROCESS_LABEL;Vorverarbeitung TP_PREPROCESS_LINEDENOISE;Zeilenrauschfilter TP_PREPROCESS_NO_FOUND;Nichts gefunden TP_PRSHARPENING_LABEL;Nach Skalierung schärfen -TP_PRSHARPENING_TOOLTIP;Schärft das Bild nach der Größenänderung. Funktioniert nur mit der Methode „Lanczos“. Das Ergebnis wird nicht in RawTherapee angezeigt.\nWeitere Informationen finden Sie in „RawPedia“. +TP_PRSHARPENING_TOOLTIP;Schärft das Bild nach der Größenänderung.\nFunktioniert nur mit der Methode “Lanczos“.\nDas Ergebnis wird nicht in RawTherapee\nangezeigt.\n\nWeitere Informationen finden Sie auf “RawPedia“. TP_RAWCACORR_AUTO;Automatische Korrektur TP_RAWCACORR_CABLUE;Blau TP_RAWCACORR_CARED;Rot @@ -1658,21 +1730,82 @@ TP_RAWEXPOS_LINEAR;Korrekturfaktor TP_RAWEXPOS_PRESER;Weißpunkt: Lichter schützen TP_RAWEXPOS_RGB;Rot, Grün, Blau TP_RAWEXPOS_TWOGREEN;Grün-Werte automatisch angleichen +TP_RAW_1PASSMEDIUM;1-Pass (Medium) +TP_RAW_3PASSBEST;3-Pass (Beste) +TP_RAW_AHD;AHD +TP_RAW_AMAZE;AMaZE +TP_RAW_DCB;DCB TP_RAW_DCBENHANCE;DCB-Verbesserung TP_RAW_DCBITERATIONS;Anzahl der DCB-Iterationen TP_RAW_DMETHOD;Methode TP_RAW_DMETHOD_PROGRESSBAR;%1 verarbeitet TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaikoptimierung -TP_RAW_DMETHOD_TOOLTIP;Hinweis: IGV und LMMSE ist speziell für Bilder mit hohen ISO-Werten reserviert und verbessert die Rauschreduzierung. -TP_RAW_FALSECOLOR;Falschfarbenunterdrückung -TP_RAW_HD;Schwellenwert -TP_RAW_HD_TOOLTIP;Je niedriger der Wert, umso empfindlicher reagiert die “Hot/Dead-Pixel-Erkennung“. Ist die Empfindlichkeit zu hoch, können Artefakte entstehen. Erhöhen Sie in diesem Fall den Schwellenwert, bis die Artefakte verschwinden. +TP_RAW_DMETHOD_TOOLTIP;IGV und LMMSE sind speziel für High-ISO-Aufnahmen um die\nRauschreduzierung zu unterstützen ohne zu Maze-Mustern,\nPosterisierung oder einem ausgewaschenen Look zu führen.\n\nPixel Shift ist für “Pentax Pixel Shift“-Dateien. Für "Nicht-Pixel-\nShift"-Dateien wird automatisch AMaZE verwendet. +TP_RAW_EAHD;EAHD +TP_RAW_FALSECOLOR;Falschfarbenreduzierung +TP_RAW_FAST;Schnell +TP_RAW_HD;Schwelle +TP_RAW_HD_TOOLTIP;Je niedriger der Wert, umso empfindlicher reagiert\ndie “Hot / Dead-Pixel-Erkennung“.\nIst die Empfindlichkeit zu hoch, können Artefakte\nentstehen. Erhöhen Sie in diesem Fall die Schwelle,\nbis die Artefakte verschwinden. +TP_RAW_HPHD;HPHD +TP_RAW_IGV;IGV +TP_RAW_IMAGENUM;Unterbild +TP_RAW_IMAGENUM_TOOLTIP;Einige RAW-Formate enthalten mehrere Unterbilder (Pentax Pixel Shift,\nPentax 3-in-1 HDR, Canon Dual Pixel).\n\n> Auswahl des zu verwendenden Unterbildes (nicht bei Pixel Shift).\n\n> Legt das Unterbild für die Bewegungsbereiche bei Pixel Shift fest. TP_RAW_LABEL;Farbinterpolation +TP_RAW_LMMSE;LMMSE TP_RAW_LMMSEITERATIONS;LMMSE-Verbesserungsstufen -TP_RAW_LMMSE_TOOLTIP;Fügt Gamma (Stufe 1), Median (Stufe 2-4) und Optimierung (Stufe 5-6) zur Minimierung von Artefakten hinzu und verbessert das Signalrauschverhältnis. +TP_RAW_LMMSE_TOOLTIP;Fügt Gamma (Stufe 1), Median (Stufe 2-4)\nund Optimierung (Stufe 5-6) zur Minimierung\nvon Artefakten hinzu und verbessert das\nSignalrauschverhältnis. +TP_RAW_MONO;Mono +TP_RAW_NONE;Keine +TP_RAW_PIXELSHIFT;Pixel Shift +TP_RAW_PIXELSHIFTADAPTIVE;Adaptive Erkennung +TP_RAW_PIXELSHIFTBLUR;Unschärfebewegungsmaske +TP_RAW_PIXELSHIFTEPERISO;ISO-Anpassung +TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;Der Standardwert (0.0) empfiehlt sich für die Basis-ISO.\nErhöhen Sie den Wert, um die Bewegungserkennung für höhere ISO-Werte zu verbessern.\nErhöhen Sie den Wert nur in kleinen Schritten und achten Sie dabei auf die Bewegungsmaske. +TP_RAW_PIXELSHIFTEQUALBRIGHT;Frame-Helligkeit angleichen +TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Ausgleich pro Kanal +TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;EIN: Individueller Ausgleich der RGB-Kanäle.\nAUS: Identischer Ausgleichsfaktor für alle Kanäle. +TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Gleicht die Helligkeit der Frames an den aktuellen Frame an.\n\nSind überbelichtete Bereiche vorhanden wählen Sie den hellsten Frame aus um\nMagenta-Farbstiche zu vermeiden oder aktivieren Sie die Bewegungskorrektur. +TP_RAW_PIXELSHIFTEXP0;Experimentell +TP_RAW_PIXELSHIFTGREEN;Bewegung im Grün-Kanal erkennen +TP_RAW_PIXELSHIFTHOLEFILL;Lücken in der Bewegungsmaske erkennen +TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Lücken in der Bewegungsmaske erkennen +TP_RAW_PIXELSHIFTLMMSE;LMMSE für Bewegungsbereiche verwenden +TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;LMMSE anstatt AMaZE für bewegte Bildbereiche verwenden.\nSinnvoll bei High-ISO-Aufnahmen. +TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +TP_RAW_PIXELSHIFTMEDIAN;Median +TP_RAW_PIXELSHIFTMEDIAN3;Aktuellen Frame vom Median ausschließen. +TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Schließt den aktuellen Frame vom Median aus.\nNützlich, wenn sich bewegte Objekte im Frame 2\nund 3 überlappen. +TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Verwenden Sie den Median aller Frames anstelle des\nausgewählten Frames für Regionen mit Bewegung.\nEntfernt Objekte, die an verschiedenen Stellen in allen\nFrames vorkommen. Erzeugt einen Bewegungseffekt\nauf langsame (überlappende) Objekte. +TP_RAW_PIXELSHIFTMM_AUTO;Automatisch +TP_RAW_PIXELSHIFTMM_CUSTOM;Benutzerdefiniert +TP_RAW_PIXELSHIFTMM_OFF;Aus +TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +TP_RAW_PIXELSHIFTMOTIONMETHOD;Bewegungskorrektur +TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 = Keine Bewegungserkennung\n1 - 99 = Bewegung wird entsprechend dem Wert erkannt.\nHöhere Werte erhöhen die Trefferquote\n100 = Der mit AMaZE interpolierte Frame wird verwendet. +TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue amaze +TP_RAW_PIXELSHIFTNONGREENCROSS;Bewegung im Rot/Blau-Kanal erkennen +TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green amaze +TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +TP_RAW_PIXELSHIFTNREADISO;nRead +TP_RAW_PIXELSHIFTPRNU;PRNU (%) +TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +TP_RAW_PIXELSHIFTSHOWMOTION;Bewegungsmaske anzeigen +TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Nur Maske anzeigen +TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Zeigt die Bewegungsmaske ohne Bild. +TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Überlagert das Bild mit einer Maske um die\nBereiche mit Bewegung hervorzuheben. +TP_RAW_PIXELSHIFTSIGMA;Unschärferadius +TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;Der Standard-Radius von 1,0 passt in der Regel für die Basis-ISO.\nErhöhen Sie den Wert für High-ISO-Aufnahmen, 5,0 ist ein guter\nAusgangspunkt für High-ISO-Aufnahmen. Achten Sie auf die\nBewegungsmaske, während Sie den Wert ändern. +TP_RAW_PIXELSHIFTSMOOTH;Weicher Übergang +TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Weicher Übergang zwischen Bereichen mit und ohne Bewegung.\n0 = Aus\n1 = AMaZE/LMMSE oder Median +TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red TP_RAW_SENSOR_BAYER_LABEL;Sensor mit Bayer-Matrix -TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;Mit “3-pass“ erzielt man die besten Ergebnisse (empfohlen bei Bildern mit niedrigen ISO-Werten).\n\nBei hohen ISO-Werten unterscheidet sich “1-pass“ kaum gegenüber “3-pass“, ist aber deutlich schneller. +TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;Mit “3-Pass“ erzielt man die besten Ergebnisse\n(empfohlen bei Bildern mit niedrigen ISO-Werten).\n\nBei hohen ISO-Werten unterscheidet sich “1-Pass“\nkaum gegenüber “3-Pass“, ist aber deutlich schneller. TP_RAW_SENSOR_XTRANS_LABEL;Sensor mit X-Trans-Matrix +TP_RAW_VNG4;VNG4 TP_RESIZE_APPLIESTO;Anwenden auf: TP_RESIZE_CROPPEDAREA;Ausschnitt TP_RESIZE_FITBOX;Begrenzungsrahmen @@ -1691,18 +1824,18 @@ TP_RETINEX_CONTEDIT_HSL;HSL-Kurve TP_RETINEX_CONTEDIT_LAB;Luminanz (L) L*a*b* TP_RETINEX_CONTEDIT_LH;Farbton (H) TP_RETINEX_CONTEDIT_MAP;Maskenkurve -TP_RETINEX_CURVEEDITOR_CD;L=f(L) -TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;Luminanz in Abhängigkeit der Luminanz.\nKorrigiert direkt die RAW-Daten, um Halos und Artefakte zu verringern. -TP_RETINEX_CURVEEDITOR_LH;Intensität=f(H) -TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Intensität in Abhängigkeit des Farbtons (H)\nBei der Retinex-Methode "Spitzlichter" wirken sich die Änderungen auch auf die Chromakorrektur aus. -TP_RETINEX_CURVEEDITOR_MAP;L=f(L) -TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;Die Kurve kann entweder alleine, oder mit der Gaußschen- oder Waveletmaske angewendet werden.\nArtefakte beachten! +TP_RETINEX_CURVEEDITOR_CD;L = f(L) +TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;Luminanz in Abhängigkeit der Luminanz.\nKorrigiert direkt die RAW-Daten, um Halos\nund Artefakte zu verringern. +TP_RETINEX_CURVEEDITOR_LH;Intensität = f(H) +TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Intensität in Abhängigkeit des Farbtons (H)\nBei der Retinex-Methode "Spitzlichter" wirken sich die\nÄnderungen auch auf die Chromakorrektur aus. +TP_RETINEX_CURVEEDITOR_MAP;L = f(L) +TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;Die Kurve kann entweder alleine, mit der\nGaußschen- oder Waveletmaske angewendet\nwerden. Artefakte beachten! TP_RETINEX_EQUAL;Korrekturen TP_RETINEX_FREEGAMMA;Gamma TP_RETINEX_GAIN;Kontrast TP_RETINEX_GAINOFFS;Verstärkung und Ausgleich (Helligkeit) TP_RETINEX_GAINTRANSMISSION;Transmissionsverstärkung -TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Ändert die Helligkeit durch Verstärken oder\nReduzieren der Transmissionskarte. +TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Ändert die Helligkeit durch Verstärkung oder\nAbschwächung der Transmissionskarte. TP_RETINEX_GAIN_TOOLTIP;Wirkt sich auf das verarbeitete Bild aus. Wird für schwarze oder weiße Pixel verwendet und hilft das Histogramm auszugleichen. TP_RETINEX_GAMMA;Gammakorrektur TP_RETINEX_GAMMA_FREE;Benutzerdefiniert @@ -1710,20 +1843,20 @@ TP_RETINEX_GAMMA_HIGH;Hoch TP_RETINEX_GAMMA_LOW;Niedrig TP_RETINEX_GAMMA_MID;Mittel TP_RETINEX_GAMMA_NONE;Keine -TP_RETINEX_GAMMA_TOOLTIP;Stellt Farbtöne vor und nach der Retinexverarbeitung durch eine Gammakorrektur wieder her. +TP_RETINEX_GAMMA_TOOLTIP;Stellt Farbtöne vor und nach der Retinexverarbeitung\ndurch eine Gammakorrektur wieder her. TP_RETINEX_GRAD;Transmission Gradient TP_RETINEX_GRADS;Intensität Gradient -TP_RETINEX_GRADS_TOOLTIP;Steht der Regler auf 0 sind alle Iterationen identisch.\nBei > 0 wird die Intensität reduziert und umgekehrt. -TP_RETINEX_GRAD_TOOLTIP;Steht der Regler auf 0 sind alle Iterationen identisch.\nBei > 0 werden Skalierung und Schwellenwert reduziert und umgekehrt. +TP_RETINEX_GRADS_TOOLTIP;Steht der Regler auf 0 sind alle Iterationen identisch.\nBei > 0 wird die Intensität reduziert, bei < 0 erhöht. +TP_RETINEX_GRAD_TOOLTIP;Steht der Regler auf 0 sind alle Iterationen identisch.\nBei > 0 werden Skalierung und Schwelle reduziert,\nbei < 0 erhöht. TP_RETINEX_HIGH;Lichter TP_RETINEX_HIGHLIG;Spitzlichter -TP_RETINEX_HIGHLIGHT;Spitzlichter Schwellenwert +TP_RETINEX_HIGHLIGHT;Spitzlichter Schwelle TP_RETINEX_HIGHLIGHT_TOOLTIP;Benötigt unter Umständen Korrekturen der Einstellungen "Benachbarte Pixel" und "Weißpunkt" unter dem Reiter "RAW". TP_RETINEX_HSLSPACE_LIN;HSL-Linear TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmisch TP_RETINEX_ITER;Iterationen TP_RETINEX_ITERF;Dynamikkompression -TP_RETINEX_ITER_TOOLTIP;Simuliert eine Dynamikkompression.\nHöhere Werte erhöhen die Prozessorzeit. +TP_RETINEX_ITER_TOOLTIP;Simuliert eine Dynamikkompression.\nHöhere Werte erhöhen die Verarbei-\ntungszeit. TP_RETINEX_LABEL;Retinex (Bildschleier entfernen) TP_RETINEX_LABEL_MASK;Maske TP_RETINEX_LABSPACE;L*a*b* @@ -1732,37 +1865,37 @@ TP_RETINEX_MAP;Methode TP_RETINEX_MAP_GAUS;Gaußschenmaske TP_RETINEX_MAP_MAPP;Schärfemaske (Teil-Wavelet) TP_RETINEX_MAP_MAPT;Schärfemaske (Wavelet) -TP_RETINEX_MAP_METHOD_TOOLTIP;Keine: Wendet die Maske, die mit der gaußschen Funktion (Radius, Methode) erstellt wurde an, um Halos und Artefakte zu reduzieren.\n\nNur Kurve: Wendet eine diagonale Kontrastkurve auf die Maske an.\nArtefakte beachten.\n\nGaußschenmaske: Wendet eine gaußsche Unschärfe auf die originale Maske an.\n(Schnell)\n\nSchärfemaske: Wendet ein Wavelet auf die originale Maske an.\n(Langsam) +TP_RETINEX_MAP_METHOD_TOOLTIP;Keine: Wendet die Maske, die mit der gaußschen\nFunktion (Radius, Methode) erstellt wurde an,\num Halos und Artefakte zu reduzieren.\n\nNur Kurve: Wendet eine diagonale Kontrastkurve\nauf die Maske an. (Artefakte beachten)\n\nGaußschenmaske: Wendet eine gaußsche Unschärfe\nauf die originale Maske an. (Schnell)\n\nSchärfemaske: Wendet ein Wavelet auf die originale\nMaske an. (Langsam) TP_RETINEX_MAP_NONE;Keine TP_RETINEX_MEDIAN;Medianfilter TP_RETINEX_METHOD;Methode -TP_RETINEX_METHOD_TOOLTIP;"Schatten" wirkt sich auf dunkle Bereiche aus.\n"Schatten & Lichter" wirkt sich auf dunkle und helle Bereiche aus.\n"Lichter" wirkt sich auf helle Bereiche aus.\n"Spitzlichter" wirkt sich auf sehr helle Bereiche aus und reduziert Magenta-Falschfarben. -TP_RETINEX_MLABEL;Schleierreduzierung: Min=%1 Max=%2 -TP_RETINEX_MLABEL_TOOLTIP;Sollte nahe bei Min=0 und Max=32768 sein +TP_RETINEX_METHOD_TOOLTIP;Schatten wirkt sich auf dunkle Bereiche aus.\n\nSchatten / Lichter wirkt sich auf dunkle und helle Bereiche aus.\n\nLichter wirkt sich auf helle Bereiche aus.\n\nSpitzlichter wirkt sich auf sehr helle Bereiche aus und reduziert\nMagenta-Falschfarben. +TP_RETINEX_MLABEL;Schleierred: Min = %1, Max = %2 +TP_RETINEX_MLABEL_TOOLTIP;Sollte nahe bei Min = 0 und Max = 32768 sein TP_RETINEX_NEIGHBOR;Radius TP_RETINEX_NEUTRAL;Zurücksetzen -TP_RETINEX_NEUTRAL_TIP;Setzt alle Regler und Kurven auf ihre Standardwerte zurück. +TP_RETINEX_NEUTRAL_TIP;Setzt alle Regler und Kurven\nauf ihre Standardwerte zurück. TP_RETINEX_OFFSET;Ausgleich (Helligkeit) TP_RETINEX_SCALES;Gaußscher Gradient -TP_RETINEX_SCALES_TOOLTIP;Steht der Regler auf 0 sind alle Iterationen identisch.\nBei > 0 werden Skalierung und Radius reduziert und umgekehrt. +TP_RETINEX_SCALES_TOOLTIP;Steht der Regler auf 0 sind alle Iterationen identisch.\nBei > 0 werden Skalierung und Radius reduziert,\nbei < 0 erhöht. TP_RETINEX_SETTINGS;Einstellungen TP_RETINEX_SKAL;Skalierung TP_RETINEX_SLOPE;Gammasteigung TP_RETINEX_STRENGTH;Intensität -TP_RETINEX_THRESHOLD;Schwellenwert +TP_RETINEX_THRESHOLD;Schwelle TP_RETINEX_THRESHOLD_TOOLTIP;Limitiert den Bereich der Transmissionskurve. -TP_RETINEX_TLABEL;T: Min=%1 Max=%2 Mittel=%3 Sigma=%4 -TP_RETINEX_TLABEL2;T: Tmin=%1 Tmax=%2 +TP_RETINEX_TLABEL;T: Min = %1, Max = %2\nT: Mittel = %3, Sigma = %4 +TP_RETINEX_TLABEL2;T: Tmin = %1, Tmax = %2 TP_RETINEX_TLABEL_TOOLTIP;Ergebnis der Transmissionskurve: Min, Max, Mittel und Sigma\nMin und Max hat Einfluss auf die Abweichung.\n\nTmin = Kleinster Wert der Transmissionskurve\nTmax = Größter Wert der Transmissionskurve TP_RETINEX_TRANF;Transmission TP_RETINEX_TRANSMISSION;Transmissionskurve -TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission in Abhängigkeit der Transmission.\nx-Achse: Transmission negativer Werte (Min), Mittel und positiver Werte (Max).\ny-Achse: Verstärkung oder Reduzierung. -TP_RETINEX_UNIFORM;Schatten & Lichter +TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission in Abhängigkeit der Transmission.\n\nx-Achse: Transmission negativer Werte (Min),\nMittel und positiver Werte (Max).\n\ny-Achse: Verstärkung oder Abschwächung. +TP_RETINEX_UNIFORM;Schatten / Lichter TP_RETINEX_VARIANCE;Kontrast -TP_RETINEX_VARIANCE_TOOLTIP;Niedrige Werte erhöhen den lokalen Kontrast und die Sättigung, können aber zu Artefakten führen. +TP_RETINEX_VARIANCE_TOOLTIP;Niedrige Werte erhöhen den lokalen\nKontrast und die Sättigung, können\naber zu Artefakten führen. TP_RETINEX_VIEW;Vorschau TP_RETINEX_VIEW_MASK;Maske -TP_RETINEX_VIEW_METHOD_TOOLTIP;Standard: Normale Anzeige\n\nMaske: Zeigt die Maske an\n\nUnschärfemaske: Zeigt das Bild mit einem großen Unschärfemaskenradius an.\n\nTransmission-Auto/Fest: Zeigt die Transmissionskarte vor der Anwendung von Kontrast und Helligkeit an\n\nACHTUNG: Die Maske zeigt nicht das Endergebnis, sondern verstärkt den Effekt um ihn besser beurteilen zu können. +TP_RETINEX_VIEW_METHOD_TOOLTIP;Standard: Normale Anzeige\n\nMaske: Zeigt die Maske an\n\nUnschärfemaske: Zeigt das Bild mit einem großen\nUnschärfemaskenradius an.\n\nTransmission-Auto / Fest: Zeigt die Transmissionskarte\nvor der Anwendung von Kontrast und Helligkeit an.\n\nACHTUNG: Die Maske zeigt nicht das Endergebnis, sondern\nverstärkt den Effekt um ihn besser beurteilen zu können. TP_RETINEX_VIEW_NONE;Standard TP_RETINEX_VIEW_TRAN;Transmission - Auto TP_RETINEX_VIEW_TRAN2;Transmission - Fest @@ -1803,8 +1936,7 @@ TP_SHARPENING_RLD;RL-Dekonvolution TP_SHARPENING_RLD_AMOUNT;Intensität TP_SHARPENING_RLD_DAMPING;Dämpfung TP_SHARPENING_RLD_ITERATIONS;Iterationen -TP_SHARPENING_THRESHOLD;Schwellenwert -TP_SHARPENING_TOOLTIP;Ergibt einen leicht geänderten Effekt, wenn CIECAM02 verwendet wird. +TP_SHARPENING_THRESHOLD;Schwelle TP_SHARPENING_USM;Unschärfemaskierung TP_SHARPENMICRO_AMOUNT;Intensität TP_SHARPENMICRO_LABEL;Mikrokontrast @@ -1813,17 +1945,17 @@ TP_SHARPENMICRO_UNIFORMITY;Gleichmäßigkeit TP_VIBRANCE_AVOIDCOLORSHIFT;Farbverschiebungen vermeiden TP_VIBRANCE_CURVEEDITOR_SKINTONES;HH TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL;Hautfarbtöne -TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE1;Rot/Violett +TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE1;Rot / Violett TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE2;Rot -TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE3;Rot/Gelb +TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE3;Rot / Gelb TP_VIBRANCE_CURVEEDITOR_SKINTONES_RANGE4;Gelb -TP_VIBRANCE_CURVEEDITOR_SKINTONES_TOOLTIP;Farbton als Funktion des Farbtons H=f(H) +TP_VIBRANCE_CURVEEDITOR_SKINTONES_TOOLTIP;Farbton als Funktion des Farbtons H = f(H) TP_VIBRANCE_LABEL;Dynamik TP_VIBRANCE_PASTELS;Pastelltöne TP_VIBRANCE_PASTSATTOG;Pastell und gesättigte Töne koppeln TP_VIBRANCE_PROTECTSKINS;Hautfarbtöne schützen -TP_VIBRANCE_PSTHRESHOLD;Schwellenwert - Pastell/gesättigte Töne -TP_VIBRANCE_PSTHRESHOLD_SATTHRESH;Sättigung Schwellenwert +TP_VIBRANCE_PSTHRESHOLD;Schwelle - Pastell / gesättigte Töne +TP_VIBRANCE_PSTHRESHOLD_SATTHRESH;Sättigung Schwelle TP_VIBRANCE_PSTHRESHOLD_TOOLTIP;Die vertikale Achse steht für die Pastell (unten) und gesättigte Töne (oben).\nDie horizontale Achse entspricht dem Sättigungsbereich. TP_VIBRANCE_PSTHRESHOLD_WEIGTHING;Gewichtung des Übergangs pastell/gesättigt TP_VIBRANCE_SATURATED;Gesättigte Töne @@ -1853,12 +1985,12 @@ TP_WAVELET_BACUR;Kurve TP_WAVELET_BALANCE;Kontrastausgleich d/v-h TP_WAVELET_BALANCE_TOOLTIP;Verändert die Gewichtung zwischen den Wavelet-Richtungen vertikal, horizontal und diagonal.\n\nSind Kontrast-, Farb- oder Restbild-Dynamikkompression aktiviert, wird die Wirkung aufgrund des Ausgleichs verstärkt. TP_WAVELET_BALCHRO;Farbausgleich -TP_WAVELET_BALCHRO_TOOLTIP;Wenn aktiviert, beeinflusst der Kontrastausgleich auch den Farbausgleich. +TP_WAVELET_BALCHRO_TOOLTIP;Wenn aktiviert, beeinflusst der Kontrastausgleich\nauch den Farbausgleich. TP_WAVELET_BANONE;Keine TP_WAVELET_BASLI;Regler TP_WAVELET_BATYPE;Kontrastmethode TP_WAVELET_CBENAB;Farbausgleich -TP_WAVELET_CB_TOOLTIP;Farbausgleich mit getrennten Reglern für Schatten, Mitten und Lichter aktivieren. +TP_WAVELET_CB_TOOLTIP;Farbausgleich mit getrennten Reglern für\nSchatten, Mitten und Lichter aktivieren. TP_WAVELET_CCURVE;Lokale Kontrastkurve TP_WAVELET_CH1;Gesamter Farbbereich TP_WAVELET_CH2;Gesättigte/Pastellfarben @@ -1870,10 +2002,10 @@ TP_WAVELET_CHRO_TOOLTIP;Waveletebene (n) die, die Grenze zwischen gesättigten u TP_WAVELET_CHR_TOOLTIP;Farbton als Funktion des Kontrasts und der Farb-Kontrast-Verknüpfung TP_WAVELET_CHSL;Regler TP_WAVELET_CHTYPE;Chrominanzmethode -TP_WAVELET_COLORT;Deckkraft Rot/Grün +TP_WAVELET_COLORT;Deckkraft Rot / Grün TP_WAVELET_COMPCONT;Kontrast TP_WAVELET_COMPGAMMA;Gammakompression -TP_WAVELET_COMPGAMMA_TOOLTIP;Das Anpassen des Gammawerts des Restbildes ermöglicht das Angleichen der Daten und des Histogramms +TP_WAVELET_COMPGAMMA_TOOLTIP;Das Anpassen des Gammawerts des\nRestbildes ermöglicht das Angleichen\nder Daten und des Histogramms. TP_WAVELET_COMPTM;Dynamik TP_WAVELET_CONTEDIT;“Danach“-Kontrastkurve TP_WAVELET_CONTR;Gamut @@ -1882,13 +2014,13 @@ TP_WAVELET_CONTRAST_MINUS;Kontrast - TP_WAVELET_CONTRAST_PLUS;Kontrast + TP_WAVELET_CONTRA_TOOLTIP;Ändert den Kontrast des Restbildes TP_WAVELET_CTYPE;Chrominanzkontrolle -TP_WAVELET_CURVEEDITOR_CC_TOOLTIP;Lokaler Kontrast als Funktion des ursprünglichen Kontrasts.\n\nNiedrige Werte: Wenig lokaler Kontrast (Werte zwischen 10 - 20)\n\n50%: Durchschnittlicher lokaler Kontrast (Werte zwischen 100 - 300)\n\n66%: Standardabweichung des Lokalen Kontrasts (Werte zwischen 300 - 800)\n\n100%: Maximaler lokaler Kontrast (Werte zwischen 3000 - 8000) +TP_WAVELET_CURVEEDITOR_CC_TOOLTIP;Lokaler Kontrast als Funktion des ursprünglichen Kontrasts.\n\nNiedrige Werte: Wenig lokaler Kontrast (Werte zwischen 10 - 20)\n50%: Durchschnittlicher lokaler Kontrast (Werte zwischen 100 - 300)\n66%: Standardabweichung des Lokalen Kontrasts (Werte zwischen 300 - 800)\n100%: Maximaler lokaler Kontrast (Werte zwischen 3000 - 8000)\n TP_WAVELET_CURVEEDITOR_CH;Kontrast = f(H) -TP_WAVELET_CURVEEDITOR_CH_TOOLTIP;Kontrast als Funktion des Farbtons.\nAchten Sie darauf, dass Sie die Werte beim Gamut-Farbton nicht überschreiben\n\nDie Kurve hat nur Auswirkung, wenn die Wavelet-Kontrastregler nicht auf “0“ stehen. +TP_WAVELET_CURVEEDITOR_CH_TOOLTIP;Kontrast als Funktion des Farbtons.\nAchten Sie darauf, dass Sie die Werte beim\nGamut-Farbton nicht überschreiben\n\nDie Kurve hat nur Auswirkung, wenn die Wavelet-\nKontrastregler nicht auf “0“ stehen. TP_WAVELET_CURVEEDITOR_CL;L -TP_WAVELET_CURVEEDITOR_CL_TOOLTIP;Wendet eine Kontrasthelligkeitskurve am Ende der Waveletverarbeitung an. +TP_WAVELET_CURVEEDITOR_CL_TOOLTIP;Wendet eine Kontrasthelligkeitskurve\nam Ende der Waveletverarbeitung an.\n TP_WAVELET_CURVEEDITOR_HH;HH -TP_WAVELET_CURVEEDITOR_HH_TOOLTIP;Farbton als Funktion des Farbtons H=f(H) +TP_WAVELET_CURVEEDITOR_HH_TOOLTIP;Farbton als Funktion des Farbtons H = f(H) TP_WAVELET_DALL;Alle Richtungen TP_WAVELET_DAUB;Kantenperformance TP_WAVELET_DAUB2;D2 - niedrig @@ -1896,7 +2028,7 @@ TP_WAVELET_DAUB4;D4 - Standard TP_WAVELET_DAUB6;D6 - Standard Plus TP_WAVELET_DAUB10;D10 - mittel TP_WAVELET_DAUB14;D14 - hoch -TP_WAVELET_DAUB_TOOLTIP;Ändert den Daubechies-Koeffizienten:\nD4 = Standard\nD14 = Häufig bestes Ergebnis auf Kosten von ca. 10% längerer Verarbeitungszeit.\n\nVerbessert die Kantenerkennung sowie die Qualität der ersten Waveletebene. Jedoch hängt die Qualität nicht ausschließlich mit diesem Koeffizienten zusammen und kann je nach Bild und Einsatz variieren. +TP_WAVELET_DAUB_TOOLTIP;Ändert den Daubechies-Koeffizienten:\nD4 = Standard\nD14 = Häufig bestes Ergebnis auf Kosten\nvon ca. 10% längerer Verarbeitungszeit.\n\nVerbessert die Kantenerkennung sowie die Qualität\nder ersten Waveletebene. Jedoch hängt die Qualität\nnicht ausschließlich mit diesem Koeffizienten zusammen\nund kann je nach Bild und Einsatz variieren. TP_WAVELET_DONE;Vertikal TP_WAVELET_DTHR;Diagonal TP_WAVELET_DTWO;Horizontal @@ -1906,16 +2038,16 @@ TP_WAVELET_EDGCONT_TOOLTIP;Verschieben der Punkte nach links, verringert den Kon TP_WAVELET_EDGE;Kantenschärfung TP_WAVELET_EDGEAMPLI;Grundverstärkung TP_WAVELET_EDGEDETECT;Gradientenempfindlichkeit -TP_WAVELET_EDGEDETECTTHR;Schwellenwert niedrig (Rauschen) -TP_WAVELET_EDGEDETECTTHR2;Schwellenwert hoch (Erkennung) -TP_WAVELET_EDGEDETECTTHR_TOOLTIP;Schwellenwert der Kantenerkennung für feine Details. Verhindert die Schärfung von Rauschen. -TP_WAVELET_EDGEDETECT_TOOLTIP;Verschieben des Reglers nach rechts erhöht die Kantenempfindlichkeit. Die Einstellung wirkt sich auf den lokalen Kontrast, Kanteneinstellungen und Rauschen aus. +TP_WAVELET_EDGEDETECTTHR;Schwelle niedrig (Rauschen) +TP_WAVELET_EDGEDETECTTHR2;Schwelle hoch (Erkennung) +TP_WAVELET_EDGEDETECTTHR_TOOLTIP;Schwelle der Kantenerkennung für feine Details.\nVerhindert die Schärfung von Rauschen. +TP_WAVELET_EDGEDETECT_TOOLTIP;Verschieben des Reglers nach rechts erhöht die\nKantenempfindlichkeit. Die Einstellung wirkt sich\nauf den lokalen Kontrast, Kanteneinstellungen und\nRauschen aus. TP_WAVELET_EDGESENSI;Kantenempfindlichkeit -TP_WAVELET_EDGREINF_TOOLTIP;Reduziert oder verstärkt die Kantenschärfung der ersten Ebene. Wird die Schärfung verstärkt, wird bei der zweiten Ebene die Schärfung reduziert und umgekehrt. Alle anderen Ebenen werden nicht beeinflusst. +TP_WAVELET_EDGREINF_TOOLTIP;Reduziert oder verstärkt die Kantenschärfung der\nersten Ebene. Wird die Schärfung verstärkt, wird\nbei der zweiten Ebene die Schärfung reduziert und\numgekehrt. Alle anderen Ebenen werden nicht\nbeeinflusst. TP_WAVELET_EDGTHRESH;Details -TP_WAVELET_EDGTHRESH_TOOLTIP;Verschieben des Reglers nach rechts verstärkt die Kantenschärfung der ersten Waveletebene und reduziert sie für die anderen Ebenen.\n\nNegative Werte können zu Artefakten führen. +TP_WAVELET_EDGTHRESH_TOOLTIP;Verschieben des Reglers nach rechts verstärkt\ndie Kantenschärfung der ersten Waveletebene\nund reduziert sie für die anderen Ebenen.\n\nNegative Werte können zu Artefakten führen. TP_WAVELET_EDRAD;Radius -TP_WAVELET_EDRAD_TOOLTIP;Der Radius unterscheidet sich von dem in den üblichen Schärfungswerkzeugen. Der Wert wird mit jeder Ebene über eine komplexe Funktion verglichen. Ein Wert von “0“ zeigt deshalb immer noch eine Auswirkung. +TP_WAVELET_EDRAD_TOOLTIP;Der Radius unterscheidet sich von dem in\nden üblichen Schärfungswerkzeugen. Der\nWert wird mit jeder Ebene über eine komplexe\nFunktion verglichen. Ein Wert von “0“ zeigt\ndeshalb immer noch eine Auswirkung. TP_WAVELET_EDSL;Regler TP_WAVELET_EDTYPE;Lokale Kontrastmethode TP_WAVELET_EDVAL;Intensität @@ -1925,9 +2057,9 @@ TP_WAVELET_HIGHLIGHT;Lichter-Luminanzbereich TP_WAVELET_HS1;Gesamter Luminanzbereich TP_WAVELET_HS2;Schatten/Lichter TP_WAVELET_HUESKIN;Hautfarbton -TP_WAVELET_HUESKIN_TOOLTIP;Wenn Sie den Bereich signifikant nach Links oder Rechts verschieben müssen, ist der Weißabgleich nicht richtig gewählt.\nWählen Sie den eingeschlossenen Bereich so eng wie möglich, um den Einfluss auf benachbarte Farben zu verhindern. +TP_WAVELET_HUESKIN_TOOLTIP;Wenn Sie den Bereich signifikant nach Links\noder Rechts verschieben müssen, ist der\nWeißabgleich nicht richtig gewählt.\nWählen Sie den eingeschlossenen Bereich so\neng wie möglich, um den Einfluss auf benachbarte\nFarben zu verhindern. TP_WAVELET_HUESKY;Himmelsfarbton -TP_WAVELET_HUESKY_TOOLTIP;Wenn Sie den Bereich signifikant nach Links oder Rechts verschieben müssen, ist der Weißabgleich nicht richtig gewählt.\nWählen Sie den eingeschlossenen Bereich so eng wie möglich, um den Einfluss auf benachbarte Farben zu verhindern. +TP_WAVELET_HUESKY_TOOLTIP;Wenn Sie den Bereich signifikant nach Links\noder Rechts verschieben müssen, ist der\nWeißabgleich nicht richtig gewählt.\nWählen Sie den eingeschlossenen Bereich so\neng wie möglich, um den Einfluss auf benachbarte\nFarben zu verhindern. TP_WAVELET_ITER;Delta-Kontrastausgleich TP_WAVELET_ITER_TOOLTIP;Links: Erhöht die niedrigen und reduziert die hohen Ebenen.\nRechts: Reduziert die niedrigen und erhöht die hohen Ebenen. TP_WAVELET_LABEL;Wavelet @@ -1951,7 +2083,7 @@ TP_WAVELET_LOWLIGHT;Schatten-Luminanzbereich TP_WAVELET_MEDGREINF;Erste Ebene TP_WAVELET_MEDI;Artefakte in blauem Himmel reduzieren TP_WAVELET_MEDILEV;Kantenerkennung -TP_WAVELET_MEDILEV_TOOLTIP;Wenn Sie die Kantenerkennung aktivieren, sollten Sie folgende Einstellungen anpassen:\n\n1. Niedrige Kontrastebenen deaktivieren um Artefakte zu vermeiden.\n2. Hohe Werte bei der Gradientenempfindlichkeit einstellen.\n\nSie können die Intensität mit der Wavelet-Rauschreduzierung anpassen. +TP_WAVELET_MEDILEV_TOOLTIP;Wenn Sie die Kantenerkennung aktivieren, sollten Sie folgende\nEinstellungen anpassen:\n\n1. Niedrige Kontrastebenen deaktivieren um Artefakte zu vermeiden.\n2. Hohe Werte bei der Gradientenempfindlichkeit einstellen.\n\nSie können die Intensität mit der Wavelet-Rauschreduzierung anpassen. TP_WAVELET_NEUTRAL;Neutral TP_WAVELET_NOIS;Rauschreduzierung TP_WAVELET_NOISE;Rauschreduzierung @@ -1959,11 +2091,11 @@ TP_WAVELET_NPHIGH;Hoch TP_WAVELET_NPLOW;Niedrig TP_WAVELET_NPNONE;Keine TP_WAVELET_NPTYPE;Benachbarte Pixel -TP_WAVELET_NPTYPE_TOOLTIP;Dieser Algorithmus verwendet ein Pixel und acht seiner Nachbarn. Sind die Unterschiede gering, werden die Kanten geschärft. -TP_WAVELET_OPACITY;Deckkraft Blau/Gelb +TP_WAVELET_NPTYPE_TOOLTIP;Dieser Algorithmus verwendet ein Pixel und acht\nseiner Nachbarn. Sind die Unterschiede gering,\nwerden die Kanten geschärft. +TP_WAVELET_OPACITY;Deckkraft Blau / Gelb TP_WAVELET_OPACITYW;Kontrastausgleichskurve TP_WAVELET_OPACITYWL;Lokale Kontrastkurve -TP_WAVELET_OPACITYWL_TOOLTIP;Wendet eine lokale Kontrastkurve am Ende der Wavelet-Verarbeitung an.\n\nLinks stellt den niedrigsten, rechts den höchsten Kontrast dar. +TP_WAVELET_OPACITYWL_TOOLTIP;Wendet eine lokale Kontrastkurve am\nEnde der Wavelet-Verarbeitung an.\n\nLinks stellt den niedrigsten, rechts den\nhöchsten Kontrast dar.\n TP_WAVELET_PASTEL;Pastellfarben TP_WAVELET_PROC;Verarbeitung TP_WAVELET_RE1;Schärfung verstärken @@ -1982,19 +2114,19 @@ TP_WAVELET_SKY_TOOLTIP;-100: Nur Farben innerhalb des Bereichs werden verändert TP_WAVELET_STREN;Intensität TP_WAVELET_STRENGTH;Intensität TP_WAVELET_SUPE;Extra -TP_WAVELET_THR;Schatten Schwellenwert +TP_WAVELET_THR;Schatten Schwelle TP_WAVELET_THRESHOLD;Lichterebenen TP_WAVELET_THRESHOLD2;Schattenebenen -TP_WAVELET_THRESHOLD2_TOOLTIP;Legt die Ebene der Untergrenze (9 minus Wert) für den Schatten-Luminanzbereich fest. Der maximal mögliche Wert wird vom Wert der Lichterebenen begrenzt.\n\nBeeinflussbare Ebenen: Untergrenze bis Ebene 9 -TP_WAVELET_THRESHOLD_TOOLTIP;Legt die Ebene der Obergrenze für den Lichter-Luminanzbereich fest. Der Wert begrenzt die maximal möglichen Schattenebenen.\n\nBeeinflussbare Ebenen: Ebene 1 bis Obergrenze -TP_WAVELET_THRH;Lichter Schwellenwert +TP_WAVELET_THRESHOLD2_TOOLTIP;Legt die Ebene der Untergrenze (9 minus Wert)\nfür den Schatten-Luminanzbereich fest. Der\nmaximal mögliche Wert wird vom Wert der Lichter-\nebenen begrenzt.\n\nBeeinflussbare Ebenen: Untergrenze bis Ebene 9 +TP_WAVELET_THRESHOLD_TOOLTIP;Legt die Ebene der Obergrenze für den Lichter\n-Luminanzbereich fest. Der Wert begrenzt die\nmaximal möglichen Schattenebenen.\n\nBeeinflussbare Ebenen: Ebene 1 bis Obergrenze +TP_WAVELET_THRH;Lichter Schwelle TP_WAVELET_TILESBIG;Große Kacheln TP_WAVELET_TILESFULL;Ganzes Bild TP_WAVELET_TILESIZE;Kachelgröße TP_WAVELET_TILESLIT;Kleine Kacheln -TP_WAVELET_TILES_TOOLTIP;“Ganzes Bild“ (empfohlen) liefert eine bessere Qualität.\n“Kacheln“ benötigen weniger Speicher und sind nur für Computer mit wenig RAM zu empfehlen. +TP_WAVELET_TILES_TOOLTIP;“Ganzes Bild“ (empfohlen) liefert eine bessere Qualität.\n“Kacheln“ benötigen weniger Speicher und ist nur für\nComputer mit wenig RAM zu empfehlen. TP_WAVELET_TMSTRENGTH;Intensität -TP_WAVELET_TMSTRENGTH_TOOLTIP;Kontrolliert die Intensität der Dynamik- oder Kontrastkompression des Restbildes. Ist der Wert ungleich 0, werden die Intensitäts- und Gammaregler des Dynamikkompressions-Werkzeugs im Belichtungsreiter deaktiviert. +TP_WAVELET_TMSTRENGTH_TOOLTIP;Kontrolliert die Intensität der Dynamik- oder\nKontrastkompression des Restbildes. Ist der\nWert ungleich 0, werden die Intensitäts- und\nGammaregler des Dynamikkompressions-\nWerkzeugs im Belichtungsreiter deaktiviert. TP_WAVELET_TMTYPE;Kompression TP_WAVELET_TON;Tönung TP_WBALANCE_AUTO;Automatisch @@ -2002,8 +2134,8 @@ TP_WBALANCE_CAMERA;Kamera TP_WBALANCE_CLOUDY;Bewölkt TP_WBALANCE_CUSTOM;Benutzerdefiniert TP_WBALANCE_DAYLIGHT;Tageslicht (sonnig) -TP_WBALANCE_EQBLUERED;Blau/Rot-Korrektur -TP_WBALANCE_EQBLUERED_TOOLTIP;Ändert das normale Verhalten des Weißabgleichs durch Änderung der Blau/Rot-Korrektur.\n\nDas kann hilfreich sein, wenn die Aufnahmebedingen:\na) weit weg von der Standardbeleuchtung sind (z.B. unter Wasser)\n\nb) abweichend zu einer Kalibrierung sind.\n\nc) nicht zum ICC-Profil passen. +TP_WBALANCE_EQBLUERED;Blau / Rot-Korrektur +TP_WBALANCE_EQBLUERED_TOOLTIP;Ändert das normale Verhalten des Weißabgleichs durch Änderung\nder Blau / Rot-Korrektur.\n\nDas kann hilfreich sein, wenn die Aufnahmebedingen:\na) weit weg von der Standardbeleuchtung sind (z.B. unter Wasser)\nb) abweichend zu einer Kalibrierung sind.\nc) nicht zum ICC-Profil passen. TP_WBALANCE_FLASH55;Leica TP_WBALANCE_FLASH60;Standard, Canon, Pentax, Olympus TP_WBALANCE_FLASH65;Nikon, Panasonic, Sony, Minolta @@ -2038,6 +2170,8 @@ TP_WBALANCE_SOLUX41;Solux 4100K TP_WBALANCE_SOLUX47;Solux 4700K (Vendor) TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) TP_WBALANCE_SPOTWB;Manuell setzen +TP_WBALANCE_TEMPBIAS;AWB-Temperatur-Korrektur +TP_WBALANCE_TEMPBIAS_TOOLTIP;Prozentuale Korrektur der Farbtemperatur des automatischen\nWeißabgleichs in Richtung wärmer oder kälter.\nDer Korreturwert berechnet sich aus:\nAWB-Temperatur + AWB-Temperatur * AWB-Temperatur-Korrektur TP_WBALANCE_TEMPERATURE;Farbtemperatur TP_WBALANCE_TUNGSTEN;Glühlampe TP_WBALANCE_WATER1;Unterwasser 1 @@ -2055,11 +2189,25 @@ ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! -!HISTORY_MSG_443;Output Black Point Compensation -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font -!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. -!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. -!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool -!TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point +!DONT_SHOW_AGAIN;Don't show this message again. +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language +!PREFERENCES_THEME;Theme +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index 083b4247e..85d44e3ea 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -36,7 +36,9 @@ PREFERENCES_ICCDIR;Directory containing colour profiles PREFERENCES_INTENT_ABSOLUTE;Absolute Colourimetric PREFERENCES_INTENT_RELATIVE;Relative Colourimetric PREFERENCES_MENUGROUPLABEL;Group "Colour label" +PREFERENCES_MONPROFILE;Default colour profile PREFERENCES_NAVGUIDEBRUSH;Navigator guide colour +PREFERENCES_PRTPROFILE;Colour profile PREFERENCES_SELECTFONT_COLPICKER;Select Colour Picker's font PREFERENCES_TAB_COLORMGR;Colour Management SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colours from the output profile. @@ -56,7 +58,6 @@ TP_COLORAPP_CHROMA_M_TOOLTIP;Colourfulness in CIECAM02 differs from L*a*b* and R TP_COLORAPP_CURVEEDITOR3;Colour curve TP_COLORAPP_CURVEEDITOR3_TOOLTIP;Adjust either chroma, saturation or colourfulness.\n\nShows the histogram of chromaticity (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of C, s or M after CIECAM02.\n\nC, s and M are not shown in the main histogram panel.\nFor final output refer to the main histogram panel. TP_COLORAPP_LABEL;CIE Colour Appearance Model 2002 -TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Colour Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Colour Management. TP_COLORAPP_SURROUND_TOOLTIP;Changes tones and colours to take into account the viewing conditions of the output device.\n\nAverage: Average light environment (standard). The image will not change.\n\nDim: Dim environment (TV). The image will become slighty dark.\n\nDark: Dark environment (projector). The image will become more dark.\n\nExtremly Dark: Extremly dark environment (cutsheet). The image will become very dark. TP_COLORAPP_TCMODE_COLORF;Colourfulness TP_COLORTONING_COLOR;Colour @@ -79,7 +80,6 @@ TP_GRADIENT_CENTER;Centre TP_GRADIENT_CENTER_X;Centre X TP_GRADIENT_CENTER_Y;Centre Y TP_HLREC_COLOR;Colour Propagation -TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output colour space with a fix White Point TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input colour profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple colour matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. TP_ICM_INPUTCUSTOM_TOOLTIP;Select your own DCP/ICC colour profile file for the camera. @@ -140,6 +140,16 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !CURVEEDITOR_TOOLTIPSAVE;Save current curve. !CURVEEDITOR_TYPE;Type: !DIRBROWSER_FOLDERS;Folders +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. @@ -166,6 +176,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !EXIFPANEL_RESETALLHINT;Reset all tags to their original values. !EXIFPANEL_RESETHINT;Reset the selected tags to their original values. !EXIFPANEL_SUBDIRECTORY;Subdirectory +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -187,8 +198,12 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -210,7 +225,6 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? !FILEBROWSER_EMPTYTRASH;Empty trash !FILEBROWSER_EMPTYTRASHHINT;Permanently delete the files from trash. -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -259,6 +273,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 !FILEBROWSER_RENAMEDLGLABEL;Rename file +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -319,6 +334,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !GENERAL_SAVE;Save !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_B;Show/Hide blue histogram. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. @@ -329,7 +345,6 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTOGRAM_TOOLTIP_RAW;Show/Hide raw histogram. !HISTORY_CHANGED;Changed !HISTORY_CUSTOMCURVE;Custom curve -!HISTORY_DELSNAPSHOT;Del !HISTORY_FROMCLIPBOARD;From clipboard !HISTORY_LABEL;History !HISTORY_MSG_1;Photo loaded @@ -674,7 +689,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -725,12 +740,12 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_420;Retinex - Histogram - HSL !HISTORY_MSG_421;Retinex - Gamma @@ -742,8 +757,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -755,52 +770,78 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot !HISTORY_SNAPSHOTS;Snapshots -!IPTCPANEL_AUTHOR;Author -!IPTCPANEL_AUTHORSPOSITION;Author's position -!IPTCPANEL_AUTHORSPOSITIONHINT;Title of the creator or creators of the object (By-line Title). -!IPTCPANEL_CAPTION;Caption -!IPTCPANEL_CAPTIONHINT;A textual description of the data (Caption - Abstract). -!IPTCPANEL_CAPTIONWRITER;Caption writer -!IPTCPANEL_CAPTIONWRITERHINT;The name of the person involved in the writing, editing or correcting the image or caption/abstract (Writer - Editor). !IPTCPANEL_CATEGORY;Category -!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider (Category). +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITY;City -!IPTCPANEL_CITYHINT;City of image origin (City). +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYHINT;Copy IPTC settings to clipboard. -!IPTCPANEL_COPYRIGHT;Copyright -!IPTCPANEL_COPYRIGHTHINT;Any necessary copyright notice (Copyright Notice). +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. !IPTCPANEL_COUNTRY;Country -!IPTCPANEL_COUNTRYHINT;The name of the country/primary location where the image was created (Country - Primary Location Name). -!IPTCPANEL_CREDIT;Credit -!IPTCPANEL_CREDITHINT;Identifies the provider of the image, not necessarily the owner/creator (Credit). +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_CREDIT;Credit line +!IPTCPANEL_CREDITHINT;Enter who should be credited when this image is published. !IPTCPANEL_DATECREATED;Date created -!IPTCPANEL_DATECREATEDHINT;The date the intellectual content of the image was created; Format: YYYYMMDD (Date Created). +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. !IPTCPANEL_EMBEDDED;Embedded !IPTCPANEL_EMBEDDEDHINT;Reset to IPTC data embedded in the image file. !IPTCPANEL_HEADLINE;Headline -!IPTCPANEL_HEADLINEHINT;A publishable entry providing a synopsis of the contents of the image (Headline). +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. !IPTCPANEL_INSTRUCTIONS;Instructions -!IPTCPANEL_INSTRUCTIONSHINT;Other editorial instructions concerning the use of the image (Special Instructions). +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. !IPTCPANEL_KEYWORDS;Keywords -!IPTCPANEL_KEYWORDSHINT;Used to indicate specific information retrieval words (Keywords). +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. !IPTCPANEL_PASTEHINT;Paste IPTC settings from clipboard. -!IPTCPANEL_PROVINCE;Province -!IPTCPANEL_PROVINCEHINT;The Province/State where the image originates (Province-State). +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. !IPTCPANEL_RESET;Reset !IPTCPANEL_RESETHINT;Reset to profile default. !IPTCPANEL_SOURCE;Source -!IPTCPANEL_SOURCEHINT;The original owner of the intellectual content of the image (Source). -!IPTCPANEL_SUPPCATEGORIES;Suppl. categories -!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image (Supplemental Categories). +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. !IPTCPANEL_TITLE;Title -!IPTCPANEL_TITLEHINT;A shorthand reference for the image (Object Name). -!IPTCPANEL_TRANSREFERENCE;Trans. reference -!IPTCPANEL_TRANSREFERENCEHINT;A code representing the location of the original transmission (Original Transmission Reference). +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -834,11 +875,12 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_QOVERWRITE;Do you want to overwrite it? !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL;Detail !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d -!MAIN_TAB_DEVELOP; Develop +!MAIN_TAB_DEVELOP; Batch Edit !MAIN_TAB_EXIF;Exif !MAIN_TAB_EXPORT; Fast Export !MAIN_TAB_EXPOSURE;Exposure @@ -928,8 +970,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -937,7 +978,9 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PARTIALPASTE_RAW_DCBENHANCE;DCB enhancement !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RESIZE;Resize !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves @@ -978,7 +1021,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -989,7 +1033,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1001,8 +1046,6 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y - year\n%m - month\n%d - day\n\nFor example, the ISO 8601 standard dictates the date format as follows:\n%y-%m-%d !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. -!PREFERENCES_DEFAULTLANG;Default Language -!PREFERENCES_DEFAULTTHEME;Default Theme !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_DIRHOME;Home directory !PREFERENCES_DIRLAST;Last visited directory @@ -1014,7 +1057,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_EXPAUT;Expert !PREFERENCES_EXTERNALEDITOR;External Editor !PREFERENCES_FBROWSEROPTS;File Browser / Thumbnail Options -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILEFORMAT;File format !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field @@ -1034,7 +1077,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1053,6 +1097,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_INTENT_PERCEPTUAL;Perceptual !PREFERENCES_INTENT_SATURATION;Saturation !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1067,9 +1112,9 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVIGATIONFRAME;Navigation @@ -1078,7 +1123,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_OUTDIRFOLDER;Save to folder !PREFERENCES_OUTDIRFOLDERHINT;Save images to the selected folder. !PREFERENCES_OUTDIRTEMPLATE;Use template -!PREFERENCES_OUTDIRTEMPLATEHINT;You can use the following formatting strings:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nThese formatting strings refer to the different parts of the photo's pathname, some attributes of the photo or an arbitrary sequence index in the batch job.\n\nFor example, if the photo being processed has the following pathname:\n/home/tom/photos/2010-10-31/dsc0042.nef\nthe meaning of the formatting strings are:\n%d4 = home\n%d3 = tom\n%d2 = photos\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tom/photos/2010-10-31/\n%p2 = /home/tom/photos/\n%p3 = /home/tom/\n%p4 = /home/\n\n%r will be replaced by the rank of the photo. If the photo is unranked, %r will be replaced by '0'. If the photo is in the trash bin, %r will be replaced by 'x'.\n\n%s1, %s2, etc. will be replaced by a sequence index which is padded to between 1 and 9 digits. The sequence index will start at one each time the queue processing is started and is incremented by one for each image processed.\n\nIf you want to save the output image where the original is, write:\n%p1/%f\n\nIf you want to save the output image in a directory named "converted" located in the directory of the opened image, write:\n%p1/converted/%f\n\nIf you want to save the output image in a directory named "/home/tom/photos/converted/2010-10-31", write:\n%p2/converted/%d1/%f +!PREFERENCES_OUTDIRTEMPLATEHINT;You can use the following formatting strings:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nThese formatting strings refer to the different parts of the photo's pathname, some attributes of the photo or an arbitrary sequence index in the batch job.\n\nFor example, if the photo being processed has the following pathname:\n/home/tom/photos/2010-10-31/dsc0042.nef\nthe meaning of the formatting strings are:\n%d4 = home\n%d3 = tom\n%d2 = photos\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tom/photos/2010-10-31/\n%p2 = /home/tom/photos/\n%p3 = /home/tom/\n%p4 = /home/\n\n%r will be replaced by the rank of the photo. If the photo is unranked, %r will be replaced by '0'. If the photo is in the trash bin, %r will be replaced by 'x'.\n\n%s1, %s2, etc. will be replaced by a sequence index which is padded to between 1 and 9 digits. The sequence index will start at one each time the queue processing is started and is incremented by one for each image processed.\n\nIf you want to save the output image where the original is, write:\n%p1/%f\n\nIf you want to save the output image in a directory named "converted" located in the directory of the opened image, write:\n%p1/converted/%f\n\nIf you want to save the output image in a directory named\n"/home/tom/photos/converted/2010-10-31", write:\n%p2/converted/%d1/%f !PREFERENCES_OVERLAY_FILENAMES;Overlay filenames on thumbnails in the file browser !PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP;Overlay filenames on thumbnails in the editor pannel !PREFERENCES_OVERWRITEOUTPUTFILE;Overwrite existing output files @@ -1093,20 +1138,24 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) !PREFERENCES_PROFILEHANDLING;Processing Profile Handling !PREFERENCES_PROFILELOADPR;Processing profile loading priority !PREFERENCES_PROFILEPRCACHE;Profile in cache !PREFERENCES_PROFILEPRFILE;Profile next to the input file +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file !PREFERENCES_PROFILESAVECACHE;Save processing profile to the cache !PREFERENCES_PROFILESAVEINPUT;Save processing profile next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROPERTY;Property +!PREFERENCES_PRTINTENT;Rendering intent !PREFERENCES_PSPATH;Adobe Photoshop installation directory !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTLANG;Select language !PREFERENCES_SELECTTHEME;Select theme !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings @@ -1121,7 +1170,6 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. @@ -1130,10 +1178,12 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_STARTUPIMDIR;Image Directory at Startup !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_BROWSER;File Browser +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_GENERAL;General !PREFERENCES_TAB_IMPROC;Image Processing !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1142,7 +1192,6 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -!PREFERENCES_USESYSTEMTHEME;Use system theme !PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) !PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' !PREFERENCES_WLONE;One level @@ -1158,6 +1207,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste !PROFILEPANEL_PCUSTOM;Custom +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PFILE;From file !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_PLASTSAVED;Last Saved @@ -1281,11 +1331,11 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left.\n\nShortcuts:\n[ - Multiple Editor Tabs Mode,\nAlt-[ - Single Editor Tab Mode. !TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right.\n\nShortcuts:\n] - Multiple Editor Tabs Mode,\nAlt-] - Single Editor Tab Mode. !TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically. -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1301,8 +1351,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1311,6 +1361,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1321,8 +1372,11 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1339,10 +1393,14 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1466,8 +1524,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_THRESHOLD;Threshold !TP_DISTORTION_AMOUNT;Amount -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_DISTORTION_LABEL;Distortion Correction !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma @@ -1540,17 +1597,17 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERA;Camera standard !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCUSTOM;Custom @@ -1561,12 +1618,12 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_ICM_NOICM;No ICM: sRGB Output !TP_ICM_OUTPUTPROFILE;Output Profile !TP_ICM_PROFILEINTENT;Rendering Intent -!TP_ICM_SAVEREFERENCE;Save Reference Image for Profiling +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_ICM_WORKINGPROFILE;Working Profile !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold @@ -1650,20 +1707,81 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD;Method !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2018,6 +2136,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) !TP_WBALANCE_SPOTWB;Spot WB +!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_TEMPERATURE;Temperature !TP_WBALANCE_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index de97d7721..801f34603 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -37,6 +37,16 @@ !CURVEEDITOR_TOOLTIPSAVE;Save current curve. !CURVEEDITOR_TYPE;Type: !DIRBROWSER_FOLDERS;Folders +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. @@ -63,6 +73,7 @@ !EXIFPANEL_RESETALLHINT;Reset all tags to their original values. !EXIFPANEL_RESETHINT;Reset the selected tags to their original values. !EXIFPANEL_SUBDIRECTORY;Subdirectory +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -85,8 +96,12 @@ !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -109,7 +124,6 @@ !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? !FILEBROWSER_EMPTYTRASH;Empty trash !FILEBROWSER_EMPTYTRASHHINT;Permanently delete the files from trash. -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -159,6 +173,7 @@ !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 !FILEBROWSER_RENAMEDLGLABEL;Rename file +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -221,6 +236,7 @@ !GENERAL_SAVE;Save !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_B;Show/Hide blue histogram. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. @@ -231,7 +247,6 @@ !HISTOGRAM_TOOLTIP_RAW;Show/Hide raw histogram. !HISTORY_CHANGED;Changed !HISTORY_CUSTOMCURVE;Custom curve -!HISTORY_DELSNAPSHOT;Del !HISTORY_FROMCLIPBOARD;From clipboard !HISTORY_LABEL;History !HISTORY_MSG_1;Photo loaded @@ -592,7 +607,7 @@ !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -644,12 +659,12 @@ !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -662,8 +677,8 @@ !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -675,52 +690,78 @@ !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot !HISTORY_SNAPSHOTS;Snapshots -!IPTCPANEL_AUTHOR;Author -!IPTCPANEL_AUTHORSPOSITION;Author's position -!IPTCPANEL_AUTHORSPOSITIONHINT;Title of the creator or creators of the object (By-line Title). -!IPTCPANEL_CAPTION;Caption -!IPTCPANEL_CAPTIONHINT;A textual description of the data (Caption - Abstract). -!IPTCPANEL_CAPTIONWRITER;Caption writer -!IPTCPANEL_CAPTIONWRITERHINT;The name of the person involved in the writing, editing or correcting the image or caption/abstract (Writer - Editor). !IPTCPANEL_CATEGORY;Category -!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider (Category). +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITY;City -!IPTCPANEL_CITYHINT;City of image origin (City). +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYHINT;Copy IPTC settings to clipboard. -!IPTCPANEL_COPYRIGHT;Copyright -!IPTCPANEL_COPYRIGHTHINT;Any necessary copyright notice (Copyright Notice). +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. !IPTCPANEL_COUNTRY;Country -!IPTCPANEL_COUNTRYHINT;The name of the country/primary location where the image was created (Country - Primary Location Name). -!IPTCPANEL_CREDIT;Credit -!IPTCPANEL_CREDITHINT;Identifies the provider of the image, not necessarily the owner/creator (Credit). +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_CREDIT;Credit line +!IPTCPANEL_CREDITHINT;Enter who should be credited when this image is published. !IPTCPANEL_DATECREATED;Date created -!IPTCPANEL_DATECREATEDHINT;The date the intellectual content of the image was created; Format: YYYYMMDD (Date Created). +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. !IPTCPANEL_EMBEDDED;Embedded !IPTCPANEL_EMBEDDEDHINT;Reset to IPTC data embedded in the image file. !IPTCPANEL_HEADLINE;Headline -!IPTCPANEL_HEADLINEHINT;A publishable entry providing a synopsis of the contents of the image (Headline). +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. !IPTCPANEL_INSTRUCTIONS;Instructions -!IPTCPANEL_INSTRUCTIONSHINT;Other editorial instructions concerning the use of the image (Special Instructions). +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. !IPTCPANEL_KEYWORDS;Keywords -!IPTCPANEL_KEYWORDSHINT;Used to indicate specific information retrieval words (Keywords). +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. !IPTCPANEL_PASTEHINT;Paste IPTC settings from clipboard. -!IPTCPANEL_PROVINCE;Province -!IPTCPANEL_PROVINCEHINT;The Province/State where the image originates (Province-State). +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. !IPTCPANEL_RESET;Reset !IPTCPANEL_RESETHINT;Reset to profile default. !IPTCPANEL_SOURCE;Source -!IPTCPANEL_SOURCEHINT;The original owner of the intellectual content of the image (Source). -!IPTCPANEL_SUPPCATEGORIES;Suppl. categories -!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image (Supplemental Categories). +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. !IPTCPANEL_TITLE;Title -!IPTCPANEL_TITLEHINT;A shorthand reference for the image (Object Name). -!IPTCPANEL_TRANSREFERENCE;Trans. reference -!IPTCPANEL_TRANSREFERENCEHINT;A code representing the location of the original transmission (Original Transmission Reference). +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -754,12 +795,13 @@ !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_QOVERWRITE;Do you want to overwrite it? !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR;Color !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL;Detail !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d -!MAIN_TAB_DEVELOP; Develop +!MAIN_TAB_DEVELOP; Batch Edit !MAIN_TAB_EXIF;Exif !MAIN_TAB_EXPORT; Fast Export !MAIN_TAB_EXPOSURE;Exposure @@ -855,8 +897,7 @@ !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -865,7 +906,9 @@ !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RESIZE;Resize !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves @@ -908,7 +951,8 @@ !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -920,7 +964,8 @@ !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -932,8 +977,6 @@ !PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y - year\n%m - month\n%d - day\n\nFor example, the ISO 8601 standard dictates the date format as follows:\n%y-%m-%d !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. -!PREFERENCES_DEFAULTLANG;Default Language -!PREFERENCES_DEFAULTTHEME;Default Theme !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_DIRHOME;Home directory !PREFERENCES_DIRLAST;Last visited directory @@ -945,7 +988,7 @@ !PREFERENCES_EXPAUT;Expert !PREFERENCES_EXTERNALEDITOR;External Editor !PREFERENCES_FBROWSEROPTS;File Browser / Thumbnail Options -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILEFORMAT;File format !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field @@ -965,7 +1008,8 @@ !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -987,6 +1031,7 @@ !PREFERENCES_INTENT_RELATIVE;Relative Colorimetric !PREFERENCES_INTENT_SATURATION;Saturation !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1002,9 +1047,10 @@ !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1014,7 +1060,7 @@ !PREFERENCES_OUTDIRFOLDER;Save to folder !PREFERENCES_OUTDIRFOLDERHINT;Save images to the selected folder. !PREFERENCES_OUTDIRTEMPLATE;Use template -!PREFERENCES_OUTDIRTEMPLATEHINT;You can use the following formatting strings:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nThese formatting strings refer to the different parts of the photo's pathname, some attributes of the photo or an arbitrary sequence index in the batch job.\n\nFor example, if the photo being processed has the following pathname:\n/home/tom/photos/2010-10-31/dsc0042.nef\nthe meaning of the formatting strings are:\n%d4 = home\n%d3 = tom\n%d2 = photos\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tom/photos/2010-10-31/\n%p2 = /home/tom/photos/\n%p3 = /home/tom/\n%p4 = /home/\n\n%r will be replaced by the rank of the photo. If the photo is unranked, %r will be replaced by '0'. If the photo is in the trash bin, %r will be replaced by 'x'.\n\n%s1, %s2, etc. will be replaced by a sequence index which is padded to between 1 and 9 digits. The sequence index will start at one each time the queue processing is started and is incremented by one for each image processed.\n\nIf you want to save the output image where the original is, write:\n%p1/%f\n\nIf you want to save the output image in a directory named "converted" located in the directory of the opened image, write:\n%p1/converted/%f\n\nIf you want to save the output image in a directory named "/home/tom/photos/converted/2010-10-31", write:\n%p2/converted/%d1/%f +!PREFERENCES_OUTDIRTEMPLATEHINT;You can use the following formatting strings:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nThese formatting strings refer to the different parts of the photo's pathname, some attributes of the photo or an arbitrary sequence index in the batch job.\n\nFor example, if the photo being processed has the following pathname:\n/home/tom/photos/2010-10-31/dsc0042.nef\nthe meaning of the formatting strings are:\n%d4 = home\n%d3 = tom\n%d2 = photos\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tom/photos/2010-10-31/\n%p2 = /home/tom/photos/\n%p3 = /home/tom/\n%p4 = /home/\n\n%r will be replaced by the rank of the photo. If the photo is unranked, %r will be replaced by '0'. If the photo is in the trash bin, %r will be replaced by 'x'.\n\n%s1, %s2, etc. will be replaced by a sequence index which is padded to between 1 and 9 digits. The sequence index will start at one each time the queue processing is started and is incremented by one for each image processed.\n\nIf you want to save the output image where the original is, write:\n%p1/%f\n\nIf you want to save the output image in a directory named "converted" located in the directory of the opened image, write:\n%p1/converted/%f\n\nIf you want to save the output image in a directory named\n"/home/tom/photos/converted/2010-10-31", write:\n%p2/converted/%d1/%f !PREFERENCES_OVERLAY_FILENAMES;Overlay filenames on thumbnails in the file browser !PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP;Overlay filenames on thumbnails in the editor pannel !PREFERENCES_OVERWRITEOUTPUTFILE;Overwrite existing output files @@ -1029,20 +1075,25 @@ !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) !PREFERENCES_PROFILEHANDLING;Processing Profile Handling !PREFERENCES_PROFILELOADPR;Processing profile loading priority !PREFERENCES_PROFILEPRCACHE;Profile in cache !PREFERENCES_PROFILEPRFILE;Profile next to the input file +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file !PREFERENCES_PROFILESAVECACHE;Save processing profile to the cache !PREFERENCES_PROFILESAVEINPUT;Save processing profile next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROPERTY;Property +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_PSPATH;Adobe Photoshop installation directory !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SELECTLANG;Select language !PREFERENCES_SELECTTHEME;Select theme @@ -1058,7 +1109,6 @@ !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. @@ -1068,10 +1118,12 @@ !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_BROWSER;File Browser !PREFERENCES_TAB_COLORMGR;Color Management +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_GENERAL;General !PREFERENCES_TAB_IMPROC;Image Processing !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1080,7 +1132,6 @@ !PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -!PREFERENCES_USESYSTEMTHEME;Use system theme !PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) !PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' !PREFERENCES_WLONE;One level @@ -1096,6 +1147,7 @@ !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste !PROFILEPANEL_PCUSTOM;Custom +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PFILE;From file !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_PLASTSAVED;Last Saved @@ -1229,11 +1281,11 @@ !TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left.\n\nShortcuts:\n[ - Multiple Editor Tabs Mode,\nAlt-[ - Single Editor Tab Mode. !TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right.\n\nShortcuts:\n] - Multiple Editor Tabs Mode,\nAlt-] - Single Editor Tab Mode. !TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically. -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1253,8 +1305,8 @@ !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1265,6 +1317,7 @@ !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1276,9 +1329,11 @@ !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1297,10 +1352,14 @@ !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1438,8 +1497,7 @@ !TP_DIRPYREQUALIZER_THRESHOLD;Threshold !TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. !TP_DISTORTION_AMOUNT;Amount -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_DISTORTION_LABEL;Distortion Correction !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma @@ -1518,18 +1576,17 @@ !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERA;Camera standard !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. @@ -1546,12 +1603,12 @@ !TP_ICM_NOICM;No ICM: sRGB Output !TP_ICM_OUTPUTPROFILE;Output Profile !TP_ICM_PROFILEINTENT;Rendering Intent -!TP_ICM_SAVEREFERENCE;Save Reference Image for Profiling +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_ICM_WORKINGPROFILE;Working Profile !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold @@ -1639,21 +1696,82 @@ !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD;Method !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD !TP_RAW_FALSECOLOR;False color suppression steps +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2018,6 +2136,8 @@ !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) !TP_WBALANCE_SPOTWB;Spot WB +!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_TEMPERATURE;Temperature !TP_WBALANCE_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 54a2fde5b..7fd2b54ab 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -161,7 +161,6 @@ FILEBROWSER_DELETEDLGMSG;¿Seguro que quiere borrar los %1 archivos selec FILEBROWSER_DELETEDLGMSGINCLPROC;¿Seguro que quiere borrar los %1 archivos seleccionados incluyendo la versión procesada en la cola? FILEBROWSER_EMPTYTRASH;Vaciar papelera FILEBROWSER_EMPTYTRASHHINT;Borrar definitivamente los archivos en la papelera -FILEBROWSER_EXEC_CPB;Ejecutar generador de perfiles de imagen del usuario FILEBROWSER_EXTPROGMENU;Abrir con FILEBROWSER_FLATFIELD;Campo plano FILEBROWSER_MOVETODARKFDIR;Mover a carpeta de Tomas Negras @@ -270,7 +269,6 @@ HISTOGRAM_TOOLTIP_R;Mostrar/Ocultar Histograma Rojo HISTOGRAM_TOOLTIP_RAW;Mostrar/ocultar Histograma Raw HISTORY_CHANGED;Cambiado HISTORY_CUSTOMCURVE;Curva a medida -HISTORY_DELSNAPSHOT;Quitar instantánea HISTORY_FROMCLIPBOARD;Desde el portapapeles HISTORY_LABEL;Historial HISTORY_MSG_1;Foto abierta @@ -573,47 +571,23 @@ HISTORY_NEWSNAPSHOT;Agregar HISTORY_NEWSNAPSHOT_TOOLTIP;Atajo: Alt-s HISTORY_SNAPSHOT;Instantánea HISTORY_SNAPSHOTS;Instantáneas -IPTCPANEL_AUTHOR;Autor -IPTCPANEL_AUTHORSPOSITION;Tratamiento o título del autor -IPTCPANEL_AUTHORSPOSITIONHINT;Título o cargo del creador o de los creadores del objeto. -IPTCPANEL_CAPTION;Leyenda -IPTCPANEL_CAPTIONHINT;Descripción textual de la información (Leyenda). -IPTCPANEL_CAPTIONWRITER;Autor de la leyenda -IPTCPANEL_CAPTIONWRITERHINT;Nombre de la persona que escribió, modificó o corrigió la imagen o leyenda/resumen. IPTCPANEL_CATEGORY;Categoría -IPTCPANEL_CATEGORYHINT;Identificador del tema de la imagen según el proveedor (Categoría). IPTCPANEL_CITY;Ciudad -IPTCPANEL_CITYHINT;Ciudad Origen de la imagen. IPTCPANEL_COPYHINT;Copiar ajustes IPTC al portapapeles -IPTCPANEL_COPYRIGHT;Derechos de autor -IPTCPANEL_COPYRIGHTHINT;Cualquier aviso/nota necesario sobre los derechos de autor. IPTCPANEL_COUNTRY;País -IPTCPANEL_COUNTRYHINT;Nombre de la Ciudad/Locación principal donde la imagen fue creada. IPTCPANEL_CREDIT;Créditos IPTCPANEL_CREDITHINT;Identifica el proveedor de la imagen, que no necesariamente el dueño o creador. IPTCPANEL_DATECREATED;Fecha de creación -IPTCPANEL_DATECREATEDHINT;Fecha de creación del contenido intelectual de la imagen; Formato: AAAAMMDD. IPTCPANEL_EMBEDDED;Incrustado IPTCPANEL_EMBEDDEDHINT;Restablecer a los datos IPTC incrustados en el archivo de la imagen IPTCPANEL_HEADLINE;Encabezado -IPTCPANEL_HEADLINEHINT;Una anotación publicable que provee una sinopsis de los contenidos de la imagen. IPTCPANEL_INSTRUCTIONS;Instrucciones -IPTCPANEL_INSTRUCTIONSHINT;Otras instrucciones editoriales sobre el uso de la imagen (Términos de uso). IPTCPANEL_KEYWORDS;Palabras clave -IPTCPANEL_KEYWORDSHINT;Palabras clave que facilitan la búsqueda de la imagen. IPTCPANEL_PASTEHINT;Pegar ajustes IPTC desde el portapapeles -IPTCPANEL_PROVINCE;Estado/Provincia -IPTCPANEL_PROVINCEHINT;Origen de la imagen: Estado/Provincia (Province-State). IPTCPANEL_RESET;Restablecer IPTCPANEL_RESETHINT;Restablecer a los ajustes predeterminados del perfil. IPTCPANEL_SOURCE;Fuente -IPTCPANEL_SOURCEHINT;Propietario original del contenido intelectual de la imagen (Source). -IPTCPANEL_SUPPCATEGORIES;Categorías suplementarias -IPTCPANEL_SUPPCATEGORIESHINT;Datos adicionales del tema de la imagen. IPTCPANEL_TITLE;Título -IPTCPANEL_TITLEHINT;Descripción breve de la imagen. -IPTCPANEL_TRANSREFERENCE;Ref. Transm. original -IPTCPANEL_TRANSREFERENCEHINT;Código representando el lugar de la transmisión original. MAIN_BUTTON_FULLSCREEN;Pantalla completa MAIN_BUTTON_NAVNEXT_TOOLTIP;Navegar hasta la imagen Siguiente a la que está abierta en el editor:\nShift-F4\n\nPara navegar hasta la imagen Siguiente a aquella cuya miniatura está seleccionada en el Explorador de Archivos:\nF4 MAIN_BUTTON_NAVPREV_TOOLTIP;Navegar hasta la imagen Anterior a la que está abierta en el editor:\nShift-F3\n\nPara navegar hasta la imagen Anterior a aquella cuya miniatura está seleccionada en el Explorador de Archivos:\nF3 @@ -734,8 +708,6 @@ PARTIALPASTE_PREPROCESS_GREENEQUIL;Equilibrio del verde PARTIALPASTE_PREPROCESS_HOTPIXFILT;Aplicar filtro Pixel Caliente PARTIALPASTE_PREPROCESS_LINEDENOISE;Filtro de ruido de línea PARTIALPASTE_RAWCACORR_AUTO;Auto corrección de Aberración Cromática -PARTIALPASTE_RAWCACORR_CABLUE;AC Azul -PARTIALPASTE_RAWCACORR_CARED;AC Rojo PARTIALPASTE_RAWEXPOS_BLACK;Nivel de negro PARTIALPASTE_RAWEXPOS_LINEAR;Corrección de punto blanco PARTIALPASTE_RAWEXPOS_PRESER;Preservar Luces Altas @@ -793,8 +765,6 @@ PREFERENCES_DARKFRAMESHOTS;disparos PREFERENCES_DARKFRAMETEMPLATES;plantillas PREFERENCES_DATEFORMAT;Formato de fecha PREFERENCES_DATEFORMATHINT;Puede usar las siguientes variables :\n%y : año\n%m : mes\n%d : dia\n\nPor ejemplo, la fecha en formato Húngaro es: \n%y/%m/%d -PREFERENCES_DEFAULTLANG;Idioma predeterminado -PREFERENCES_DEFAULTTHEME;Tema predeterminado PREFERENCES_DIRDARKFRAMES;Carpeta con las Tomas Negras PREFERENCES_DIRHOME;Carpeta de usuario PREFERENCES_DIRLAST;Última carpeta visitada @@ -881,7 +851,6 @@ PREFERENCES_SHOWEXPOSURECOMPENSATION;Mostrar compensación de exposición PREFERENCES_SHTHRESHOLD;Umbral de sombras cortadas PREFERENCES_SINGLETAB;Modo Editor de pestaña única PREFERENCES_SINGLETABVERTAB;Modo Editor de pestaña única, pestañas verticales -PREFERENCES_SLIMUI;Interfase gráfica adelgazada PREFERENCES_SND_BATCHQUEUEDONE;Trabajos en cola finalizados PREFERENCES_SND_HELP;Introducir el path o dejar en blanco (sin sonido). En Windows, usar "SystemDefault", "SystemAsterisk" etc. para los sonidos del sistema\nEn Linux use "complete", "window-attention" etc. para los sonidos del sistema. PREFERENCES_SND_LNGEDITPROCDONE;Procesado del editor terminado @@ -897,7 +866,6 @@ PREFERENCES_TP_LABEL;Panel de herramientas: PREFERENCES_TP_USEICONORTEXT;Usar iconos de pestaña en lugar de texto PREFERENCES_TP_VSCROLLBAR;Ocultar barra de desplazamiento vertical del panel de herramientas PREFERENCES_USEBUNDLEDPROFILES;Usar perfiles empaquetados -PREFERENCES_USESYSTEMTHEME;Usar tema del sistema PREFERENCES_VIEW;Balance de blancos en el dispositivo de salida (monitor, TV, proyector...) PREFERENCES_WORKFLOW;Disposición PROFILEPANEL_COPYPPASTE;Parámetros a copiar @@ -1204,8 +1172,6 @@ TP_DIRPYREQUALIZER_SKIN_TOOLTIP;A -100 se focalizan los tonos de piel.\nA 0 todo TP_DIRPYREQUALIZER_THRESHOLD;Umbral TP_DIRPYREQUALIZER_TOOLTIP;Reduce los elementos extraños producidos en la transición entre los colores de piel (matiz, crominancia, luminancia) y el resto de la imagen. TP_DISTORTION_AMOUNT;Cantidad -TP_DISTORTION_AUTO;Auto corrección de distorsión -TP_DISTORTION_AUTO_TIP;(Experimental) Corrige automáticamente la distorsión de la lente para algunas cámaras (Micro 4/3, algunas compactas DC, etc.) TP_DISTORTION_LABEL;Corrección de Distorsión TP_EPD_EDGESTOPPING;Parada en los bordes TP_EPD_LABEL;Mapeo tonal @@ -1299,7 +1265,6 @@ TP_ICM_INPUTPROFILE;Perfil de entrada TP_ICM_LABEL;Gestión de color TP_ICM_NOICM;Sin ICM: Salida sRGB TP_ICM_OUTPUTPROFILE;Perfil de salida -TP_ICM_SAVEREFERENCE;Guardar como referencia para el perfilado TP_ICM_SAVEREFERENCE_TOOLTIP;Guardar la imagen TIFF lineal antes de aplicar el perfil de entrada. El resultado puede ser utilizado para fines de calibración y la generación de un perfil de cámara. TP_ICM_TONECURVE;Usar la curva tonal en DCP TP_ICM_TONECURVE_TOOLTIP;Activa el uso de las curvas de tono que pueden contener los perfiles DCP. Este ajuste es posible solo si el DCP seleccionado contiene una curva tonal. @@ -1449,7 +1414,6 @@ TP_SHARPENING_RLD_AMOUNT;Cantidad TP_SHARPENING_RLD_DAMPING;Amortiguación TP_SHARPENING_RLD_ITERATIONS;Iteraciones TP_SHARPENING_THRESHOLD;Umbral -TP_SHARPENING_TOOLTIP;Espere un efecto ligeramente diferente cuando es usado en combinación con CIECAM02. Si la diferencia es notable ajuste a su gusto. TP_SHARPENING_USM;Máscara de enfoque TP_SHARPENMICRO_AMOUNT;Cantidad TP_SHARPENMICRO_LABEL;Microcontraste @@ -1541,8 +1505,24 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_EQUALIZER;Bypass Wavelet Levels +!EXPORT_PIPELINE;Processing pipeline +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !FILEBROWSER_POPUPCOLORLABEL0;Label: None +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWNOTTRASHHINT;Show only non-deleted images. !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !FILECHOOSER_FILTER_ANY;All files @@ -1555,6 +1535,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_299;NR - Chrominance curve !HISTORY_MSG_300;- @@ -1617,7 +1598,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -1669,12 +1650,12 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1687,8 +1668,8 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -1700,7 +1681,58 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1717,6 +1749,9 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PARTIALPASTE_EQUALIZER;Wavelet levels !PARTIALPASTE_GRADIENT;Graduated filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue +!PARTIALPASTE_RAW_IMAGENUM;Sub-image +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_WAVELETGROUP;Wavelet Levels !PREFERENCES_AUTLISLOW;Low @@ -1728,16 +1763,19 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_CIEART_FRAME;CIECAM02-Specific Settings !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1745,6 +1783,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1752,9 +1791,10 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_NAVIGATIONFRAME;Navigation !PREFERENCES_NOISE;Noise Reduction !PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP;Overlay filenames on thumbnails in the editor pannel @@ -1764,7 +1804,12 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font @@ -1775,6 +1820,8 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1783,6 +1830,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_WLONE;One level !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No +!PROFILEPANEL_PDYNAMIC;Dynamic !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. !SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. @@ -1791,6 +1839,13 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_CROP_GTHARMMEANS;Harmonic Means !TP_CROP_GTTRIANGLE1;Golden Triangles 1 !TP_CROP_GTTRIANGLE2;Golden Triangles 2 @@ -1830,19 +1885,20 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_DIRPYRDENOISE_SLI;Slider !TP_DIRPYRDENOISE_TILELABEL;Tile size=%1, Center: Tx=%2 Ty=%3 !TP_DIRPYREQUALIZER_ARTIF;Reduce artifacts +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_GAMMA;Gamma !TP_EXPOSURE_TCMODE_LUMINANCE;Luminance !TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptual !TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_LABCURVE_CURVEEDITOR_CC;CC @@ -1850,8 +1906,69 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_PRSHARPENING_LABEL;Post-Resize Sharpening !TP_PRSHARPENING_TOOLTIP;Sharpens the image after resizing. Only works when the "Lanczos" resizing method is used. It is impossible to preview the effects of this tool. See RawPedia for usage instructions. !TP_RAWCACORR_CASTR;Strength +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. +!TP_RAW_LMMSE;LMMSE +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red +!TP_RAW_VNG4;VNG4 !TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL !TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* !TP_RETINEX_CONTEDIT_LH;Hue equalizer @@ -2095,4 +2212,6 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !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_TMTYPE;Compression method !TP_WAVELET_TON;Toning +!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". !ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: Alt-f diff --git a/rtdata/languages/Euskara b/rtdata/languages/Euskara index 7ebb655f5..94c651b08 100644 --- a/rtdata/languages/Euskara +++ b/rtdata/languages/Euskara @@ -83,7 +83,6 @@ HISTOGRAM_TOOLTIP_L;Erakutsi/Ezkutatu CIELAB argitasun histograma HISTOGRAM_TOOLTIP_R;Erakutsi/Ezkutatu gorri histograma HISTORY_CHANGED;Changed HISTORY_CUSTOMCURVE;Neurriko kurba -HISTORY_DELSNAPSHOT;Argazkia kendu HISTORY_FROMCLIPBOARD;From clipboard HISTORY_LABEL;Historia HISTORY_MSG_1;Argazki irekia @@ -170,47 +169,23 @@ HISTORY_MSG_81;Resize enabled HISTORY_NEWSNAPSHOT;Argazki berria HISTORY_SNAPSHOT;Argazkia HISTORY_SNAPSHOTS;Argazkiak -IPTCPANEL_AUTHOR;Author -IPTCPANEL_AUTHORSPOSITION;Author's position -IPTCPANEL_AUTHORSPOSITIONHINT;Title of the creator or creators of the object (By-line Title). -IPTCPANEL_CAPTION;Caption -IPTCPANEL_CAPTIONHINT;A textual description of the data (Caption - Abstract) -IPTCPANEL_CAPTIONWRITER;Caption Writer -IPTCPANEL_CAPTIONWRITERHINT;The name of the person involved in the writing, editing or correcting the image or caption/abstract (Writer - Editor) IPTCPANEL_CATEGORY;Category -IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider (Category). IPTCPANEL_CITY;City -IPTCPANEL_CITYHINT;City of image origin (City). IPTCPANEL_COPYHINT;Copy IPTC settings to clipboard -IPTCPANEL_COPYRIGHT;Copyright -IPTCPANEL_COPYRIGHTHINT;Any necessary copyright notice (Copyright Notice). IPTCPANEL_COUNTRY;Country -IPTCPANEL_COUNTRYHINT;The name of the country/primary location where the image was created (Country - Primary Location Name). IPTCPANEL_CREDIT;Credit IPTCPANEL_CREDITHINT;Identifies the provider of the image, not necessarily the owner/creator (Credit). IPTCPANEL_DATECREATED;Date Created -IPTCPANEL_DATECREATEDHINT;The date the intellectual content of the image was created; Format: JJJJMMTT (Date Created). IPTCPANEL_EMBEDDED;Embedded IPTCPANEL_EMBEDDEDHINT;Reset to IPTC data embedded in the image file IPTCPANEL_HEADLINE;Headline -IPTCPANEL_HEADLINEHINT;A publishable entry providing a synopsis of the contents of the image (Headline). IPTCPANEL_INSTRUCTIONS;Instructions -IPTCPANEL_INSTRUCTIONSHINT;Other editorial instructions concerning the use of the image (Special Instructions). IPTCPANEL_KEYWORDS;Keywords -IPTCPANEL_KEYWORDSHINT;Used to indicate specific information retrieval words (Keywords). IPTCPANEL_PASTEHINT;Paste IPTC settings from clipboard -IPTCPANEL_PROVINCE;Province -IPTCPANEL_PROVINCEHINT;The Province/State where the image originates (Province-State). IPTCPANEL_RESET;Reset IPTCPANEL_RESETHINT;Reset to profile default IPTCPANEL_SOURCE;Source -IPTCPANEL_SOURCEHINT;The original owner of the intellectual content of the image (Source). -IPTCPANEL_SUPPCATEGORIES;Suppl. Categories -IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image (Supplemental Categories). IPTCPANEL_TITLE;Title -IPTCPANEL_TITLEHINT;A shorthand reference for the image (Object Name). -IPTCPANEL_TRANSREFERENCE;Trans. Reference -IPTCPANEL_TRANSREFERENCEHINT;A code representing the location of original transmission (Original Transmission Reference). MAIN_BUTTON_PREFERENCES;Ezarpenak MAIN_BUTTON_SAVE;Irudia gorde MAIN_BUTTON_SENDTOEDITOR;Send to editor @@ -269,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;Itzal/argi moztuen adierazlea PREFERENCES_DATEFORMAT;Data formatua PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y : year\n%m : month\n%d : day\n\nFor example, the hungarian date format is:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Hizkuntza -PREFERENCES_DEFAULTTHEME;Default theme PREFERENCES_DIRHOME;Etxe karpeta PREFERENCES_DIRLAST;Azkena ikusitako karpeta PREFERENCES_DIROTHER;Besterik @@ -396,7 +369,6 @@ TP_ICM_INPUTPROFILE;Sarrerako profila TP_ICM_LABEL;ICM TP_ICM_NOICM;ICM-rik ez: sRGB irteera TP_ICM_OUTPUTPROFILE;Irteera profila -TP_ICM_SAVEREFERENCE;Save reference image for profiling TP_ICM_WORKINGPROFILE;Lan profila TP_RAW_DMETHOD;Metodoa TP_RAW_FALSECOLOR;Okerreko kolore ezabaketa atalak @@ -475,12 +447,23 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. !EXIFFILTER_EXPOSURECOMPENSATION;Exposure compensation (EV) !EXIFFILTER_FILETYPE;File type !EXIFFILTER_METADATAFILTER;Enable metadata filters +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -503,8 +486,12 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -520,7 +507,6 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !FILEBROWSER_CURRENT_NAME;Current name: !FILEBROWSER_DARKFRAME;Dark-frame !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -555,6 +541,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -590,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -871,7 +859,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -923,12 +911,12 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -941,8 +929,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -954,8 +942,58 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -975,6 +1013,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d @@ -1049,8 +1088,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -1059,7 +1097,9 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves !PARTIALPASTE_SHARPENEDGE;Edges @@ -1088,7 +1128,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1100,7 +1141,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1113,7 +1155,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_EDITORLAYOUT;Editor Layout !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field !PREFERENCES_FLATFIELDFOUND;Found @@ -1129,7 +1171,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1144,6 +1187,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1159,9 +1203,10 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1177,13 +1222,18 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROPERTY;Property +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files @@ -1194,15 +1244,16 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. !PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done !PREFERENCES_SND_TRESHOLDSECS;After seconds !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1211,7 +1262,6 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -!PREFERENCES_USESYSTEMTHEME;Use system theme !PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) !PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' !PREFERENCES_WLONE;One level @@ -1224,6 +1274,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save !PROGRESSBAR_LOADINGTHUMBS;Loading thumbnails... @@ -1316,11 +1367,11 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1340,8 +1391,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1352,6 +1403,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1363,9 +1415,11 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1384,10 +1438,14 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1513,8 +1571,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_THRESHOLD;Threshold !TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma !TP_EPD_LABEL;Tone Mapping @@ -1578,18 +1635,17 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1598,11 +1654,12 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_ICM_INPUTNONE;No profile !TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift @@ -1689,19 +1746,80 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2024,6 +2142,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_WBALANCE_SOLUX41;Solux 4100K !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) +!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_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index fe7b73832..088e8d5f1 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -34,9 +34,18 @@ CURVEEDITOR_TOOLTIPPASTE;Colle la courbe du presse-papier CURVEEDITOR_TOOLTIPSAVE;Enregistrer la courbe actuelle CURVEEDITOR_TYPE;Type: DIRBROWSER_FOLDERS;Répertoires +DYNPROFILEEDITOR_DELETE;Supprimer +DYNPROFILEEDITOR_EDIT;Modifier +DYNPROFILEEDITOR_EDIT_RULE;Modifier une règle de Profil Dynamique +DYNPROFILEEDITOR_ENTRY_TOOLTIP;La correspondance est insensible à la casse.\nUtilisez le préfix "re:" pour entrer\nune expression régulière. +DYNPROFILEEDITOR_MOVE_DOWN;Déplacer vers le bas +DYNPROFILEEDITOR_MOVE_UP;Déplacer vers le haut +DYNPROFILEEDITOR_NEW;Nouveau +DYNPROFILEEDITOR_NEW_RULE;Nouvelle Règle de Profil Dynamique +DYNPROFILEEDITOR_PROFILE;Profil de Traitement EDITWINDOW_TITLE;Édition d'image EDIT_OBJECT_TOOLTIP;Affiche des éléments dans la fenêtre de prévisualisation qui vous permettront d'ajuster cet outil. -EDIT_PIPETTE_TOOLTIP;Pour ajouter un point d'ajustement de la courbe, maintenez la touche Ctrl préssée et cliquez dans l'image avec le bouton gauche.\nPour ajuster le point, pressez la touche Ctrl lors du clic-gauche sur la zone correspondande dans l'apperçu, puis relachez Ctrl (sauf si vous désirez un control plus fin) et tout en gardant le bouton gauche appuyé, déplacez le curseur vers le haut ou le bas pour ajuster la position du point. +EDIT_PIPETTE_TOOLTIP;Pour ajouter un point d'ajustement de la courbe, maintenez la touche Ctrl pressée et cliquez dans l'image avec le bouton gauche.\nPour ajuster le point, pressez la touche Ctrl lors du clic-gauche sur la zone correspondante dans l'aperçu, puis relachez Ctrl (sauf si vous désirez un contrôle plus fin) et tout en gardant le bouton gauche appuyé, déplacez le curseur vers le haut ou le bas pour ajuster la position du point. EXIFFILTER_APERTURE;Ouverture EXIFFILTER_CAMERA;Appareil photo EXIFFILTER_EXPOSURECOMPENSATION;Compensation d'exposition (EV) @@ -60,6 +69,7 @@ EXIFPANEL_RESETALL;Réinitialiser tout EXIFPANEL_RESETALLHINT;Réinitialise tous les tags à leur valeur initiale EXIFPANEL_RESETHINT;Réinitialise les données sélectionnées à la valeur initiale EXIFPANEL_SUBDIRECTORY;Sous-répertoire +EXPORT_BYPASS;Étapes de traitement à ignorer EXPORT_BYPASS_ALL;Sélectionner / Désélectionner tout EXPORT_BYPASS_DEFRINGE;Ignorer la corr. d'aberration chromatique EXPORT_BYPASS_DIRPYRDENOISE;Ignorer la réduction du bruit @@ -79,11 +89,15 @@ EXPORT_BYPASS_SHARPENING;Ignorer la netteté EXPORT_BYPASS_SHARPENMICRO;Ignorer netteté des microcontrastes EXPORT_BYPASS_SH_HQ;Ignorer Ombres/Hautes lumières (HQ) EXPORT_FASTEXPORTOPTIONS;Options d'Export Rapide -EXPORT_INSTRUCTIONS;Les options d'Export Rapide permettent de forcer des paramètres afin d'éviter d'utiliser des outils très consommateur de temps et de ressources, et d'utiliser ces options dans la file de traitement. Cette méthode est recommandée pour la génération rapide d'images de basse résolution quand la vitesse est une priorité ou lorsqu'on désir une version redimensionnée d'une ou plusieurs images de sortie sans avoir à modifier leurs paramètres de développement. +EXPORT_INSTRUCTIONS;Les options d'Export Rapide permettent de forcer des paramètres afin d'éviter d'utiliser des outils très consommateurs de temps et de ressources, et d'utiliser ces options dans la file de traitement. Cette méthode est recommandée pour la génération rapide d'images de basse résolution quand la vitesse est une priorité ou lorsqu'on désire une version redimensionnée d'une ou plusieurs images de sortie sans avoir à modifier leurs paramètres de développement. EXPORT_MAXHEIGHT;Hauteur maximum: EXPORT_MAXWIDTH;Largeur maximum: +EXPORT_PIPELINE;Pipeline de Traitement EXPORT_PUTTOQUEUEFAST;Mettre dans la file de traitement\npour Export Rapide EXPORT_RAW_DMETHOD;Méthode de dématriçage +EXPORT_USE_FAST_PIPELINE;Dédié\n(traitement complet sur une image rédimmentionnée) +EXPORT_USE_FAST_PIPELINE_TIP;Utilise un pipeline de traitement dédié pour les images en Export Rapide, qui priviliégie la vitesse sur la qualité. Le redimentionnement des images est fait dès que possible, au lieu d'être fait à la fin comme dans le pipeline normal. L'accélération peut être significative, mais soyez prêt à voir des artéfacts et une dégradation générale de la qualité de sortie. +EXPORT_USE_NORMAL_PIPELINE;Standard\n(ignore des étapes, redimentionne à la fin) EXTPROGTARGET_1;raw EXTPROGTARGET_2;file de traitement FILEBROWSER_ADDDELTEMPLATE;Ajouter/Supprimer le modèle... @@ -106,7 +120,6 @@ FILEBROWSER_DELETEDLGMSG;Êtes-vous sûr de vouloir supprimer les %1 fichiers se FILEBROWSER_DELETEDLGMSGINCLPROC;Êtes-vous sûr de vouloir supprimer les %1 fichiers sélectionnés, INCLUANT une version déjà traitée? FILEBROWSER_EMPTYTRASH;Vider la corbeille FILEBROWSER_EMPTYTRASHHINT;Supprime définitivement les fichiers de la corbeille -FILEBROWSER_EXEC_CPB;Lancer un constructeur de profil personnalisé FILEBROWSER_EXTPROGMENU;Ouvrir avec FILEBROWSER_FLATFIELD;Champ Uniforme FILEBROWSER_MOVETODARKFDIR;Déplacer dans le dossier d'images de Trame Noire @@ -156,6 +169,7 @@ FILEBROWSER_RANK3_TOOLTIP;Rang 3 *\nRaccourci: Shift-3 FILEBROWSER_RANK4_TOOLTIP;Rang 4 *\nRaccourci: Shift-4 FILEBROWSER_RANK5_TOOLTIP;Rang 5 *\nRaccourci: Shift-5 FILEBROWSER_RENAMEDLGLABEL;Renommage du fichier +FILEBROWSER_RESETDEFAULTPROFILE;Réinitialise au traitement par défaut FILEBROWSER_SELECTDARKFRAME;Choisir une image de Trame Noire... FILEBROWSER_SELECTFLATFIELD;Sélectionner un Champ Uniforme... FILEBROWSER_SHOWCOLORLABEL1HINT;Afficher les images avec un label Rouge\nRaccourci: Alt-1 @@ -168,6 +182,7 @@ FILEBROWSER_SHOWEDITEDHINT;Afficher les images éditées\nRaccourci: 7 FILEBROWSER_SHOWEDITEDNOTHINT;Afficher les images non éditées\nRaccourci: 6 FILEBROWSER_SHOWEXIFINFO;Montrer les infos EXIF.\nRaccourci: i\n\nRaccourcis dans le mode Éditeur Unique: Alt-i FILEBROWSER_SHOWNOTTRASHHINT;Voir uniquement les images non supprimées +FILEBROWSER_SHOWORIGINALHINT;Voir seulement les images originales.\n\nQuand plusieurs images éxistent avec le même nom de fichier mais des extensions différentes, celle considéré originale est celle dont l'extention est au plus dans la liste des extensions dans Préférences > Navigateur de fichiers > Extensions considérées. FILEBROWSER_SHOWRANK1HINT;Voir les images 1 étoile\nRaccourci: 1 FILEBROWSER_SHOWRANK2HINT;Voir les images 2 étoiles\nRaccourci: 2 FILEBROWSER_SHOWRANK3HINT;Voir les images 3 étoiles\nRaccourci: 3 @@ -196,6 +211,7 @@ FILECHOOSER_FILTER_SAME;Même format que la photo FILECHOOSER_FILTER_TIFF;Fichiers TIFF GENERAL_ABOUT;À propos GENERAL_AFTER;Après +GENERAL_APPLY;Appliquer GENERAL_ASIMAGE;Comme l'image GENERAL_AUTO;Automatique GENERAL_BEFORE;Avant @@ -211,6 +227,7 @@ GENERAL_NA;indisponible GENERAL_NO;Non GENERAL_NONE;Aucun GENERAL_OK;OK +GENERAL_OPEN;Ouvrir GENERAL_PORTRAIT;Portrait GENERAL_SAVE;Enregistrer GENERAL_UNCHANGED;(Inchangé) @@ -225,7 +242,6 @@ HISTOGRAM_TOOLTIP_R;Montrer/cacher l'histogramme ROUGE HISTOGRAM_TOOLTIP_RAW;Montrer/Cacher l'histogramme des données RAW HISTORY_CHANGED;Changé HISTORY_CUSTOMCURVE;Courbe personnelle -HISTORY_DELSNAPSHOT;Supprimer HISTORY_FROMCLIPBOARD;Du presse-papier HISTORY_LABEL;Historique HISTORY_MSG_1;Photo chargée @@ -320,7 +336,7 @@ HISTORY_MSG_89;Réd. de bruit HISTORY_MSG_90;Réd. de bruit - Luminance HISTORY_MSG_91;Réd. de bruit - Chrominance Maître HISTORY_MSG_92;Réd. de bruit - Gamma -HISTORY_MSG_93;Param. Contraste par niv. de détail +HISTORY_MSG_93;CpND - Valeur HISTORY_MSG_94;Contraste par niveau de détail HISTORY_MSG_95;Lab - Chromaticité HISTORY_MSG_96;Courbe 'a' @@ -393,6 +409,7 @@ HISTORY_MSG_162;Compression Tonale HISTORY_MSG_163;Courbes RVB - Rouge HISTORY_MSG_164;Courbes RVB - Vert HISTORY_MSG_165;Courbes RVB - Bleu +HISTORY_MSG_166;Exposition - Réinit. HISTORY_MSG_167;Algorithme de dématriçage HISTORY_MSG_168;Courbe 'CC' HISTORY_MSG_169;Courbe 'CT' @@ -474,7 +491,7 @@ HISTORY_MSG_245;Vignet. - Centre HISTORY_MSG_246;Courbe 'CL' HISTORY_MSG_247;Courbe 'LT' HISTORY_MSG_248;Courbe 'TT' -HISTORY_MSG_249;Seuil Contraste par niv. de détail +HISTORY_MSG_249;CpND - Seuil HISTORY_MSG_250;Réd. de bruit - Amélioré HISTORY_MSG_251;N&B - Algorithme HISTORY_MSG_252;CpND - Tons chair @@ -618,7 +635,7 @@ HISTORY_MSG_389;O - Résiduel - BC bleu moyen HISTORY_MSG_390;O - Résiduel - BC vert bas HISTORY_MSG_391;O - Résiduel - BC bleu bas HISTORY_MSG_392;O - Résiduel - BC Réinitialiser -HISTORY_MSG_393;DCP - Table de recherche (LUT) +HISTORY_MSG_393;DCP - Table de corresp. (LUT) HISTORY_MSG_394;DCP - Exposition de base HISTORY_MSG_395;DCP - Table de base HISTORY_MSG_396;O - Contrast @@ -632,53 +649,105 @@ HISTORY_MSG_403;O - NB - Sensibilité des bords HISTORY_MSG_404;O - NB - Base amplification HISTORY_MSG_405;O - Débruitage - Niveau 4 HISTORY_MSG_406;O - NB - Pixels voisins +HISTORY_MSG_407;Retinex - Méthode +HISTORY_MSG_408;Retinex - Rayon +HISTORY_MSG_409;Retinex - Contraste +HISTORY_MSG_410;Retinex - Décalage +HISTORY_MSG_411;Retinex - Force +HISTORY_MSG_412;Retinex - Gradient Gaussien +HISTORY_MSG_413;Retinex - Contraste +HISTORY_MSG_414;Retinex - Histogramme - Lab +HISTORY_MSG_415;Retinex - Transmission +HISTORY_MSG_416;Retinex +HISTORY_MSG_417;Retinex - Transmission Médiane +HISTORY_MSG_418;Retinex - Seuil +HISTORY_MSG_419;Retinex - Espace couleur +HISTORY_MSG_420;Retinex - Histogramme - TSV +HISTORY_MSG_421;Retinex - Gamma +HISTORY_MSG_422;Retinex - Gamma +HISTORY_MSG_423;Retinex - Pente Gamma +HISTORY_MSG_424;Retinex - Seuille HL +HISTORY_MSG_425;Retrait de taches +HISTORY_MSG_426;Retinex - Égaliseur de teinte +HISTORY_MSG_427;Intention de rendu de sortie +HISTORY_MSG_428;Intention de rendu du moniteur +HISTORY_MSG_429;Retinex - Itérations +HISTORY_MSG_430;Retinex - Gradient de Transmission +HISTORY_MSG_431;Retinex - Gradient de Force +HISTORY_MSG_432;Retinex - M - Hautes lumières +HISTORY_MSG_433;Retinex - M - Hautes lumières TW +HISTORY_MSG_434;Retinex - M - Ombres +HISTORY_MSG_435;Retinex - M - Ombres TW +HISTORY_MSG_436;Retinex - M - Rayon +HISTORY_MSG_437;Retinex - M - Méthode +HISTORY_MSG_438;Retinex - M - Égaliseur +HISTORY_MSG_439;Retinex - Traitement +HISTORY_MSG_440;CpND - Méthode +HISTORY_MSG_441;Retinex - Gain de Tansmission +HISTORY_MSG_442;Retinex - Échelle HISTORY_MSG_443;Compensation du Point Noir de Sortie -HISTORY_MSG_444;Retrait de taches +HISTORY_MSG_444;BdB - Ajustement Temp +HISTORY_MSG_445;Sous-image RAW +HISTORY_MSG_449;PS - Adaptation ISO +HISTORY_MSG_452;PS - Voir les zones de mouvement +HISTORY_MSG_453;PS - Voir uniquement le masque +HISTORY_MSG_457;PS - Vérifier le rouge/bleu +HISTORY_MSG_462;PS - Vérifier le vert +HISTORY_MSG_464;PS - Flouter le masque de mouvement +HISTORY_MSG_465;PS - Rayons de floutage +HISTORY_MSG_468;PS - Remplir les trous +HISTORY_MSG_469;PS - Médiane +HISTORY_MSG_471;PS - Correction de mouvement +HISTORY_MSG_472;PS - Adoucir les transitions +HISTORY_MSG_473;PS - Utiliser LMMSE +HISTORY_MSG_474;PS - Égaliser +HISTORY_MSG_475;PS - Égaliser par canal HISTORY_NEWSNAPSHOT;Ajouter HISTORY_NEWSNAPSHOT_TOOLTIP;Raccourci: Alt-s HISTORY_SNAPSHOT;Capture HISTORY_SNAPSHOTS;Captures -IPTCPANEL_AUTHOR;Auteur -IPTCPANEL_AUTHORSPOSITION;Statut de l'auteur -IPTCPANEL_AUTHORSPOSITIONHINT;Statut du ou des créateurs de l'objet (By-line Title). -IPTCPANEL_CAPTION;Légende -IPTCPANEL_CAPTIONHINT;Une description explicite de la donnée (Légende - Résumé) -IPTCPANEL_CAPTIONWRITER;Auteur de la légende -IPTCPANEL_CAPTIONWRITERHINT;Le nom de la personne ayant rédigé, édité ou corrigé l'image ou la légende/résumé (Auteur - Editeur). IPTCPANEL_CATEGORY;Catégorie -IPTCPANEL_CATEGORYHINT;Identifie le sujet de l'image selon l'avis du fournisseur (Catégorie). +IPTCPANEL_CATEGORYHINT;Identifie le sujet de l'image selon l'opinion du fournisseur. IPTCPANEL_CITY;Ville -IPTCPANEL_CITYHINT;Ville d'origine de l'image (Ville). +IPTCPANEL_CITYHINT;Entrez les nom de la ville photographiée dans cette image. IPTCPANEL_COPYHINT;Copie les réglages IPTC dans le presse-papier -IPTCPANEL_COPYRIGHT;Droit de copie -IPTCPANEL_COPYRIGHTHINT;Toute remarque nécessaire de droit de copie (Remarque droit de copie). +IPTCPANEL_COPYRIGHT;Note de Copyright +IPTCPANEL_COPYRIGHTHINT;Entrez une Note sur le détenteur actuelle du Copyright pour cette image (ex: ©2008 Jean Dupont). IPTCPANEL_COUNTRY;Pays -IPTCPANEL_COUNTRYHINT;Le nom du pays de la ville principale où l'image a été créée (Pays - Nom de la ville principale). +IPTCPANEL_COUNTRYHINT;Enterez le nom du pays photographié dans cette image. +IPTCPANEL_CREATOR;Créateur +IPTCPANEL_CREATORHINT;Enterez le nom de la personne qui a créé cette image. +IPTCPANEL_CREATORJOBTITLE;Métier du créateur +IPTCPANEL_CREATORJOBTITLEHINT;Enterez le métier et/ou la fonction de la personne indiquée dans le champs Créateur. IPTCPANEL_CREDIT;Crédit IPTCPANEL_CREDITHINT;Identifie le fournisseur de l'image, pas nécessairement le propriétaire/créateur (Crédit). IPTCPANEL_DATECREATED;Date de création -IPTCPANEL_DATECREATEDHINT;La date de création du contenu intellectuel de l'image; Format: AAAAMMJJ (Date de création). +IPTCPANEL_DATECREATEDHINT;Entrez la date à laquelle la photo a été prise. +IPTCPANEL_DESCRIPTION;Description +IPTCPANEL_DESCRIPTIONHINT;Enterez une "légende" descrivant le qui, quoi et pourquoi de ce qui arrive dans cette image, cela peut inclure le nom des personnes, et/ou leur rôle dans l'action qui a lieu dans l'image. +IPTCPANEL_DESCRIPTIONWRITER;Rédacteur de la description +IPTCPANEL_DESCRIPTIONWRITERHINT;Enterez le nom de la personne impliquée dans la rédaction, édition ou correction de la description de cette image. IPTCPANEL_EMBEDDED;Incorporés IPTCPANEL_EMBEDDEDHINT;Réinitialise selon les données IPTC incorporées dans le fichier image IPTCPANEL_HEADLINE;Titre -IPTCPANEL_HEADLINEHINT;Une entrée publiable fournissant un synopsis du contenu de l'image (Titre). +IPTCPANEL_HEADLINEHINT;Enterez un bref synopsis publiable ou résumé du contenu de l'image. IPTCPANEL_INSTRUCTIONS;Instructions -IPTCPANEL_INSTRUCTIONSHINT;Autres instructions éditoriales concernant l'utilisation de l'image (Instructions spéciales). +IPTCPANEL_INSTRUCTIONSHINT;Enterez les informations à propos des embargos, ou autre restrictions non couvertes par le champs Copyright. IPTCPANEL_KEYWORDS;Mots clés -IPTCPANEL_KEYWORDSHINT;Utilisé pour spécifier des mots clés de recherches (Mots clés). +IPTCPANEL_KEYWORDSHINT;Enterez un nombre quelconque de mots clés, termes or phrases utilisés pour exprimer le sujet de l'image. IPTCPANEL_PASTEHINT;Colle les réglages IPTC du presse-papier -IPTCPANEL_PROVINCE;Province -IPTCPANEL_PROVINCEHINT;La province/état d'où est issue l'image (Province-Etat). +IPTCPANEL_PROVINCE;Province or État +IPTCPANEL_PROVINCEHINT;Enterez le nom de la province ou de l'État photographiée dans cette image. IPTCPANEL_RESET;Réinitialisation IPTCPANEL_RESETHINT;Réinitialise selon le profil par défaut IPTCPANEL_SOURCE;Source -IPTCPANEL_SOURCEHINT;Le propriétaire intellectuel du contenu de l'image (Source). -IPTCPANEL_SUPPCATEGORIES;Catégories suppl. -IPTCPANEL_SUPPCATEGORIESHINT;Précise un peu plus le sujet de l'image (Catégories supplémentaires). +IPTCPANEL_SOURCEHINT;Enterez ou éditez le nom de la personne ou du tiers qui a un rôle dans la chaîne de transmission du contenu, comme une personne ou entité de qui vous avez reçu cette image. +IPTCPANEL_SUPPCATEGORIES;Catégories supplémentaires +IPTCPANEL_SUPPCATEGORIESHINT;Description approfondie du sujet de l'image. IPTCPANEL_TITLE;Titre -IPTCPANEL_TITLEHINT;Raccourcis de référence de l'image (Nom de l'objet). -IPTCPANEL_TRANSREFERENCE;Réf. transmission -IPTCPANEL_TRANSREFERENCEHINT;Un code représentant le lieux de la transmission initiale (Référence de transmission initiale). +IPTCPANEL_TITLEHINT;Enterez un nom court et humainement lisible pour l'image, cela peut être le nom du fichier. +IPTCPANEL_TRANSREFERENCE;ID du travail +IPTCPANEL_TRANSREFERENCEHINT;Enterez un nombre ou identifiant servant au contrôle du flux de travail ou au suivi. MAIN_BUTTON_FULLSCREEN;Plein écran MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigue à l'image Suivante relativement à l'image ouverte dans l'Éditeur\nRaccourci: Shift-F4\n\nPour naviguer à l'image Suivante relativement à la vignette sélectionnée dans le Navigateur de fichiers\nRaccourci: F4 MAIN_BUTTON_NAVPREV_TOOLTIP;Navigue à l'image Précédente relativement à l'image ouverte dans l'Éditeur\nRaccourci: Shift-F3\n\nPour naviguer à l'image Précédente relativement à la vignette sélectionnée dans le Navigateur de fichiers\nRaccourci: F3 @@ -686,6 +755,7 @@ MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronise le Navigateur de fichiers avec l'Éditeu MAIN_BUTTON_PREFERENCES;Préférences MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;Ajouter l'image courante à la file de traitement\nRaccourci: Ctrl+b MAIN_BUTTON_SAVE_TOOLTIP;Enregistrer l'image courante\nRaccourci: Ctrl+s +MAIN_BUTTON_SENDTOEDITOR;Éditer l'image dans un éditeur extenre MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Éditer l'image courante dans l'éditeur externe\nRaccourci: Ctrl+e MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP;Afficher/Cacher les 2 panneaux latéraux\nRaccourci: m MAIN_BUTTON_UNFULLSCREEN;Quitter le plein écran @@ -711,18 +781,19 @@ MAIN_MSG_OPERATIONCANCELLED;Opération annulée MAIN_MSG_PATHDOESNTEXIST;Le chemin \n\n%1\n\nn'existe pas. S.V.P indiquez un chemin correct dans la fenêtre Préférences. MAIN_MSG_QOVERWRITE;Voulez-vous l'écraser? MAIN_MSG_SETPATHFIRST;Vous devez d'abord choisir un dossier cible dans Préférences\npour pouvoir utiliser cette fonction! +MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. MAIN_MSG_WRITEFAILED;Échec de l'enregistrement du fichier\n\n"%1"\n\nAssurez-vous que le dossier existe et qu'il est permis d'y écrire. MAIN_TAB_COLOR;Couleur MAIN_TAB_COLOR_TOOLTIP;Raccourci:Alt-c MAIN_TAB_DETAIL;Détail MAIN_TAB_DETAIL_TOOLTIP;Raccourci:Alt-d -MAIN_TAB_DEVELOP; Développer +MAIN_TAB_DEVELOP; Édition Par Lot MAIN_TAB_EXIF;EXIF -MAIN_TAB_EXPORT;Export Rapide +MAIN_TAB_EXPORT; Export Rapide MAIN_TAB_EXPOSURE;Exposition MAIN_TAB_EXPOSURE_TOOLTIP;Raccourci:Alt-e MAIN_TAB_FILTER; Filtrer -MAIN_TAB_INSPECT; Inspecter +MAIN_TAB_INSPECT; Inspecter MAIN_TAB_IPTC;IPTC MAIN_TAB_METADATA;Métadonnées MAIN_TAB_METADATA_TOOLTIP;Raccourci:Alt-m @@ -750,6 +821,7 @@ MAIN_TOOLTIP_SHOWHIDERP1;Afficher/Cacher le panneau droit\nRaccourci: Alt-lShift-L MAIN_TOOLTIP_THRESHOLD;Seuil MAIN_TOOLTIP_TOGGLE;Comparaison avant/après\nRaccourci: Shift-b +MONITOR_PROFILE_SYSTEM;Système par défaut NAVIGATOR_B;B: NAVIGATOR_G;V: NAVIGATOR_H;T: @@ -809,9 +881,9 @@ PARTIALPASTE_PREPROCESS_DEADPIXFILT;Filtrage des pixels morts PARTIALPASTE_PREPROCESS_GREENEQUIL;Équilibrage du vert PARTIALPASTE_PREPROCESS_HOTPIXFILT;Filtrage des pixels chauds PARTIALPASTE_PREPROCESS_LINEDENOISE;Filtre de bruit de ligne +PARTIALPASTE_PRSHARPENING;Netteté post-redim. PARTIALPASTE_RAWCACORR_AUTO;Corr. auto. de l'aberr. chromatique -PARTIALPASTE_RAWCACORR_CABLUE;Aberr. chromatique bleu -PARTIALPASTE_RAWCACORR_CARED;Aberr. chromatique rouge +PARTIALPASTE_RAWCACORR_CAREDBLUE;Aberr. chromatique rouge et bleu PARTIALPASTE_RAWEXPOS_BLACK;Niveaux de noir PARTIALPASTE_RAWEXPOS_LINEAR;Correction du point blanc PARTIALPASTE_RAWEXPOS_PRESER;Préservation des hautes humières @@ -820,8 +892,11 @@ PARTIALPASTE_RAW_DCBENHANCE;Amélioration de DCB PARTIALPASTE_RAW_DCBITERATIONS;Nombre d'itération de DCB PARTIALPASTE_RAW_DMETHOD;Algorithme de dématriçage PARTIALPASTE_RAW_FALSECOLOR;Nbr d'itération des fausses couleurs +PARTIALPASTE_RAW_IMAGENUM;Sub-image PARTIALPASTE_RAW_LMMSEITERATIONS;Niveau d'amélioration LMMSE +PARTIALPASTE_RAW_PIXELSHIFT;PixelShift PARTIALPASTE_RESIZE;Redimentionnement +PARTIALPASTE_RETINEX;Retinex PARTIALPASTE_RGBCURVES;Courbes RVB PARTIALPASTE_ROTATION;Rotation PARTIALPASTE_SHADOWSHIGHLIGHTS;Ombres/Hautes lumières @@ -862,6 +937,7 @@ PREFERENCES_CLIPPINGIND;Indication du dépassement de plage dynamique PREFERENCES_CLUTSCACHE;Cache HaldCLUT PREFERENCES_CLUTSCACHE_LABEL;Nombre maximum de chache CLUT PREFERENCES_CLUTSDIR;Dossier HaldCLUT +PREFERENCES_CMMBPC;Compensation du point noir PREFERENCES_CURVEBBOXPOS;Position des boutons copier/coller des courbes PREFERENCES_CURVEBBOXPOS_ABOVE;Au-dessus PREFERENCES_CURVEBBOXPOS_BELOW;En-dessous @@ -886,8 +962,6 @@ PREFERENCES_DATEFORMAT;Format PREFERENCES_DATEFORMATHINT;Vous pouvez utiliser les paramètres de chaînes formatées suivants:\n%y : année\n%m : mois\n%d : jour\n\nPar exemple, le format de date française est:\n%d/%m/%y PREFERENCES_DAUB_LABEL;Utiliser les ondelettes de Daubechies D6 au lieu de D4 PREFERENCES_DAUB_TOOLTIP;Les outils de Réduction de Bruit et de Niveaux d'Ondelettes utilisent une ondelette de Debauchie mère. Si vous choisissez D6 au lieu de D4 vous augmentez le nombre de coéf. orthogonaux de Daubechies et augmentez probablement la qualité des niveaux de taille moyenne. Il n'y a pas de différence de consommation mémoire ou de temps de traitement entre les deux. -PREFERENCES_DEFAULTLANG;Langue par défaut -PREFERENCES_DEFAULTTHEME;Thème par défaut PREFERENCES_DIRDARKFRAMES;Dossier des images de Trame Noire PREFERENCES_DIRHOME;Racine de mes documents personnels PREFERENCES_DIRLAST;Dernier dossier visité @@ -899,7 +973,7 @@ PREFERENCES_EDITORLAYOUT;Disposition de l'éditeur PREFERENCES_EXPAUT;Expert PREFERENCES_EXTERNALEDITOR;Éditeur externe PREFERENCES_FBROWSEROPTS;Options du navigateur de fichiers et de vignettes -PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Barre de menu de l'explorateur de fichiers uni-ligne (à désactiver pour les écrans de faible résolution) +PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Barre de menu de l'explorateur de fichiers uni-ligne\n(à désactiver pour les écrans de faible résolution) PREFERENCES_FILEFORMAT;Format du fichier PREFERENCES_FILMSIMULATION;Simulation de Film PREFERENCES_FLATFIELD;Champ Uniforme @@ -927,8 +1001,8 @@ PREFERENCES_GREYSC;Luminance Yb de la scène (%) PREFERENCES_GREYSC18;Yb=18 CIE L#50 PREFERENCES_GREYSCA;Automatique PREFERENCES_HISTOGRAMPOSITIONLEFT;Histogramme dans le panneau de gauche -PREFERENCES_HISTOGRAMWORKING;Utiliser le profile de travail pour l'histograme principal et le Navigateur -PREFERENCES_HISTOGRAM_TOOLTIP;Si activé, le profile couleur de travail est utilisé pour les données d'histograme et le panneau Navigateur, sinon le profil de travail de sortie "gamma-corrigé" est utilisé. +PREFERENCES_HISTOGRAMWORKING;Utiliser le profil de travail pour l'histograme principal et le Navigateur +PREFERENCES_HISTOGRAM_TOOLTIP;Si activé, le profil couleur de travail est utilisé pour les données d'histograme et le panneau Navigateur, sinon le profil de travail de sortie "gamma-corrigé" est utilisé. PREFERENCES_HLTHRESHOLD;Seuil pour le dépassement de domaine supérieur PREFERENCES_ICCDIR;Dossier des profils ICC PREFERENCES_IMG_RELOAD_NEEDED;Ces changements nécessitent un rechargement de l'image (ou l'ouverture d'une autre image) pour prendre effet. @@ -956,7 +1030,10 @@ PREFERENCES_MENUGROUPRANK;Classement PREFERENCES_MENUOPTIONS;Options du menu PREFERENCES_METADATA;Metadonnées PREFERENCES_MIN;Mini (100x115) -PREFERENCES_MONBPC;Compensation du Point Noir pour la transformation L*a*b*->Moniteur +PREFERENCES_MONINTENT;Intention de rendu par défaut +PREFERENCES_MONITOR;Moniteur +PREFERENCES_MONPROFILE;Profil couleur par défaut +PREFERENCES_MONPROFILE_WARNOSX;Due à des limitations de macOS, seul sRGB est supporté. PREFERENCES_MULTITAB;Éditeurs multiple PREFERENCES_MULTITABDUALMON;Éditeurs multiple, si possible sur un second moniteur PREFERENCES_NAVGUIDEBRUSH;Couleur du cadre dans le Navigateur @@ -975,23 +1052,31 @@ PREFERENCES_PARSEDEXT;Extensions considérées PREFERENCES_PARSEDEXTADD;Ajout de l'extension PREFERENCES_PARSEDEXTADDHINT;Tapez une extension et cliquez ce bouton pour l'ajouter à la liste PREFERENCES_PARSEDEXTDELHINT;Supprime de la liste les extensions sélectionnées +PREFERENCES_PARSEDEXTDOWNHINT;Déplacer l'extension sélectionnée plus bas dans la liste. +PREFERENCES_PARSEDEXTUPHINT;Déplacer l'extension sélectionnée plus haut dans la liste. PREFERENCES_PREVDEMO;Méthode de Dématriçage de l'Aperçu PREFERENCES_PREVDEMO_FAST;Rapide PREFERENCES_PREVDEMO_LABEL;Méthode de dématriçage utilisé pour l'aperçu à un zoom <100%: PREFERENCES_PREVDEMO_SIDECAR;Idem PP3 +PREFERENCES_PRINTER;Imprimante (Épreuvage Écran) PREFERENCES_PROFILEHANDLING;Gestionnaire des profils de traitement PREFERENCES_PROFILELOADPR;Priorité de chargement des profils PREFERENCES_PROFILEPRCACHE;Profil dans le Cache PREFERENCES_PROFILEPRFILE;Profil accolé au fichier d'entrée +PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file PREFERENCES_PROFILESAVECACHE;Enregistrer la paramètres de traitement dans le Cache PREFERENCES_PROFILESAVEINPUT;Enregistrer la paramètres de traitement accolé au fichier d'entrée +PREFERENCES_PROFILESAVELOCATION;Processing profile saving location +PREFERENCES_PROFILE_NONE;Aucun PREFERENCES_PROPERTY;Propriété +PREFERENCES_PRTINTENT;Intention de rendu +PREFERENCES_PRTPROFILE;Profil couleur PREFERENCES_PSPATH;Dossier d'installation d'Adobe Photoshop PREFERENCES_REMEMBERZOOMPAN;Se souvenir de niveau de zoom et de la position de l'image PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Retient le niveau de zoom et la position de l'image courante lors de l'ouverture d'une nouvelle image.\n\nCette option ne fonctionne que dans le mode "Éditeur unique" et quand "Méthode de dématriçage utilisé pour l'aperçu à un zoom <100%" is set to "Idem PP3". PREFERENCES_RGBDTL_LABEL;Nombre maximum d'unités de calcul pour la Réduction du bruit PREFERENCES_RGBDTL_TOOLTIP;La réduction du bruit nécessite un minimum d'à peu près 128Mo de RAM pour une image de 10MPix ou 512Mo pour une image de 40MPix, ainsi que 128Mo de RAM supplémentaire par unité de calcul. Plus il y aura d'unités de calcul travaillant en parallèle, plus ce sera rapide. Laissez la valeur à "0" pour utiliser automatiquement autant d'unités de calcul que possible. -PREFERENCES_SELECTFONT;Police générale +PREFERENCES_SELECTFONT;Police principale PREFERENCES_SELECTFONT_COLPICKER;Police des pipette à couleur PREFERENCES_SELECTLANG;Choix de la langue PREFERENCES_SELECTTHEME;Choisissez un thème @@ -1007,7 +1092,6 @@ PREFERENCES_SHTHRESHOLD;Seuil pour le dépassement de domaine inférieur PREFERENCES_SIMPLAUT;Mode de l'outil PREFERENCES_SINGLETAB;Éditeur unique PREFERENCES_SINGLETABVERTAB;Éditeur unique, onglets verticaux -PREFERENCES_SLIMUI;Interface compacte PREFERENCES_SMA;Petit (250x287) PREFERENCES_SND_BATCHQUEUEDONE;File de traitement terminée PREFERENCES_SND_HELP;Saisissez un chemin de fichier ou rien du tout (pour ne pas avoir de son). Pour Windows,\nsaisissez "SystemDefault", "SystemAsterisk" etc. pour utiliser les sons systèmes. @@ -1017,6 +1101,7 @@ PREFERENCES_STARTUPIMDIR;Répertoire Image au démarrage PREFERENCES_STDAUT;Standard PREFERENCES_TAB_BROWSER;Navigateur de fichiers PREFERENCES_TAB_COLORMGR;Gestion des couleurs +PREFERENCES_TAB_DYNAMICPROFILE;Règles de Profil Dynamique PREFERENCES_TAB_GENERAL;Général PREFERENCES_TAB_IMPROC;Traitement de l'image PREFERENCES_TAB_PERFORMANCE;Performance @@ -1027,8 +1112,8 @@ PREFERENCES_TISTD;Standard PREFERENCES_TP_LABEL;Panneau des outils: PREFERENCES_TP_USEICONORTEXT;Utiliser des icônes au lieu de textes PREFERENCES_TP_VSCROLLBAR;Cacher la barre de défilement verticale +PREFERENCES_TUNNELMETADATA;Copier les données Exif/IPTC/XMP tel quel dans le fichier de sortie PREFERENCES_USEBUNDLEDPROFILES;Utiliser les profils fournis -PREFERENCES_USESYSTEMTHEME;Utiliser le thème système PREFERENCES_VIEW;Point blanc du périphérique sortie (moniteur, TV, projecteur,...) PREFERENCES_WAVLEV;Augmenter le nombre de niveau d'ondelette en qualité "haute" PREFERENCES_WLONE;Un niveau @@ -1044,6 +1129,7 @@ PROFILEPANEL_MODE_TIP;Mode de complètement des profils de traitement.\n\nBouton PROFILEPANEL_MYPROFILES;Mes profils PROFILEPANEL_PASTEPPASTE;Paramètres à coller PROFILEPANEL_PCUSTOM;Personnel +PROFILEPANEL_PDYNAMIC;Dynamique PROFILEPANEL_PFILE;Depuis le fichier PROFILEPANEL_PINTERNAL;Neutre PROFILEPANEL_PLASTSAVED;Dernière sauvegarde @@ -1083,11 +1169,12 @@ SAVEDLG_SUBSAMP;Sous-échantillonnage SAVEDLG_SUBSAMP_1;Meilleure compression SAVEDLG_SUBSAMP_2;Équilibré SAVEDLG_SUBSAMP_3;Meilleure qualité +SAVEDLG_SUBSAMP_TOOLTIP;Meilleurs compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma divisé par deux horizontalement et verticalement.\n\nÉquilibré:\nJ:a:b 4:2:2\nh/v 2/1\nChroma divisé par deux horizontalement.\n\nMeilleurs qualité:\nJ:a:b 4:4:4\nh/v 1/1\nPas de sous-échantillonnage chroma. SAVEDLG_TIFFUNCOMPRESSED;TIFF non compressé SAVEDLG_WARNFILENAME;Le fichier sera nommé SHCSELECTOR_TOOLTIP;Cliquez le bouton droit de la souris\npour réinitialiser la position de ces 3 curseurs -SOFTPROOF_GAMUTCHECK_TOOLTIP;Si activé, indique en gris les pixels dont la couleurs est en dehors du gamut du profile de sortie -SOFTPROOF_TOOLTIP;Épreuvage écran\nSi activé, simule le rendu généré par le profiles de sortie de l'outil ICM. Particulièrement utile pour simuler le rendu en sortie d'imprimante. +SOFTPROOF_GAMUTCHECK_TOOLTIP;Si activé, indique en gris les pixels dont la couleurs est en dehors du gamut du profil de sortie +SOFTPROOF_TOOLTIP;Épreuvage écran\nSi activé, simule le rendu généré par le profile de sortie de l'outil ICM. Particulièrement utile pour simuler le rendu en sortie d'imprimante. THRESHOLDSELECTOR_B;Bas THRESHOLDSELECTOR_BL;Bas-gauche THRESHOLDSELECTOR_BR;Bas-droite @@ -1163,6 +1250,10 @@ TP_BWMIX_VAL;L TP_CACORRECTION_BLUE;Bleu TP_CACORRECTION_LABEL;Aberration chromatique TP_CACORRECTION_RED;Rouge +TP_CBDL_AFT;Après Noir-et-Blanc +TP_CBDL_BEF;Avant Noir-et-Blanc +TP_CBDL_METHOD;Traitement effectué +TP_CBDL_METHOD_TOOLTIP;Choisissez selon que l'outil Contraste par Niveaux de Détail doit intervenir après l'outil Noir-et-Blanc, ce qui le fera opéré dans l'espace L*a*b*, ou avant lui, ce qui le fera opérer dans l'espace RVB. TP_CHMIXER_BLUE;Bleu TP_CHMIXER_GREEN;Vert TP_CHMIXER_LABEL;Mixage des canaux @@ -1261,6 +1352,7 @@ TP_COLORTONING_LUMAMODE_TOOLTIP;Si activé, lorsque vous changez la couleur (rou TP_COLORTONING_METHOD;Méthode TP_COLORTONING_METHOD_TOOLTIP;Mixage Lab - RVB courbes - RVB curseurs utilise une interpolation\nBalance couleur(ombres / tons moyens / hautes lumières)\nSaturation 2 couleurs utilise couleurs directes\nDans tous les méthodes vous pouvez activer Noir et Blanc TP_COLORTONING_MIDTONES;Tons Moyens +TP_COLORTONING_NEUTRAL;Réinit. curseurs TP_COLORTONING_NEUTRAL_TIP;Réinitialise toutes les valeurs (Ombres, Tons moyens, Hautes lumières) à leur valeur par défaut. TP_COLORTONING_OPACITY;Opacité TP_COLORTONING_RGBCURVES;RVB - Courbes @@ -1302,6 +1394,12 @@ TP_DARKFRAME_LABEL;Trame Noire TP_DEFRINGE_LABEL;Aberration chromatique TP_DEFRINGE_RADIUS;Rayon TP_DEFRINGE_THRESHOLD;Seuil +TP_DIRPYRDENOISE_3X3;3×3 +TP_DIRPYRDENOISE_3X3_SOFT;3×3 doux +TP_DIRPYRDENOISE_5X5;5×5 +TP_DIRPYRDENOISE_5X5_SOFT;5×5 doux +TP_DIRPYRDENOISE_7X7;7×7 +TP_DIRPYRDENOISE_9X9;9×9 TP_DIRPYRDENOISE_ABM;Chroma uniquement TP_DIRPYRDENOISE_AUT;Global automatique TP_DIRPYRDENOISE_AUTO;Global automatique @@ -1341,10 +1439,13 @@ TP_DIRPYRDENOISE_METHOD11;Qualité TP_DIRPYRDENOISE_METHOD11_TOOLTIP;La qualité peut être adapté à la trame du bruit. Régler sur "haut" augmentera l'effet de la réduction de bruit au prix d'un temps de traitement plus long. TP_DIRPYRDENOISE_METHOD_TOOLTIP;Pour les images raw, les méthodes RVB ou Lab peuvent être utilisées.\n\nPour les images non-raw la méthode Lab sera utilisée, indépendamment de ce qu'indique ce bouton. TP_DIRPYRDENOISE_METM_TOOLTIP;Lorsque vous utilisez les méthodes "Luminance seulement" et "Lab", un filtrage médian sera effectué juste après l'étape des ondelettes dans le pipeline de la réduction de bruit.\nEm mode "RVB", il sera effectué à la toute fin du pipeline de la réduction de bruit. +TP_DIRPYRDENOISE_MET_TOOLTIP;Applique un filtre médian de la taille de "fenêtre" désirée. Plus cette taille est grande, plus cela prendra de temps.\n\n3×3 doux: traite 5 pixels dans une fenêtre de 3×3 pixels.\n3×3: traite 9 pixels dans une fenêtre de 3×3 pixels.\n5×5 doux: traite 13 pixels dans une fenêtre de 5×5 pixels.\n5×5: traite 25 pixels dans une fenêtre de 5×5 pixels.\n7×7: traite 49 pixels dans une fenêtre de 7×7 pixels.\n9×9: traite 81 pixels dans une fenêtre 9×9 pixels.\n\nIl est parfois possible d'atteindre une meilleurs qualité en appliquant plusieurs itérations d'une petite fenêtre qu'une seule itération d'une grande. TP_DIRPYRDENOISE_NOISELABEL;Bruit de l'aperçu: Moyen=%1 Haut=%2 TP_DIRPYRDENOISE_NOISELABELEMPTY;Bruit de l'aperçu: Moyen= - Haut= - TP_DIRPYRDENOISE_NRESID_TOOLTIP;Affiche les niveaux de bruit résiduel de la partie de l'image visible dans l'aperçu après les ondelettes.\n\n>300 Très bruité\n100-300 Bruité\n50-100 Peu bruité\n<50 Très peu bruité\n\nAttention, les valeurs diffèreront entre le mode RVB et L*a*b*. Les valeurs RVB sont moins précises car le mode RVB ne séparent pas complètement la luminance et la chrominance. TP_DIRPYRDENOISE_PASSE;Itérations +TP_DIRPYRDENOISE_PASSES;Itérations +TP_DIRPYRDENOISE_PASSES_TOOLTIP;Appliquer trois itérations avec une taille de fenêtre de 3×3 aboutit souvent à de meilleurs résultats qu'une seule itération avec une taille de fenêtre de 7×7. TP_DIRPYRDENOISE_PON;Multi-zones auto TP_DIRPYRDENOISE_PRE;Aperçu multi-zones TP_DIRPYRDENOISE_PREV;Aperçu @@ -1372,8 +1473,7 @@ TP_DIRPYREQUALIZER_SKIN_TOOLTIP;A -100, les tons chairs sont ciblés.\nA 0 tous TP_DIRPYREQUALIZER_THRESHOLD;Seuil TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts due to the transitions between the color (hue, chroma, luma) of the skin and the rest of the image. TP_DISTORTION_AMOUNT;Quantité -TP_DISTORTION_AUTO;Correction auto de la distorsion -TP_DISTORTION_AUTO_TIP;(Experimental) Corrige la distorsion de l'objectif automatiquement pour certains APN (M4/3, quelques compacts, etc.) +TP_DISTORTION_AUTO_TIP;Corrige automatiquement la distortion optique dans les fichiers raw en opérant une mise en correspondance avec le fichier JPEG incorporé, si elle existe, et sur laquelle la correction de la distortion a été appliqué par le boitier. TP_DISTORTION_LABEL;Distorsion TP_EPD_EDGESTOPPING;Arrêt des bords TP_EPD_GAMMA;Gamma @@ -1409,6 +1509,7 @@ TP_EXPOSURE_TCMODE_WEIGHTEDSTD;Standard Pondéré TP_EXPOS_BLACKPOINT_LABEL;Points Noir Raw TP_EXPOS_WHITEPOINT_LABEL;Points Blanc Raw TP_FILMSIMULATION_LABEL;Simulation de Film +TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee est configuré pour rechercher les images Hald CLUT, qui sont utilisées pour l'outil Simulation de Film, dans un dossier qui prends trop de temps à se charger.\nAllez dans Préférences > Traitement de l'image > Simulation de Film\npour voir quel dossier est utilisé. Vous devriez soit pointer RawTherapee vers un dossier qui ne contient que les images Hald CLUT et rien d'autre, ou un dossier vide si vous ne voulez pas utiliser l'outil Simulation de Film.\n\nLisez l'article Simulation de Film dans RawPedia pour plus d'information.\n\nVoulez-vous abandonner la recherche maintenant? TP_FILMSIMULATION_STRENGTH;Force TP_FILMSIMULATION_ZEROCLUTSFOUND;Veuillez préciser le dossier contenant\nles fichiers HaldCLUT dans les Préférences TP_FLATFIELD_AUTOSELECT;Sélection automatique @@ -1454,17 +1555,16 @@ TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Exposition de base TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Utilise l'offset d'exposition de base contenu dans le profil DCP. Ce réglage n'est possible que si le profil DCP sélectionné en contient un. TP_ICM_APPLYHUESATMAP;Table de base TP_ICM_APPLYHUESATMAP_TOOLTIP;Utilise la table de base (HueSatMap) contenu dans le profil DCP. Ce réglage n'est possible que si le profil DCP sélectionné en contient une. -TP_ICM_APPLYLOOKTABLE;Table de recherche -TP_ICM_APPLYLOOKTABLE_TOOLTIP;Utilise la table de recherche (LUT) contenu dans le profil DCP. Ce réglage n'est possible que si le profil DCP sélectionné en contient une. +TP_ICM_APPLYLOOKTABLE;Table de correspondance +TP_ICM_APPLYLOOKTABLE_TOOLTIP;Utilise la table de correspondance (LUT) contenu dans le profil DCP. Ce réglage n'est possible que si le profil DCP sélectionné en contient une. TP_ICM_BLENDCMSMATRIX;Mélange des hautes lumières\ndu profil ICC avec la matrice TP_ICM_BLENDCMSMATRIX_TOOLTIP;Activer la récupération des zones brûlées lorsque les profils ICC basés sur la LUT sont utilisés TP_ICM_BPC;Compensation du Point Noir -TP_ICM_BPC_TOOLTIP;Activez ceci pour faire correspondre le canal Luminosité à l'espace couleur de sortie avec un Point Blanc fixe TP_ICM_DCPILLUMINANT;Illuminant TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolé TP_ICM_DCPILLUMINANT_TOOLTIP;Sélectionne quel illuminant DCP inclus utiliser. La valeur par défaut est "Interpolé", qui est un mix entre les 2 profils inclus basé sur la Balance des Blancs choisie. Ce paramètre n'est actif que si un fichier DCP Bi-Illuminant avec support de l'interpolation est choisi. TP_ICM_INPUTCAMERA;Celui de l'appareil photo -TP_ICM_INPUTCAMERAICC;Sél. auto du profile de l'APN +TP_ICM_INPUTCAMERAICC;Sél. auto du profil de l'APN TP_ICM_INPUTCAMERAICC_TOOLTIP;Utilise les profils d'entrée DCP ou ICC spécifiques à RawTherapee, qui sont plus précis qu'une simple matrice.\nDisponible pour certains appareils photo, ces profils sont stoqués dans le dossier /iccprofiles/input.\nCelui dont le nom de fichier correspond au champ EXIF "Modèle" (de l'appareil) est automatiquement sélectionné. TP_ICM_INPUTCAMERA_TOOLTIP;Par ordre de préférence, utilise les matrices de couleur incluses dans le fichier RAW, les matrices de couleur simple fournies par RawTherapee ou celles de DCRaw TP_ICM_INPUTCUSTOM;Personnel @@ -1478,7 +1578,8 @@ TP_ICM_INPUTPROFILE;Profil d'entrée TP_ICM_LABEL;ICM TP_ICM_NOICM;Pas d'ICM: sortie sRGB TP_ICM_OUTPUTPROFILE;Profil de sortie -TP_ICM_SAVEREFERENCE;Utiliser l'image comme profil de référence +TP_ICM_PROFILEINTENT;Intention de Rendu +TP_ICM_SAVEREFERENCE;Sauver Image de Référence. TP_ICM_SAVEREFERENCE_APPLYWB;Appliquer la balance des blancs TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Généralement, applique la balance des blancs lors de l'enregistrement d'images pour créer des profils ICC, et n'applique pas la balance des blancs pour créer des profils DCP. TP_ICM_SAVEREFERENCE_TOOLTIP;Sauvegarde une image TIFF linéaire avant que le profil d'entrée ne soit appliqué. Le résultat peut être utilisé à des fins de calibrage, pour générer un profil APN. @@ -1531,6 +1632,7 @@ TP_LENSPROFILE_LABEL;Profil de correction d'objectif TP_LENSPROFILE_USECA;Corr. de l'aber. chromatique TP_LENSPROFILE_USEDIST;Corr. de la distortion TP_LENSPROFILE_USEVIGN;Corr. du vignettage +TP_NEUTRAL;Réinit. TP_NEUTRAL_TIP;Réinitialise les valeurs de l'exposition à des valeurs neutres TP_PCVIGNETTE_FEATHER;Étendue TP_PCVIGNETTE_FEATHER_TOOLTIP;Étendue: 0=bords uniquement, 50=mi-chemin du centre, 100=jusqu'au centre @@ -1557,6 +1659,7 @@ TP_PRSHARPENING_TOOLTIP;Augmente la netteté de l'image après le redimentionnem TP_RAWCACORR_AUTO;Correction automatique TP_RAWCACORR_CABLUE;Bleu TP_RAWCACORR_CARED;Rouge +TP_RAWCACORR_CASTR;Force TP_RAWEXPOS_BLACKS;Niveaux de noir TP_RAWEXPOS_BLACK_0;Vert 1 (maître) TP_RAWEXPOS_BLACK_1;Rouge @@ -1569,21 +1672,82 @@ TP_RAWEXPOS_LINEAR;Corr. du Point Blanc TP_RAWEXPOS_PRESER;Préservation des HL TP_RAWEXPOS_RGB;Rouge, Vert, Bleu TP_RAWEXPOS_TWOGREEN;Lier les verts +TP_RAW_1PASSMEDIUM;1-Passe (Medium) +TP_RAW_3PASSBEST;3-Passes (Meilleur) +TP_RAW_AHD;AHD +TP_RAW_AMAZE;AMaZE +TP_RAW_DCB;DCB TP_RAW_DCBENHANCE;Amélioration de DCB TP_RAW_DCBITERATIONS;Nombre d'itération de DCB TP_RAW_DMETHOD;Méthode TP_RAW_DMETHOD_PROGRESSBAR;Dématriçage %1... TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Affinage du dématriçage... TP_RAW_DMETHOD_TOOLTIP;Note: IGV et LMMSE sont dédiés aux images à haut ISO +TP_RAW_EAHD;EAHD TP_RAW_FALSECOLOR;Itérations pour la suppression\ndes fausses couleurs +TP_RAW_FAST;Fast TP_RAW_HD;Seuil TP_RAW_HD_TOOLTIP;Des valeurs basses rendront la détection de pixel chaud/mort plus agressive, mais les faux positifs peuvent conduire à des artéfacts. Si vous observez de quelconques artéfacts en activant le 'Filtre de pixel chaud/mort', augmentez graduellement ce seuil jusqu'à leur disparition. +TP_RAW_HPHD;HPHD +TP_RAW_IGV;IGV +TP_RAW_IMAGENUM;Sous-image +TP_RAW_IMAGENUM_TOOLTIP;Certains fichiers RAW consistent en plusieurs sous-images (Pentax Pixel Shift, Pentax HDR 3-en-1, Canon Dual Pixel).\n\nLors de l'usage d'une méthode de dématriçage autre que Pixel Shift, ceci sélectionne quel sous-image est utilisée.\n\nLors de l'usage de la méthode de dématriçage Pixel Shift sur un fichier RAW Pixel, toutes les sous-images sont utilisées, et ceci sélectionne quelle sous-image devrait être utilisé pour la détection de mouvement. TP_RAW_LABEL;Dématriçage +TP_RAW_LMMSE;LMMSE TP_RAW_LMMSEITERATIONS;Niveau d'amélioration LMMSE TP_RAW_LMMSE_TOOLTIP;Ajoute gamma (niveau 1) + médian (niveau 2-4) + affinage (niveau 5-6) pour réduire les artéfacts et améliorer le rapport signal/bruit +TP_RAW_MONO;Mono +TP_RAW_NONE;Aucun (montre ce que voit le capteur) +TP_RAW_PIXELSHIFT;Pixel Shift +TP_RAW_PIXELSHIFTADAPTIVE;Détection adaptative +TP_RAW_PIXELSHIFTBLUR;Flouter le masque de mouvement +TP_RAW_PIXELSHIFTEPERISO;Adaptation ISO +TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;La valeur par défaut de 0 devrait bien fonctionner pour l'ISO de base.\nAugmenter la valeur pour améliorer la détection de mouvement pour les ISO plus haut.\nAugmentez par petit incrément et vérifier le masque de mouvement à chaque itération. +TP_RAW_PIXELSHIFTEQUALBRIGHT;Égaliser la luminosité des sous-images +TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Égaliser par canal +TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Activé: Égalise les canaux RVB individuellement.\nDésactivé: Utilise le même facteur d'égalisation pour tous les canaux. +TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Égalise la luminosité des sous-images à la luminosité de la sous-image sélectionnée.\nS'il y a des zones surexposées dans les sous-images, sélectionne la sous-image la plus lumineuse pour éviter des dérives coiuleurs magenta dans les zone surexposées ou permettre la détection de mouvement. +TP_RAW_PIXELSHIFTEXP0;Expérimental +TP_RAW_PIXELSHIFTGREEN;Vérifier le canal vert pour le mouvement +TP_RAW_PIXELSHIFTHOLEFILL;Rempli les trous dans le masque de mouvement +TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Rempli les trous dans le masque de mouvement +TP_RAW_PIXELSHIFTLMMSE;Utilise LMMSE pour les zone de mouvement +TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Utilise LMMSE au lieu d'AMaZE pour les zone de mouvement.\nutil pour les images de haut ISO. +TP_RAW_PIXELSHIFTMASKTHRESHOLD;Nouveau seuil 3x3 +TP_RAW_PIXELSHIFTMEDIAN;Utilise la médiane pour les zones de mouvement +TP_RAW_PIXELSHIFTMEDIAN3;Exclure la sous-image sélectionnée de la médiane +TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Exclu la sous-image sélectionné de la médiane.\nUtil si mes objets en mouvement se chevauchent dans les sous-images 2 et 3 +TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Utilise la médianes de toutes les sous-images au lieu de la sous-images sélectionnée pour les zones de mouvement.\nRetir les objets qui sont à des endroits différents dans toutes les sous-images.\nDonne un effet de mouvement aux objets se déplaçant lentement (se chevauchant). +TP_RAW_PIXELSHIFTMM_AUTO;Automatique +TP_RAW_PIXELSHIFTMM_CUSTOM;Manuel +TP_RAW_PIXELSHIFTMM_OFF;Arrêt +TP_RAW_PIXELSHIFTMOTION;Niveau de détection de mouvement (dépréconisé) +TP_RAW_PIXELSHIFTMOTIONCORRECTION;Taille de la correction de mouvement vert +TP_RAW_PIXELSHIFTMOTIONMETHOD;Correction de Mouvement +TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 signifie pas de détection de mouvement.\n1 - 99 signifie que le mouvement sera détecté par-rapport à cette valeur. Augmentez cette valeur pour augmenter le taux de détection.\n100 signifie que la sous-image sélectionnée et dématricée en AMaZE sera utilisée tel quel. +TP_RAW_PIXELSHIFTNONGREENAMAZE;Vérifier rouge/bleu AMaZE +TP_RAW_PIXELSHIFTNONGREENCROSS;Vérifier les canaux rouge/bleu pour le mouvement +TP_RAW_PIXELSHIFTNONGREENCROSS2;Vérifier vert AMaZE +TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Vérifier rouge/bleu horizontal +TP_RAW_PIXELSHIFTNONGREENVERTICAL;Vérifier rouge/bleu vertical +TP_RAW_PIXELSHIFTNREADISO;Lire +TP_RAW_PIXELSHIFTPRNU;PRNU (%) +TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Poid Rouge&Bleu +TP_RAW_PIXELSHIFTSHOWMOTION;Voir le masque de mouvement +TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Voir uniquement le masque +TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Affiche le masque sans l'image. +TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Superpose sur l'image le masque montrant les zones avec mouvement. +TP_RAW_PIXELSHIFTSIGMA;Rayon de floutage +TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;Le rayon par défaut de 1.0 fonctionne généralement bien pour l'ISO de base.\nAugmentez cette valeur pour les images de haut ISO, 5.0 est un bon point de départ.\nContrôlez le masque de mouvement à chaque nouvelle valeur. +TP_RAW_PIXELSHIFTSMOOTH;Adoucir les transitions +TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Adouci les transitions entre les zones avec mouvement et les zones sans.\nRéglez à 0 pour désactiver l'adoucissement des transitions.\nRéglez à 1 pour obtenir soit le résultat du dématriçage AMaZE/LMMSE de la sous-image sélectionnée (selon que "Utilise LMMSE" est sélectionné), ou la médiane des 4 sous-images si "Utilise la médiane ..." est sélectionné. +TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;Facteur DevStd Bleu +TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;Facteur DevStd Vert +TP_RAW_PIXELSHIFTSTDDEVFACTORRED;Facteur DevStd Rouge TP_RAW_SENSOR_BAYER_LABEL;Capteur à matrice de Bayer TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-passes donne les meilleurs résultats (recommendé pour les images de faible ISO).\n1-passe est presque indifférentiable de 3-passes pour les images à haut ISO et est plus rapide. TP_RAW_SENSOR_XTRANS_LABEL;Capteur à matrice X-Trans +TP_RAW_VNG4;VNG4 TP_RESIZE_APPLIESTO;S'applique à: TP_RESIZE_CROPPEDAREA;La zone recadrée TP_RESIZE_FITBOX;Boîte englobante @@ -1598,6 +1762,86 @@ TP_RESIZE_SCALE;Échelle TP_RESIZE_SPECIFY;Préciser: TP_RESIZE_W;L: TP_RESIZE_WIDTH;Largeur +TP_RETINEX_CONTEDIT_HSL;Égaliseur d'histogramme TSV +TP_RETINEX_CONTEDIT_LAB;Égaliseur d'histogramme L*a*b* +TP_RETINEX_CONTEDIT_LH;Égaliseur de teinte +TP_RETINEX_CONTEDIT_MAP;Égaliseur de masque +TP_RETINEX_CURVEEDITOR_CD;L=f(L) +TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;Luminance en fonction de la luminance L=f(L)\nCorrige les données raw pour réduire halos et artéfacts. +TP_RETINEX_CURVEEDITOR_LH;Force=f(T) +TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Force en fonction de la Teinte Force=f(T)\nCette courbe agit également sur le chroma lors de l'utilisation de la méthode Retinex "Hautes Lumières". +TP_RETINEX_CURVEEDITOR_MAP;L=f(L) +TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;Cette courbe peut être appliquée seule ou avec un masque Gaussion ou un masque d'ondelettes.\nAttention aux artéfacts! +TP_RETINEX_EQUAL;Égaliseur +TP_RETINEX_FREEGAMMA;Gamma manuel +TP_RETINEX_GAIN;Gain +TP_RETINEX_GAINOFFS;Gain et Décalage (brillance) +TP_RETINEX_GAINTRANSMISSION;Gain sur Transmission +TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplifie ou réduit le canal transmission pour atteindre la luminance souhaitée.\nAbscisses: transmission ; min = 0, max = valeurs.\nOrdonnées: gain. +TP_RETINEX_GAIN_TOOLTIP;Agit sur l'image recomposée.\n\nCeci est très différent des autres paramètres. Utilisé pour les pixels noirs et blancs, et pour aider à balancer l'histogramme. +TP_RETINEX_GAMMA;Gamma +TP_RETINEX_GAMMA_FREE;Manuel +TP_RETINEX_GAMMA_HIGH;Haute +TP_RETINEX_GAMMA_LOW;Bas +TP_RETINEX_GAMMA_MID;Milieu +TP_RETINEX_GAMMA_NONE;Aucun +TP_RETINEX_GAMMA_TOOLTIP;Restaure les tonalités en appliquant une transformation gamma avant et après Retinex. Différent des courbes Retinex ou autres courbes (Lab, Exposition, etc.). +TP_RETINEX_GRAD;Gradient de transmission +TP_RETINEX_GRADS;Gradient de force +TP_RETINEX_GRADS_TOOLTIP;Si curseur à 0, toutes les itérations sont identiques.\nSi > 0, la Force est réduite à chaque nouvelle itération, et inversement. +TP_RETINEX_GRAD_TOOLTIP;Si curseur à 0, toutes les itérations sont identiques.\nSi > 0, la Variance et le Seuil sont réduit à chaque nouvelle itération, et inversement. +TP_RETINEX_HIGH;Haut +TP_RETINEX_HIGHLIG;Hautes-lumières +TP_RETINEX_HIGHLIGHT;Seuil des Hautes-lumières +TP_RETINEX_HIGHLIGHT_TOOLTIP;Augment l'action de l'algoritme "Haut".\nPeut nécessiter que vous réajustiez "Pixels environnants" et d'augmenter la "Correction du point blanc" dans l'outil Raw -> Point Blanc Raw. +TP_RETINEX_HSLSPACE_LIN;TSV-Linéaire +TP_RETINEX_HSLSPACE_LOG;TSV-Logarithmique +TP_RETINEX_ITER;Itérations +TP_RETINEX_ITERF;Compression tonale +TP_RETINEX_ITER_TOOLTIP;Simule une compression tonale.\nLes valeurs hautes augmentent le temps de traitement. +TP_RETINEX_LABEL;Retinex +TP_RETINEX_LABEL_MASK;Masque +TP_RETINEX_LABSPACE;L*a*b* +TP_RETINEX_LOW;Bas +TP_RETINEX_MAP;Méthode de masquage +TP_RETINEX_MAP_GAUS;Masque gaussien +TP_RETINEX_MAP_MAPP;Masque pointu (ondelettes partielles) +TP_RETINEX_MAP_MAPT;Masque pointu (ondelettes totales) +TP_RETINEX_MAP_METHOD_TOOLTIP;Utilise le masque généré par la fonction Gaussienne ci-dessus (Rayon, Méthode) pour réduire les halos et artéfacts.\n\nCourbe seulement: applique une courbe de contraste diagonale sur le masque.\nAttention aux artéfacts!\n\nMasque gaussien: génère et utilise le masque original modifié par flou gaussien.\nRapide.\n\nMasque pointu: génère et utilise une ondelette sur le masque original.\nLent. +TP_RETINEX_MAP_NONE;Aucune +TP_RETINEX_MEDIAN;Filtre médian +TP_RETINEX_METHOD;Méthode +TP_RETINEX_METHOD_TOOLTIP;Bas = Renforce les basses lumières.\nUniforme = Action uniforme.\nHaut = Renforce les hautes-lumières.\nHautes-lumières = Retire le magenta des hautes lumières. +TP_RETINEX_MLABEL;Recomposition sans 'brume' Min=%1 Max=%2 +TP_RETINEX_MLABEL_TOOLTIP;Devrait être proche de min=0 max=32768\nImage recomposée sans mélange. +TP_RETINEX_NEIGHBOR;Rayon +TP_RETINEX_NEUTRAL;Réinit. +TP_RETINEX_NEUTRAL_TIP;Réinitialise tous les curseurs et courbes à leur valeur par défaut. +TP_RETINEX_OFFSET;Décalage (brillance) +TP_RETINEX_SCALES;Gradient gaussien +TP_RETINEX_SCALES_TOOLTIP;Si le curseur est à 0, toutes les itérations sont identiques.\nSi > 0, l'Échelle et le Rayon sont réduit à chaque nouvelle itération, et inversement. +TP_RETINEX_SETTINGS;Réglages +TP_RETINEX_SKAL;Échelle +TP_RETINEX_SLOPE;Pente du gamma manuel +TP_RETINEX_STRENGTH;Force +TP_RETINEX_THRESHOLD;Seuil +TP_RETINEX_THRESHOLD_TOOLTIP;Limite entrée/sortie.\nEntrée = image source,\nSortie = image gaussienne. +TP_RETINEX_TLABEL;CT Min=%1 Max=%2 Moyen=%3 Sigma=%4 +TP_RETINEX_TLABEL2;CT Tm=%1 TM=%2 +TP_RETINEX_TLABEL_TOOLTIP;Résultat du calcul de transmission.\nMin et Max sont utilisés par Variance.\nMoyen et Sigma.\nTm=Min TM=Niveau maximum de transmission. +TP_RETINEX_TRANF;Transmission +TP_RETINEX_TRANSMISSION;Modulation du canal 'transmission' +TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission en fonction de la transmission.\nAbscisses: transmission des valeurs négatives (min), moyennes, et positives (max).\nOrdonnées: amplification ou réduction. +TP_RETINEX_UNIFORM;Uniforme +TP_RETINEX_VARIANCE;Contraste +TP_RETINEX_VARIANCE_TOOLTIP;Une faible variance augmente le contraste local et la saturation, mais peut conduire à des artéfacts. +TP_RETINEX_VIEW;Traitement +TP_RETINEX_VIEW_MASK;Masque +TP_RETINEX_VIEW_METHOD_TOOLTIP;Standard: Affichage normal.\nMasque: Affiche le masque.\nMasque flou: Affiche l'image avec un masque flou à grand rayon.\nTransmission - Auto/Fixé: Affiche les données de Transmission, avant toute action sur le contraste et la brillance.\n\nAttention: le masque ne correspond pas au rendu final, mais est amplifié pour le rendre plus visible. +TP_RETINEX_VIEW_NONE;Standard +TP_RETINEX_VIEW_TRAN;Transmission - Auto +TP_RETINEX_VIEW_TRAN2;Transmission - Fixé +TP_RETINEX_VIEW_UNSHARP;Masque flou TP_RGBCURVES_BLUE;B TP_RGBCURVES_CHANNEL;Canal TP_RGBCURVES_GREEN;V @@ -1635,7 +1879,6 @@ TP_SHARPENING_RLD_AMOUNT;Quantité TP_SHARPENING_RLD_DAMPING;Amortissement TP_SHARPENING_RLD_ITERATIONS;Itérations TP_SHARPENING_THRESHOLD;Seuil -TP_SHARPENING_TOOLTIP;Un effet légèrement différent peut être obtenu avec CIECAM02. Si différence observée, ajuster les réglages TP_SHARPENING_USM;Masque flou (USM) TP_SHARPENMICRO_AMOUNT;Quantité TP_SHARPENMICRO_LABEL;Microcontraste @@ -1872,6 +2115,8 @@ TP_WBALANCE_SOLUX41;Solux 4100K TP_WBALANCE_SOLUX47;Solux 4700K (fabricant) TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) TP_WBALANCE_SPOTWB;Point de mesure +TP_WBALANCE_TEMPBIAS;Ajustement de la température BdB +TP_WBALANCE_TEMPBIAS_TOOLTIP;Permet d'ajuster le calcul de la "Balance des blancs auto" en recherchant une température plus chaude ou plus froide. L'ajustement est éxprimé comme un poucentage de la température calculée, de manière à ce que le résultat soit "tempCalculé + tempCalculé * ajustement". TP_WBALANCE_TEMPERATURE;Température TP_WBALANCE_TUNGSTEN;Tungstène TP_WBALANCE_WATER1;Sous-marin 1 @@ -1889,152 +2134,25 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! -!FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. -!GENERAL_APPLY;Apply -!GENERAL_OPEN;Open -!HISTORY_MSG_166;Exposure - Reset -!HISTORY_MSG_407;Retinex - Method -!HISTORY_MSG_408;Retinex - Radius -!HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Offset -!HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Contrast -!HISTORY_MSG_414;Retinex - Histogram - Lab -!HISTORY_MSG_415;Retinex - Transmission -!HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median -!HISTORY_MSG_418;Retinex - Threshold -!HISTORY_MSG_419;Retinex - Color space -!HISTORY_MSG_420;Retinex - Histogram - HSL -!HISTORY_MSG_421;Retinex - Gamma -!HISTORY_MSG_422;Retinex - Gamma -!HISTORY_MSG_423;Retinex - Gamma slope -!HISTORY_MSG_424;Retinex - HL threshold -!HISTORY_MSG_425;Retinex - Log base -!HISTORY_MSG_426;Retinex - Hue equalizer -!HISTORY_MSG_427;Output rendering intent -!HISTORY_MSG_428;Monitor rendering intent -!HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient -!HISTORY_MSG_432;Retinex - M - Highlights -!HISTORY_MSG_433;Retinex - M - Highlights TW -!HISTORY_MSG_434;Retinex - M - Shadows -!HISTORY_MSG_435;Retinex - M - Shadows TW -!HISTORY_MSG_436;Retinex - M - Radius -!HISTORY_MSG_437;Retinex - M - Method -!HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Process -!HISTORY_MSG_440;CbDL - Method -!HISTORY_MSG_441;Retinex - Gain transmission -!HISTORY_MSG_442;Retinex - Scale -!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor -!MONITOR_PROFILE_SYSTEM;System default -!PARTIALPASTE_PRSHARPENING;Post-resize sharpening -!PARTIALPASTE_RETINEX;Retinex -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile -!PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. -!PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. -!PREFERENCES_PROFILE_NONE;None -!PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file -!SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. -!TP_CBDL_AFT;After Black-and-White -!TP_CBDL_BEF;Before Black-and-White -!TP_CBDL_METHOD;Process located -!TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORTONING_NEUTRAL;Reset sliders -!TP_DIRPYRDENOISE_3X3;3×3 -!TP_DIRPYRDENOISE_3X3_SOFT;3×3 soft -!TP_DIRPYRDENOISE_5X5;5×5 -!TP_DIRPYRDENOISE_5X5_SOFT;5×5 soft -!TP_DIRPYRDENOISE_7X7;7×7 -!TP_DIRPYRDENOISE_9X9;9×9 -!TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. -!TP_DIRPYRDENOISE_PASSES;Median iterations -!TP_DIRPYRDENOISE_PASSES_TOOLTIP;Applying three median filter iterations with a 3×3 window size often leads to better results than using one median filter iteration with a 7×7 window size. -!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? -!TP_ICM_PROFILEINTENT;Rendering Intent -!TP_NEUTRAL;Reset -!TP_RAWCACORR_CASTR;Strength -!TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL -!TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* -!TP_RETINEX_CONTEDIT_LH;Hue equalizer -!TP_RETINEX_CONTEDIT_MAP;Mask equalizer -!TP_RETINEX_CURVEEDITOR_CD;L=f(L) -!TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;Luminance according to luminance L=f(L)\nCorrect raw data to reduce halos and artifacts. -!TP_RETINEX_CURVEEDITOR_LH;Strength=f(H) -!TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. -!TP_RETINEX_CURVEEDITOR_MAP;L=f(L) -!TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! -!TP_RETINEX_EQUAL;Equalizer -!TP_RETINEX_FREEGAMMA;Free gamma -!TP_RETINEX_GAIN;Gain -!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) -!TP_RETINEX_GAINTRANSMISSION;Gain transmission -!TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. -!TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. -!TP_RETINEX_GAMMA;Gamma -!TP_RETINEX_GAMMA_FREE;Free -!TP_RETINEX_GAMMA_HIGH;High -!TP_RETINEX_GAMMA_LOW;Low -!TP_RETINEX_GAMMA_MID;Middle -!TP_RETINEX_GAMMA_NONE;None -!TP_RETINEX_GAMMA_TOOLTIP;Restore tones by applying gamma before and after Retinex. Different from Retinex curves or others curves (Lab, Exposure, etc.). -!TP_RETINEX_GRAD;Transmission gradient -!TP_RETINEX_GRADS;Strength gradient -!TP_RETINEX_GRADS_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Strength is reduced when iterations increase, and conversely. -!TP_RETINEX_GRAD_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Variance and Threshold are reduced when iterations increase, and conversely. -!TP_RETINEX_HIGH;High -!TP_RETINEX_HIGHLIG;Highlight -!TP_RETINEX_HIGHLIGHT;Highlight threshold -!TP_RETINEX_HIGHLIGHT_TOOLTIP;Increase action of High algorithm.\nMay require you to re-adjust "Neighboring pixels" and to increase the "White-point correction" in the Raw tab -> Raw White Points tool. -!TP_RETINEX_HSLSPACE_LIN;HSL-Linear -!TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic -!TP_RETINEX_ITER;Iterations (Tone-mapping) -!TP_RETINEX_ITERF;Tone mapping -!TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. -!TP_RETINEX_LABEL;Retinex -!TP_RETINEX_LABEL_MASK;Mask -!TP_RETINEX_LABSPACE;L*a*b* -!TP_RETINEX_LOW;Low -!TP_RETINEX_MAP;Mask method -!TP_RETINEX_MAP_GAUS;Gaussian mask -!TP_RETINEX_MAP_MAPP;Sharp mask (wavelet partial) -!TP_RETINEX_MAP_MAPT;Sharp mask (wavelet total) -!TP_RETINEX_MAP_METHOD_TOOLTIP;Use the mask generated by the Gaussian function above (Radius, Method) to reduce halos and artifacts.\n\nCurve only: apply a diagonal contrast curve on the mask.\nBeware of artifacts!\n\nGaussian mask: generate and use a Gaussian blur of the original mask.\nQuick.\n\nSharp mask: generate and use a wavelet on the original mask.\nSlow. -!TP_RETINEX_MAP_NONE;None -!TP_RETINEX_MEDIAN;Transmission median filter -!TP_RETINEX_METHOD;Method -!TP_RETINEX_METHOD_TOOLTIP;Low = Reinforce low light.\nUniform = Equalize action.\nHigh = Reinforce high light.\nHighlights = Remove magenta in highlights. -!TP_RETINEX_MLABEL;Restored haze-free Min=%1 Max=%2 -!TP_RETINEX_MLABEL_TOOLTIP;Should be near min=0 max=32768\nRestored image with no mixture. -!TP_RETINEX_NEIGHBOR;Radius -!TP_RETINEX_NEUTRAL;Reset -!TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Offset (brightness) -!TP_RETINEX_SCALES;Gaussian gradient -!TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. -!TP_RETINEX_SETTINGS;Settings -!TP_RETINEX_SKAL;Scale -!TP_RETINEX_SLOPE;Free gamma slope -!TP_RETINEX_STRENGTH;Strength -!TP_RETINEX_THRESHOLD;Threshold -!TP_RETINEX_THRESHOLD_TOOLTIP;Limits in/out.\nIn = image source,\nOut = image gauss. -!TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 -!TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 -!TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. -!TP_RETINEX_TRANF;Transmission -!TP_RETINEX_TRANSMISSION;Transmission map -!TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. -!TP_RETINEX_UNIFORM;Uniform -!TP_RETINEX_VARIANCE;Contrast -!TP_RETINEX_VARIANCE_TOOLTIP;Low variance increase local contrast and saturation, but can lead to artifacts. -!TP_RETINEX_VIEW;Process -!TP_RETINEX_VIEW_MASK;Mask -!TP_RETINEX_VIEW_METHOD_TOOLTIP;Standard - Normal display.\nMask - Displays the mask.\nUnsharp mask - Displays the image with a high radius unsharp mask.\nTransmission - Auto/Fixed - Displays the file transmission-map, before any action on contrast and brightness.\n\nAttention: the mask does not correspond to reality, but is amplified to make it more visible. -!TP_RETINEX_VIEW_NONE;Standard -!TP_RETINEX_VIEW_TRAN;Transmission - Auto -!TP_RETINEX_VIEW_TRAN2;Transmission - Fixed -!TP_RETINEX_VIEW_UNSHARP;Unsharp mask +!DONT_SHOW_AGAIN;Don't show this message again. +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language +!PREFERENCES_THEME;Theme +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance diff --git a/rtdata/languages/Greek b/rtdata/languages/Greek index 4cb598b53..f3dbcca91 100644 --- a/rtdata/languages/Greek +++ b/rtdata/languages/Greek @@ -83,7 +83,6 @@ HISTOGRAM_TOOLTIP_L;Προβολή/απόκρυψη CIELAB ιστογράμμα HISTOGRAM_TOOLTIP_R;Προβολή/απόκρυψη KOKKINOY ιστογράμματος HISTORY_CHANGED;Αλλαγή HISTORY_CUSTOMCURVE;Προσαρμοσμένη καμπύλη -HISTORY_DELSNAPSHOT;Αφαίρεση στιγμιοτύπου HISTORY_FROMCLIPBOARD;From clipboard HISTORY_LABEL;Ιστορικό HISTORY_MSG_1;Φορτώθηκε εικόνα @@ -170,47 +169,23 @@ HISTORY_MSG_81;Resize enabled HISTORY_NEWSNAPSHOT;Νέο στιγμιότυπο HISTORY_SNAPSHOT;Στιγμιότυπο HISTORY_SNAPSHOTS;Στιγμιότυπα -IPTCPANEL_AUTHOR;Συγγραφέας -IPTCPANEL_AUTHORSPOSITION;Θέση δημιουργού -IPTCPANEL_AUTHORSPOSITIONHINT;Τίτλος που αποδίδεται από τον/τους δημιουργό/γους (Ανα γραμμή τίτλος). -IPTCPANEL_CAPTION;Λεζάντα -IPTCPANEL_CAPTIONHINT;Μια λεκτική περιγραφή των στοιχείων (Λεζάντα - Περίληψη). -IPTCPANEL_CAPTIONWRITER;Συγγραφέας λεζάντας -IPTCPANEL_CAPTIONWRITERHINT;Το όνομα του προσώπου που ασχολήθηκε με την συγγραφή, επεξεργασία ή διόρθωση της εικόνας ή λεζάντας/περίληψης (Συγγραφέας - Επιμελητής). IPTCPANEL_CATEGORY;Κατηγορία -IPTCPANEL_CATEGORYHINT;Ταυτοποιεί το θέμα της εικόνας βάση της άποψης του παροχέα (Κατηγορία). IPTCPANEL_CITY;Πόλη -IPTCPANEL_CITYHINT;Πόλη προέλευσης εικόνας (Πόλη). IPTCPANEL_COPYHINT;Αντιγραφή ρυθμίσεων IPTC στην περιοχή αποκομμάτων -IPTCPANEL_COPYRIGHT;Πνευματική ιδιοκτησία -IPTCPANEL_COPYRIGHTHINT;Όποιο απαραίτητο σχόλιο περι πνευματικής ιδιοκτησίας (Σχόλια περι πνευματική ιδιοκτησία). IPTCPANEL_COUNTRY;Χώρα -IPTCPANEL_COUNTRYHINT;Χώρα/αρχική τοποθεσία δημιουργίας εικόνας (Χώρα/αρχική τοποθεσία). IPTCPANEL_CREDIT;Εύσημα IPTCPANEL_CREDITHINT;Ταυτοποιεί τον παροχέα της εικόνας, όχι απραίτητα δημιουργό/ιδιοκτήτη (Εύσημα). IPTCPANEL_DATECREATED;Ημερομηνία δημιουργίας -IPTCPANEL_DATECREATEDHINT;Η ημερομηνία δημιουργίας του πνευματικού περιεχομένου; Τύπος: JJJJMMTT (Ημερομηνία δημιουργίας). IPTCPANEL_EMBEDDED;Ενσωματωμένο IPTCPANEL_EMBEDDEDHINT;Επαναφορά στοιχείων IPTC αρχείου εικόνας IPTCPANEL_HEADLINE;Επικεφαλίδα -IPTCPANEL_HEADLINEHINT;Ένας δημοσιεύσιμος τίτλος που παρέχει μια σύνοψη των περιεχομένων της εικόνας (Επικεφαλίδα). IPTCPANEL_INSTRUCTIONS;Οδηγίες -IPTCPANEL_INSTRUCTIONSHINT;Άλλες οδηγίες επιμέλειας που αφορούν την χρήση της εικόνας (Ειδικίες οδηγίες). IPTCPANEL_KEYWORDS;Λέξεις-κλειδιά -IPTCPANEL_KEYWORDSHINT;Χρησιμοποιούνται ενδεικτικά ως λέξεις ανάκτησης(Λέξεις-κλειδιά). IPTCPANEL_PASTEHINT;Επικόλληση ρυθμίσεων IPTC από την περιοχή αποκομμάτων -IPTCPANEL_PROVINCE;Επαρχία -IPTCPANEL_PROVINCEHINT;Επαρχία/Πολιτεία/Νομός προέλευσης της εικόνας (Επαρχία/Πολιτεία/Νομός). IPTCPANEL_RESET;Επαναφορά IPTCPANEL_RESETHINT;Επαναφορά προεπιλεγμένου προφίλ IPTCPANEL_SOURCE;Πηγή -IPTCPANEL_SOURCEHINT;Αυθεντικός ιδιοκτήτης πνευματικού περιεχομένου της εικόνας (Πηγή). -IPTCPANEL_SUPPCATEGORIES;Συμπληρ. Κατηγορίες -IPTCPANEL_SUPPCATEGORIESHINT;Προσδιορίζουν επιπλέον το θέμα της εικόνας (Συμπληρωματικές κατηγορίες). IPTCPANEL_TITLE;Τίτλος -IPTCPANEL_TITLEHINT;Μια σύντομη αναφορά για την εικόνα (Όνομα αντικειμένου). -IPTCPANEL_TRANSREFERENCE;Κωδικός αυθεντικής μετάδοσης -IPTCPANEL_TRANSREFERENCEHINT;Ένας κωδικός που αντιπροσωπέυει την τοποθεσία αυθεντικής μετάδοσης (Κωδικός Αυθεντικής Μετάδοσης). MAIN_BUTTON_PREFERENCES;Ρυθμίσεις MAIN_BUTTON_SAVE;Αποθήκευση εικόνας MAIN_BUTTON_SENDTOEDITOR;Send to editor @@ -269,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;Ένδειξη ψαλιδίσματος PREFERENCES_DATEFORMAT;Διάταξη ημερομηνίας PREFERENCES_DATEFORMATHINT;YΜπορείτε να χρησιμοποιήσετε τις εξής εντολές μορφοποίησης:\n%y : χρονολογία\n%m : μήνας\n%d : ημέρα\n\nΓια παράδειγμα, η μορφοποίηση ημερομηνίας στην Ελλάδα είναι:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Προεπιλεγμένη γλώσσα -PREFERENCES_DEFAULTTHEME;Προεπιλεγμένο θέμα PREFERENCES_DIRHOME;Τοποθεσία "Home" PREFERENCES_DIRLAST;Τελευταία τοποθεσία που χρησιμοποιήθηκε PREFERENCES_DIROTHER;Άλλο @@ -396,7 +369,6 @@ TP_ICM_INPUTPROFILE;Προφίλ εισαγωγής TP_ICM_LABEL;ICM TP_ICM_NOICM;No ICM: sRGB output TP_ICM_OUTPUTPROFILE;Προφίλ εξόδου -TP_ICM_SAVEREFERENCE;Αποθήκευση εικόνας ως αναφορά για δημιουργία προφίλ. TP_ICM_WORKINGPROFILE;Παρόν προφίλ TP_RAW_DMETHOD;Μέθοδος TP_RAW_FALSECOLOR;Βήματα καταστολής σφαλμένων χρωμάτων @@ -474,12 +446,23 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. !EXIFFILTER_EXPOSURECOMPENSATION;Exposure compensation (EV) !EXIFFILTER_FILETYPE;File type !EXIFFILTER_METADATAFILTER;Enable metadata filters +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -502,8 +485,12 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -519,7 +506,6 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !FILEBROWSER_CURRENT_NAME;Current name: !FILEBROWSER_DARKFRAME;Dark-frame !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -554,6 +540,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -589,6 +576,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -870,7 +858,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -922,12 +910,12 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -940,8 +928,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -953,8 +941,58 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -974,6 +1012,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d @@ -1048,8 +1087,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -1058,7 +1096,9 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves !PARTIALPASTE_SHARPENEDGE;Edges @@ -1087,7 +1127,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1099,7 +1140,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1112,7 +1154,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_EDITORLAYOUT;Editor Layout !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field !PREFERENCES_FLATFIELDFOUND;Found @@ -1128,7 +1170,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1143,6 +1186,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1158,9 +1202,10 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1176,13 +1221,18 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROPERTY;Property +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files @@ -1193,15 +1243,16 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. !PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done !PREFERENCES_SND_TRESHOLDSECS;After seconds !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1210,7 +1261,6 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -!PREFERENCES_USESYSTEMTHEME;Use system theme !PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) !PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' !PREFERENCES_WLONE;One level @@ -1223,6 +1273,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save !PROGRESSBAR_LOADINGTHUMBS;Loading thumbnails... @@ -1315,11 +1366,11 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1339,8 +1390,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1351,6 +1402,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1362,9 +1414,11 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1383,10 +1437,14 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1512,8 +1570,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_THRESHOLD;Threshold !TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma !TP_EPD_LABEL;Tone Mapping @@ -1577,18 +1634,17 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1597,11 +1653,12 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_ICM_INPUTNONE;No profile !TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift @@ -1688,19 +1745,80 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2023,6 +2141,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_WBALANCE_SOLUX41;Solux 4100K !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) +!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_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 diff --git a/rtdata/languages/Hebrew b/rtdata/languages/Hebrew index 89e7c0eae..d7821b45c 100644 --- a/rtdata/languages/Hebrew +++ b/rtdata/languages/Hebrew @@ -83,7 +83,6 @@ HISTOGRAM_TOOLTIP_L;Show/CIELAB הסתר היסטוגרם HISTOGRAM_TOOLTIP_R;Show/הסתר היסטוגרם אדום HISTORY_CHANGED;Changed HISTORY_CUSTOMCURVE;עקמה מותאמת -HISTORY_DELSNAPSHOT;הסר תצלום HISTORY_FROMCLIPBOARD;From clipboard HISTORY_LABEL;היסטוריה HISTORY_MSG_1;צילום טעון @@ -170,47 +169,23 @@ HISTORY_MSG_81;Resize enabled HISTORY_NEWSNAPSHOT;תצלום חדש HISTORY_SNAPSHOT;תצלום HISTORY_SNAPSHOTS;תצלומים -IPTCPANEL_AUTHOR;Author -IPTCPANEL_AUTHORSPOSITION;Author's position -IPTCPANEL_AUTHORSPOSITIONHINT;Title of the creator or creators of the object (By-line Title). -IPTCPANEL_CAPTION;Caption -IPTCPANEL_CAPTIONHINT;A textual description of the data (Caption - Abstract) -IPTCPANEL_CAPTIONWRITER;Caption Writer -IPTCPANEL_CAPTIONWRITERHINT;The name of the person involved in the writing, editing or correcting the image or caption/abstract (Writer - Editor). IPTCPANEL_CATEGORY;Category -IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider (Category). IPTCPANEL_CITY;City -IPTCPANEL_CITYHINT;City of image origin (City). IPTCPANEL_COPYHINT;Copy IPTC settings to clipboard -IPTCPANEL_COPYRIGHT;Copyright -IPTCPANEL_COPYRIGHTHINT;Any necessary copyright notice (Copyright Notice). IPTCPANEL_COUNTRY;Country -IPTCPANEL_COUNTRYHINT;The name of the country/primary location where the image was created (Country - Primary Location Name). IPTCPANEL_CREDIT;Credit IPTCPANEL_CREDITHINT;Identifies the provider of the image, not necessarily the owner/creator (Credit). IPTCPANEL_DATECREATED;Date Created -IPTCPANEL_DATECREATEDHINT;The date the intellectual content of the image was created; Format: JJJJMMTT (Date Created). IPTCPANEL_EMBEDDED;Embedded IPTCPANEL_EMBEDDEDHINT;Reset to IPTC data embedded in the image file IPTCPANEL_HEADLINE;Headline -IPTCPANEL_HEADLINEHINT;A publishable entry providing a synopsis of the contents of the image (Headline). IPTCPANEL_INSTRUCTIONS;Instructions -IPTCPANEL_INSTRUCTIONSHINT;Other editorial instructions concerning the use of the image (Special Instructions). IPTCPANEL_KEYWORDS;Keywords -IPTCPANEL_KEYWORDSHINT;Used to indicate specific information retrieval words (Keywords). IPTCPANEL_PASTEHINT;Paste IPTC settings from clipboard -IPTCPANEL_PROVINCE;Province -IPTCPANEL_PROVINCEHINT;The Province/State where the image originates (Province-State). IPTCPANEL_RESET;Reset IPTCPANEL_RESETHINT;Reset to profile default IPTCPANEL_SOURCE;Source -IPTCPANEL_SOURCEHINT;The original owner of the intellectual content of the image (Source). -IPTCPANEL_SUPPCATEGORIES;Suppl. Categories -IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image (Supplemental Categories). IPTCPANEL_TITLE;Title -IPTCPANEL_TITLEHINT;A shorthand reference for the image (Object Name). -IPTCPANEL_TRANSREFERENCE;Trans. Reference -IPTCPANEL_TRANSREFERENCEHINT;A code representing the location of original transmission (Original Transmission Reference). MAIN_BUTTON_PREFERENCES;העדפויות MAIN_BUTTON_SAVE;שמור צילום MAIN_BUTTON_SENDTOEDITOR;Send to editor @@ -269,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;סימון קיצוץ PREFERENCES_DATEFORMAT;צורת תאריך PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y : year\n%m : month\n%d : day\n\nFor example, the hungarian date format is:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;שפה ברירת המחדל -PREFERENCES_DEFAULTTHEME;Default theme PREFERENCES_DIRHOME;תיקיית הבית PREFERENCES_DIRLAST;תיקיה האחרונה שביקרתי בה PREFERENCES_DIROTHER;אחר @@ -396,7 +369,6 @@ TP_ICM_INPUTPROFILE;פרופיל ייבוא TP_ICM_LABEL;ניהול צבע TP_ICM_NOICM;sRGBללא ניהול צבע - ייצוא ב TP_ICM_OUTPUTPROFILE;פרופיל ייצוא -TP_ICM_SAVEREFERENCE;Save reference image for profiling TP_ICM_WORKINGPROFILE;פרופיל עבודה TP_RAW_DMETHOD;שיטה TP_RAW_FALSECOLOR;דחיית צבע מסולף @@ -475,12 +447,23 @@ TP_WBALANCE_TEMPERATURE;מידת חום !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. !EXIFFILTER_EXPOSURECOMPENSATION;Exposure compensation (EV) !EXIFFILTER_FILETYPE;File type !EXIFFILTER_METADATAFILTER;Enable metadata filters +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -503,8 +486,12 @@ TP_WBALANCE_TEMPERATURE;מידת חום !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -520,7 +507,6 @@ TP_WBALANCE_TEMPERATURE;מידת חום !FILEBROWSER_CURRENT_NAME;Current name: !FILEBROWSER_DARKFRAME;Dark-frame !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -555,6 +541,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -590,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -871,7 +859,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -923,12 +911,12 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -941,8 +929,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -954,8 +942,58 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -975,6 +1013,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d @@ -1049,8 +1088,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -1059,7 +1097,9 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves !PARTIALPASTE_SHARPENEDGE;Edges @@ -1088,7 +1128,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1100,7 +1141,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1113,7 +1155,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_EDITORLAYOUT;Editor Layout !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field !PREFERENCES_FLATFIELDFOUND;Found @@ -1129,7 +1171,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1144,6 +1187,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1159,9 +1203,10 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1177,13 +1222,18 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROPERTY;Property +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files @@ -1194,15 +1244,16 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. !PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done !PREFERENCES_SND_TRESHOLDSECS;After seconds !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1211,7 +1262,6 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -!PREFERENCES_USESYSTEMTHEME;Use system theme !PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) !PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' !PREFERENCES_WLONE;One level @@ -1224,6 +1274,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save !PROGRESSBAR_LOADINGTHUMBS;Loading thumbnails... @@ -1316,11 +1367,11 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1340,8 +1391,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1352,6 +1403,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1363,9 +1415,11 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1384,10 +1438,14 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1513,8 +1571,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_THRESHOLD;Threshold !TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma !TP_EPD_LABEL;Tone Mapping @@ -1578,18 +1635,17 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1598,11 +1654,12 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_ICM_INPUTNONE;No profile !TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift @@ -1689,19 +1746,80 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2024,6 +2142,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_WBALANCE_SOLUX41;Solux 4100K !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) +!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_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index 70739f62d..2f993423b 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -104,7 +104,6 @@ FILEBROWSER_DELETEDLGMSG;Vuoi eliminare i %1 file selezionati? FILEBROWSER_DELETEDLGMSGINCLPROC;Vuoi eliminare i %1 file inclusa la versione sviluppata nella coda? FILEBROWSER_EMPTYTRASH;Svuota cestino FILEBROWSER_EMPTYTRASHHINT;Elimina definitivamente i file dal cestino. -FILEBROWSER_EXEC_CPB;Generatore profili personalizzati FILEBROWSER_EXTPROGMENU;Apri con FILEBROWSER_FLATFIELD;Flat Field FILEBROWSER_MOVETODARKFDIR;Sposta nella cartella dei Dark Frame @@ -214,7 +213,6 @@ HISTOGRAM_TOOLTIP_R;Mostra/Nascondi l'istogramma del Rosso. HISTOGRAM_TOOLTIP_RAW;Mostra/Nascondi l'istogramma del raw. HISTORY_CHANGED;Modificato HISTORY_CUSTOMCURVE;Curva personalizzata -HISTORY_DELSNAPSHOT;Rimuovi HISTORY_FROMCLIPBOARD;Dagli appunti HISTORY_LABEL;Cronologia HISTORY_MSG_1;Foto caricata @@ -474,47 +472,23 @@ HISTORY_NEWSNAPSHOT;Aggiungi HISTORY_NEWSNAPSHOT_TOOLTIP;Scorciatoia: Alt-s HISTORY_SNAPSHOT;Istantanea HISTORY_SNAPSHOTS;Istantanee -IPTCPANEL_AUTHOR;Autore -IPTCPANEL_AUTHORSPOSITION;Qualifica dell'Autore -IPTCPANEL_AUTHORSPOSITIONHINT;Titolo del creatore o creatori dell'opera (By-line Title). -IPTCPANEL_CAPTION;Didascalia -IPTCPANEL_CAPTIONHINT;Una descrizione testuale dei dati (Caption - Abstract). -IPTCPANEL_CAPTIONWRITER;Autore della didascalia -IPTCPANEL_CAPTIONWRITERHINT;Il nome della persona impegnata nella scrittura, modifica o correzione dell'immagine o della descrizione riassuntiva (Writer - Editor). IPTCPANEL_CATEGORY;Categoria -IPTCPANEL_CATEGORYHINT;Identifica il soggetto dell'immagine secondo l'opinione del fornitore (Category). IPTCPANEL_CITY;Città -IPTCPANEL_CITYHINT;Città di origine dell'immagine (City). IPTCPANEL_COPYHINT;Copia le impostazioni IPTC negli appunti -IPTCPANEL_COPYRIGHT;Diritto d'autore -IPTCPANEL_COPYRIGHTHINT;Qualsiasi annotazione necessaria riguardante il diritto d'autore (Copyright Notice). IPTCPANEL_COUNTRY;Stato -IPTCPANEL_COUNTRYHINT;Il nome dello stato/confederazione in cui l'immagine è stata creata (Country - Primary Location Name). IPTCPANEL_CREDIT;Riconoscimento IPTCPANEL_CREDITHINT;Identifica il fornitore dell'immagine, non necessariamente il possessore/creatore (Credit). IPTCPANEL_DATECREATED;Data di creazione -IPTCPANEL_DATECREATEDHINT;La data in cui è stato creato il contenuto intellettuale dell'immagine; Formato: AAAAMMGG (Date Created). IPTCPANEL_EMBEDDED;Incorporato IPTCPANEL_EMBEDDEDHINT;Ripristina i dati IPTC incorporati nel file d'immagine IPTCPANEL_HEADLINE;Intestazione -IPTCPANEL_HEADLINEHINT;Una didascalia pubblicabile che esprime una sinossi del contenuto dell'immagine (Headline). IPTCPANEL_INSTRUCTIONS;Istruzioni -IPTCPANEL_INSTRUCTIONSHINT;Altre istruzioni editoriali riguardanti l'uso dell'immagine (Special Instructions). IPTCPANEL_KEYWORDS;Parole Chiave -IPTCPANEL_KEYWORDSHINT;Usate per indicare parole emblematiche al fine di recuperare informazioni specifiche (Keywords). IPTCPANEL_PASTEHINT;Incolla le impostazioni IPTC dagli appunti -IPTCPANEL_PROVINCE;Provincia -IPTCPANEL_PROVINCEHINT;La provincia/regione da cui l'immagine proviene (Province-State). IPTCPANEL_RESET;Ripristina IPTCPANEL_RESETHINT;Ripristina il profilo predefinito IPTCPANEL_SOURCE;Origine -IPTCPANEL_SOURCEHINT;Il possessore originario del contenuto intellettuale rappresentato nell'immagine (Source). -IPTCPANEL_SUPPCATEGORIES;Categorie agg. -IPTCPANEL_SUPPCATEGORIESHINT;Ulteriore miglioramento del soggetto dell'immagine (Supplemental Categories). IPTCPANEL_TITLE;Titolo -IPTCPANEL_TITLEHINT;Un'abbreviazione che alluda all'immagine (Object Name). -IPTCPANEL_TRANSREFERENCE;Riferimento Trasm. -IPTCPANEL_TRANSREFERENCEHINT;Un codice che rappresenta l'ubicazione da cui è avvenuta la trasmissione originaria (Original Transmission Reference). MAIN_BUTTON_FULLSCREEN;Schermo intero MAIN_BUTTON_NAVNEXT_TOOLTIP;Passa all'immagine successiva rispetto all'immagine aperta per la Modifica\nScorciatoia: Shift-F4\n\nPer passare all'immagine successiva rispetto alla miniatura selezionata nel Navigatore o nel Rullino:\nScorciatoia: F4 MAIN_BUTTON_NAVPREV_TOOLTIP;Passa all'immagine precedente rispetto all'immagine aperta per la Modifica\nScorciatoia: Shift-F3\n\nPer passare all'immagine precedente rispetto alla miniatura selezionata nel Navigatore o nel Rullino:\nScorciatoia: F3 @@ -552,12 +526,12 @@ MAIN_TAB_COLOR;Colore MAIN_TAB_COLOR_TOOLTIP;Scorciatoia: Alt-c MAIN_TAB_DETAIL;Dettaglio MAIN_TAB_DETAIL_TOOLTIP;Scorciatoia: Alt-d -MAIN_TAB_DEVELOP;Sviluppo +MAIN_TAB_DEVELOP; Modifiche Batch MAIN_TAB_EXIF;Exif -MAIN_TAB_EXPORT; Esportazione Rapida +MAIN_TAB_EXPORT; Esportazione Rapida MAIN_TAB_EXPOSURE;Esposizione MAIN_TAB_EXPOSURE_TOOLTIP;Scorciatoia: Alt-e -MAIN_TAB_FILTER;Filtro +MAIN_TAB_FILTER; Filtro MAIN_TAB_IPTC;IPTC MAIN_TAB_METADATA;Metadati MAIN_TAB_METADATA_TOOLTIP;Scorciatoia: Alt-m @@ -637,8 +611,6 @@ PARTIALPASTE_PERSPECTIVE;Prospettiva PARTIALPASTE_PREPROCESS_GREENEQUIL;Bilanciamento del verde PARTIALPASTE_PREPROCESS_LINEDENOISE;Filtro per rumore a bande PARTIALPASTE_RAWCACORR_AUTO;Autocorrezione AC -PARTIALPASTE_RAWCACORR_CABLUE;Correzione AC blu -PARTIALPASTE_RAWCACORR_CARED;Correzione AC rosso PARTIALPASTE_RAWEXPOS_BLACK;Punto del Nero PARTIALPASTE_RAWEXPOS_LINEAR;Correzione Punto del Bianco PARTIALPASTE_RAWEXPOS_PRESER;Conservazione Alteluci @@ -695,8 +667,6 @@ PREFERENCES_DARKFRAMESHOTS;fotogrammi PREFERENCES_DARKFRAMETEMPLATES;modelli PREFERENCES_DATEFORMAT;Formato della data PREFERENCES_DATEFORMATHINT;Puoi usare le seguenti stringhe di formattazione:\n%y : anno\n%m : mese\n%d : giorno\n\nPer esempio, il formato italiano per la data è:\n%d/%m/%y -PREFERENCES_DEFAULTLANG;Lingua predefinita -PREFERENCES_DEFAULTTHEME;Tema predefinito PREFERENCES_DIRDARKFRAMES;Cartella dei fotogrammi di fondo (Dark Frame) PREFERENCES_DIRHOME;Cartella personale dell'utente (home directory) PREFERENCES_DIRLAST;Ultima cartella visitata @@ -782,7 +752,6 @@ PREFERENCES_SHOWEXPOSURECOMPENSATION;Accoda compensazione dell'esposizione PREFERENCES_SHTHRESHOLD;Soglia per le ombre tosate PREFERENCES_SINGLETAB;Modalità a Scheda Singola PREFERENCES_SINGLETABVERTAB;Modalità a Scheda Singola, schede verticali -PREFERENCES_SLIMUI;Interfaccia compatta PREFERENCES_SND_BATCHQUEUEDONE;Al termine dell'elaborazione della coda PREFERENCES_SND_HELP;Inserire un percorso oppure nulla (per non avere suoni).\nSu Windows usa "SystemDefault", "SystemAsterisk" ecc. per i suoni di sistema.\nSu Linux usa "complete", "window-attention" ecc. per i suoni di sistema. PREFERENCES_SND_LNGEDITPROCDONE;Al termine delle operazioni di modifica @@ -798,7 +767,6 @@ PREFERENCES_TP_LABEL;Pannello Strumenti: PREFERENCES_TP_USEICONORTEXT;Utilizza le icone delle schede anziché il testo PREFERENCES_TP_VSCROLLBAR;Nascondi la barra di scorrimento verticale PREFERENCES_USEBUNDLEDPROFILES;Usa profili inclusi -PREFERENCES_USESYSTEMTHEME;Usa tema di sistema PREFERENCES_VIEW;Bilanciamento del bianco del dispositivo di uscita (monitor, TV, proiettore...) PREFERENCES_WORKFLOW;Disposizione PROFILEPANEL_COPYPPASTE;Parametri da copiare @@ -1056,8 +1024,6 @@ TP_DIRPYREQUALIZER_SKIN_TOOLTIP;A -100 i toni della pelle sono elaborati.\nA 0 t TP_DIRPYREQUALIZER_THRESHOLD;Soglia TP_DIRPYREQUALIZER_TOOLTIP;Tenta di ridurre gli artefatti dovuti alle transizioni tra colori (tonalità, croma, luma) dell'incarnato e del resto dell'immagine TP_DISTORTION_AMOUNT;Quantità -TP_DISTORTION_AUTO; Autocorrezione Distorsione -TP_DISTORTION_AUTO_TIP;Corregge la distorsione delle ottiche automaticamente per alcune fotocamere (Micro 4/3, alcune compatte, ecc.) TP_DISTORTION_LABEL;Distorsione TP_EPD_EDGESTOPPING;Blocco ai Bordi TP_EPD_LABEL;Tone Mapping @@ -1144,7 +1110,6 @@ TP_ICM_INPUTPROFILE;Profilo di ingresso TP_ICM_LABEL;Gestione Colore TP_ICM_NOICM;Nessun ICM: uscita in sRGB TP_ICM_OUTPUTPROFILE;Profilo di Uscita -TP_ICM_SAVEREFERENCE;Salva riferimento per la profilazione TP_ICM_SAVEREFERENCE_TOOLTIP;Salva l'immagine TIFF lineare prima che sia applicato il profilo colore. Il risultato può essere utilizzato per la calibrazione e generazione del profilo della fotocamera. TP_ICM_TONECURVE;Usa la curva tono del DCP TP_ICM_TONECURVE_TOOLTIP;Utilizza le curve tono incluse nel DCP. Questa opzione è abilitata solo se il DCP selezionato possiede una curva tono. @@ -1280,7 +1245,6 @@ TP_SHARPENING_RLD_AMOUNT;Quantità TP_SHARPENING_RLD_DAMPING;Smorzamento TP_SHARPENING_RLD_ITERATIONS;Iterazioni TP_SHARPENING_THRESHOLD;Soglia -TP_SHARPENING_TOOLTIP;Aspettati un risultato leggermente diverso quando usato con CIECAM02. Se noti differenze, regola a tuo piacimento. TP_SHARPENING_USM;Maschera di contrasto TP_SHARPENMICRO_AMOUNT;Quantità TP_SHARPENMICRO_LABEL;Microcontrasto @@ -1372,7 +1336,23 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_EQUALIZER;Bypass Wavelet Levels +!EXPORT_PIPELINE;Processing pipeline +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWNOTTRASHHINT;Show only non-deleted images. !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !FILECHOOSER_FILTER_ANY;All files @@ -1385,6 +1365,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_256;NR - Median type !HISTORY_MSG_257;Color Toning @@ -1490,7 +1471,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -1542,12 +1523,12 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1560,8 +1541,8 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -1573,8 +1554,59 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1586,6 +1618,9 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PARTIALPASTE_PREPROCESS_DEADPIXFILT;Dead pixel filter !PARTIALPASTE_PREPROCESS_HOTPIXFILT;Hot pixel filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue +!PARTIALPASTE_RAW_IMAGENUM;Sub-image +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_WAVELETGROUP;Wavelet Levels !PREFERENCES_AUTLISLOW;Low @@ -1598,17 +1633,20 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1616,6 +1654,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1623,9 +1662,10 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_NAVIGATIONFRAME;Navigation !PREFERENCES_NOISE;Noise Reduction !PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP;Overlay filenames on thumbnails in the editor pannel @@ -1635,7 +1675,12 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font @@ -1646,6 +1691,8 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1654,6 +1701,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_WLONE;One level !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No +!PROFILEPANEL_PDYNAMIC;Dynamic !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. !SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. @@ -1662,6 +1710,13 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1750,6 +1805,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_DIRPYRDENOISE_SLI;Slider !TP_DIRPYRDENOISE_TILELABEL;Tile size=%1, Center: Tx=%2 Ty=%3 !TP_DIRPYREQUALIZER_ARTIF;Reduce artifacts +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_GAMMA;Gamma !TP_EXPOSURE_TCMODE_LUMINANCE;Luminance !TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptual @@ -1762,14 +1818,14 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_FLATFIELD_CLIPCONTROL;Clip control !TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_NEUTRAL;Reset @@ -1788,11 +1844,72 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_RAWEXPOS_BLACK_GREEN;Green !TP_RAWEXPOS_BLACK_RED;Red !TP_RAWEXPOS_RGB;Red, Green, Blue +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. +!TP_RAW_LMMSE;LMMSE +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL !TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* !TP_RETINEX_CONTEDIT_LH;Hue equalizer @@ -2036,4 +2153,6 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !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_TMTYPE;Compression method !TP_WAVELET_TON;Toning +!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". !ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: Alt-f diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index b13b2bd81..fdd5baad7 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -139,7 +139,6 @@ FILEBROWSER_DELETEDLGMSG;選択済みのファイル %1 を削除して FILEBROWSER_DELETEDLGMSGINCLPROC;バッチ処理に組み込まれている選択済みのファイル %1 を削除してもいいですか? FILEBROWSER_EMPTYTRASH;ゴミ箱を空にする FILEBROWSER_EMPTYTRASHHINT;ゴミ箱のファイルを完全に削除する -FILEBROWSER_EXEC_CPB;カスタム・プロファイルビルダーを実行 FILEBROWSER_EXTPROGMENU;..で開く FILEBROWSER_FLATFIELD;フラットフィールド FILEBROWSER_MOVETODARKFDIR;ダークフレーム・ディレクトリに移動 @@ -258,7 +257,6 @@ HISTOGRAM_TOOLTIP_R;レッド・ヒストグラム 表示/非表示 HISTOGRAM_TOOLTIP_RAW;rawヒストグラム 表示/非表示 HISTORY_CHANGED;変更されました HISTORY_CUSTOMCURVE;カスタムカーブ -HISTORY_DELSNAPSHOT;削除 HISTORY_FROMCLIPBOARD;クリップボードから HISTORY_LABEL;履歴 HISTORY_MSG_1;写真を読み込みました @@ -669,47 +667,23 @@ HISTORY_NEWSNAPSHOT;追加 HISTORY_NEWSNAPSHOT_TOOLTIP;ショートカット: Alt-s HISTORY_SNAPSHOT;スナップショット HISTORY_SNAPSHOTS;スナップショット -IPTCPANEL_AUTHOR;作成者 -IPTCPANEL_AUTHORSPOSITION;作成者の肩書 -IPTCPANEL_AUTHORSPOSITIONHINT;作成者の肩書または作品の作成者(署名 タイトル). -IPTCPANEL_CAPTION;キャプション、説明文 -IPTCPANEL_CAPTIONHINT;データのテキストによる説明 (説明--要約) -IPTCPANEL_CAPTIONWRITER;説明記入者 -IPTCPANEL_CAPTIONWRITERHINT;画像を編集修正する人、または説明/要約の執筆に係わる人の名前 (作家--編集者). IPTCPANEL_CATEGORY;カテゴリ -IPTCPANEL_CATEGORYHINT;提供者の見解で画像の主題を決めます (カテゴリ). IPTCPANEL_CITY;都市 -IPTCPANEL_CITYHINT;撮影された都市 (市町村). IPTCPANEL_COPYHINT;IPTC設定をクリップボードにコピー -IPTCPANEL_COPYRIGHT;著作権 -IPTCPANEL_COPYRIGHTHINT;著作権表示 (著作権情報). IPTCPANEL_COUNTRY;撮影国 -IPTCPANEL_COUNTRYHINT;国名、/画像が撮影・作成された国 (国--撮影国). IPTCPANEL_CREDIT;クレジット IPTCPANEL_CREDITHINT;所有者/作成者に限らず、画像の提供元の識別 (クレジット). IPTCPANEL_DATECREATED;作成日 -IPTCPANEL_DATECREATEDHINT;画像の知的内容が作成された日付; フォーマット: JJJJMMTT (作成日). IPTCPANEL_EMBEDDED;埋め込み IPTCPANEL_EMBEDDEDHINT;画像に埋め込まれたIPTCデータにリセット IPTCPANEL_HEADLINE;見出し -IPTCPANEL_HEADLINEHINT;画像の内容の概要を示す記入項目 (タイトル). IPTCPANEL_INSTRUCTIONS;編集注記 -IPTCPANEL_INSTRUCTIONSHINT;画像の使用に関するその他の特記事項 (編集注記). IPTCPANEL_KEYWORDS;キーワード -IPTCPANEL_KEYWORDSHINT;情報検索に使用する単語 (キーワード). IPTCPANEL_PASTEHINT;IPTC設定をクリップボードから貼り付け -IPTCPANEL_PROVINCE;州・都道府県 -IPTCPANEL_PROVINCEHINT;撮影された地域/州・都道府県(地域--州・都道府県). IPTCPANEL_RESET;リセット IPTCPANEL_RESETHINT;デフォルトのプロファイルにリセット IPTCPANEL_SOURCE;ソース -IPTCPANEL_SOURCEHINT;画像の著作権保有者 (ソース). -IPTCPANEL_SUPPCATEGORIES;カテゴリ補助 -IPTCPANEL_SUPPCATEGORIESHINT;さらに細かく画像の主題 (カテゴリ補助). IPTCPANEL_TITLE;タイトル -IPTCPANEL_TITLEHINT;画像のタイトルを簡略に (タイトル). -IPTCPANEL_TRANSREFERENCE;送信証明 -IPTCPANEL_TRANSREFERENCEHINT;オリジナルの送信証明の位置を表すコード (オリジナル 送信証明). MAIN_BUTTON_FULLSCREEN;フルスクリーン MAIN_BUTTON_NAVNEXT_TOOLTIP;エディタで開いている画像に対応する次の画像に移動します\nショートカット: Shift-F4\n\nファイルブラウザで選択したサムネイルに対応する次の画像に移動するには\nショートカット: F4 MAIN_BUTTON_NAVPREV_TOOLTIP;エディタで開いている画像に対応する前の画像に移動します\nショートカット: Shift-F3\n\nファイルブラウザで選択したサムネイルに対応する前の画像に移動するには\nショートカット: F3 @@ -841,8 +815,6 @@ PARTIALPASTE_PREPROCESS_GREENEQUIL;グリーン 平衡化 PARTIALPASTE_PREPROCESS_HOTPIXFILT;ホットピクセルフィルターを適用 PARTIALPASTE_PREPROCESS_LINEDENOISE;ラインノイズ フィルタ PARTIALPASTE_RAWCACORR_AUTO;自動色収差補正 -PARTIALPASTE_RAWCACORR_CABLUE;色収差 ブルー -PARTIALPASTE_RAWCACORR_CARED;色収差 レッド PARTIALPASTE_RAWEXPOS_BLACK;黒レベル PARTIALPASTE_RAWEXPOS_LINEAR;raw ホワイトポイント リニア補正係数 PARTIALPASTE_RAWEXPOS_PRESER;raw ホワイトポイント ハイライトを保持したまま補正 (EV) @@ -917,8 +889,6 @@ PREFERENCES_DATEFORMAT;日付の形式 PREFERENCES_DATEFORMATHINT;次の書式を使用することができます:\n%y : 年\n%m : 月\n%d : 日\n\n例として, ハンガリアン記法の日付:\n%y/%m/%d PREFERENCES_DAUB_LABEL;ドビッシー関数のタイプ D4の代わりにD6を使う PREFERENCES_DAUB_TOOLTIP;ノイズ低減とウェーブレットのレベルツールはマザーウェーブレットにドビッシーを使っています。このタイプでD4の代わりにD6を選択すると、直交系であるドビッシーの係数が増えるので、恐らくスケールの小さいレベルは質が向上するでしょう。タイプを変えても処理時間やメモリー使用量に影響はありません。 -PREFERENCES_DEFAULTLANG;デフォルトの言語 -PREFERENCES_DEFAULTTHEME;デフォルトテーマ PREFERENCES_DIRDARKFRAMES;ダークフレーム・ディレクトリ PREFERENCES_DIRHOME;ホーム・ディレクトリ PREFERENCES_DIRLAST;最近参照したディレクトリ @@ -1036,7 +1006,6 @@ PREFERENCES_SHTHRESHOLD;シャドウ・クリッピング領域のしきい値 PREFERENCES_SIMPLAUT;ツールのモード PREFERENCES_SINGLETAB;シングルタブモードモード PREFERENCES_SINGLETABVERTAB;シングル編集タブモード, 垂直タブ -PREFERENCES_SLIMUI;スリムインタフェース PREFERENCES_SMA;小 (250x287) PREFERENCES_SND_BATCHQUEUEDONE;キュー処理 終了 PREFERENCES_SND_HELP;ファイルパスを入力 または空欄(無音).\nWindowsはシステムサウンドの "SystemDefault", "SystemAsterisk"など..\nLinuxはシステムサウンドの "complete", "window-attention"などを使用します @@ -1057,7 +1026,6 @@ PREFERENCES_TP_LABEL;ツール パネル: PREFERENCES_TP_USEICONORTEXT;テキストの代わりにタブアイコンを使用 PREFERENCES_TP_VSCROLLBAR;ツールパネルの垂直スクロールバーを隠す PREFERENCES_USEBUNDLEDPROFILES;付属のプロファイルを使用 -PREFERENCES_USESYSTEMTHEME;システムのテーマを使う PREFERENCES_VIEW;出力デバイスのホワイトバランス設定 (モニター, TV, プロジェクター,観視...) PREFERENCES_WAVLEV;’高い’質の場合、ウェーブレット変換のレベルを上げる PREFERENCES_WLONE;レベル1 @@ -1399,8 +1367,6 @@ TP_DIRPYREQUALIZER_SKIN_TOOLTIP;-100 肌色トーンの調整が目的にな TP_DIRPYREQUALIZER_THRESHOLD;しきい値 TP_DIRPYREQUALIZER_TOOLTIP;肌色(色相、色度、明度)と他の色の間の遷移でアーティファクトが発生するのを軽減します TP_DISTORTION_AMOUNT;適用量 -TP_DISTORTION_AUTO;自動歪曲収差補正 -TP_DISTORTION_AUTO_TIP;(試用) 自動レンズ収差補正 (M4/3, 一部のコンデジ, etc.) TP_DISTORTION_LABEL;歪曲収差補正 TP_EPD_EDGESTOPPING;エッジ停止 TP_EPD_GAMMA;ガンマ @@ -1503,7 +1469,6 @@ TP_ICM_INPUTPROFILE;入力プロファイル TP_ICM_LABEL;カラー・マネジメント TP_ICM_NOICM;No ICM: sRGB 出力 TP_ICM_OUTPUTPROFILE;出力プロファイル -TP_ICM_SAVEREFERENCE;プロファイリングを参照する画像を保存 TP_ICM_SAVEREFERENCE_APPLYWB;ホワイトバランスを適用 TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;一般的に、ICCプロファイルを作成するための画像を保存する際に適用するホワイトバランスです、DCPプロファイルを作成する時は適用しません。 TP_ICM_SAVEREFERENCE_TOOLTIP;入力プロファイルが適用される前のリニアなTIFF画像を保存します。キャリブレーション目的やカメラプロファイルの作成などに使います。 @@ -1660,7 +1625,6 @@ TP_SHARPENING_RLD_AMOUNT;適用量 TP_SHARPENING_RLD_DAMPING;減衰 TP_SHARPENING_RLD_ITERATIONS;繰返し TP_SHARPENING_THRESHOLD;しきい値 -TP_SHARPENING_TOOLTIP;CIECAM02で使用する場合、わずかに異なる結果が予想されます。違いが認められた場合、好みに合わせて調整します TP_SHARPENING_USM;アンシャープマスク TP_SHARPENMICRO_AMOUNT;適用量 TP_SHARPENMICRO_LABEL;マイクロコントラスト @@ -1911,21 +1875,38 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile +!EXPORT_BYPASS;Processing steps to bypass +!EXPORT_PIPELINE;Processing pipeline +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !GENERAL_APPLY;Apply !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1938,8 +1919,8 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -1951,19 +1932,86 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_PRSHARPENING;Post-resize sharpening +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue +!PARTIALPASTE_RAW_IMAGENUM;Sub-image +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. !PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file +!PROFILEPANEL_PDYNAMIC;Dynamic !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. !SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. @@ -1972,6 +2020,13 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_DIRPYRDENOISE_3X3;3×3 !TP_DIRPYRDENOISE_3X3_SOFT;3×3 soft !TP_DIRPYRDENOISE_5X5;5×5 @@ -1980,12 +2035,74 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_DIRPYRDENOISE_9X9;9×9 !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. !TP_DIRPYRDENOISE_PASSES_TOOLTIP;Applying three median filter iterations with a 3×3 window size often leads to better results than using one median filter iteration with a 7×7 window size. +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_NEUTRAL;Reset !TP_RAWCACORR_CASTR;Strength +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. +!TP_RAW_LMMSE;LMMSE +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red +!TP_RAW_VNG4;VNG4 !TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL !TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* !TP_RETINEX_CONTEDIT_LH;Hue equalizer @@ -2066,3 +2183,5 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_RETINEX_VIEW_TRAN;Transmission - Auto !TP_RETINEX_VIEW_TRAN2;Transmission - Fixed !TP_RETINEX_VIEW_UNSHARP;Unsharp mask +!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". diff --git a/rtdata/languages/Latvian b/rtdata/languages/Latvian index a3022fab7..9a2d837b1 100644 --- a/rtdata/languages/Latvian +++ b/rtdata/languages/Latvian @@ -83,7 +83,6 @@ HISTOGRAM_TOOLTIP_L;Rādīt/Slēpt CIELAB Spīduma histogrammu HISTOGRAM_TOOLTIP_R;Rādīt/Slēpt Sarkanā histogrammu HISTORY_CHANGED;Mainīts HISTORY_CUSTOMCURVE;Pielāgota līkne -HISTORY_DELSNAPSHOT;Noņemt grāmtzīmi HISTORY_FROMCLIPBOARD;No starplikas HISTORY_LABEL;Vēsture HISTORY_MSG_1;Attēls ielādēts @@ -170,47 +169,23 @@ HISTORY_MSG_81;Izmērmaiņa ieslēgta HISTORY_NEWSNAPSHOT;Jauna grāmtzīme HISTORY_SNAPSHOT;Grāmtzīme HISTORY_SNAPSHOTS;Grāmtzīmes -IPTCPANEL_AUTHOR;Autors -IPTCPANEL_AUTHORSPOSITION;Autora amats -IPTCPANEL_AUTHORSPOSITIONHINT;Objekta radītāja amapts (By-line Title). -IPTCPANEL_CAPTION;Virsraksts -IPTCPANEL_CAPTIONHINT;Datu tekstveida apraksts (Caption - Abstract) -IPTCPANEL_CAPTIONWRITER;Virsraksta autors -IPTCPANEL_CAPTIONWRITERHINT;Personas vārfds, kura ir iesaistīta attēla, virsraksta vai kopsavilkuma rakstīšanā, rediģēšanā vai labošānā (Writer - Editor) IPTCPANEL_CATEGORY;Kategorija -IPTCPANEL_CATEGORYHINT;Attēla radītājs identificē attēla subjektu (Category). IPTCPANEL_CITY;Pilsēta -IPTCPANEL_CITYHINT;Attēla izcelsmes pilsēta (City). IPTCPANEL_COPYHINT;Kopēt IPTC iestatījumus uz starpliku -IPTCPANEL_COPYRIGHT;Autortiesības -IPTCPANEL_COPYRIGHTHINT;Jebkāds nepieciešamais brīdinājums par autortiesībām (Copyright Notice). IPTCPANEL_COUNTRY;Valsts -IPTCPANEL_COUNTRYHINT;Attēla sākotnējās izveidošanas valsts (Country - Primary Location Name). IPTCPANEL_CREDIT;Pateicība IPTCPANEL_CREDITHINT;Identificē attēla sniedzēju, nav obligāti radītājs vai īpašnieks (Credit). IPTCPANEL_DATECREATED;Izveidošanas datums -IPTCPANEL_DATECREATEDHINT;Attēla intelektuālā satura radīšanas datums; Formāts: ggggmmdd (Date Created). IPTCPANEL_EMBEDDED;Iegultais IPTCPANEL_EMBEDDEDHINT;Attiestatīt uz attēla iegultajiem IPTC datiem IPTCPANEL_HEADLINE;Konspekts -IPTCPANEL_HEADLINEHINT;Publicējams raksts, kas satur attēla konspektu (Headline). IPTCPANEL_INSTRUCTIONS;Norādījumi -IPTCPANEL_INSTRUCTIONSHINT;Citi redaktora norādījumi par attēla lietošanu (Special Instructions). IPTCPANEL_KEYWORDS;Atslēgvārdi -IPTCPANEL_KEYWORDSHINT;Norāda vārdus specifiskas informācijas iegūšanai (Keywords). IPTCPANEL_PASTEHINT;Ielīmēt IPTC iestatījumus no starplikas -IPTCPANEL_PROVINCE;Province -IPTCPANEL_PROVINCEHINT;Attēla izcelsmes valsts vai province (Province-State). IPTCPANEL_RESET;Atiestate IPTCPANEL_RESETHINT;Atiestatīt uz profila noklusējumu IPTCPANEL_SOURCE;Avots -IPTCPANEL_SOURCEHINT;Attēla intelektuālā īpašuma īpašnieks (Source). -IPTCPANEL_SUPPCATEGORIES;Apakškategorija -IPTCPANEL_SUPPCATEGORIESHINT;Precizē attēla subjektu (Supplemental Categories). IPTCPANEL_TITLE;Nosaukums -IPTCPANEL_TITLEHINT;Attēla saīsināts nosaukums (Object Name). -IPTCPANEL_TRANSREFERENCE;Pārneses atsauce -IPTCPANEL_TRANSREFERENCEHINT;Kods, kas norāda uz attēla sākotnējas pārneses vietu (Original Transmission Reference). MAIN_BUTTON_PREFERENCES;Iestatījumi MAIN_BUTTON_SAVE;Saglabāt attēlu MAIN_BUTTON_SENDTOEDITOR;Sūtīt uz redaktoru @@ -269,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Keša maksimālais sīktēla augstums PREFERENCES_CLIPPINGIND;Cirpšanas pazīme PREFERENCES_DATEFORMAT;Datuma formāts PREFERENCES_DATEFORMATHINT;Jūs varat lietot šāduas formatēšanas parametrus:\n%y : gads\n%m : mēnesis\n%d : diena\n\nPiemēram, ungāru datuma formāts ir:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Noklusētā valoda -PREFERENCES_DEFAULTTHEME;Noklusētā tēma PREFERENCES_DIRHOME;Mājas mape PREFERENCES_DIRLAST;Pēdējā lietotā mape PREFERENCES_DIROTHER;Cita @@ -396,7 +369,6 @@ TP_ICM_INPUTPROFILE;Ievades profils TP_ICM_LABEL;ICM TP_ICM_NOICM;Bez ICM: sRGB izvade TP_ICM_OUTPUTPROFILE;Izvades profils -TP_ICM_SAVEREFERENCE;Saglabāt atsauces attēlu profila izveidei TP_ICM_WORKINGPROFILE;Darba profils TP_RAW_DMETHOD;Metode TP_RAW_FALSECOLOR;Neīsto krāsu slāpēšanas soļi @@ -475,12 +447,23 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. !EXIFFILTER_EXPOSURECOMPENSATION;Exposure compensation (EV) !EXIFFILTER_FILETYPE;File type !EXIFFILTER_METADATAFILTER;Enable metadata filters +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -503,8 +486,12 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -520,7 +507,6 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !FILEBROWSER_CURRENT_NAME;Current name: !FILEBROWSER_DARKFRAME;Dark-frame !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -555,6 +541,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -590,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -871,7 +859,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -923,12 +911,12 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -941,8 +929,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -954,8 +942,58 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -975,6 +1013,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d @@ -1049,8 +1088,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -1059,7 +1097,9 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves !PARTIALPASTE_SHARPENEDGE;Edges @@ -1088,7 +1128,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1100,7 +1141,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1113,7 +1155,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_EDITORLAYOUT;Editor Layout !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field !PREFERENCES_FLATFIELDFOUND;Found @@ -1129,7 +1171,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1144,6 +1187,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1159,9 +1203,10 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1177,13 +1222,18 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROPERTY;Property +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files @@ -1194,15 +1244,16 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. !PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done !PREFERENCES_SND_TRESHOLDSECS;After seconds !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1211,7 +1262,6 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -!PREFERENCES_USESYSTEMTHEME;Use system theme !PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) !PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' !PREFERENCES_WLONE;One level @@ -1224,6 +1274,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save !PROGRESSBAR_LOADINGTHUMBS;Loading thumbnails... @@ -1316,11 +1367,11 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1340,8 +1391,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1352,6 +1403,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1363,9 +1415,11 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1384,10 +1438,14 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1513,8 +1571,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_THRESHOLD;Threshold !TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma !TP_EPD_LABEL;Tone Mapping @@ -1578,18 +1635,17 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1598,11 +1654,12 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_ICM_INPUTNONE;No profile !TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift @@ -1689,19 +1746,80 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2024,6 +2142,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_WBALANCE_SOLUX41;Solux 4100K !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) +!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_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index c102d9423..2ba03b396 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -93,7 +93,6 @@ FILEBROWSER_DELETEDLGMSG;Biztosan törölni kívánja a kijelölt %1 képet? FILEBROWSER_DELETEDLGMSGINCLPROC;Biztos vagy benne, hogy törölni szeredné a kiválasztott %1 állományt, beleértve a feldolgozási sorba helyezett változatát IS? FILEBROWSER_EMPTYTRASH;Kuka ürítése FILEBROWSER_EMPTYTRASHHINT;A kukában lévő képek végleges, állományrendszerből történő eltávolítása. -FILEBROWSER_EXEC_CPB;Egyedi profil készítő futtatása FILEBROWSER_FLATFIELD;Flat Field FILEBROWSER_MOVETODARKFDIR;Mozgatás a 'dark frame' könyvtárba FILEBROWSER_MOVETOFLATFIELDDIR;Flat Fields könyvtárba mozgatás @@ -177,7 +176,6 @@ HISTOGRAM_TOOLTIP_R;Piros csatorna hisztogrammja (mutat/elrejt) HISTOGRAM_TOOLTIP_RAW;Raw hisztogram megjelenítése/elrejtése HISTORY_CHANGED;Változott HISTORY_CUSTOMCURVE;Saját görbe -HISTORY_DELSNAPSHOT;Töröl HISTORY_FROMCLIPBOARD;Vágólapról HISTORY_LABEL;Előzmények HISTORY_MSG_1;Kép betöltve @@ -348,47 +346,23 @@ HISTORY_MSG_165;RGB görbék - B HISTORY_NEWSNAPSHOT;Új HISTORY_SNAPSHOT;Pillanatkép HISTORY_SNAPSHOTS;Pillanatképek -IPTCPANEL_AUTHOR;Szerző -IPTCPANEL_AUTHORSPOSITION;Szerző titulusa -IPTCPANEL_AUTHORSPOSITIONHINT;A kép létrehozójának munkaköre illetve titulusa (By-line Title) -IPTCPANEL_CAPTION;Leírás -IPTCPANEL_CAPTIONHINT;A kép szöveges leírása (Caption - Abstract) -IPTCPANEL_CAPTIONWRITER;Író -IPTCPANEL_CAPTIONWRITERHINT;A leírást és az adatok rögzítését/szerkesztését/javítását végző személy neve (Writer - Editor) IPTCPANEL_CATEGORY;Kategória -IPTCPANEL_CATEGORYHINT;A kép témáját azonosítja (Category) IPTCPANEL_CITY;Város -IPTCPANEL_CITYHINT;A város, ahonnan a kép származik (City) IPTCPANEL_COPYHINT;IPTC beállítások másolása a vágólapra -IPTCPANEL_COPYRIGHT;Szerzői jog -IPTCPANEL_COPYRIGHTHINT;Szerzői joggal kapcsolatos megjegyzések (Copyright Notice) IPTCPANEL_COUNTRY;Ország -IPTCPANEL_COUNTRYHINT;Az ország, ahonnan a kép származik (Country - Primary Location Name) IPTCPANEL_CREDIT;Rendelkező IPTCPANEL_CREDITHINT;A kép kibocsájtójának neve (nem feltétlenül a szerző) (Credit) IPTCPANEL_DATECREATED;Dátum -IPTCPANEL_DATECREATEDHINT;A kép rögzítésének dátuma; formátum: ééééhhnn (Date Created) IPTCPANEL_EMBEDDED;Beágyazott IPTCPANEL_EMBEDDEDHINT;A betöltött képbe ágyazott információk kiolvasása IPTCPANEL_HEADLINE;Főcím -IPTCPANEL_HEADLINEHINT;A kép témájának összegzése (Headline) IPTCPANEL_INSTRUCTIONS;Útmutatás -IPTCPANEL_INSTRUCTIONSHINT;Egyéb, a képre vonatkozó szerkesztési útmutatás (Special Instructions) IPTCPANEL_KEYWORDS;Kulcsszavak -IPTCPANEL_KEYWORDSHINT;Kategorizáláshoz/szűréshez használatos, a képre vonatkozó kulcsszavak (Keywords) IPTCPANEL_PASTEHINT;IPTC beállítások beillesztése a vágólapról -IPTCPANEL_PROVINCE;Régió -IPTCPANEL_PROVINCEHINT;A megye/állam/régió, ahonnan a kép származik (Province-State) IPTCPANEL_RESET;Visszaállítás IPTCPANEL_RESETHINT;Visszatérés az aktuális profil alapértékéhez IPTCPANEL_SOURCE;Forrás -IPTCPANEL_SOURCEHINT;A kép szellemi tartalmának eredeti tulajdonosa (Source) -IPTCPANEL_SUPPCATEGORIES;További kategóriák -IPTCPANEL_SUPPCATEGORIESHINT;A kép finomabb, részletesebb kategorizálását teszi lehetővé (Supplemental Categories) IPTCPANEL_TITLE;Címke -IPTCPANEL_TITLEHINT;A kép rövid azonosítója (Object Name) -IPTCPANEL_TRANSREFERENCE;Továbbítás helye -IPTCPANEL_TRANSREFERENCEHINT;A továbbítás helyének megjelölése (Original Transmission Reference) MAIN_BUTTON_FULLSCREEN;Teljes képernyő MAIN_BUTTON_PREFERENCES;Beállítások MAIN_BUTTON_PUTTOQUEUE;Feldolgozási sorba helyez @@ -485,8 +459,6 @@ PARTIALPASTE_PERSPECTIVE;Perspektíva PARTIALPASTE_PREPROCESS_GREENEQUIL;Zöldegyensúly PARTIALPASTE_PREPROCESS_LINEDENOISE;Soronkénti zajszűrés PARTIALPASTE_RAWCACORR_AUTO;CA autokorrekció -PARTIALPASTE_RAWCACORR_CABLUE;CA kék -PARTIALPASTE_RAWCACORR_CARED;CA vörös PARTIALPASTE_RAWEXPOS_BLACK;Feketeszint PARTIALPASTE_RAWEXPOS_LINEAR;Raw fehérszint lineáris korrekciós faktor (FÉ) PARTIALPASTE_RAWEXPOS_PRESER;Raw fehérszint csúcsfény-megőrző faktor (FÉ) @@ -527,8 +499,6 @@ PREFERENCES_DARKFRAMESHOTS;kép PREFERENCES_DARKFRAMETEMPLATES;sablonok PREFERENCES_DATEFORMAT;Dátumformátum PREFERENCES_DATEFORMATHINT;A következő jeleket lehet használni:\n%y : év\n%m : hónap\n%d : nap\n\nPéldául a magyar dátumformátum:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Alapértelmezett nyelv -PREFERENCES_DEFAULTTHEME;Alapértelmezett kinézet PREFERENCES_DIRDARKFRAMES;Dark frame könyvtára PREFERENCES_DIRHOME;Saját könyvtár PREFERENCES_DIRLAST;Utoljára látogatott könyvtár @@ -597,7 +567,6 @@ PREFERENCES_SHOWEXPOSURECOMPENSATION;Expozíciókompenzáció megjelenítése PREFERENCES_SHTHRESHOLD;Küszöbérték bebukott árnyékokhoz PREFERENCES_SINGLETAB;Egyetlen szerkesztőfül PREFERENCES_SINGLETABVERTAB;Egyetlen fül mód, függőleges előnézeti képek -PREFERENCES_SLIMUI;Karcsú felület PREFERENCES_SND_BATCHQUEUEDONE;Feldolgozási sor végén PREFERENCES_SND_HELP;Állomány elérése, vagy hagyd üresen (ekkor nincs hang). Windows-on használd a "SystemDefault", "SystemAsterisk", stb. stringeket a rendszerhangokhoz. PREFERENCES_SND_LNGEDITPROCDONE;Amikor a képszerkesztés végződik @@ -611,7 +580,6 @@ PREFERENCES_TAB_SOUND;Hangok PREFERENCES_TP_LABEL;Eszközök panel: PREFERENCES_TP_USEICONORTEXT;Ikonok használata szöveg helyett a füleken PREFERENCES_TP_VSCROLLBAR;Függőleges görgetősáv elrejtése -PREFERENCES_USESYSTEMTHEME;Rendszer megjelenésének használata PREFERENCES_WORKFLOW;Munkamenet PROFILEPANEL_COPYPPASTE;Másolandó paraméterek PROFILEPANEL_LABEL;Feldolgozási beállítások @@ -697,8 +665,6 @@ TP_DIRPYREQUALIZER_LUMAFINEST;Finom részletek TP_DIRPYREQUALIZER_LUMANEUTRAL;Semleges TP_DIRPYREQUALIZER_THRESHOLD;Küszöb TP_DISTORTION_AMOUNT;Erősség -TP_DISTORTION_AUTO; Automatikus torzításhelyreállítás -TP_DISTORTION_AUTO_TIP;(Kísérleti) Objektív torzításának automatikus helyreállítása egyes fényképezőgépeknél (pl. M4/3, néhány digitális kompakt, stb...) TP_DISTORTION_LABEL;Torzítás TP_EPD_EDGESTOPPING;Éleknél megállás TP_EPD_LABEL;Tónustérképezés @@ -759,7 +725,6 @@ TP_ICM_INPUTPROFILE;Bemeneti színprofil TP_ICM_LABEL;ICM TP_ICM_NOICM;Nincs színkezelés: sRGB kimenet TP_ICM_OUTPUTPROFILE;Kimeneti színprofil -TP_ICM_SAVEREFERENCE;Referenciakép mentése profilkalibráláshoz TP_ICM_WORKINGPROFILE;Feldolgozási színprofil TP_IMPULSEDENOISE_LABEL;Pontzaj-csökkentés TP_IMPULSEDENOISE_THRESH;Küszöb @@ -914,10 +879,25 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_EQUALIZER;Bypass Wavelet Levels !EXPORT_BYPASS_RAW_LMMSE_ITERATIONS;Bypass [raw] LMMSE Enhancement Steps +!EXPORT_PIPELINE;Processing pipeline +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_COLORLABEL_TOOLTIP;Color label.\n\nUse dropdown menu or shortcuts:\nShift-Ctrl-0 No Color\nShift-Ctrl-1 Red\nShift-Ctrl-2 Yellow\nShift-Ctrl-3 Green\nShift-Ctrl-4 Blue\nShift-Ctrl-5 Purple @@ -941,6 +921,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWNOTTRASHHINT;Show only non-deleted images. !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !FILEBROWSER_UNRANK_TOOLTIP;Unrank.\nShortcut: Shift-0 @@ -957,6 +938,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !GENERAL_CLOSE;Close !GENERAL_OPEN;Open !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. !HISTORY_MSG_166;Exposure - Reset @@ -1152,7 +1134,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -1204,12 +1186,12 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1222,8 +1204,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -1235,8 +1217,58 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 !MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronize the File Browser or Filmstrip with the Editor to reveal the thumbnail of the currently opened image, and clear any active filters.\nShortcut: x\n\nAs above, but without clearing active filters:\nShortcut: y\n(Note that the thumbnail of the opened image will not be shown if filtered out). @@ -1244,6 +1276,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet @@ -1277,7 +1310,10 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PARTIALPASTE_PREPROCESS_DEADPIXFILT;Dead pixel filter !PARTIALPASTE_PREPROCESS_HOTPIXFILT;Hot pixel filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_WAVELETGROUP;Wavelet Levels !PREFERENCES_AUTLISLOW;Low @@ -1298,7 +1334,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1306,7 +1343,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_CUSTPROFBUILDKEYFORMAT;Keys format !PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1323,7 +1361,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1336,6 +1375,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1344,9 +1384,10 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MENUGROUPEXTPROGS;Group "Open with" !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color !PREFERENCES_NAVIGATIONFRAME;Navigation !PREFERENCES_NOISE;Noise Reduction @@ -1357,7 +1398,12 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels @@ -1370,7 +1416,9 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1384,6 +1432,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PROFILEPANEL_GLOBALPROFILES;Bundled profiles !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROGRESSBAR_NOIMAGES;No images found !PROGRESSBAR_PROCESSING_PROFILESAVED;Processing profile saved @@ -1470,11 +1519,11 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1494,8 +1543,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1506,6 +1555,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1517,9 +1567,11 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1538,10 +1590,14 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1648,6 +1704,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_DIRPYREQUALIZER_SKIN;Skin targetting/protection !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_GAMMA;Gamma !TP_EPD_TOOLTIP;Tone mapping is possible in L*a*b* mode (standard) and CIECAM02 mode.\n\nWhen in L*a*b* mode, tone mapping can also be used on the residual image of the Wavelet Levels tool.\n\nTo engage CIECAM02 tone mapping mode enable the following settings:\n1. CIECAM02\n2. Algorithm="Brightness + Colorfulness (QM)"\n3. "Tone mapping using CIECAM02 brightness (Q)" !TP_EXPOSURE_CURVEEDITOR1;Tone curve 1 @@ -1684,22 +1741,22 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_GRADIENT_STRENGTH_TOOLTIP;Filter strength in stops. !TP_HLREC_ENA_TOOLTIP;Could be activated by Auto Levels. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift !TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction. !TP_LABCURVE_CHROMATICITY;Chromaticity @@ -1762,16 +1819,77 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_RAWEXPOS_BLACK_GREEN;Green !TP_RAWEXPOS_BLACK_RED;Red !TP_RAWEXPOS_RGB;Red, Green, Blue +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL !TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* !TP_RETINEX_CONTEDIT_LH;Hue equalizer @@ -2031,6 +2149,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_WAVELET_TON;Toning !TP_WBALANCE_EQBLUERED;Blue/Red equalizer !TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behavior of "white balance" by modulating the blue/red balance.\nThis can be useful when shooting conditions:\na) are far from the standard illuminant (e.g. underwater),\nb) are far from conditions where calibrations were performed,\nc) where the matrices or ICC profiles are unsuitable. +!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_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 !TP_WBALANCE_WATER_HEADER;UnderWater diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index bf47b01ad..19e0c0130 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -13,6 +13,7 @@ #13 2015-03-03 updated to rt4.2.102 by wim ter meer #14 2015-11-23 update by wim ter meer #15 2016-07-21 update by wim ter meer +#16 2017-04-21 update by wim ter meer ABOUT_TAB_BUILD;Versie ABOUT_TAB_CREDITS;Credits @@ -48,6 +49,15 @@ CURVEEDITOR_TOOLTIPPASTE;Plak curve van klembord CURVEEDITOR_TOOLTIPSAVE;Bewaar huidige curve CURVEEDITOR_TYPE;Type: DIRBROWSER_FOLDERS;Mappen +DYNPROFILEEDITOR_DELETE;Verwijder +DYNPROFILEEDITOR_EDIT;Wijzig +DYNPROFILEEDITOR_EDIT_RULE;Wijzig Dynamisch Profielregel +DYNPROFILEEDITOR_ENTRY_TOOLTIP;Het zoeken is niet hoofdlettergevoelig.\nGebruik het "re:" voorvoegsel om\n een reguliere expressie uit te voeren +DYNPROFILEEDITOR_MOVE_DOWN;Naar beneden +DYNPROFILEEDITOR_MOVE_UP;Naar boven +DYNPROFILEEDITOR_NEW;Nieuw +DYNPROFILEEDITOR_NEW_RULE;Nieuw Dynamisch Profielregelegel +DYNPROFILEEDITOR_PROFILE;Profiel verwerken EDITWINDOW_TITLE;Bewerk afbeelding EDIT_OBJECT_TOOLTIP;Toont een widget in het voorbeeld scherm waarmee de werking van het gereedschap kan worden aangepast. EDIT_PIPETTE_TOOLTIP;Voeg een punt toe aan de curve door de Ctrl toets ingedrukt te houden en tegelijkertijd te links-klikken op de gewenste plek op het voorbeeld.\nOm een punt te wijzigen, hou de Ctrl toets ingedrukt en links-klik tegelijkertijd op het gewenste gebied in het voorbeeld, en laat daarna de Ctrl toets los (behalve wanneer fijne controle is gewenst), blijf de linker muis knop ingedrukt houden en beweeg de muis naar boven of beneden om dit punt te verschuiven op de curve. @@ -74,6 +84,7 @@ EXIFPANEL_RESETALL;Herstel alles EXIFPANEL_RESETALLHINT;Zet alle tags terug naar oorspronkelijke waarden EXIFPANEL_RESETHINT;Zet geselecteerde tags terug naar oorspronkelijke waarden EXIFPANEL_SUBDIRECTORY;Submap +EXPORT_BYPASS;Verwerkingsstappen die worden overgeslagen EXPORT_BYPASS_ALL;Alles selecteren/deselecteren EXPORT_BYPASS_DEFRINGE;Verzachten niet toepassen EXPORT_BYPASS_DIRPYRDENOISE;Ruisonderdrukking niet toepassen @@ -96,8 +107,12 @@ EXPORT_FASTEXPORTOPTIONS;Opties Snelle Export EXPORT_INSTRUCTIONS;Snel Exporteren biedt de mogelijkheid om gereedschappen uit te schakelen die veel tijd en rekenkracht vergen tijdens het converteren. Deze methode wordt aanbevolen om snel foto's in lagere resoluties aan te maken of wanneer de grootte moet worden aangepast voor één of meerdere afbeeldingen zonder de reeds opgeslagen ontwikkelinstellingen te wijzigen. EXPORT_MAXHEIGHT;Max. hoogte: EXPORT_MAXWIDTH;Max. breedte: +EXPORT_PIPELINE;Verwerken EXPORT_PUTTOQUEUEFAST;Plaats in verwerkingsrij voor Snelle Export EXPORT_RAW_DMETHOD;Demozaïekmethode +EXPORT_USE_FAST_PIPELINE;Snel (volledige verwerking op gewijzigd formaat van de afbeelding) +EXPORT_USE_FAST_PIPELINE_TIP;Gebruikt een speciale verwerkingslijn waarbij kwaliteit ten koste gaat van snelheid. Het formaat van de afbeelding wordt zo snel mogelijk gewijzigd, ipv aan het eind van de verwerking. De snelheidswinst is aanzienlijk, maar de kwaliteit van de afbeelding zal minder zijn. +EXPORT_USE_NORMAL_PIPELINE;Standaard (wijzigt formaat aan het eind) EXTPROGTARGET_1;raw EXTPROGTARGET_2;verwerkingsrij FILEBROWSER_ADDDELTEMPLATE;Voeg sjablonen toe of verwijder... @@ -120,7 +135,6 @@ FILEBROWSER_DELETEDLGMSG;Weet u zeker dat u de geselecteerde %1 bestanden wilt v FILEBROWSER_DELETEDLGMSGINCLPROC;Weet u zeker dat u de %1 geselecteerde bestanden wilt verwijderen *inclusief* de versies van de verwerkingsrij? FILEBROWSER_EMPTYTRASH;Leeg prullenbak FILEBROWSER_EMPTYTRASHHINT;Verwijder bestanden in prullenbak voorgoed -FILEBROWSER_EXEC_CPB;Start externe/eigen profielgenerator FILEBROWSER_EXTPROGMENU;Open met FILEBROWSER_FLATFIELD;Vlakveld FILEBROWSER_MOVETODARKFDIR;Verplaats naar map met donkerframes @@ -170,6 +184,7 @@ FILEBROWSER_RANK3_TOOLTIP;Waardering 3 *\nSneltoets: Shift-3 FILEBROWSER_RANK4_TOOLTIP;Waardering 4 *\nSneltoets: Shift-4 FILEBROWSER_RANK5_TOOLTIP;Waardering 5 *\nSneltoets: Shift-5 FILEBROWSER_RENAMEDLGLABEL;Hernoem bestand +FILEBROWSER_RESETDEFAULTPROFILE;Terugzetten naar standaardwaarde FILEBROWSER_SELECTDARKFRAME;Selecteer donkerframe... FILEBROWSER_SELECTFLATFIELD;Kies vlakveldopname... FILEBROWSER_SHOWCOLORLABEL1HINT;Toon foto's met label Rood\nSneltoets: Alt-1 @@ -211,6 +226,7 @@ FILECHOOSER_FILTER_SAME;Hetzelfe formaat als huidige foto FILECHOOSER_FILTER_TIFF;TIFF bestanden GENERAL_ABOUT;Over RawTherapee GENERAL_AFTER;Na +GENERAL_APPLY;Toepassen GENERAL_ASIMAGE;Als Afbeelding GENERAL_AUTO;Automatisch GENERAL_BEFORE;Voor @@ -226,6 +242,7 @@ GENERAL_NA;nvt. GENERAL_NO;Nee GENERAL_NONE;Geen GENERAL_OK;OK +GENERAL_OPEN;Open GENERAL_PORTRAIT;Portret GENERAL_SAVE;Opslaan GENERAL_UNCHANGED;(Onveranderd) @@ -240,7 +257,6 @@ HISTOGRAM_TOOLTIP_R;Toon/verberg rood histogram HISTOGRAM_TOOLTIP_RAW;Toon/verberg RAW-histogram HISTORY_CHANGED;Veranderd HISTORY_CUSTOMCURVE;Handmatig -HISTORY_DELSNAPSHOT;Wis HISTORY_FROMCLIPBOARD;Van klembord HISTORY_LABEL;Geschiedenis HISTORY_MSG_1;Foto geladen @@ -668,8 +684,8 @@ HISTORY_MSG_423;Retinex - Gamma helling HISTORY_MSG_424;Retinex - HL drempel HISTORY_MSG_425;Retinex - Log base HISTORY_MSG_426;Retinex - Tint balans -HISTORY_MSG_427;Uitvoer rendering weergave -HISTORY_MSG_428;Monitor rendering weergave +HISTORY_MSG_427;Uitvoer grafische weergave +HISTORY_MSG_428;Monitor grafische weergave HISTORY_MSG_429;Retinex - Herhalingen HISTORY_MSG_430;Retinex - Transmissie Verloop HISTORY_MSG_431;Retinex - Sterkte Verloop @@ -680,52 +696,71 @@ HISTORY_MSG_435;Retinex - M - Schaduwen TW HISTORY_MSG_436;Retinex - M - Straal HISTORY_MSG_437;Retinex - M - Methode HISTORY_MSG_438;Retinex - M - Mixer +HISTORY_MSG_439;Retinex - Verwerken HISTORY_MSG_440;DC - Methode +HISTORY_MSG_442;Retinex - Schaal +HISTORY_MSG_443;Uivoer Zwartpunt Compensatie +HISTORY_MSG_444;WB - Temp afwijking +HISTORY_MSG_445;Raw Sub-afbeelding +HISTORY_MSG_449;PV ISO toepassen +HISTORY_MSG_452;PV Toon beweging +HISTORY_MSG_453;PV Toon alleen masker +HISTORY_MSG_457;PV Controleer rood/blauw +HISTORY_MSG_462;PV Controleer groen +HISTORY_MSG_464;PV Vervagen bewagingsmasker +HISTORY_MSG_465;PV Vervagen straal +HISTORY_MSG_468;PV Vul holtes +HISTORY_MSG_469;PV Mediaann +HISTORY_MSG_471;PV Bewegingscorrectie +HISTORY_MSG_472;PV Zachte overgang +HISTORY_MSG_473;PV Gebruik lmmse +HISTORY_MSG_474;PV Balans HISTORY_NEWSNAPSHOT;Nieuw HISTORY_NEWSNAPSHOT_TOOLTIP;Sneltoets: Alt-s HISTORY_SNAPSHOT;Nieuw HISTORY_SNAPSHOTS;Snapshots -IPTCPANEL_AUTHOR;Auteur -IPTCPANEL_AUTHORSPOSITION;Positie van de maker -IPTCPANEL_AUTHORSPOSITIONHINT;Titel van de maker(s) van het object (By-line Title) -IPTCPANEL_CAPTION;Omschrijving -IPTCPANEL_CAPTIONHINT;Tekstuele omschrijving van de data (Omschrijving - abstract) -IPTCPANEL_CAPTIONWRITER;Maker van de omschrijving -IPTCPANEL_CAPTIONWRITERHINT;De naam van de persoon betrokken bij het schrijven, bewerken of corrigeren van de foto of omschrijving (Schrijver - Editor) IPTCPANEL_CATEGORY;Categorie -IPTCPANEL_CATEGORYHINT;Beschrijft het onderwerp van de foto volgens de mening van de maker (Categorie) +IPTCPANEL_CATEGORYHINT;Het onderwerp van de afbeelding. IPTCPANEL_CITY;Plaats -IPTCPANEL_CITYHINT;Plaats van de opname (Plaats) +IPTCPANEL_CITYHINT;Plaats waar de afbeelding is genomen. IPTCPANEL_COPYHINT;Kopieer IPTC-instellingen naar klembord -IPTCPANEL_COPYRIGHT;Copyright -IPTCPANEL_COPYRIGHTHINT;Eventuele vereiste copyright-meldingen (Copyright-melding) +IPTCPANEL_COPYRIGHT;Copyright melding +IPTCPANEL_COPYRIGHTHINT;Melding over de huidige copyright houder van de afbeelding, bijvoorbeeld ©2008 Jane Doe. IPTCPANEL_COUNTRY;Land -IPTCPANEL_COUNTRYHINT;De naam van het land/primaire locatie waar de foto werd genomen (Land - Primaire locatienaam) +IPTCPANEL_COUNTRYHINT;Land waar de afbeelding is genomen. +IPTCPANEL_CREATOR;Maker +IPTCPANEL_CREATORHINT;Naam van de maker. +IPTCPANEL_CREATORJOBTITLE;Functie van de maker. +IPTCPANEL_CREATORJOBTITLEHINT;De functie van de maker. IPTCPANEL_CREDIT;Credit IPTCPANEL_CREDITHINT;Naam van de leverancier van de foto, niet noodzakelijkerwijs de eigenaar/maker (Credit) IPTCPANEL_DATECREATED;Opnamedatum -IPTCPANEL_DATECREATEDHINT;Datum waarop de foto werd genomen; formaat: JJJJMMDD (Opnamedatum) +IPTCPANEL_DATECREATEDHINT;Datum waarop de afbeelding is genomen. +IPTCPANEL_DESCRIPTION;Beschrijving +IPTCPANEL_DESCRIPTIONHINT;Bijschrift dat het wie, wat of waarom beschrijft van wat er gebeurt in de afbeelding. Dit kan inclusief de namen van de persone zijn en of hun rol in de actie die plaatsvindt in de afbeelding. +IPTCPANEL_DESCRIPTIONWRITER;Schrijver van de beschrijving. +IPTCPANEL_DESCRIPTIONWRITERHINT;De naam van de persoon die is betrokken bij het schrijven, wijzigen of corrigeren van de beschrijving van de afbeelding. IPTCPANEL_EMBEDDED;Ingebed IPTCPANEL_EMBEDDEDHINT;Keer terug naar IPTC-data die in de foto zijn opgeslagen IPTCPANEL_HEADLINE;Titel -IPTCPANEL_HEADLINEHINT;Samenvatting van de inhoud van de foto (Titel) +IPTCPANEL_HEADLINEHINT;Een korte samenvatting van de inhoud van de afbeelding. IPTCPANEL_INSTRUCTIONS;Instructies -IPTCPANEL_INSTRUCTIONSHINT;Andere instructies mbt. beeldgebruik (Speciale Instructies) +IPTCPANEL_INSTRUCTIONSHINT;Infomatie over embargo of andere beperkingen die buiten het Copyright vallen. IPTCPANEL_KEYWORDS;Sleutelwoorden -IPTCPANEL_KEYWORDSHINT;Gebruikt om sleutelwoorden mee te geven tbv. zoekdoeleinden (Sleutelwoorden) +IPTCPANEL_KEYWORDSHINT;Gebruik steekwoorden of zinnen om het onderwerp van de afbeelding te beschrijven. IPTCPANEL_PASTEHINT;Plak IPTC-instellingen van klembord IPTCPANEL_PROVINCE;Provincie -IPTCPANEL_PROVINCEHINT;De provincie/staat/departement waar de foto werd genomen (Provincie-Staat) +IPTCPANEL_PROVINCEHINT;Provincie waar de afbeelding is genomen. IPTCPANEL_RESET;Standaardwaarden IPTCPANEL_RESETHINT;Terug naar standaardwaarden IPTCPANEL_SOURCE;Bron -IPTCPANEL_SOURCEHINT;De oorspronkelijke eigenaar van de foto (Bron) -IPTCPANEL_SUPPCATEGORIES;Extra categorieën -IPTCPANEL_SUPPCATEGORIESHINT;Verdere verfijning van het onderwerp van de foto (Extra categorieën) +IPTCPANEL_SOURCEHINT;De naam van de persoon of de partij die verantwoordelijk is voor de verspreiding van de afbeelding, zoals de persoon of partij van wie de afbeelding afkomstig is. +IPTCPANEL_SUPPCATEGORIES;Aanvullende categorieën. +IPTCPANEL_SUPPCATEGORIESHINT;Verfijnt het onderwerp van de afbeelding. IPTCPANEL_TITLE;Titel -IPTCPANEL_TITLEHINT;Een korte referentienaam voor de foto (Objectnaam) -IPTCPANEL_TRANSREFERENCE;Trans. Reference -IPTCPANEL_TRANSREFERENCEHINT;Een code die de locatie van de oorspronkelijke transmissie representeert (Original Transmission Reference) +IPTCPANEL_TITLEHINT;De korte naam van de afbeelding. Dit kan de bestandsnaam zijn. +IPTCPANEL_TRANSREFERENCE;Referentienummer +IPTCPANEL_TRANSREFERENCEHINT;Het nummer dat wordt gebruikt voor de 'workflow control' of voor de tracking. MAIN_BUTTON_FULLSCREEN;Volledig scherm MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigeer naar de volgende afbeelding relatief ten opzichte van de geopende afbeelding in de Editor\nSneltoets: Shift-F4\n\nNavigeer naar de volgende afbeelding relatief ten opzichte van de miniatuur geselecteerd in de Bestandsnavigator\nSneltoets: F4 MAIN_BUTTON_NAVPREV_TOOLTIP;Navigeer naar de vorige afbeelding relatief ten opzichte van de geopende afbeelding in de Editor\nSneltoets: Shift-F3 \n\nNavigeer naar de vorige afbeelding relatief ten opzichte van de miniatuur geselecteerd in de Bestandsnavigator\nSneltoets: F3 @@ -860,8 +895,7 @@ PARTIALPASTE_PREPROCESS_HOTPIXFILT;Hete pixels filter PARTIALPASTE_PREPROCESS_LINEDENOISE;Lijnruisfilter PARTIALPASTE_PRSHARPENING;Verscherp na verkleinen PARTIALPASTE_RAWCACORR_AUTO;Autom. C/A-correctie -PARTIALPASTE_RAWCACORR_CABLUE;C/A Blauw -PARTIALPASTE_RAWCACORR_CARED;C/A Rood +PARTIALPASTE_RAWCACORR_CAREDBLUE;CA rood & blauw PARTIALPASTE_RAWEXPOS_BLACK;Zwartniveau PARTIALPASTE_RAWEXPOS_LINEAR;Raw witpunt- lineaire corr. factor PARTIALPASTE_RAWEXPOS_PRESER;Raw witpunt- herstel hoge lichten (EV) @@ -870,7 +904,9 @@ PARTIALPASTE_RAW_DCBENHANCE;Pas DCB-verbetering toe PARTIALPASTE_RAW_DCBITERATIONS;aantal DCB-herhalingen PARTIALPASTE_RAW_DMETHOD;Demozaïekmethode PARTIALPASTE_RAW_FALSECOLOR;Demozaïek stapgrootte kleurfoutonderdrukking +PARTIALPASTE_RAW_IMAGENUM;Sub-afbeelding PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE verbetering +PARTIALPASTE_RAW_PIXELSHIFT;PixelVerschuiving PARTIALPASTE_RESIZE;Wijzig grootte PARTIALPASTE_RETINEX;Retinex PARTIALPASTE_RGBCURVES;RGB-curven @@ -913,6 +949,7 @@ PREFERENCES_CLIPPINGIND;Indicatie over-/onderbelichting PREFERENCES_CLUTSCACHE;HaldCLUT cache PREFERENCES_CLUTSCACHE_LABEL;Maximum aantal cached Cluts PREFERENCES_CLUTSDIR;HaldCLUT map +PREFERENCES_CMMBPC;Zwartpunt Compensatie PREFERENCES_CURVEBBOXPOS;Positie copy/paste knoppen bij Curves PREFERENCES_CURVEBBOXPOS_ABOVE;Boven PREFERENCES_CURVEBBOXPOS_BELOW;Beneden @@ -937,8 +974,6 @@ PREFERENCES_DATEFORMAT;Datumformaat PREFERENCES_DATEFORMATHINT;U kunt de volgende formaten gebruiken:\n%y : jaar\n%m : maand\n%d : dag\n\nHet Nederlandse datumformaat is bijvoorbeeld:\n%d/%m/%y PREFERENCES_DAUB_LABEL;Gebruik Daubechies D6 wavelets in plaats van D4 PREFERENCES_DAUB_TOOLTIP;De Ruisonderdrukking en Wavelet niveaus gebruiken de Debauchies moeder wavelet. Als je D6 gebruikt in plaats van D4 vergroot het aantal orthogonale Daubechies coëfficiënten en dit verbeterd waarschijnlijk de kwaliteit van de lage niveaus. -PREFERENCES_DEFAULTLANG;Standaardtaal -PREFERENCES_DEFAULTTHEME;Standaardthema PREFERENCES_DIRDARKFRAMES;Map met donkerframes PREFERENCES_DIRHOME;Standaardmap PREFERENCES_DIRLAST;Laatst bezochte map @@ -1008,7 +1043,9 @@ PREFERENCES_MENUOPTIONS;Menu-opties PREFERENCES_METADATA;Metadata PREFERENCES_MIN;Mini (100x115) PREFERENCES_MONINTENT;Standaard monitor weergave -PREFERENCES_MONPROFILE;Standaard monitor profiel +PREFERENCES_MONITOR;Monitor +PREFERENCES_MONPROFILE;Standaard kleurprofiel +PREFERENCES_MONPROFILE_WARNOSX;Als gevolg van MacOS beperkingen wordt alleen sRGB ondersteund. PREFERENCES_MULTITAB;Multi-tab: elke foto opent in nieuw tabvenster PREFERENCES_MULTITABDUALMON;Multi-tab, indien beschikbaar op tweede monitor PREFERENCES_NAVGUIDEBRUSH;Navigator randkleur @@ -1033,6 +1070,7 @@ PREFERENCES_PREVDEMO;Voorbeeld Demozaïekmethode PREFERENCES_PREVDEMO_FAST;Snel PREFERENCES_PREVDEMO_LABEL;Demozaïekmethode van het voorbeeld bij <100% zoom: PREFERENCES_PREVDEMO_SIDECAR;Gelijk aan PP3 +PREFERENCES_PRINTER;Printer (Proefafdruk) PREFERENCES_PROFILEHANDLING;Verwerking profielen PREFERENCES_PROFILELOADPR;Laadprioriteit profielen PREFERENCES_PROFILEPRCACHE;Profiel in cache @@ -1041,12 +1079,15 @@ PREFERENCES_PROFILESAVECACHE;Bewaar profiel in cache PREFERENCES_PROFILESAVEINPUT;Bewaar profiel bij RAW-bestand PREFERENCES_PROFILE_NONE;Geen PREFERENCES_PROPERTY;Eigenschap +PREFERENCES_PRTINTENT;Grafische weergave +PREFERENCES_PRTPROFILE;Kleurprofiel PREFERENCES_PSPATH;Installatiemap Adobe Photoshop PREFERENCES_REMEMBERZOOMPAN;Onthoud zoom % en pan startpunt PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Onthoud het zoom % en pan startpunt van de huidige afbeelding als er een nieuwe afbeelding wordt geopend.\n\nDeze optie werkt alleen in "Single Editor Tab Mode" en wanneer "Demozaïekmethode van het voorbeeld <100% zoom" hetzelfde is als "Gelijk aan PP3". PREFERENCES_RGBDTL_LABEL;Maximum aantal 'threads' voor Ruisonderdrukking en Wavelet (gedeeld door 2) PREFERENCES_RGBDTL_TOOLTIP;Ruisonderdrukking en Wavelet gebruiken ongeveer 128MB RAM voor een 10MPix afbeelding, of 512MB voor een 40MPix afbeelding en additioneel 128MB RAM per thread. Hoe meer threads parallel worden gebruikt, hoe sneller de bewerking. Laat de instelling op "0" staan om automatisch het maximale aantal threads te gebruiken dat mogelijk is. PREFERENCES_SELECTFONT;Kies lettertype +PREFERENCES_SELECTFONT_COLPICKER;Font van de Kleurkiezer PREFERENCES_SELECTLANG;Selecteer taal PREFERENCES_SELECTTHEME;Kies thema PREFERENCES_SERIALIZE_TIFF_READ;Tiff Lees Instellingen @@ -1061,7 +1102,6 @@ PREFERENCES_SHTHRESHOLD;Grenswaarde onderbelichting PREFERENCES_SIMPLAUT;Gereedschap PREFERENCES_SINGLETAB;Enkel-tab: foto's openen in zelfde tabvenster PREFERENCES_SINGLETABVERTAB;Enkel-tab ('filmstrip') modus met verticale tabs -PREFERENCES_SLIMUI;Slanke interface PREFERENCES_SMA;Klein (250x287) PREFERENCES_SND_BATCHQUEUEDONE;Verwerkingsrij klaar PREFERENCES_SND_HELP;Typ bestandsnaam (of niets: geen geluid).\nWindows: gebruik 'SystemDefault', 'SystemAsterisk', etc. voor systeemgeluiden.\nLinux: gebruik "complete", "window-attention" etc. voor systeemgeluiden @@ -1071,6 +1111,7 @@ PREFERENCES_STARTUPIMDIR;Standaardmap bij opstarten PREFERENCES_STDAUT;Standaard PREFERENCES_TAB_BROWSER;Bestandsnavigator PREFERENCES_TAB_COLORMGR;Kleurbeheer +PREFERENCES_TAB_DYNAMICPROFILE;Dynamisch Profielregel PREFERENCES_TAB_GENERAL;Algemeen PREFERENCES_TAB_IMPROC;Beeldverwerking PREFERENCES_TAB_PERFORMANCE;Prestaties en Kwaliteit @@ -1083,7 +1124,6 @@ PREFERENCES_TP_USEICONORTEXT;Gebruik iconen ipv. tekst voor de tabbladen PREFERENCES_TP_VSCROLLBAR;Verberg de schuifbalk van het gereedschapspaneel PREFERENCES_TUNNELMETADATA;Kopieer Exif/IPTC/XMP-data onveranderd naar uitvoerbestand PREFERENCES_USEBUNDLEDPROFILES;Gebruik gebundelde profielen -PREFERENCES_USESYSTEMTHEME; Gebruik systeemthema PREFERENCES_VIEW;Witbalans instelling van het uitvoerapparaat (monitor, TV, projector...) PREFERENCES_WAVLEV;Vergroot wavelet ninveau voor kwaliteit 'hoog' PREFERENCES_WLONE;Eén niveau @@ -1099,6 +1139,7 @@ PROFILEPANEL_MODE_TIP;Profiel aanvullen.\n\nKnop ingedrukt: gedeeltelijke profie PROFILEPANEL_MYPROFILES;Mijn profielen PROFILEPANEL_PASTEPPASTE;Te plakken parameters PROFILEPANEL_PCUSTOM;Handmatig +PROFILEPANEL_PDYNAMIC;Dynamisch PROFILEPANEL_PFILE;Uit bestand PROFILEPANEL_PINTERNAL;Neutraal PROFILEPANEL_PLASTSAVED;Laatst opgeslagen @@ -1143,6 +1184,8 @@ SAVEDLG_SUBSAMP_TOOLTIP;Beste Compressie:\nJ:a:b 4:2:0\nh/v 2/2\nChroma gehalvee SAVEDLG_TIFFUNCOMPRESSED;Geen compressie SAVEDLG_WARNFILENAME;Bestandsnaam wordt SHCSELECTOR_TOOLTIP;Klik op de rechtermuisknop om\nde 3 knoppen te verschuiven +SOFTPROOF_GAMUTCHECK_TOOLTIP;Toont in grijs de pixels die buiten het kleurengamma vallen van het uitvoerprofiel +SOFTPROOF_TOOLTIP;Proefafdruk\nSimuleert grafische weergave op basis van het ICM uitvoerprofiel. Voral bruikbaar voor het simuleren van afdrukken. THRESHOLDSELECTOR_B;Onderkant THRESHOLDSELECTOR_BL;Onderkant-links THRESHOLDSELECTOR_BR;Onderkant-rechts @@ -1150,6 +1193,7 @@ THRESHOLDSELECTOR_HINT;Houdt de Shift-toets ingedrukt om individuele cont THRESHOLDSELECTOR_T;Bovenkant THRESHOLDSELECTOR_TL;Bovenkant-links THRESHOLDSELECTOR_TR;Bovenkant-rechts +TOOLBAR_TOOLTIP_COLORPICKER;Vergrendelbare Kleurkiezer\n\nKlik met de linkermuisknop in het voorbeeld om een kleurkiezer toe te voegen\nBeweeg het punt door de linkermuisknop ingedrukt te houden\nVerwijder de kleurkiezer met een rechtermuisknop klik\nVerwijder allle kleurkiezers met Shift + rechtermuisknop klik\nMet een rechtermuisklik naast een kleurkiezer komt het selecteer handje terug. TOOLBAR_TOOLTIP_CROP;Bijsnijden.\nSneltoets: c TOOLBAR_TOOLTIP_HAND;Sleepgereedschap.\nSneltoets: h TOOLBAR_TOOLTIP_STRAIGHTEN;Rechtmaken / Kleine rotaties.\nSneltoets: s\n\nBepaal de vertikale of horizontale as door het trekken van een hulplijn over de afbeelding. De rotatiehoek wordt naast de hulplijn getoond. Het centrum van de roatatie is het geometrische midden van de afbeelding. @@ -1158,6 +1202,7 @@ TP_BWMIX_ALGO;Algoritme OYCPM TP_BWMIX_ALGO_LI;Lineair TP_BWMIX_ALGO_SP;Speciale effecten TP_BWMIX_ALGO_TOOLTIP;Lineair: creëert een normale lineaire response.\n Speciale effecten: creëert speciale effecten door kanalen non-lineair te mixen.TP_BWMIX_AUTOCH;Auto +TP_BWMIX_AUTOCH;Auto TP_BWMIX_AUTOCH_TIP;Bereken optimale waardes voor de kanaalmixer. TP_BWMIX_CC_ENABLED;Wijzig complementaire kleur TP_BWMIX_CC_TOOLTIP;Automatische aanpassing van complementaire kleuren in ROYGCBPM mode. @@ -1360,6 +1405,12 @@ TP_DARKFRAME_LABEL;Donkerframe TP_DEFRINGE_LABEL;Verzachten (Lab/CIECAM02) TP_DEFRINGE_RADIUS;Straal TP_DEFRINGE_THRESHOLD;Drempel +TP_DIRPYRDENOISE_3X3;3×3 +TP_DIRPYRDENOISE_3X3_SOFT;3×3 zacht +TP_DIRPYRDENOISE_5X5;5×5 +TP_DIRPYRDENOISE_5X5_SOFT;5×5 zacht +TP_DIRPYRDENOISE_7X7;7×7 +TP_DIRPYRDENOISE_9X9;9×9 TP_DIRPYRDENOISE_ABM;Alleen chroma TP_DIRPYRDENOISE_AUT;Automatisch algemeen TP_DIRPYRDENOISE_AUTO;Automatisch algemeen @@ -1399,11 +1450,13 @@ TP_DIRPYRDENOISE_METHOD11;Kwaliteit TP_DIRPYRDENOISE_METHOD11_TOOLTIP;De kwaliteit kan worden aangepast aan de hoeveelheid ruis. \nHoog verbetert de ruisonderdrukking, maar verlengt de verwerkingstijd TP_DIRPYRDENOISE_METHOD_TOOLTIP;Voor raw afbeeldingen kan RGB of Lab methode worden gebruikt.\n\nVoor niet-raw afbeeldingen zal altijd de Lab methode worden gebruikt, ongeacht de geselecteerde methode. TP_DIRPYRDENOISE_METM_TOOLTIP;De "Alleen Luminantie" en "L*a*b*" methodes worden meteen na de wavelet stap uitgevoerd bij het onderdrukken van ruis.\nDe "RGB" methode, wordt echter als laatste stap uitgevoerd bij ruisonderdrukking. +TP_DIRPYRDENOISE_MET_TOOLTIP;Gebruik een mediaan filter van gewenste venster grootte. Hoe groter het venster hoe langer het duurt.\n\n3×3 zacht: behandeld 5 pixels in een 3×3 pixel venster.\n3×3: behandeld 9 pixels in een 3×3 pixel venster.\n5×5 zacht: behandeld 13 pixels in een 5×5 pixel venster.\n5×5: behandeld 25 pixels in een 5×5 pixel venster.\n7×7: behandeld 49 pixels in een 7×7 pixel venster.\n9×9: behandeld 81 pixels in a 9×9 pixel venster.\n\nSoms is het mogelijk om een betere kwaliteit te krijgen door het uitvoeren van meerdere herhalingen met een kleiner venster dan één uitvoering met een groter venster. TP_DIRPYRDENOISE_NOISELABEL;Voorbeeld ruis: Gemiddeld=%1 Hoog=%2 TP_DIRPYRDENOISE_NOISELABELEMPTY;Voorbeeld ruis: Gemiddeld= - Hoog= - TP_DIRPYRDENOISE_NRESID_TOOLTIP;Toont de overgebleven ruisniveaus van het zichtbare deel van de afbeelding in het voorbeeld na wavelet.\n\n>300 Veel ruis\n100-300 Gemiddeld ruis\n50-100 Weinig ruis\n<50 Zeer weinig ruis\n\nVoorzichtig, de waarden zullen verschillen tussen RGB en L*a*b* mode. De RGB waarden zijn minder accuraat omdat de RGB mode luminantie en chrominantie niet volledig scheidt. TP_DIRPYRDENOISE_PASSE;Herhalingen TP_DIRPYRDENOISE_PASSES;Mediaan herhalingen +TP_DIRPYRDENOISE_PASSES_TOOLTIP;Het gebruik van drie mediaan filter herhalingen met een 3×3 venster grootte geeft meestal een beter resultaat dan het gebruik van één mediaan filter herhaling met eeen 7×7 venster grootte. TP_DIRPYRDENOISE_PON;Auto multi-zone TP_DIRPYRDENOISE_PRE;Voorbeeld multi-zone TP_DIRPYRDENOISE_PREV;Voorbeeld @@ -1431,8 +1484,7 @@ TP_DIRPYREQUALIZER_SKIN_TOOLTIP;Bij -100 huidtinten worden gewijzigd.\nBij 0 all TP_DIRPYREQUALIZER_THRESHOLD;Drempel TP_DIRPYREQUALIZER_TOOLTIP;Probeert artefacten te verminderen die het gevolg zijn van kleurverschuiving van de huidtinten(hue, chroma, luma) en de rest van de afbeelding TP_DISTORTION_AMOUNT;Hoeveelheid -TP_DISTORTION_AUTO; Automatische correctie lensvervorming -TP_DISTORTION_AUTO_TIP;(Experimenteel) Automatische correctie lensvervorming voor sommige camera's (M4/3, enkele compacts, etc.) +TP_DISTORTION_AUTO_TIP;Corrigeert automatisch lens afwijkingen in raw afbeeldingen op basis van de ingebedde JPEG indien deze is gecorrigeerd door de camera. TP_DISTORTION_LABEL;Corrigeer lensvervorming TP_EPD_EDGESTOPPING;Randen TP_EPD_GAMMA;Gamma @@ -1519,6 +1571,7 @@ TP_ICM_APPLYLOOKTABLE;DCP 'look' tabel TP_ICM_APPLYLOOKTABLE_TOOLTIP;Gebruik de ingebedde DCP 'look' tabel. De instelling is allen actief als de DCP een looktable heeft. TP_ICM_BLENDCMSMATRIX;Meng hoge lichten met matrix TP_ICM_BLENDCMSMATRIX_TOOLTIP;Activeer om uitgebeten hoge lichten te herstellen wanneer op LUT gebaseerde ICC-profielen worden gebruikt. +TP_ICM_BPC;Zwartpunt Compensatie TP_ICM_DCPILLUMINANT;Illuminant TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpoleren TP_ICM_DCPILLUMINANT_TOOLTIP;Kies welk ingebed DCP illuminant moet worden gebruikt. Standaard is dit "interpoleren". Dit is een mix van de twee gebaseerd op de witbalans. De instelling is alleen actief als een Dual-Illuminant DCP met interpolatie is geselecteerd. @@ -1537,8 +1590,8 @@ TP_ICM_INPUTPROFILE;Invoerprofiel TP_ICM_LABEL;Kleurbeheer TP_ICM_NOICM;Geen ICM: sRGB-uitvoer TP_ICM_OUTPUTPROFILE;Uitvoerprofiel -TP_ICM_PROFILEINTENT;Rendering weergave -TP_ICM_SAVEREFERENCE;Bewaar referentiefoto tbv. profiling +TP_ICM_PROFILEINTENT;Grafische weergave +TP_ICM_SAVEREFERENCE;Bewaar Referentie Afbeelding TP_ICM_SAVEREFERENCE_APPLYWB;Toepassen witbalans TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Gebruik witbalans bij het opslaan van afbeeldingen voor het maken van ICC profielen. Gebruik geen witbalans bij het maken van DCP profielen. TP_ICM_SAVEREFERENCE_TOOLTIP;Sla de lineaire TIFF afbeelding op voordat het invoer profiel is toegepast. Het resultaat kan worden gebruikt voor calibratie en het genereren van een camera profiel. @@ -1631,21 +1684,79 @@ TP_RAWEXPOS_LINEAR;Witpunt Correctie TP_RAWEXPOS_PRESER;Herstel hoge lichten TP_RAWEXPOS_RGB;Rood, Groen, Blauw TP_RAWEXPOS_TWOGREEN;Koppel Groen 1 en 2 +TP_RAW_1PASSMEDIUM;1 keer (Gemiddeld) +TP_RAW_3PASSBEST;3 keer (Beste) +TP_RAW_AHD;AHD +TP_RAW_AMAZE;AMaZE +TP_RAW_DCB;DCB TP_RAW_DCBENHANCE;DCB Verbetering TP_RAW_DCBITERATIONS;Aantal DCB-herhalingen TP_RAW_DMETHOD;Methode TP_RAW_DMETHOD_PROGRESSBAR;%1 Demozaïeken... TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demozaïek verfijning... TP_RAW_DMETHOD_TOOLTIP;IGV en LMMSE zijn speciaal bedoeld voor hoge ISO afbeeldingen +TP_RAW_EAHD;EAHD TP_RAW_FALSECOLOR;Stapgrootte kleurfoutonderdrukking +TP_RAW_FAST;Snel TP_RAW_HD;Drempel TP_RAW_HD_TOOLTIP;Lagere waarden maken Hete/Dode pixel detectie agressiever, maar valse positieven kunnen leiden tot meer artefacten. Als er artefacten verschijnen bij het gebruik van de Hete/Dode Pixel Filters verminder dan geleidelijk de drempelwaarde totdat ze verdwijnen. +TP_RAW_HPHD;HPHD +TP_RAW_IGV;IGV +TP_RAW_IMAGENUM;Sub-afbeelding TP_RAW_LABEL;Demozaïekproces +TP_RAW_LMMSE;LMMSE TP_RAW_LMMSEITERATIONS;LMMSE Verbetering Stappen TP_RAW_LMMSE_TOOLTIP;Toevoegen gamma (stap 1), mediaan (stappen 2-4), en verfijnen (stappen 5-6) om artefacten te verwijderen en de signaal/ruis ratio te verbeteren. +TP_RAW_MONO;Mono +TP_RAW_NONE;Geen (Toont sensor patroon) +TP_RAW_PIXELSHIFT;Pixel Verschuiven +TP_RAW_PIXELSHIFTADAPTIVE;Adaptieve detectie +TP_RAW_PIXELSHIFTBLUR;Vervaag bewegingsmasker +TP_RAW_PIXELSHIFTEPERISO;ISO toepassing +TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;De standaard waarde (0.0) werkt goed voor normale ISO.\nVergroot de waarde om de bewegingsdetectie te verbeteren voor hogere ISO.\nVergroot in kleine stappen en bekijk het bewegingsmasker tijdens het verhogen. +TP_RAW_PIXELSHIFTEQUALBRIGHT;Balanseer de helderheid van de frames +TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Balanseer de helderheid van de frames t.o.v. de helderheid van het geslecteerde frame.\nAls er overbelichte gebieden zijn in de frames, selecteer dan het helderste frame om een magenta kleurzweem te vermijden of selecteer bewegingsorrectie. +TP_RAW_PIXELSHIFTEXP0;Experimenteel +TP_RAW_PIXELSHIFTGREEN;Controleer groene kanaal voor beweging +TP_RAW_PIXELSHIFTHOLEFILL;Vul holtes in verschuivingsmasker +TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Vul holtes in het verschuivingsmasker op +TP_RAW_PIXELSHIFTLMMSE;Gebruik lmmse voor verschoven gebieden +TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Gebruik lmmse ipv amaze voor verschoven gebieden.\nNuttig voor hoge ISO afbeeeldingen. +TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 nieuwe drempel +TP_RAW_PIXELSHIFTMEDIAN;Mediaan +TP_RAW_PIXELSHIFTMEDIAN3;Sluit geselecteerde frame uit voor mediaan +TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Sluit geselecteerde frame uit voor mediaan.\nNuttig als bewegende objecten een overlap hebben in frame 2 en 3 +TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Gebruik mediaan voor alle frames inplaats van alleen het geselecteerd frame voor gebieden met beweging.\nVerwijder objecten die voorkomen op verschillende plekken in alle frames.\nGeeft bewegingseffect voor langzaam bewegende (overlappende) objecten. +TP_RAW_PIXELSHIFTMM_AUTO;Automatisch +TP_RAW_PIXELSHIFTMM_CUSTOM;Eigen +TP_RAW_PIXELSHIFTMM_OFF;Uit +TP_RAW_PIXELSHIFTMOTION;Beweging detectie niveau (vervallen) +TP_RAW_PIXELSHIFTMOTIONCORRECTION;Groen bewegingscorrectie grootte +TP_RAW_PIXELSHIFTMOTIONMETHOD;Beweging Correctie +TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0: geen bewegingsdetectie\n1 - 99: beweging wordt bepaald op basis van deze waarde. Vergroot de waarde om de bewegingsdetectie te verhogen\n100: Amaze demozaïek wordt gebruikt +TP_RAW_PIXELSHIFTNONGREENAMAZE;Controleer rood/blauw amaze +TP_RAW_PIXELSHIFTNONGREENCROSS;Controleer rood/blauw kanaal voor beweging +TP_RAW_PIXELSHIFTNONGREENCROSS2;Controleer groen amaze +TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Controleer rood/blauw horizontaal +TP_RAW_PIXELSHIFTNONGREENVERTICAL;Controleer rood/blauw vertikaal +TP_RAW_PIXELSHIFTNREADISO;nLezen +TP_RAW_PIXELSHIFTPRNU;PRNU (%) +TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Rood&Blauw gewicht +TP_RAW_PIXELSHIFTSHOWMOTION;Toon beweging +TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Toon alleen masker +TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Toont het bewegingsmasker zonder de afbeelding +TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Maakt een doorzichtig masker dat de gebieden toont met beweging +TP_RAW_PIXELSHIFTSIGMA;Vervagen straal +TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;De standaard straal van 1.0 is goed voor normale ISO. Verhoog de waarde voor hogere ISO.\n5.0 is een goed startpunt voor hoge ISO afbeeldingen.\nControleer het bewegingsmasker bij het veranderen van de waarde. +TP_RAW_PIXELSHIFTSMOOTH;Zachte overgang +TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Zachte overgang tussen gebieden met en zonder beweging.\nKies 0 om Zachte overgang uit te zetten\nKies 1 voor Amaze/lmmse of Mediaan +TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blauw +TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Groen +TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Rood TP_RAW_SENSOR_BAYER_LABEL;Sensor met Bayer matrix TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass geeft het beste resultaat (aanbevolen voor lage ISO afbeeldingen)\n1-pass geeft hetzelfde resultaat als 3-pass voor hoge ISO afbeeldingen en is sneller. TP_RAW_SENSOR_XTRANS_LABEL;Sensor met X-Trans matrix +TP_RAW_VNG4;VNG4 TP_RESIZE_APPLIESTO;Toepassen op: TP_RESIZE_CROPPEDAREA;Uitsnede TP_RESIZE_FITBOX;Breedte en hoogte @@ -1716,6 +1827,7 @@ TP_RETINEX_OFFSET;Beginpunt TP_RETINEX_SCALES;Gaussiaans verloop TP_RETINEX_SCALES_TOOLTIP;Indien schuifbalk=0: alle herhalingen zijn gelijk.\nIndien > 0 Schaal en straal worden verkleind als herhaling toeneemt, en omgekeerd. TP_RETINEX_SETTINGS;Instellingen +TP_RETINEX_SKAL;Schaal TP_RETINEX_SLOPE;Vrij gamma helling TP_RETINEX_STRENGTH;Sterkte TP_RETINEX_THRESHOLD;Drempel @@ -1773,7 +1885,6 @@ TP_SHARPENING_RLD_AMOUNT;Hoeveelheid TP_SHARPENING_RLD_DAMPING;Demping TP_SHARPENING_RLD_ITERATIONS;Herhaling TP_SHARPENING_THRESHOLD;Drempel -TP_SHARPENING_TOOLTIP;Hou rekening met een enigszins ander effect in combinatie met CIECAM02. Aanpassen naar eigen smaak. TP_SHARPENING_USM;Onscherpmasker TP_SHARPENMICRO_AMOUNT;Hoeveelheid TP_SHARPENMICRO_LABEL;Microcontrast (Lab/CIECAM02) @@ -2009,6 +2120,8 @@ TP_WBALANCE_SOLUX41;Solux 4100K TP_WBALANCE_SOLUX47;Solux 4700K (leverancier) TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) TP_WBALANCE_SPOTWB;Wijs WB aan +TP_WBALANCE_TEMPBIAS;AWB temperatuur afwijking +TP_WBALANCE_TEMPBIAS_TOOLTIP;Wijzigt de berekening van "auto wit balans"\ndoor een afwijking naar warmere of koelere temperatuur \nDe afwijking wordt uitgedrukt als percentage van de berekende temperatuur,\nszodat het resultaat is "computedTemp + computedTemp * afwijking". TP_WBALANCE_TEMPERATURE;Kleurtemperatuur TP_WBALANCE_TUNGSTEN;Tungsten (wolfraam) TP_WBALANCE_WATER1;Onderwater 1 @@ -2026,30 +2139,37 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! -!GENERAL_APPLY;Apply -!GENERAL_OPEN;Open -!HISTORY_MSG_439;Retinex - Process +!DONT_SHOW_AGAIN;Don't show this message again. +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_441;Retinex - Gain transmission -!HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font -!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. -!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. -!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool -!TP_BWMIX_AUTOCH;Auto -!TP_DIRPYRDENOISE_3X3;3×3 -!TP_DIRPYRDENOISE_3X3_SOFT;3×3 soft -!TP_DIRPYRDENOISE_5X5;5×5 -!TP_DIRPYRDENOISE_5X5_SOFT;5×5 soft -!TP_DIRPYRDENOISE_7X7;7×7 -!TP_DIRPYRDENOISE_9X9;9×9 -!TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. -!TP_DIRPYRDENOISE_PASSES_TOOLTIP;Applying three median filter iterations with a 3×3 window size often leads to better results than using one median filter iteration with a 7×7 window size. -!TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location +!PREFERENCES_THEME;Theme +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. !TP_RETINEX_GAINOFFS;Gain and Offset (brightness) !TP_RETINEX_GAINTRANSMISSION;Gain transmission !TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. -!TP_RETINEX_SKAL;Scale !TP_WAVELET_CB_TOOLTIP;For strong values product color-toning by combining it or not with levels decomposition 'toning'\nFor low values you can change the white balance of the background (sky, ...) without changing that of the front plane, generally more contrasted diff --git a/rtdata/languages/Norsk BM b/rtdata/languages/Norsk BM index 6b2901927..a29bb08b6 100644 --- a/rtdata/languages/Norsk BM +++ b/rtdata/languages/Norsk BM @@ -83,7 +83,6 @@ HISTOGRAM_TOOLTIP_L;Vis/skjul CIELAB Luminans histogram HISTOGRAM_TOOLTIP_R;Vis/skjul rødt histogram HISTORY_CHANGED;Forandret HISTORY_CUSTOMCURVE;Egen kurve -HISTORY_DELSNAPSHOT;Fjern b.m HISTORY_FROMCLIPBOARD;Fra utklippstavlen HISTORY_LABEL;Historikk HISTORY_MSG_1;Foto åpnet @@ -170,47 +169,23 @@ HISTORY_MSG_81;Resize enabled HISTORY_NEWSNAPSHOT;Nytt b.m HISTORY_SNAPSHOT;Bokmerke HISTORY_SNAPSHOTS;Bokmerker -IPTCPANEL_AUTHOR;Oppretter -IPTCPANEL_AUTHORSPOSITION;Oppretterens tittel -IPTCPANEL_AUTHORSPOSITIONHINT;Beskrivelse av oppretterens tittel (By-line Title). -IPTCPANEL_CAPTION;Billdetekst -IPTCPANEL_CAPTIONHINT;Tekstbeskrivelse av bildets innhold (Caption - Abstract). -IPTCPANEL_CAPTIONWRITER;Bildetekst forfatter -IPTCPANEL_CAPTIONWRITERHINT;Navnet på personen som har opprettet, redigert eller korrigeret bildeteksten (Writer - Editor). IPTCPANEL_CATEGORY;Kategori -IPTCPANEL_CATEGORYHINT;Brukes til å beskrive innholdet i bildet ifølge kategorien (Category). IPTCPANEL_CITY;By -IPTCPANEL_CITYHINT;Bildets opprinnelsesby (City). IPTCPANEL_COPYHINT;Kopier IPTC innstillinger til utklippstavlen -IPTCPANEL_COPYRIGHT;Copyright -IPTCPANEL_COPYRIGHTHINT;Eventuelle copyright tilføyelser (Copyright Notice). IPTCPANEL_COUNTRY;Land -IPTCPANEL_COUNTRYHINT;Navnet på landet/primære område hvor bildet er tatt (Country - Primary Location Name). IPTCPANEL_CREDIT;Kreditering IPTCPANEL_CREDITHINT;Identifisere oppretteren av bildet, ikke nødvendivis den samme som eieren (Credit). IPTCPANEL_DATECREATED;Opptakelsesdato -IPTCPANEL_DATECREATEDHINT;Datoen bildet ble tatt; Format: JJJJMMTT (Date Created). IPTCPANEL_EMBEDDED;Intern IPTC data IPTCPANEL_EMBEDDEDHINT;Nullstil til de IPTC data som finnes internt i bildefilen IPTCPANEL_HEADLINE;Overskrift -IPTCPANEL_HEADLINEHINT;En kort beskrivelse av innholdet av bildet (Headline). IPTCPANEL_INSTRUCTIONS;Instruksjoner -IPTCPANEL_INSTRUCTIONSHINT;Andre instuksjoner som omhandler bruken av bildet (Special Instructions). IPTCPANEL_KEYWORDS;Nøkkelord -IPTCPANEL_KEYWORDSHINT;Brukes til å beskrive spesifikke nøkkelord (Keywords). IPTCPANEL_PASTEHINT;Innsett IPTC innstillinger fra utklipstavlen -IPTCPANEL_PROVINCE;Provins -IPTCPANEL_PROVINCEHINT;Billedets opprinnelsesprovins/-stat (Province-State). IPTCPANEL_RESET;Nullstil IPTCPANEL_RESETHINT;Nullstil til standard profil IPTCPANEL_SOURCE;Kilde -IPTCPANEL_SOURCEHINT;Den originale eier af bildets innhold (Source). -IPTCPANEL_SUPPCATEGORIES;Suppl. kategorier -IPTCPANEL_SUPPCATEGORIESHINT;Ytterlige beskrivelser av innholdet i bildet (Supplemental Categories). IPTCPANEL_TITLE;Bildetittel -IPTCPANEL_TITLEHINT;En kort beskrivelse av bildet (Object Name). -IPTCPANEL_TRANSREFERENCE;Trans. Reference -IPTCPANEL_TRANSREFERENCEHINT;En kode som representerer stedet for original transmisjon (Original Transmission Reference). MAIN_BUTTON_PREFERENCES;Innstillinger MAIN_BUTTON_SAVE;Lagre bilde MAIN_BUTTON_SENDTOEDITOR;Send til editor @@ -269,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maksimal Thumbnail Høyde PREFERENCES_CLIPPINGIND;Markerings-indikasjon PREFERENCES_DATEFORMAT;Datoformat PREFERENCES_DATEFORMATHINT;Du kan bruke følgende formattering:\n%y : år\n%m : måned\n%d : dag\n\nF. eks. er ungarsk datoformat:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Programspråk -PREFERENCES_DEFAULTTHEME;Standard tema PREFERENCES_DIRHOME;Hjemmemappe PREFERENCES_DIRLAST;Sidste besøkte mappe PREFERENCES_DIROTHER;Annen @@ -396,7 +369,6 @@ TP_ICM_INPUTPROFILE;Inngangprofil TP_ICM_LABEL;ICM TP_ICM_NOICM;Ingen ICM: sRGB-profil TP_ICM_OUTPUTPROFILE;Utgangsprofil -TP_ICM_SAVEREFERENCE;Lagre referansebilde til profil TP_ICM_WORKINGPROFILE;Arbeidsprofil TP_RAW_DMETHOD;Metode TP_RAW_FALSECOLOR;Falsk fargefortrengningsverdi @@ -474,12 +446,23 @@ TP_WBALANCE_TEMPERATURE;Temperatur !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. !EXIFFILTER_EXPOSURECOMPENSATION;Exposure compensation (EV) !EXIFFILTER_FILETYPE;File type !EXIFFILTER_METADATAFILTER;Enable metadata filters +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -502,8 +485,12 @@ TP_WBALANCE_TEMPERATURE;Temperatur !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -519,7 +506,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !FILEBROWSER_CURRENT_NAME;Current name: !FILEBROWSER_DARKFRAME;Dark-frame !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -554,6 +540,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -589,6 +576,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -870,7 +858,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -922,12 +910,12 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -940,8 +928,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -953,8 +941,58 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -974,6 +1012,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d @@ -1048,8 +1087,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -1058,7 +1096,9 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves !PARTIALPASTE_SHARPENEDGE;Edges @@ -1087,7 +1127,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1099,7 +1140,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1112,7 +1154,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_EDITORLAYOUT;Editor Layout !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field !PREFERENCES_FLATFIELDFOUND;Found @@ -1128,7 +1170,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1143,6 +1186,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1158,9 +1202,10 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1176,13 +1221,18 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROPERTY;Property +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files @@ -1193,15 +1243,16 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. !PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done !PREFERENCES_SND_TRESHOLDSECS;After seconds !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1210,7 +1261,6 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -!PREFERENCES_USESYSTEMTHEME;Use system theme !PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) !PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' !PREFERENCES_WLONE;One level @@ -1223,6 +1273,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save !PROGRESSBAR_LOADINGTHUMBS;Loading thumbnails... @@ -1315,11 +1366,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1339,8 +1390,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1351,6 +1402,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1362,9 +1414,11 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1383,10 +1437,14 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1512,8 +1570,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_THRESHOLD;Threshold !TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma !TP_EPD_LABEL;Tone Mapping @@ -1577,18 +1634,17 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1597,11 +1653,12 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_ICM_INPUTNONE;No profile !TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift @@ -1688,19 +1745,80 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2023,6 +2141,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_WBALANCE_SOLUX41;Solux 4100K !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) +!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_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index 0b3bbe5f0..d683a1ac5 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -108,7 +108,6 @@ FILEBROWSER_DELETEDLGMSG;Na pewno usunąć zaznaczone %1 plików? FILEBROWSER_DELETEDLGMSGINCLPROC;Na pewno usunąć wybrany plik %1 WŁĄCZNIE z wersją utworzoną przez kolejkę przetwarzania? FILEBROWSER_EMPTYTRASH;Wyczyść kosz FILEBROWSER_EMPTYTRASHHINT;Definitywnie usuwa pliki z kosza -FILEBROWSER_EXEC_CPB;Uruchom zewnętrzny kreator profilów FILEBROWSER_EXTPROGMENU;Otwórz za pomocą FILEBROWSER_FLATFIELD;Puste pole FILEBROWSER_MOVETODARKFDIR;Przenieś do katalogu zawierającego czarne klatki @@ -218,7 +217,6 @@ HISTOGRAM_TOOLTIP_R;Pokaż/Ukryj histogram czerwieni. HISTOGRAM_TOOLTIP_RAW;Pokaż/Ukryj histogram raw. HISTORY_CHANGED;Zmieniono HISTORY_CUSTOMCURVE;Krzywa własna -HISTORY_DELSNAPSHOT;Usuń migawkę HISTORY_FROMCLIPBOARD;Ze schowka HISTORY_LABEL;Historia HISTORY_MSG_1;Zdjęcie załadowane @@ -521,47 +519,23 @@ HISTORY_NEWSNAPSHOT;Nowa migawka HISTORY_NEWSNAPSHOT_TOOLTIP;Skrót: Alt-s HISTORY_SNAPSHOT;Migawka HISTORY_SNAPSHOTS;Migawki -IPTCPANEL_AUTHOR;Autor -IPTCPANEL_AUTHORSPOSITION;Stanowisko -IPTCPANEL_AUTHORSPOSITIONHINT;Stanowisko lub funkcja autora lub autorów dzieła (By-line Title). -IPTCPANEL_CAPTION;Tytuł -IPTCPANEL_CAPTIONHINT;Tekstowy opis treści (Caption - Abstract). -IPTCPANEL_CAPTIONWRITER;Autor opisu -IPTCPANEL_CAPTIONWRITERHINT;Imię i nazwisko osoby biorące udział w opracowywaniu, edytowanie lub korygowania obrazu lub opisu (Writer - Editor). IPTCPANEL_CATEGORY;Kategoria -IPTCPANEL_CATEGORYHINT;Identyfikuje temat zdjęcia w opinii jego dostawcy (Category). IPTCPANEL_CITY;Miasto -IPTCPANEL_CITYHINT;Miasto w którym wykonano zdjęcie (City). IPTCPANEL_COPYHINT;Kopiuje ustawienia IPTC do schowka -IPTCPANEL_COPYRIGHT;Prawa autorskie -IPTCPANEL_COPYRIGHTHINT;Ważne uwagi o prawach autorskich (Copyright Notice). IPTCPANEL_COUNTRY;Kraj -IPTCPANEL_COUNTRYHINT;Nazwa kraju lub lokalizacji, gdzie zostało wykonane zdjęcie (Country - Primary Location Name). IPTCPANEL_CREDIT;Zasługa IPTCPANEL_CREDITHINT;Identyfikuje dostawcę zdjęcia, niekoniecznie właściciela lub autora (Credit). IPTCPANEL_DATECREATED;Data utworzenia -IPTCPANEL_DATECREATEDHINT;Data powstania intelektualnej treści zdjęcia. Format: JJJJMMTT (Date Created). IPTCPANEL_EMBEDDED;Osadzony IPTCPANEL_EMBEDDEDHINT;Resetuje dane IPTC do domyślnych ustawień osadzonych w orginalnym zdjęciu IPTCPANEL_HEADLINE;Nagłówek -IPTCPANEL_HEADLINEHINT;Gotowy do opublikowania wpis streszczający zawratość zdjęcia (Headline). IPTCPANEL_INSTRUCTIONS;Instrukcje -IPTCPANEL_INSTRUCTIONSHINT;Inne wskazówki redakcyjne dotyczące korzystania z obrazu (Special Instructions). IPTCPANEL_KEYWORDS;Słowa kluczowe -IPTCPANEL_KEYWORDSHINT;Wskazuje konkretne treści możliwe do odszukania (Keywords). IPTCPANEL_PASTEHINT;Wstawia ustawienia IPTC ze schowka -IPTCPANEL_PROVINCE;Stan, województwo, dystrykt itd. -IPTCPANEL_PROVINCEHINT;Województwo, gmina, stan gdzie zostało wykonane zdjęcie (Province-State). IPTCPANEL_RESET;Reset IPTCPANEL_RESETHINT;Resetuje do domyślnych ustawień profilu IPTCPANEL_SOURCE;Źródło -IPTCPANEL_SOURCEHINT;Pierwotny właściciel treści intelektualnych zdjęcia (Source). -IPTCPANEL_SUPPCATEGORIES;Dodatkowe kategorie tematyczne -IPTCPANEL_SUPPCATEGORIESHINT;Doprecyzowuje kategorie tematyczne zdjęcia (Supplemental Categories). IPTCPANEL_TITLE;Tytuł -IPTCPANEL_TITLEHINT;Skrócony temat odniesienia zdjęcia (Object Name). -IPTCPANEL_TRANSREFERENCE;Kod ident. zlecenie -IPTCPANEL_TRANSREFERENCEHINT;Numer badź kod identyfikujący zlecenie utworzony zazwyczaj przez fotografa przy transmisji umożliwiający śledzenie obrazu w obiegu. MAIN_BUTTON_FULLSCREEN;Pełen ekran MAIN_BUTTON_NAVNEXT_TOOLTIP;Przejdź do następnego zdjęcia względem zdjęcia otwartego w Edytorze.\nSkrót: Shift-F4\n\nAby przejść do następnego zdjęcia względem miniaturki wybranej w Nawigatorze Zdjęć:\nSkrót: F4 MAIN_BUTTON_NAVPREV_TOOLTIP;Przejdź do poprzedniego zdjęcia wzgledem zdjęcia otwartego w Edytorze.\nSkrót: Shift-F3 \n\nAby przejść do poprzedniego zdjęcia względem miniaturki wybranej w Nawigatorze Zdjęć:\nSkrót: F3 @@ -689,8 +663,6 @@ PARTIALPASTE_PREPROCESS_GREENEQUIL;Wyrównanie zieleni PARTIALPASTE_PREPROCESS_HOTPIXFILT;Filtr gorących pikseli PARTIALPASTE_PREPROCESS_LINEDENOISE;Redukcja szumów liniowych PARTIALPASTE_RAWCACORR_AUTO;Autokorekcja aberracji chr. -PARTIALPASTE_RAWCACORR_CABLUE;AbChr niebieski -PARTIALPASTE_RAWCACORR_CARED;AbChr czerwony PARTIALPASTE_RAWEXPOS_BLACK;Poziomy czerni PARTIALPASTE_RAWEXPOS_LINEAR;Korekcja punktu bieli PARTIALPASTE_RAWEXPOS_PRESER;Zachowanie prześwietleń @@ -748,8 +720,6 @@ PREFERENCES_DARKFRAMESHOTS;zdjęć(ia) PREFERENCES_DARKFRAMETEMPLATES;szablonów(ny) PREFERENCES_DATEFORMAT;Format daty PREFERENCES_DATEFORMATHINT;Dozwolone są następujące kody formatujące:\n%y - rok\n%m - miesiąc\n%d - dzień\n\nNa przykład według standardu ISO 8601 format daty wygląda następująco:\n%y-%m-%d -PREFERENCES_DEFAULTLANG;Domyślny język -PREFERENCES_DEFAULTTHEME;Domyślny temat PREFERENCES_DIRDARKFRAMES;Katalog z czarnymi klatkami PREFERENCES_DIRHOME;Katalog domowy PREFERENCES_DIRLAST;Ostatnio odwiedzony katalog @@ -836,7 +806,6 @@ PREFERENCES_SHOWEXPOSURECOMPENSATION;Pokaż korektę ekspozycji PREFERENCES_SHTHRESHOLD;Próg dla niedoświetleń PREFERENCES_SINGLETAB;Tryb pojedynczej zakładki PREFERENCES_SINGLETABVERTAB;Tryb pojedynczej zakładki, pionowy układ -PREFERENCES_SLIMUI;Wąskie suwaki PREFERENCES_SND_BATCHQUEUEDONE;Zakończono przetwarzanie wsadowe PREFERENCES_SND_HELP;Należy wprowadzić ścieżkę do pliku, bądź pozostawić niewypełnione (brak dźwięków).\nW systemie Windows można stosować "SystemDefault", "SystemAsterisk" itp. dla dźwięków systemowych.\nW systemie Linux można stosować "complete", "window-attention" etc. dla dzwięków systemowych. PREFERENCES_SND_LNGEDITPROCDONE;Praca edytora wykonana @@ -852,7 +821,6 @@ PREFERENCES_TP_LABEL;Panel narzędzi: PREFERENCES_TP_USEICONORTEXT;Uzyj ikon w zakładkach zamiast tekstowych etykiet PREFERENCES_TP_VSCROLLBAR;Ukry pionowy pasek przesuwania PREFERENCES_USEBUNDLEDPROFILES;Użyj załączone profile przetwarzania -PREFERENCES_USESYSTEMTHEME; Użyj tematu systemowego PREFERENCES_VIEW;Balans bieli urządzenia wyjściowego (monitora, TV, projektora, widowni, etc.) PREFERENCES_WORKFLOW;Tok pracy PROFILEPANEL_COPYPPASTE;Parametry do skopiowania @@ -1159,8 +1127,6 @@ TP_DIRPYREQUALIZER_SKIN_TOOLTIP;Przy -100 oddziaływanie efektu odbywa się wył TP_DIRPYREQUALIZER_THRESHOLD;Próg TP_DIRPYREQUALIZER_TOOLTIP;Zapobiega artefaktom w strefach przejścia pomiędzy odcieniom skóry (hue, chrominancja, luminancja) a pozostałym odcieniom. TP_DISTORTION_AMOUNT;Siła -TP_DISTORTION_AUTO;Automatyczna korekcja dystorsji -TP_DISTORTION_AUTO_TIP;(Eksperymentalne) Automatyczna korekcja dystorsji obiektywu dla niektórych aparatów (M4/3, kompakty DC, itp.) TP_DISTORTION_LABEL;Dystorsja TP_EPD_EDGESTOPPING;Wyszukiwanie krawędzi TP_EPD_LABEL;Tone Mapping @@ -1255,7 +1221,6 @@ TP_ICM_INPUTPROFILE;Profil wejściowy TP_ICM_LABEL;ICM TP_ICM_NOICM;Brak ICM: Wyjście sRGB TP_ICM_OUTPUTPROFILE;Profil wyjściowy -TP_ICM_SAVEREFERENCE;Zapisz obraz wzorcowy dla profilowania TP_ICM_SAVEREFERENCE_TOOLTIP;Zapisz liniowy obraz TIFF zanim profil wejściowy zostanie zastosowany. Obraz ten można użyć do kalibracji oraz do wytworzenia profilu aparatu. TP_ICM_TONECURVE;Użyj krzywą tonalną z DCP TP_ICM_TONECURVE_TOOLTIP;Włącz aby użyć krzywą tonalną znajdującą się w profilu DCP. Opcja ta jest tylko aktywna jeśli profil DCP zawiera krzywą tonalną. @@ -1406,7 +1371,6 @@ TP_SHARPENING_RLD_AMOUNT;Siła TP_SHARPENING_RLD_DAMPING;Tłumienie TP_SHARPENING_RLD_ITERATIONS;Powtórzenia TP_SHARPENING_THRESHOLD;Próg -TP_SHARPENING_TOOLTIP;Kiedy CIECAM02 jest aktywne efekt wyostrzania może ulec drobnym zmianom. W mało prawdopodobnym przypadku zuważenia zmiany wystarczy prystosować suwaki według gustu. TP_SHARPENING_USM;Maska wyostrzająca TP_SHARPENMICRO_AMOUNT;Siła TP_SHARPENMICRO_LABEL;Mikrokontrast @@ -1499,7 +1463,23 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_EQUALIZER;Bypass Wavelet Levels +!EXPORT_PIPELINE;Processing pipeline +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWNOTTRASHHINT;Show only non-deleted images. !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !FILECHOOSER_FILTER_ANY;All files @@ -1512,6 +1492,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_299;NR - Chrominance curve !HISTORY_MSG_300;- @@ -1574,7 +1555,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -1626,12 +1607,12 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1644,8 +1625,8 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -1657,14 +1638,68 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_EQUALIZER;Wavelet levels !PARTIALPASTE_PRSHARPENING;Post-resize sharpening +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue +!PARTIALPASTE_RAW_IMAGENUM;Sub-image +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_WAVELETGROUP;Wavelet Levels !PREFERENCES_AUTLISLOW;Low @@ -1676,16 +1711,19 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_CIEART_FRAME;CIECAM02-Specific Settings !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1693,6 +1731,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1700,9 +1739,10 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_NAVIGATIONFRAME;Navigation !PREFERENCES_NOISE;Noise Reduction !PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP;Overlay filenames on thumbnails in the editor pannel @@ -1712,7 +1752,12 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font @@ -1723,6 +1768,8 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1731,6 +1778,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_WLONE;One level !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No +!PROFILEPANEL_PDYNAMIC;Dynamic !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. !SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. @@ -1739,6 +1787,13 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_CROP_GTHARMMEANS;Harmonic Means !TP_CROP_GTTRIANGLE1;Golden Triangles 1 !TP_CROP_GTTRIANGLE2;Golden Triangles 2 @@ -1778,27 +1833,89 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_DIRPYRDENOISE_SLI;Slider !TP_DIRPYRDENOISE_TILELABEL;Tile size=%1, Center: Tx=%2 Ty=%3 !TP_DIRPYREQUALIZER_ARTIF;Reduce artifacts +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_GAMMA;Gamma !TP_EXPOSURE_TCMODE_LUMINANCE;Luminance !TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptual !TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_NEUTRAL;Reset !TP_PRSHARPENING_LABEL;Post-Resize Sharpening !TP_PRSHARPENING_TOOLTIP;Sharpens the image after resizing. Only works when the "Lanczos" resizing method is used. It is impossible to preview the effects of this tool. See RawPedia for usage instructions. !TP_RAWCACORR_CASTR;Strength +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. +!TP_RAW_LMMSE;LMMSE +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red +!TP_RAW_VNG4;VNG4 !TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL !TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* !TP_RETINEX_CONTEDIT_LH;Hue equalizer @@ -2042,3 +2159,5 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !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_TMTYPE;Compression method !TP_WAVELET_TON;Toning +!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". diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters) index e4bd5fc83..84000eb6e 100644 --- a/rtdata/languages/Polish (Latin Characters) +++ b/rtdata/languages/Polish (Latin Characters) @@ -108,7 +108,6 @@ FILEBROWSER_DELETEDLGMSG;Na pewno usunac zaznaczone %1 plikow? FILEBROWSER_DELETEDLGMSGINCLPROC;Na pewno usunac wybrany plik %1 WLACZNIE z wersja utworzona przez kolejke przetwarzania? FILEBROWSER_EMPTYTRASH;Wyczysc kosz FILEBROWSER_EMPTYTRASHHINT;Definitywnie usuwa pliki z kosza -FILEBROWSER_EXEC_CPB;Uruchom zewnetrzny kreator profilow FILEBROWSER_EXTPROGMENU;Otworz za pomoca FILEBROWSER_FLATFIELD;Puste pole FILEBROWSER_MOVETODARKFDIR;Przenies do katalogu zawierajacego czarne klatki @@ -218,7 +217,6 @@ HISTOGRAM_TOOLTIP_R;Pokaz/Ukryj histogram czerwieni. HISTOGRAM_TOOLTIP_RAW;Pokaz/Ukryj histogram raw. HISTORY_CHANGED;Zmieniono HISTORY_CUSTOMCURVE;Krzywa wlasna -HISTORY_DELSNAPSHOT;Usun migawke HISTORY_FROMCLIPBOARD;Ze schowka HISTORY_LABEL;Historia HISTORY_MSG_1;Zdjecie zaladowane @@ -521,47 +519,23 @@ HISTORY_NEWSNAPSHOT;Nowa migawka HISTORY_NEWSNAPSHOT_TOOLTIP;Skrot: Alt-s HISTORY_SNAPSHOT;Migawka HISTORY_SNAPSHOTS;Migawki -IPTCPANEL_AUTHOR;Autor -IPTCPANEL_AUTHORSPOSITION;Stanowisko -IPTCPANEL_AUTHORSPOSITIONHINT;Stanowisko lub funkcja autora lub autorow dziela (By-line Title). -IPTCPANEL_CAPTION;Tytul -IPTCPANEL_CAPTIONHINT;Tekstowy opis tresci (Caption - Abstract). -IPTCPANEL_CAPTIONWRITER;Autor opisu -IPTCPANEL_CAPTIONWRITERHINT;Imie i nazwisko osoby biorace udzial w opracowywaniu, edytowanie lub korygowania obrazu lub opisu (Writer - Editor). IPTCPANEL_CATEGORY;Kategoria -IPTCPANEL_CATEGORYHINT;Identyfikuje temat zdjecia w opinii jego dostawcy (Category). IPTCPANEL_CITY;Miasto -IPTCPANEL_CITYHINT;Miasto w ktorym wykonano zdjecie (City). IPTCPANEL_COPYHINT;Kopiuje ustawienia IPTC do schowka -IPTCPANEL_COPYRIGHT;Prawa autorskie -IPTCPANEL_COPYRIGHTHINT;Wazne uwagi o prawach autorskich (Copyright Notice). IPTCPANEL_COUNTRY;Kraj -IPTCPANEL_COUNTRYHINT;Nazwa kraju lub lokalizacji, gdzie zostalo wykonane zdjecie (Country - Primary Location Name). IPTCPANEL_CREDIT;Zasluga IPTCPANEL_CREDITHINT;Identyfikuje dostawce zdjecia, niekoniecznie wlasciciela lub autora (Credit). IPTCPANEL_DATECREATED;Data utworzenia -IPTCPANEL_DATECREATEDHINT;Data powstania intelektualnej tresci zdjecia. Format: JJJJMMTT (Date Created). IPTCPANEL_EMBEDDED;Osadzony IPTCPANEL_EMBEDDEDHINT;Resetuje dane IPTC do domyslnych ustawien osadzonych w orginalnym zdjeciu IPTCPANEL_HEADLINE;Naglowek -IPTCPANEL_HEADLINEHINT;Gotowy do opublikowania wpis streszczajacy zawratosc zdjecia (Headline). IPTCPANEL_INSTRUCTIONS;Instrukcje -IPTCPANEL_INSTRUCTIONSHINT;Inne wskazowki redakcyjne dotyczace korzystania z obrazu (Special Instructions). IPTCPANEL_KEYWORDS;Slowa kluczowe -IPTCPANEL_KEYWORDSHINT;Wskazuje konkretne tresci mozliwe do odszukania (Keywords). IPTCPANEL_PASTEHINT;Wstawia ustawienia IPTC ze schowka -IPTCPANEL_PROVINCE;Stan, wojewodztwo, dystrykt itd. -IPTCPANEL_PROVINCEHINT;Wojewodztwo, gmina, stan gdzie zostalo wykonane zdjecie (Province-State). IPTCPANEL_RESET;Reset IPTCPANEL_RESETHINT;Resetuje do domyslnych ustawien profilu IPTCPANEL_SOURCE;Zrodlo -IPTCPANEL_SOURCEHINT;Pierwotny wlasciciel tresci intelektualnych zdjecia (Source). -IPTCPANEL_SUPPCATEGORIES;Dodatkowe kategorie tematyczne -IPTCPANEL_SUPPCATEGORIESHINT;Doprecyzowuje kategorie tematyczne zdjecia (Supplemental Categories). IPTCPANEL_TITLE;Tytul -IPTCPANEL_TITLEHINT;Skrocony temat odniesienia zdjecia (Object Name). -IPTCPANEL_TRANSREFERENCE;Kod ident. zlecenie -IPTCPANEL_TRANSREFERENCEHINT;Numer badz kod identyfikujacy zlecenie utworzony zazwyczaj przez fotografa przy transmisji umozliwiajacy sledzenie obrazu w obiegu. MAIN_BUTTON_FULLSCREEN;Pelen ekran MAIN_BUTTON_NAVNEXT_TOOLTIP;Przejdz do nastepnego zdjecia wzgledem zdjecia otwartego w Edytorze.\nSkrot: Shift-F4\n\nAby przejsc do nastepnego zdjecia wzgledem miniaturki wybranej w Nawigatorze Zdjec:\nSkrot: F4 MAIN_BUTTON_NAVPREV_TOOLTIP;Przejdz do poprzedniego zdjecia wzgledem zdjecia otwartego w Edytorze.\nSkrot: Shift-F3 \n\nAby przejsc do poprzedniego zdjecia wzgledem miniaturki wybranej w Nawigatorze Zdjec:\nSkrot: F3 @@ -689,8 +663,6 @@ PARTIALPASTE_PREPROCESS_GREENEQUIL;Wyrownanie zieleni PARTIALPASTE_PREPROCESS_HOTPIXFILT;Filtr goracych pikseli PARTIALPASTE_PREPROCESS_LINEDENOISE;Redukcja szumow liniowych PARTIALPASTE_RAWCACORR_AUTO;Autokorekcja aberracji chr. -PARTIALPASTE_RAWCACORR_CABLUE;AbChr niebieski -PARTIALPASTE_RAWCACORR_CARED;AbChr czerwony PARTIALPASTE_RAWEXPOS_BLACK;Poziomy czerni PARTIALPASTE_RAWEXPOS_LINEAR;Korekcja punktu bieli PARTIALPASTE_RAWEXPOS_PRESER;Zachowanie przeswietlen @@ -748,8 +720,6 @@ PREFERENCES_DARKFRAMESHOTS;zdjec(ia) PREFERENCES_DARKFRAMETEMPLATES;szablonow(ny) PREFERENCES_DATEFORMAT;Format daty PREFERENCES_DATEFORMATHINT;Dozwolone sa nastepujace kody formatujace:\n%y - rok\n%m - miesiac\n%d - dzien\n\nNa przyklad wedlug standardu ISO 8601 format daty wyglada nastepujaco:\n%y-%m-%d -PREFERENCES_DEFAULTLANG;Domyslny jezyk -PREFERENCES_DEFAULTTHEME;Domyslny temat PREFERENCES_DIRDARKFRAMES;Katalog z czarnymi klatkami PREFERENCES_DIRHOME;Katalog domowy PREFERENCES_DIRLAST;Ostatnio odwiedzony katalog @@ -836,7 +806,6 @@ PREFERENCES_SHOWEXPOSURECOMPENSATION;Pokaz korekte ekspozycji PREFERENCES_SHTHRESHOLD;Prog dla niedoswietlen PREFERENCES_SINGLETAB;Tryb pojedynczej zakladki PREFERENCES_SINGLETABVERTAB;Tryb pojedynczej zakladki, pionowy uklad -PREFERENCES_SLIMUI;Waskie suwaki PREFERENCES_SND_BATCHQUEUEDONE;Zakonczono przetwarzanie wsadowe PREFERENCES_SND_HELP;Nalezy wprowadzic sciezke do pliku, badz pozostawic niewypelnione (brak dzwiekow).\nW systemie Windows mozna stosowac "SystemDefault", "SystemAsterisk" itp. dla dzwiekow systemowych.\nW systemie Linux mozna stosowac "complete", "window-attention" etc. dla dzwiekow systemowych. PREFERENCES_SND_LNGEDITPROCDONE;Praca edytora wykonana @@ -852,7 +821,6 @@ PREFERENCES_TP_LABEL;Panel narzedzi: PREFERENCES_TP_USEICONORTEXT;Uzyj ikon w zakladkach zamiast tekstowych etykiet PREFERENCES_TP_VSCROLLBAR;Ukry pionowy pasek przesuwania PREFERENCES_USEBUNDLEDPROFILES;Uzyj zalaczone profile przetwarzania -PREFERENCES_USESYSTEMTHEME; Uzyj tematu systemowego PREFERENCES_VIEW;Balans bieli urzadzenia wyjsciowego (monitora, TV, projektora, widowni, etc.) PREFERENCES_WORKFLOW;Tok pracy PROFILEPANEL_COPYPPASTE;Parametry do skopiowania @@ -1159,8 +1127,6 @@ TP_DIRPYREQUALIZER_SKIN_TOOLTIP;Przy -100 oddzialywanie efektu odbywa sie wylacz TP_DIRPYREQUALIZER_THRESHOLD;Prog TP_DIRPYREQUALIZER_TOOLTIP;Zapobiega artefaktom w strefach przejscia pomiedzy odcieniom skory (hue, chrominancja, luminancja) a pozostalym odcieniom. TP_DISTORTION_AMOUNT;Sila -TP_DISTORTION_AUTO;Automatyczna korekcja dystorsji -TP_DISTORTION_AUTO_TIP;(Eksperymentalne) Automatyczna korekcja dystorsji obiektywu dla niektorych aparatow (M4/3, kompakty DC, itp.) TP_DISTORTION_LABEL;Dystorsja TP_EPD_EDGESTOPPING;Wyszukiwanie krawedzi TP_EPD_LABEL;Tone Mapping @@ -1255,7 +1221,6 @@ TP_ICM_INPUTPROFILE;Profil wejsciowy TP_ICM_LABEL;ICM TP_ICM_NOICM;Brak ICM: Wyjscie sRGB TP_ICM_OUTPUTPROFILE;Profil wyjsciowy -TP_ICM_SAVEREFERENCE;Zapisz obraz wzorcowy dla profilowania TP_ICM_SAVEREFERENCE_TOOLTIP;Zapisz liniowy obraz TIFF zanim profil wejsciowy zostanie zastosowany. Obraz ten mozna uzyc do kalibracji oraz do wytworzenia profilu aparatu. TP_ICM_TONECURVE;Uzyj krzywa tonalna z DCP TP_ICM_TONECURVE_TOOLTIP;Wlacz aby uzyc krzywa tonalna znajdujaca sie w profilu DCP. Opcja ta jest tylko aktywna jesli profil DCP zawiera krzywa tonalna. @@ -1406,7 +1371,6 @@ TP_SHARPENING_RLD_AMOUNT;Sila TP_SHARPENING_RLD_DAMPING;Tlumienie TP_SHARPENING_RLD_ITERATIONS;Powtorzenia TP_SHARPENING_THRESHOLD;Prog -TP_SHARPENING_TOOLTIP;Kiedy CIECAM02 jest aktywne efekt wyostrzania moze ulec drobnym zmianom. W malo prawdopodobnym przypadku zuwazenia zmiany wystarczy prystosowac suwaki wedlug gustu. TP_SHARPENING_USM;Maska wyostrzajaca TP_SHARPENMICRO_AMOUNT;Sila TP_SHARPENMICRO_LABEL;Mikrokontrast @@ -1499,7 +1463,23 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_EQUALIZER;Bypass Wavelet Levels +!EXPORT_PIPELINE;Processing pipeline +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWNOTTRASHHINT;Show only non-deleted images. !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !FILECHOOSER_FILTER_ANY;All files @@ -1512,6 +1492,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_299;NR - Chrominance curve !HISTORY_MSG_300;- @@ -1574,7 +1555,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -1626,12 +1607,12 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1644,8 +1625,8 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -1657,14 +1638,68 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w !MONITOR_PROFILE_SYSTEM;System default !PARTIALPASTE_EQUALIZER;Wavelet levels !PARTIALPASTE_PRSHARPENING;Post-resize sharpening +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue +!PARTIALPASTE_RAW_IMAGENUM;Sub-image +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_WAVELETGROUP;Wavelet Levels !PREFERENCES_AUTLISLOW;Low @@ -1676,16 +1711,19 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_CIEART_FRAME;CIECAM02-Specific Settings !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1693,6 +1731,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1700,9 +1739,10 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_NAVIGATIONFRAME;Navigation !PREFERENCES_NOISE;Noise Reduction !PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP;Overlay filenames on thumbnails in the editor pannel @@ -1712,7 +1752,12 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font @@ -1723,6 +1768,8 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1731,6 +1778,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_WLONE;One level !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No +!PROFILEPANEL_PDYNAMIC;Dynamic !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. !SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. @@ -1739,6 +1787,13 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_CROP_GTHARMMEANS;Harmonic Means !TP_CROP_GTTRIANGLE1;Golden Triangles 1 !TP_CROP_GTTRIANGLE2;Golden Triangles 2 @@ -1778,27 +1833,89 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_DIRPYRDENOISE_SLI;Slider !TP_DIRPYRDENOISE_TILELABEL;Tile size=%1, Center: Tx=%2 Ty=%3 !TP_DIRPYREQUALIZER_ARTIF;Reduce artifacts +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_GAMMA;Gamma !TP_EXPOSURE_TCMODE_LUMINANCE;Luminance !TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptual !TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_NEUTRAL;Reset !TP_PRSHARPENING_LABEL;Post-Resize Sharpening !TP_PRSHARPENING_TOOLTIP;Sharpens the image after resizing. Only works when the "Lanczos" resizing method is used. It is impossible to preview the effects of this tool. See RawPedia for usage instructions. !TP_RAWCACORR_CASTR;Strength +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. +!TP_RAW_LMMSE;LMMSE +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red +!TP_RAW_VNG4;VNG4 !TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL !TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* !TP_RETINEX_CONTEDIT_LH;Hue equalizer @@ -2042,3 +2159,5 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !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_TMTYPE;Compression method !TP_WAVELET_TON;Toning +!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". diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index f12205c7e..eb2fe00a4 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -83,7 +83,6 @@ HISTOGRAM_TOOLTIP_L;Mostrar/Esconder histograma CIELAB HISTOGRAM_TOOLTIP_R;Mostrar/Esconder histograma VERMELHO HISTORY_CHANGED;Alterado HISTORY_CUSTOMCURVE;Curva personalizada -HISTORY_DELSNAPSHOT;Apagar HISTORY_FROMCLIPBOARD;Da área de transferência HISTORY_LABEL;Histórico HISTORY_MSG_1;Foto carregada @@ -170,47 +169,23 @@ HISTORY_MSG_81;Redimensionamento habilitado HISTORY_NEWSNAPSHOT;Adicionar HISTORY_SNAPSHOT;Snapshot HISTORY_SNAPSHOTS;Snapshots -IPTCPANEL_AUTHOR;Autor -IPTCPANEL_AUTHORSPOSITION;Posição do autor -IPTCPANEL_AUTHORSPOSITIONHINT;Título do criador ou criadores do objeto. -IPTCPANEL_CAPTION;Legenda -IPTCPANEL_CAPTIONHINT;Uma descrição dos dados em forma de texto. -IPTCPANEL_CAPTIONWRITER;Autor da Legenda -IPTCPANEL_CAPTIONWRITERHINT;o nome da pessoa envolvida na escrita, edição ou correção da imagem ou legenda/resumo. IPTCPANEL_CATEGORY;Categoria -IPTCPANEL_CATEGORYHINT;Identifica o assunto da imagem (Categoria). IPTCPANEL_CITY;Cidade -IPTCPANEL_CITYHINT;Cidade de origem da imagem. IPTCPANEL_COPYHINT;Copiar configurações IPTC da área de transferência -IPTCPANEL_COPYRIGHT;Direios autorais (Copyright). -IPTCPANEL_COPYRIGHTHINT;qualquer informação necessário sobre os direitos autorais. IPTCPANEL_COUNTRY;País -IPTCPANEL_COUNTRYHINT;O nome do país onde a imagem foi criada. IPTCPANEL_CREDIT;Créditos IPTCPANEL_CREDITHINT;Identifica o provedor da imagem, nçao necessariamente o proprietário/criador. IPTCPANEL_DATECREATED;Data de criação -IPTCPANEL_DATECREATEDHINT;A data em que o conteúdo intelectual da imagem foi criado; Formato: AAAAMMDD. IPTCPANEL_EMBEDDED;Embedded IPTCPANEL_EMBEDDEDHINT;Restaura para IPTC os dados encaixados na imagem IPTCPANEL_HEADLINE;Título -IPTCPANEL_HEADLINEHINT;Uma entrada publicável que com uma sinopse dos conteúdos da imagem. IPTCPANEL_INSTRUCTIONS;Instruções -IPTCPANEL_INSTRUCTIONSHINT;Outras instruções editorias sobre o uso da imagem. IPTCPANEL_KEYWORDS;Palavras-chave -IPTCPANEL_KEYWORDSHINT;Utilizado para indicar informações especificas. IPTCPANEL_PASTEHINT;colar configurações IPTC da área de transferência -IPTCPANEL_PROVINCE;Província -IPTCPANEL_PROVINCEHINT;o Estado/província de origem da imagem. IPTCPANEL_RESET;Restaurar IPTCPANEL_RESETHINT;Restaurar paara o padrão do perfil IPTCPANEL_SOURCE;Fonte -IPTCPANEL_SOURCEHINT;o proprietário original do contepudo intelectual da imagem. -IPTCPANEL_SUPPCATEGORIES; Categorias Adicionais -IPTCPANEL_SUPPCATEGORIESHINT;Mais informações sobre o assunto da imagem. IPTCPANEL_TITLE;Título -IPTCPANEL_TITLEHINT;Uma referência rápida da imagem. -IPTCPANEL_TRANSREFERENCE;Trans. Referência -IPTCPANEL_TRANSREFERENCEHINT;Um código representando a localização da transmissão original. MAIN_BUTTON_PREFERENCES;Preferências MAIN_BUTTON_SAVE;Salvar Imagem MAIN_BUTTON_SENDTOEDITOR;Enviar ao Editor @@ -269,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Tamanho máximo das miniaturas PREFERENCES_CLIPPINGIND;Recortando indicação PREFERENCES_DATEFORMAT;Formato de data PREFERENCES_DATEFORMATHINT;Você pode usar as seguintes formatações:\n%a : ano\n%m : mês\n%d : dia\n\nPor exemplo, o formato de data húngaro é:\n%a/%m/%d -PREFERENCES_DEFAULTLANG;Idioma padrão -PREFERENCES_DEFAULTTHEME;Tema padrão PREFERENCES_DIRHOME;Directory inicial PREFERENCES_DIRLAST;Último directory visitado PREFERENCES_DIROTHER;Outro @@ -396,7 +369,6 @@ TP_ICM_INPUTPROFILE;Perfil de entrada TP_ICM_LABEL;ICM TP_ICM_NOICM;Sem ICM: Saída sRGB TP_ICM_OUTPUTPROFILE;Perfil de Saída -TP_ICM_SAVEREFERENCE;Salvar imagem de referência para perfis TP_ICM_WORKINGPROFILE;Perfil Utilizado TP_RAW_DMETHOD;Método TP_RAW_FALSECOLOR;Supressão de cor falsa @@ -475,12 +447,23 @@ TP_WBALANCE_TEMPERATURE;Temperatura !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. !EXIFFILTER_EXPOSURECOMPENSATION;Exposure compensation (EV) !EXIFFILTER_FILETYPE;File type !EXIFFILTER_METADATAFILTER;Enable metadata filters +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -503,8 +486,12 @@ TP_WBALANCE_TEMPERATURE;Temperatura !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -520,7 +507,6 @@ TP_WBALANCE_TEMPERATURE;Temperatura !FILEBROWSER_CURRENT_NAME;Current name: !FILEBROWSER_DARKFRAME;Dark-frame !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -555,6 +541,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -590,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -871,7 +859,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -923,12 +911,12 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -941,8 +929,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -954,8 +942,58 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -975,6 +1013,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d @@ -1049,8 +1088,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -1059,7 +1097,9 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves !PARTIALPASTE_SHARPENEDGE;Edges @@ -1088,7 +1128,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1100,7 +1141,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1113,7 +1155,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_EDITORLAYOUT;Editor Layout !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field !PREFERENCES_FLATFIELDFOUND;Found @@ -1129,7 +1171,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1144,6 +1187,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1159,9 +1203,10 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1177,13 +1222,18 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROPERTY;Property +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files @@ -1194,15 +1244,16 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. !PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done !PREFERENCES_SND_TRESHOLDSECS;After seconds !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1211,7 +1262,6 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -!PREFERENCES_USESYSTEMTHEME;Use system theme !PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) !PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' !PREFERENCES_WLONE;One level @@ -1224,6 +1274,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save !PROGRESSBAR_LOADINGTHUMBS;Loading thumbnails... @@ -1316,11 +1367,11 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1340,8 +1391,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1352,6 +1403,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1363,9 +1415,11 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1384,10 +1438,14 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1513,8 +1571,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_THRESHOLD;Threshold !TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma !TP_EPD_LABEL;Tone Mapping @@ -1578,18 +1635,17 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1598,11 +1654,12 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_ICM_INPUTNONE;No profile !TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift @@ -1689,19 +1746,80 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2024,6 +2142,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_WBALANCE_SOLUX41;Solux 4100K !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) +!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_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index 139d87b49..8d580c3fc 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -104,7 +104,6 @@ FILEBROWSER_DELETEDLGMSG;Вы уверены, что хотите удалить FILEBROWSER_DELETEDLGMSGINCLPROC;Вы уверены, что хотите удалить %1 выделенных файлов, включая обработанные версии? FILEBROWSER_EMPTYTRASH;Очистить корзину FILEBROWSER_EMPTYTRASHHINT;Удалить файлы из корзины без возможности восстановления -FILEBROWSER_EXEC_CPB;Создание собственного профиля FILEBROWSER_EXTPROGMENU;Открыть с помощью FILEBROWSER_FLATFIELD;Плоское поле FILEBROWSER_MOVETODARKFDIR;Переместить в папку темновых кадров @@ -213,7 +212,6 @@ HISTOGRAM_TOOLTIP_R;Показать/скрыть красный канал ги HISTOGRAM_TOOLTIP_RAW;Показать/скрыть Raw гистограмму HISTORY_CHANGED;Изменено HISTORY_CUSTOMCURVE;Пользовательская кривая -HISTORY_DELSNAPSHOT;Удалить HISTORY_FROMCLIPBOARD;Из буфера обмена HISTORY_LABEL;История HISTORY_MSG_1;Фото загружено @@ -469,47 +467,23 @@ HISTORY_NEWSNAPSHOT;Добавить HISTORY_NEWSNAPSHOT_TOOLTIP;Горячая клавиша: Alt-s HISTORY_SNAPSHOT;Снимок HISTORY_SNAPSHOTS;Снимки -IPTCPANEL_AUTHOR;Автор -IPTCPANEL_AUTHORSPOSITION;Позиция автора -IPTCPANEL_AUTHORSPOSITIONHINT;Название автора или авторов объекта (By-line Title). -IPTCPANEL_CAPTION;Подпись -IPTCPANEL_CAPTIONHINT;Текстовое описание данных (Caption - Abstract) -IPTCPANEL_CAPTIONWRITER;Автор подписи -IPTCPANEL_CAPTIONWRITERHINT;Имя человека, участвовавшего в создании, изменении или редактировании изображения либо подписи (Writer - Editor). IPTCPANEL_CATEGORY;Категория -IPTCPANEL_CATEGORYHINT;Устанавливает тему изображения (Category) IPTCPANEL_CITY;Город -IPTCPANEL_CITYHINT;Город (City). IPTCPANEL_COPYHINT;Копировать данные IPTC в буфер обмена -IPTCPANEL_COPYRIGHT;Авторские права -IPTCPANEL_COPYRIGHTHINT;Любые предупреждения об авторских правах (Copyright Notice). IPTCPANEL_COUNTRY;Страна -IPTCPANEL_COUNTRYHINT;Название страны/начального местоположения (Country - Primary Location Name). IPTCPANEL_CREDIT;Поддержка IPTCPANEL_CREDITHINT;Лица и организации, осуществляющие какую либо поддержку изображения (Credit). IPTCPANEL_DATECREATED;Дата создания -IPTCPANEL_DATECREATEDHINT;Дата создания интеллектуального содержания изображения; Формат: ГГГГММДД (Date Created). IPTCPANEL_EMBEDDED;Встроенный IPTCPANEL_EMBEDDEDHINT;Сбросить данные IPTC, встроенные в файл изображения IPTCPANEL_HEADLINE;Заголовок -IPTCPANEL_HEADLINEHINT;Подходящий для публикации краткий обзор содержимого изображения (Headline). IPTCPANEL_INSTRUCTIONS;Инструкции -IPTCPANEL_INSTRUCTIONSHINT;Прочие редакторские инструкции об использовании изображения (Special Instructions). IPTCPANEL_KEYWORDS;Ключевые слова -IPTCPANEL_KEYWORDSHINT;Ключевые слова, используемые для поиска (Keywords). IPTCPANEL_PASTEHINT;Вставить данные IPTC из буфера обмена -IPTCPANEL_PROVINCE;Провинция -IPTCPANEL_PROVINCEHINT;Провинция/штат (Province-State). IPTCPANEL_RESET;Сбросить IPTCPANEL_RESETHINT;Сбросить профиль на значения по умолчанию IPTCPANEL_SOURCE;Источник -IPTCPANEL_SOURCEHINT;Первоначальный владелец интеллектуального содержания изображения (Source). -IPTCPANEL_SUPPCATEGORIES;Доп. категории -IPTCPANEL_SUPPCATEGORIESHINT;Дополнительные уточнения темы изображения (Supplemental Categories). IPTCPANEL_TITLE;Название -IPTCPANEL_TITLEHINT;Простое описание изображения (Object Name). -IPTCPANEL_TRANSREFERENCE;Код поддержки -IPTCPANEL_TRANSREFERENCEHINT;Код, облегчающий отслеживание изображения при передаче в обработку на сторону (Original Transmission Reference). MAIN_BUTTON_FULLSCREEN;Полный экран MAIN_BUTTON_NAVNEXT_TOOLTIP;Перейти к следующему изображению относительно открытого в редакторе\nГорячая клавиша: Shift+F4\n\nПерейти к следущему изображению относительно выбранного в файловом браузере\nгорячая клавиша F4 MAIN_BUTTON_NAVPREV_TOOLTIP;Перейти к предыдущему изображению относительно открытого в редакторе\nгорячая клавиша: Shift+F4\n\nПерейти к предыдущему изображению относительно выбранного в файловом браузере\nгорячая клавиша F4 @@ -621,8 +595,6 @@ PARTIALPASTE_PERSPECTIVE;Перспектива PARTIALPASTE_PREPROCESS_GREENEQUIL;Выравнивание зелёного канала PARTIALPASTE_PREPROCESS_LINEDENOISE;Фильтр полосообразного шума PARTIALPASTE_RAWCACORR_AUTO;Автоматическая коррекция ХА -PARTIALPASTE_RAWCACORR_CABLUE;Синие ХА -PARTIALPASTE_RAWCACORR_CARED;Красные ХА PARTIALPASTE_RAWEXPOS_BLACK;Уровень черного PARTIALPASTE_RAWEXPOS_LINEAR;Коррекция точки белого PARTIALPASTE_RAWEXPOS_PRESER;Сохранение пересветов @@ -679,8 +651,6 @@ PREFERENCES_DARKFRAMESHOTS;снимков PREFERENCES_DARKFRAMETEMPLATES;шаблонов PREFERENCES_DATEFORMAT;Формат даты PREFERENCES_DATEFORMATHINT;Вы можете использовать следующие элементы форматирования:\n%y: год\n%m: месяц\n%d: день\n\nНапример, венгерский формат даты такой:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Язык по умолчанию -PREFERENCES_DEFAULTTHEME;Тема по умолчанию PREFERENCES_DIRDARKFRAMES;Каталог размещения темновых кадров PREFERENCES_DIRHOME;Домашний каталог PREFERENCES_DIRLAST;Последний каталог @@ -763,7 +733,6 @@ PREFERENCES_SHOWEXPOSURECOMPENSATION;Показывать компенсацию PREFERENCES_SHTHRESHOLD;Порог обрезки теней PREFERENCES_SINGLETAB;Одна вкладка редактирования PREFERENCES_SINGLETABVERTAB;Одна вкладка редактирования, вертикальная панель вкладок -PREFERENCES_SLIMUI;Тонкий интерфейс PREFERENCES_SND_BATCHQUEUEDONE;Пакетная обработка завершена PREFERENCES_SND_HELP;Введите имя файла, либо оставьте поле пустым (без звука). В Windows можно использовать "SystemDefault", "SystemAsterisk" и т.д. для системных звуков. PREFERENCES_SND_LNGEDITPROCDONE;Обработка в редакторе завершена @@ -779,7 +748,6 @@ PREFERENCES_TP_LABEL;Панель инструментов: PREFERENCES_TP_USEICONORTEXT;Использовать иконки вместо текста PREFERENCES_TP_VSCROLLBAR;Спрятать вертикальную полосу прокрутки PREFERENCES_USEBUNDLEDPROFILES;Использовать предустановленный профиль -PREFERENCES_USESYSTEMTHEME;Использовать системную тему оформления PREFERENCES_VIEW;ББ устройства вывода (монитор, проектор и т.д.) PREFERENCES_WORKFLOW;Стиль работы PROFILEPANEL_COPYPPASTE;Параметры для копирования @@ -993,8 +961,6 @@ TP_DIRPYREQUALIZER_LUMAFINEST;Мелкие TP_DIRPYREQUALIZER_LUMANEUTRAL;Нейтральн TP_DIRPYREQUALIZER_THRESHOLD;Порог TP_DISTORTION_AMOUNT;Величина -TP_DISTORTION_AUTO;Автоматическая коррекция -TP_DISTORTION_AUTO_TIP;(Экспериментально) Автоматическая коррекция дисторсии на некоторых камерах (M4/3, некоторые компактные камеры и т.д.) TP_DISTORTION_LABEL;Дисторсия TP_EPD_EDGESTOPPING;Определение контуров TP_EPD_LABEL;Тональная компрессия @@ -1080,7 +1046,6 @@ TP_ICM_INPUTPROFILE;Входной профиль TP_ICM_LABEL;ICM TP_ICM_NOICM;Без ICM: sRGB на выходе TP_ICM_OUTPUTPROFILE;Выходной профиль -TP_ICM_SAVEREFERENCE;Сохранить для профилирования TP_ICM_SAVEREFERENCE_TOOLTIP;Сохранить линейный TIFF файл перед применением входного профиля. Результат может использоваться для калибровки и создания профиля камеры. TP_ICM_TONECURVE;Использовать тональную кривую DCP TP_ICM_TONECURVE_TOOLTIP;Использовать встроенную тональную кривую DCP. Настройка включается только в том случае, если выбранный DCP содержит тональную кривую. @@ -1216,7 +1181,6 @@ TP_SHARPENING_RLD_AMOUNT;Величина TP_SHARPENING_RLD_DAMPING;Ослабление TP_SHARPENING_RLD_ITERATIONS;Повторений TP_SHARPENING_THRESHOLD;Порог -TP_SHARPENING_TOOLTIP;Ожидается небольшая разница при использовании совместно с CIECAM02. Настройте по вкусу если заметили разницу. TP_SHARPENING_USM;Маска размытия TP_SHARPENMICRO_AMOUNT;Количество TP_SHARPENMICRO_LABEL;Микроконтраст @@ -1308,10 +1272,26 @@ ZOOMPANEL_ZOOMOUT;Удалить - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_EQUALIZER;Bypass Wavelet Levels +!EXPORT_PIPELINE;Processing pipeline +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !FILEBROWSER_POPUPRANK0;Unrank +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWNOTTRASHHINT;Show only non-deleted images. !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !FILECHOOSER_FILTER_ANY;All files @@ -1324,6 +1304,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_252;CbDL - Skin tar/prot !HISTORY_MSG_253;CbDL - Reduce artifacts @@ -1433,7 +1414,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -1485,12 +1466,12 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1503,8 +1484,8 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -1516,8 +1497,59 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1540,6 +1572,9 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PARTIALPASTE_PREPROCESS_DEADPIXFILT;Dead pixel filter !PARTIALPASTE_PREPROCESS_HOTPIXFILT;Hot pixel filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue +!PARTIALPASTE_RAW_IMAGENUM;Sub-image +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_WAVELETGROUP;Wavelet Levels !PREFERENCES_AUTLISLOW;Low @@ -1552,17 +1587,20 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1572,6 +1610,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1579,9 +1618,10 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color !PREFERENCES_NAVIGATIONFRAME;Navigation !PREFERENCES_NOISE;Noise Reduction @@ -1592,7 +1632,12 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font @@ -1603,6 +1648,8 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1611,6 +1658,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_WLONE;One level !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No +!PROFILEPANEL_PDYNAMIC;Dynamic !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. !SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. !SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. @@ -1626,6 +1674,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_HUE_TOOLTIP;Hue (h) - angle between 0° and 360°. !TP_COLORAPP_LABEL;CIE Color Appearance Model 2002 !TP_COLORAPP_LABEL_CAM02;Image Adjustments @@ -1633,9 +1682,11 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_COLORAPP_LABEL_VIEWING;Viewing Conditions !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SURROUND;Surround !TP_COLORAPP_SURROUND_AVER;Average !TP_COLORAPP_SURROUND_DARK;Dark @@ -1652,10 +1703,14 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1751,6 +1806,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_DIRPYREQUALIZER_SKIN;Skin targetting/protection !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_GAMMA;Gamma !TP_EXPOSURE_TCMODE_LUMINANCE;Luminance !TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptual @@ -1763,15 +1819,15 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_FLATFIELD_CLIPCONTROL;Clip control !TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_NEUTRAL;Reset @@ -1790,11 +1846,72 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_RAWEXPOS_BLACK_GREEN;Green !TP_RAWEXPOS_BLACK_RED;Red !TP_RAWEXPOS_RGB;Red, Green, Blue +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. +!TP_RAW_LMMSE;LMMSE +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL !TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* !TP_RETINEX_CONTEDIT_LH;Hue equalizer @@ -2038,4 +2155,6 @@ ZOOMPANEL_ZOOMOUT;Удалить - !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_TMTYPE;Compression method !TP_WAVELET_TON;Toning +!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". !ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: Alt-f diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 89707bca4..2a9e96bc0 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -13,8 +13,6 @@ CURVEEDITOR_CURVE;Кривуља CURVEEDITOR_CURVES;Кривуље CURVEEDITOR_CUSTOM;Произвољно CURVEEDITOR_DARKS;Тамно -CURVEEDITOR_FILEDLGFILTERANY;Све датотеке -CURVEEDITOR_FILEDLGFILTERCURVE;Датотеке са кривама CURVEEDITOR_HIGHLIGHTS;Пресветло CURVEEDITOR_LIGHTS;Светло CURVEEDITOR_LINEAR;Линеарно @@ -55,12 +53,9 @@ EXIFPANEL_RESETALLHINT;Враћа све ознаке на почетне вре EXIFPANEL_RESETHINT;Враћа изабрану ознаку на почетну вредности EXIFPANEL_SUBDIRECTORY;Поддиректоријум EXPORT_BYPASS_ALL;Изабери / поништи све -EXPORT_BYPASS_COLORDENOISE;Занемари уклањање колорног defriшума EXPORT_BYPASS_DEFRINGE;Занемари уклањање ореола EXPORT_BYPASS_DIRPYRDENOISE;Занемари уклањање шума EXPORT_BYPASS_DIRPYREQUALIZER;Занемари детаљни ниво контраста -EXPORT_BYPASS_LUMADENOISE;Занемари уклањање шума луминасе -EXPORT_BYPASS_RAW_ALL_ENHANCE;Занемари уклањање артафакта/шума након расклапања EXPORT_BYPASS_RAW_CA;Занемари [raw] исправљање хроматских аберација EXPORT_BYPASS_RAW_CCSTEPS;Занемари [raw] пригушивање лажне боје EXPORT_BYPASS_RAW_DCB_ENHANCE;Занемари [raw] ДЦБ побољшање @@ -80,7 +75,6 @@ EXPORT_MAXHEIGHT;Највећа висина: EXPORT_MAXWIDTH;Највећа дужина: EXPORT_PUTTOQUEUEFAST; Закажи за брз извоз EXPORT_RAW_DMETHOD;Начин расклапања мозаика -EXPORT_RESIZEMETHOD;Начин промене величине EXTPROGTARGET_1;raw EXTPROGTARGET_2;заказано-развијено FILEBROWSER_ADDDELTEMPLATE;Додај/уклони шаблоне... @@ -103,7 +97,6 @@ FILEBROWSER_DELETEDLGMSG;Да ли сигурно желите да обрише FILEBROWSER_DELETEDLGMSGINCLPROC;Да ли желите да обришете %1 изабраних датотека, укључујући и оне које су заказане? FILEBROWSER_EMPTYTRASH;Избаци смеће FILEBROWSER_EMPTYTRASHHINT;Трајно брише датотеке из смећа -FILEBROWSER_EXEC_CPB;Изгради почетни профил FILEBROWSER_EXTPROGMENU;Отвори помоћу FILEBROWSER_FLATFIELD;Равно поље FILEBROWSER_MOVETODARKFDIR;Пребаци у фасциклу са тамним кадровима @@ -140,7 +133,6 @@ FILEBROWSER_RANK3_TOOLTIP;Оцена 3 *\nПречица: Shift-3 FILEBROWSER_RANK4_TOOLTIP;Оцена 4 *\nПречица: Shift-4 FILEBROWSER_RANK5_TOOLTIP;Оцена 5 *\nПречица: Shift-5 FILEBROWSER_RENAMEDLGLABEL;Преименуј датотеку -FILEBROWSER_RENAMEDLGMSG;Преименуј датотеку „%1“ у: FILEBROWSER_SELECTDARKFRAME;Изабери тамни кадар... FILEBROWSER_SELECTFLATFIELD;Изабери равно поље... FILEBROWSER_SHOWCOLORLABEL1HINT;Приказује слике означене црвеном Alt-1 @@ -169,7 +161,6 @@ FILEBROWSER_STOPPROCESSINGHINT;Зауставља обраду слика FILEBROWSER_THUMBSIZE;Преглед FILEBROWSER_TOOLTIP_STOPPROCESSING;Покреће обраду фотографија када их закажете FILEBROWSER_UNRANK_TOOLTIP;Неоцењено.\nПречица: Shift-0 -FILEBROWSER_USETEMPLATE;Искористи шаблон: FILEBROWSER_ZOOMINHINT;Увећава преглед FILEBROWSER_ZOOMOUTHINT;Умањује преглед GENERAL_ABOUT;О програму @@ -202,7 +193,6 @@ HISTOGRAM_TOOLTIP_R;Приказује црвени хистограм HISTOGRAM_TOOLTIP_RAW;Приказује/скрива RAW хистограм HISTORY_CHANGED;Измењено HISTORY_CUSTOMCURVE;Произвољна крива -HISTORY_DELSNAPSHOT;Уклони HISTORY_FROMCLIPBOARD;Из оставе HISTORY_LABEL;Историјат HISTORY_MSG_1;Слика је учитана @@ -460,47 +450,23 @@ HISTORY_NEWSNAPSHOT_TOOLTIP;Пречица: Alt-s HISTORY_SNAPSHOT;Снимак HISTORY_SNAPSHOTS;Снимак HRESHOLDSELECTOR_BL;Доле-лево -IPTCPANEL_AUTHOR;Аутор -IPTCPANEL_AUTHORSPOSITION;Звање аутора -IPTCPANEL_AUTHORSPOSITIONHINT;Звање једног или више аутора (једно по реди). -IPTCPANEL_CAPTION;Назив -IPTCPANEL_CAPTIONHINT;Кратак опис дела (наслов — абстракт). -IPTCPANEL_CAPTIONWRITER;Писац наслова -IPTCPANEL_CAPTIONWRITERHINT;Име особе које је укључена у писање, уређивање или исправљање слике/назица/апстракта (писац — уредник). IPTCPANEL_CATEGORY;Категорија -IPTCPANEL_CATEGORYHINT;Одређује шта се налази на слици (категорија). IPTCPANEL_CITY;Град -IPTCPANEL_CITYHINT;Град у коме је слика настало (град). IPTCPANEL_COPYHINT;Коппирај ИПТЦ пшодешавања у оставу -IPTCPANEL_COPYRIGHT;Ауторска права -IPTCPANEL_COPYRIGHTHINT;Белешка о ауторским правима над делом (белешка о ауторским правима). IPTCPANEL_COUNTRY;Држава -IPTCPANEL_COUNTRYHINT;Име државе/основног места где је настала слика (држава — назив места). IPTCPANEL_CREDIT;Заслуге IPTCPANEL_CREDITHINT;Указује да онај ко издаје слику не мора бити аутор/власник (Заслуге). IPTCPANEL_DATECREATED;Датум настанка -IPTCPANEL_DATECREATEDHINT;Датум када је стављено власништво над интелектуални садржај слике; Формат: ГГГГММДД (датум настанка). IPTCPANEL_EMBEDDED;Угњежђено IPTCPANEL_EMBEDDEDHINT;Врати поља на ИПТЦ податке угњежђене у слику IPTCPANEL_HEADLINE;Наслов -IPTCPANEL_HEADLINEHINT;Назив који указује на везу са садржајем слике и под којим се она издаје (наслов). IPTCPANEL_INSTRUCTIONS;Упутства -IPTCPANEL_INSTRUCTIONSHINT;Остала упутства уредника везана за употребу слике (специјална упутства). IPTCPANEL_KEYWORDS;Кључне речи -IPTCPANEL_KEYWORDSHINT;Речи које указују на разне податке о слици (кључне речи). IPTCPANEL_PASTEHINT;Убаци ИПТЦ подешавања из оставе -IPTCPANEL_PROVINCE;Покрајина -IPTCPANEL_PROVINCEHINT;Покрајина/држава где је настала слика (провинција — држава). IPTCPANEL_RESET;Врати IPTCPANEL_RESETHINT;Поставља подразумеване вредности профила IPTCPANEL_SOURCE;Извор -IPTCPANEL_SOURCEHINT;Првобитни власник иннтелектуалног садржаја на слици (извор). -IPTCPANEL_SUPPCATEGORIES;Доп. категорије -IPTCPANEL_SUPPCATEGORIESHINT;Додатно одређује мотив на слици (додатне категорије). IPTCPANEL_TITLE;Натпис -IPTCPANEL_TITLEHINT;Кратни назив слике (име објекта). -IPTCPANEL_TRANSREFERENCE;Реф. преноса -IPTCPANEL_TRANSREFERENCEHINT;Код којји представља место првобитног преноса (референца првог преноса). MAIN_BUTTON_FULLSCREEN;Цео екран MAIN_BUTTON_NAVNEXT_TOOLTIP;Шаље вас на наредну слику у односу на отворену у прозору за уређивање.\nПречица: Shift-F4\n\nТакође, омогућа вам да идете на наредну слику у односу на тренутно изабрану у разгледачу или филмској траци.\nПречица: F4 MAIN_BUTTON_NAVPREV_TOOLTIP;Шаље вас на претходну слику у односу на отворену у прозору за уређивање.\nПречица: Shift-F3\n\nnТакође, омогућа вам да идете на наредну слику у односу на тренутно изабрану у разгледачу или филмској траци.\nПречица: F3 @@ -509,7 +475,6 @@ MAIN_BUTTON_PREFERENCES;Поставке MAIN_BUTTON_PUTTOQUEUE;Закажи MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;Додаје тренутну слику у заказане Ctrl+B MAIN_BUTTON_SAVE;Сачувај -MAIN_BUTTON_SAVEAS;Као... MAIN_BUTTON_SAVE_TOOLTIP;Чува тренутну слику Ctrl+С MAIN_BUTTON_SENDTOEDITOR;Уреди MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Уређује тренутну слику у спољном програму Ctrl+Е @@ -553,7 +518,6 @@ MAIN_TAB_METADATA;Метаподаци MAIN_TAB_METADATA_TOOLTIP;Alt-m MAIN_TAB_RAW;RAW MAIN_TAB_RAW_TOOLTIP;Alt-r -MAIN_TAB_TAGGING;Ознаке MAIN_TAB_TRANSFORM;Исправке MAIN_TAB_TRANSFORM_TOOLTIP;Alt-t MAIN_TOOLTIP_BACKCOLOR0;Боја позадине за преглед: На основу теме\nПречица: 9 @@ -574,24 +538,6 @@ MAIN_TOOLTIP_SHOWHIDERP1;Приказује/сакрива десну површ MAIN_TOOLTIP_SHOWHIDETP1;Приказује/сакрива горњу површ Shift-L MAIN_TOOLTIP_THRESHOLD;Праг MAIN_TOOLTIP_TOGGLE;Приказује слику пре и после обраде Б -NAVIGATOR_B_NA;П = ○ -NAVIGATOR_B_VALUE;П = %1 -NAVIGATOR_G_NA;З = ○ -NAVIGATOR_G_VALUE;З = %1 -NAVIGATOR_H_NA;Х = ○ -NAVIGATOR_H_VALUE;Х = %1 -NAVIGATOR_LAB_A_NA;А = ○ -NAVIGATOR_LAB_A_VALUE;А = %1 -NAVIGATOR_LAB_B_NA;Б = ○ -NAVIGATOR_LAB_B_VALUE;Б = %1 -NAVIGATOR_LAB_L_NA;Л = ○ -NAVIGATOR_LAB_L_VALUE;Л = %1 -NAVIGATOR_R_NA;Ц = ○ -NAVIGATOR_R_VALUE;Ц = %1 -NAVIGATOR_S_NA;С = ○ -NAVIGATOR_S_VALUE;С = %1 -NAVIGATOR_V_NA;В = ○ -NAVIGATOR_V_VALUE;В = %1 NAVIGATOR_XY_FULL;Ширина = %1, Висина = %2 NAVIGATOR_XY_NA;x = ○, y = ○ OPTIONS_DEFIMG_MISSING;Није пронађен или доступан подразумевани профил за слике које нису у сировом формату.\n\nПроверите фасциклу са профилима, можда не постоји или је оштећена.\n\nБиће коришћене подразумеване вредности. @@ -624,28 +570,21 @@ PARTIALPASTE_FLATFIELDBLURTYPE;Начин замућења РК PARTIALPASTE_FLATFIELDFILE;Датотека за равни кадар PARTIALPASTE_GRADIENT;Филтер градијента PARTIALPASTE_HSVEQUALIZER;Уједначење ХСВ -PARTIALPASTE_ICMGAMMA;Излазна гама PARTIALPASTE_ICMSETTINGS;ИЦМ подешавања PARTIALPASTE_IMPULSEDENOISE;Импулсно уклањање шума PARTIALPASTE_IPTCINFO;ИПТЦ подави PARTIALPASTE_LABCURVE;Лаб крива PARTIALPASTE_LENSGROUP;Подешавања објектива PARTIALPASTE_LENSPROFILE;Профил за исправке објектива -PARTIALPASTE_LUMACURVE;Крива луминасе -PARTIALPASTE_METAICMGROUP;Метаподаци/ИЦМ подешавања PARTIALPASTE_PCVIGNETTE;Филтер вињетарења PARTIALPASTE_PERSPECTIVE;Перспектива PARTIALPASTE_PREPROCESS_GREENEQUIL;Уједначавање зелене -PARTIALPASTE_PREPROCESS_HOTDEADPIXFILT;Филтер врелих/мртвих пиксела PARTIALPASTE_PREPROCESS_LINEDENOISE;Линијски филтер шума PARTIALPASTE_RAWCACORR_AUTO;Ауто хроматске аберације -PARTIALPASTE_RAWCACORR_CABLUE;Плава хроминанса -PARTIALPASTE_RAWCACORR_CARED;Црвена хроминанса PARTIALPASTE_RAWEXPOS_BLACK;Ниво црне PARTIALPASTE_RAWEXPOS_LINEAR;Линеарни фактор исправке RAW беле тачке PARTIALPASTE_RAWEXPOS_PRESER;Raw тачка беле уз очување светлих делова PARTIALPASTE_RAWGROUP;Raw подешавања -PARTIALPASTE_RAW_ALLENHANCE;Уклони шум након расклапања мозаика PARTIALPASTE_RAW_DCBENHANCE;Примени корак ДЦБ побољшања PARTIALPASTE_RAW_DCBITERATIONS;Број ДЦБ понављања PARTIALPASTE_RAW_DMETHOD;Начин расклапања мозаика @@ -661,7 +600,6 @@ PARTIALPASTE_SHARPENMICRO;Микроконтраст PARTIALPASTE_VIBRANCE;Живост боја PARTIALPASTE_VIGNETTING;Исправљање вињетарења PARTIALPASTE_WHITEBALANCE;Баланс беле -POPUPBUTTON_SELECTOPTIONHINT;РМБ за измену опције PREFERENCES_ADD;Додај PREFERENCES_APPLNEXTSTARTUP;примењује се након поновног покретања PREFERENCES_AUTOMONPROFILE;Сам примени профиле монитора из оперативног система @@ -672,24 +610,16 @@ PREFERENCES_BEHAVIOR;Понашање PREFERENCES_BEHSETALL;Све у „Постави“ PREFERENCES_BEHSETALLHINT;Поставља све параметре у режим Постави.\nЊихово подешавање помоћу алата из панела за заказано ће бити апсолутне вредности као што су и изабране. PREFERENCES_BLACKBODY;Обична сијалица -PREFERENCES_BLINKCLIPPED;Покажи претамне/пресветле делове PREFERENCES_CACHECLEARALL;Обриши све PREFERENCES_CACHECLEARPROFILES;Обриши профиле PREFERENCES_CACHECLEARTHUMBS;Обриши приказе -PREFERENCES_CACHEFORMAT1;Власнички (брже и боље) -PREFERENCES_CACHEFORMAT2;JPEG (мање места на диску) PREFERENCES_CACHEMAXENTRIES;Највећи број мест у остави PREFERENCES_CACHEOPTS;Подешавање оставе -PREFERENCES_CACHETHUMBFORM;Формат умањених приказа PREFERENCES_CACHETHUMBHEIGHT;Највећа висина приказа PREFERENCES_CIEART;CIECAM02 оптимизација PREFERENCES_CIEART_LABEL;Једнострука тачност уместо двоструке PREFERENCES_CIEART_TOOLTIP;Уколико је омогућено, ради CIECAM02 рачунања са једноструком тачношћу уместо са двоструком. Ово даје мало повећање брзине уз неизоставан губитак на квалитету. -PREFERENCES_CLEARDLG_LINE1;Чишћење оставе -PREFERENCES_CLEARDLG_LINE2;Ово може да потраје неколико секунди. -PREFERENCES_CLEARDLG_TITLE;Сачекајте PREFERENCES_CLIPPINGIND;Показивачи одсечених делова -PREFERENCES_CMETRICINTENT;Колориметријска намера PREFERENCES_CUSTPROFBUILD;Изградња произвољног почетног профила слике PREFERENCES_CUSTPROFBUILDHINT;Извршна датотека (или скрипта) која се позива када изграђујете нови почетни профил за слику.nПрихвата параметре из командне линије ради прављења .pp3 датотеке на основу неких правила:n[Путања до RAW/JPG] [Путања подразумеваног профила] [Бленда] [Експозиција у s] [Жижна дужина mm] [ИСО] [Објектив] [Фото-апарат] PREFERENCES_CUSTPROFBUILDKEYFORMAT;Кључни формати @@ -706,10 +636,7 @@ PREFERENCES_DARKFRAMEFOUND;Нађен PREFERENCES_DARKFRAMESHOTS;снимака PREFERENCES_DARKFRAMETEMPLATES;шаблони PREFERENCES_DATEFORMAT;Формат датума -PREFERENCES_DATEFORMATFRAME;Формат PREFERENCES_DATEFORMATHINT;Можете задати следеће формате:\n%y :година\n%m : месец\n%d : дан\n\nУ Србији се највише користи:\n%d.%m.%y -PREFERENCES_DEFAULTLANG;Језик програма -PREFERENCES_DEFAULTTHEME;Тема програма PREFERENCES_DIRDARKFRAMES;Директоријум тамног кадра PREFERENCES_DIRHOME;Лични директоријум PREFERENCES_DIRLAST;Последњи директоријум @@ -741,7 +668,6 @@ PREFERENCES_GREY18;Yb=18 CIE L#50 PREFERENCES_GREY23;Yb=23 CIE L#55 PREFERENCES_GREY30;Yb=30 CIE L#60 PREFERENCES_GREY40;Yb=40 CIE L#70 -PREFERENCES_GTKTHEME;ГТК тема PREFERENCES_HISTOGRAMPOSITIONLEFT;Хистограм у левој површи PREFERENCES_HLTHRESHOLD;Праг за одсечене светле делове PREFERENCES_ICCDIR;ИЦЦ директоријум @@ -759,7 +685,6 @@ PREFERENCES_MENUGROUPPROFILEOPERATIONS;Групиши радње са профи PREFERENCES_MENUGROUPRANK;Групиши оцењивање PREFERENCES_MENUOPTIONS;Опције менија PREFERENCES_METADATA;Метаподаци -PREFERENCES_MONITORICC;Профил монитора PREFERENCES_MULTITAB;Режим у више листова PREFERENCES_MULTITABDUALMON;Режим у више листова, на другом монитору PREFERENCES_OUTDIR;Излазни директоријум @@ -769,7 +694,6 @@ PREFERENCES_OUTDIRTEMPLATE;Употреби шаблон PREFERENCES_OUTDIRTEMPLATEHINT;Можете да задате следеће скраћенице за форматирање:\n%f, %d1, %d2, ..., %p1, %p2, ...\n\nОви знакови за форматирање се односе на директоријуме, подпутање путања до raw датотеке.\n\nНа пример, уколико је отворена слика /home/ivan/слике/02.09.2010/dsc0012.nef, скраћенице означавају:\n%f=dsc0012, %d1=02.09.2010, %d2=слике, ...\n%p1=/home/ivan/слике/02.09.2010, %p2=/home/ivan/слике, %p3=/home/ivan, ...\n\nУколико желите да сачувате развијену слику поред оригинала, унесите:\n%p1/%f\n\nУколико желите да сачувате излазну слику у директоријум „развијене“ који се налази где и оригинална слика, унесите:\n%p1/развијене/%f\n\nУколико желите да сачувате развијену слику у директоријум „/home/ivan/развијене“, а да структура поддиректоријума остане очувана, унесите:\n%p2/развијене/%d1/%f PREFERENCES_OVERLAY_FILENAMES;Постави преко умањеног приказа PREFERENCES_OVERWRITEOUTPUTFILE;Препиши постојеће излазне датотеке -PREFERENCES_PANFACTORFRAME;Убрзање при померању платна PREFERENCES_PANFACTORLABEL;Фактор PREFERENCES_PARSEDEXT;Екстензије за приказ PREFERENCES_PARSEDEXTADD;Додај екстензију @@ -792,16 +716,13 @@ PREFERENCES_SET;Постави PREFERENCES_SHOWBASICEXIF;Прикажи основне Exif податке PREFERENCES_SHOWDATETIME;Прикажи датум и време PREFERENCES_SHOWEXPOSURECOMPENSATION;Додај компензацију експозиције -PREFERENCES_SHOWPROFILESELECTOR;Прикажи избор профила PREFERENCES_SHTHRESHOLD;Праг за одсечене тамне делове PREFERENCES_SINGLETAB;Режим у једном листу PREFERENCES_SINGLETABVERTAB;Режим у једном листу, вертикални листови -PREFERENCES_SLIMUI;Танки изглед PREFERENCES_SND_BATCHQUEUEDONE;Обрађене су заказане датотеке PREFERENCES_SND_HELP;Унесите путању до датотеке или оставите празно уколико не желите звук. На Windows-у можете да користите „SystemDefault“, „SystemAsterisk“ за системске звуке. PREFERENCES_SND_LNGEDITPROCDONE;Уредник је завршио обраду PREFERENCES_SND_TRESHOLDSECS;бр. секунди -PREFERENCES_SQUAREDETAILWINDOW;Коцкаст прозор са детаљима (брже) PREFERENCES_STARTUPIMDIR;Директоријум по покретању PREFERENCES_TAB_BROWSER;Преглед датотека PREFERENCES_TAB_COLORMGR;Управљање бојама @@ -814,12 +735,9 @@ PREFERENCES_TP_USEICONORTEXT;Користи иконице језичка уме PREFERENCES_TP_VSCROLLBAR;Сакриј клизаче у области са алаткама PREFERENCES_TUNNELMETADATA;Копирај неизмењене IPTC/XMP (када је слика означена другим програмом) PREFERENCES_USEBUNDLEDPROFILES;Користи профиле који долазе уз програм -PREFERENCES_USESYSTEMTHEME; Користи системску тему PREFERENCES_VIEW;Баланс беле излазног уређаја (монитор, ТВ, пројакетор и др.) PREFERENCES_WORKFLOW;Ток обраде PROFILEPANEL_COPYPPASTE;Параметри за копирање -PROFILEPANEL_FILEDLGFILTERANY;Све датотеке -PROFILEPANEL_FILEDLGFILTERPP;Профили за обраду PROFILEPANEL_GLOBALPROFILES;Профили из програма PROFILEPANEL_LABEL;Профили обраде PROFILEPANEL_LOADDLGLABEL;Учитај профил за обраду... @@ -850,10 +768,7 @@ PROGRESSBAR_SAVEJPEG;Чувам JPEG датотеку... PROGRESSBAR_SAVEPNG;Чувам PNG датотеку... PROGRESSBAR_SAVETIFF;Чувам TIFF датотеку... PROGRESSBAR_SNAPSHOT_ADDED;Додат је снимак -PROGRESSDLG_LOADING;Учитавам датотеку... -PROGRESSDLG_PROCESSING;Обрађујем слику... PROGRESSDLG_PROFILECHANGEDINBROWSER;Профил измењен у разгледачу -PROGRESSDLG_SAVING;Чувам датотеку... P_GAMMA_CURV;гама QINFO_ISO;ИСО QINFO_NOEXIF;Нису доступни Exif подаци. @@ -861,7 +776,6 @@ SAVEDLG_AUTOSUFFIX;Сам додај суфикс уколико датотек SAVEDLG_FILEFORMAT;Формат датотеке SAVEDLG_FORCEFORMATOPTS;Приморај могућности за чување SAVEDLG_JPEGQUAL;JPEG квалитет -SAVEDLG_JPGFILTER;JPEG датотеке SAVEDLG_PNGCOMPR;PNG паковање SAVEDLG_PUTTOQUEUE;Заказује слику за обраду SAVEDLG_PUTTOQUEUEHEAD;Премешта слику на почетак заказаних @@ -873,7 +787,6 @@ SAVEDLG_SUBSAMP_1;Најбоља компресија SAVEDLG_SUBSAMP_2;Балансирано SAVEDLG_SUBSAMP_3;Најбољи квалитет SAVEDLG_SUBSAMP_TOOLTIP;Најбоља компресија: 4:1:1\nБалансирано: 4:2:2\nНајбољи квалитет: 4:4:4 -SAVEDLG_TIFFFILTER;TIFF датотеке SAVEDLG_TIFFUNCOMPRESSED;Незапаковани TIFF SAVEDLG_WARNFILENAME;Датотека ће бити названа SHCSELECTOR_TOOLTIP;Кликните десно дугме миша да поново вратите позицију ова три клизача. @@ -893,7 +806,6 @@ TP_BWMIX_ALGO_SP;Специјални ефекти TP_BWMIX_ALGO_TOOLTIP;Линеарно: производи нормални линеарни одговор.\nСпецијални ефекти: производи специјалне ефекте мешајући канале нелинеарно. TP_BWMIX_AUTOCH;Ауто TP_BWMIX_AUTOCH_TIP;Израчунај вредности тако да оптимизује мешање канала. -TP_BWMIX_BLUE;Плава TP_BWMIX_CC_ENABLED;Подеси комплементарну боју TP_BWMIX_CC_TOOLTIP;Омогући за аутоматско подешавање комплементарне боје у ROYGCBPM режиму. TP_BWMIX_CHANNEL;Уједначавање луминансе @@ -902,7 +814,6 @@ TP_BWMIX_CURVEEDITOR2;„Након“ кривуље TP_BWMIX_CURVEEDITOR_AFTER_TOOLTIP;Крива тонова након ЦБ превођења, на крају третмана. TP_BWMIX_CURVEEDITOR_BEFORE_TOOLTIP;Крива тонова, тик пред ЦБ превођење.\nМоже да узме у обзир и компоненте боје. TP_BWMIX_CURVEEDITOR_LH_TOOLTIP;Луминанса на основу нијансе L=f(H).\nОбратите пажњу на екстремне вредности пошто оне могу да направе нежељене ефекте. -TP_BWMIX_CYAN;Светло-плава TP_BWMIX_FILTER;Филтер боја TP_BWMIX_FILTER_BLUE;Плава TP_BWMIX_FILTER_BLUEGREEN;Плаво-зелена @@ -912,9 +823,7 @@ TP_BWMIX_FILTER_NONE;Ни једна TP_BWMIX_FILTER_PURPLE;Љубичаста TP_BWMIX_FILTER_RED;Црвена TP_BWMIX_FILTER_REDYELLOW;Црвено-Жута -TP_BWMIX_GREEN;Зелена TP_BWMIX_LABEL;Црна и бела -TP_BWMIX_MAGENTA;Љубичаста TP_BWMIX_MET;Начин TP_BWMIX_MET_CHANMIX;Мешање канала TP_BWMIX_MET_DESAT;Уклањање боје @@ -922,9 +831,6 @@ TP_BWMIX_MET_LUMEQUAL;Уједначавање луминансе TP_BWMIX_MIXC;Мешање TP_BWMIX_NEUTRAL;Врати мешање TP_BWMIX_NEUTRAL_TIP;Врати све вреднсоти (филтер боје, мешање канала) на подразумеване. -TP_BWMIX_ORANGE;Наранџаста -TP_BWMIX_PURPLE;Љубичаста -TP_BWMIX_RED;Црвена TP_BWMIX_RGBLABEL;Р: %1%% Г: %2%% Б: %3%% Укупно: %4%% TP_BWMIX_RGBLABEL_HINT;Коначни РГБ фактори који се брину о опцијама за мешање.\n„Укупно“ приказује збир РГБ вредности:\n- у 100% у релативном режиму\n- више (светлије) или мање (тамније) од 100% у апсолутном режиму. TP_BWMIX_RGB_TOOLTIP;Мешање РГБ канала. Користите постојеће преподешене параметре као водиљу.\nОбратите пажњу на негативне вреднсти које могу да направе грешке унутар слике или изазову неправилно понашање. @@ -950,7 +856,6 @@ TP_BWMIX_TCMODE_SATANDVALBLENDING;Црно-бели, стапање засиће TP_BWMIX_TCMODE_STANDARD;Црно-бели, уобичајени TP_BWMIX_TCMODE_WEIGHTEDSTD;Црно-бели, мерени стандард TP_BWMIX_VAL;L -TP_BWMIX_YELLOW;Жута TP_CACORRECTION_BLUE;Плава TP_CACORRECTION_LABEL;Хроматке аберације TP_CACORRECTION_RED;Црвена @@ -959,7 +864,6 @@ TP_CHMIXER_GREEN;Зелена TP_CHMIXER_LABEL;Мешање канала TP_CHMIXER_RED;Црвена TP_CHROMATABERR_LABEL;Хроматске аберације -TP_COARSETRAF_DEGREE;степени: TP_COARSETRAF_TOOLTIP_HFLIP;Изврће слику хоризонтално TP_COARSETRAF_TOOLTIP_ROTLEFT;Окреће слику улево TP_COARSETRAF_TOOLTIP_ROTRIGHT;Окреће слику удесно @@ -1036,32 +940,11 @@ TP_COLORAPP_TONECIE;Мапирање тонова у CIECAM02 TP_COLORAPP_TONECIE_TOOLTIP;Уколико је искључена ова опција, мапирање тонова се врши у Лаб окружењу.\nУколико је укључена, мапирање се врши помоћу CIECAM02.\nМорате користити алат за мапирање тонова како би ова опција била примењена. TP_COLORAPP_WBCAM;Баланс беле [RT+CAT02] + [излаз] TP_COLORAPP_WBRT;Баланс беле [RT] + [излаз] -TP_COLORBOOST_ACHANNEL;Канал „а“ -TP_COLORBOOST_AMOUNT;Количина -TP_COLORBOOST_AVOIDCOLORCLIP;Избегни одсецање боја -TP_COLORBOOST_BCHANNEL;Канал „б“ -TP_COLORBOOST_CHANNEL;Канал -TP_COLORBOOST_CHSEPARATE;раздвоји -TP_COLORBOOST_ENABLESATLIMITER;Омогући ограничење засићености -TP_COLORBOOST_LABEL;Појачање боја -TP_COLORBOOST_SATLIMIT;Граница за засићеност -TP_COLORDENOISE_EDGESENSITIVE;Осетљиво на ивице -TP_COLORDENOISE_EDGETOLERANCE;Толеранција ивице -TP_COLORDENOISE_LABEL;Уклаљање колорног шума -TP_COLORDENOISE_RADIUS;Полупречник -TP_COLORSHIFT_BLUEYELLOW;Плава-Жута -TP_COLORSHIFT_GREENMAGENTA;Зелена-Љубичаста -TP_COLORSHIFT_LABEL;Померање боја -TP_CROP_DPI;ТПИ= TP_CROP_FIXRATIO;Сразмерно: TP_CROP_GTDIAGONALS;Правило дијагонала TP_CROP_GTEPASSPORT;Биометријски пасош TP_CROP_GTFRAME;Оквир TP_CROP_GTGRID;Мрежа -TP_CROP_GTHARMMEANS1;Златни пресек 1 -TP_CROP_GTHARMMEANS2;Златни пресек 2 -TP_CROP_GTHARMMEANS3;Златни пресек 3 -TP_CROP_GTHARMMEANS4;Златни пресек 4 TP_CROP_GTNONE;Ништа TP_CROP_GTRULETHIRDS;Правило трећина TP_CROP_GUIDETYPE;Вођицe: @@ -1077,7 +960,6 @@ TP_DARKFRAME_LABEL;Тамни кадар TP_DEFRINGE_LABEL;Уклаљање ореола TP_DEFRINGE_RADIUS;Полупречник TP_DEFRINGE_THRESHOLD;Праг -TP_DETAIL_AMOUNT;Количина TP_DIRPYRDENOISE_BLUE;Хроминанса: Плава-Жута TP_DIRPYRDENOISE_CHROMA;Боја TP_DIRPYRDENOISE_ENH;Побољшани режим @@ -1089,7 +971,6 @@ TP_DIRPYRDENOISE_LDETAIL;Детаљи луминансе TP_DIRPYRDENOISE_LUMA;Луминанса TP_DIRPYRDENOISE_METHOD;Начин TP_DIRPYRDENOISE_METHOD_TOOLTIP;За рав слике можете користити РГБ или Лаб режиме.\n\nЗа остале слике се користи Лаб, без обзира на избор. -TP_DIRPYRDENOISE_PERF;РГБ режим (raw слике) TP_DIRPYRDENOISE_RED;Хроминанса - црвена-зелена TP_DIRPYRDENOISE_RGB;РГБ TP_DIRPYREQUALIZER_LABEL;Детаљни ниво контраста @@ -1100,8 +981,6 @@ TP_DIRPYREQUALIZER_LUMAFINEST;фино TP_DIRPYREQUALIZER_LUMANEUTRAL;Неутрално TP_DIRPYREQUALIZER_THRESHOLD;Праг TP_DISTORTION_AMOUNT;Количина -TP_DISTORTION_AUTO;Сам исправи изобличења -TP_DISTORTION_AUTO_TIP;(Експериментално) Аутоматски исправља изобличења неких апарата (М4/3, неки компакти, и др.) TP_DISTORTION_LABEL;Изобличења TP_EPD_EDGESTOPPING;Изоштравање ивице TP_EPD_LABEL;Мапирање тонова @@ -1109,13 +988,6 @@ TP_EPD_REWEIGHTINGITERATES;Број поновних мерења TP_EPD_SCALE;Размера TP_EPD_STRENGTH;Јачина TP_EPD_TOOLTIP;Мапирање тонова је могуће у Лаб (стандардном) или CIECAM02 режиму.\n\nЗа рад у CIECAM02 режиму укључите:\n1. CIECAM02\n2. Алгоритам="Осветљење + живописност (QM)"\n3. "Мапирање тонова у CIECAM02 осветљењу (Q)" -TP_EQUALIZER_CONTRAST_MINUS;Контраст - -TP_EQUALIZER_CONTRAST_PLUS;Контраст + -TP_EQUALIZER_FINEST;најфиније -TP_EQUALIZER_LABEL;Таласно уједначење -TP_EQUALIZER_LARGEST;најгрубље -TP_EQUALIZER_NEUTRAL;Неутрално -TP_EXPOSCORR_LABEL;Raw бела тачка TP_EXPOSURE_AUTOLEVELS;Ауто-нивои TP_EXPOSURE_AUTOLEVELS_TIP;Омогућава аутоматско одређивање нивоа, који подешава клизаче експозиције на основу податка о самој слици.\nУкључује чупање светлих делова уколико је неопходно. TP_EXPOSURE_BLACKLEVEL;Црна @@ -1139,7 +1011,6 @@ TP_EXPOSURE_TCMODE_LABEL2;2. режим криве TP_EXPOSURE_TCMODE_SATANDVALBLENDING;Утапање засићености и вредности TP_EXPOSURE_TCMODE_STANDARD;Стандард TP_EXPOSURE_TCMODE_WEIGHTEDSTD;Уравнотежени стандард -TP_EXPO_AFTER; Пре интерполације (пре превода у РГБ) TP_FLATFIELD_AUTOSELECT;Сам изабери TP_FLATFIELD_BLURRADIUS;Полупречник замућења TP_FLATFIELD_BLURTYPE;Замути @@ -1148,7 +1019,6 @@ TP_FLATFIELD_BT_HORIZONTAL;Хоризонтално TP_FLATFIELD_BT_VERTHORIZ;Хориз. и вертик. TP_FLATFIELD_BT_VERTICAL;Вертикално TP_FLATFIELD_LABEL;Равно поље -TP_GAMMA_COMMENT;(онемогућен је излазни профил, осим „default“) TP_GAMMA_CURV;Гама TP_GAMMA_FREE;Гама слобода TP_GAMMA_OUTPUT;Излазна гама @@ -1173,14 +1043,6 @@ TP_HLREC_ENA_TOOLTIP;Може се активирати опцијом „Аут TP_HLREC_LABEL;Чупање светлих делова TP_HLREC_LUMINANCE;Извлачење луминансе TP_HLREC_METHOD;Начин: -TP_HSVEQUALIZER1;Црвена -TP_HSVEQUALIZER2;Жута -TP_HSVEQUALIZER3;Лимун -TP_HSVEQUALIZER4;Зелена -TP_HSVEQUALIZER5;Водена -TP_HSVEQUALIZER6;Плава -TP_HSVEQUALIZER7;Љубичаста -TP_HSVEQUALIZER8;Магнета TP_HSVEQUALIZER_CHANNEL;ХСВ канал TP_HSVEQUALIZER_HUE;Нијанса TP_HSVEQUALIZER_LABEL;Уједначење ХСВ канала @@ -1190,9 +1052,6 @@ TP_ICM_BLENDCMSMATRIX;Утопи светле делове у матрицу TP_ICM_BLENDCMSMATRIX_TOOLTIP;Омогућите како би повратили преосветљене делове уколико користите LUT ICC профиле. TP_ICM_DCPILLUMINANT;Илуминантно TP_ICM_DCPILLUMINANT_INTERPOLATED;Интерполирано -TP_ICM_FILEDLGFILTERANY;Било која датотека -TP_ICM_FILEDLGFILTERICM;ИЦЦ профили -TP_ICM_GAMMABEFOREINPUT;Профил за примену Гаме TP_ICM_INPUTCAMERA;Подразумевано из апарата TP_ICM_INPUTCAMERAICC;Фото-апарат или стандардни ИЦЦ TP_ICM_INPUTCAMERA_TOOLTIP;Користи просту матрицу боја из програма dcraw, унапређену RawTherapee верзију (која год да је доступна за ваш модел фото-апарата) или неки од уграђених DNG профила. @@ -1207,14 +1066,12 @@ TP_ICM_INPUTPROFILE;Улазни профил TP_ICM_LABEL;ИЦМ TP_ICM_NOICM;No ICM: sRGB излаз TP_ICM_OUTPUTPROFILE;Излазни профил -TP_ICM_SAVEREFERENCE;Сачувај слику као референцу за профил TP_ICM_SAVEREFERENCE_TOOLTIP;Сачувај линеарну TIFF слику пре примене улазног профила. Резултат може да се користи за калибрацију и израду профила фото-апарата. TP_ICM_TONECURVE;Користи DCP криву тонова TP_ICM_TONECURVE_TOOLTIP;Употребљава уграђену DCP криву тонова. Ово подешавање је омогућено само ако изабрани DCP има криву тонова. TP_ICM_WORKINGPROFILE;Радни профил TP_IMPULSEDENOISE_LABEL;Импулсно уклањање шума TP_IMPULSEDENOISE_THRESH;Праг -TP_LABCURVE_AVOIDCOLORCLIP;Онемогући одсецање боје TP_LABCURVE_AVOIDCOLORSHIFT;Избегни померање боја TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Поставља боје у опсег тренутног радног простора боја и примењује Мунселову корекцију. TP_LABCURVE_BRIGHTNESS;Осветљеност @@ -1247,29 +1104,18 @@ TP_LABCURVE_CURVEEDITOR_LC_TOOLTIP;Светност као функција бо TP_LABCURVE_CURVEEDITOR_LH;LH TP_LABCURVE_CURVEEDITOR_LH_TOOLTIP;Светлост као функција нијансе L=f(H) TP_LABCURVE_CURVEEDITOR_LL_TOOLTIP;Светлост као функција светлости L=f(L) -TP_LABCURVE_ENABLESATLIMITER;Укључи граничник засићености TP_LABCURVE_LABEL;Лаб крива TP_LABCURVE_LCREDSK;Ограничи LC на црвену и боју коже TP_LABCURVE_LCREDSK_TIP;Уколико је укључено, LC крива ће утицати само на црвену и боју коже.\nУ супротном се примењује на све тонове. TP_LABCURVE_RSTPROTECTION;Заштита црвене и боје коже TP_LABCURVE_RSTPRO_TOOLTIP;Може се користити са клизачем за Хроминансу и CC кривом. -TP_LABCURVE_SATLIMIT;Граничник засићености -TP_LABCURVE_SATURATION;Засићеност TP_LENSGEOM_AUTOCROP;Сам исеци TP_LENSGEOM_FILL;Сам попуни TP_LENSGEOM_LABEL;Објектив и геометрија -TP_LENSPROFILE_FILEDLGFILTERLCP;Фајлови са изобличењима објектива TP_LENSPROFILE_LABEL;Профили за исправљање изобличења објектива TP_LENSPROFILE_USECA;Исправљање хром. аберација TP_LENSPROFILE_USEDIST;Исправљање изобличења TP_LENSPROFILE_USEVIGN;Исправљање вињетарења -TP_LUMACURVE_BLACKLEVEL;Црна -TP_LUMACURVE_BRIGHTNESS;Осветљење -TP_LUMACURVE_COMPRHIGHLIGHTS;Сабијање светлог -TP_LUMACURVE_COMPRSHADOWS;Сабијање сенки -TP_LUMACURVE_CONTRAST;Контраст -TP_LUMACURVE_CURVEEDITOR;Крива лиминансе -TP_LUMACURVE_LABEL;Крива луминансе TP_NEUTRAL;Неутрално TP_NEUTRAL_TIP;Враћа клизаче експозиције на неутралне вредности.\nПримењује се на исте контроле као у Ауто нивои, без обзира на то да ли сте користили Ауто нивое или не. TP_PCVIGNETTE_FEATHER;Умекшавање @@ -1285,23 +1131,16 @@ TP_PERSPECTIVE_VERTICAL;Вертикална TP_PFCURVE_CURVEEDITOR_CH;Нијанса TP_PFCURVE_CURVEEDITOR_CH_TOOLTIP;Одређује јачину уклаљања боје.\nВишље = више,\nНиже = мање. TP_PREPROCESS_GREENEQUIL;Калибрација зелене боје -TP_PREPROCESS_HOTDEADPIXFILT;Избаци прегореле и мртве пикселе -TP_PREPROCESS_HOTDEADPIXFILT_TOOLTIP;Покушава да уклони вруће и мртве пикселе. TP_PREPROCESS_LABEL;Предобрада TP_PREPROCESS_LINEDENOISE;Линијски филтер шума TP_PREPROCESS_NO_FOUND;Није пронађено TP_RAWCACORR_AUTO;Исправи хроматске аберације TP_RAWCACORR_CABLUE;Плава TP_RAWCACORR_CARED;Црвена -TP_RAWEXPOS_BLACKONE;Ниво црне: Црвена TP_RAWEXPOS_BLACKS;Ниво црне -TP_RAWEXPOS_BLACKTHREE;Ниво црне: Зелена 2 -TP_RAWEXPOS_BLACKTWO;Ниво црне: Плава -TP_RAWEXPOS_BLACKZERO;Ниво црне: Зелена 1 (водећа) TP_RAWEXPOS_LINEAR;Линеарни фактор корекције TP_RAWEXPOS_PRESER;Очување светлих делова TP_RAWEXPOS_TWOGREEN;Обе зелене -TP_RAW_ALLENHANCE;Уклони артафакте/шум након расклапања TP_RAW_DCBENHANCE;Примени ДЦБ побољшање TP_RAW_DCBITERATIONS;Број ДЦБ пролаза TP_RAW_DMETHOD;Начин @@ -1313,13 +1152,7 @@ TP_RAW_LABEL;Расклапање мозаика TP_RAW_LMMSEITERATIONS;Кораци LMMSE побољшања TP_RAW_LMMSE_TOOLTIP;Додаје гаму (корак 1), медијан (кораци 2-4) и побољшања (кораци 5-6) како би смањио неисправности и побољшао однос сигнал-према-шум. TP_RESIZE_APPLIESTO;Примени на: -TP_RESIZE_BICUBIC;Бикубично -TP_RESIZE_BICUBICSF;Бикубично (мекше) -TP_RESIZE_BICUBICSH;Бикубично (оштрије) -TP_RESIZE_BILINEAR;Билинеарно TP_RESIZE_CROPPEDAREA;Исечену област -TP_RESIZE_DOWNSCALEB;Смањење размере (боље) -TP_RESIZE_DOWNSCALEF;Смањење размере (брже) TP_RESIZE_FITBOX;Ширину и висину TP_RESIZE_FULLIMAGE;Целу слику TP_RESIZE_H;В: @@ -1339,9 +1172,7 @@ TP_RGBCURVES_LABEL;РГБ криве TP_RGBCURVES_LUMAMODE;Режим луминансе TP_RGBCURVES_LUMAMODE_TOOLTIP;Режим лиминансе омогућава да мењате удео црвеног, зеленог и плавог канала из луминансе слике што не утиче на промену боје фотографије. TP_RGBCURVES_RED;Ц -TP_ROTATE_AUTOCROP;Сам исеци TP_ROTATE_DEGREE;Степени: -TP_ROTATE_FILL;Попуни TP_ROTATE_LABEL;Ротација TP_ROTATE_SELECTLINE; Постави праву линију TP_SAVEDIALOG_OK_TIP;Пречица: Ctrl-Enter @@ -1371,7 +1202,6 @@ TP_SHARPENING_RLD_AMOUNT;Количина TP_SHARPENING_RLD_DAMPING;Пригушивање TP_SHARPENING_RLD_ITERATIONS;Понављања TP_SHARPENING_THRESHOLD;Праг -TP_SHARPENING_TOOLTIP;Очекујте нешто другачији ефекат када користите CIECAM02. Уколико приметите разлике, подесите их по свом укусу. TP_SHARPENING_USM;Оштрина маске TP_SHARPENMICRO_AMOUNT;Количина TP_SHARPENMICRO_LABEL;Микроконттраст @@ -1464,9 +1294,24 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. !DIRBROWSER_FOLDERS;Folders +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_EQUALIZER;Bypass Wavelet Levels +!EXPORT_PIPELINE;Processing pipeline +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !FILEBROWSER_POPUPCOLORLABEL0;Label: None !FILEBROWSER_POPUPCOLORLABEL1;Label: Red !FILEBROWSER_POPUPCOLORLABEL2;Label: Yellow @@ -1480,6 +1325,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !FILEBROWSER_POPUPRANK3;Rank 3 *** !FILEBROWSER_POPUPRANK4;Rank 4 **** !FILEBROWSER_POPUPRANK5;Rank 5 ***** +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWNOTTRASHHINT;Show only non-deleted images. !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !FILECHOOSER_FILTER_ANY;All files @@ -1492,6 +1338,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_252;CbDL - Skin tar/prot !HISTORY_MSG_253;CbDL - Reduce artifacts !HISTORY_MSG_254;CbDL - Skin hue @@ -1600,7 +1447,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -1652,12 +1499,12 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1670,8 +1517,8 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -1683,7 +1530,58 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1706,6 +1604,9 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PARTIALPASTE_PREPROCESS_DEADPIXFILT;Dead pixel filter !PARTIALPASTE_PREPROCESS_HOTPIXFILT;Hot pixel filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue +!PARTIALPASTE_RAW_IMAGENUM;Sub-image +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_WAVELETGROUP;Wavelet Levels !PREFERENCES_AUTLISLOW;Low @@ -1718,17 +1619,20 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1738,6 +1642,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1745,9 +1650,10 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color !PREFERENCES_NAVIGATIONFRAME;Navigation !PREFERENCES_NOISE;Noise Reduction @@ -1758,7 +1664,12 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font @@ -1769,6 +1680,8 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1776,6 +1689,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_WLONE;One level !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No +!PROFILEPANEL_PDYNAMIC;Dynamic !SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. !SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_BL;Bottom-left @@ -1788,6 +1702,13 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1884,6 +1805,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_DIRPYREQUALIZER_SKIN;Skin targetting/protection !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_GAMMA;Gamma !TP_EXPOSURE_TCMODE_LUMINANCE;Luminance !TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptual @@ -1896,16 +1818,16 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_FLATFIELD_CLIPCONTROL;Clip control !TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_PREPROCESS_DEADPIXFILT;Dead pixel filter @@ -1923,11 +1845,72 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_RAWEXPOS_BLACK_GREEN;Green !TP_RAWEXPOS_BLACK_RED;Red !TP_RAWEXPOS_RGB;Red, Green, Blue +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. +!TP_RAW_LMMSE;LMMSE +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL !TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* !TP_RETINEX_CONTEDIT_LH;Hue equalizer @@ -2171,4 +2154,6 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !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_TMTYPE;Compression method !TP_WAVELET_TON;Toning +!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". !ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: Alt-f diff --git a/rtdata/languages/Serbian (Latin Characters) b/rtdata/languages/Serbian (Latin Characters) index c40fb9577..333c71203 100644 --- a/rtdata/languages/Serbian (Latin Characters) +++ b/rtdata/languages/Serbian (Latin Characters) @@ -13,8 +13,6 @@ CURVEEDITOR_CURVE;Krivulja CURVEEDITOR_CURVES;Krivulje CURVEEDITOR_CUSTOM;Proizvoljno CURVEEDITOR_DARKS;Tamno -CURVEEDITOR_FILEDLGFILTERANY;Sve datoteke -CURVEEDITOR_FILEDLGFILTERCURVE;Datoteke sa krivama CURVEEDITOR_HIGHLIGHTS;Presvetlo CURVEEDITOR_LIGHTS;Svetlo CURVEEDITOR_LINEAR;Linearno @@ -55,12 +53,9 @@ EXIFPANEL_RESETALLHINT;Vraća sve oznake na početne vrednosti EXIFPANEL_RESETHINT;Vraća izabranu oznaku na početnu vrednosti EXIFPANEL_SUBDIRECTORY;Poddirektorijum EXPORT_BYPASS_ALL;Izaberi / poništi sve -EXPORT_BYPASS_COLORDENOISE;Zanemari uklanjanje kolornog defrišuma EXPORT_BYPASS_DEFRINGE;Zanemari uklanjanje oreola EXPORT_BYPASS_DIRPYRDENOISE;Zanemari uklanjanje šuma EXPORT_BYPASS_DIRPYREQUALIZER;Zanemari detaljni nivo kontrasta -EXPORT_BYPASS_LUMADENOISE;Zanemari uklanjanje šuma luminase -EXPORT_BYPASS_RAW_ALL_ENHANCE;Zanemari uklanjanje artafakta/šuma nakon rasklapanja EXPORT_BYPASS_RAW_CA;Zanemari [raw] ispravljanje hromatskih aberacija EXPORT_BYPASS_RAW_CCSTEPS;Zanemari [raw] prigušivanje lažne boje EXPORT_BYPASS_RAW_DCB_ENHANCE;Zanemari [raw] DCB poboljšanje @@ -80,7 +75,6 @@ EXPORT_MAXHEIGHT;Najveća visina: EXPORT_MAXWIDTH;Najveća dužina: EXPORT_PUTTOQUEUEFAST; Zakaži za brz izvoz EXPORT_RAW_DMETHOD;Način rasklapanja mozaika -EXPORT_RESIZEMETHOD;Način promene veličine EXTPROGTARGET_1;raw EXTPROGTARGET_2;zakazano-razvijeno FILEBROWSER_ADDDELTEMPLATE;Dodaj/ukloni šablone... @@ -103,7 +97,6 @@ FILEBROWSER_DELETEDLGMSG;Da li sigurno želite da obrišete %1 datoteka? FILEBROWSER_DELETEDLGMSGINCLPROC;Da li želite da obrišete %1 izabranih datoteka, uključujući i one koje su zakazane? FILEBROWSER_EMPTYTRASH;Izbaci smeće FILEBROWSER_EMPTYTRASHHINT;Trajno briše datoteke iz smeća -FILEBROWSER_EXEC_CPB;Izgradi početni profil FILEBROWSER_EXTPROGMENU;Otvori pomoću FILEBROWSER_FLATFIELD;Ravno polje FILEBROWSER_MOVETODARKFDIR;Prebaci u fasciklu sa tamnim kadrovima @@ -140,7 +133,6 @@ FILEBROWSER_RANK3_TOOLTIP;Ocena 3 *\nPrečica: Shift-3 FILEBROWSER_RANK4_TOOLTIP;Ocena 4 *\nPrečica: Shift-4 FILEBROWSER_RANK5_TOOLTIP;Ocena 5 *\nPrečica: Shift-5 FILEBROWSER_RENAMEDLGLABEL;Preimenuj datoteku -FILEBROWSER_RENAMEDLGMSG;Preimenuj datoteku „%1“ u: FILEBROWSER_SELECTDARKFRAME;Izaberi tamni kadar... FILEBROWSER_SELECTFLATFIELD;Izaberi ravno polje... FILEBROWSER_SHOWCOLORLABEL1HINT;Prikazuje slike označene crvenom Alt-1 @@ -169,7 +161,6 @@ FILEBROWSER_STOPPROCESSINGHINT;Zaustavlja obradu slika FILEBROWSER_THUMBSIZE;Pregled FILEBROWSER_TOOLTIP_STOPPROCESSING;Pokreće obradu fotografija kada ih zakažete FILEBROWSER_UNRANK_TOOLTIP;Neocenjeno.\nPrečica: Shift-0 -FILEBROWSER_USETEMPLATE;Iskoristi šablon: FILEBROWSER_ZOOMINHINT;Uvećava pregled FILEBROWSER_ZOOMOUTHINT;Umanjuje pregled GENERAL_ABOUT;O programu @@ -202,7 +193,6 @@ HISTOGRAM_TOOLTIP_R;Prikazuje crveni histogram HISTOGRAM_TOOLTIP_RAW;Prikazuje/skriva RAW histogram HISTORY_CHANGED;Izmenjeno HISTORY_CUSTOMCURVE;Proizvoljna kriva -HISTORY_DELSNAPSHOT;Ukloni HISTORY_FROMCLIPBOARD;Iz ostave HISTORY_LABEL;Istorijat HISTORY_MSG_1;Slika je učitana @@ -460,47 +450,23 @@ HISTORY_NEWSNAPSHOT_TOOLTIP;Prečica: Alt-s HISTORY_SNAPSHOT;Snimak HISTORY_SNAPSHOTS;Snimak HRESHOLDSELECTOR_BL;Dole-levo -IPTCPANEL_AUTHOR;Autor -IPTCPANEL_AUTHORSPOSITION;Zvanje autora -IPTCPANEL_AUTHORSPOSITIONHINT;Zvanje jednog ili više autora (jedno po redi). -IPTCPANEL_CAPTION;Naziv -IPTCPANEL_CAPTIONHINT;Kratak opis dela (naslov — abstrakt). -IPTCPANEL_CAPTIONWRITER;Pisac naslova -IPTCPANEL_CAPTIONWRITERHINT;Ime osobe koje je uključena u pisanje, uređivanje ili ispravljanje slike/nazica/apstrakta (pisac — urednik). IPTCPANEL_CATEGORY;Kategorija -IPTCPANEL_CATEGORYHINT;Određuje šta se nalazi na slici (kategorija). IPTCPANEL_CITY;Grad -IPTCPANEL_CITYHINT;Grad u kome je slika nastalo (grad). IPTCPANEL_COPYHINT;Koppiraj IPTC pšodešavanja u ostavu -IPTCPANEL_COPYRIGHT;Autorska prava -IPTCPANEL_COPYRIGHTHINT;Beleška o autorskim pravima nad delom (beleška o autorskim pravima). IPTCPANEL_COUNTRY;Država -IPTCPANEL_COUNTRYHINT;Ime države/osnovnog mesta gde je nastala slika (država — naziv mesta). IPTCPANEL_CREDIT;Zasluge IPTCPANEL_CREDITHINT;Ukazuje da onaj ko izdaje sliku ne mora biti autor/vlasnik (Zasluge). IPTCPANEL_DATECREATED;Datum nastanka -IPTCPANEL_DATECREATEDHINT;Datum kada je stavljeno vlasništvo nad intelektualni sadržaj slike; Format: GGGGMMDD (datum nastanka). IPTCPANEL_EMBEDDED;Ugnježđeno IPTCPANEL_EMBEDDEDHINT;Vrati polja na IPTC podatke ugnježđene u sliku IPTCPANEL_HEADLINE;Naslov -IPTCPANEL_HEADLINEHINT;Naziv koji ukazuje na vezu sa sadržajem slike i pod kojim se ona izdaje (naslov). IPTCPANEL_INSTRUCTIONS;Uputstva -IPTCPANEL_INSTRUCTIONSHINT;Ostala uputstva urednika vezana za upotrebu slike (specijalna uputstva). IPTCPANEL_KEYWORDS;Ključne reči -IPTCPANEL_KEYWORDSHINT;Reči koje ukazuju na razne podatke o slici (ključne reči). IPTCPANEL_PASTEHINT;Ubaci IPTC podešavanja iz ostave -IPTCPANEL_PROVINCE;Pokrajina -IPTCPANEL_PROVINCEHINT;Pokrajina/država gde je nastala slika (provincija — država). IPTCPANEL_RESET;Vrati IPTCPANEL_RESETHINT;Postavlja podrazumevane vrednosti profila IPTCPANEL_SOURCE;Izvor -IPTCPANEL_SOURCEHINT;Prvobitni vlasnik inntelektualnog sadržaja na slici (izvor). -IPTCPANEL_SUPPCATEGORIES;Dop. kategorije -IPTCPANEL_SUPPCATEGORIESHINT;Dodatno određuje motiv na slici (dodatne kategorije). IPTCPANEL_TITLE;Natpis -IPTCPANEL_TITLEHINT;Kratni naziv slike (ime objekta). -IPTCPANEL_TRANSREFERENCE;Ref. prenosa -IPTCPANEL_TRANSREFERENCEHINT;Kod kojji predstavlja mesto prvobitnog prenosa (referenca prvog prenosa). MAIN_BUTTON_FULLSCREEN;Ceo ekran MAIN_BUTTON_NAVNEXT_TOOLTIP;Šalje vas na narednu sliku u odnosu na otvorenu u prozoru za uređivanje.\nPrečica: Shift-F4\n\nTakođe, omoguća vam da idete na narednu sliku u odnosu na trenutno izabranu u razgledaču ili filmskoj traci.\nPrečica: F4 MAIN_BUTTON_NAVPREV_TOOLTIP;Šalje vas na prethodnu sliku u odnosu na otvorenu u prozoru za uređivanje.\nPrečica: Shift-F3\n\nnTakođe, omoguća vam da idete na narednu sliku u odnosu na trenutno izabranu u razgledaču ili filmskoj traci.\nPrečica: F3 @@ -509,7 +475,6 @@ MAIN_BUTTON_PREFERENCES;Postavke MAIN_BUTTON_PUTTOQUEUE;Zakaži MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;Dodaje trenutnu sliku u zakazane Ctrl+B MAIN_BUTTON_SAVE;Sačuvaj -MAIN_BUTTON_SAVEAS;Kao... MAIN_BUTTON_SAVE_TOOLTIP;Čuva trenutnu sliku Ctrl+S MAIN_BUTTON_SENDTOEDITOR;Uredi MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Uređuje trenutnu sliku u spoljnom programu Ctrl+E @@ -553,7 +518,6 @@ MAIN_TAB_METADATA;Metapodaci MAIN_TAB_METADATA_TOOLTIP;Alt-m MAIN_TAB_RAW;RAW MAIN_TAB_RAW_TOOLTIP;Alt-r -MAIN_TAB_TAGGING;Oznake MAIN_TAB_TRANSFORM;Ispravke MAIN_TAB_TRANSFORM_TOOLTIP;Alt-t MAIN_TOOLTIP_BACKCOLOR0;Boja pozadine za pregled: Na osnovu teme\nPrečica: 9 @@ -574,24 +538,6 @@ MAIN_TOOLTIP_SHOWHIDERP1;Prikazuje/sakriva desnu površ Alt-l MAIN_TOOLTIP_SHOWHIDETP1;Prikazuje/sakriva gornju površ Shift-L MAIN_TOOLTIP_THRESHOLD;Prag MAIN_TOOLTIP_TOGGLE;Prikazuje sliku pre i posle obrade B -NAVIGATOR_B_NA;P = ○ -NAVIGATOR_B_VALUE;P = %1 -NAVIGATOR_G_NA;Z = ○ -NAVIGATOR_G_VALUE;Z = %1 -NAVIGATOR_H_NA;H = ○ -NAVIGATOR_H_VALUE;H = %1 -NAVIGATOR_LAB_A_NA;A = ○ -NAVIGATOR_LAB_A_VALUE;A = %1 -NAVIGATOR_LAB_B_NA;B = ○ -NAVIGATOR_LAB_B_VALUE;B = %1 -NAVIGATOR_LAB_L_NA;L = ○ -NAVIGATOR_LAB_L_VALUE;L = %1 -NAVIGATOR_R_NA;C = ○ -NAVIGATOR_R_VALUE;C = %1 -NAVIGATOR_S_NA;S = ○ -NAVIGATOR_S_VALUE;S = %1 -NAVIGATOR_V_NA;V = ○ -NAVIGATOR_V_VALUE;V = %1 NAVIGATOR_XY_FULL;Širina = %1, Visina = %2 NAVIGATOR_XY_NA;x = ○, y = ○ OPTIONS_DEFIMG_MISSING;Nije pronađen ili dostupan podrazumevani profil za slike koje nisu u sirovom formatu.\n\nProverite fasciklu sa profilima, možda ne postoji ili je oštećena.\n\nBiće korišćene podrazumevane vrednosti. @@ -624,28 +570,21 @@ PARTIALPASTE_FLATFIELDBLURTYPE;Način zamućenja RK PARTIALPASTE_FLATFIELDFILE;Datoteka za ravni kadar PARTIALPASTE_GRADIENT;Filter gradijenta PARTIALPASTE_HSVEQUALIZER;Ujednačenje HSV -PARTIALPASTE_ICMGAMMA;Izlazna gama PARTIALPASTE_ICMSETTINGS;ICM podešavanja PARTIALPASTE_IMPULSEDENOISE;Impulsno uklanjanje šuma PARTIALPASTE_IPTCINFO;IPTC podavi PARTIALPASTE_LABCURVE;Lab kriva PARTIALPASTE_LENSGROUP;Podešavanja objektiva PARTIALPASTE_LENSPROFILE;Profil za ispravke objektiva -PARTIALPASTE_LUMACURVE;Kriva luminase -PARTIALPASTE_METAICMGROUP;Metapodaci/ICM podešavanja PARTIALPASTE_PCVIGNETTE;Filter vinjetarenja PARTIALPASTE_PERSPECTIVE;Perspektiva PARTIALPASTE_PREPROCESS_GREENEQUIL;Ujednačavanje zelene -PARTIALPASTE_PREPROCESS_HOTDEADPIXFILT;Filter vrelih/mrtvih piksela PARTIALPASTE_PREPROCESS_LINEDENOISE;Linijski filter šuma PARTIALPASTE_RAWCACORR_AUTO;Auto hromatske aberacije -PARTIALPASTE_RAWCACORR_CABLUE;Plava hrominansa -PARTIALPASTE_RAWCACORR_CARED;Crvena hrominansa PARTIALPASTE_RAWEXPOS_BLACK;Nivo crne PARTIALPASTE_RAWEXPOS_LINEAR;Linearni faktor ispravke RAW bele tačke PARTIALPASTE_RAWEXPOS_PRESER;Raw tačka bele uz očuvanje svetlih delova PARTIALPASTE_RAWGROUP;Raw podešavanja -PARTIALPASTE_RAW_ALLENHANCE;Ukloni šum nakon rasklapanja mozaika PARTIALPASTE_RAW_DCBENHANCE;Primeni korak DCB poboljšanja PARTIALPASTE_RAW_DCBITERATIONS;Broj DCB ponavljanja PARTIALPASTE_RAW_DMETHOD;Način rasklapanja mozaika @@ -661,7 +600,6 @@ PARTIALPASTE_SHARPENMICRO;Mikrokontrast PARTIALPASTE_VIBRANCE;Živost boja PARTIALPASTE_VIGNETTING;Ispravljanje vinjetarenja PARTIALPASTE_WHITEBALANCE;Balans bele -POPUPBUTTON_SELECTOPTIONHINT;RMB za izmenu opcije PREFERENCES_ADD;Dodaj PREFERENCES_APPLNEXTSTARTUP;primenjuje se nakon ponovnog pokretanja PREFERENCES_AUTOMONPROFILE;Sam primeni profile monitora iz operativnog sistema @@ -672,24 +610,16 @@ PREFERENCES_BEHAVIOR;Ponašanje PREFERENCES_BEHSETALL;Sve u „Postavi“ PREFERENCES_BEHSETALLHINT;Postavlja sve parametre u režim Postavi.\nNjihovo podešavanje pomoću alata iz panela za zakazano će biti apsolutne vrednosti kao što su i izabrane. PREFERENCES_BLACKBODY;Obična sijalica -PREFERENCES_BLINKCLIPPED;Pokaži pretamne/presvetle delove PREFERENCES_CACHECLEARALL;Obriši sve PREFERENCES_CACHECLEARPROFILES;Obriši profile PREFERENCES_CACHECLEARTHUMBS;Obriši prikaze -PREFERENCES_CACHEFORMAT1;Vlasnički (brže i bolje) -PREFERENCES_CACHEFORMAT2;JPEG (manje mesta na disku) PREFERENCES_CACHEMAXENTRIES;Najveći broj mest u ostavi PREFERENCES_CACHEOPTS;Podešavanje ostave -PREFERENCES_CACHETHUMBFORM;Format umanjenih prikaza PREFERENCES_CACHETHUMBHEIGHT;Najveća visina prikaza PREFERENCES_CIEART;CIECAM02 optimizacija PREFERENCES_CIEART_LABEL;Jednostruka tačnost umesto dvostruke PREFERENCES_CIEART_TOOLTIP;Ukoliko je omogućeno, radi CIECAM02 računanja sa jednostrukom tačnošću umesto sa dvostrukom. Ovo daje malo povećanje brzine uz neizostavan gubitak na kvalitetu. -PREFERENCES_CLEARDLG_LINE1;Čišćenje ostave -PREFERENCES_CLEARDLG_LINE2;Ovo može da potraje nekoliko sekundi. -PREFERENCES_CLEARDLG_TITLE;Sačekajte PREFERENCES_CLIPPINGIND;Pokazivači odsečenih delova -PREFERENCES_CMETRICINTENT;Kolorimetrijska namera PREFERENCES_CUSTPROFBUILD;Izgradnja proizvoljnog početnog profila slike PREFERENCES_CUSTPROFBUILDHINT;Izvršna datoteka (ili skripta) koja se poziva kada izgrađujete novi početni profil za sliku.nPrihvata parametre iz komandne linije radi pravljenja .pp3 datoteke na osnovu nekih pravila:n[Putanja do RAW/JPG] [Putanja podrazumevanog profila] [Blenda] [Ekspozicija u s] [Žižna dužina mm] [ISO] [Objektiv] [Foto-aparat] PREFERENCES_CUSTPROFBUILDKEYFORMAT;Ključni formati @@ -706,10 +636,7 @@ PREFERENCES_DARKFRAMEFOUND;Nađen PREFERENCES_DARKFRAMESHOTS;snimaka PREFERENCES_DARKFRAMETEMPLATES;šabloni PREFERENCES_DATEFORMAT;Format datuma -PREFERENCES_DATEFORMATFRAME;Format PREFERENCES_DATEFORMATHINT;Možete zadati sledeće formate:\n%y :godina\n%m : mesec\n%d : dan\n\nU Srbiji se najviše koristi:\n%d.%m.%y -PREFERENCES_DEFAULTLANG;Jezik programa -PREFERENCES_DEFAULTTHEME;Tema programa PREFERENCES_DIRDARKFRAMES;Direktorijum tamnog kadra PREFERENCES_DIRHOME;Lični direktorijum PREFERENCES_DIRLAST;Poslednji direktorijum @@ -741,7 +668,6 @@ PREFERENCES_GREY18;Yb=18 CIE L#50 PREFERENCES_GREY23;Yb=23 CIE L#55 PREFERENCES_GREY30;Yb=30 CIE L#60 PREFERENCES_GREY40;Yb=40 CIE L#70 -PREFERENCES_GTKTHEME;GTK tema PREFERENCES_HISTOGRAMPOSITIONLEFT;Histogram u levoj površi PREFERENCES_HLTHRESHOLD;Prag za odsečene svetle delove PREFERENCES_ICCDIR;ICC direktorijum @@ -759,7 +685,6 @@ PREFERENCES_MENUGROUPPROFILEOPERATIONS;Grupiši radnje sa profilima PREFERENCES_MENUGROUPRANK;Grupiši ocenjivanje PREFERENCES_MENUOPTIONS;Opcije menija PREFERENCES_METADATA;Metapodaci -PREFERENCES_MONITORICC;Profil monitora PREFERENCES_MULTITAB;Režim u više listova PREFERENCES_MULTITABDUALMON;Režim u više listova, na drugom monitoru PREFERENCES_OUTDIR;Izlazni direktorijum @@ -769,7 +694,6 @@ PREFERENCES_OUTDIRTEMPLATE;Upotrebi šablon PREFERENCES_OUTDIRTEMPLATEHINT;Možete da zadate sledeće skraćenice za formatiranje:\n%f, %d1, %d2, ..., %p1, %p2, ...\n\nOvi znakovi za formatiranje se odnose na direktorijume, podputanje putanja do raw datoteke.\n\nNa primer, ukoliko je otvorena slika /home/ivan/slike/02.09.2010/dsc0012.nef, skraćenice označavaju:\n%f=dsc0012, %d1=02.09.2010, %d2=slike, ...\n%p1=/home/ivan/slike/02.09.2010, %p2=/home/ivan/slike, %p3=/home/ivan, ...\n\nUkoliko želite da sačuvate razvijenu sliku pored originala, unesite:\n%p1/%f\n\nUkoliko želite da sačuvate izlaznu sliku u direktorijum „razvijene“ koji se nalazi gde i originalna slika, unesite:\n%p1/razvijene/%f\n\nUkoliko želite da sačuvate razvijenu sliku u direktorijum „/home/ivan/razvijene“, a da struktura poddirektorijuma ostane očuvana, unesite:\n%p2/razvijene/%d1/%f PREFERENCES_OVERLAY_FILENAMES;Postavi preko umanjenog prikaza PREFERENCES_OVERWRITEOUTPUTFILE;Prepiši postojeće izlazne datoteke -PREFERENCES_PANFACTORFRAME;Ubrzanje pri pomeranju platna PREFERENCES_PANFACTORLABEL;Faktor PREFERENCES_PARSEDEXT;Ekstenzije za prikaz PREFERENCES_PARSEDEXTADD;Dodaj ekstenziju @@ -792,16 +716,13 @@ PREFERENCES_SET;Postavi PREFERENCES_SHOWBASICEXIF;Prikaži osnovne Exif podatke PREFERENCES_SHOWDATETIME;Prikaži datum i vreme PREFERENCES_SHOWEXPOSURECOMPENSATION;Dodaj kompenzaciju ekspozicije -PREFERENCES_SHOWPROFILESELECTOR;Prikaži izbor profila PREFERENCES_SHTHRESHOLD;Prag za odsečene tamne delove PREFERENCES_SINGLETAB;Režim u jednom listu PREFERENCES_SINGLETABVERTAB;Režim u jednom listu, vertikalni listovi -PREFERENCES_SLIMUI;Tanki izgled PREFERENCES_SND_BATCHQUEUEDONE;Obrađene su zakazane datoteke PREFERENCES_SND_HELP;Unesite putanju do datoteke ili ostavite prazno ukoliko ne želite zvuk. Na Windows-u možete da koristite „SystemDefault“, „SystemAsterisk“ za sistemske zvuke. PREFERENCES_SND_LNGEDITPROCDONE;Urednik je završio obradu PREFERENCES_SND_TRESHOLDSECS;br. sekundi -PREFERENCES_SQUAREDETAILWINDOW;Kockast prozor sa detaljima (brže) PREFERENCES_STARTUPIMDIR;Direktorijum po pokretanju PREFERENCES_TAB_BROWSER;Pregled datoteka PREFERENCES_TAB_COLORMGR;Upravljanje bojama @@ -814,12 +735,9 @@ PREFERENCES_TP_USEICONORTEXT;Koristi ikonice jezička umesto teksta PREFERENCES_TP_VSCROLLBAR;Sakrij klizače u oblasti sa alatkama PREFERENCES_TUNNELMETADATA;Kopiraj neizmenjene IPTC/XMP (kada je slika označena drugim programom) PREFERENCES_USEBUNDLEDPROFILES;Koristi profile koji dolaze uz program -PREFERENCES_USESYSTEMTHEME; Koristi sistemsku temu PREFERENCES_VIEW;Balans bele izlaznog uređaja (monitor, TV, projaketor i dr.) PREFERENCES_WORKFLOW;Tok obrade PROFILEPANEL_COPYPPASTE;Parametri za kopiranje -PROFILEPANEL_FILEDLGFILTERANY;Sve datoteke -PROFILEPANEL_FILEDLGFILTERPP;Profili za obradu PROFILEPANEL_GLOBALPROFILES;Profili iz programa PROFILEPANEL_LABEL;Profili obrade PROFILEPANEL_LOADDLGLABEL;Učitaj profil za obradu... @@ -850,10 +768,7 @@ PROGRESSBAR_SAVEJPEG;Čuvam JPEG datoteku... PROGRESSBAR_SAVEPNG;Čuvam PNG datoteku... PROGRESSBAR_SAVETIFF;Čuvam TIFF datoteku... PROGRESSBAR_SNAPSHOT_ADDED;Dodat je snimak -PROGRESSDLG_LOADING;Učitavam datoteku... -PROGRESSDLG_PROCESSING;Obrađujem sliku... PROGRESSDLG_PROFILECHANGEDINBROWSER;Profil izmenjen u razgledaču -PROGRESSDLG_SAVING;Čuvam datoteku... P_GAMMA_CURV;gama QINFO_ISO;ISO QINFO_NOEXIF;Nisu dostupni Exif podaci. @@ -861,7 +776,6 @@ SAVEDLG_AUTOSUFFIX;Sam dodaj sufiks ukoliko datoteka već postoji SAVEDLG_FILEFORMAT;Format datoteke SAVEDLG_FORCEFORMATOPTS;Primoraj mogućnosti za čuvanje SAVEDLG_JPEGQUAL;JPEG kvalitet -SAVEDLG_JPGFILTER;JPEG datoteke SAVEDLG_PNGCOMPR;PNG pakovanje SAVEDLG_PUTTOQUEUE;Zakazuje sliku za obradu SAVEDLG_PUTTOQUEUEHEAD;Premešta sliku na početak zakazanih @@ -873,7 +787,6 @@ SAVEDLG_SUBSAMP_1;Najbolja kompresija SAVEDLG_SUBSAMP_2;Balansirano SAVEDLG_SUBSAMP_3;Najbolji kvalitet SAVEDLG_SUBSAMP_TOOLTIP;Najbolja kompresija: 4:1:1\nBalansirano: 4:2:2\nNajbolji kvalitet: 4:4:4 -SAVEDLG_TIFFFILTER;TIFF datoteke SAVEDLG_TIFFUNCOMPRESSED;Nezapakovani TIFF SAVEDLG_WARNFILENAME;Datoteka će biti nazvana SHCSELECTOR_TOOLTIP;Kliknite desno dugme miša da ponovo vratite poziciju ova tri klizača. @@ -893,7 +806,6 @@ TP_BWMIX_ALGO_SP;Specijalni efekti TP_BWMIX_ALGO_TOOLTIP;Linearno: proizvodi normalni linearni odgovor.\nSpecijalni efekti: proizvodi specijalne efekte mešajući kanale nelinearno. TP_BWMIX_AUTOCH;Auto TP_BWMIX_AUTOCH_TIP;Izračunaj vrednosti tako da optimizuje mešanje kanala. -TP_BWMIX_BLUE;Plava TP_BWMIX_CC_ENABLED;Podesi komplementarnu boju TP_BWMIX_CC_TOOLTIP;Omogući za automatsko podešavanje komplementarne boje u ROYGCBPM režimu. TP_BWMIX_CHANNEL;Ujednačavanje luminanse @@ -902,7 +814,6 @@ TP_BWMIX_CURVEEDITOR2;„Nakon“ krivulje TP_BWMIX_CURVEEDITOR_AFTER_TOOLTIP;Kriva tonova nakon CB prevođenja, na kraju tretmana. TP_BWMIX_CURVEEDITOR_BEFORE_TOOLTIP;Kriva tonova, tik pred CB prevođenje.\nMože da uzme u obzir i komponente boje. TP_BWMIX_CURVEEDITOR_LH_TOOLTIP;Luminansa na osnovu nijanse L=f(H).\nObratite pažnju na ekstremne vrednosti pošto one mogu da naprave neželjene efekte. -TP_BWMIX_CYAN;Svetlo-plava TP_BWMIX_FILTER;Filter boja TP_BWMIX_FILTER_BLUE;Plava TP_BWMIX_FILTER_BLUEGREEN;Plavo-zelena @@ -912,9 +823,7 @@ TP_BWMIX_FILTER_NONE;Ni jedna TP_BWMIX_FILTER_PURPLE;Ljubičasta TP_BWMIX_FILTER_RED;Crvena TP_BWMIX_FILTER_REDYELLOW;Crveno-Žuta -TP_BWMIX_GREEN;Zelena TP_BWMIX_LABEL;Crna i bela -TP_BWMIX_MAGENTA;Ljubičasta TP_BWMIX_MET;Način TP_BWMIX_MET_CHANMIX;Mešanje kanala TP_BWMIX_MET_DESAT;Uklanjanje boje @@ -922,9 +831,6 @@ TP_BWMIX_MET_LUMEQUAL;Ujednačavanje luminanse TP_BWMIX_MIXC;Mešanje TP_BWMIX_NEUTRAL;Vrati mešanje TP_BWMIX_NEUTRAL_TIP;Vrati sve vrednsoti (filter boje, mešanje kanala) na podrazumevane. -TP_BWMIX_ORANGE;Narandžasta -TP_BWMIX_PURPLE;Ljubičasta -TP_BWMIX_RED;Crvena TP_BWMIX_RGBLABEL;R: %1%% G: %2%% B: %3%% Ukupno: %4%% TP_BWMIX_RGBLABEL_HINT;Konačni RGB faktori koji se brinu o opcijama za mešanje.\n„Ukupno“ prikazuje zbir RGB vrednosti:\n- u 100% u relativnom režimu\n- više (svetlije) ili manje (tamnije) od 100% u apsolutnom režimu. TP_BWMIX_RGB_TOOLTIP;Mešanje RGB kanala. Koristite postojeće prepodešene parametre kao vodilju.\nObratite pažnju na negativne vrednsti koje mogu da naprave greške unutar slike ili izazovu nepravilno ponašanje. @@ -950,7 +856,6 @@ TP_BWMIX_TCMODE_SATANDVALBLENDING;Crno-beli, stapanje zasićenosti i vrednosti TP_BWMIX_TCMODE_STANDARD;Crno-beli, uobičajeni TP_BWMIX_TCMODE_WEIGHTEDSTD;Crno-beli, mereni standard TP_BWMIX_VAL;L -TP_BWMIX_YELLOW;Žuta TP_CACORRECTION_BLUE;Plava TP_CACORRECTION_LABEL;Hromatke aberacije TP_CACORRECTION_RED;Crvena @@ -959,7 +864,6 @@ TP_CHMIXER_GREEN;Zelena TP_CHMIXER_LABEL;Mešanje kanala TP_CHMIXER_RED;Crvena TP_CHROMATABERR_LABEL;Hromatske aberacije -TP_COARSETRAF_DEGREE;stepeni: TP_COARSETRAF_TOOLTIP_HFLIP;Izvrće sliku horizontalno TP_COARSETRAF_TOOLTIP_ROTLEFT;Okreće sliku ulevo TP_COARSETRAF_TOOLTIP_ROTRIGHT;Okreće sliku udesno @@ -1036,32 +940,11 @@ TP_COLORAPP_TONECIE;Mapiranje tonova u CIECAM02 TP_COLORAPP_TONECIE_TOOLTIP;Ukoliko je isključena ova opcija, mapiranje tonova se vrši u Lab okruženju.\nUkoliko je uključena, mapiranje se vrši pomoću CIECAM02.\nMorate koristiti alat za mapiranje tonova kako bi ova opcija bila primenjena. TP_COLORAPP_WBCAM;Balans bele [RT+CAT02] + [izlaz] TP_COLORAPP_WBRT;Balans bele [RT] + [izlaz] -TP_COLORBOOST_ACHANNEL;Kanal „a“ -TP_COLORBOOST_AMOUNT;Količina -TP_COLORBOOST_AVOIDCOLORCLIP;Izbegni odsecanje boja -TP_COLORBOOST_BCHANNEL;Kanal „b“ -TP_COLORBOOST_CHANNEL;Kanal -TP_COLORBOOST_CHSEPARATE;razdvoji -TP_COLORBOOST_ENABLESATLIMITER;Omogući ograničenje zasićenosti -TP_COLORBOOST_LABEL;Pojačanje boja -TP_COLORBOOST_SATLIMIT;Granica za zasićenost -TP_COLORDENOISE_EDGESENSITIVE;Osetljivo na ivice -TP_COLORDENOISE_EDGETOLERANCE;Tolerancija ivice -TP_COLORDENOISE_LABEL;Uklaljanje kolornog šuma -TP_COLORDENOISE_RADIUS;Poluprečnik -TP_COLORSHIFT_BLUEYELLOW;Plava-Žuta -TP_COLORSHIFT_GREENMAGENTA;Zelena-Ljubičasta -TP_COLORSHIFT_LABEL;Pomeranje boja -TP_CROP_DPI;TPI= TP_CROP_FIXRATIO;Srazmerno: TP_CROP_GTDIAGONALS;Pravilo dijagonala TP_CROP_GTEPASSPORT;Biometrijski pasoš TP_CROP_GTFRAME;Okvir TP_CROP_GTGRID;Mreža -TP_CROP_GTHARMMEANS1;Zlatni presek 1 -TP_CROP_GTHARMMEANS2;Zlatni presek 2 -TP_CROP_GTHARMMEANS3;Zlatni presek 3 -TP_CROP_GTHARMMEANS4;Zlatni presek 4 TP_CROP_GTNONE;Ništa TP_CROP_GTRULETHIRDS;Pravilo trećina TP_CROP_GUIDETYPE;Vođice: @@ -1077,7 +960,6 @@ TP_DARKFRAME_LABEL;Tamni kadar TP_DEFRINGE_LABEL;Uklaljanje oreola TP_DEFRINGE_RADIUS;Poluprečnik TP_DEFRINGE_THRESHOLD;Prag -TP_DETAIL_AMOUNT;Količina TP_DIRPYRDENOISE_BLUE;Hrominansa: Plava-Žuta TP_DIRPYRDENOISE_CHROMA;Boja TP_DIRPYRDENOISE_ENH;Poboljšani režim @@ -1089,7 +971,6 @@ TP_DIRPYRDENOISE_LDETAIL;Detalji luminanse TP_DIRPYRDENOISE_LUMA;Luminansa TP_DIRPYRDENOISE_METHOD;Način TP_DIRPYRDENOISE_METHOD_TOOLTIP;Za rav slike možete koristiti RGB ili Lab režime.\n\nZa ostale slike se koristi Lab, bez obzira na izbor. -TP_DIRPYRDENOISE_PERF;RGB režim (raw slike) TP_DIRPYRDENOISE_RED;Hrominansa - crvena-zelena TP_DIRPYRDENOISE_RGB;RGB TP_DIRPYREQUALIZER_LABEL;Detaljni nivo kontrasta @@ -1100,8 +981,6 @@ TP_DIRPYREQUALIZER_LUMAFINEST;fino TP_DIRPYREQUALIZER_LUMANEUTRAL;Neutralno TP_DIRPYREQUALIZER_THRESHOLD;Prag TP_DISTORTION_AMOUNT;Količina -TP_DISTORTION_AUTO;Sam ispravi izobličenja -TP_DISTORTION_AUTO_TIP;(Eksperimentalno) Automatski ispravlja izobličenja nekih aparata (M4/3, neki kompakti, i dr.) TP_DISTORTION_LABEL;Izobličenja TP_EPD_EDGESTOPPING;Izoštravanje ivice TP_EPD_LABEL;Mapiranje tonova @@ -1109,13 +988,6 @@ TP_EPD_REWEIGHTINGITERATES;Broj ponovnih merenja TP_EPD_SCALE;Razmera TP_EPD_STRENGTH;Jačina TP_EPD_TOOLTIP;Mapiranje tonova je moguće u Lab (standardnom) ili CIECAM02 režimu.\n\nZa rad u CIECAM02 režimu uključite:\n1. CIECAM02\n2. Algoritam="Osvetljenje + živopisnost (QM)"\n3. "Mapiranje tonova u CIECAM02 osvetljenju (Q)" -TP_EQUALIZER_CONTRAST_MINUS;Kontrast - -TP_EQUALIZER_CONTRAST_PLUS;Kontrast + -TP_EQUALIZER_FINEST;najfinije -TP_EQUALIZER_LABEL;Talasno ujednačenje -TP_EQUALIZER_LARGEST;najgrublje -TP_EQUALIZER_NEUTRAL;Neutralno -TP_EXPOSCORR_LABEL;Raw bela tačka TP_EXPOSURE_AUTOLEVELS;Auto-nivoi TP_EXPOSURE_AUTOLEVELS_TIP;Omogućava automatsko određivanje nivoa, koji podešava klizače ekspozicije na osnovu podatka o samoj slici.\nUključuje čupanje svetlih delova ukoliko je neophodno. TP_EXPOSURE_BLACKLEVEL;Crna @@ -1139,7 +1011,6 @@ TP_EXPOSURE_TCMODE_LABEL2;2. režim krive TP_EXPOSURE_TCMODE_SATANDVALBLENDING;Utapanje zasićenosti i vrednosti TP_EXPOSURE_TCMODE_STANDARD;Standard TP_EXPOSURE_TCMODE_WEIGHTEDSTD;Uravnoteženi standard -TP_EXPO_AFTER; Pre interpolacije (pre prevoda u RGB) TP_FLATFIELD_AUTOSELECT;Sam izaberi TP_FLATFIELD_BLURRADIUS;Poluprečnik zamućenja TP_FLATFIELD_BLURTYPE;Zamuti @@ -1148,7 +1019,6 @@ TP_FLATFIELD_BT_HORIZONTAL;Horizontalno TP_FLATFIELD_BT_VERTHORIZ;Horiz. i vertik. TP_FLATFIELD_BT_VERTICAL;Vertikalno TP_FLATFIELD_LABEL;Ravno polje -TP_GAMMA_COMMENT;(onemogućen je izlazni profil, osim „default“) TP_GAMMA_CURV;Gama TP_GAMMA_FREE;Gama sloboda TP_GAMMA_OUTPUT;Izlazna gama @@ -1173,14 +1043,6 @@ TP_HLREC_ENA_TOOLTIP;Može se aktivirati opcijom „Auto-nivoi“. TP_HLREC_LABEL;Čupanje svetlih delova TP_HLREC_LUMINANCE;Izvlačenje luminanse TP_HLREC_METHOD;Način: -TP_HSVEQUALIZER1;Crvena -TP_HSVEQUALIZER2;Žuta -TP_HSVEQUALIZER3;Limun -TP_HSVEQUALIZER4;Zelena -TP_HSVEQUALIZER5;Vodena -TP_HSVEQUALIZER6;Plava -TP_HSVEQUALIZER7;Ljubičasta -TP_HSVEQUALIZER8;Magneta TP_HSVEQUALIZER_CHANNEL;HSV kanal TP_HSVEQUALIZER_HUE;Nijansa TP_HSVEQUALIZER_LABEL;Ujednačenje HSV kanala @@ -1190,9 +1052,6 @@ TP_ICM_BLENDCMSMATRIX;Utopi svetle delove u matricu TP_ICM_BLENDCMSMATRIX_TOOLTIP;Omogućite kako bi povratili preosvetljene delove ukoliko koristite LUT ICC profile. TP_ICM_DCPILLUMINANT;Iluminantno TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolirano -TP_ICM_FILEDLGFILTERANY;Bilo koja datoteka -TP_ICM_FILEDLGFILTERICM;ICC profili -TP_ICM_GAMMABEFOREINPUT;Profil za primenu Game TP_ICM_INPUTCAMERA;Podrazumevano iz aparata TP_ICM_INPUTCAMERAICC;Foto-aparat ili standardni ICC TP_ICM_INPUTCAMERA_TOOLTIP;Koristi prostu matricu boja iz programa dcraw, unapređenu RawTherapee verziju (koja god da je dostupna za vaš model foto-aparata) ili neki od ugrađenih DNG profila. @@ -1207,14 +1066,12 @@ TP_ICM_INPUTPROFILE;Ulazni profil TP_ICM_LABEL;ICM TP_ICM_NOICM;No ICM: sRGB izlaz TP_ICM_OUTPUTPROFILE;Izlazni profil -TP_ICM_SAVEREFERENCE;Sačuvaj sliku kao referencu za profil TP_ICM_SAVEREFERENCE_TOOLTIP;Sačuvaj linearnu TIFF sliku pre primene ulaznog profila. Rezultat može da se koristi za kalibraciju i izradu profila foto-aparata. TP_ICM_TONECURVE;Koristi DCP krivu tonova TP_ICM_TONECURVE_TOOLTIP;Upotrebljava ugrađenu DCP krivu tonova. Ovo podešavanje je omogućeno samo ako izabrani DCP ima krivu tonova. TP_ICM_WORKINGPROFILE;Radni profil TP_IMPULSEDENOISE_LABEL;Impulsno uklanjanje šuma TP_IMPULSEDENOISE_THRESH;Prag -TP_LABCURVE_AVOIDCOLORCLIP;Onemogući odsecanje boje TP_LABCURVE_AVOIDCOLORSHIFT;Izbegni pomeranje boja TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Postavlja boje u opseg trenutnog radnog prostora boja i primenjuje Munselovu korekciju. TP_LABCURVE_BRIGHTNESS;Osvetljenost @@ -1247,29 +1104,18 @@ TP_LABCURVE_CURVEEDITOR_LC_TOOLTIP;Svetnost kao funkcija boje L=f(C) TP_LABCURVE_CURVEEDITOR_LH;LH TP_LABCURVE_CURVEEDITOR_LH_TOOLTIP;Svetlost kao funkcija nijanse L=f(H) TP_LABCURVE_CURVEEDITOR_LL_TOOLTIP;Svetlost kao funkcija svetlosti L=f(L) -TP_LABCURVE_ENABLESATLIMITER;Uključi graničnik zasićenosti TP_LABCURVE_LABEL;Lab kriva TP_LABCURVE_LCREDSK;Ograniči LC na crvenu i boju kože TP_LABCURVE_LCREDSK_TIP;Ukoliko je uključeno, LC kriva će uticati samo na crvenu i boju kože.\nU suprotnom se primenjuje na sve tonove. TP_LABCURVE_RSTPROTECTION;Zaštita crvene i boje kože TP_LABCURVE_RSTPRO_TOOLTIP;Može se koristiti sa klizačem za Hrominansu i CC krivom. -TP_LABCURVE_SATLIMIT;Graničnik zasićenosti -TP_LABCURVE_SATURATION;Zasićenost TP_LENSGEOM_AUTOCROP;Sam iseci TP_LENSGEOM_FILL;Sam popuni TP_LENSGEOM_LABEL;Objektiv i geometrija -TP_LENSPROFILE_FILEDLGFILTERLCP;Fajlovi sa izobličenjima objektiva TP_LENSPROFILE_LABEL;Profili za ispravljanje izobličenja objektiva TP_LENSPROFILE_USECA;Ispravljanje hrom. aberacija TP_LENSPROFILE_USEDIST;Ispravljanje izobličenja TP_LENSPROFILE_USEVIGN;Ispravljanje vinjetarenja -TP_LUMACURVE_BLACKLEVEL;Crna -TP_LUMACURVE_BRIGHTNESS;Osvetljenje -TP_LUMACURVE_COMPRHIGHLIGHTS;Sabijanje svetlog -TP_LUMACURVE_COMPRSHADOWS;Sabijanje senki -TP_LUMACURVE_CONTRAST;Kontrast -TP_LUMACURVE_CURVEEDITOR;Kriva liminanse -TP_LUMACURVE_LABEL;Kriva luminanse TP_NEUTRAL;Neutralno TP_NEUTRAL_TIP;Vraća klizače ekspozicije na neutralne vrednosti.\nPrimenjuje se na iste kontrole kao u Auto nivoi, bez obzira na to da li ste koristili Auto nivoe ili ne. TP_PCVIGNETTE_FEATHER;Umekšavanje @@ -1285,23 +1131,16 @@ TP_PERSPECTIVE_VERTICAL;Vertikalna TP_PFCURVE_CURVEEDITOR_CH;Nijansa TP_PFCURVE_CURVEEDITOR_CH_TOOLTIP;Određuje jačinu uklaljanja boje.\nVišlje = više,\nNiže = manje. TP_PREPROCESS_GREENEQUIL;Kalibracija zelene boje -TP_PREPROCESS_HOTDEADPIXFILT;Izbaci pregorele i mrtve piksele -TP_PREPROCESS_HOTDEADPIXFILT_TOOLTIP;Pokušava da ukloni vruće i mrtve piksele. TP_PREPROCESS_LABEL;Predobrada TP_PREPROCESS_LINEDENOISE;Linijski filter šuma TP_PREPROCESS_NO_FOUND;Nije pronađeno TP_RAWCACORR_AUTO;Ispravi hromatske aberacije TP_RAWCACORR_CABLUE;Plava TP_RAWCACORR_CARED;Crvena -TP_RAWEXPOS_BLACKONE;Nivo crne: Crvena TP_RAWEXPOS_BLACKS;Nivo crne -TP_RAWEXPOS_BLACKTHREE;Nivo crne: Zelena 2 -TP_RAWEXPOS_BLACKTWO;Nivo crne: Plava -TP_RAWEXPOS_BLACKZERO;Nivo crne: Zelena 1 (vodeća) TP_RAWEXPOS_LINEAR;Linearni faktor korekcije TP_RAWEXPOS_PRESER;Očuvanje svetlih delova TP_RAWEXPOS_TWOGREEN;Obe zelene -TP_RAW_ALLENHANCE;Ukloni artafakte/šum nakon rasklapanja TP_RAW_DCBENHANCE;Primeni DCB poboljšanje TP_RAW_DCBITERATIONS;Broj DCB prolaza TP_RAW_DMETHOD;Način @@ -1313,13 +1152,7 @@ TP_RAW_LABEL;Rasklapanje mozaika TP_RAW_LMMSEITERATIONS;Koraci LMMSE poboljšanja TP_RAW_LMMSE_TOOLTIP;Dodaje gamu (korak 1), medijan (koraci 2-4) i poboljšanja (koraci 5-6) kako bi smanjio neispravnosti i poboljšao odnos signal-prema-šum. TP_RESIZE_APPLIESTO;Primeni na: -TP_RESIZE_BICUBIC;Bikubično -TP_RESIZE_BICUBICSF;Bikubično (mekše) -TP_RESIZE_BICUBICSH;Bikubično (oštrije) -TP_RESIZE_BILINEAR;Bilinearno TP_RESIZE_CROPPEDAREA;Isečenu oblast -TP_RESIZE_DOWNSCALEB;Smanjenje razmere (bolje) -TP_RESIZE_DOWNSCALEF;Smanjenje razmere (brže) TP_RESIZE_FITBOX;Širinu i visinu TP_RESIZE_FULLIMAGE;Celu sliku TP_RESIZE_H;V: @@ -1339,9 +1172,7 @@ TP_RGBCURVES_LABEL;RGB krive TP_RGBCURVES_LUMAMODE;Režim luminanse TP_RGBCURVES_LUMAMODE_TOOLTIP;Režim liminanse omogućava da menjate udeo crvenog, zelenog i plavog kanala iz luminanse slike što ne utiče na promenu boje fotografije. TP_RGBCURVES_RED;C -TP_ROTATE_AUTOCROP;Sam iseci TP_ROTATE_DEGREE;Stepeni: -TP_ROTATE_FILL;Popuni TP_ROTATE_LABEL;Rotacija TP_ROTATE_SELECTLINE; Postavi pravu liniju TP_SAVEDIALOG_OK_TIP;Prečica: Ctrl-Enter @@ -1371,7 +1202,6 @@ TP_SHARPENING_RLD_AMOUNT;Količina TP_SHARPENING_RLD_DAMPING;Prigušivanje TP_SHARPENING_RLD_ITERATIONS;Ponavljanja TP_SHARPENING_THRESHOLD;Prag -TP_SHARPENING_TOOLTIP;Očekujte nešto drugačiji efekat kada koristite CIECAM02. Ukoliko primetite razlike, podesite ih po svom ukusu. TP_SHARPENING_USM;Oštrina maske TP_SHARPENMICRO_AMOUNT;Količina TP_SHARPENMICRO_LABEL;Mikrokonttrast @@ -1464,9 +1294,24 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. !DIRBROWSER_FOLDERS;Folders +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_EQUALIZER;Bypass Wavelet Levels +!EXPORT_PIPELINE;Processing pipeline +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !FILEBROWSER_POPUPCOLORLABEL0;Label: None !FILEBROWSER_POPUPCOLORLABEL1;Label: Red !FILEBROWSER_POPUPCOLORLABEL2;Label: Yellow @@ -1480,6 +1325,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !FILEBROWSER_POPUPRANK3;Rank 3 *** !FILEBROWSER_POPUPRANK4;Rank 4 **** !FILEBROWSER_POPUPRANK5;Rank 5 ***** +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SHOWNOTTRASHHINT;Show only non-deleted images. !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !FILECHOOSER_FILTER_ANY;All files @@ -1492,6 +1338,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_252;CbDL - Skin tar/prot !HISTORY_MSG_253;CbDL - Reduce artifacts !HISTORY_MSG_254;CbDL - Skin hue @@ -1600,7 +1447,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -1652,12 +1499,12 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1670,8 +1517,8 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -1683,7 +1530,58 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_TAB_INSPECT; Inspect !MAIN_TAB_WAVELET;Wavelet !MAIN_TAB_WAVELET_TOOLTIP;Shortcut: Alt-w @@ -1706,6 +1604,9 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PARTIALPASTE_PREPROCESS_DEADPIXFILT;Dead pixel filter !PARTIALPASTE_PREPROCESS_HOTPIXFILT;Hot pixel filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue +!PARTIALPASTE_RAW_IMAGENUM;Sub-image +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_WAVELETGROUP;Wavelet Levels !PREFERENCES_AUTLISLOW;Low @@ -1718,17 +1619,20 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1738,6 +1642,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1745,9 +1650,10 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders !PREFERENCES_MED;Medium (Tile/2) !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color !PREFERENCES_NAVIGATIONFRAME;Navigation !PREFERENCES_NOISE;Noise Reduction @@ -1758,7 +1664,12 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font @@ -1769,6 +1680,8 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1776,6 +1689,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_WLONE;One level !PREFERENCES_WLTWO;Two levels !PREFERENCES_WLZER;No +!PROFILEPANEL_PDYNAMIC;Dynamic !SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. !SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. !THRESHOLDSELECTOR_BL;Bottom-left @@ -1788,6 +1702,13 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1884,6 +1805,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_DIRPYREQUALIZER_SKIN;Skin targetting/protection !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_GAMMA;Gamma !TP_EXPOSURE_TCMODE_LUMINANCE;Luminance !TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptual @@ -1896,16 +1818,16 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_FLATFIELD_CLIPCONTROL;Clip control !TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast. !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_PREPROCESS_DEADPIXFILT;Dead pixel filter @@ -1923,11 +1845,72 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_RAWEXPOS_BLACK_GREEN;Green !TP_RAWEXPOS_BLACK_RED;Red !TP_RAWEXPOS_RGB;Red, Green, Blue +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. +!TP_RAW_LMMSE;LMMSE +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL !TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* !TP_RETINEX_CONTEDIT_LH;Hue equalizer @@ -2171,4 +2154,6 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !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_TMTYPE;Compression method !TP_WAVELET_TON;Toning +!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". !ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: Alt-f diff --git a/rtdata/languages/Slovak b/rtdata/languages/Slovak index fc119da9b..f2bb37943 100644 --- a/rtdata/languages/Slovak +++ b/rtdata/languages/Slovak @@ -104,7 +104,6 @@ HISTOGRAM_TOOLTIP_L;Zobraziť/Schovať histogram CIELAB svietivosti HISTOGRAM_TOOLTIP_R;Zobraziť/Schovať ČERVENÝ histogram HISTORY_CHANGED;Zmenené HISTORY_CUSTOMCURVE;Vlastná krivka -HISTORY_DELSNAPSHOT;Odstrániť Snímok HISTORY_FROMCLIPBOARD;Zo schránky HISTORY_LABEL;História HISTORY_MSG_1;Fotka načítaná @@ -201,47 +200,23 @@ HISTORY_MSG_92;Gamma smerovej pyramídy HISTORY_NEWSNAPSHOT;Nový Snímok HISTORY_SNAPSHOT;Snímok HISTORY_SNAPSHOTS;Snímky -IPTCPANEL_AUTHOR;Autor -IPTCPANEL_AUTHORSPOSITION;Autorov titul -IPTCPANEL_AUTHORSPOSITIONHINT;Titul tvorcu alebo tvorcov objektu (Titul pri mene autora). -IPTCPANEL_CAPTION;Titul -IPTCPANEL_CAPTIONHINT;Textový opis údajov (Titul - Abstrakt). -IPTCPANEL_CAPTIONWRITER;Pisateľ titulu -IPTCPANEL_CAPTIONWRITERHINT;Meno osoby, ktorá titul/abstrakt obrazu napísala, upravila alebo opravila (Pisateľ - Editor). IPTCPANEL_CATEGORY;Kategória -IPTCPANEL_CATEGORYHINT;Identifikuje subjekt obrázka podľa názoru poskytovateľa (Kategória). IPTCPANEL_CITY;Mesto -IPTCPANEL_CITYHINT;Mesto pôvodu (Mesto). IPTCPANEL_COPYHINT;Kopírovať IPTC nastavenia do schránky -IPTCPANEL_COPYRIGHT;Copyright -IPTCPANEL_COPYRIGHTHINT;Akýkoľvek potrebný oznam o copyrighte (Oznam o copyrighte). IPTCPANEL_COUNTRY;Krajina -IPTCPANEL_COUNTRYHINT;Názov krajiny/miesta pôvodu (Krajina - miesto pôvodu). IPTCPANEL_CREDIT;Kredit IPTCPANEL_CREDITHINT;Identifikuje poskytovateľa obrázka, nemusí byť nevyhnutne vlastníkom/tvorcom (Kredit). IPTCPANEL_DATECREATED;Dátum vytvorenia -IPTCPANEL_DATECREATEDHINT;Dátum, kedy bol vytvorený intelektuálny obsah obrázka; Formát: RRRRMMDD (Deň vytvorenia). IPTCPANEL_EMBEDDED;Vložené IPTCPANEL_EMBEDDEDHINT;Resetovať na IPTV údaje vložené do obrázka IPTCPANEL_HEADLINE;Nadpis -IPTCPANEL_HEADLINEHINT;Publikovateľný vstup poskytujúci zhrnutie obsahu obrázka (Nadpis). IPTCPANEL_INSTRUCTIONS;Pokyny -IPTCPANEL_INSTRUCTIONSHINT;Iné pokyny ohľadne použitia obrázka (Špeciálne pokyny). IPTCPANEL_KEYWORDS;Kľúčové slová -IPTCPANEL_KEYWORDSHINT;Používa sa na indikáciu kľúčových slov. IPTCPANEL_PASTEHINT;Prilepiť IPTC nastavenia zo schránky -IPTCPANEL_PROVINCE;Provincia/štát -IPTCPANEL_PROVINCEHINT;Provincia/štát pôvodu obrázka (Provincia-štát). IPTCPANEL_RESET;Resetovať IPTCPANEL_RESETHINT;Resetovať na predvolené profilom IPTCPANEL_SOURCE;Zdroj -IPTCPANEL_SOURCEHINT;Pôvodný vlastník intektuálneho obsahu obrázka (Zdroj). -IPTCPANEL_SUPPCATEGORIES;Dodatočné kategórie -IPTCPANEL_SUPPCATEGORIESHINT;Ďalej upresňuje subjekt obrázka (Dodatočné kategórie). IPTCPANEL_TITLE;Názov -IPTCPANEL_TITLEHINT;Krátka referencia pre obrázok (Meno objektu). -IPTCPANEL_TRANSREFERENCE;Referencia prenosu -IPTCPANEL_TRANSREFERENCEHINT;Kód reprezentujúci miesto pôvodného prenosu (Pôvodná referencia prenosu). MAIN_BUTTON_FULLSCREEN;Celá obrazovka MAIN_BUTTON_PREFERENCES;Predvoľby MAIN_BUTTON_PUTTOQUEUE;Vložiť do radu @@ -313,8 +288,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximálna výška zmenšenín PREFERENCES_CLIPPINGIND;Indikácia orezu PREFERENCES_DATEFORMAT;Formát dátumu PREFERENCES_DATEFORMATHINT;Môžete použiť nasledujúce formátovacie reťazce:\n%y : rok\n%m : mesiac\n%d : deň\n\nNapríklad, slovenský formát je:\n%d.%m.%y -PREFERENCES_DEFAULTLANG;Predvolený jazyk -PREFERENCES_DEFAULTTHEME;Predvolený vzhľad PREFERENCES_DIRHOME;Domovský adresár PREFERENCES_DIRLAST;Posledný navštívený adresár PREFERENCES_DIROTHER;Iný @@ -367,7 +340,6 @@ PREFERENCES_TAB_BROWSER;Prehliadač súborov PREFERENCES_TAB_COLORMGR;Správa farieb PREFERENCES_TAB_GENERAL;Všeobecné PREFERENCES_TAB_IMPROC;Spracovanie obrazu -PREFERENCES_USESYSTEMTHEME; Použiť systémový vzhľad PREFERENCES_WORKFLOW;Tok práce PROFILEPANEL_LABEL;Profily spracovania PROFILEPANEL_LOADDLGLABEL;Načítať parametre spracovania... @@ -463,7 +435,6 @@ TP_ICM_INPUTPROFILE;Vstupný profil TP_ICM_LABEL;ICM TP_ICM_NOICM;Bez správy farieb: sRGB výstup TP_ICM_OUTPUTPROFILE;Výstupný profil -TP_ICM_SAVEREFERENCE;Uložiť referenčný obrázok pre tvorbu profilu TP_ICM_WORKINGPROFILE;Pracovný profil TP_IMPULSEDENOISE_LABEL;Impulzná redukcia šumu TP_IMPULSEDENOISE_THRESH;Prah @@ -557,11 +528,22 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !CURVEEDITOR_MINMAXCPOINTS;Equalizer !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. !EXIFFILTER_EXPOSURECOMPENSATION;Exposure compensation (EV) !EXIFFILTER_FILETYPE;File type +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -584,8 +566,12 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_APPLYPROFILE_PARTIAL;Apply - partial @@ -599,7 +585,6 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !FILEBROWSER_COLORLABEL_TOOLTIP;Color label.\n\nUse dropdown menu or shortcuts:\nShift-Ctrl-0 No Color\nShift-Ctrl-1 Red\nShift-Ctrl-2 Yellow\nShift-Ctrl-3 Green\nShift-Ctrl-4 Blue\nShift-Ctrl-5 Purple !FILEBROWSER_DARKFRAME;Dark-frame !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -633,6 +618,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -663,6 +649,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !GENERAL_NONE;None !GENERAL_OPEN;Open !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -934,7 +921,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -986,12 +973,12 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -1004,8 +991,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -1017,8 +1004,58 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 !MAIN_BUTTON_NAVSYNC_TOOLTIP;Synchronize the File Browser or Filmstrip with the Editor to reveal the thumbnail of the currently opened image, and clear any active filters.\nShortcut: x\n\nAs above, but without clearing active filters:\nShortcut: y\n(Note that the thumbnail of the opened image will not be shown if filtered out). @@ -1032,6 +1069,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d @@ -1103,8 +1141,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -1113,7 +1150,9 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves !PARTIALPASTE_SHARPENEDGE;Edges @@ -1139,7 +1178,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1151,7 +1191,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1163,7 +1204,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field !PREFERENCES_FLATFIELDFOUND;Found @@ -1179,7 +1220,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1194,6 +1236,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1209,9 +1252,10 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color !PREFERENCES_NAVIGATIONFRAME;Navigation @@ -1225,7 +1269,12 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels @@ -1238,15 +1287,16 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_SHOWFILMSTRIPTOOLBAR;Show filmstrip toolbar !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. !PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done !PREFERENCES_SND_TRESHOLDSECS;After seconds !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1266,6 +1316,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save !PROGRESSBAR_LOADINGTHUMBS;Loading thumbnails... @@ -1355,11 +1406,11 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1379,8 +1430,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1391,6 +1442,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1402,9 +1454,11 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1423,10 +1477,14 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1541,8 +1599,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_DIRPYREQUALIZER_SKIN;Skin targetting/protection !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma !TP_EPD_LABEL;Tone Mapping @@ -1606,18 +1663,17 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1626,11 +1682,12 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_ICM_INPUTNONE;No profile !TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift !TP_LABCURVE_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction. !TP_LABCURVE_CHROMATICITY;Chromaticity @@ -1702,17 +1759,78 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2032,6 +2150,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_WBALANCE_SOLUX41;Solux 4100K !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) +!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_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 diff --git a/rtdata/languages/Suomi b/rtdata/languages/Suomi index e86128dbd..8bb8dddad 100644 --- a/rtdata/languages/Suomi +++ b/rtdata/languages/Suomi @@ -83,7 +83,6 @@ HISTOGRAM_TOOLTIP_L;Näytä/piilota CIELAB luminanssi HISTOGRAM_TOOLTIP_R;Näytä/piilota PUNAINEN HISTORY_CHANGED;Muutettu HISTORY_CUSTOMCURVE;Oma käyrä -HISTORY_DELSNAPSHOT;Poista pikakuva HISTORY_FROMCLIPBOARD;Leikepöydältä HISTORY_LABEL;Historia HISTORY_MSG_1;Kuva ladattu @@ -170,47 +169,23 @@ HISTORY_MSG_81;Resize enabled HISTORY_NEWSNAPSHOT;Uusi pikakuva HISTORY_SNAPSHOT;Pikakuva HISTORY_SNAPSHOTS;Pikakuvat -IPTCPANEL_AUTHOR;Kuvaaja -IPTCPANEL_AUTHORSPOSITION;Kuvaajan titteli -IPTCPANEL_AUTHORSPOSITIONHINT;(Author position) Kuvaajan titteli. -IPTCPANEL_CAPTION;Aihe -IPTCPANEL_CAPTIONHINT;(Caption) Kuvaus kohteesta. -IPTCPANEL_CAPTIONWRITER;Kuvauksen kirjoittaja -IPTCPANEL_CAPTIONWRITERHINT;(Caption Writer) Kuvauksen kirjoittajan nimi. IPTCPANEL_CATEGORY;Aiheryhmä -IPTCPANEL_CATEGORYHINT;(Category) Aiheryhmän 3-kirjaiminen koodi. IPTCPANEL_CITY;Kaupunki -IPTCPANEL_CITYHINT;(City) Kaupunki jossa kuva on otettu. IPTCPANEL_COPYHINT;Kopioi IPTC tiedot leikepöydälle -IPTCPANEL_COPYRIGHT;Tekijänoikeudet -IPTCPANEL_COPYRIGHTHINT;(Copyright) Tekijänoikeustiedot. IPTCPANEL_COUNTRY;Maa -IPTCPANEL_COUNTRYHINT;(Country) Maa jossa kuva on otettu. IPTCPANEL_CREDIT;Välittäjä IPTCPANEL_CREDITHINT;(Credit) Välittäjän tiedot. IPTCPANEL_DATECREATED;Päivämäärä -IPTCPANEL_DATECREATEDHINT;(Date Created) Päivämäärä jolloin kuva on otettu. IPTCPANEL_EMBEDDED;Kuvan oma IPTCPANEL_EMBEDDEDHINT;Palauta kuvan IPTC tiedot IPTCPANEL_HEADLINE;Julkaistava otsikko -IPTCPANEL_HEADLINEHINT;(Headline) Julkaistava otsikko. IPTCPANEL_INSTRUCTIONS;Ohjeet -IPTCPANEL_INSTRUCTIONSHINT;(Instructions) Ohjeet ja rajoitukset. IPTCPANEL_KEYWORDS;Avainsanat -IPTCPANEL_KEYWORDSHINT;(Keywords) Kohdetta kuvaavia avainsanoja. IPTCPANEL_PASTEHINT;Liitä IPTC tiedot leikepöydältä -IPTCPANEL_PROVINCE;Maakunta -IPTCPANEL_PROVINCEHINT;(Province) Maakunta jossa kuva on otettu. IPTCPANEL_RESET;Palauta IPTCPANEL_RESETHINT;Palauta profiilin oletukseen IPTCPANEL_SOURCE;Lähde -IPTCPANEL_SOURCEHINT;(Source) Kuvan lähde. -IPTCPANEL_SUPPCATEGORIES;Tarkempi aiheryhmä -IPTCPANEL_SUPPCATEGORIESHINT;(Supplemental Categories) Tarkempi aiheryhmä. IPTCPANEL_TITLE;Otsikko -IPTCPANEL_TITLEHINT;(Title) Otsikko. -IPTCPANEL_TRANSREFERENCE;Alkuperäviite -IPTCPANEL_TRANSREFERENCEHINT;(Original Transmission Reference) Alkuperäviite. MAIN_BUTTON_PREFERENCES;Asetukset MAIN_BUTTON_SAVE;Tallenna kuva MAIN_BUTTON_SENDTOEDITOR;Avaa ulkoisessa ohjelmassa @@ -269,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Suurin esikatselukuvan korkeus PREFERENCES_CLIPPINGIND;Leikkautuminen PREFERENCES_DATEFORMAT;Päivämäärän muoto PREFERENCES_DATEFORMATHINT;Voit käyttää seuraavia komentoja:\n%y : vuosi\n%m : kuukausi\n%d : päivä\n\nEsimerkiksi, pp.kk.vvvv:\n%d.%m.%y -PREFERENCES_DEFAULTLANG;Oletuskieli -PREFERENCES_DEFAULTTHEME;Oletusteema PREFERENCES_DIRHOME;Kotihakemisto PREFERENCES_DIRLAST;Viimeksi käytetty hakemisto PREFERENCES_DIROTHER;Muu @@ -397,7 +370,6 @@ TP_ICM_INPUTPROFILE;Lähdeväriprofiili TP_ICM_LABEL;ICM TP_ICM_NOICM;Ei ICM-profiilia: sRGB TP_ICM_OUTPUTPROFILE;Tulosväriprofiili -TP_ICM_SAVEREFERENCE;Tallenna mallikuva\nprofilointia varten TP_ICM_WORKINGPROFILE;Työväriprofiili TP_RAW_DMETHOD;Menetelmä TP_RAW_FALSECOLOR;Värivääristymien eston määrä @@ -476,12 +448,23 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. !EXIFFILTER_EXPOSURECOMPENSATION;Exposure compensation (EV) !EXIFFILTER_FILETYPE;File type !EXIFFILTER_METADATAFILTER;Enable metadata filters +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -504,8 +487,12 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -521,7 +508,6 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !FILEBROWSER_CURRENT_NAME;Current name: !FILEBROWSER_DARKFRAME;Dark-frame !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -556,6 +542,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -591,6 +578,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -872,7 +860,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -924,12 +912,12 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -942,8 +930,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -955,8 +943,58 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -976,6 +1014,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d @@ -1050,8 +1089,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -1060,7 +1098,9 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves !PARTIALPASTE_SHARPENEDGE;Edges @@ -1089,7 +1129,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1101,7 +1142,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1114,7 +1156,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_EDITORLAYOUT;Editor Layout !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field !PREFERENCES_FLATFIELDFOUND;Found @@ -1130,7 +1172,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1145,6 +1188,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1160,9 +1204,10 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1178,13 +1223,18 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROPERTY;Property +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files @@ -1195,15 +1245,16 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. !PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done !PREFERENCES_SND_TRESHOLDSECS;After seconds !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1212,7 +1263,6 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -!PREFERENCES_USESYSTEMTHEME;Use system theme !PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) !PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' !PREFERENCES_WLONE;One level @@ -1225,6 +1275,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save !PROGRESSBAR_LOADINGTHUMBS;Loading thumbnails... @@ -1316,11 +1367,11 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1340,8 +1391,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1352,6 +1403,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1363,9 +1415,11 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1384,10 +1438,14 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1513,8 +1571,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_THRESHOLD;Threshold !TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma !TP_EPD_LABEL;Tone Mapping @@ -1578,18 +1635,17 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1598,11 +1654,12 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_ICM_INPUTNONE;No profile !TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift @@ -1689,19 +1746,80 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2024,6 +2142,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_WBALANCE_SOLUX41;Solux 4100K !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) +!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_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index 5b7f64af3..0a75c54ea 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -1,6 +1,7 @@ #01 2008-01-22 Emil Ericsson #02 2010-2013 Updated by Johan Thor #03 2015-08-09 Johan Thor +#04 2016-12-30 Johan Thor ABOUT_TAB_BUILD;Version ABOUT_TAB_CREDITS;Erkännande @@ -35,6 +36,7 @@ CURVEEDITOR_TYPE;Typ: DIRBROWSER_FOLDERS;Mappar EDITWINDOW_TITLE;Bildredigering EDIT_OBJECT_TOOLTIP;Visar en widget vid förhandsvisningsfönstret som låter dig ändra detta verktyg. +EDIT_PIPETTE_TOOLTIP;För att lägga till en punkt på kurvan, håll nere Ctrl-tangenten medan du vänsterklickar på önskad punkt i förhandsgranskningen av bilden.\nFör att justera punkten håller du nere Ctrl-tangenten medan du vänsterklickar i motsvarande område i förhandsgranskningen och sen släpper du Ctrl-tangenten (håll kvar om du önskar noggrannare kontroll) och rör musen upp eller ner medan du håller nere vänster musknapp. EXIFFILTER_APERTURE;Bländare EXIFFILTER_CAMERA;Kamera EXIFFILTER_EXPOSURECOMPENSATION;Exponeringskompensation (EV) @@ -104,7 +106,6 @@ FILEBROWSER_DELETEDLGMSG;Är du säker på att du vill ta bort de valda %1 filer FILEBROWSER_DELETEDLGMSGINCLPROC;Är du säker på att du vill ta bort de valda filerna %1 OCH den behandlade versionen? FILEBROWSER_EMPTYTRASH;Töm papperskorgen FILEBROWSER_EMPTYTRASHHINT;Ta bort papperskorgens filer permanent -FILEBROWSER_EXEC_CPB;Egen profilskapare FILEBROWSER_EXTPROGMENU;Öppna med FILEBROWSER_FLATFIELD;Plattfält FILEBROWSER_MOVETODARKFDIR;Flytta till katalogen för svartbilder @@ -166,6 +167,7 @@ FILEBROWSER_SHOWEDITEDHINT;Visa redigerade bilder.\nKortkommando: 7 FILEBROWSER_SHOWEDITEDNOTHINT;Visa ickeredigerade bilder.\nKortkommando: 6 FILEBROWSER_SHOWEXIFINFO;Visa EXIF-information.\nKortkommando: i\n\nKortkommando i enkelbildsläget: Alt-i FILEBROWSER_SHOWNOTTRASHHINT;Visa endast ej borttagna bilder. +FILEBROWSER_SHOWORIGINALHINT;Visa endast ursprungliga bilder.\n\nNär flera bilder finns med samma filnamn men med olika filändelser så anses den bild vara urpsrungsbilden som har sin ändelse närmst toppen i listan över filändelser i Inställningar > Filbläddrare > Hanterade filändelser FILEBROWSER_SHOWRANK1HINT;Visa bilder med betyg 1.\nKortkommando: 1 FILEBROWSER_SHOWRANK2HINT;Visa bilder med betyg 2.\nKortkommando: 2 FILEBROWSER_SHOWRANK3HINT;Visa bilder med betyg 3.\nKortkommando: 3 @@ -194,6 +196,7 @@ FILECHOOSER_FILTER_SAME;Samma format som nuvarande foto FILECHOOSER_FILTER_TIFF;TIFF-filer GENERAL_ABOUT;Om GENERAL_AFTER;Efter +GENERAL_APPLY;Tillämpa GENERAL_ASIMAGE;Som bild GENERAL_AUTO;Automatisk GENERAL_BEFORE;Före @@ -209,6 +212,7 @@ GENERAL_NA;Ej tillgänglig GENERAL_NO;Nej GENERAL_NONE;Inga GENERAL_OK;Ok +GENERAL_OPEN;Öppna GENERAL_PORTRAIT;Porträtt GENERAL_SAVE;Spara GENERAL_UNCHANGED;(Oförändrad) @@ -223,7 +227,6 @@ HISTOGRAM_TOOLTIP_R;Visa/dölj rött histogram HISTOGRAM_TOOLTIP_RAW;Visa/dölj råbildens histogram HISTORY_CHANGED;Ändrad HISTORY_CUSTOMCURVE;Egen kurva -HISTORY_DELSNAPSHOT;Ta bort HISTORY_FROMCLIPBOARD;Från klippbordet HISTORY_LABEL;Historia HISTORY_MSG_1;Fotot laddades @@ -391,6 +394,7 @@ HISTORY_MSG_162;Tonmappning HISTORY_MSG_163;RGB-kurvor - Röd HISTORY_MSG_164;RGB-kurvor - Grön HISTORY_MSG_165;RGB-kurvor - Blå +HISTORY_MSG_166;Exponering - Återställ HISTORY_MSG_167;Metod för demozaicing HISTORY_MSG_168;'CC'-kurvan HISTORY_MSG_169;'CH'-kurvan @@ -409,7 +413,7 @@ HISTORY_MSG_181;CAM02 - Kroma (C) HISTORY_MSG_182;CAM02 - Automatisk CAT02 HISTORY_MSG_183;CAM02 - Kontrast (J) HISTORY_MSG_184;CAM02 - Bild med mörk omgivning -HISTORY_MSG_185;CAM02 - Kontroll av gamut +HISTORY_MSG_185;CAM02 - Kontroll av tonomfång HISTORY_MSG_186;CAM02 - Algoritm HISTORY_MSG_187;CAM02 - Bevarande av röda färger och hudtoner HISTORY_MSG_188;CAM02 - Intensitet (Q) @@ -479,8 +483,12 @@ HISTORY_MSG_252;CbDL Hudtoner HISTORY_MSG_253;CbDL Reducera artefakter HISTORY_MSG_254;CbDL - Nyans på hudtoner HISTORY_MSG_255;CbDL - Algoritm +HISTORY_MSG_256;NR - Median HISTORY_MSG_258;CT - Färgkurva +HISTORY_MSG_259;CT - Opacitetskurva +HISTORY_MSG_260;CT - a*[b*] opacitet HISTORY_MSG_261;CT - Metod +HISTORY_MSG_262;CT - b* opacitet HISTORY_MSG_263;CT - Skuggor - Röd HISTORY_MSG_264;CT - Skuggor - Grön HISTORY_MSG_265;CT - Skuggor - Blå @@ -517,6 +525,7 @@ HISTORY_MSG_297;NR - Kvalitet HISTORY_MSG_298;Filter för döda pixlar HISTORY_MSG_299;NR - Krominanskurva HISTORY_MSG_300;- +HISTORY_MSG_301;NR - Luminanskontroll HISTORY_MSG_302;NR - Chroma-metod HISTORY_MSG_303;NR - Chroma-metod HISTORY_MSG_304;W - Kontrastnivåer @@ -527,14 +536,14 @@ HISTORY_MSG_308;W - Process-riktning HISTORY_MSG_309;W - ES - Detalj HISTORY_MSG_311;W - Wavelet-nivåer HISTORY_MSG_312;W - Återstod - Skugg-tröskel -HISTORY_MSG_314;W - Gamut - Reducera artefakter +HISTORY_MSG_314;W - Tonomfång - Reducera artefakter HISTORY_MSG_315;W - Återstod - Kontrast -HISTORY_MSG_317;W - Gamut - Hudnyans +HISTORY_MSG_317;W - Tonomfång - Hudnyans HISTORY_MSG_318;W - Kontrast - Högdagernivåer HISTORY_MSG_319;W - Kontrast - Högdageromfång HISTORY_MSG_320;W - Kontrast - Skuggomgång HISTORY_MSG_321;W - Kontrast - Skuggnivåer -HISTORY_MSG_322;W - Gamut - Undvik färgskiftning +HISTORY_MSG_322;W - Tonomfång - Undvik färgskiftning HISTORY_MSG_323;W - ES - Lokal kontrast HISTORY_MSG_324;W - Chroma - Pastell HISTORY_MSG_325;W - Chroma - Mättnad @@ -542,6 +551,7 @@ HISTORY_MSG_326;W - Chroma - Metod HISTORY_MSG_327;W - Kontrast - Applicera på HISTORY_MSG_328;W - Chroma - Koppla styrka HISTORY_MSG_331;W - Kontrastnivåer - Extra +HISTORY_MSG_332;W - Metod för tiling HISTORY_MSG_333;W - Återstod - Skuggor HISTORY_MSG_334;W - Återstod - Chroma HISTORY_MSG_335;W - Återstod - Högdagrar @@ -550,6 +560,7 @@ HISTORY_MSG_337;W - Återstod - Nyans himmel HISTORY_MSG_338;W - ES - Radie HISTORY_MSG_339;W - ES - Styrka HISTORY_MSG_340;W - Styrka +HISTORY_MSG_341;W - Kantprestanda HISTORY_MSG_342;W - ES - Första nivån HISTORY_MSG_343;W - Chroma-nivåer HISTORY_MSG_345;W - ES - Lokal kontrast @@ -564,13 +575,19 @@ HISTORY_MSG_354;W - ES - Förbättrad HISTORY_MSG_355;W - ES - Låg tröskel HISTORY_MSG_356;W - ES - Hög tröskel HISTORY_MSG_357;W - Brusred. - Koppla med ES -HISTORY_MSG_358;W - Gamut - CH +HISTORY_MSG_358;W - Tonomfång - CH HISTORY_MSG_359;Het/Död - Tröskel HISTORY_MSG_360;TM Gamma +HISTORY_MSG_361;W - Slutlig - Kromabalansering HISTORY_MSG_362;W - Återstod - Komprimeringsmetod HISTORY_MSG_363;W - Återstod - Komprimeringsstyrka +HISTORY_MSG_364;W - Slutlig - Kontrastbalansering +HISTORY_MSG_365;W - Slutlig - Skillnadsbalansering HISTORY_MSG_366;W - Återstod - Komprimering gamma HISTORY_MSG_367;W - ES - Lokal kontrastkurva +HISTORY_MSG_368;W - Slutlig - Kontrastbalans +HISTORY_MSG_369;W - Slutlig - Balanseringsmetod +HISTORY_MSG_370;W - Slutlig - Lokal kontrastkurva HISTORY_MSG_371;Skärpning efter storleksändring HISTORY_MSG_372;PRS USM - Radie HISTORY_MSG_373;PRS USM - Mängd @@ -598,51 +615,60 @@ HISTORY_MSG_395;DCP - Bastabell HISTORY_MSG_403;W - ES - Kantkänslighet HISTORY_MSG_404;W - ES - Basförstärkning HISTORY_MSG_405;W - Brusred. - Nivå 4 +HISTORY_MSG_407;Retinex - Metod +HISTORY_MSG_408;Retinex - Radie +HISTORY_MSG_409;Retinex - Kontrast +HISTORY_MSG_410;Retinex - Kompensation +HISTORY_MSG_411;Retinex - Styrka +HISTORY_MSG_413;Retinex - Kontrast +HISTORY_MSG_414;Retinex - Histogram - Lab +HISTORY_MSG_415;Retinex - Överföring +HISTORY_MSG_416;Retinex +HISTORY_MSG_417;Retinex - Överföring Median +HISTORY_MSG_418;Retinex - Tröskelvärde +HISTORY_MSG_419;Retinex - Färgrymd +HISTORY_MSG_420;Retinex - Histogram - HSL +HISTORY_MSG_421;Retinex - Gamma +HISTORY_MSG_422;Retinex - Gamma +HISTORY_MSG_423;Retinex - Gamma lutning +HISTORY_MSG_424;Retinex - Tröskelvärde HL +HISTORY_MSG_426;Retinex - Nyansequalizer +HISTORY_MSG_429;Retinex - Iterationer +HISTORY_MSG_430;Retinex - Överföringsgradient +HISTORY_MSG_431;Retinex - Styrkegradient +HISTORY_MSG_432;Retinex - M - Högdagrar +HISTORY_MSG_433;Retinex - M - Högdagrar TW +HISTORY_MSG_434;Retinex - M - Skuggor +HISTORY_MSG_435;Retinex - M - Skuggor TW +HISTORY_MSG_436;Retinex - M - Radie +HISTORY_MSG_437;Retinex - M - Metod +HISTORY_MSG_438;Retinex - M - Equalizer +HISTORY_MSG_439;Retinex - Process +HISTORY_MSG_440;CbDL - Metod +HISTORY_MSG_441;Retinex - Ökning, överföring +HISTORY_MSG_442;Retinex - Skala +HISTORY_MSG_443;Kompensation svartpunkt för output HISTORY_NEWSNAPSHOT;Nytt HISTORY_NEWSNAPSHOT_TOOLTIP;Kortkommando: Alt-s HISTORY_SNAPSHOT;Bokmärke HISTORY_SNAPSHOTS;Bokmärken -IPTCPANEL_AUTHOR;Upphovsman -IPTCPANEL_AUTHORSPOSITION;Upphovmannens position -IPTCPANEL_AUTHORSPOSITIONHINT;Titeln på upphovsmannen/männen (byline) -IPTCPANEL_CAPTION;Rubrik -IPTCPANEL_CAPTIONHINT;En beskrivning av informationen -IPTCPANEL_CAPTIONWRITER;Upphovsman -IPTCPANEL_CAPTIONWRITERHINT;Namnet på den person som är involverad i att skapa, redigera eller korrigera bilden IPTCPANEL_CATEGORY;Kategori -IPTCPANEL_CATEGORYHINT;Identifierar bildens titel enligt tillhandahållaren. IPTCPANEL_CITY;Stad -IPTCPANEL_CITYHINT;Staden där bilden togs IPTCPANEL_COPYHINT;Kopiera IPTC-inställningarna till klippbordet -IPTCPANEL_COPYRIGHT;Upphovsrätt -IPTCPANEL_COPYRIGHTHINT;Nödvändig upphovsrättslig information IPTCPANEL_COUNTRY;Land -IPTCPANEL_COUNTRYHINT;Namnet på landet/platsen där bilden togs IPTCPANEL_CREDIT;Erkännande IPTCPANEL_CREDITHINT;Identifierar tillhandahållaren av bilden, ej nödvändigtvis upphovsmannen IPTCPANEL_DATECREATED;Skapad datum -IPTCPANEL_DATECREATEDHINT;Datumet då innehållet av bilden skapades. Format: ÅÅÅÅMMDD. IPTCPANEL_EMBEDDED;Inbäddad IPTCPANEL_EMBEDDEDHINT;Återställ IPTC-informationen till innehållet i bildfilen. IPTCPANEL_HEADLINE;Rubrik -IPTCPANEL_HEADLINEHINT;En sammanfattning av vad bilden innehåller. IPTCPANEL_INSTRUCTIONS;Instruktioner -IPTCPANEL_INSTRUCTIONSHINT;Andra instruktioner som rör användandet av bilden. IPTCPANEL_KEYWORDS;Nyckelord -IPTCPANEL_KEYWORDSHINT;Indikerar nyckelord IPTCPANEL_PASTEHINT;Klistra in IPTC-inställningar från klippbordet -IPTCPANEL_PROVINCE;Provins -IPTCPANEL_PROVINCEHINT;Den provins eller stat från vilken bilden härrör. IPTCPANEL_RESET;Återställ IPTCPANEL_RESETHINT;Återställ till standardprofilen IPTCPANEL_SOURCE;Källa -IPTCPANEL_SOURCEHINT;Den ursprungliga ägaren av innehållet. -IPTCPANEL_SUPPCATEGORIES;Övriga kategorier -IPTCPANEL_SUPPCATEGORIESHINT;Ytterligare beskrivning av bilden IPTCPANEL_TITLE;Titel -IPTCPANEL_TITLEHINT;En kortfattad bildreferens -IPTCPANEL_TRANSREFERENCE;Överföringsreferens -IPTCPANEL_TRANSREFERENCEHINT;En kod som representerar platsen för överföring ISTORY_MSG_372;PRS USM - Radie MAIN_BUTTON_FULLSCREEN;Helskärm MAIN_BUTTON_NAVNEXT_TOOLTIP;Flytta till nästa bild relativt den bild som är öppen i redigeringsvyn\nKortkommando: Shift-F4\n\nFlytta till nästa bild relativt den valda miniatyrbilden i filvyn\nKortkommando: F4 @@ -652,6 +678,7 @@ MAIN_BUTTON_PREFERENCES;Inställningar MAIN_BUTTON_PUTTOQUEUE_TOOLTIP;Lägg till nuvarande bild i behandlingskön.\nKortkommando: Ctrl+b MAIN_BUTTON_SAVE;Spara MAIN_BUTTON_SAVE_TOOLTIP;Spara nuvarande bild.\nKortkommando: Ctrl+s +MAIN_BUTTON_SENDTOEDITOR;Redigera bilden i ett externt program MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Redigera nuvarande bild i externt bildredigeringsprogram.\nKortkommando: Ctrl+e MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP;Visa/dölj alla sidopaneler.\nKortkommando: m MAIN_BUTTON_UNFULLSCREEN;Avsluta helskärmsläget @@ -716,6 +743,7 @@ MAIN_TOOLTIP_SHOWHIDERP1;Visa/dölj den högra panelen Alt-l MAIN_TOOLTIP_SHOWHIDETP1;Visa/dölj den översta panelen Shift-L MAIN_TOOLTIP_THRESHOLD;Tröskelvärde MAIN_TOOLTIP_TOGGLE;Växla före/efter vy.\nKortkommando: Shift-b +MONITOR_PROFILE_SYSTEM;Systemets standard NAVIGATOR_B;B: NAVIGATOR_G;G: NAVIGATOR_H;H: @@ -773,9 +801,8 @@ PARTIALPASTE_PREPROCESS_DEADPIXFILT;Filter för döda pixlar PARTIALPASTE_PREPROCESS_GREENEQUIL;Grönbalansering PARTIALPASTE_PREPROCESS_HOTPIXFILT;Filter för heta pixlar PARTIALPASTE_PREPROCESS_LINEDENOISE;Linjärt brusfilter +PARTIALPASTE_PRSHARPENING;Skärpning efter storleksändring PARTIALPASTE_RAWCACORR_AUTO;Reducera kromatiska abberationer automatiskt -PARTIALPASTE_RAWCACORR_CABLUE;Blå -PARTIALPASTE_RAWCACORR_CARED;Röd PARTIALPASTE_RAWEXPOS_BLACK;Svärta PARTIALPASTE_RAWEXPOS_LINEAR;Vitpunktskorrigering PARTIALPASTE_RAWEXPOS_PRESER;Korrigering av högdagrar @@ -786,6 +813,7 @@ PARTIALPASTE_RAW_DMETHOD;Metod för demosaicing PARTIALPASTE_RAW_FALSECOLOR;Falskt färgbortträngningssteg PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE förbättringssteg PARTIALPASTE_RESIZE;Ändra storlek +PARTIALPASTE_RETINEX;Retinex PARTIALPASTE_RGBCURVES;RGB-kurvor PARTIALPASTE_ROTATION;Rotering PARTIALPASTE_SHADOWSHIGHLIGHTS;Skugg- och högdageråterställning @@ -850,8 +878,6 @@ PREFERENCES_DATEFORMAT;Datumformat PREFERENCES_DATEFORMATHINT;Du kan använda följande format:\n%y: år\n%m: månad\n%d: dag\n\nTill exempel är det svenska datumformatet:\n%y-%m-%d PREFERENCES_DAUB_LABEL;Använd Daubechies D6-wavelets istället för D4 PREFERENCES_DAUB_TOOLTIP;Brusreduceringen och wavelet-verktyget använder en Debauchies moder-wavelet. Om du väljer D6 istället för D4 ökas antalet ortogonala Daubechies-koefficienter och troligtvis ökas också kvaliteten på de småskaliga nivåerna. Det blir ingen skillnad i minnesanvändning eller beräkningstid. -PREFERENCES_DEFAULTLANG;Förvalt språk -PREFERENCES_DEFAULTTHEME;Förvalt tema PREFERENCES_DIRDARKFRAMES;Katalog för svartbilder PREFERENCES_DIRHOME;Hemkatalog PREFERENCES_DIRLAST;Senaste besökta katalog @@ -879,6 +905,7 @@ PREFERENCES_FORRAW;För råbilder PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Samma miniatyrbildshöjd mellan redigerings- och filvyn PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Att ha olika miniatyrbildshöjder kräver ytterligare beräkningskraft varje gång du växlar mellan redigerings- och filvyn. PREFERENCES_GIMPPATH;Installationskatalog för GIMP +PREFERENCES_GREY;Utenhetens Yb luminans (%) PREFERENCES_GREY05;Yb=05 CIE L#30 PREFERENCES_GREY10;Yb=10 CIE L#40 PREFERENCES_GREY15;Yb=15 CIE L#45 @@ -905,7 +932,10 @@ PREFERENCES_INTENT_SATURATION;Mättnad PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Visa intern råbild om oredigerad PREFERENCES_LANGAUTODETECT;Använd operativsystemets språkinställning PREFERENCES_LEVAUTDN;Brusreduceringsnivå +PREFERENCES_LEVDN;Cellstorlek +PREFERENCES_MAX;Max (Tile) PREFERENCES_MAXRECENTFOLDERS;Maximalt antal visade kataloger +PREFERENCES_MED;Medium (Tile/2) PREFERENCES_MENUGROUPEXTPROGS;Visa "Öppna med" PREFERENCES_MENUGROUPFILEOPERATIONS;Visa "Filaktiviteter" PREFERENCES_MENUGROUPLABEL;Visa "Etikett" @@ -913,6 +943,7 @@ PREFERENCES_MENUGROUPPROFILEOPERATIONS;Visa "Profilaktiviteter" PREFERENCES_MENUGROUPRANK;Visa "Betygsättning" PREFERENCES_MENUOPTIONS;Menyval för högerklick PREFERENCES_METADATA;Metadata +PREFERENCES_MIN;Mini (100x115) PREFERENCES_MULTITAB;Öppna bilderna i olika flikar PREFERENCES_MULTITABDUALMON;Visa bild på andra skärmen, om möjligt, i flerfliksläge PREFERENCES_NAVGUIDEBRUSH;Översiktsvyns guidefärg @@ -931,6 +962,8 @@ PREFERENCES_PARSEDEXT;Behandlade filtyper PREFERENCES_PARSEDEXTADD;Lägg till filtyp PREFERENCES_PARSEDEXTADDHINT;Skriv in en filändelse och tryck på den här knappen för att lägga till den i listan PREFERENCES_PARSEDEXTDELHINT;Ta bort de markerade filändelserna från listan +PREFERENCES_PARSEDEXTDOWNHINT;Flytta valt tillägg neråt i listan +PREFERENCES_PARSEDEXTUPHINT;Flytta valt tillägg uppåt i listan PREFERENCES_PREVDEMO;Metod för demosaicing av förhandsbilden PREFERENCES_PREVDEMO_FAST;Snabb PREFERENCES_PREVDEMO_LABEL;Demosaicing-metod som ska användas för förhandsvisning vid <100% förstoring: @@ -941,6 +974,7 @@ PREFERENCES_PROFILEPRCACHE;Profil i cache PREFERENCES_PROFILEPRFILE;Profil i indatafilen PREFERENCES_PROFILESAVECACHE;Spara behandlingsparametrar till cachen PREFERENCES_PROFILESAVEINPUT;Spara behandlingsparametrar med indatabildfilen +PREFERENCES_PROFILE_NONE;Ingen PREFERENCES_PROPERTY;Egenskaper PREFERENCES_PSPATH;Adobe Photoshops installationskatalog PREFERENCES_REMEMBERZOOMPAN;Kom ihåg förstoringsprocent och panorering @@ -948,6 +982,7 @@ PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Kom ihåg förstoringsgraden i % och panorer PREFERENCES_RGBDTL_LABEL;Maximalt antal trådar för brusreducering PREFERENCES_RGBDTL_TOOLTIP;Brusreduceringen kräver ungefär 128MB RAM för en 10MPix bild och 512MB för en 40 MPix, och ytterligare 128MB per tråd. Ju fler trådar som körs parallellt, desto snabbare går beräkningarna. Ange värdet "0" för att automatiskt använda så många trådar som möjligt. PREFERENCES_SELECTFONT;Välj typsnitt +PREFERENCES_SELECTFONT_COLPICKER;Välj typsnitt för färgpipetten PREFERENCES_SELECTLANG;Välj språk PREFERENCES_SELECTTHEME;Välj tema PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Seriell läsning av tiff-filer @@ -958,9 +993,9 @@ PREFERENCES_SHOWDATETIME;Visa datum och tid PREFERENCES_SHOWEXPOSURECOMPENSATION;Lägg till exponeringskompensation PREFERENCES_SHOWFILMSTRIPTOOLBAR;Visa verktygsraden för filmstrip PREFERENCES_SHTHRESHOLD;Tröskelvärde för skuggor +PREFERENCES_SIMPLAUT;Verktygsläge PREFERENCES_SINGLETAB;Öppna en bild åt gången PREFERENCES_SINGLETABVERTAB;Enkelfliksläge, vertikala flikar -PREFERENCES_SLIMUI;Slimmat gränssnitt PREFERENCES_SMA;Liten (250x287) PREFERENCES_SND_BATCHQUEUEDONE;Batchkön färdig PREFERENCES_SND_HELP;Fyll i en sökväg till ett ljud.\nI Windows kan "SystemDefault", "SystemAsterisk" o.s.v. användas.\nPå Linuxbaserade system kan du prova med "complete", "windows-attention" o.s.v. @@ -975,12 +1010,13 @@ PREFERENCES_TAB_IMPROC;Bildbehandling PREFERENCES_TAB_PERFORMANCE;Prestanda PREFERENCES_TAB_SOUND;Ljud PREFERENCES_TIMAX;Hög +PREFERENCES_TINB;Antal tiles PREFERENCES_TISTD;Standard PREFERENCES_TP_LABEL;Verktygspanel: PREFERENCES_TP_USEICONORTEXT;Använd ikoner istället för text PREFERENCES_TP_VSCROLLBAR;Göm verktygpanelens vertikala skrollist +PREFERENCES_TUNNELMETADATA;Kopiera Exif/IPTC/XMP till utfilen oförändrat PREFERENCES_USEBUNDLEDPROFILES;Visa förinstallerade profiler -PREFERENCES_USESYSTEMTHEME;Använd systemtema PREFERENCES_VIEW;Utenhetens vitbalansvärde (datorskärm, TV, bildkanon, etc.) PREFERENCES_WAVLEV;Öka waveletnivån vid kvalitet "hög" PREFERENCES_WLONE;En nivå @@ -1031,12 +1067,16 @@ SAVEDLG_PUTTOQUEUEHEAD;Flytta längst fram i behandlingskön SAVEDLG_PUTTOQUEUETAIL;Flytta längst bak i behandlingskön SAVEDLG_SAVEIMMEDIATELY;Spara direkt SAVEDLG_SAVESPP;Spara behandlingsparametrarna med bilderna +SAVEDLG_SUBSAMP;Subsampling SAVEDLG_SUBSAMP_1;Högsta komprimering SAVEDLG_SUBSAMP_2;Balanserad SAVEDLG_SUBSAMP_3;Högsta kvalitet +SAVEDLG_SUBSAMP_TOOLTIP;Bästa komprimering:\nJ:a:b 4:2:0\nh/v 2/2\nKroma halveras horisontellt och vertikalt.\n\nBalanserad:\nJ:a:b 4:2:2\nh/v 2/1\nKroma halveras horisontellt.\n\nBästa kvalitet:\nJ:a:b 4:4:4\nh/v 1/1\nIngen subsampling av kroma. SAVEDLG_TIFFUNCOMPRESSED;Okomprimerad TIFF SAVEDLG_WARNFILENAME;Filen kommer att heta SHCSELECTOR_TOOLTIP;Klicka på höger musknapp för att återställa\nde tre reglagens positioner +SOFTPROOF_GAMUTCHECK_TOOLTIP;Om aktiverad så indikeras i grått de pixlar som hamnar utanför utprofilens tonomfång. +SOFTPROOF_TOOLTIP;Färggodkännande\nOm aktiverad så kan du simulera renderingen som skapas av utprofilen från ICM-verktyget. Användbar för att simulera utskrifter. THRESHOLDSELECTOR_B;Nederst THRESHOLDSELECTOR_BL;Nederst till vänster THRESHOLDSELECTOR_BR;Nederst till höger @@ -1044,6 +1084,7 @@ THRESHOLDSELECTOR_HINT;Håll nere Shift tangenten för att flytta de olik THRESHOLDSELECTOR_T;Överst THRESHOLDSELECTOR_TL;Överst till vänster THRESHOLDSELECTOR_TR;Överst till höger +TOOLBAR_TOOLTIP_COLORPICKER;Låsbar färgpipett\n\nNär denna är aktiverad:\nTryck med vänster musknapp i förhandsgranskningen för att lägga till en färgpipett\nFlytta den medan du håller ner vänster musknapp\nTa bort den genom att trycka med höger musknapp\nTa bort alla genom att använda dig av Shift + höger musknapp\nTryck på höger musknapp utanför färgpipetten för att välja handverktyget TOOLBAR_TOOLTIP_CROP;Välj beskärningsområde.\nKortkommando: c\nFlytta beskärningsområdet genom att hålla nere Shift och vänstermusknapp och flytta musen. TOOLBAR_TOOLTIP_HAND;Handverktyg.\nKortkommando:h TOOLBAR_TOOLTIP_STRAIGHTEN;Räta upp.\nKortkommando:s\n\nDra en linje längs antingen en vertikal eller horisontell linje i bilden för att räta upp bilden. Roterationsvinkeln visas bredvid linjen du drar. Rotationscentrum är det geometriska mittpunkten i bilden. @@ -1111,6 +1152,9 @@ TP_BWMIX_VAL;L TP_CACORRECTION_BLUE;Blå TP_CACORRECTION_LABEL;Reducera kromatiska abberationer TP_CACORRECTION_RED;Röd +TP_CBDL_AFT;Efter svartvitt +TP_CBDL_BEF;Före svartvitt +TP_CBDL_METHOD_TOOLTIP;Välj om verktyget ska flyttas till efter svartvittsverktyget, vilket gör att det arbetar i L*a*b-rymden, eller före svartvitt, vilket gör att det arbetar i RGB. TP_CHMIXER_BLUE;Blå kanal TP_CHMIXER_GREEN;Grön kanal TP_CHMIXER_LABEL;Kanalmixer @@ -1156,10 +1200,11 @@ TP_COLORAPP_DATACIE;Resultat av CIECAM02-histogram i kurvor TP_COLORAPP_DATACIE_TOOLTIP;När detta är aktiverat, visar CIECAM02-histogram ungefärliga värden/intervall för J eller Q, och C, s eller M efter justeringar i CIECAM02.\nDet här valet påverkar inte huvudhistogrammet.\n\nNär detta är avaktiverat, visar histogrammet för CIECAM02-kurvor Lab-värden innan justeringar av CIECAM02 TP_COLORAPP_DEGREE_AUTO_TOOLTIP;Om den här checkboxen är aktiverad (rekommenderas), beräknar RT ett optimalt värde som sedan dels används av CAT02 och dels för hela CIECAM02.\nFör att ange ett värde manuellt, avaktivera checkboxen först (värden över 65 rekommenderas) TP_COLORAPP_DEGREE_TOOLTIP;Mängd CIE kromatisk anpassning 2002 -TP_COLORAPP_GAMUT;Kontroll av gamut (Lab) -TP_COLORAPP_GAMUT_TOOLTIP;Tillåt kontroll av gamut i Lab-läge +TP_COLORAPP_GAMUT;Kontroll av tonomfång (Lab) +TP_COLORAPP_GAMUT_TOOLTIP;Tillåt kontroll av tonomfång i Lab-läge TP_COLORAPP_HUE;Nyans(h) TP_COLORAPP_HUE_TOOLTIP;Nyans h) - vinkel mellan 0° och 360° +TP_COLORAPP_LABEL;CIE Color Appearance Model 2002 TP_COLORAPP_LABEL_CAM02;Bildjusteringar TP_COLORAPP_LABEL_SCENE;Förhållanden då bilden togs TP_COLORAPP_LABEL_VIEWING;Förhållanden vid betraktande @@ -1199,6 +1244,7 @@ TP_COLORTONING_CHROMAC;Opacitet TP_COLORTONING_COLOR;Färg TP_COLORTONING_HIGHLIGHT;Högdagrar TP_COLORTONING_HUE;Nyans +TP_COLORTONING_LAB;L*a*b* TP_COLORTONING_LUMA;Luminans TP_COLORTONING_LUMAMODE;Bevara luminansen TP_COLORTONING_LUMAMODE_TOOLTIP;Om aktiverad så kommer luminansen för varje pixel bevaras när du ändrar färgerna (röd, grön, cyan, blå, etc.). @@ -1209,13 +1255,18 @@ TP_COLORTONING_NEUTRAL_TIP;Återställ alla värden (skuggor, mellantoner, högd TP_COLORTONING_OPACITY;Opacitet TP_COLORTONING_RGBCURVES;RGB - Kurvor TP_COLORTONING_RGBSLIDERS;RGB - Reglage +TP_COLORTONING_SA;Skydd av mättnad TP_COLORTONING_SATURATEDOPACITY;Styrka TP_COLORTONING_SATURATIONTHRESHOLD;Tröskel TP_COLORTONING_SHADOWS;Skuggor TP_COLORTONING_SPLITCO;Skuggor/mellantoner/högdagrar TP_COLORTONING_SPLITCOCO;Färgbalans för skuggor/mellantoner/högdagrar +TP_COLORTONING_SPLITLR;Mättnad, 2 färger TP_COLORTONING_STR;Styrka TP_COLORTONING_STRENGTH;Styrka +TP_COLORTONING_TWO2;Speciell kroma "2 färger" +TP_COLORTONING_TWOALL;Speciell kroma +TP_COLORTONING_TWOBY;Speciell a* and b* TP_COLORTONING_TWOSTD;Standard-chroma TP_CROP_FIXRATIO;Fast proportion TP_CROP_GTDIAGONALS;Diagonalregeln @@ -1240,14 +1291,26 @@ TP_DARKFRAME_LABEL;Svartbild TP_DEFRINGE_LABEL;Fyll ut överstrålning TP_DEFRINGE_RADIUS;Radie TP_DEFRINGE_THRESHOLD;Tröskelvärde +TP_DIRPYRDENOISE_3X3;3×3 +TP_DIRPYRDENOISE_3X3_SOFT;3×3 mjuk +TP_DIRPYRDENOISE_5X5;5×5 +TP_DIRPYRDENOISE_5X5_SOFT;5×5 mjuk +TP_DIRPYRDENOISE_7X7;7×7 +TP_DIRPYRDENOISE_9X9;9×9 TP_DIRPYRDENOISE_ABM;Endast chroma +TP_DIRPYRDENOISE_AUT;Automatisk global +TP_DIRPYRDENOISE_AUTO;Automatisk global TP_DIRPYRDENOISE_AUTO_TOOLTIP;Försök att utvärdera chroma-bruset\nVar försiktig, den här beräkningen görs på genomsnittet och är tämligen subjektiv! TP_DIRPYRDENOISE_BLUE;Krominans - Blå-Gul +TP_DIRPYRDENOISE_C2TYPE_TOOLTIP;Manuell\nVerkar på hela bilden.\nDu kontrollerar brusreduceringen manuellt.\n\nAutomatisk global\nVerkar på hela bilden.\n9 zoner används för att beräkna en global kroma-brusreducering.\n\nFörhandsgranskning\nVerkar på hela bilden.\nDen synliga delen av förhandsgranskningen används för att beräkna en global kroma-brusreducering. TP_DIRPYRDENOISE_CCCURVE;Krominans-kurva TP_DIRPYRDENOISE_CHROMA;Kroma TP_DIRPYRDENOISE_CHROMAFR;Krominans +TP_DIRPYRDENOISE_CTYPE;Metod TP_DIRPYRDENOISE_CUR;Kurva TP_DIRPYRDENOISE_CURVEEDITOR_CC;Kroma +TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Öka (multiplicera) värdet av alla krominansreglage.\nDen här kurvan låter dig justera styrkan för den kromatiska brusreduceringen som en funktion av kromaticit, till exempel för att öka mängden i området med låg mättnad och för att minska det i de områden med hög mättnad. +TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulerar verkan av brusreduceringen för 'Luminans' TP_DIRPYRDENOISE_ENH;Förbättrat läge TP_DIRPYRDENOISE_ENH_TOOLTIP;Ökar kvaliteten på brusreduceringen till priset av 20 % längre beräkningstid TP_DIRPYRDENOISE_GAMMA;Gamma @@ -1258,6 +1321,8 @@ TP_DIRPYRDENOISE_LABM;L*a*b* TP_DIRPYRDENOISE_LCURVE;Luminans-kurva TP_DIRPYRDENOISE_LDETAIL;Luminansdetalj TP_DIRPYRDENOISE_LM;Endast luminans +TP_DIRPYRDENOISE_LPLABM;Viktad L* (litet) + a*b* (normal) +TP_DIRPYRDENOISE_LTYPE;Luminanskontroll TP_DIRPYRDENOISE_LUMA;Luminans TP_DIRPYRDENOISE_LUMAFR;Luminans TP_DIRPYRDENOISE_MAN;Manuell @@ -1265,13 +1330,18 @@ TP_DIRPYRDENOISE_MANU;Manuell TP_DIRPYRDENOISE_METHOD;Metod TP_DIRPYRDENOISE_METHOD11;Kvalitet TP_DIRPYRDENOISE_METHOD_TOOLTIP;För råfiler kan antingen RGB- eller Labmetoder användas.\n\nFör icke-råfiler kommer Labmetoden att användas, oavsett vad som är valt. +TP_DIRPYRDENOISE_NOISELABEL;Förhandsgranska brus: Medel=%1 Hög=%2 +TP_DIRPYRDENOISE_NOISELABELEMPTY;Förhandsgranska brus: Medel= - Hög= - +TP_DIRPYRDENOISE_PRE;Förhandsgranska multi-zon TP_DIRPYRDENOISE_PREV;Förhandsgranska +TP_DIRPYRDENOISE_PREVLABEL;Förhandsgranska storlek=%1, Centrum: Px=%2 Py=%3 TP_DIRPYRDENOISE_RED;Krominans - Röd-Grön TP_DIRPYRDENOISE_RGB;RGB TP_DIRPYRDENOISE_RGBM;RGB TP_DIRPYRDENOISE_SHAL;Standard TP_DIRPYRDENOISE_SHALBI;Hög TP_DIRPYRDENOISE_SLI;Reglage +TP_DIRPYRDENOISE_TILELABEL;Tile-storlek=%1, Center: Tx=%2 Ty=%3 TP_DIRPYREQUALIZER_ALGO;Algoritm för hudtoner TP_DIRPYREQUALIZER_ALGO_TOOLTIP;Fin: närmre hudens färger, minimerar inverkan på andra färger\nStor: undvik än mer artefakter TP_DIRPYREQUALIZER_ARTIF;Reducera artefakter @@ -1287,8 +1357,6 @@ TP_DIRPYREQUALIZER_SKIN_TOOLTIP;Vid -100 påverkas hudtoner.\nVid 0 behandlas al TP_DIRPYREQUALIZER_THRESHOLD;Tröskelvärde TP_DIRPYREQUALIZER_TOOLTIP;Försöker reducera artefakter uppkomna av övergångarna mellan färgerna (nyans, kroma, luminans) på hyn och övriga i bilden TP_DISTORTION_AMOUNT;Mängd -TP_DISTORTION_AUTO;Automatisk distorsionskorrigering -TP_DISTORTION_AUTO_TIP;(Experimentell) Korrigera automatiskt objektivdistorsion för vissa kameror (M4/3, vissa kompaktkameror, etc.) TP_DISTORTION_LABEL;Distorsion TP_EPD_EDGESTOPPING;Stoppa vid kanter TP_EPD_GAMMA;Gamma @@ -1321,7 +1389,10 @@ TP_EXPOSURE_TCMODE_PERCEPTUAL;Perceptuell TP_EXPOSURE_TCMODE_SATANDVALBLENDING;Mättnads- och värdeblandning TP_EXPOSURE_TCMODE_STANDARD;Standard TP_EXPOSURE_TCMODE_WEIGHTEDSTD;Viktad standard +TP_EXPOS_BLACKPOINT_LABEL;Svartpunkter, Raw +TP_EXPOS_WHITEPOINT_LABEL;Vitpunkter, Raw TP_FILMSIMULATION_LABEL;Filmsimulering +TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee är konfigurerad för att leta efter Hald CLUT-bilder, som används för filmsimuleringsverktyget, i en katalog som tar för lång tid att ladda.\nGå till Inställningar > Bildbehandling > Filmsimulering\nför att se vilken katalog som används. Du bör antingen hänvisa till en katalog som enbart innehåller Hald CLUT-bilder, eller till en helt tom katalog om du inte vill använda filmsimuleringsverktyget alls.\n\nLäs artikeln på RawPedia för mer information.\n\nVill du avbryta genomsökningen nu? TP_FILMSIMULATION_STRENGTH;Styrka TP_FILMSIMULATION_ZEROCLUTSFOUND;Ange katalog för HaldCLUT i Inställningar TP_FLATFIELD_AUTOSELECT;Autoval @@ -1363,8 +1434,10 @@ TP_HSVEQUALIZER_SAT;Mättnad TP_HSVEQUALIZER_VAL;Värde TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Bas-exponering TP_ICM_APPLYHUESATMAP;Bas-tabell +TP_ICM_APPLYLOOKTABLE_TOOLTIP;Tillämpa den inbäddade DCP:ns uppslagstabell. Inställningen är bara aktiv om den valda DCP har en sådan. TP_ICM_BLENDCMSMATRIX;Mixa högdagrar med matris TP_ICM_BLENDCMSMATRIX_TOOLTIP;Möjliggör återskapande av utbrända högdagrar när LUT-baserade ICC-profiler används. +TP_ICM_BPC;Svartpunktskompensation TP_ICM_DCPILLUMINANT;Ljuskälla TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolerad ljuskälla TP_ICM_DCPILLUMINANT_TOOLTIP;Välj vilken inbäddad DCP-ljuskälla som ska användas. Standard är "interpolerad" som är en blandning mellan de två baserad på vitbalans. Valet är endast aktiverat om en DCP från en dubbel ljuskälla med interpoleringsstöd är vald @@ -1383,7 +1456,6 @@ TP_ICM_INPUTPROFILE;Inmatningsprofil TP_ICM_LABEL;Färghantering TP_ICM_NOICM;Ingen färghantering: sRGB-utmatning TP_ICM_OUTPUTPROFILE;Utmatningsprofil -TP_ICM_SAVEREFERENCE;Spara referensbild för profilering TP_ICM_SAVEREFERENCE_APPLYWB;Applicera witbalans TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generellt sätt gäller att du ska applicera vitbalansen när du sparar bilder för att skapa ICC-profiler, men inte när du ska skapa DCP-profiler. TP_ICM_SAVEREFERENCE_TOOLTIP;Spara den linjära TIFF-bilden innan inmatningsprofilen appliceras. Detta kan användas för kalibreringsändamål eller generering av en kameraprofil. @@ -1436,6 +1508,7 @@ TP_LENSPROFILE_LABEL;Objektivkorrigeringsprofil TP_LENSPROFILE_USECA;Korrigera för kromatiska abberationer TP_LENSPROFILE_USEDIST;Korrigera distorsion TP_LENSPROFILE_USEVIGN;Korrigera vinjettering +TP_NEUTRAL;Återställ TP_NEUTRAL_TIP;Återställ exponeringsreglagen till neutrala värden.\nGäller för samma reglage som autonivåer, oavsett om du använder autonivåer eller ej TP_PCVIGNETTE_FEATHER;Fjäder TP_PCVIGNETTE_FEATHER_TOOLTIP;Fjäder: 0=enbart kanter, 50=halvvägs till mitten, 100=i mitten @@ -1457,10 +1530,12 @@ TP_PREPROCESS_HOTPIXFILT_TOOLTIP;Försöker att undertrycka heta pixlar. TP_PREPROCESS_LABEL;Förbehandling TP_PREPROCESS_LINEDENOISE;Linjärt brusfilter TP_PREPROCESS_NO_FOUND;Inga hittade +TP_PRSHARPENING_LABEL;Skärpning efter storleksförändring TP_PRSHARPENING_TOOLTIP;Skärper bilden efter att den storleksförändrats. Fungerar endast när "Lanczos" är valt som storleksändringsmetod. Det är omöjligt att förhandsgranska denna effekt. Se på RawPedia-sidan hur du ska använda verktyget. TP_RAWCACORR_AUTO;Reducera automatiskt kromatiska abberationer TP_RAWCACORR_CABLUE;Blå TP_RAWCACORR_CARED;Röd +TP_RAWCACORR_CASTR;Styrka TP_RAWEXPOS_BLACKS;Svartpunktsnivåer TP_RAWEXPOS_BLACK_0;Grön 1 (ledare) TP_RAWEXPOS_BLACK_1;Röd @@ -1481,10 +1556,13 @@ TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Förfining av demosaicing... TP_RAW_DMETHOD_TOOLTIP;Notera: IGV och LMMSE är avsedda för bilder där mycket brus förekommer. TP_RAW_FALSECOLOR;Falskt färgbortträngningssteg TP_RAW_HD;Tröskel +TP_RAW_HD_TOOLTIP;Lägre värden kommer göra het/dödpixelupptäckning mer aggressiv, men fler skenträffar leder också till fler artefakter. Om du noterar artefakter när du använder detta verktg, så minska tröskelvärdet till dess att de försvinner. TP_RAW_LABEL;Demosaicing TP_RAW_LMMSEITERATIONS;LMMSE förbättringssteg TP_RAW_LMMSE_TOOLTIP;Adderar gamma (steg 1) - adderar median (steg 2,3 och 4), slutligen adderas ett förfiningssteg (steg 5 och 6) för att reducera artefakter och för att förbättra signal/brusförhållandet. TP_RAW_SENSOR_BAYER_LABEL;Sensor med Bayer-matris +TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass ger bäst resultat (rekommenderas för bilder tagna med ett lågt ISO-tal).\n1-pass är nästintill ej urskiljbart från 3-pass för bilder tagna på högre ISO-värden, och är dessutom snabbare. +TP_RAW_SENSOR_XTRANS_LABEL;Sensor med X-Transteknik TP_RESIZE_APPLIESTO;Tillämpas på: TP_RESIZE_CROPPEDAREA;Beskuren yta TP_RESIZE_FITBOX;Begränsad yta @@ -1499,6 +1577,63 @@ TP_RESIZE_SCALE;Skala TP_RESIZE_SPECIFY;Specificera: TP_RESIZE_W;B: TP_RESIZE_WIDTH;Bredd +TP_RETINEX_CONTEDIT_HSL;Histogramequalizer HSL +TP_RETINEX_CONTEDIT_LAB;Histogramequalizer L*a*b* +TP_RETINEX_CONTEDIT_LH;Nyans-equalizer +TP_RETINEX_CURVEEDITOR_CD;L=f(L) +TP_RETINEX_CURVEEDITOR_LH;Styrka=f(H) +TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Styrka enligt nyans Styrkan=f(H)\nDen här kurvan agerar även på kroma när "Högdager"-metoden används i retinex +TP_RETINEX_CURVEEDITOR_MAP;L=f(L) +TP_RETINEX_EQUAL;Equalizer +TP_RETINEX_FREEGAMMA;Fri gamma +TP_RETINEX_GAIN;Ökning +TP_RETINEX_GAINOFFS;Ökning och kompensation (ljushet) +TP_RETINEX_GAINTRANSMISSION;Transmissionsökning +TP_RETINEX_GAMMA;Gamma +TP_RETINEX_GAMMA_FREE;Fri +TP_RETINEX_GAMMA_HIGH;Hög +TP_RETINEX_GAMMA_LOW;Låg +TP_RETINEX_GAMMA_MID;Mellan +TP_RETINEX_GAMMA_NONE;Ingen +TP_RETINEX_GRAD;Överföringsgradient +TP_RETINEX_GRADS;Styrkegradient +TP_RETINEX_GRADS_TOOLTIP;Om reglaget är på 0 så kommer alla iterationer att vara lika.\nOm > 0 så kommer styrkan att reduceras i takt med att iterationerna ökar och omvänt. +TP_RETINEX_GRAD_TOOLTIP;Om reglaget är på 0 så kommer alla iterationer att vara lika.\nOm > 0 så kommer variansen och tröskelvärdet att reduceras i takt med att iterationerna ökar och omvänt. +TP_RETINEX_HIGH;Hög +TP_RETINEX_HIGHLIG;Högdagrar +TP_RETINEX_HIGHLIGHT;Tröskelvärde för högdagrar +TP_RETINEX_HSLSPACE_LIN;HSL-linjär +TP_RETINEX_HSLSPACE_LOG;HSL-logaritmisk +TP_RETINEX_ITER;Iterationer (Tone-mapping) +TP_RETINEX_ITERF;Tone-mapping +TP_RETINEX_ITER_TOOLTIP;Simulera en tone-mappingoperator.\nHöga värden ökar processtiden. +TP_RETINEX_LABEL;Retinex +TP_RETINEX_LABSPACE;L*a*b* +TP_RETINEX_LOW;Låg +TP_RETINEX_MAP_NONE;Ingen +TP_RETINEX_METHOD;Metod +TP_RETINEX_NEIGHBOR;Radie +TP_RETINEX_NEUTRAL;Återställ +TP_RETINEX_NEUTRAL_TIP;Återställer alla reglage och kurvor till sina ursprungliga värden. +TP_RETINEX_OFFSET;Kompensation (ljushet) +TP_RETINEX_SCALES;Gaussisk gradient +TP_RETINEX_SCALES_TOOLTIP;Om reglaget är på 0 så kommer alla iterationer att vara lika.\nOm > 0 så kommer skalan och radien reduceras när iterationerna ökar och omvänt. +TP_RETINEX_SETTINGS;Inställningar +TP_RETINEX_SKAL;Sakal +TP_RETINEX_SLOPE;Lutning, fri gamma +TP_RETINEX_STRENGTH;Styrka +TP_RETINEX_THRESHOLD;Tröskelvärde +TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Medel=%3 Sigma=%4 +TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 +TP_RETINEX_TRANF;Överföring +TP_RETINEX_UNIFORM;Uniform +TP_RETINEX_VARIANCE;Kontrast +TP_RETINEX_VARIANCE_TOOLTIP;Låga variationer ökar lokal kontrast och mättnad men kan leda till artefakter. +TP_RETINEX_VIEW;Process +TP_RETINEX_VIEW_NONE;Standard +TP_RETINEX_VIEW_TRAN;Överföring - Auto +TP_RETINEX_VIEW_TRAN2;Överföring - Fixerad +TP_RETINEX_VIEW_UNSHARP;Oskarp mask TP_RGBCURVES_BLUE;B TP_RGBCURVES_CHANNEL;Kanal TP_RGBCURVES_GREEN;G @@ -1536,7 +1671,6 @@ TP_SHARPENING_RLD_AMOUNT;Mängd TP_SHARPENING_RLD_DAMPING;Dämpning TP_SHARPENING_RLD_ITERATIONS;Upprepningar TP_SHARPENING_THRESHOLD;Tröskelvärde -TP_SHARPENING_TOOLTIP;Förvänta dig en lite annorlunda effekt när denna används tillsammans med CIECAM02. TP_SHARPENING_USM;Oskarp mask TP_SHARPENMICRO_AMOUNT;Mängd TP_SHARPENMICRO_LABEL;Mikrokontrast @@ -1591,12 +1725,32 @@ TP_WAVELET_BASLI;Reglage TP_WAVELET_BATYPE;Kontrast-balans-metod TP_WAVELET_CCURVE;Lokal kontrast TP_WAVELET_CH1;Hela kromaomfånget +TP_WAVELET_CH2;Mättad/pastell TP_WAVELET_CH3;Koppla kontrastnivåer TP_WAVELET_CHCU;Kurva +TP_WAVELET_CHR;Styrkan i kopplingen mellan kroma och kontrast +TP_WAVELET_CHRO;Mättad/pastell - tröskelvärde TP_WAVELET_CHSL;Reglage TP_WAVELET_CHTYPE;Krominans-metod TP_WAVELET_COLORT;Opacitet rött-grönt TP_WAVELET_COMPCONT;Kontrast +TP_WAVELET_COMPGAMMA;Komprimering av gamma +TP_WAVELET_COMPGAMMA_TOOLTIP;Justering av gammat i den återstående bilden låter dig jämna ut datat och histogrammet. +TP_WAVELET_COMPTM;Tone-mapping +TP_WAVELET_CONTEDIT;'Efter' kontrastkurvan +TP_WAVELET_CONTR;Tonomfång +TP_WAVELET_CONTRA;Kontrast +TP_WAVELET_CONTRAST_MINUS;Kontrast - +TP_WAVELET_CONTRAST_PLUS;Kontrast + +TP_WAVELET_CONTRA_TOOLTIP;Ändrar kontrast i den återstående bilden. +TP_WAVELET_CTYPE;Kontroll av krominans +TP_WAVELET_CURVEEDITOR_CH;Kontrastnivåer=f(Nyans) +TP_WAVELET_CURVEEDITOR_CL;L +TP_WAVELET_CURVEEDITOR_CL_TOOLTIP;Applicerar en kontrastbaserad luminanskurva vid slitet av waveletbehandlingen. +TP_WAVELET_CURVEEDITOR_HH;HH +TP_WAVELET_CURVEEDITOR_HH_TOOLTIP;Ändrar den återstående bildens nyans som en funktion av nyansen. +TP_WAVELET_DALL;Alla riktningar +TP_WAVELET_DAUB;Kantprestanda TP_WAVELET_DAUB2;D2 - låg TP_WAVELET_DAUB4;D4 - standard TP_WAVELET_DAUB6;D6 - standard plus @@ -1607,11 +1761,19 @@ TP_WAVELET_DTHR;Diagonal TP_WAVELET_DTWO;Horisontell TP_WAVELET_EDCU;Kurva TP_WAVELET_EDGCONT;Lokal kontrast +TP_WAVELET_EDGE;Kantskärpa TP_WAVELET_EDGEAMPLI;Basförstärkning +TP_WAVELET_EDGEDETECT;Känslighet för gradient +TP_WAVELET_EDGEDETECTTHR_TOOLTIP;Det här reglaget siktar in sig på kantdetektering, t ex för att undvika att kantskärpning appliceras på fina detaljer så som brus i himlen. +TP_WAVELET_EDGEDETECT_TOOLTIP;Att flytta reglaget till höger ökar kantkänsligheten. Detta påverkar den lokala kontrasten, kantinställningarna och bruset. +TP_WAVELET_EDGESENSI;Kantkänslighet +TP_WAVELET_EDGTHRESH;Detalj TP_WAVELET_EDRAD;Radie TP_WAVELET_EDSL;Tröskelreglage TP_WAVELET_EDTYPE;Lokal kontrast-metod TP_WAVELET_EDVAL;Styrka +TP_WAVELET_FINAL;Slutlig förbättring +TP_WAVELET_FINEST;Finast TP_WAVELET_HS2;Skuggor/Högdagrar TP_WAVELET_HUESKIN;Hudnyans TP_WAVELET_HUESKY;Himmelsnyans @@ -1619,7 +1781,10 @@ TP_WAVELET_LABEL;Wavelet-nivåer TP_WAVELET_LARGEST;Grövst TP_WAVELET_LEVCH;Kroma TP_WAVELET_LEVDIR_ALL;Alla nivåer i en riktning +TP_WAVELET_LEVDIR_INF;Under eller lika med nivån TP_WAVELET_LEVDIR_ONE;En nivå +TP_WAVELET_LEVDIR_SUP;Över nivån +TP_WAVELET_LEVELS;Waveletnivåer TP_WAVELET_LEVF;Kontrast TP_WAVELET_LEVONE;Nivå 2 TP_WAVELET_LEVTHRE;Nivå 4 @@ -1627,13 +1792,16 @@ TP_WAVELET_LEVTWO;Nivå 3 TP_WAVELET_LEVZERO;Nivå 1 TP_WAVELET_LIPST;Förbättrad algoritm TP_WAVELET_MEDGREINF;Första nivån +TP_WAVELET_MEDI;Reducera artefakter i blå himmel TP_WAVELET_MEDILEV;Kantdetektering TP_WAVELET_NEUTRAL;Neutral TP_WAVELET_NOIS;Brusreducering +TP_WAVELET_NOISE;Brusreducera och förfina TP_WAVELET_NPHIGH;Hög TP_WAVELET_NPLOW;Låg TP_WAVELET_NPNONE;Ingen TP_WAVELET_NPTYPE;Angränsande pixlar +TP_WAVELET_OPACITYWL;Slutlig lokal kontrast TP_WAVELET_PROC;Process TP_WAVELET_RE1;Förstärkt TP_WAVELET_RE2;Oförändrad @@ -1651,7 +1819,12 @@ TP_WAVELET_THR;Skuggtröskel TP_WAVELET_THRESHOLD;Högdagernivåer TP_WAVELET_THRESHOLD2;Skuggnivåer TP_WAVELET_THRH;Högdagertröskel +TP_WAVELET_TILESBIG;Stora tiles TP_WAVELET_TILESFULL;Hela bilden +TP_WAVELET_TILESIZE;Metod för tiling +TP_WAVELET_TILESLIT;SMå tiles +TP_WAVELET_TMSTRENGTH;Komprimeringsstyrka +TP_WAVELET_TMTYPE;Komprimeringsmetod TP_WBALANCE_AUTO;Auto TP_WBALANCE_CAMERA;Kamera TP_WBALANCE_CLOUDY;Molnigt @@ -1713,34 +1886,33 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !CURVEEDITOR_AXIS_LEFT_TAN;LT: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. -!EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. -!FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. -!GENERAL_APPLY;Apply -!GENERAL_OPEN;Open -!HISTORY_MSG_166;Exposure - Reset -!HISTORY_MSG_256;NR - Median type +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile +!EXPORT_BYPASS;Processing steps to bypass +!EXPORT_PIPELINE;Processing pipeline +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_257;Color Toning -!HISTORY_MSG_259;CT - Opacity curve -!HISTORY_MSG_260;CT - a*[b*] opacity -!HISTORY_MSG_262;CT - b* opacity !HISTORY_MSG_288;Flat Field - Clip control !HISTORY_MSG_289;Flat Field - Clip control - Auto -!HISTORY_MSG_301;NR - Luma control !HISTORY_MSG_310;W - Residual - Sky tar/prot !HISTORY_MSG_313;W - Chroma - Sat/past !HISTORY_MSG_316;W - Gamut - Skin tar/prot !HISTORY_MSG_329;W - Toning - Opacity RG !HISTORY_MSG_330;W - Toning - Opacity BY -!HISTORY_MSG_332;W - Tiling method -!HISTORY_MSG_341;W - Edge performance !HISTORY_MSG_344;W - Meth chroma sl/cur !HISTORY_MSG_353;W - ES - Gradient sensitivity -!HISTORY_MSG_361;W - Final - Chroma balance -!HISTORY_MSG_364;W - Final - Contrast balance -!HISTORY_MSG_365;W - Final - Delta balance -!HISTORY_MSG_368;W - Final - Contrast balance -!HISTORY_MSG_369;W - Final - Balance method -!HISTORY_MSG_370;W - Final - Local contrast curve !HISTORY_MSG_393;DCP - Look table !HISTORY_MSG_396;W - Contrast sub-tool !HISTORY_MSG_397;W - Chroma sub-tool @@ -1750,277 +1922,228 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !HISTORY_MSG_401;W - Toning sub-tool !HISTORY_MSG_402;W - Denoise sub-tool !HISTORY_MSG_406;W - ES - Neighboring pixels -!HISTORY_MSG_407;Retinex - Method -!HISTORY_MSG_408;Retinex - Radius -!HISTORY_MSG_409;Retinex - Contrast -!HISTORY_MSG_410;Retinex - Offset -!HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient -!HISTORY_MSG_413;Retinex - Contrast -!HISTORY_MSG_414;Retinex - Histogram - Lab -!HISTORY_MSG_415;Retinex - Transmission -!HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median -!HISTORY_MSG_418;Retinex - Threshold -!HISTORY_MSG_419;Retinex - Color space -!HISTORY_MSG_420;Retinex - Histogram - HSL -!HISTORY_MSG_421;Retinex - Gamma -!HISTORY_MSG_422;Retinex - Gamma -!HISTORY_MSG_423;Retinex - Gamma slope -!HISTORY_MSG_424;Retinex - HL threshold +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_425;Retinex - Log base -!HISTORY_MSG_426;Retinex - Hue equalizer !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent -!HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient -!HISTORY_MSG_432;Retinex - M - Highlights -!HISTORY_MSG_433;Retinex - M - Highlights TW -!HISTORY_MSG_434;Retinex - M - Shadows -!HISTORY_MSG_435;Retinex - M - Shadows TW -!HISTORY_MSG_436;Retinex - M - Radius -!HISTORY_MSG_437;Retinex - M - Method -!HISTORY_MSG_438;Retinex - M - Equalizer -!HISTORY_MSG_439;Retinex - Process -!HISTORY_MSG_440;CbDL - Method -!HISTORY_MSG_441;Retinex - Gain transmission -!HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation -!MAIN_BUTTON_SENDTOEDITOR;Edit image in external editor -!MONITOR_PROFILE_SYSTEM;System default +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !PARTIALPASTE_COLORTONING;Color toning !PARTIALPASTE_FLATFIELDCLIPCONTROL;Flat-field clip control -!PARTIALPASTE_PRSHARPENING;Post-resize sharpening -!PARTIALPASTE_RETINEX;Retinex -!PREFERENCES_GREY;Output device's Yb luminance (%) +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue +!PARTIALPASTE_RAW_IMAGENUM;Sub-image +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. -!PREFERENCES_LEVDN;Cell size +!PREFERENCES_LANG;Language !PREFERENCES_LISS;Auto multi-zone smoothing -!PREFERENCES_MAX;Maxi (Tile) -!PREFERENCES_MED;Medium (Tile/2) -!PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile -!PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. -!PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. -!PREFERENCES_PROFILE_NONE;None -!PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings -!PREFERENCES_SIMPLAUT;Tool mode -!PREFERENCES_TINB;Number of tiles -!PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file -!SAVEDLG_SUBSAMP;Subsampling -!SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. -!SOFTPROOF_GAMUTCHECK_TOOLTIP;If active, indicates in grey the pixels which have out of gamut colors from the output profile. -!SOFTPROOF_TOOLTIP;Soft-proofing\nIf active, let you simulate de rendering generated by the output profile of the ICM tool. Most useful for simulating printing outputs. -!TOOLBAR_TOOLTIP_COLORPICKER;Lockable Color Picker\n\nWhen enabled:\nClick in the preview with left mouse button to add a color picker\nDrag it around while pressing the left mouse button\nDelete the color picker with a right mouse button click\nDelete all color pickers with Shift + Right mouse button click\nRight click away from any color picker to go back to the Hand tool -!TP_CBDL_AFT;After Black-and-White -!TP_CBDL_BEF;Before Black-and-White +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme +!PROFILEPANEL_PDYNAMIC;Dynamic !TP_CBDL_METHOD;Process located -!TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. -!TP_COLORAPP_LABEL;CIE Color Appearance Model 2002 +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP;Chroma opacity as a function of luminance oC=f(L) -!TP_COLORTONING_LAB;L*a*b* blending !TP_COLORTONING_LABEL;Color Toning !TP_COLORTONING_METHOD_TOOLTIP;"L*a*b* blending", "RGB sliders" and "RGB curves" use interpolated color blending.\n"Color balance (Shadows/Midtones/Highlights)" and "Saturation 2 colors" use direct colors.\n\nThe Black-and-White tool can be enabled when using any color toning method, which allows for color toning. -!TP_COLORTONING_SA;Saturation Protection -!TP_COLORTONING_SPLITLR;Saturation 2 colors -!TP_COLORTONING_TWO2;Special chroma '2 colors' -!TP_COLORTONING_TWOALL;Special chroma -!TP_COLORTONING_TWOBY;Special a* and b* !TP_COLORTONING_TWOCOLOR_TOOLTIP;Standard chroma:\nLinear response, a* = b*.\n\nSpecial chroma:\nLinear response, a* = b*, but unbound - try under the diagonal.\n\nSpecial a* and b*:\nLinear response unbound with separate curves for a* and b*. Intended for special effects.\n\nSpecial chroma 2 colors:\nMore predictable. -!TP_DIRPYRDENOISE_3X3;3×3 -!TP_DIRPYRDENOISE_3X3_SOFT;3×3 soft -!TP_DIRPYRDENOISE_5X5;5×5 -!TP_DIRPYRDENOISE_5X5_SOFT;5×5 soft -!TP_DIRPYRDENOISE_7X7;7×7 -!TP_DIRPYRDENOISE_9X9;9×9 -!TP_DIRPYRDENOISE_AUT;Automatic global -!TP_DIRPYRDENOISE_AUTO;Automatic global -!TP_DIRPYRDENOISE_C2TYPE_TOOLTIP;Manual\nActs on the full image.\nYou control the noise reduction settings manually.\n\nAutomatic global\nActs on the full image.\n9 zones are used to calculate a global chrominance noise reduction setting.\n\nPreview\nActs on the whole image.\nThe part of the image visible in the preview is used to calculate global chrominance noise reduction settings. -!TP_DIRPYRDENOISE_CTYPE;Method !TP_DIRPYRDENOISE_CTYPE_TOOLTIP;Manual\nActs on the full image.\nYou control the noise reduction settings manually.\n\nAutomatic global\nActs on the full image.\n9 zones are used to calculate a global chrominance noise reduction setting.\n\nAutomatic multi-zones\nNo preview - works only during saving, but using the "Preview" method by matching the tile size and center to the preview size and center you can get an idea of the expected results.\nThe image is divided into tiles (about 10 to 70 depending on image size) and each tile receives its own chrominance noise reduction settings.\n\nPreview\nActs on the whole image.\nThe part of the image visible in the preview is used to calculate global chrominance noise reduction settings. -!TP_DIRPYRDENOISE_CURVEEDITOR_CC_TOOLTIP;Increase (multiply) the value of all chrominance sliders.\nThis curve lets you adjust the strength of chromatic noise reduction as a function of chromaticity, for instance to increase the action in areas of low saturation and to decrease it in those of high saturation. -!TP_DIRPYRDENOISE_CURVEEDITOR_L_TOOLTIP;Modulates action of 'Luminance' denoise -!TP_DIRPYRDENOISE_LPLABM;Weighted L* (little) + a*b* (normal) -!TP_DIRPYRDENOISE_LTYPE;Luminance control !TP_DIRPYRDENOISE_MED;Median Filter !TP_DIRPYRDENOISE_MEDMETHOD;Median method !TP_DIRPYRDENOISE_MEDTYPE;Median type !TP_DIRPYRDENOISE_METHOD11_TOOLTIP;Quality can be adapted to the noise pattern. A setting of "high" increases the noise reduction effect at a cost of extended processing time. !TP_DIRPYRDENOISE_METM_TOOLTIP;When using the "Luminance only" and "L*a*b*" methods, median filtering will be performed just after the wavelet step in the noise reduction pipeline.\nWhen using the "RGB" mode, it will be performed at the very end of the noise reduction pipeline. !TP_DIRPYRDENOISE_MET_TOOLTIP;Apply a median filter of the desired window size. The larger the window's size, the longer it takes.\n\n3×3 soft: treats 5 pixels in a 3×3 pixel window.\n3×3: treats 9 pixels in a 3×3 pixel window.\n5×5 soft: treats 13 pixels in a 5×5 pixel window.\n5×5: treats 25 pixels in a 5×5 pixel window.\n7×7: treats 49 pixels in a 7×7 pixel window.\n9×9: treats 81 pixels in a 9×9 pixel window.\n\nSometimes it is possible to achieve higher quality running several iterations with a smaller window size than one iteration with a larger one. -!TP_DIRPYRDENOISE_NOISELABEL;Preview noise: Mean=%1 High=%2 -!TP_DIRPYRDENOISE_NOISELABELEMPTY;Preview noise: Mean= - High= - !TP_DIRPYRDENOISE_NRESID_TOOLTIP;Displays the remaining noise levels of the part of the image visible in the preview after wavelet.\n\n>300 Very noisy\n100-300 Noisy\n50-100 A little noisy\n<50 Very low noise\n\nBeware, the values will differ between RGB and L*a*b* mode. The RGB values are less accurate because the RGB mode does not completely separate luminance and chrominance. !TP_DIRPYRDENOISE_PASSES;Median iterations !TP_DIRPYRDENOISE_PASSES_TOOLTIP;Applying three median filter iterations with a 3×3 window size often leads to better results than using one median filter iteration with a 7×7 window size. !TP_DIRPYRDENOISE_PON;Auto multi-zones -!TP_DIRPYRDENOISE_PRE;Preview multi-zones -!TP_DIRPYRDENOISE_PREVLABEL;Preview size=%1, Center: Px=%2 Py=%3 -!TP_DIRPYRDENOISE_TILELABEL;Tile size=%1, Center: Tx=%2 Ty=%3 !TP_DIRPYREQUALIZER_HUESKIN_TOOLTIP;This pyramid is for the upper part, so far as the algorithm at its maximum efficiency.\nTo the lower part, the transition zones.\nIf you need to move the area significantly to the left or right - or if there are artifacts: the white balance is incorrect\nYou can slightly reduce the zone to prevent the rest of the image is affected. -!TP_EXPOS_BLACKPOINT_LABEL;Raw Black Points -!TP_EXPOS_WHITEPOINT_LABEL;Raw White Points -!TP_FILMSIMULATION_SLOWPARSEDIR;RawTherapee is configured to look for Hald CLUT images, which are used for the Film Simulation tool, in a folder which is taking too long to load.\nGo to Preferences > Image Processing > Film Simulation\nto see which folder is being used. You should either point RawTherapee to a folder which contains only Hald CLUT images and nothing more, or to an empty folder if you don't want to use the Film Simulation tool.\n\nRead the Film Simulation article in RawPedia for more information.\n\nDo you want to cancel the scan now? +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_FLATFIELD_CLIPCONTROL;Clip control !TP_FLATFIELD_CLIPCONTROL_TOOLTIP;Clip control avoids clipped highlights caused by applying the flat field. If there are already clipped highlights before applying the flat field, clip control can lead to color cast. -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. -!TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_PROFILEINTENT;Rendering Intent -!TP_NEUTRAL;Reset -!TP_PRSHARPENING_LABEL;Post-Resize Sharpening -!TP_RAWCACORR_CASTR;Strength -!TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. -!TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. -!TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix -!TP_RETINEX_CONTEDIT_HSL;Histogram equalizer HSL -!TP_RETINEX_CONTEDIT_LAB;Histogram equalizer L*a*b* -!TP_RETINEX_CONTEDIT_LH;Hue equalizer +!TP_ICM_SAVEREFERENCE;Save Reference Image +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. +!TP_RAW_LMMSE;LMMSE +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red +!TP_RAW_VNG4;VNG4 !TP_RETINEX_CONTEDIT_MAP;Mask equalizer -!TP_RETINEX_CURVEEDITOR_CD;L=f(L) !TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;Luminance according to luminance L=f(L)\nCorrect raw data to reduce halos and artifacts. -!TP_RETINEX_CURVEEDITOR_LH;Strength=f(H) -!TP_RETINEX_CURVEEDITOR_LH_TOOLTIP;Strength according to hue Strength=f(H)\nThis curve also acts on chroma when using the "Highlight" retinex method. -!TP_RETINEX_CURVEEDITOR_MAP;L=f(L) !TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP;This curve can be applied alone or with a Gaussian mask or wavelet mask.\nBeware of artifacts! -!TP_RETINEX_EQUAL;Equalizer -!TP_RETINEX_FREEGAMMA;Free gamma -!TP_RETINEX_GAIN;Gain -!TP_RETINEX_GAINOFFS;Gain and Offset (brightness) -!TP_RETINEX_GAINTRANSMISSION;Gain transmission !TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplify or reduce transmission map to achieve luminance.\nAbscissa: transmission -min from 0, mean, and values (max).\nOrdinate: gain. !TP_RETINEX_GAIN_TOOLTIP;Acts on the restored image.\n\nThis is very different from the others settings. Used for black or white pixels, and to help balance the histogram. -!TP_RETINEX_GAMMA;Gamma -!TP_RETINEX_GAMMA_FREE;Free -!TP_RETINEX_GAMMA_HIGH;High -!TP_RETINEX_GAMMA_LOW;Low -!TP_RETINEX_GAMMA_MID;Middle -!TP_RETINEX_GAMMA_NONE;None !TP_RETINEX_GAMMA_TOOLTIP;Restore tones by applying gamma before and after Retinex. Different from Retinex curves or others curves (Lab, Exposure, etc.). -!TP_RETINEX_GRAD;Transmission gradient -!TP_RETINEX_GRADS;Strength gradient -!TP_RETINEX_GRADS_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Strength is reduced when iterations increase, and conversely. -!TP_RETINEX_GRAD_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Variance and Threshold are reduced when iterations increase, and conversely. -!TP_RETINEX_HIGH;High -!TP_RETINEX_HIGHLIG;Highlight -!TP_RETINEX_HIGHLIGHT;Highlight threshold !TP_RETINEX_HIGHLIGHT_TOOLTIP;Increase action of High algorithm.\nMay require you to re-adjust "Neighboring pixels" and to increase the "White-point correction" in the Raw tab -> Raw White Points tool. -!TP_RETINEX_HSLSPACE_LIN;HSL-Linear -!TP_RETINEX_HSLSPACE_LOG;HSL-Logarithmic -!TP_RETINEX_ITER;Iterations (Tone-mapping) -!TP_RETINEX_ITERF;Tone mapping -!TP_RETINEX_ITER_TOOLTIP;Simulate a tone-mapping operator.\nHigh values increase the processing time. -!TP_RETINEX_LABEL;Retinex !TP_RETINEX_LABEL_MASK;Mask -!TP_RETINEX_LABSPACE;L*a*b* -!TP_RETINEX_LOW;Low !TP_RETINEX_MAP;Mask method !TP_RETINEX_MAP_GAUS;Gaussian mask !TP_RETINEX_MAP_MAPP;Sharp mask (wavelet partial) !TP_RETINEX_MAP_MAPT;Sharp mask (wavelet total) !TP_RETINEX_MAP_METHOD_TOOLTIP;Use the mask generated by the Gaussian function above (Radius, Method) to reduce halos and artifacts.\n\nCurve only: apply a diagonal contrast curve on the mask.\nBeware of artifacts!\n\nGaussian mask: generate and use a Gaussian blur of the original mask.\nQuick.\n\nSharp mask: generate and use a wavelet on the original mask.\nSlow. -!TP_RETINEX_MAP_NONE;None !TP_RETINEX_MEDIAN;Transmission median filter -!TP_RETINEX_METHOD;Method !TP_RETINEX_METHOD_TOOLTIP;Low = Reinforce low light.\nUniform = Equalize action.\nHigh = Reinforce high light.\nHighlights = Remove magenta in highlights. !TP_RETINEX_MLABEL;Restored haze-free Min=%1 Max=%2 !TP_RETINEX_MLABEL_TOOLTIP;Should be near min=0 max=32768\nRestored image with no mixture. -!TP_RETINEX_NEIGHBOR;Radius -!TP_RETINEX_NEUTRAL;Reset -!TP_RETINEX_NEUTRAL_TIP;Reset all sliders and curves to their default values. -!TP_RETINEX_OFFSET;Offset (brightness) -!TP_RETINEX_SCALES;Gaussian gradient -!TP_RETINEX_SCALES_TOOLTIP;If slider at 0, all iterations are identical.\nIf > 0 Scale and radius are reduced when iterations increase, and conversely. -!TP_RETINEX_SETTINGS;Settings -!TP_RETINEX_SKAL;Scale -!TP_RETINEX_SLOPE;Free gamma slope -!TP_RETINEX_STRENGTH;Strength -!TP_RETINEX_THRESHOLD;Threshold !TP_RETINEX_THRESHOLD_TOOLTIP;Limits in/out.\nIn = image source,\nOut = image gauss. -!TP_RETINEX_TLABEL;TM Min=%1 Max=%2 Mean=%3 Sigma=%4 -!TP_RETINEX_TLABEL2;TM Tm=%1 TM=%2 !TP_RETINEX_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nMean and Sigma.\nTm=Min TM=Max of transmission map. -!TP_RETINEX_TRANF;Transmission !TP_RETINEX_TRANSMISSION;Transmission map !TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positives values (max).\nOrdinate: amplification or reduction. -!TP_RETINEX_UNIFORM;Uniform -!TP_RETINEX_VARIANCE;Contrast -!TP_RETINEX_VARIANCE_TOOLTIP;Low variance increase local contrast and saturation, but can lead to artifacts. -!TP_RETINEX_VIEW;Process !TP_RETINEX_VIEW_MASK;Mask !TP_RETINEX_VIEW_METHOD_TOOLTIP;Standard - Normal display.\nMask - Displays the mask.\nUnsharp mask - Displays the image with a high radius unsharp mask.\nTransmission - Auto/Fixed - Displays the file transmission-map, before any action on contrast and brightness.\n\nAttention: the mask does not correspond to reality, but is amplified to make it more visible. -!TP_RETINEX_VIEW_NONE;Standard -!TP_RETINEX_VIEW_TRAN;Transmission - Auto -!TP_RETINEX_VIEW_TRAN2;Transmission - Fixed -!TP_RETINEX_VIEW_UNSHARP;Unsharp mask !TP_WAVELET_CBENAB;Toning and Color Balance !TP_WAVELET_CB_TOOLTIP;For strong values product color-toning by combining it or not with levels decomposition 'toning'\nFor low values you can change the white balance of the background (sky, ...) without changing that of the front plane, generally more contrasted -!TP_WAVELET_CH2;Saturated/pastel -!TP_WAVELET_CHR;Chroma-contrast link strength -!TP_WAVELET_CHRO;Saturated/pastel threshold !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_COMPGAMMA;Compression gamma -!TP_WAVELET_COMPGAMMA_TOOLTIP;Adjusting the gamma of the residual image allows you to equilibrate the data and histogram. -!TP_WAVELET_COMPTM;Tone mapping -!TP_WAVELET_CONTEDIT;'After' contrast curve -!TP_WAVELET_CONTR;Gamut -!TP_WAVELET_CONTRA;Contrast -!TP_WAVELET_CONTRAST_MINUS;Contrast - -!TP_WAVELET_CONTRAST_PLUS;Contrast + -!TP_WAVELET_CONTRA_TOOLTIP;Changes contrast of the residual image. -!TP_WAVELET_CTYPE;Chrominance control !TP_WAVELET_CURVEEDITOR_CC_TOOLTIP;Modifies local contrast as a function of the original local contrast (abscissa).\nLow abscissa values represent small local contrast (real values about 10..20).\n50% abscissa represents average local contrast (real value about 100..300).\n66% abscissa represents standard deviation of local contrast (real value about 300..800).\n100% abscissa represents maximum local contrast (real value about 3000..8000). -!TP_WAVELET_CURVEEDITOR_CH;Contrast levels=f(Hue) !TP_WAVELET_CURVEEDITOR_CH_TOOLTIP;Modifies each level's contrast as a function of hue.\nTake care not to overwrite changes made with the Gamut sub-tool's hue controls.\nThe curve will only have an effect when wavelet contrast level sliders are non-zero. -!TP_WAVELET_CURVEEDITOR_CL;L -!TP_WAVELET_CURVEEDITOR_CL_TOOLTIP;Applies a final contrast luminance curve at the end of the wavelet treatment. -!TP_WAVELET_CURVEEDITOR_HH;HH -!TP_WAVELET_CURVEEDITOR_HH_TOOLTIP;Modifies the residual image's hue as a function of hue. -!TP_WAVELET_DALL;All directions -!TP_WAVELET_DAUB;Edge performance !TP_WAVELET_DAUB_TOOLTIP;Changes Daubechies coefficients:\nD4 = Standard,\nD14 = Often best performance, 10% more time-intensive.\n\nAffects edge detection as well as the general quality of the firsts levels. However the quality is not strictly related to this coefficient and can vary with images and uses. !TP_WAVELET_EDGCONT_TOOLTIP;Adjusting the points to the left decreases contrast, and to the right increases it.\nBottom-left, Top-Left, Top-Right, Bottom-right represent respectively local contast for low values, mean, mean+stdev, maxima -!TP_WAVELET_EDGE;Edge Sharpness -!TP_WAVELET_EDGEDETECT;Gradient sensitivity !TP_WAVELET_EDGEDETECTTHR;Threshold low (noise) !TP_WAVELET_EDGEDETECTTHR2;Threshold high (detection) -!TP_WAVELET_EDGEDETECTTHR_TOOLTIP;This adjuster lets you target edge detection for example to avoid applying edge sharpness to fine details, such as noise in the sky. -!TP_WAVELET_EDGEDETECT_TOOLTIP;Moving the slider to the right increases edge sensitivity. This affects local contrast, edge settings and noise. -!TP_WAVELET_EDGESENSI;Edge sensitivity !TP_WAVELET_EDGREINF_TOOLTIP;Reinforce or reduce the action of the first level, do the opposite to the second level, and leave the rest unchanged. -!TP_WAVELET_EDGTHRESH;Detail !TP_WAVELET_EDGTHRESH_TOOLTIP;Change the repartition between the first levels and the others. The higher the threshold the more the action is centred on the first levels. Be careful with negative values, they increase the action of high levels and can introduce artifacts. !TP_WAVELET_EDRAD_TOOLTIP;This radius adjustment is very different from those in other sharpening tools. Its value is compared to each level through a complex function. In this sense, a value of zero still has an effect. -!TP_WAVELET_FINAL;Final Touchup -!TP_WAVELET_FINEST;Finest !TP_WAVELET_HIGHLIGHT;Highlight luminance range !TP_WAVELET_HS1;Whole luminance range !TP_WAVELET_HUESKIN_TOOLTIP;The bottom points set the beginning of the transition zone, and the upper points the end of it, where the effect is at its maximum.\n\nIf you need to move the area significantly, or if there are artifacts, then the white balance is incorrect. !TP_WAVELET_HUESKY_TOOLTIP;The bottom points set the beginning of the transition zone, and the upper points the end of it, where the effect is at its maximum.\n\nIf you need to move the area significantly, or if there are artifacts, then the white balance is incorrect. !TP_WAVELET_ITER;Delta balance levels !TP_WAVELET_ITER_TOOLTIP;Left: increase low levels and reduce high levels,\nRight: reduce low levels and increase high levels. -!TP_WAVELET_LEVDIR_INF;Below or equal the level -!TP_WAVELET_LEVDIR_SUP;Above the level -!TP_WAVELET_LEVELS;Wavelet levels !TP_WAVELET_LEVELS_TOOLTIP;Choose the number of detail levels the image is to be decomposed into. More levels require more RAM and require a longer processing time. !TP_WAVELET_LEVLABEL;Preview maximum possible levels = %1 !TP_WAVELET_LINKEDG;Link with Edge Sharpness' Strength !TP_WAVELET_LOWLIGHT;Shadow luminance range -!TP_WAVELET_MEDI;Reduce artifacts in blue sky !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_NOISE;Denoise and Refine !TP_WAVELET_NPTYPE_TOOLTIP;This algorithm uses the proximity of a pixel and eight of its neighbors. If less difference, edges are reinforced. !TP_WAVELET_OPACITY;Opacity Blue-Yellow !TP_WAVELET_OPACITYW;Contrast balance d/v-h curve -!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_PASTEL;Pastel chroma !TP_WAVELET_SKIN;Skin targetting/protection @@ -2029,11 +2152,8 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !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_THRESHOLD2_TOOLTIP;Only levels between 9 and 9 minus the value will be affected by the shadow luminance range. Other levels will be fully treated. The highest level possible is limited by the highlight level value (9 minus highlight level value). !TP_WAVELET_THRESHOLD_TOOLTIP;Only levels beyond the chosen value will be affected by the highlight luminance range. Other levels will be fully treated. The chosen value here limits the highest possible value of the shadow levels. -!TP_WAVELET_TILESBIG;Big tiles -!TP_WAVELET_TILESIZE;Tiling method -!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_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_TMTYPE;Compression method !TP_WAVELET_TON;Toning +!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". diff --git a/rtdata/languages/Turkish b/rtdata/languages/Turkish index 3003f459f..74b38ed6c 100644 --- a/rtdata/languages/Turkish +++ b/rtdata/languages/Turkish @@ -83,7 +83,6 @@ HISTOGRAM_TOOLTIP_L;CIELAB aydınlık histogramını göster/gizle HISTOGRAM_TOOLTIP_R;Kırmızı histogramını göster/gizle HISTORY_CHANGED;Changed HISTORY_CUSTOMCURVE;Özel eğri -HISTORY_DELSNAPSHOT;Şipşağı sil HISTORY_FROMCLIPBOARD;From clipboard HISTORY_LABEL;Geçmiş HISTORY_MSG_1;Fotoğraf yüklendi @@ -170,47 +169,23 @@ HISTORY_MSG_81;Resize enabled HISTORY_NEWSNAPSHOT;Yeni şipşak HISTORY_SNAPSHOT;Şipşak HISTORY_SNAPSHOTS;Şipşaklar -IPTCPANEL_AUTHOR;Author -IPTCPANEL_AUTHORSPOSITION;Author's position -IPTCPANEL_AUTHORSPOSITIONHINT;Title of the creator or creators of the object (By-line Title). -IPTCPANEL_CAPTION;Caption -IPTCPANEL_CAPTIONHINT;A textual description of the data (Caption - Abstract). -IPTCPANEL_CAPTIONWRITER;Caption Writer -IPTCPANEL_CAPTIONWRITERHINT;The name of the person involved in the writing, editing or correcting the image or caption/abstract (Writer - Editor). IPTCPANEL_CATEGORY;Category -IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider (Category). IPTCPANEL_CITY;City -IPTCPANEL_CITYHINT;City of image origin (City). IPTCPANEL_COPYHINT;Copy IPTC settings to clipboard -IPTCPANEL_COPYRIGHT;Copyright -IPTCPANEL_COPYRIGHTHINT;Any necessary copyright notice (Copyright Notice). IPTCPANEL_COUNTRY;Country -IPTCPANEL_COUNTRYHINT;The name of the country/primary location where the image was created (Country - Primary Location Name). IPTCPANEL_CREDIT;Credit IPTCPANEL_CREDITHINT;Identifies the provider of the image, not necessarily the owner/creator (Credit). IPTCPANEL_DATECREATED;Date Created -IPTCPANEL_DATECREATEDHINT;The date the intellectual content of the image was created; Format: JJJJMMTT (Date Created). IPTCPANEL_EMBEDDED;Embedded IPTCPANEL_EMBEDDEDHINT;Reset to IPTC data embedded in the image file IPTCPANEL_HEADLINE;Headline -IPTCPANEL_HEADLINEHINT;A publishable entry providing a synopsis of the contents of the image (Headline). IPTCPANEL_INSTRUCTIONS;Instructions -IPTCPANEL_INSTRUCTIONSHINT;Other editorial instructions concerning the use of the image (Special Instructions). IPTCPANEL_KEYWORDS;Keywords -IPTCPANEL_KEYWORDSHINT;Used to indicate specific information retrieval words (Keywords). IPTCPANEL_PASTEHINT;Paste IPTC settings from clipboard -IPTCPANEL_PROVINCE;Province -IPTCPANEL_PROVINCEHINT;The Province/State where the image originates (Province-State). IPTCPANEL_RESET;Reset IPTCPANEL_RESETHINT;Reset to profile default IPTCPANEL_SOURCE;Source -IPTCPANEL_SOURCEHINT;The original owner of the intellectual content of the image (Source). -IPTCPANEL_SUPPCATEGORIES;Suppl. Categories -IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image (Supplemental Categories). IPTCPANEL_TITLE;Title -IPTCPANEL_TITLEHINT;A shorthand reference for the image (Object Name). -IPTCPANEL_TRANSREFERENCE;Trans. Reference -IPTCPANEL_TRANSREFERENCEHINT;A code representing the location of original transmission (Original Transmission Reference). MAIN_BUTTON_PREFERENCES;Seçenekler MAIN_BUTTON_SAVE;Görüntüyü kaydet MAIN_BUTTON_SENDTOEDITOR;Send to editor @@ -269,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;Kırpma gösterme PREFERENCES_DATEFORMAT;Tarih biçimi PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y : year\n%m : month\n%d : day\n\nFor example, the hungarian date format is:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Varsayılan dil -PREFERENCES_DEFAULTTHEME;Default theme PREFERENCES_DIRHOME;Kullanıcı dizini PREFERENCES_DIRLAST;Son gidilen dizin PREFERENCES_DIROTHER;Diğer @@ -397,7 +370,6 @@ TP_ICM_INPUTPROFILE;Girdi Profili TP_ICM_LABEL;ICM TP_ICM_NOICM;No ICM: sRGB çıktı TP_ICM_OUTPUTPROFILE;Çıktı profili -TP_ICM_SAVEREFERENCE;Save reference image for profiling TP_ICM_WORKINGPROFILE;Çalışma profili TP_RAW_DMETHOD;Yöntem TP_RAW_FALSECOLOR;Hatalı-renk bastırma değerleri @@ -475,12 +447,23 @@ TP_WBALANCE_TEMPERATURE;Isı !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. +!DYNPROFILEEDITOR_DELETE;Delete +!DYNPROFILEEDITOR_EDIT;Edit +!DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +!DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +!DYNPROFILEEDITOR_MOVE_DOWN;Move Down +!DYNPROFILEEDITOR_MOVE_UP;Move Up +!DYNPROFILEEDITOR_NEW;New +!DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +!DYNPROFILEEDITOR_PROFILE;Processing Profile !EDITWINDOW_TITLE;Image Edit !EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. !EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. !EXIFFILTER_EXPOSURECOMPENSATION;Exposure compensation (EV) !EXIFFILTER_FILETYPE;File type !EXIFFILTER_METADATAFILTER;Enable metadata filters +!EXPORT_BYPASS;Processing steps to bypass !EXPORT_BYPASS_ALL;Select / Unselect All !EXPORT_BYPASS_DEFRINGE;Bypass Defringe !EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -503,8 +486,12 @@ TP_WBALANCE_TEMPERATURE;Isı !EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. !EXPORT_MAXHEIGHT;Maximum height: !EXPORT_MAXWIDTH;Maximum width: +!EXPORT_PIPELINE;Processing pipeline !EXPORT_PUTTOQUEUEFAST; Put to queue for fast export !EXPORT_RAW_DMETHOD;Demosaic method +!EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +!EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +!EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !EXTPROGTARGET_1;raw !EXTPROGTARGET_2;queue-processed !FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -520,7 +507,6 @@ TP_WBALANCE_TEMPERATURE;Isı !FILEBROWSER_CURRENT_NAME;Current name: !FILEBROWSER_DARKFRAME;Dark-frame !FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? -!FILEBROWSER_EXEC_CPB;Custom Profile Builder !FILEBROWSER_EXTPROGMENU;Open with !FILEBROWSER_FLATFIELD;Flat-Field !FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -555,6 +541,7 @@ TP_WBALANCE_TEMPERATURE;Isı !FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 !FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 !FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 +!FILEBROWSER_RESETDEFAULTPROFILE;Reset to default !FILEBROWSER_SELECTDARKFRAME;Select dark-frame... !FILEBROWSER_SELECTFLATFIELD;Select flat-field... !FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -590,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Isı !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -871,7 +859,7 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_357;W - Denoise - Link with ES !HISTORY_MSG_358;W - Gamut - CH !HISTORY_MSG_359;Hot/Dead - Threshold -!HISTORY_MSG_360;TM Gamma +!HISTORY_MSG_360;TM - Gamma !HISTORY_MSG_361;W - Final - Chroma balance !HISTORY_MSG_362;W - Residual - Compression method !HISTORY_MSG_363;W - Residual - Compression strength @@ -923,12 +911,12 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_409;Retinex - Contrast !HISTORY_MSG_410;Retinex - Offset !HISTORY_MSG_411;Retinex - Strength -!HISTORY_MSG_412;Retinex - Gaussian Gradient +!HISTORY_MSG_412;Retinex - Gaussian gradient !HISTORY_MSG_413;Retinex - Contrast !HISTORY_MSG_414;Retinex - Histogram - Lab !HISTORY_MSG_415;Retinex - Transmission !HISTORY_MSG_416;Retinex -!HISTORY_MSG_417;Retinex - Transmission Median +!HISTORY_MSG_417;Retinex - Transmission median !HISTORY_MSG_418;Retinex - Threshold !HISTORY_MSG_419;Retinex - Color space !HISTORY_MSG_420;Retinex - Histogram - HSL @@ -941,8 +929,8 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_427;Output rendering intent !HISTORY_MSG_428;Monitor rendering intent !HISTORY_MSG_429;Retinex - Iterations -!HISTORY_MSG_430;Retinex - Transmission Gradient -!HISTORY_MSG_431;Retinex - Strength Gradient +!HISTORY_MSG_430;Retinex - Transmission gradient +!HISTORY_MSG_431;Retinex - Strength gradient !HISTORY_MSG_432;Retinex - M - Highlights !HISTORY_MSG_433;Retinex - M - Highlights TW !HISTORY_MSG_434;Retinex - M - Shadows @@ -954,8 +942,58 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_440;CbDL - Method !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_442;Retinex - Scale -!HISTORY_MSG_443;Output Black Point Compensation +!HISTORY_MSG_443;Output black point compensation +!HISTORY_MSG_444;WB - Temp bias +!HISTORY_MSG_445;Raw sub-image +!HISTORY_MSG_449;PS - ISO adaption +!HISTORY_MSG_452;PS - Show motion +!HISTORY_MSG_453;PS - Show mask only +!HISTORY_MSG_457;PS - Check red/blue +!HISTORY_MSG_462;PS - Check green +!HISTORY_MSG_464;PS - Blur motion mask +!HISTORY_MSG_465;PS - Blur radius +!HISTORY_MSG_468;PS - Fill holes +!HISTORY_MSG_469;PS - Median +!HISTORY_MSG_471;PS - Motion correction +!HISTORY_MSG_472;PS - Smooth transitions +!HISTORY_MSG_473;PS - Use LMMSE +!HISTORY_MSG_474;PS - Equalize +!HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!HISTORY_MSG_479;CAM02 - CAT02 adaptation out +!HISTORY_MSG_480;CAM02 - Automatic CAT02 out +!HISTORY_MSG_481;CAM02 - Temp scene +!HISTORY_MSG_482;CAM02 - Green scene +!HISTORY_MSG_483;CAM02 - Yb scene +!HISTORY_MSG_484;CAM02 - Auto Yb scene !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s +!IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. +!IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. +!IPTCPANEL_COPYRIGHT;Copyright notice +!IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. +!IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +!IPTCPANEL_CREATOR;Creator +!IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +!IPTCPANEL_CREATORJOBTITLE;Creator's job title +!IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +!IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +!IPTCPANEL_DESCRIPTION;Description +!IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +!IPTCPANEL_DESCRIPTIONWRITER;Description writer +!IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. +!IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. +!IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. +!IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. +!IPTCPANEL_PROVINCE;Province or state +!IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. +!IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +!IPTCPANEL_SUPPCATEGORIES;Supplemental categories +!IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. +!IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +!IPTCPANEL_TRANSREFERENCE;Job ID +!IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. !MAIN_BUTTON_FULLSCREEN;Fullscreen !MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 !MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -975,6 +1013,7 @@ TP_WBALANCE_TEMPERATURE;Isı !MAIN_MSG_OPERATIONCANCELLED;Operation cancelled !MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. !MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +!MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. !MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. !MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c !MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d @@ -1049,8 +1088,7 @@ TP_WBALANCE_TEMPERATURE;Isı !PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter !PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -!PARTIALPASTE_RAWCACORR_CABLUE;CA blue -!PARTIALPASTE_RAWCACORR_CARED;CA red +!PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue !PARTIALPASTE_RAWEXPOS_BLACK;Black levels !PARTIALPASTE_RAWEXPOS_LINEAR;White point correction !PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -1059,7 +1097,9 @@ TP_WBALANCE_TEMPERATURE;Isı !PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations !PARTIALPASTE_RAW_DMETHOD;Demosaic method !PARTIALPASTE_RAW_FALSECOLOR;False color suppression +!PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +!PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RGBCURVES;RGB curves !PARTIALPASTE_SHARPENEDGE;Edges @@ -1088,7 +1128,8 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_CLUTSCACHE;HaldCLUT Cache !PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs !PREFERENCES_CLUTSDIR;HaldCLUT directory -!PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +!PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons !PREFERENCES_CURVEBBOXPOS_ABOVE;Above !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -1100,7 +1141,8 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1113,7 +1155,7 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_EDITORLAYOUT;Editor Layout !PREFERENCES_EXPAUT;Expert -!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +!PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FLATFIELD;Flat-Field !PREFERENCES_FLATFIELDFOUND;Found @@ -1129,7 +1171,8 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1144,6 +1187,7 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1159,9 +1203,10 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_MENUOPTIONS;Context Menu Options !PREFERENCES_METADATA;Metadata !PREFERENCES_MIN;Mini (100x115) -!PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -!PREFERENCES_MONINTENT;Default monitor intent -!PREFERENCES_MONPROFILE;Default monitor profile +!PREFERENCES_MONINTENT;Default rendering intent +!PREFERENCES_MONITOR;Monitor +!PREFERENCES_MONPROFILE;Default color profile +!PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. !PREFERENCES_MULTITAB;Multiple Editor Tabs Mode !PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode !PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1177,13 +1222,18 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_PREVDEMO_FAST;Fast !PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: !PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +!PREFERENCES_PRINTER;Printer (Soft-Proofing) +!PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file +!PREFERENCES_PROFILESAVELOCATION;Processing profile saving location !PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROPERTY;Property +!PREFERENCES_PRTINTENT;Rendering intent +!PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset !PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". !PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels !PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -!PREFERENCES_SELECTFONT;Select global font +!PREFERENCES_SELECTFONT;Select main font !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_SERIALIZE_TIFF_READ_LABEL;Serialize read of tiff files @@ -1194,15 +1244,16 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_SIMPLAUT;Tool mode !PREFERENCES_SINGLETAB;Single Editor Tab Mode !PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -!PREFERENCES_SLIMUI;Slim interface !PREFERENCES_SMA;Small (250x287) !PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done !PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. !PREFERENCES_SND_LNGEDITPROCDONE;Editor processing done !PREFERENCES_SND_TRESHOLDSECS;After seconds !PREFERENCES_STDAUT;Standard +!PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1211,7 +1262,6 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -!PREFERENCES_USESYSTEMTHEME;Use system theme !PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) !PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' !PREFERENCES_WLONE;One level @@ -1224,6 +1274,7 @@ TP_WBALANCE_TEMPERATURE;Isı !PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial profiles will be converted to full profiles; the missing values will be replaced with hard-coded defaults.\n\nButton released: profiles will be applied as they are, altering only those values which they contain. !PROFILEPANEL_MYPROFILES;My profiles !PROFILEPANEL_PASTEPPASTE;Parameters to paste +!PROFILEPANEL_PDYNAMIC;Dynamic !PROFILEPANEL_PINTERNAL;Neutral !PROFILEPANEL_SAVEPPASTE;Parameters to save !PROGRESSBAR_LOADINGTHUMBS;Loading thumbnails... @@ -1315,11 +1366,11 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. !TP_CHROMATABERR_LABEL;Chromatic Aberration -!TP_COLORAPP_ADAPTSCENE;Scene luminosity -!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -!TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +!TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +!TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +!TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +!TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +!TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. !TP_COLORAPP_ALGO;Algorithm !TP_COLORAPP_ALGO_ALL;All !TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1339,8 +1390,8 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation !TP_COLORAPP_CONTRAST;Contrast (J) !TP_COLORAPP_CONTRAST_Q;Contrast (Q) -!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -!TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +!TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. !TP_COLORAPP_CURVEEDITOR1;Tone curve 1 !TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. !TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1351,6 +1402,7 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. !TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). !TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +!TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] !TP_COLORAPP_GAMUT;Gamut control (L*a*b*) !TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. !TP_COLORAPP_HUE;Hue (h) @@ -1362,9 +1414,11 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +!TP_COLORAPP_NEUTRAL;Reset +!TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values !TP_COLORAPP_RSTPRO;Red & skin-tones protection -!TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +!TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- !TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- !TP_COLORAPP_SURROUND;Surround @@ -1383,10 +1437,14 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode !TP_COLORAPP_TCMODE_LIGHTNESS;Lightness !TP_COLORAPP_TCMODE_SATUR;Saturation +!TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 !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_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE;Yb% (mean luminance) +!TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance @@ -1512,8 +1570,7 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_DIRPYREQUALIZER_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_DIRPYREQUALIZER_THRESHOLD;Threshold !TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. -!TP_DISTORTION_AUTO;Auto Distortion Correction -!TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +!TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. !TP_EPD_EDGESTOPPING;Edge stopping !TP_EPD_GAMMA;Gamma !TP_EPD_LABEL;Tone Mapping @@ -1577,18 +1634,17 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_HSVEQUALIZER_SAT;S !TP_HSVEQUALIZER_VAL;V !TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +!TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. !TP_ICM_APPLYHUESATMAP;Base table -!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. !TP_ICM_APPLYLOOKTABLE;Look table -!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +!TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. !TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix !TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. !TP_ICM_BPC;Black Point Compensation -!TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point !TP_ICM_DCPILLUMINANT;Illuminant !TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +!TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. !TP_ICM_INPUTCAMERAICC;Auto-matched camera profile !TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. !TP_ICM_INPUTCAMERA_TOOLTIP;Use a simple color matrix from dcraw, an enhanced RawTherapee version (whichever is available based on camera model) or one embedded in the DNG. @@ -1597,11 +1653,12 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_ICM_INPUTNONE;No profile !TP_ICM_INPUTNONE_TOOLTIP;Use no input color profile at all.\nUse only in special cases. !TP_ICM_PROFILEINTENT;Rendering Intent +!TP_ICM_SAVEREFERENCE;Save Reference Image !TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance !TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. !TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. !TP_ICM_TONECURVE;Tone curve -!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +!TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. !TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction !TP_IMPULSEDENOISE_THRESH;Threshold !TP_LABCURVE_AVOIDCOLORSHIFT;Avoid color shift @@ -1688,19 +1745,80 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_RAWEXPOS_PRESER;Highlight preservation !TP_RAWEXPOS_RGB;Red, Green, Blue !TP_RAWEXPOS_TWOGREEN;Link greens +!TP_RAW_1PASSMEDIUM;1-Pass (Medium) +!TP_RAW_3PASSBEST;3-Pass (Best) +!TP_RAW_AHD;AHD +!TP_RAW_AMAZE;AMaZE +!TP_RAW_DCB;DCB !TP_RAW_DCBENHANCE;DCB enhancement !TP_RAW_DCBITERATIONS;Number of DCB iterations !TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... !TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +!TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +!TP_RAW_EAHD;EAHD +!TP_RAW_FAST;Fast !TP_RAW_HD;Threshold !TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +!TP_RAW_HPHD;HPHD +!TP_RAW_IGV;IGV +!TP_RAW_IMAGENUM;Sub-image +!TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_LABEL;Demosaicing +!TP_RAW_LMMSE;LMMSE !TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps !TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +!TP_RAW_MONO;Mono +!TP_RAW_NONE;None (Shows sensor pattern) +!TP_RAW_PIXELSHIFT;Pixel Shift +!TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +!TP_RAW_PIXELSHIFTBLUR;Blur motion mask +!TP_RAW_PIXELSHIFTEPERISO;ISO adaption +!TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +!TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +!TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +!TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +!TP_RAW_PIXELSHIFTEXP0;Experimental +!TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +!TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +!TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +!TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +!TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +!TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +!TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +!TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +!TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +!TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +!TP_RAW_PIXELSHIFTMM_AUTO;Automatic +!TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +!TP_RAW_PIXELSHIFTMM_OFF;Off +!TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +!TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +!TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +!TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +!TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +!TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +!TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +!TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +!TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +!TP_RAW_PIXELSHIFTNREADISO;nRead +!TP_RAW_PIXELSHIFTPRNU;PRNU (%) +!TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +!TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +!TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +!TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +!TP_RAW_PIXELSHIFTSIGMA;Blur radius +!TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +!TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +!TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +!TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +!TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +!TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red !TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix !TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. !TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +!TP_RAW_VNG4;VNG4 !TP_RESIZE_APPLIESTO;Applies to: !TP_RESIZE_CROPPEDAREA;Cropped Area !TP_RESIZE_FITBOX;Bounding Box @@ -2023,6 +2141,8 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_WBALANCE_SOLUX41;Solux 4100K !TP_WBALANCE_SOLUX47;Solux 4700K (vendor) !TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) +!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_TUNGSTEN;Tungsten !TP_WBALANCE_WATER1;UnderWater 1 !TP_WBALANCE_WATER2;UnderWater 2 diff --git a/rtdata/languages/default b/rtdata/languages/default index d04487752..1589c3573 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -36,6 +36,16 @@ CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. CURVEEDITOR_TOOLTIPSAVE;Save current curve. CURVEEDITOR_TYPE;Type: DIRBROWSER_FOLDERS;Folders +DONT_SHOW_AGAIN;Don't show this message again. +DYNPROFILEEDITOR_DELETE;Delete +DYNPROFILEEDITOR_EDIT;Edit +DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule +DYNPROFILEEDITOR_ENTRY_TOOLTIP;The matching is case insensitive.\nUse the "re:" prefix to enter\na regular expression. +DYNPROFILEEDITOR_MOVE_DOWN;Move Down +DYNPROFILEEDITOR_MOVE_UP;Move Up +DYNPROFILEEDITOR_NEW;New +DYNPROFILEEDITOR_NEW_RULE;New Dynamic Profile Rule +DYNPROFILEEDITOR_PROFILE;Processing Profile EDITWINDOW_TITLE;Image Edit EDIT_OBJECT_TOOLTIP;Displays a widget on the preview window which lets you adjust this tool. EDIT_PIPETTE_TOOLTIP;To add an adjustment point to the curve, hold the Ctrl key while left-clicking the desired spot in the image preview.\nTo adjust the point, hold the Ctrl key while left-clicking the corresponding area in the preview, then let go of Ctrl (unless you desire fine control) and while still holding the left mouse button move the mouse up or down to move that point up or down in the curve. @@ -62,6 +72,7 @@ EXIFPANEL_RESETALL;Reset All EXIFPANEL_RESETALLHINT;Reset all tags to their original values. EXIFPANEL_RESETHINT;Reset the selected tags to their original values. EXIFPANEL_SUBDIRECTORY;Subdirectory +EXPORT_BYPASS;Processing steps to bypass EXPORT_BYPASS_ALL;Select / Unselect All EXPORT_BYPASS_DEFRINGE;Bypass Defringe EXPORT_BYPASS_DIRPYRDENOISE;Bypass Noise Reduction @@ -84,8 +95,12 @@ EXPORT_FASTEXPORTOPTIONS;Fast Export Options EXPORT_INSTRUCTIONS;Fast Export options provide overrides to bypass time and resource consuming development settings and to run queue processing using the fast export settings instead. This method is recommended for quicker generation of lower resolution images when speed is a priority or when resized output is desired for one or many images without making modifications to their saved development parameters. EXPORT_MAXHEIGHT;Maximum height: EXPORT_MAXWIDTH;Maximum width: +EXPORT_PIPELINE;Processing pipeline EXPORT_PUTTOQUEUEFAST; Put to queue for fast export EXPORT_RAW_DMETHOD;Demosaic method +EXPORT_USE_FAST_PIPELINE;Dedicated (full processing on resized image) +EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. +EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) EXTPROGTARGET_1;raw EXTPROGTARGET_2;queue-processed FILEBROWSER_ADDDELTEMPLATE;Add/Del templates... @@ -108,7 +123,6 @@ FILEBROWSER_DELETEDLGMSG;Are you sure you want to delete the selected %1 FILEBROWSER_DELETEDLGMSGINCLPROC;Are you sure you want to delete the selected %1 files including a queue-processed version? FILEBROWSER_EMPTYTRASH;Empty trash FILEBROWSER_EMPTYTRASHHINT;Permanently delete the files from trash. -FILEBROWSER_EXEC_CPB;Custom Profile Builder FILEBROWSER_EXTPROGMENU;Open with FILEBROWSER_FLATFIELD;Flat-Field FILEBROWSER_MOVETODARKFDIR;Move to dark-frames directory @@ -158,6 +172,7 @@ FILEBROWSER_RANK3_TOOLTIP;Rank 3 *\nShortcut: Shift-3 FILEBROWSER_RANK4_TOOLTIP;Rank 4 *\nShortcut: Shift-4 FILEBROWSER_RANK5_TOOLTIP;Rank 5 *\nShortcut: Shift-5 FILEBROWSER_RENAMEDLGLABEL;Rename file +FILEBROWSER_RESETDEFAULTPROFILE;Reset to default FILEBROWSER_SELECTDARKFRAME;Select dark-frame... FILEBROWSER_SELECTFLATFIELD;Select flat-field... FILEBROWSER_SHOWCOLORLABEL1HINT;Show images labeled Red.\nShortcut: Alt-1 @@ -220,6 +235,7 @@ GENERAL_PORTRAIT;Portrait GENERAL_SAVE;Save GENERAL_UNCHANGED;(Unchanged) GENERAL_WARNING;Warning +GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. HISTOGRAM_TOOLTIP_B;Show/Hide blue histogram. HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. @@ -230,7 +246,6 @@ HISTOGRAM_TOOLTIP_R;Show/Hide red histogram. HISTOGRAM_TOOLTIP_RAW;Show/Hide raw histogram. HISTORY_CHANGED;Changed HISTORY_CUSTOMCURVE;Custom curve -HISTORY_DELSNAPSHOT;Del HISTORY_FROMCLIPBOARD;From clipboard HISTORY_LABEL;History HISTORY_MSG_1;Photo loaded @@ -591,7 +606,7 @@ HISTORY_MSG_356;W - ES - Threshold high HISTORY_MSG_357;W - Denoise - Link with ES HISTORY_MSG_358;W - Gamut - CH HISTORY_MSG_359;Hot/Dead - Threshold -HISTORY_MSG_360;TM Gamma +HISTORY_MSG_360;TM - Gamma HISTORY_MSG_361;W - Final - Chroma balance HISTORY_MSG_362;W - Residual - Compression method HISTORY_MSG_363;W - Residual - Compression strength @@ -643,12 +658,12 @@ HISTORY_MSG_408;Retinex - Radius HISTORY_MSG_409;Retinex - Contrast HISTORY_MSG_410;Retinex - Offset HISTORY_MSG_411;Retinex - Strength -HISTORY_MSG_412;Retinex - Gaussian Gradient +HISTORY_MSG_412;Retinex - Gaussian gradient HISTORY_MSG_413;Retinex - Contrast HISTORY_MSG_414;Retinex - Histogram - Lab HISTORY_MSG_415;Retinex - Transmission HISTORY_MSG_416;Retinex -HISTORY_MSG_417;Retinex - Transmission Median +HISTORY_MSG_417;Retinex - Transmission median HISTORY_MSG_418;Retinex - Threshold HISTORY_MSG_419;Retinex - Color space HISTORY_MSG_420;Retinex - Histogram - HSL @@ -656,13 +671,13 @@ HISTORY_MSG_421;Retinex - Gamma HISTORY_MSG_422;Retinex - Gamma HISTORY_MSG_423;Retinex - Gamma slope HISTORY_MSG_424;Retinex - HL threshold -HISTORY_MSG_425;Retinex - Log base +HISTORY_MSG_425;Spot removal HISTORY_MSG_426;Retinex - Hue equalizer HISTORY_MSG_427;Output rendering intent HISTORY_MSG_428;Monitor rendering intent HISTORY_MSG_429;Retinex - Iterations -HISTORY_MSG_430;Retinex - Transmission Gradient -HISTORY_MSG_431;Retinex - Strength Gradient +HISTORY_MSG_430;Retinex - Transmission gradient +HISTORY_MSG_431;Retinex - Strength gradient HISTORY_MSG_432;Retinex - M - Highlights HISTORY_MSG_433;Retinex - M - Highlights TW HISTORY_MSG_434;Retinex - M - Shadows @@ -674,53 +689,78 @@ HISTORY_MSG_439;Retinex - Process HISTORY_MSG_440;CbDL - Method HISTORY_MSG_441;Retinex - Gain transmission HISTORY_MSG_442;Retinex - Scale -HISTORY_MSG_443;Output Black Point Compensation -HISTORY_MSG_444;Spot removal +HISTORY_MSG_443;Output black point compensation +HISTORY_MSG_444;WB - Temp bias +HISTORY_MSG_445;Raw sub-image +HISTORY_MSG_449;PS - ISO adaption +HISTORY_MSG_452;PS - Show motion +HISTORY_MSG_453;PS - Show mask only +HISTORY_MSG_457;PS - Check red/blue +HISTORY_MSG_462;PS - Check green +HISTORY_MSG_464;PS - Blur motion mask +HISTORY_MSG_465;PS - Blur radius +HISTORY_MSG_468;PS - Fill holes +HISTORY_MSG_469;PS - Median +HISTORY_MSG_471;PS - Motion correction +HISTORY_MSG_472;PS - Smooth transitions +HISTORY_MSG_473;PS - Use LMMSE +HISTORY_MSG_474;PS - Equalize +HISTORY_MSG_475;PS - Equalize channel +HISTORY_MSG_476;CAM02 - Temp out +HISTORY_MSG_477;CAM02 - Green out +HISTORY_MSG_478;CAM02 - Yb out +HISTORY_MSG_479;CAM02 - CAT02 adaptation out +HISTORY_MSG_480;CAM02 - Automatic CAT02 out +HISTORY_MSG_481;CAM02 - Temp scene +HISTORY_MSG_482;CAM02 - Green scene +HISTORY_MSG_483;CAM02 - Yb scene +HISTORY_MSG_484;CAM02 - Auto Yb scene HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot HISTORY_SNAPSHOTS;Snapshots -IPTCPANEL_AUTHOR;Author -IPTCPANEL_AUTHORSPOSITION;Author's position -IPTCPANEL_AUTHORSPOSITIONHINT;Title of the creator or creators of the object (By-line Title). -IPTCPANEL_CAPTION;Caption -IPTCPANEL_CAPTIONHINT;A textual description of the data (Caption - Abstract). -IPTCPANEL_CAPTIONWRITER;Caption writer -IPTCPANEL_CAPTIONWRITERHINT;The name of the person involved in the writing, editing or correcting the image or caption/abstract (Writer - Editor). IPTCPANEL_CATEGORY;Category -IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider (Category). +IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. IPTCPANEL_CITY;City -IPTCPANEL_CITYHINT;City of image origin (City). +IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. IPTCPANEL_COPYHINT;Copy IPTC settings to clipboard. -IPTCPANEL_COPYRIGHT;Copyright -IPTCPANEL_COPYRIGHTHINT;Any necessary copyright notice (Copyright Notice). +IPTCPANEL_COPYRIGHT;Copyright notice +IPTCPANEL_COPYRIGHTHINT;Enter a Notice on the current owner of the Copyright for this image, such as ©2008 Jane Doe. IPTCPANEL_COUNTRY;Country -IPTCPANEL_COUNTRYHINT;The name of the country/primary location where the image was created (Country - Primary Location Name). -IPTCPANEL_CREDIT;Credit -IPTCPANEL_CREDITHINT;Identifies the provider of the image, not necessarily the owner/creator (Credit). +IPTCPANEL_COUNTRYHINT;Enter the name of the country pictured in this image. +IPTCPANEL_CREATOR;Creator +IPTCPANEL_CREATORHINT;Enter the name of the person that created this image. +IPTCPANEL_CREATORJOBTITLE;Creator's job title +IPTCPANEL_CREATORJOBTITLEHINT;Enter the Job Title of the person listed in the Creator field. +IPTCPANEL_CREDIT;Credit line +IPTCPANEL_CREDITHINT;Enter who should be credited when this image is published. IPTCPANEL_DATECREATED;Date created -IPTCPANEL_DATECREATEDHINT;The date the intellectual content of the image was created; Format: YYYYMMDD (Date Created). +IPTCPANEL_DATECREATEDHINT;Enter the Date the image was taken. +IPTCPANEL_DESCRIPTION;Description +IPTCPANEL_DESCRIPTIONHINT;Enter a "caption" describing the who, what, and why of what is happening in this image, this might include names of people, and/or their role in the action that is taking place within the image. +IPTCPANEL_DESCRIPTIONWRITER;Description writer +IPTCPANEL_DESCRIPTIONWRITERHINT;Enter the name of the person involved in writing, editing or correcting the description of the image. IPTCPANEL_EMBEDDED;Embedded IPTCPANEL_EMBEDDEDHINT;Reset to IPTC data embedded in the image file. IPTCPANEL_HEADLINE;Headline -IPTCPANEL_HEADLINEHINT;A publishable entry providing a synopsis of the contents of the image (Headline). +IPTCPANEL_HEADLINEHINT;Enter a brief publishable synopsis or summary of the contents of the image. IPTCPANEL_INSTRUCTIONS;Instructions -IPTCPANEL_INSTRUCTIONSHINT;Other editorial instructions concerning the use of the image (Special Instructions). +IPTCPANEL_INSTRUCTIONSHINT;Enter information about embargoes, or other restrictions not covered by the Copyright field. IPTCPANEL_KEYWORDS;Keywords -IPTCPANEL_KEYWORDSHINT;Used to indicate specific information retrieval words (Keywords). +IPTCPANEL_KEYWORDSHINT;Enter any number of keywords, terms or phrases used to express the subject matter in the image. IPTCPANEL_PASTEHINT;Paste IPTC settings from clipboard. -IPTCPANEL_PROVINCE;Province -IPTCPANEL_PROVINCEHINT;The Province/State where the image originates (Province-State). +IPTCPANEL_PROVINCE;Province or state +IPTCPANEL_PROVINCEHINT;Enter the name of the province or state pictured in this image. IPTCPANEL_RESET;Reset IPTCPANEL_RESETHINT;Reset to profile default. IPTCPANEL_SOURCE;Source -IPTCPANEL_SOURCEHINT;The original owner of the intellectual content of the image (Source). -IPTCPANEL_SUPPCATEGORIES;Suppl. categories -IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image (Supplemental Categories). +IPTCPANEL_SOURCEHINT;Enter or edit the name of a person or party who has a role in the content supply chain, such as a person or entity from whom you received this image from. +IPTCPANEL_SUPPCATEGORIES;Supplemental categories +IPTCPANEL_SUPPCATEGORIESHINT;Further refines the subject of the image. IPTCPANEL_TITLE;Title -IPTCPANEL_TITLEHINT;A shorthand reference for the image (Object Name). -IPTCPANEL_TRANSREFERENCE;Trans. reference -IPTCPANEL_TRANSREFERENCEHINT;A code representing the location of the original transmission (Original Transmission Reference). +IPTCPANEL_TITLEHINT;Enter a short verbal and human readable name for the image, this may be the file name. +IPTCPANEL_TRANSREFERENCE;Job ID +IPTCPANEL_TRANSREFERENCEHINT;Enter a number or identifier needed for workflow control or tracking. MAIN_BUTTON_FULLSCREEN;Fullscreen MAIN_BUTTON_NAVNEXT_TOOLTIP;Navigate to the next image relative to image opened in the Editor.\nShortcut: Shift-F4\n\nTo navigate to the next image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F4 MAIN_BUTTON_NAVPREV_TOOLTIP;Navigate to the previous image relative to image opened in the Editor.\nShortcut: Shift-F3\n\nTo navigate to the previous image relative to the currently selected thumbnail in the File Browser or Filmstrip:\nShortcut: F3 @@ -754,18 +794,19 @@ MAIN_MSG_OPERATIONCANCELLED;Operation cancelled MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences. MAIN_MSG_QOVERWRITE;Do you want to overwrite it? MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function! +MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it. MAIN_TAB_COLOR;Color MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c MAIN_TAB_DETAIL;Detail MAIN_TAB_DETAIL_TOOLTIP;Shortcut: Alt-d -MAIN_TAB_DEVELOP; Develop +MAIN_TAB_DEVELOP; Batch Edit MAIN_TAB_EXIF;Exif -MAIN_TAB_EXPORT; Fast Export +MAIN_TAB_EXPORT; Fast Export MAIN_TAB_EXPOSURE;Exposure MAIN_TAB_EXPOSURE_TOOLTIP;Shortcut: Alt-e -MAIN_TAB_FILTER; Filter -MAIN_TAB_INSPECT; Inspect +MAIN_TAB_FILTER; Filter +MAIN_TAB_INSPECT; Inspect MAIN_TAB_IPTC;IPTC MAIN_TAB_METADATA;Metadata MAIN_TAB_METADATA_TOOLTIP;Shortcut: Alt-m @@ -855,8 +896,7 @@ PARTIALPASTE_PREPROCESS_HOTPIXFILT;Hot pixel filter PARTIALPASTE_PREPROCESS_LINEDENOISE;Line noise filter PARTIALPASTE_PRSHARPENING;Post-resize sharpening PARTIALPASTE_RAWCACORR_AUTO;CA auto-correction -PARTIALPASTE_RAWCACORR_CABLUE;CA blue -PARTIALPASTE_RAWCACORR_CARED;CA red +PARTIALPASTE_RAWCACORR_CAREDBLUE;CA red & blue PARTIALPASTE_RAWEXPOS_BLACK;Black levels PARTIALPASTE_RAWEXPOS_LINEAR;White point correction PARTIALPASTE_RAWEXPOS_PRESER;Highlight preservation @@ -865,7 +905,9 @@ PARTIALPASTE_RAW_DCBENHANCE;DCB enhancement PARTIALPASTE_RAW_DCBITERATIONS;DCB iterations PARTIALPASTE_RAW_DMETHOD;Demosaic method PARTIALPASTE_RAW_FALSECOLOR;False color suppression +PARTIALPASTE_RAW_IMAGENUM;Sub-image PARTIALPASTE_RAW_LMMSEITERATIONS;LMMSE enhancement steps +PARTIALPASTE_RAW_PIXELSHIFT;PixelShift PARTIALPASTE_RESIZE;Resize PARTIALPASTE_RETINEX;Retinex PARTIALPASTE_RGBCURVES;RGB curves @@ -908,7 +950,8 @@ PREFERENCES_CLIPPINGIND;Clipping Indication PREFERENCES_CLUTSCACHE;HaldCLUT Cache PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs PREFERENCES_CLUTSDIR;HaldCLUT directory -PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons +PREFERENCES_CMMBPC;Black point compensation +PREFERENCES_CURVEBBOXPOS;Position of curve copy & paste buttons PREFERENCES_CURVEBBOXPOS_ABOVE;Above PREFERENCES_CURVEBBOXPOS_BELOW;Below PREFERENCES_CURVEBBOXPOS_LEFT;Left @@ -920,7 +963,8 @@ PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID PREFERENCES_CUSTPROFBUILDPATH;Executable path PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -PREFERENCES_D50;5000K +PREFERENCES_D50;Settings in main menu +PREFERENCES_D50_OLD;5000K PREFERENCES_D55;5500K PREFERENCES_D60;6000K PREFERENCES_D65;6500K @@ -932,8 +976,6 @@ PREFERENCES_DATEFORMAT;Date format PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y - year\n%m - month\n%d - day\n\nFor example, the ISO 8601 standard dictates the date format as follows:\n%y-%m-%d PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. -PREFERENCES_DEFAULTLANG;Default Language -PREFERENCES_DEFAULTTHEME;Default Theme PREFERENCES_DIRDARKFRAMES;Dark-frames directory PREFERENCES_DIRHOME;Home directory PREFERENCES_DIRLAST;Last visited directory @@ -945,7 +987,7 @@ PREFERENCES_EDITORLAYOUT;Editor Layout PREFERENCES_EXPAUT;Expert PREFERENCES_EXTERNALEDITOR;External Editor PREFERENCES_FBROWSEROPTS;File Browser / Thumbnail Options -PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar (de-select for low resolution display) +PREFERENCES_FILEBROWSERTOOLBARSINGLEROW;Single row file browser toolbar\n(de-select for low resolution display) PREFERENCES_FILEFORMAT;File format PREFERENCES_FILMSIMULATION;Film Simulation PREFERENCES_FLATFIELD;Flat-Field @@ -965,7 +1007,8 @@ PREFERENCES_GREY;Output device's Yb luminance (%) PREFERENCES_GREY05;Yb=05 CIE L#30 PREFERENCES_GREY10;Yb=10 CIE L#40 PREFERENCES_GREY15;Yb=15 CIE L#45 -PREFERENCES_GREY18;Yb=18 CIE L#50 +PREFERENCES_GREY18;Settings in main menu +PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 PREFERENCES_GREY23;Yb=23 CIE L#55 PREFERENCES_GREY30;Yb=30 CIE L#60 PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -987,6 +1030,7 @@ PREFERENCES_INTENT_PERCEPTUAL;Perceptual PREFERENCES_INTENT_RELATIVE;Relative Colorimetric PREFERENCES_INTENT_SATURATION;Saturation PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +PREFERENCES_LANG;Language PREFERENCES_LANGAUTODETECT;Use system language PREFERENCES_LEVAUTDN;Denoising level PREFERENCES_LEVDN;Cell size @@ -1002,9 +1046,10 @@ PREFERENCES_MENUGROUPRANK;Group "Rank" PREFERENCES_MENUOPTIONS;Context Menu Options PREFERENCES_METADATA;Metadata PREFERENCES_MIN;Mini (100x115) -PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform -PREFERENCES_MONINTENT;Default monitor intent -PREFERENCES_MONPROFILE;Default monitor profile +PREFERENCES_MONINTENT;Default rendering intent +PREFERENCES_MONITOR;Monitor +PREFERENCES_MONPROFILE;Default color profile +PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported. PREFERENCES_MULTITAB;Multiple Editor Tabs Mode PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode PREFERENCES_NAVGUIDEBRUSH;Navigator guide color @@ -1014,7 +1059,7 @@ PREFERENCES_OUTDIR;Output Directory PREFERENCES_OUTDIRFOLDER;Save to folder PREFERENCES_OUTDIRFOLDERHINT;Save images to the selected folder. PREFERENCES_OUTDIRTEMPLATE;Use template -PREFERENCES_OUTDIRTEMPLATEHINT;You can use the following formatting strings:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nThese formatting strings refer to the different parts of the photo's pathname, some attributes of the photo or an arbitrary sequence index in the batch job.\n\nFor example, if the photo being processed has the following pathname:\n/home/tom/photos/2010-10-31/dsc0042.nef\nthe meaning of the formatting strings are:\n%d4 = home\n%d3 = tom\n%d2 = photos\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tom/photos/2010-10-31/\n%p2 = /home/tom/photos/\n%p3 = /home/tom/\n%p4 = /home/\n\n%r will be replaced by the rank of the photo. If the photo is unranked, %r will be replaced by '0'. If the photo is in the trash bin, %r will be replaced by 'x'.\n\n%s1, %s2, etc. will be replaced by a sequence index which is padded to between 1 and 9 digits. The sequence index will start at one each time the queue processing is started and is incremented by one for each image processed.\n\nIf you want to save the output image where the original is, write:\n%p1/%f\n\nIf you want to save the output image in a directory named "converted" located in the directory of the opened image, write:\n%p1/converted/%f\n\nIf you want to save the output image in a directory named "/home/tom/photos/converted/2010-10-31", write:\n%p2/converted/%d1/%f +PREFERENCES_OUTDIRTEMPLATEHINT;You can use the following formatting strings:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r, %s1, %s2, ...\n\nThese formatting strings refer to the different parts of the photo's pathname, some attributes of the photo or an arbitrary sequence index in the batch job.\n\nFor example, if the photo being processed has the following pathname:\n/home/tom/photos/2010-10-31/dsc0042.nef\nthe meaning of the formatting strings are:\n%d4 = home\n%d3 = tom\n%d2 = photos\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tom/photos/2010-10-31/\n%p2 = /home/tom/photos/\n%p3 = /home/tom/\n%p4 = /home/\n\n%r will be replaced by the rank of the photo. If the photo is unranked, %r will be replaced by '0'. If the photo is in the trash bin, %r will be replaced by 'x'.\n\n%s1, %s2, etc. will be replaced by a sequence index which is padded to between 1 and 9 digits. The sequence index will start at one each time the queue processing is started and is incremented by one for each image processed.\n\nIf you want to save the output image where the original is, write:\n%p1/%f\n\nIf you want to save the output image in a directory named "converted" located in the directory of the opened image, write:\n%p1/converted/%f\n\nIf you want to save the output image in a directory named\n"/home/tom/photos/converted/2010-10-31", write:\n%p2/converted/%d1/%f PREFERENCES_OVERLAY_FILENAMES;Overlay filenames on thumbnails in the file browser PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP;Overlay filenames on thumbnails in the editor pannel PREFERENCES_OVERWRITEOUTPUTFILE;Overwrite existing output files @@ -1029,20 +1074,25 @@ PREFERENCES_PREVDEMO;Preview Demosaic Method PREFERENCES_PREVDEMO_FAST;Fast PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: PREFERENCES_PREVDEMO_SIDECAR;As in PP3 +PREFERENCES_PRINTER;Printer (Soft-Proofing) PREFERENCES_PROFILEHANDLING;Processing Profile Handling PREFERENCES_PROFILELOADPR;Processing profile loading priority PREFERENCES_PROFILEPRCACHE;Profile in cache PREFERENCES_PROFILEPRFILE;Profile next to the input file +PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file PREFERENCES_PROFILESAVECACHE;Save processing profile to the cache PREFERENCES_PROFILESAVEINPUT;Save processing profile next to the input file +PREFERENCES_PROFILESAVELOCATION;Processing profile saving location PREFERENCES_PROFILE_NONE;None PREFERENCES_PROPERTY;Property +PREFERENCES_PRTINTENT;Rendering intent +PREFERENCES_PRTPROFILE;Color profile PREFERENCES_PSPATH;Adobe Photoshop installation directory PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". PREFERENCES_RGBDTL_LABEL;Max number of threads for Noise Reduction and Wavelet Levels PREFERENCES_RGBDTL_TOOLTIP;Leave the setting at "0" to automatically use as many threads as possible. The more threads run in parallel, the faster the computation. Refer to RawPedia for memory requirements. -PREFERENCES_SELECTFONT;Select global font +PREFERENCES_SELECTFONT;Select main font PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font PREFERENCES_SELECTLANG;Select language PREFERENCES_SELECTTHEME;Select theme @@ -1058,7 +1108,6 @@ PREFERENCES_SHTHRESHOLD;Threshold for clipped shadows PREFERENCES_SIMPLAUT;Tool mode PREFERENCES_SINGLETAB;Single Editor Tab Mode PREFERENCES_SINGLETABVERTAB;Single Editor Tab Mode, Vertical Tabs -PREFERENCES_SLIMUI;Slim interface PREFERENCES_SMA;Small (250x287) PREFERENCES_SND_BATCHQUEUEDONE;Queue processing done PREFERENCES_SND_HELP;Enter a full file path to set a sound, or leave blank for no sound.\nFor system sounds on Windows use "SystemDefault", "SystemAsterisk" etc., and on Linux use "complete", "window-attention" etc. @@ -1068,10 +1117,12 @@ PREFERENCES_STARTUPIMDIR;Image Directory at Startup PREFERENCES_STDAUT;Standard PREFERENCES_TAB_BROWSER;File Browser PREFERENCES_TAB_COLORMGR;Color Management +PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules PREFERENCES_TAB_GENERAL;General PREFERENCES_TAB_IMPROC;Image Processing PREFERENCES_TAB_PERFORMANCE;Performance & Quality PREFERENCES_TAB_SOUND;Sounds +PREFERENCES_THEME;Theme PREFERENCES_TIMAX;High PREFERENCES_TINB;Number of tiles PREFERENCES_TISTD;Standard @@ -1080,7 +1131,6 @@ PREFERENCES_TP_USEICONORTEXT;Use tab icons instead of text PREFERENCES_TP_VSCROLLBAR;Hide vertical scrollbar PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file PREFERENCES_USEBUNDLEDPROFILES;Use bundled profiles -PREFERENCES_USESYSTEMTHEME;Use system theme PREFERENCES_VIEW;Output device's white balance (monitor, TV, projector, viewing, etc.) PREFERENCES_WAVLEV;Increase wavelet level in quality 'high' PREFERENCES_WLONE;One level @@ -1096,6 +1146,7 @@ PROFILEPANEL_MODE_TIP;Processing profile fill mode.\n\nButton pressed: partial p PROFILEPANEL_MYPROFILES;My profiles PROFILEPANEL_PASTEPPASTE;Parameters to paste PROFILEPANEL_PCUSTOM;Custom +PROFILEPANEL_PDYNAMIC;Dynamic PROFILEPANEL_PFILE;From file PROFILEPANEL_PINTERNAL;Neutral PROFILEPANEL_PLASTSAVED;Last Saved @@ -1229,11 +1280,11 @@ TP_COARSETRAF_TOOLTIP_HFLIP;Flip horizontally. TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left.\n\nShortcuts:\n[ - Multiple Editor Tabs Mode,\nAlt-[ - Single Editor Tab Mode. TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right.\n\nShortcuts:\n] - Multiple Editor Tabs Mode,\nAlt-] - Single Editor Tab Mode. TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically. -TP_COLORAPP_ADAPTSCENE;Scene luminosity -TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) -TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +TP_COLORAPP_ADAPTSCENE;Scene absolute luminance +TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) +TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. TP_COLORAPP_ALGO;Algorithm TP_COLORAPP_ALGO_ALL;All TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1253,8 +1304,8 @@ TP_COLORAPP_CHROMA_TOOLTIP;Chroma in CIECAM02 differs from L*a*b* and RGB chroma TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation TP_COLORAPP_CONTRAST;Contrast (J) TP_COLORAPP_CONTRAST_Q;Contrast (Q) -TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. TP_COLORAPP_CURVEEDITOR1;Tone curve 1 TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1265,6 +1316,7 @@ TP_COLORAPP_DATACIE;CIECAM02 output histograms in curves TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] TP_COLORAPP_GAMUT;Gamut control (L*a*b*) TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. TP_COLORAPP_HUE;Hue (h) @@ -1276,9 +1328,11 @@ TP_COLORAPP_LABEL_VIEWING;Viewing Conditions TP_COLORAPP_LIGHT;Lightness (J) TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. TP_COLORAPP_MODEL;WP Model -TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: 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\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +TP_COLORAPP_NEUTRAL;Reset +TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values TP_COLORAPP_RSTPRO;Red & skin-tones protection -TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. TP_COLORAPP_SHARPCIE;--unused-- TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- TP_COLORAPP_SURROUND;Surround @@ -1297,10 +1351,14 @@ TP_COLORAPP_TCMODE_LABEL2;Curve mode 2 TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode TP_COLORAPP_TCMODE_LIGHTNESS;Lightness TP_COLORAPP_TCMODE_SATUR;Saturation +TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 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_WBCAM;WB [RT+CAT02] + [output] TP_COLORAPP_WBRT;WB [RT] + [output] +TP_COLORAPP_YB;Yb% (mean luminance) +TP_COLORAPP_YBSCENE;Yb% (mean luminance) +TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance TP_COLORTONING_AB;o C/L TP_COLORTONING_AUTOSAT;Automatic TP_COLORTONING_BALANCE;Balance @@ -1438,8 +1496,7 @@ TP_DIRPYREQUALIZER_SKIN_TOOLTIP;At -100 skin-tones are targetted.\nAt 0 all tone TP_DIRPYREQUALIZER_THRESHOLD;Threshold TP_DIRPYREQUALIZER_TOOLTIP;Attempts to reduce artifacts in the transitions between skin colors (hue, chroma, luma) and the rest of the image. TP_DISTORTION_AMOUNT;Amount -TP_DISTORTION_AUTO;Auto Distortion Correction -TP_DISTORTION_AUTO_TIP;Correct lens distortion automatically for some cameras (Micro 4/3, some compact digital cameras, etc.). +TP_DISTORTION_AUTO_TIP;Automatically corrects lens distortion in raw files by matching it against the embedded JPEG image if one exists and has had its lens disortion auto-corrected by the camera. TP_DISTORTION_LABEL;Distortion Correction TP_EPD_EDGESTOPPING;Edge stopping TP_EPD_GAMMA;Gamma @@ -1518,18 +1575,17 @@ TP_HSVEQUALIZER_LABEL;HSV Equalizer TP_HSVEQUALIZER_SAT;S TP_HSVEQUALIZER_VAL;V TP_ICM_APPLYBASELINEEXPOSUREOFFSET;Baseline exposure -TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only enabled if the selected DCP has any. +TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP;Employ the embedded DCP baseline exposure offset. The setting is only available if the selected DCP has one. TP_ICM_APPLYHUESATMAP;Base table -TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only enabled if the selected DCP has one. +TP_ICM_APPLYHUESATMAP_TOOLTIP;Employ the embedded DCP base table (HueSatMap). The setting is only available if the selected DCP has one. TP_ICM_APPLYLOOKTABLE;Look table -TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only enabled if the selected DCP has one. +TP_ICM_APPLYLOOKTABLE_TOOLTIP;Employ the embedded DCP look table. The setting is only available if the selected DCP has one. TP_ICM_BLENDCMSMATRIX;Blend ICC highlights with matrix TP_ICM_BLENDCMSMATRIX_TOOLTIP;Enable to recover clipped highlights when using LUT-based ICC profiles. TP_ICM_BPC;Black Point Compensation -TP_ICM_BPC_TOOLTIP;Enable this to fit the Luminosity channel to the output color space with a fix White Point TP_ICM_DCPILLUMINANT;Illuminant TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolated -TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only enabled if a Dual-Illuminant DCP with interpolation support is selected. +TP_ICM_DCPILLUMINANT_TOOLTIP;Select which embedded DCP illuminant to employ. Default is "interpolated" which is a mix between the two based on white balance. The setting is only available if a dual-illuminant DCP with interpolation support is selected. TP_ICM_INPUTCAMERA;Camera standard TP_ICM_INPUTCAMERAICC;Auto-matched camera profile TP_ICM_INPUTCAMERAICC_TOOLTIP;Use RawTherapee's camera-specific DCP or ICC input color profiles. These profiles are more precise than simpler matrix ones. They are not available for all cameras. These profiles are stored in the /iccprofiles/input and /dcpprofiles folders and are automatically retrieved based on a file name matching to the exact model name of the camera. @@ -1546,12 +1602,12 @@ TP_ICM_LABEL;Color Management TP_ICM_NOICM;No ICM: sRGB Output TP_ICM_OUTPUTPROFILE;Output Profile TP_ICM_PROFILEINTENT;Rendering Intent -TP_ICM_SAVEREFERENCE;Save Reference Image for Profiling +TP_ICM_SAVEREFERENCE;Save Reference Image TP_ICM_SAVEREFERENCE_APPLYWB;Apply white balance TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP;Generally, apply the white balance when saving images to create ICC profiles, and do not apply the white balance to create DCP profiles. TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile is applied. The result can be used for calibration purposes and generation of a camera profile. TP_ICM_TONECURVE;Tone curve -TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only enabled if the selected DCP has a tone curve. +TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve. TP_ICM_WORKINGPROFILE;Working Profile TP_IMPULSEDENOISE_LABEL;Impulse Noise Reduction TP_IMPULSEDENOISE_THRESH;Threshold @@ -1639,21 +1695,82 @@ TP_RAWEXPOS_LINEAR;White-point correction TP_RAWEXPOS_PRESER;Highlight preservation TP_RAWEXPOS_RGB;Red, Green, Blue TP_RAWEXPOS_TWOGREEN;Link greens +TP_RAW_1PASSMEDIUM;1-Pass (Medium) +TP_RAW_3PASSBEST;3-Pass (Best) +TP_RAW_AHD;AHD +TP_RAW_AMAZE;AMaZE +TP_RAW_DCB;DCB TP_RAW_DCBENHANCE;DCB enhancement TP_RAW_DCBITERATIONS;Number of DCB iterations TP_RAW_DMETHOD;Method TP_RAW_DMETHOD_PROGRESSBAR;%1 demosaicing... TP_RAW_DMETHOD_PROGRESSBAR_REFINE;Demosaicing refinement... -TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look. +TP_RAW_DMETHOD_TOOLTIP;Note: IGV and LMMSE are dedicated to high ISO images to aid in noise reduction without leading to maze patterns, posterization or a washed-out look.\nPixel Shift is for Pentax Pixel Shift files. It falls back to AMaZE for non-Pixel Shift files. +TP_RAW_EAHD;EAHD TP_RAW_FALSECOLOR;False color suppression steps +TP_RAW_FAST;Fast TP_RAW_HD;Threshold TP_RAW_HD_TOOLTIP;Lower values make hot/dead pixel detection more aggressive, but false positives may lead to artifacts. If you notice any artifacts appearing when enabling the Hot/Dead Pixel Filters, gradually increase the threshold value until they disappear. +TP_RAW_HPHD;HPHD +TP_RAW_IGV;IGV +TP_RAW_IMAGENUM;Sub-image +TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. TP_RAW_LABEL;Demosaicing +TP_RAW_LMMSE;LMMSE TP_RAW_LMMSEITERATIONS;LMMSE enhancement steps TP_RAW_LMMSE_TOOLTIP;Adds gamma (step 1), median (steps 2-4) and refinement (steps 5-6) to reduce artifacts and improve the signal-to-noise ratio. +TP_RAW_MONO;Mono +TP_RAW_NONE;None (Shows sensor pattern) +TP_RAW_PIXELSHIFT;Pixel Shift +TP_RAW_PIXELSHIFTADAPTIVE;Adaptive detection +TP_RAW_PIXELSHIFTBLUR;Blur motion mask +TP_RAW_PIXELSHIFTEPERISO;ISO adaption +TP_RAW_PIXELSHIFTEPERISO_TOOLTIP;The default value of 0 should work fine for base ISO.\nIncrease the value to improve motion detection for higher ISO.\nIncrease in small steps and watch the motion mask while increasing. +TP_RAW_PIXELSHIFTEQUALBRIGHT;Equalize brightness of frames +TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel +TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. +TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP;Equalize the brightness of the frames to the brightness of the selected frame.\nIf there are overexposed areas in the frames select the brightest frame to avoid magenta colour cast in overexposed areas or enable motion correction. +TP_RAW_PIXELSHIFTEXP0;Experimental +TP_RAW_PIXELSHIFTGREEN;Check green channel for motion +TP_RAW_PIXELSHIFTHOLEFILL;Fill holes in motion mask +TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP;Fill holes in motion mask +TP_RAW_PIXELSHIFTLMMSE;Use LMMSE for moving parts +TP_RAW_PIXELSHIFTLMMSE_TOOLTIP;Use LMMSE instead of AMaZE for areas of motion.\nUseful for high ISO images. +TP_RAW_PIXELSHIFTMASKTHRESHOLD;3x3 new threshold +TP_RAW_PIXELSHIFTMEDIAN;Use median for moving parts +TP_RAW_PIXELSHIFTMEDIAN3;Exclude selected frame from median +TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP;Excludes selected frame from median.\nUseful if moving objects overlap in frame 2 and 3 +TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP;Use median of all frames instead of selected frame for regions with motion.\nRemoves objects which are at different places in all frames.\nGives motion effect on slow moving (overlapping) objects. +TP_RAW_PIXELSHIFTMM_AUTO;Automatic +TP_RAW_PIXELSHIFTMM_CUSTOM;Custom +TP_RAW_PIXELSHIFTMM_OFF;Off +TP_RAW_PIXELSHIFTMOTION;Motion detection level (deprecated) +TP_RAW_PIXELSHIFTMOTIONCORRECTION;Green motion correction size +TP_RAW_PIXELSHIFTMOTIONMETHOD;Motion Correction +TP_RAW_PIXELSHIFTMOTION_TOOLTIP;0 means no motion detection.\n1 - 99 means motion will be detected according to this value. Increase value to increase detection rate.\n100 means the AMaZE-demosaiced frame will be used. +TP_RAW_PIXELSHIFTNONGREENAMAZE;Check red/blue AMaZE +TP_RAW_PIXELSHIFTNONGREENCROSS;Check red/blue channels for motion +TP_RAW_PIXELSHIFTNONGREENCROSS2;Check green AMaZE +TP_RAW_PIXELSHIFTNONGREENHORIZONTAL;Check red/blue horizontal +TP_RAW_PIXELSHIFTNONGREENVERTICAL;Check red/blue vertical +TP_RAW_PIXELSHIFTNREADISO;nRead +TP_RAW_PIXELSHIFTPRNU;PRNU (%) +TP_RAW_PIXELSHIFTREDBLUEWEIGHT;Red&Blue weight +TP_RAW_PIXELSHIFTSHOWMOTION;Show motion mask +TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY;Show only motion mask +TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP;Shows the motion mask without the image. +TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP;Overlays the image with a mask showing the regions with motion. +TP_RAW_PIXELSHIFTSIGMA;Blur radius +TP_RAW_PIXELSHIFTSIGMA_TOOLTIP;The default radius of 1.0 usually fits well for base ISO.\nIncrease the value for high ISO shots, 5.0 is a good starting point.\nWatch the motion mask while changing the value. +TP_RAW_PIXELSHIFTSMOOTH;Smooth transitions +TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP;Smooth transitions between areas with motion and areas without.\nSet to 0 to disable transition smoothing.\nSet to 1 to either get the AMaZE/LMMSE result of the selected frame (depending on whether "Use LMMSE" is selected), or the median of all four frames if "Use median" is selected. +TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE;StdDev factor Blue +TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN;StdDev factor Green +TP_RAW_PIXELSHIFTSTDDEVFACTORRED;StdDev factor Red TP_RAW_SENSOR_BAYER_LABEL;Sensor with Bayer Matrix TP_RAW_SENSOR_XTRANS_DMETHOD_TOOLTIP;3-pass gives best results (recommended for low ISO images).\n1-pass is almost undistinguishable from 3-pass for high ISO images and is faster. TP_RAW_SENSOR_XTRANS_LABEL;Sensor with X-Trans Matrix +TP_RAW_VNG4;VNG4 TP_RESIZE_APPLIESTO;Applies to: TP_RESIZE_CROPPEDAREA;Cropped Area TP_RESIZE_FITBOX;Bounding Box @@ -2021,6 +2138,8 @@ TP_WBALANCE_SOLUX41;Solux 4100K TP_WBALANCE_SOLUX47;Solux 4700K (vendor) TP_WBALANCE_SOLUX47_NG;Solux 4700K (Nat. Gallery) TP_WBALANCE_SPOTWB;Spot WB +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_TEMPERATURE;Temperature TP_WBALANCE_TUNGSTEN;Tungsten TP_WBALANCE_WATER1;UnderWater 1 diff --git a/rtdata/options/options.osx b/rtdata/options/options.osx index 4d35255cd..25696cb85 100644 --- a/rtdata/options/options.osx +++ b/rtdata/options/options.osx @@ -23,9 +23,6 @@ PathTemplate=%p1/converted/%f # Parameters: CustomProfileBuilder= -[GUI] -Font=Sans 12 - # Set here an absolute or relative path (to the rawtherapee.exe file) to the directory containing your own profiles. # If MultiUser=true, each user will have their own "options" file, and can set a common or different absolu path #Directory=profiles @@ -39,3 +36,7 @@ Font=Sans 12 # Default profile name (without extension) to use for standard (8bits) images #ImgDefault=Neutral + +[GUI] +FontFamily=Helvetica Regular +CPFontFamily=Helvetica Regular diff --git a/rtdata/profiles/BW/BW 1.pp3 b/rtdata/profiles/Black-and-White/Black-and-White 1.pp3 similarity index 100% rename from rtdata/profiles/BW/BW 1.pp3 rename to rtdata/profiles/Black-and-White/Black-and-White 1.pp3 diff --git a/rtdata/profiles/BW/BW 2.pp3 b/rtdata/profiles/Black-and-White/Black-and-White 2.pp3 similarity index 100% rename from rtdata/profiles/BW/BW 2.pp3 rename to rtdata/profiles/Black-and-White/Black-and-White 2.pp3 diff --git a/rtdata/profiles/BW/BW 3.pp3 b/rtdata/profiles/Black-and-White/Black-and-White 3.pp3 similarity index 100% rename from rtdata/profiles/BW/BW 3.pp3 rename to rtdata/profiles/Black-and-White/Black-and-White 3.pp3 diff --git a/rtdata/profiles/BW/BW 4.pp3 b/rtdata/profiles/Black-and-White/Black-and-White 4.pp3 similarity index 100% rename from rtdata/profiles/BW/BW 4.pp3 rename to rtdata/profiles/Black-and-White/Black-and-White 4.pp3 diff --git a/rtdata/profiles/Default ISO High.pp3 b/rtdata/profiles/Default ISO High.pp3 index 691141e2c..c15085093 100644 --- a/rtdata/profiles/Default ISO High.pp3 +++ b/rtdata/profiles/Default ISO High.pp3 @@ -1,19 +1,18 @@ [Version] -AppVersion=4.2.84 -Version=322 +AppVersion=5.1 +Version=326 [Exposure] Auto=true Clip=0.02 Saturation=0 -CurveMode=Standard -CurveMode2=Standard +CurveMode=Perceptual +CurveMode2=Perceptual Curve=0; Curve2=0; -[HLRecovery] -Enabled=true -Method=Blend +[Retinex] +Enabled=false [Channel Mixer] Red=100;0;0; @@ -42,19 +41,6 @@ ClCurve=0; [Sharpening] Enabled=false -Method=usm -Radius=0.7 -Amount=250 -Threshold=20;80;2000;1200; -OnlyEdges=false -EdgedetectionRadius=1.9 -EdgeTolerance=1800 -HalocontrolEnabled=false -HalocontrolAmount=85 -DeconvRadius=0.75 -DeconvAmount=75 -DeconvDamping=20 -DeconvIterations=30 [Vibrance] Enabled=false @@ -68,6 +54,7 @@ Enabled=false [White Balance] Setting=Camera Equal=1 +TemperatureBias=0 [Color appearance] Enabled=false @@ -82,19 +69,19 @@ Enabled=false Enabled=true Enhance=false Median=true -Luma=0 -Ldetail=50 -Chroma=30 +Auto=false +Luma=40 +Ldetail=80 Method=Lab +LMethod=SLI +CMethod=MAN +C2Method=AUTO SMethod=shal -MedMethod=33 +MedMethod=soft RGBMethod=soft -MethodMed=Lab -Redchro=0 -Bluechro=0 +MethodMed=Lpab Gamma=1.7 -Passes=3 -LCurve=1;0.05;0.5;0.35;0.35;0.55;0.04;0.35;0.35; +Passes=1 [EPD] Enabled=false @@ -108,6 +95,29 @@ Enabled=false [PCVignette] Enabled=false +[Color Management] +InputProfile=(cameraICC) +ToneCurve=false +ApplyLookTable=false +ApplyBaselineExposureOffset=true +ApplyHueSatMap=true +BlendCMSMatrix=false +DCPIlluminant=0 +WorkingProfile=ProPhoto +OutputProfile=RT_sRGB +OutputProfileIntent=Relative +OutputBPC=true +Gammafree=default +Freegamma=false +GammaValue=2.2200000000000002 +GammaSlope=4.5 + +[Wavelet] +Enabled=false + +[Directional Pyramid Equalizer] +Enabled=false + [HSV Equalizer] HCurve=0; SCurve=0; @@ -116,9 +126,6 @@ VCurve=0; [Film Simulation] Enabled=false -[Wavelet] -Enabled=false - [RGB Curves] LumaMode=false rCurve=0; @@ -134,12 +141,15 @@ DarkFrameAuto=false FlatFieldFile=/szeva FlatFieldAutoSelect=false CA=true -HotPixelFilter=true +HotPixelFilter=false DeadPixelFilter=false HotDeadPixelThresh=100 +PreExposure=1 +PrePreserv=0 [RAW Bayer] Method=lmmse +ImageNum=1 CcSteps=0 PreBlack0=0 PreBlack1=0 diff --git a/rtdata/profiles/Default ISO Medium.pp3 b/rtdata/profiles/Default ISO Medium.pp3 index 889911a85..0bd94097f 100644 --- a/rtdata/profiles/Default ISO Medium.pp3 +++ b/rtdata/profiles/Default ISO Medium.pp3 @@ -1,19 +1,18 @@ [Version] -AppVersion=4.2.84 -Version=322 +AppVersion=5.1 +Version=326 [Exposure] Auto=true Clip=0.02 Saturation=0 -CurveMode=Standard -CurveMode2=Standard +CurveMode=Perceptual +CurveMode2=Perceptual Curve=0; Curve2=0; -[HLRecovery] -Enabled=true -Method=Blend +[Retinex] +Enabled=false [Channel Mixer] Red=100;0;0; @@ -43,8 +42,8 @@ ClCurve=0; [Sharpening] Enabled=true Method=usm -Radius=0.7 -Amount=250 +Radius=0.75 +Amount=200 Threshold=20;80;2000;1200; OnlyEdges=false EdgedetectionRadius=1.9 @@ -68,6 +67,7 @@ Enabled=false [White Balance] Setting=Camera Equal=1 +TemperatureBias=0 [Color appearance] Enabled=false @@ -81,20 +81,20 @@ Enabled=false [Directional Pyramid Denoising] Enabled=true Enhance=false -Median=true +Median=false +Auto=false Luma=0 -Ldetail=85 -Chroma=15 +Ldetail=80 Method=Lab +LMethod=SLI +CMethod=MAN +C2Method=AUTO SMethod=shal -MedMethod=33 +MedMethod=soft RGBMethod=soft -MethodMed=Lab -Redchro=0 -Bluechro=0 +MethodMed=Lonly Gamma=1.7 Passes=1 -LCurve=1;0.05;0.15;0.35;0.35;0.55;0.04;0.35;0.35; [EPD] Enabled=false @@ -108,6 +108,29 @@ Enabled=false [PCVignette] Enabled=false +[Color Management] +InputProfile=(cameraICC) +ToneCurve=false +ApplyLookTable=false +ApplyBaselineExposureOffset=true +ApplyHueSatMap=true +BlendCMSMatrix=false +DCPIlluminant=0 +WorkingProfile=ProPhoto +OutputProfile=RT_sRGB +OutputProfileIntent=Relative +OutputBPC=true +Gammafree=default +Freegamma=false +GammaValue=2.2200000000000002 +GammaSlope=4.5 + +[Wavelet] +Enabled=false + +[Directional Pyramid Equalizer] +Enabled=false + [HSV Equalizer] HCurve=0; SCurve=0; @@ -116,9 +139,6 @@ VCurve=0; [Film Simulation] Enabled=false -[Wavelet] -Enabled=false - [RGB Curves] LumaMode=false rCurve=0; @@ -134,12 +154,15 @@ DarkFrameAuto=false FlatFieldFile=/szeva FlatFieldAutoSelect=false CA=true -HotPixelFilter=true +HotPixelFilter=false DeadPixelFilter=false HotDeadPixelThresh=100 +PreExposure=1 +PrePreserv=0 [RAW Bayer] Method=amaze +ImageNum=1 CcSteps=0 PreBlack0=0 PreBlack1=0 diff --git a/rtdata/profiles/Default.pp3 b/rtdata/profiles/Default.pp3 index c4ea48b60..227ee2e6b 100644 --- a/rtdata/profiles/Default.pp3 +++ b/rtdata/profiles/Default.pp3 @@ -1,19 +1,18 @@ [Version] -AppVersion=4.2.84 -Version=322 +AppVersion=5.1 +Version=326 [Exposure] Auto=true Clip=0.02 Saturation=0 -CurveMode=Standard -CurveMode2=Standard +CurveMode=Perceptual +CurveMode2=Perceptual Curve=0; Curve2=0; -[HLRecovery] -Enabled=true -Method=Blend +[Retinex] +Enabled=false [Channel Mixer] Red=100;0;0; @@ -23,7 +22,6 @@ Blue=0;0;100; [Black & White] Enabled=false - [Luminance Curve] Brightness=0 Contrast=0 @@ -45,7 +43,7 @@ ClCurve=0; Enabled=true Method=usm Radius=0.5 -Amount=250 +Amount=200 Threshold=20;80;2000;1200; OnlyEdges=false EdgedetectionRadius=1.9 @@ -69,6 +67,7 @@ Enabled=false [White Balance] Setting=Camera Equal=1 +TemperatureBias=0 [Color appearance] Enabled=false @@ -81,7 +80,6 @@ Enabled=false [Directional Pyramid Denoising] Enabled=false -Method=Lab [EPD] Enabled=false @@ -95,6 +93,29 @@ Enabled=false [PCVignette] Enabled=false +[Color Management] +InputProfile=(cameraICC) +ToneCurve=false +ApplyLookTable=false +ApplyBaselineExposureOffset=true +ApplyHueSatMap=true +BlendCMSMatrix=false +DCPIlluminant=0 +WorkingProfile=ProPhoto +OutputProfile=RT_sRGB +OutputProfileIntent=Relative +OutputBPC=true +Gammafree=default +Freegamma=false +GammaValue=2.2200000000000002 +GammaSlope=4.5 + +[Wavelet] +Enabled=false + +[Directional Pyramid Equalizer] +Enabled=false + [HSV Equalizer] HCurve=0; SCurve=0; @@ -103,10 +124,6 @@ VCurve=0; [Film Simulation] Enabled=false -[Wavelet] -Enabled=false - - [RGB Curves] LumaMode=false rCurve=0; @@ -122,12 +139,15 @@ DarkFrameAuto=false FlatFieldFile=/szeva FlatFieldAutoSelect=false CA=true -HotPixelFilter=true +HotPixelFilter=false DeadPixelFilter=false HotDeadPixelThresh=100 +PreExposure=1 +PrePreserv=0 [RAW Bayer] Method=amaze +ImageNum=1 CcSteps=0 PreBlack0=0 PreBlack1=0 diff --git a/rtdata/profiles/Pentax Pixel Shift/PS ISO High.pp3 b/rtdata/profiles/Pentax Pixel Shift/PS ISO High.pp3 new file mode 100644 index 000000000..2c9927e93 --- /dev/null +++ b/rtdata/profiles/Pentax Pixel Shift/PS ISO High.pp3 @@ -0,0 +1,28 @@ +[Version] +AppVersion=5.0-r1-gtk3-503-g9e1fc78 +Version=326 + +[RAW] +CA=true + +[RAW Bayer] +Method=pixelshift +PixelShiftMotion=0 +PixelShiftMotionCorrection=5 +PixelShiftMotionCorrectionMethod=2 +pixelShiftStddevFactorGreen=5 +pixelShiftStddevFactorRed=5 +pixelShiftStddevFactorBlue=5 +PixelShiftEperIso=2.8999999999999999 +PixelShiftNreadIso=0 +PixelShiftPrnu=1 +PixelShiftSigma=10 +PixelShiftSum=3 +PixelShiftRedBlueWeight=0.69999999999999996 +pixelShiftAutomatic=true +pixelShiftHoleFill=true +pixelShiftGreen=true +pixelShiftBlur=true +pixelShiftSmoothFactor=0.69999999999999996 +pixelShiftLmmse=true +pixelShiftNonGreenCross=false diff --git a/rtdata/profiles/Pentax Pixel Shift/PS ISO Low.pp3 b/rtdata/profiles/Pentax Pixel Shift/PS ISO Low.pp3 new file mode 100644 index 000000000..cbf2e6c74 --- /dev/null +++ b/rtdata/profiles/Pentax Pixel Shift/PS ISO Low.pp3 @@ -0,0 +1,42 @@ +[Version] +AppVersion=5.0-r1-gtk3-503-g9e1fc78 +Version=326 + +[Sharpening] +Enabled=true +Method=rld +DeconvRadius=0.75 +DeconvAmount=75 +DeconvDamping=0 +DeconvIterations=30 + +[SharpenMicro] +Enabled=true +Matrix=false +Strength=20 +Uniformity=50 + +[RAW] +CA=true + +[RAW Bayer] +Method=pixelshift +PixelShiftMotion=0 +PixelShiftMotionCorrection=5 +PixelShiftMotionCorrectionMethod=1 +pixelShiftStddevFactorGreen=5 +pixelShiftStddevFactorRed=5 +pixelShiftStddevFactorBlue=5 +PixelShiftEperIso=0 +PixelShiftNreadIso=0 +PixelShiftPrnu=1 +PixelShiftSigma=1 +PixelShiftSum=3 +PixelShiftRedBlueWeight=0.69999999999999996 +pixelShiftAutomatic=true +pixelShiftHoleFill=true +pixelShiftGreen=true +pixelShiftBlur=true +pixelShiftSmoothFactor=0.69999999999999996 +pixelShiftLmmse=false +pixelShiftNonGreenCross=true diff --git a/rtdata/profiles/Pentax Pixel Shift/PS ISO Medium.pp3 b/rtdata/profiles/Pentax Pixel Shift/PS ISO Medium.pp3 new file mode 100644 index 000000000..2c83094c2 --- /dev/null +++ b/rtdata/profiles/Pentax Pixel Shift/PS ISO Medium.pp3 @@ -0,0 +1,27 @@ +[Version] +AppVersion=5.0-r1-gtk3-503-g9e1fc78 +Version=326 + +[RAW] +CA=true + +[RAW Bayer] +Method=pixelshift +PixelShiftMotion=0 +PixelShiftMotionCorrection=5 +PixelShiftMotionCorrectionMethod=2 +pixelShiftStddevFactorGreen=5 +pixelShiftStddevFactorRed=5 +pixelShiftStddevFactorBlue=5 +PixelShiftEperIso=2 +PixelShiftNreadIso=0 +PixelShiftPrnu=1 +PixelShiftSigma=5 +PixelShiftSum=3 +PixelShiftRedBlueWeight=0.69999999999999996 +pixelShiftAutomatic=true +pixelShiftHoleFill=true +pixelShiftGreen=true +pixelShiftBlur=true +pixelShiftSmoothFactor=0.69999999999999996 +pixelShiftNonGreenCross=true diff --git a/rtdata/profiles/Pentax Pixel Shift/PS No Motion.pp3 b/rtdata/profiles/Pentax Pixel Shift/PS No Motion.pp3 new file mode 100644 index 000000000..7a73881a1 --- /dev/null +++ b/rtdata/profiles/Pentax Pixel Shift/PS No Motion.pp3 @@ -0,0 +1,26 @@ +[Version] +AppVersion=5.0-r1-gtk3-503-g9e1fc78 +Version=326 + +[Sharpening] +Enabled=true +Method=rld +DeconvRadius=0.75 +DeconvAmount=75 +DeconvDamping=0 +DeconvIterations=30 + +[SharpenMicro] +Enabled=true +Matrix=false +Strength=20 +Uniformity=50 + +[RAW] +CA=true + +[RAW Bayer] +Method=pixelshift +PixelShiftMotion=0 +PixelShiftMotionCorrection=5 +PixelShiftMotionCorrectionMethod=0 diff --git a/rtdata/rt_splash_5.png b/rtdata/rt_splash_5.png deleted file mode 100644 index 71486b132..000000000 Binary files a/rtdata/rt_splash_5.png and /dev/null differ diff --git a/rtdata/rt_splash_5.svg b/rtdata/rt_splash_5.svg deleted file mode 100644 index 78620dd68..000000000 --- a/rtdata/rt_splash_5.svg +++ /dev/null @@ -1,1770 +0,0 @@ - - - - - RawTherapee logo white font white glow - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - RawTherapee logo white font white glow - - - RawTherapee - - - - - rawtherapee - logo - white - - - www.rawtherapee.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Select the desired element and apply one of the effects in the Filter Editor. You might need to ungroup the element before applying. For example to set the RT ring to have a colorful glow, select it and enable the "ring glow". You can change the flood color of the "ring shadow" effect to make it white if you want to make the logo usable on a dark background.For logo specifics, refer to rt_logo.svg Raw - Therapee - "Raw" font Eras-UltraBlk, 69px, -3px spacing between characters, skewed 2° to the right."Therapee" font Eras-Medium, 68px, 4px spacing between characters, skewed 2° to the right.Both have a dropshadow with an opacity of 0.40 and Gaussian blur standard deviation of 3.5.Version number Eras bold 64 or less.Eras font from "freefonts-0.10":ftp://ftp.gimp.org/pub/gimp/fonts/ RawTherapee splash screen design version 1.0 from 2014-05-03 | www.rawtherapee.com - GNU GPLv3 - 5 - - - diff --git a/rtdata/themes/09-Gray-Orange.gtkrc b/rtdata/themes/09-Gray-Orange.gtkrc deleted file mode 100644 index 579085bcf..000000000 --- a/rtdata/themes/09-Gray-Orange.gtkrc +++ /dev/null @@ -1,559 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_salt_pinch:#C05F00\nrt_base_color:#0A0A0A\nrt_fg_color:#757575\nrt_tooltip_fg_color:#D2D2D2\nrt_selected_bg_color:#804d1d\nrt_selected_fg_color:#D0D0D0\nrt_text_color:#757575\nrt_bg_color:#181818\nrt_tooltip_bg_color:#5A5A5A\nrt_tool_bg:#212121\nrt_tool_border:#121212" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 15 - GtkRange::stepper-size = 15 - - GtkScale::slider-width = 14 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 0 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = @rt_bg_color - bg[ACTIVE] = shade (0.9, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = darker (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (0.95, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = shade (0.9, @rt_selected_bg_color) - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (1.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_selected_fg_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.8, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (2.20, @rt_bg_color) - bg[PRELIGHT] = shade (3.00, @rt_bg_color) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (2.25, @rt_bg_color) - bg[PRELIGHT] = shade (3.00, @rt_bg_color) - bg[SELECTED] = shade (4.00, @rt_bg_color) - - fg[PRELIGHT] = shade (2.00, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - xthickness = 2 - ythickness = 2 - - bg[SELECTED] = shade (1.50, @rt_bg_color) - - engine "clearlooks" { - hint = "scrollbar" - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = shade (1.02, @rt_bg_color) - bg[ACTIVE] = @rt_base_color -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-frame" { - bg[NORMAL] = mix(0.95, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = shade(1.15, @rt_fg_color) - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (1.80, @rt_bg_color) - bg[PRELIGHT] = shade (2.20, @rt_bg_color) - bg[ACTIVE] = shade (3.00, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = shade(1.15, @rt_fg_color) - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @rt_salt_pinch -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#8C8C8C" - fg[PRELIGHT] = "#B8B8B8" - fg[INSENSITIVE] = "#505050" - - bg[PRELIGHT] = mix(0.5, @rt_selected_bg_color, @rt_bg_color) - - base[NORMAL] = @rt_salt_pinch - base[PRELIGHT] = @rt_salt_pinch - base[INSENSITIVE] = @rt_salt_pinch -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = shade (0.70, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = shade (1.50, @rt_text_color) - fg[PRELIGHT] = shade (1.50, @rt_text_color) - fg[ACTIVE] = shade (1.50, @rt_text_color) - fg[SELECTED] = shade (1.50, @rt_text_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.25, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-checkbutton" { - - text[NORMAL] = @rt_salt_pinch - - fg[PRELIGHT] = @rt_fg_color - - bg[SELECTED] = @rt_base_color - bg[PRELIGHT] = @rt_base_color - bg[SELECTED] = @rt_base_color - - engine "clearlooks" - { - hint = "checkbutton" - } -} - -style "clearlooks-treeview" { - - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - bg[NORMAL] = shade (1.35, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkScale" style "clearlooks-scale" -class "GtkVScale" style "clearlooks-vscale" -class "GtkHScale" style "clearlooks-hscale" -class "GtkScrollbar" style "clearlooks-scrollbar" -class "GtkHScrollbar" style "clearlooks-hscrollbar" -class "GtkVScrollbar" style "clearlooks-vscrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-checkbutton" -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Dark" diff --git a/rtdata/themes/09-Gray-Orange.iconset b/rtdata/themes/09-Gray-Orange.iconset deleted file mode 100644 index 99ac20640..000000000 --- a/rtdata/themes/09-Gray-Orange.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Dark diff --git a/rtdata/themes/17-Gray-Red.gtkrc b/rtdata/themes/17-Gray-Red.gtkrc deleted file mode 100644 index 21ba1c816..000000000 --- a/rtdata/themes/17-Gray-Red.gtkrc +++ /dev/null @@ -1,559 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_salt_pinch:#800000\nrt_base_color:#404040\nrt_fg_color:#808080\nrt_tooltip_fg_color:#D2D2D2\nrt_selected_bg_color:#502828\nrt_selected_fg_color:#D0D0D0\nrt_text_color:#A0A0A0\nrt_bg_color:#2B2B2B\nrt_tooltip_bg_color:#5A5A5A\nrt_tool_bg:#333333\nrt_tool_border:#434343" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 15 - GtkRange::stepper-size = 15 - - GtkScale::slider-width = 14 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 0 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = @rt_bg_color - bg[ACTIVE] = shade (0.9, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = darker (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (0.95, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = shade (0.9, @rt_selected_bg_color) - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (1.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_selected_fg_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.9, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (1.30, @rt_tool_bg) - bg[PRELIGHT] = shade (1.50, @rt_tool_bg) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (1.45, @rt_bg_color) - bg[PRELIGHT] = shade (1.75, @rt_bg_color) - bg[SELECTED] = shade (1.75, @rt_bg_color) - - fg[PRELIGHT] = shade (1.60, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - xthickness = 2 - ythickness = 2 - - bg[SELECTED] = shade (1.25, @rt_bg_color) - - engine "clearlooks" { - hint = "scrollbar" - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = shade (1.02, @rt_bg_color) - bg[ACTIVE] = shade (0.80, @rt_bg_color) -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-frame" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = shade(1.15, @rt_fg_color) - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (1.20, @rt_tool_bg) - bg[PRELIGHT] = shade (1.40, @rt_tool_bg) - bg[ACTIVE] = shade (1.65, @rt_tool_bg) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = shade(1.15, @rt_fg_color) - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @rt_salt_pinch -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#a0a0a0" - fg[PRELIGHT] = "#d0d0d0" - fg[INSENSITIVE] = "#808080" - - bg[PRELIGHT] = mix(0.75, @rt_selected_bg_color, @rt_bg_color) - - base[NORMAL] = @rt_salt_pinch - base[PRELIGHT] = @rt_salt_pinch - base[INSENSITIVE] = @rt_salt_pinch -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = shade (0.70, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = lighter (@rt_fg_color) - fg[PRELIGHT] = lighter (@rt_fg_color) - fg[ACTIVE] = lighter (@rt_fg_color) - fg[SELECTED] = lighter (@rt_fg_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.25, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-checkbutton" { - - text[NORMAL] = @rt_selected_fg_color - - fg[PRELIGHT] = @rt_fg_color - - bg[SELECTED] = @rt_base_color - bg[PRELIGHT] = @rt_base_color - bg[SELECTED] = @rt_base_color - - engine "clearlooks" - { - hint = "checkbutton" - } -} - -style "clearlooks-treeview" { - - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - bg[NORMAL] = shade (0.80, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkScale" style "clearlooks-scale" -class "GtkVScale" style "clearlooks-vscale" -class "GtkHScale" style "clearlooks-hscale" -class "GtkScrollbar" style "clearlooks-scrollbar" -class "GtkHScrollbar" style "clearlooks-hscrollbar" -class "GtkVScrollbar" style "clearlooks-vscrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-checkbutton" -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Dark" diff --git a/rtdata/themes/17-Gray-Red.iconset b/rtdata/themes/17-Gray-Red.iconset deleted file mode 100644 index 99ac20640..000000000 --- a/rtdata/themes/17-Gray-Red.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Dark diff --git a/rtdata/themes/21-Gray-Gray.gtkrc b/rtdata/themes/21-Gray-Gray.gtkrc deleted file mode 100644 index 3bc33edfe..000000000 --- a/rtdata/themes/21-Gray-Gray.gtkrc +++ /dev/null @@ -1,559 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_salt_pinch:#B0B0B0\nrt_base_color:#1A1A1A\nrt_fg_color:#909090\nrt_tooltip_fg_color:#1A1A1A\nrt_selected_bg_color:#4A4A4A\nrt_selected_fg_color:#B0B0B0\nrt_text_color:#828282\nrt_bg_color:#363636\nrt_tooltip_bg_color:#909090\nrt_tool_bg:#252525\nrt_tool_border:#484848" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 12 - GtkRange::stepper-size = 16 - - #GtkScale::slider-width = 12 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 1 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = @rt_bg_color - bg[ACTIVE] = shade (0.9, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = lighter (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (0.95, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = shade (0.9, @rt_selected_bg_color) - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (1.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_selected_fg_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.8, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (1.35, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (1.45, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - bg[SELECTED] = shade (2.00, @rt_bg_color) - - fg[PRELIGHT] = shade (1.30, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - xthickness = 2 - ythickness = 2 - - bg[SELECTED] = shade (1.50, @rt_bg_color) - - engine "clearlooks" { - hint = "scrollbar" - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = shade (1.02, @rt_bg_color) - bg[ACTIVE] = @rt_base_color -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = shade(0.85, @rt_bg_color) - bg[INSENSITIVE] = shade(0.85, @rt_bg_color) -} - -style "clearlooks-frame" { - bg[NORMAL] = shade(0.85, @rt_bg_color) - bg[INSENSITIVE] = shade(0.85, @rt_bg_color) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = shade(1.15, @rt_fg_color) - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (1.20, @rt_bg_color) - bg[PRELIGHT] = shade (1.30, @rt_bg_color) - bg[ACTIVE] = shade (1.90, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = shade(1.15, @rt_fg_color) - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @rt_salt_pinch -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#a0a0a0" - fg[PRELIGHT] = "#d0d0d0" - fg[INSENSITIVE] = "#808080" - - bg[PRELIGHT] = mix(0.8, @rt_selected_bg_color, @rt_bg_color) - - base[NORMAL] = @rt_salt_pinch - base[PRELIGHT] = @rt_salt_pinch - base[INSENSITIVE] = @rt_salt_pinch -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = @rt_base_color - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = lighter (@rt_fg_color) - fg[PRELIGHT] = lighter (@rt_fg_color) - fg[ACTIVE] = lighter (@rt_fg_color) - fg[SELECTED] = lighter (@rt_fg_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.20, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-checkbutton" { - - text[NORMAL] = @rt_selected_fg_color - - fg[PRELIGHT] = @rt_fg_color - - bg[SELECTED] = @rt_base_color - bg[PRELIGHT] = @rt_base_color - bg[SELECTED] = @rt_base_color - - engine "clearlooks" - { - hint = "checkbutton" - } -} - -style "clearlooks-treeview" { - - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - bg[NORMAL] = shade (0.80, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkScale" style "clearlooks-scale" -class "GtkVScale" style "clearlooks-vscale" -class "GtkHScale" style "clearlooks-hscale" -class "GtkScrollbar" style "clearlooks-scrollbar" -class "GtkHScrollbar" style "clearlooks-hscrollbar" -class "GtkVScrollbar" style "clearlooks-vscrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-checkbutton" -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Dark" diff --git a/rtdata/themes/21-Gray-Gray.iconset b/rtdata/themes/21-Gray-Gray.iconset deleted file mode 100644 index 99ac20640..000000000 --- a/rtdata/themes/21-Gray-Gray.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Dark diff --git a/rtdata/themes/21-Gray-Orange.gtkrc b/rtdata/themes/21-Gray-Orange.gtkrc deleted file mode 100644 index ee8e2669a..000000000 --- a/rtdata/themes/21-Gray-Orange.gtkrc +++ /dev/null @@ -1,559 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_salt_pinch:#FF8000\nrt_base_color:#1A1A1A\nrt_fg_color:#909090\nrt_tooltip_fg_color:#1A1A1A\nrt_selected_bg_color:#B3641B\nrt_selected_fg_color:#B0B0B0\nrt_text_color:#828282\nrt_bg_color:#363636\nrt_tooltip_bg_color:#909090\nrt_tool_bg:#252525\nrt_tool_border:#484848" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 12 - GtkRange::stepper-size = 16 - - #GtkScale::slider-width = 12 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 1 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = @rt_bg_color - bg[ACTIVE] = shade (0.9, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = darker (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (0.95, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = shade (0.9, @rt_selected_bg_color) - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (1.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_selected_fg_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.8, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (1.35, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (1.45, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - bg[SELECTED] = shade (2.00, @rt_bg_color) - - fg[PRELIGHT] = shade (1.30, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - xthickness = 2 - ythickness = 2 - - bg[SELECTED] = shade (1.50, @rt_bg_color) - - engine "clearlooks" { - hint = "scrollbar" - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = shade (1.02, @rt_bg_color) - bg[ACTIVE] = @rt_base_color -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = shade(0.85, @rt_bg_color) - bg[INSENSITIVE] = shade(0.85, @rt_bg_color) -} - -style "clearlooks-frame" { - bg[NORMAL] = shade(0.85, @rt_bg_color) - bg[INSENSITIVE] = shade(0.85, @rt_bg_color) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = shade(1.15, @rt_fg_color) - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (1.20, @rt_bg_color) - bg[PRELIGHT] = shade (1.30, @rt_bg_color) - bg[ACTIVE] = shade (1.90, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = shade(1.15, @rt_fg_color) - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @rt_salt_pinch -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#a0a0a0" - fg[PRELIGHT] = "#d0d0d0" - fg[INSENSITIVE] = "#808080" - - bg[PRELIGHT] = mix(0.8, @rt_selected_bg_color, @rt_bg_color) - - base[NORMAL] = @rt_salt_pinch - base[PRELIGHT] = @rt_salt_pinch - base[INSENSITIVE] = @rt_salt_pinch -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = @rt_base_color - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = lighter (@rt_fg_color) - fg[PRELIGHT] = lighter (@rt_fg_color) - fg[ACTIVE] = lighter (@rt_fg_color) - fg[SELECTED] = lighter (@rt_fg_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.20, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-checkbutton" { - - text[NORMAL] = @rt_selected_fg_color - - fg[PRELIGHT] = @rt_fg_color - - bg[SELECTED] = @rt_base_color - bg[PRELIGHT] = @rt_base_color - bg[SELECTED] = @rt_base_color - - engine "clearlooks" - { - hint = "checkbutton" - } -} - -style "clearlooks-treeview" { - - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - bg[NORMAL] = shade (0.80, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkScale" style "clearlooks-scale" -class "GtkVScale" style "clearlooks-vscale" -class "GtkHScale" style "clearlooks-hscale" -class "GtkScrollbar" style "clearlooks-scrollbar" -class "GtkHScrollbar" style "clearlooks-hscrollbar" -class "GtkVScrollbar" style "clearlooks-vscrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-checkbutton" -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Dark" diff --git a/rtdata/themes/21-Gray-Orange.iconset b/rtdata/themes/21-Gray-Orange.iconset deleted file mode 100644 index 99ac20640..000000000 --- a/rtdata/themes/21-Gray-Orange.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Dark diff --git a/rtdata/themes/21-Gray-Purple.gtkrc b/rtdata/themes/21-Gray-Purple.gtkrc deleted file mode 100644 index 1b15fc3e1..000000000 --- a/rtdata/themes/21-Gray-Purple.gtkrc +++ /dev/null @@ -1,559 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_salt_pinch:#843382\nrt_base_color:#1A1A1A\nrt_fg_color:#909090\nrt_tooltip_fg_color:#1A1A1A\nrt_selected_bg_color:#5D235C\nrt_selected_fg_color:#B0B0B0\nrt_text_color:#828282\nrt_bg_color:#363636\nrt_tooltip_bg_color:#909090\nrt_tool_bg:#252525\nrt_tool_border:#484848" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 12 - GtkRange::stepper-size = 16 - - #GtkScale::slider-width = 12 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 1 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = @rt_bg_color - bg[ACTIVE] = shade (0.9, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = darker (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (0.95, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = shade (0.9, @rt_selected_bg_color) - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (1.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_selected_fg_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.8, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (1.35, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (1.45, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - bg[SELECTED] = shade (2.00, @rt_bg_color) - - fg[PRELIGHT] = shade (1.30, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - xthickness = 2 - ythickness = 2 - - bg[SELECTED] = shade (1.50, @rt_bg_color) - - engine "clearlooks" { - hint = "scrollbar" - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = shade (1.02, @rt_bg_color) - bg[ACTIVE] = @rt_base_color -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = shade(0.85, @rt_bg_color) - bg[INSENSITIVE] = shade(0.85, @rt_bg_color) -} - -style "clearlooks-frame" { - bg[NORMAL] = shade(0.85, @rt_bg_color) - bg[INSENSITIVE] = shade(0.85, @rt_bg_color) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = shade(1.15, @rt_fg_color) - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (1.20, @rt_bg_color) - bg[PRELIGHT] = shade (1.30, @rt_bg_color) - bg[ACTIVE] = shade (1.90, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = shade(1.15, @rt_fg_color) - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @rt_salt_pinch -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#a0a0a0" - fg[PRELIGHT] = "#d0d0d0" - fg[INSENSITIVE] = "#808080" - - bg[PRELIGHT] = mix(0.8, @rt_selected_bg_color, @rt_bg_color) - - base[NORMAL] = @rt_salt_pinch - base[PRELIGHT] = @rt_salt_pinch - base[INSENSITIVE] = @rt_salt_pinch -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = @rt_base_color - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = lighter (@rt_fg_color) - fg[PRELIGHT] = lighter (@rt_fg_color) - fg[ACTIVE] = lighter (@rt_fg_color) - fg[SELECTED] = lighter (@rt_fg_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.20, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-checkbutton" { - - text[NORMAL] = @rt_selected_fg_color - - fg[PRELIGHT] = @rt_fg_color - - bg[SELECTED] = @rt_base_color - bg[PRELIGHT] = @rt_base_color - bg[SELECTED] = @rt_base_color - - engine "clearlooks" - { - hint = "checkbutton" - } -} - -style "clearlooks-treeview" { - - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - bg[NORMAL] = shade (0.80, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkScale" style "clearlooks-scale" -class "GtkVScale" style "clearlooks-vscale" -class "GtkHScale" style "clearlooks-hscale" -class "GtkScrollbar" style "clearlooks-scrollbar" -class "GtkHScrollbar" style "clearlooks-hscrollbar" -class "GtkVScrollbar" style "clearlooks-vscrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-checkbutton" -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Dark" diff --git a/rtdata/themes/21-Gray-Purple.iconset b/rtdata/themes/21-Gray-Purple.iconset deleted file mode 100644 index 99ac20640..000000000 --- a/rtdata/themes/21-Gray-Purple.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Dark diff --git a/rtdata/themes/21-Gray-Red.gtkrc b/rtdata/themes/21-Gray-Red.gtkrc deleted file mode 100644 index f46dc67e8..000000000 --- a/rtdata/themes/21-Gray-Red.gtkrc +++ /dev/null @@ -1,559 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_salt_pinch:#800000\nrt_base_color:#1A1A1A\nrt_fg_color:#909090\nrt_tooltip_fg_color:#1A1A1A\nrt_selected_bg_color:#703535\nrt_selected_fg_color:#B0B0B0\nrt_text_color:#828282\nrt_bg_color:#363636\nrt_tooltip_bg_color:#909090\nrt_tool_bg:#252525\nrt_tool_border:#484848" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 12 - GtkRange::stepper-size = 16 - - #GtkScale::slider-width = 12 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 1 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = @rt_bg_color - bg[ACTIVE] = shade (0.9, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = darker (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (0.95, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = shade (0.9, @rt_selected_bg_color) - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (1.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_selected_fg_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.8, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (1.35, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (1.45, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - bg[SELECTED] = shade (2.00, @rt_bg_color) - - fg[PRELIGHT] = shade (1.30, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - xthickness = 2 - ythickness = 2 - - bg[SELECTED] = shade (1.50, @rt_bg_color) - - engine "clearlooks" { - hint = "scrollbar" - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = shade (1.02, @rt_bg_color) - bg[ACTIVE] = @rt_base_color -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = shade(0.85, @rt_bg_color) - bg[INSENSITIVE] = shade(0.85, @rt_bg_color) -} - -style "clearlooks-frame" { - bg[NORMAL] = shade(0.85, @rt_bg_color) - bg[INSENSITIVE] = shade(0.85, @rt_bg_color) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = shade(1.15, @rt_fg_color) - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (1.20, @rt_bg_color) - bg[PRELIGHT] = shade (1.30, @rt_bg_color) - bg[ACTIVE] = shade (1.90, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = shade(1.15, @rt_fg_color) - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @rt_salt_pinch -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#a0a0a0" - fg[PRELIGHT] = "#d0d0d0" - fg[INSENSITIVE] = "#808080" - - bg[PRELIGHT] = mix(0.8, @rt_selected_bg_color, @rt_bg_color) - - base[NORMAL] = @rt_salt_pinch - base[PRELIGHT] = @rt_salt_pinch - base[INSENSITIVE] = @rt_salt_pinch -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = @rt_base_color - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = lighter (@rt_fg_color) - fg[PRELIGHT] = lighter (@rt_fg_color) - fg[ACTIVE] = lighter (@rt_fg_color) - fg[SELECTED] = lighter (@rt_fg_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.20, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-checkbutton" { - - text[NORMAL] = @rt_selected_fg_color - - fg[PRELIGHT] = @rt_fg_color - - bg[SELECTED] = @rt_base_color - bg[PRELIGHT] = @rt_base_color - bg[SELECTED] = @rt_base_color - - engine "clearlooks" - { - hint = "checkbutton" - } -} - -style "clearlooks-treeview" { - - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - bg[NORMAL] = shade (0.80, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkScale" style "clearlooks-scale" -class "GtkVScale" style "clearlooks-vscale" -class "GtkHScale" style "clearlooks-hscale" -class "GtkScrollbar" style "clearlooks-scrollbar" -class "GtkHScrollbar" style "clearlooks-hscrollbar" -class "GtkVScrollbar" style "clearlooks-vscrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-checkbutton" -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Dark" diff --git a/rtdata/themes/21-Gray-Red.iconset b/rtdata/themes/21-Gray-Red.iconset deleted file mode 100644 index 99ac20640..000000000 --- a/rtdata/themes/21-Gray-Red.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Dark diff --git a/rtdata/themes/25-Gray-Gray.gtkrc b/rtdata/themes/25-Gray-Gray.gtkrc deleted file mode 100644 index f8f2b7cab..000000000 --- a/rtdata/themes/25-Gray-Gray.gtkrc +++ /dev/null @@ -1,559 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_salt_pinch:#606060\nrt_base_color:#525252\nrt_fg_color:#979797\nrt_tooltip_fg_color:#A0A0A0\nrt_selected_bg_color:#606060\nrt_selected_fg_color:#CDCDCD\nrt_text_color:#A2A2A2\nrt_bg_color:#404040\nrt_tooltip_bg_color:#252525\nrt_tool_bg:#3B3B3B\nrt_tool_border:#4D4D4D" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 15 - GtkRange::stepper-size = 15 - - GtkScale::slider-width = 14 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 0 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = @rt_bg_color - bg[ACTIVE] = shade (0.9, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = darker (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (0.95, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = shade (0.9, @rt_selected_bg_color) - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (1.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_selected_fg_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.9, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (1.35, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (1.45, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - bg[SELECTED] = shade (2.00, @rt_bg_color) - - fg[PRELIGHT] = shade (1.30, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - xthickness = 2 - ythickness = 2 - - bg[SELECTED] = shade (1.25, @rt_bg_color) - - engine "clearlooks" { - hint = "scrollbar" - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = shade (1.02, @rt_bg_color) - bg[ACTIVE] = shade (0.80, @rt_bg_color) -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-frame" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = shade(1.15, @rt_fg_color) - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (0.93, @rt_tool_bg) - bg[PRELIGHT] = shade (0.85, @rt_tool_bg) - bg[ACTIVE] = shade (0.70, @rt_tool_bg) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = shade(1.15, @rt_fg_color) - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @rt_salt_pinch -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#a0a0a0" - fg[PRELIGHT] = "#d0d0d0" - fg[INSENSITIVE] = "#808080" - - bg[PRELIGHT] = mix(0.75, @rt_selected_bg_color, @rt_bg_color) - - base[NORMAL] = @rt_salt_pinch - base[PRELIGHT] = @rt_salt_pinch - base[INSENSITIVE] = @rt_salt_pinch -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = shade (0.70, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = lighter (@rt_fg_color) - fg[PRELIGHT] = lighter (@rt_fg_color) - fg[ACTIVE] = lighter (@rt_fg_color) - fg[SELECTED] = lighter (@rt_fg_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.25, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-checkbutton" { - - text[NORMAL] = @rt_selected_fg_color - - fg[PRELIGHT] = @rt_fg_color - - bg[SELECTED] = @rt_base_color - bg[PRELIGHT] = @rt_base_color - bg[SELECTED] = @rt_base_color - - engine "clearlooks" - { - hint = "checkbutton" - } -} - -style "clearlooks-treeview" { - - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - bg[NORMAL] = shade (0.80, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkScale" style "clearlooks-scale" -class "GtkVScale" style "clearlooks-vscale" -class "GtkHScale" style "clearlooks-hscale" -class "GtkScrollbar" style "clearlooks-scrollbar" -class "GtkHScrollbar" style "clearlooks-hscrollbar" -class "GtkVScrollbar" style "clearlooks-vscrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-checkbutton" -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Dark" diff --git a/rtdata/themes/25-Gray-Gray.iconset b/rtdata/themes/25-Gray-Gray.iconset deleted file mode 100644 index 99ac20640..000000000 --- a/rtdata/themes/25-Gray-Gray.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Dark diff --git a/rtdata/themes/25-Gray-Purple.gtkrc b/rtdata/themes/25-Gray-Purple.gtkrc deleted file mode 100644 index 5a6fa3fb1..000000000 --- a/rtdata/themes/25-Gray-Purple.gtkrc +++ /dev/null @@ -1,559 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_salt_pinch:#843382\nrt_base_color:#525252\nrt_fg_color:#979797\nrt_tooltip_fg_color:#A0A0A0\nrt_selected_bg_color:#5D235C\nrt_selected_fg_color:#CDCDCD\nrt_text_color:#A2A2A2\nrt_bg_color:#404040\nrt_tooltip_bg_color:#252525\nrt_tool_bg:#3B3B3B\nrt_tool_border:#4D4D4D" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 15 - GtkRange::stepper-size = 15 - - GtkScale::slider-width = 14 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 0 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = @rt_bg_color - bg[ACTIVE] = shade (0.9, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = darker (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (0.95, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = shade (0.9, @rt_selected_bg_color) - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (1.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_selected_fg_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.9, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (1.30, @rt_bg_color) - bg[PRELIGHT] = shade (1.40, @rt_bg_color) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (1.45, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - bg[SELECTED] = shade (2.00, @rt_bg_color) - - fg[PRELIGHT] = shade (1.30, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - xthickness = 2 - ythickness = 2 - - bg[SELECTED] = shade (1.15, @rt_bg_color) - - engine "clearlooks" { - hint = "scrollbar" - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = shade (1.02, @rt_bg_color) - bg[ACTIVE] = shade (0.80, @rt_bg_color) -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-frame" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = shade(1.15, @rt_fg_color) - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (0.93, @rt_tool_bg) - bg[PRELIGHT] = shade (0.85, @rt_tool_bg) - bg[ACTIVE] = shade (0.70, @rt_tool_bg) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = shade(1.15, @rt_fg_color) - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @rt_salt_pinch -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#a0a0a0" - fg[PRELIGHT] = "#d0d0d0" - fg[INSENSITIVE] = "#808080" - - bg[PRELIGHT] = mix(0.75, @rt_selected_bg_color, @rt_bg_color) - - base[NORMAL] = @rt_salt_pinch - base[PRELIGHT] = @rt_salt_pinch - base[INSENSITIVE] = @rt_salt_pinch -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = shade (0.70, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = lighter (@rt_fg_color) - fg[PRELIGHT] = lighter (@rt_fg_color) - fg[ACTIVE] = lighter (@rt_fg_color) - fg[SELECTED] = lighter (@rt_fg_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.25, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-checkbutton" { - - text[NORMAL] = @rt_selected_fg_color - - fg[PRELIGHT] = @rt_fg_color - - bg[SELECTED] = @rt_base_color - bg[PRELIGHT] = @rt_base_color - bg[SELECTED] = @rt_base_color - - engine "clearlooks" - { - hint = "checkbutton" - } -} - -style "clearlooks-treeview" { - - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - bg[NORMAL] = shade (0.80, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkScale" style "clearlooks-scale" -class "GtkVScale" style "clearlooks-vscale" -class "GtkHScale" style "clearlooks-hscale" -class "GtkScrollbar" style "clearlooks-scrollbar" -class "GtkHScrollbar" style "clearlooks-hscrollbar" -class "GtkVScrollbar" style "clearlooks-vscrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-checkbutton" -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Dark" diff --git a/rtdata/themes/25-Gray-Purple.iconset b/rtdata/themes/25-Gray-Purple.iconset deleted file mode 100644 index 99ac20640..000000000 --- a/rtdata/themes/25-Gray-Purple.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Dark diff --git a/rtdata/themes/25-Gray-Red.gtkrc b/rtdata/themes/25-Gray-Red.gtkrc deleted file mode 100644 index 346e80f3c..000000000 --- a/rtdata/themes/25-Gray-Red.gtkrc +++ /dev/null @@ -1,559 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_salt_pinch:#800000\nrt_base_color:#525252\nrt_fg_color:#979797\nrt_tooltip_fg_color:#A0A0A0\nrt_selected_bg_color:#703535\nrt_selected_fg_color:#CDCDCD\nrt_text_color:#A2A2A2\nrt_bg_color:#404040\nrt_tooltip_bg_color:#252525\nrt_tool_bg:#3B3B3B\nrt_tool_border:#4D4D4D" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 15 - GtkRange::stepper-size = 15 - - GtkScale::slider-width = 14 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 0 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = @rt_bg_color - bg[ACTIVE] = shade (0.9, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = darker (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (0.95, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = shade (0.9, @rt_selected_bg_color) - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (1.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_selected_fg_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.9, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (1.30, @rt_bg_color) - bg[PRELIGHT] = shade (1.40, @rt_bg_color) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (1.45, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - bg[SELECTED] = shade (2.00, @rt_bg_color) - - fg[PRELIGHT] = shade (1.30, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - xthickness = 2 - ythickness = 2 - - bg[SELECTED] = shade (1.15, @rt_bg_color) - - engine "clearlooks" { - hint = "scrollbar" - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = shade (1.02, @rt_bg_color) - bg[ACTIVE] = shade (0.80, @rt_bg_color) -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-frame" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = shade(1.15, @rt_fg_color) - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (0.93, @rt_tool_bg) - bg[PRELIGHT] = shade (0.85, @rt_tool_bg) - bg[ACTIVE] = shade (0.70, @rt_tool_bg) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = shade(1.15, @rt_fg_color) - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @rt_salt_pinch -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#a0a0a0" - fg[PRELIGHT] = "#d0d0d0" - fg[INSENSITIVE] = "#808080" - - bg[PRELIGHT] = mix(0.75, @rt_selected_bg_color, @rt_bg_color) - - base[NORMAL] = @rt_salt_pinch - base[PRELIGHT] = @rt_salt_pinch - base[INSENSITIVE] = @rt_salt_pinch -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = shade (0.70, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = lighter (@rt_fg_color) - fg[PRELIGHT] = lighter (@rt_fg_color) - fg[ACTIVE] = lighter (@rt_fg_color) - fg[SELECTED] = lighter (@rt_fg_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.25, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-checkbutton" { - - text[NORMAL] = @rt_selected_fg_color - - fg[PRELIGHT] = @rt_fg_color - - bg[SELECTED] = @rt_base_color - bg[PRELIGHT] = @rt_base_color - bg[SELECTED] = @rt_base_color - - engine "clearlooks" - { - hint = "checkbutton" - } -} - -style "clearlooks-treeview" { - - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - bg[NORMAL] = shade (0.80, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkScale" style "clearlooks-scale" -class "GtkVScale" style "clearlooks-vscale" -class "GtkHScale" style "clearlooks-hscale" -class "GtkScrollbar" style "clearlooks-scrollbar" -class "GtkHScrollbar" style "clearlooks-hscrollbar" -class "GtkVScrollbar" style "clearlooks-vscrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-checkbutton" -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Dark" diff --git a/rtdata/themes/25-Gray-Red.iconset b/rtdata/themes/25-Gray-Red.iconset deleted file mode 100644 index 99ac20640..000000000 --- a/rtdata/themes/25-Gray-Red.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Dark diff --git a/rtdata/themes/37-Gray-Red-Textured.gtkrc b/rtdata/themes/37-Gray-Red-Textured.gtkrc deleted file mode 100644 index ed298e0a2..000000000 --- a/rtdata/themes/37-Gray-Red-Textured.gtkrc +++ /dev/null @@ -1,904 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_salt_pinch:#800000\nrt_base_color:#707070\nrt_fg_color:#A9A9A9\nrt_tooltip_fg_color:#A5A5A5\nrt_selected_bg_color:#562020\nrt_selected_fg_color:#E2E2E2\nrt_text_color:#C0C0C0\nrt_bg_color:#5F5F5F\nrt_tooltip_bg_color:#404040\nrt_tool_bg:#575757\nrt_tool_border:#6F6F6F" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 14 - GtkRange::stepper-size = 10 - - GtkScale::slider-width = 14 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 0 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = shade (0.95, @rt_bg_color) - bg[ACTIVE] = shade (0.7, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = darker (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (1.05, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = @rt_selected_bg_color - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (0.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_selected_fg_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.9, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (0.96, @rt_bg_color) - bg[PRELIGHT] = shade (1.06, @rt_bg_color) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (1.45, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - bg[SELECTED] = shade (2.00, @rt_bg_color) - - fg[PRELIGHT] = shade (1.30, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - - #bg[SELECTED] = shade (1.09, @rt_bg_color) - - engine "pixmap" { - image - { - function = BOX - detail = "trough" - file = "gray_textured/trough2.png" - border = { 6,6,6,6 } - stretch = TRUE - orientation = VERTICAL - } - image - { - function = BOX - detail = "trough" - file = "gray_textured/trough2-h.png" - border = { 6,6,6,6 } - stretch = TRUE - orientation = HORIZONTAL - } - image - { - function = SLIDER - state = NORMAL - file = "gray_textured/slider-h.png" - border = { 6,6,2,2 } - stretch = TRUE - orientation = HORIZONTAL - } - image - { - function = SLIDER - state = PRELIGHT - file = "gray_textured/slider-h-pre.png" - border = { 6,6,2,2 } - stretch = TRUE - orientation = HORIZONTAL - } - image - { - function = SLIDER - state = INSENSITIVE - file = "gray_textured/slider-h-ins.png" - border = { 6,6,2,2 } - stretch = TRUE - orientation = HORIZONTAL - } - image - { - function = SLIDER - state = NORMAL - file = "gray_textured/slider-v.png" - border = { 2, 2, 6, 6 } - stretch = TRUE - orientation = VERTICAL - } - image - { - function = SLIDER - state = PRELIGHT - file = "gray_textured/slider-v-pre.png" - border = { 2, 2, 6, 6 } - stretch = TRUE - orientation = VERTICAL - } - image - { - function = SLIDER - state = INSENSITIVE - file = "gray_textured/slider-v-ins.png" - border = { 2,2,6,6 } - stretch = TRUE - orientation = VERTICAL - } - image - { - function = STEPPER - state = NORMAL - file = "gray_textured/null.png" - border = { 1,1,4,4 } - stretch = TRUE - arrow_direction = UP - overlay_file = "gray_textured/arrow-up.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = PRELIGHT - file = "gray_textured/null.png" - border = { 1,1,4,4 } - stretch = TRUE - arrow_direction = UP - overlay_file = "gray_textured/arrow-up-pre.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = ACTIVE - file = "gray_textured/null.png" - border = { 1,1,4,4 } - stretch = TRUE - arrow_direction = UP - overlay_file = "gray_textured/arrow-up.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = INSENSITIVE - file = "gray_textured/null.png" - border = { 1,1,4,4 } - stretch = TRUE - arrow_direction = UP - overlay_file = "gray_textured/arrow-up-ins.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = NORMAL - file = "gray_textured/null.png" - border = { 1,1,4,4 } - stretch = TRUE - arrow_direction = DOWN - overlay_file = "gray_textured/arrow-down.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = PRELIGHT - file = "gray_textured/null.png" - border = { 1,1,4,4 } - stretch = TRUE - arrow_direction = DOWN - overlay_file = "gray_textured/arrow-down-pre.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = ACTIVE - file = "gray_textured/null.png" - border = { 1,1,4,4 } - stretch = TRUE - arrow_direction = DOWN - overlay_file = "gray_textured/arrow-down.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = INSENSITIVE - file = "gray_textured/null.png" - border = { 1,1,4,4 } - stretch = TRUE - arrow_direction = DOWN - overlay_file = "gray_textured/arrow-down-ins.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = NORMAL - file = "gray_textured/null.png" - border = { 4,4,1,1 } - stretch = TRUE - arrow_direction = RIGHT - overlay_file = "gray_textured/arrow-right.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = PRELIGHT - file = "gray_textured/null.png" - border = { 4,4,1,1 } - stretch = TRUE - arrow_direction = RIGHT - overlay_file = "gray_textured/arrow-right-pre.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = ACTIVE - file = "gray_textured/null.png" - border = { 4,4,1,1 } - stretch = TRUE - arrow_direction = RIGHT - overlay_file = "gray_textured/arrow-right.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = INSENSITIVE - file = "gray_textured/null.png" - border = { 4,4,1,1 } - stretch = TRUE - arrow_direction = RIGHT - overlay_file = "gray_textured/arrow-right-ins.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = NORMAL - file = "gray_textured/null.png" - border = { 4,4,1,1 } - stretch = TRUE - arrow_direction = LEFT - overlay_file = "gray_textured/arrow-left.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = PRELIGHT - file = "gray_textured/null.png" - border = { 4,4,1,1 } - stretch = TRUE - arrow_direction = LEFT - overlay_file = "gray_textured/arrow-left-pre.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = ACTIVE - file = "gray_textured/null.png" - border = { 4,4,1,1 } - stretch = TRUE - arrow_direction = LEFT - overlay_file = "gray_textured/arrow-left.png" - overlay_stretch = FALSE - } - image - { - function = STEPPER - state = INSENSITIVE - file = "gray_textured/null.png" - border = { 4,4,1,1 } - stretch = TRUE - arrow_direction = LEFT - overlay_file = "gray_textured/arrow-left-ins.png" - overlay_stretch = FALSE - } - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-range" { - - engine "pixmap" { - # image - # { - # function = FOCUS - # file = "gray_textured/null.png" - # stretch = TRUE - # } - image - { - function = BOX - detail = "trough" - file = "gray_textured/pbtroughh.png" - border = { 6, 6, 6, 6 } - stretch = TRUE - orientation = HORIZONTAL - } - image - { - function = BOX - detail = "trough" - file = "gray_textured/pbtroughv.png" - border = { 6, 6, 6, 6 } - stretch = TRUE - orientation = VERTICAL - } - image - { - function = SLIDER - state = NORMAL - file = "gray_textured/rangeslider.png" - border = { 6, 6, 6, 6 } - stretch = TRUE - orientation = HORIZONTAL - } - image - { - function = SLIDER - state = PRELIGHT - file = "gray_textured/rangeslider-pre.png" - border = { 6, 6, 6, 6 } - stretch = TRUE - orientation = HORIZONTAL - } - image - { - function = SLIDER - state = ACTIVE - file = "gray_textured/rangeslider-pre.png" - border = { 6, 6, 6, 6 } - stretch = TRUE - orientation = HORIZONTAL - } - image - { - function = SLIDER - state = INSENSITIVE - file = "gray_textured/rangeslider-ins.png" - border = { 6, 6, 6, 6 } - stretch = TRUE - orientation = HORIZONTAL - } - image - { - function = SLIDER - state = NORMAL - file = "gray_textured/rangeslider.png" - border = { 6, 6, 6, 6 } - stretch = TRUE - orientation = VERTICAL - } - image - { - function = SLIDER - state = PRELIGHT - file = "gray_textured/rangeslider-pre.png" - border = { 6, 6, 6, 6 } - stretch = TRUE - orientation = VERTICAL - } - image - { - function = SLIDER - state = ACTIVE - file = "gray_textured/rangeslider-pre.png" - border = { 6, 6, 6, 6 } - stretch = TRUE - orientation = VERTICAL - } - image - { - function = SLIDER - state = INSENSITIVE - file = "gray_textured/rangeslider-ins.png" - border = { 6, 6, 6, 6 } - stretch = TRUE - orientation = VERTICAL - } - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = @rt_bg_color - bg[ACTIVE] = shade (0.85, @rt_bg_color) -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-frame" { - bg[NORMAL] = mix(0.95, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = shade(1.15, @rt_fg_color) - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (0.93, @rt_tool_bg) - bg[PRELIGHT] = shade (0.85, @rt_tool_bg) - bg[ACTIVE] = shade (0.70, @rt_tool_bg) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = shade(1.15, @rt_fg_color) - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @rt_salt_pinch -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#a0a0a0" - fg[PRELIGHT] = "#d0d0d0" - fg[INSENSITIVE] = "#808080" - - bg[PRELIGHT] = mix (0.5, @rt_salt_pinch, @rt_bg_color) - - base[NORMAL] = @rt_salt_pinch - base[PRELIGHT] = @rt_salt_pinch - base[INSENSITIVE] = @rt_salt_pinch -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = @rt_tooltip_bg_color - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = lighter (@rt_fg_color) - fg[PRELIGHT] = lighter (@rt_fg_color) - fg[ACTIVE] = lighter (@rt_fg_color) - fg[SELECTED] = lighter (@rt_fg_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.25, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-checkbutton" { - - text[NORMAL] = @rt_selected_fg_color - - fg[PRELIGHT] = @rt_fg_color - - bg[SELECTED] = @rt_base_color - bg[PRELIGHT] = @rt_base_color - bg[SELECTED] = @rt_base_color - - engine "clearlooks" - { - hint = "checkbutton" - } -} - -style "clearlooks-treeview" { - - # For an unkown reason, shading 7C99AD produce a redish color, so we have to set the value manually - text[ACTIVE] = @rt_selected_fg_color - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - bg[NORMAL] = shade (0.80, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkRange" style "clearlooks-range" -class "GtkScrollbar" style "clearlooks-scrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-checkbutton" -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Dark" diff --git a/rtdata/themes/37-Gray-Red-Textured.iconset b/rtdata/themes/37-Gray-Red-Textured.iconset deleted file mode 100644 index 99ac20640..000000000 --- a/rtdata/themes/37-Gray-Red-Textured.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Dark diff --git a/rtdata/themes/37-Gray-Red.gtkrc b/rtdata/themes/37-Gray-Red.gtkrc deleted file mode 100644 index ad41ce410..000000000 --- a/rtdata/themes/37-Gray-Red.gtkrc +++ /dev/null @@ -1,561 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_salt_pinch:#800000\nrt_base_color:#707070\nrt_fg_color:#A9A9A9\nrt_tooltip_fg_color:#A5A5A5\nrt_selected_bg_color:#562020\nrt_selected_fg_color:#E2E2E2\nrt_text_color:#C0C0C0\nrt_bg_color:#5F5F5F\nrt_tooltip_bg_color:#404040\nrt_tool_bg:#575757\nrt_tool_border:#6F6F6F" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 15 - GtkRange::stepper-size = 15 - - GtkScale::slider-width = 14 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 0 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = shade (0.95, @rt_bg_color) - bg[ACTIVE] = shade (0.7, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = darker (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (1.05, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = @rt_selected_bg_color - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (0.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_selected_fg_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.9, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (1.20, @rt_bg_color) - bg[PRELIGHT] = shade (1.30, @rt_bg_color) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (1.45, @rt_bg_color) - bg[PRELIGHT] = shade (1.70, @rt_bg_color) - bg[SELECTED] = shade (2.00, @rt_bg_color) - - fg[PRELIGHT] = shade (1.30, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - xthickness = 2 - ythickness = 2 - - bg[SELECTED] = shade (1.16, @rt_bg_color) - - engine "clearlooks" { - hint = "scrollbar" - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = @rt_bg_color - bg[ACTIVE] = shade (0.85, @rt_bg_color) -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-frame" { - bg[NORMAL] = mix(0.95, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = shade(1.15, @rt_fg_color) - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (0.93, @rt_tool_bg) - bg[PRELIGHT] = shade (0.85, @rt_tool_bg) - bg[ACTIVE] = shade (0.70, @rt_tool_bg) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = shade(1.15, @rt_fg_color) - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @rt_salt_pinch -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#a0a0a0" - fg[PRELIGHT] = "#d0d0d0" - fg[INSENSITIVE] = "#808080" - - bg[PRELIGHT] = mix (0.5, @rt_salt_pinch, @rt_bg_color) - - base[NORMAL] = @rt_salt_pinch - base[PRELIGHT] = @rt_salt_pinch - base[INSENSITIVE] = @rt_salt_pinch -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = @rt_tooltip_bg_color - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = lighter (@rt_fg_color) - fg[PRELIGHT] = lighter (@rt_fg_color) - fg[ACTIVE] = lighter (@rt_fg_color) - fg[SELECTED] = lighter (@rt_fg_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.25, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-checkbutton" { - - text[NORMAL] = @rt_selected_fg_color - - fg[PRELIGHT] = @rt_fg_color - - bg[SELECTED] = @rt_base_color - bg[PRELIGHT] = @rt_base_color - bg[SELECTED] = @rt_base_color - - engine "clearlooks" - { - hint = "checkbutton" - } -} - -style "clearlooks-treeview" { - - # For an unkown reason, shading 7C99AD produce a redish color, so we have to set the value manually - text[ACTIVE] = @rt_selected_fg_color - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - bg[NORMAL] = shade (0.80, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkScale" style "clearlooks-scale" -class "GtkVScale" style "clearlooks-vscale" -class "GtkHScale" style "clearlooks-hscale" -class "GtkScrollbar" style "clearlooks-scrollbar" -class "GtkHScrollbar" style "clearlooks-hscrollbar" -class "GtkVScrollbar" style "clearlooks-vscrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-checkbutton" -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Dark" diff --git a/rtdata/themes/37-Gray-Red.iconset b/rtdata/themes/37-Gray-Red.iconset deleted file mode 100644 index 99ac20640..000000000 --- a/rtdata/themes/37-Gray-Red.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Dark diff --git a/rtdata/themes/63-Gray-Cyan.gtkrc b/rtdata/themes/63-Gray-Cyan.gtkrc deleted file mode 100644 index bb94d4678..000000000 --- a/rtdata/themes/63-Gray-Cyan.gtkrc +++ /dev/null @@ -1,544 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_salt_pinch:#95B0DB\nrt_base_color:#dddddd\nrt_fg_color:#0A0A0A\nrt_tooltip_fg_color:#000000\nrt_selected_bg_color:#95B0DB\nrt_selected_fg_color:#FFFFFF\nrt_text_color:#000000\nrt_bg_color:#A1A1A1\nrt_tooltip_bg_color:#F5F5B5\nrt_tool_bg:#a0a0a0\nrt_tool_border:#7d7d7d" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 15 - GtkRange::stepper-size = 15 - - GtkScale::slider-width = 14 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 0 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = @rt_bg_color - bg[ACTIVE] = shade (0.9, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = darker (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (0.95, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = shade (0.9, @rt_selected_bg_color) - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (1.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_selected_fg_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.9, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (1.15, @rt_bg_color) - bg[PRELIGHT] = shade (1.25, @rt_bg_color) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (1.20, @rt_bg_color) - bg[PRELIGHT] = shade (1.40, @rt_bg_color) - bg[SELECTED] = shade (1.65, @rt_bg_color) - - fg[PRELIGHT] = shade (1.30, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - xthickness = 2 - ythickness = 2 - - #bg[NORMAL] = shade (1.07, @rt_bg_color) - - engine "clearlooks" { - hint = "scrollbar" - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = shade (1.05, @rt_bg_color) - bg[ACTIVE] = shade (0.92, @rt_bg_color) -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-frame" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_fg_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (0.95, @rt_bg_color) - bg[PRELIGHT] = shade (1.08, @rt_bg_color) - bg[ACTIVE] = shade (0.80, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - radius = 5.0 - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = @rt_salt_pinch -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#000000" - fg[PRELIGHT] = "#000000" - fg[INSENSITIVE] = mix (0.5, "#000000", @rt_bg_color) - - bg[PRELIGHT] = mix (0.5, @rt_selected_bg_color, @rt_bg_color) - - base[NORMAL] = mix (0.6, @rt_selected_bg_color, @rt_text_color) - base[PRELIGHT] = @rt_selected_fg_color - base[INSENSITIVE] = @rt_selected_bg_color -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = shade (1.2, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = shade (1.40, @rt_bg_color) - fg[PRELIGHT] = shade (1.40, @rt_bg_color) - fg[ACTIVE] = shade (1.40, @rt_bg_color) - fg[SELECTED] = shade (1.40, @rt_bg_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.10, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-treeview" { - - text[ACTIVE] = @rt_text_color - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - bg[NORMAL] = shade (1.2, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkScale" style "clearlooks-scale" -class "GtkVScale" style "clearlooks-vscale" -class "GtkHScale" style "clearlooks-hscale" -class "GtkScrollbar" style "clearlooks-scrollbar" -class "GtkHScrollbar" style "clearlooks-hscrollbar" -class "GtkVScrollbar" style "clearlooks-vscrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Light" diff --git a/rtdata/themes/63-Gray-Cyan.iconset b/rtdata/themes/63-Gray-Cyan.iconset deleted file mode 100644 index c51021175..000000000 --- a/rtdata/themes/63-Gray-Cyan.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Light diff --git a/rtdata/themes/92-Beige-DarkCyan.gtkrc b/rtdata/themes/92-Beige-DarkCyan.gtkrc deleted file mode 100644 index f809e357b..000000000 --- a/rtdata/themes/92-Beige-DarkCyan.gtkrc +++ /dev/null @@ -1,539 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "rt_base_color:#ffffff\nrt_fg_color:#101010\nrt_tooltip_fg_color:#000000\nrt_selected_bg_color:#7C99AD\nrt_selected_fg_color:#ffffff\nrt_text_color:#000000\nrt_bg_color:#EFEBE7\nrt_tooltip_bg_color:#FFFFBF\nrt_tool_bg:#ebe5df\nrt_tool_border:#cbb9a8" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 1 - GtkButton::child-displacement-y = 1 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 4 - GtkToolButton::icon-spacing = 4 - - GtkCheckButton::indicator-size = 14 - - GtkPaned::handle-size = 6 - - GtkRange::trough-border = 0 - GtkRange::slider-width = 15 - GtkRange::stepper-size = 15 - - GtkScale::slider-width = 14 - GtkScale::slider-length = 30 - GtkScale::trough-side-details = 0 - - GtkScrollbar::min-slider-length = 30 - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 2 - GtkToolbar::internal-padding = 1 - GtkTreeView::expander-size = 12 - GtkTreeView::vertical-separator = 0 - GtkTreeView::even_row_color = shade(0.97, @rt_base_color) - GtkTreeView::odd_row_color = shade(0.9, @rt_base_color) - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - WnckTasklist::fade-overlay-rect = 0 - # The following line hints to gecko (and possibly other appliations) - # that the entry should be drawn transparently on the canvas. - # Without this, gecko will fill in the background of the entry. - GtkEntry::honors-transparent-bg-hint = 1 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - - #################### - # Color Definitions - #################### - bg[NORMAL] = @rt_bg_color - bg[PRELIGHT] = shade (1.02, @rt_bg_color) - bg[SELECTED] = @rt_selected_bg_color - bg[INSENSITIVE] = @rt_bg_color - bg[ACTIVE] = shade (0.9, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - text[NORMAL] = @rt_text_color - text[PRELIGHT] = @rt_text_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = darker (@rt_bg_color) - text[ACTIVE] = @rt_selected_fg_color - - base[NORMAL] = @rt_base_color - base[PRELIGHT] = shade (0.95, @rt_bg_color) - base[SELECTED] = @rt_selected_bg_color - base[INSENSITIVE] = @rt_bg_color - base[ACTIVE] = shade (0.9, @rt_selected_bg_color) - - engine "clearlooks" { - colorize_scrollbar = TRUE - reliefstyle = 1 - menubarstyle = 2 - toolbarstyle = 1 - animation = FALSE - radius = 3.0 - # style between CLASSIC, GLOSSY, INVERTED and GUMMY - style = GUMMY - - # Set a hint to disable backward compatibility fallbacks. - hint = "use-hints" - } -} - -style "wide" { - xthickness = 2 - ythickness = 2 -} - -style "wider" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-entry" { - xthickness = 3 - ythickness = 3 - - bg[SELECTED] = mix (0.4, @rt_selected_bg_color, @rt_base_color) - fg[SELECTED] = @rt_text_color - - engine "clearlooks" { - focus_color = shade (0.65, @rt_selected_bg_color) - } -} - -style "clearlooks-paned" { - - bg[PRELIGHT] = shade (0.9, @rt_bg_color) - - engine "clearlooks" { - hint = "paned" - } -} - -style "clearlooks-HSV" { - - engine "clearlooks" { - hint = "HSV" - disable_focus = TRUE - } -} - -style "clearlooks-spinbutton" { - - engine "clearlooks" { - hint = "spinbutton" - } -} - -style "clearlooks-axisadjuster" = "clearlooks-spinbutton" { - # background - base[INSENSITIVE] = @rt_tool_bg - # text - text[INSENSITIVE] = @rt_fg_color -} - -style "clearlooks-framelessspinbutton" { - - # IMPORTANT! - # base[NORMAL] must have the same color than clearlooks.toolContainer / bg[NORMAL] - base[NORMAL] = @rt_tool_bg - base[INSENSITIVE] = @rt_tool_bg - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-scale" { - xthickness = 2 - ythickness = 2 - - bg[NORMAL] = shade (1.15, @rt_bg_color) - bg[PRELIGHT] = shade (1.25, @rt_bg_color) - # when GtkScale::trough-side-details = 1, bg[SELECTED] set the color of the slider background on the left of the knob - #bg[SELECTED] = @rt_bg_color - - engine "clearlooks" { - focus_color = @rt_selected_bg_color - hint = "scale" - } -} - -style "clearlooks-thresholdselector" { - xthickness = 6 - ythickness = 6 - - bg[NORMAL] = @rt_tool_bg - bg[ACTIVE] = shade (1.20, @rt_bg_color) - bg[PRELIGHT] = shade (1.40, @rt_bg_color) - bg[SELECTED] = shade (1.65, @rt_bg_color) - - fg[PRELIGHT] = shade (1.30, @rt_fg_color) -} - -style "clearlooks-vscale" { - - engine "clearlooks" { - hint = "vscale" - } -} - -style "clearlooks-hscale" { - - engine "clearlooks" { - hint = "hscale" - } -} - -style "clearlooks-scrollbar" { - xthickness = 2 - ythickness = 2 - - #bg[SELECTED] = shade (1.50, @rt_bg_color) - - engine "clearlooks" { - hint = "scrollbar" - } -} - -style "clearlooks-hscrollbar" { - - engine "clearlooks" { - hint = "hscrollbar" - } -} - -style "clearlooks-vscrollbar" { - - engine "clearlooks" { - hint = "vscrollbar" - } -} - -style "clearlooks-notebook_bg" { - - bg[NORMAL] = shade (1.02, @rt_bg_color) -} - -style "clearlooks-toolContainer" { - xthickness = 0 - ythickness = 0 - - # IMPORTANT! - # If you modify bg[NORMAL] below, you must set clearlooks-framelessspinbutton -> base[NORMAL] to the very same value - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-separator" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-frame" { - bg[NORMAL] = mix(0.85, @rt_tool_bg, @rt_tool_border) - bg[INSENSITIVE] = mix(0.60, @rt_tool_bg, @rt_tool_border) -} - -style "clearlooks-toolFrame" = "clearlooks-toolContainer" { - bg[NORMAL] = @rt_tool_bg - - fg[NORMAL] = @rt_tool_border - fg[INSENSITIVE] = mix(0.5, @rt_bg_color, @rt_tool_border) -} - -style "clearlooks-toolExpanderBox" { - bg[NORMAL] = @rt_tool_bg - bg[INSENSITIVE] = @rt_tool_bg -} - -style "clearlooks-combobox" { - - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_fg_color - text[SELECTED] = @rt_selected_fg_color - text[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - text[ACTIVE] = @rt_fg_color -} - -style "clearlooks-button" { - - bg[NORMAL] = shade (0.96, @rt_bg_color) - bg[PRELIGHT] = shade (1.06, @rt_bg_color) - bg[ACTIVE] = shade (0.85, @rt_bg_color) - - fg[NORMAL] = @rt_fg_color - fg[PRELIGHT] = @rt_fg_color - fg[SELECTED] = @rt_selected_fg_color - fg[INSENSITIVE] = mix (0.2, @rt_fg_color, @rt_bg_color) - fg[ACTIVE] = @rt_fg_color - - engine "clearlooks" - { - hint = "button" - } -} - -style "clearlooks-histButton" { - - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 3 - ythickness = 3 -} - -style "clearlooks-statusbar" { - - engine "clearlooks" { - hint = "statusbar" - } -} - -style "clearlooks-comboboxentry" { - - engine "clearlooks" { - # Note: - # If you set the appears-as-list option on comboboxes in the theme, - # then you should set this hint on the combobox instead. - hint = "comboboxentry" - } -} - -style "clearlooks-expander" { - xthickness = 3 - ythickness = 3 - - fg[NORMAL] = "#000000" - fg[PRELIGHT] = "#000000" - fg[INSENSITIVE] = mix (0.5, "#000000", @rt_bg_color) - - bg[PRELIGHT] = mix (0.5, @rt_selected_bg_color, @rt_bg_color) - - base[NORMAL] = mix (0.6, @rt_selected_bg_color, @rt_text_color) - base[PRELIGHT] = @rt_selected_fg_color - base[INSENSITIVE] = @rt_selected_bg_color -} - -style "clearlooks-subexpander" = "clearlooks-expander"{ - bg[NORMAL] = @rt_tool_bg -} - -style "clearlooks-menubar" { - - engine "clearlooks" { - hint = "menubar" - } -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 - - bg[NORMAL] = shade (1.08, @rt_bg_color) - - engine "clearlooks" { - radius = 0.0 - } -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 - - fg[PRELIGHT] = @rt_selected_fg_color - text[NORMAL] = @rt_fg_color - text[PRELIGHT] = @rt_selected_fg_color -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::wide-separators = 1 - GtkWidget::separator-width = 1 - GtkWidget::separator-height = 7 -} - -style "clearlooks-frame_title" { - - fg[NORMAL] = lighter (@rt_fg_color) - fg[PRELIGHT] = lighter (@rt_fg_color) - fg[ACTIVE] = lighter (@rt_fg_color) - fg[SELECTED] = lighter (@rt_fg_color) -} - -style "clearlooks-partialPasteHeaderSep" { - - bg[NORMAL] = mix (0.10, @rt_fg_color, @rt_bg_color) -} - -style "clearlooks-treeview" { - - # For an unkown reason, shading 7C99AD produce a redish color, so we have to set the value manually - text[ACTIVE] = @rt_text_color - base[ACTIVE] = mix(0.50, @rt_selected_bg_color, @rt_base_color) - - engine "clearlooks" { - hint = "treeview" - } -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 - - fg[PRELIGHT] = @rt_selected_fg_color - - engine "clearlooks" { - # Explicitly set the radius for the progress bars inside menu items. - radius = 3.0 - - hint = "progressbar" - } -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" = "clearlooks-default" { - xthickness = 2 - ythickness = 1 - - engine "clearlooks" { - radius = 0.0 - hint = "treeview-header" - } -} - -style "clearlooks-tooltips" { - xthickness = 4 - ythickness = 4 - - bg[NORMAL] = @rt_tooltip_bg_color - fg[NORMAL] = @rt_tooltip_fg_color -} - -############################################################################### -# The following part of the gtkrc applies the different styles to the widgets. -############################################################################### - -# The clearlooks-default style is applied to every widget -class "GtkWidget" style "clearlooks-default" - -class "GtkSeparator" style "wide" -class "GtkFrame" style "wide" -class "GtkCalendar" style "wide" -class "GtkCheckButton" style "wider" -class "GtkRadioButton" style "wider" -class "GtkEntry" style "clearlooks-entry" - -class "GtkPaned" style "clearlooks-paned" -class "GtkSpinButton" style "clearlooks-spinbutton" -class "GtkScale" style "clearlooks-scale" -class "GtkVScale" style "clearlooks-vscale" -class "GtkHScale" style "clearlooks-hscale" -class "GtkScrollbar" style "clearlooks-scrollbar" -class "GtkHScrollbar" style "clearlooks-hscrollbar" -class "GtkVScrollbar" style "clearlooks-vscrollbar" - -class "GtkHSV" style "clearlooks-HSV" - -# General matching follows. The order is choosen so that the right styles override -# each other. EG. progressbar needs to be more important than the menu match. -widget_class "*" style "clearlooks-notebook_bg" -# This is not perfect, it could be done better. -# (That is modify *every* widget in the notebook, and change those back that -# we really don't want changed) -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" -widget_class "**" style "clearlooks-notebook_bg" - -widget_class "*." style "clearlooks-combobox" -widget_class "**" style "clearlooks-button" -widget_class "*" style "clearlooks-notebook" -widget_class "**" style "clearlooks-statusbar" - -#widget_class "**" style "clearlooks-comboboxentry" -widget_class "**" style "clearlooks-combobox" - -widget_class "**" style "clearlooks-menubar" -widget_class "**" style "clearlooks-menu" -widget_class "**" style "clearlooks-menu_item" -widget_class "**" style "clearlooks-separator_menu_item" - -widget_class "*." style "clearlooks-frame" -widget_class "*.." style "clearlooks-frame_title" -widget_class "*.*" style "clearlooks-treeview" - -widget_class "*" style "clearlooks-progressbar" - -# Treeview headers (and similar stock GTK+ widgets) -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*.." style "clearlooks-treeview_header" -widget_class "*...*." style "clearlooks-separator" -widget_class "*...*." style "clearlooks-toolExpanderBox" - -widget "*.partialPasteHeader.*" style "clearlooks-frame_title" -widget "*.partialPasteHeaderSep" style "clearlooks-partialPasteHeaderSep" -widget "*.histButton" style "clearlooks-histButton" -widget "*.FramelessSpinButton" style "clearlooks-framelessspinbutton" -widget "*.ThresholdSelector" style "clearlooks-thresholdselector" -widget "*.MyExpanderTitle.*" style "clearlooks-expander" -widget "*.MyExpanderTitle" style "clearlooks-expander" -widget "*.ExpanderBox" style "clearlooks-toolFrame" -widget "*.ExpanderBox.*.MyExpanderTitle" style "clearlooks-subexpander" -widget "*.ExpanderBox.*.MyExpanderTitle.*" style "clearlooks-subexpander" -widget "*.AxisAdjuster" style "clearlooks-axisadjuster" - -# The window of the tooltip is called "gtk-tooltip" -################################################################## -# FIXME: -# This will not work if one embeds eg. a button into the tooltip. -# As far as I can tell right now we will need to rework the theme -# quite a bit to get this working correctly. -# (It will involve setting different priorities, etc.) -################################################################## -widget "gtk-tooltip*" style "clearlooks-tooltips" - -gtk-icon-theme-name="Light" diff --git a/rtdata/themes/92-Beige-DarkCyan.iconset b/rtdata/themes/92-Beige-DarkCyan.iconset deleted file mode 100644 index c51021175..000000000 --- a/rtdata/themes/92-Beige-DarkCyan.iconset +++ /dev/null @@ -1,2 +0,0 @@ -[General] -Iconset=Light diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css new file mode 100644 index 000000000..ff780a4e3 --- /dev/null +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -0,0 +1,875 @@ +/* + This file is part of RawTherapee. + + Copyright (c) 2015-2017 DrSlony + Copyright (c) 2016-2017 Hombre + + RawTherapee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + RawTherapee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with RawTherapee. If not, see . +*/ + +/* Scrollbar stuck workaround */ +scrollbar:not(.overlay-indicator):hover { + min-width: 1px; +} + +* { + color: #AAAAAA; +} + +*:disabled { + color: #666666; +} + +.view:selected { + color: #262626; + background-color: #AAAAAA +} + +/* The Places and Dir browser panels */ +.view, .textview, textview, textview.view { + background-color: #262626; +} +/* The headers of these panels */ +.view .button { + background-color: #363636; + padding: 2px; +} + +window.background { + background-color: #484848; +} + +/*** Window decoration *********************************************************/ +@define-color winHeaderbar rgb(50,50,50); + +:not(.popup):not(tooltip) > decoration { + background-color: #484848; + background-image: none; + border-radius: 5px 5px 0 0; + border: none; + padding: 0; + box-shadow: 0 3px 9px 1px rgba(0, 0, 0, 0.5), 0 0 0 1px #242424; + margin: 10px; +} +headerbar { + background-color: shade(@winHeaderbar,1.12); + box-shadow: inset 0 1px rgba(200,200,200,.13); + background-image: linear-gradient(shade(@winHeaderbar,1.14), shade(@winHeaderbar,.86)); + border-bottom: 1px solid #242424; + border-radius: 5px 5px 0 0; + min-height: 26px; + padding: 1px 5px 0; + margin: 0; +} +.csd #MainNotebook > header.top { + border-top: 1px solid #484848; +} + +/* Window state */ +.maximized > headerbar { + border-radius: 0; +} +/**/ + +/*** End Window decoration *****************************************************/ + +dialog.background { + background-color: #484848; +} + +box, grid { + border-width: 0; + border-style: none; + border-radius: 0; + margin: 1px; + padding: 0; + min-height: 5px; + min-width: 5px; +} + +/* Affects all frames except in the toolbox */ +frame { + border-width: 0; + border-color: #303030; + border-radius: 0; + border-style: solid; + /*border-style: none none none solid;*/ + padding: 0; + margin: 3px 0 ; + background-color: rgba(0,0,0,0.); +} + +/* Create space between frame contents and frame border */ +frame border { + padding: 4px; + border-radius: 4px; + background-color: #383838 +} + +frame > label { + color: #D8D8D8; +} + +tooltip { + background-color: rgba(0,0,0,0.95); + border-style: none; + box-shadow: none; + padding: 0; +} + +grid separator, box separator { + background-color: rgba(0, 0, 0, 0.17); + padding: 0; +} + +grid separator.horizontal, box separator.horizontal { + margin: 0.3em 0.45em; +} + +grid separator.vertical, box separator.vertical { + margin: 0.45em 0.3em; +} + +#FileBrowser { + padding: 2px; + margin: 0px; +} + +#FileCatalog { + background-color: #393939; +} +#FileCatalog:selected { + background-color: #565656; +} + +#BeforeAfterContainer frame { + background-color: #262626; + padding: 0; + margin: 1px; +} + +#BeforeAfterContainer frame border { + border-radius: 0; + margin: 0; + padding: 0; +} + + +/* Frames in the toolbox. Not MyExpander frames. */ +eventbox.frame { + border-color: #565656; +} + +scrollbar { + background-color: #303030; +} +scrollbar slider { + background-color: #808080; +} +scrollbar slider:hover { + background-color: #999999; +} + +button { + padding: 0; + min-height: 5px; + min-width: 5px; + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} + +/* Curve mode buttons and drop-downs */ +button:checked.Left { + background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); + background-color: #585858; +} + +button.flat { + background-image: none; +} + +button.flat:checked { + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} + +checkbutton > check { + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} + +radiobutton > radio { + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} + +button:hover , button.flat:hover, checkbutton:hover > check, radiobutton:hover > radio { + background-image: linear-gradient(shade(#343434,1.3), shade(#2E2E2E,1.3), shade(#292929,1.3)); +} + +button.popupbutton-arrow { + min-width: 18px; +} + +/* Save, Cancel, OK ... buttons */ +.dialog-action-area button { + min-height: 24px; + margin-top: 6px; +} +/**/ + +combobox { + min-height: 5px; + min-width: 5px; + margin-left: 2px; +} + +scale { + padding: 0; + min-height: 5px; + margin: 0 7px 0 0; +} + +scale slider { + /* Slider size is min-width x min-height ; margin have to be half of those values, but negative */ + min-width: 12px; + min-height: 12px; + margin: -6px; + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} +scale slider:hover { + background-image: linear-gradient(#444444, #3E3E3E, #393939); +} +scale:disabled slider { + background-image: none; + background-color: #444; + border-color: #282828; +} +scale trough { + margin: 6px 6px; /* have to be half of "scale slider / min-width min-height" */ + background-color: #2A2A2A; +} +scale.fine-tune trough { + margin: 5px; + padding: 1px; +} +scale.fine-tune trough highlight { + margin: -2px; +} +scale:disabled trough { + background-color: #444; + border-color: #282828; +} + +/*.EditorTopPanel .button, .ToolBarPanelFileBrowser .button, .EditorZoomPanel .button {*/ +.button { + padding: 1px; + margin: 1px; + padding: 0; + min-height: 5px; + min-width: 5px; +} + +/* Adjusters */ +.text-button { + padding: 0; +} + +/* Any text-button which is a real button, unlike Slider label */ +.text-button.button { + padding: 4px; +} + +separator { + color: #363636; + margin: 5px; +} + +progressbar.vertical trough { + min-width: 6px; +} +progressbar.vertical trough progress { + min-width: 6px; +} + +progressbar.horizontal trough { + min-height: 6px; +} +progressbar.horizontal trough progress { + min-height: 6px; +} + +progressbar trough { + background-color: #2A2A2A; + border-color: #202020; +} + +notebook header progressbar trough { + background-color: #202020; + border-color: #181818; +} + +.drawingarea { + border-radius: 0; + background-color: #2A2A2A; + border: 1px solid #1D1D1D; +} +.drawingarea:disabled { + background-color: #444; + border-color: #282828; +} + +.drawingarea:selected { + background-color: #565656; + border-radius: 10px; +} + +image { + padding: 1px; +} + +/* Vertical group of buttons in 1 column */ +button.Top { + border-radius: 10px 4px 0 0; + border-style: solid solid none solid; + margin-bottom: 0; +} +button.MiddleV { + border-radius: 0; + border-style: none solid none solid; + margin-top: 0; + margin-bottom: 0; +} +button.Bottom { + border-radius: 0 0 4px 4px; + border-style: none solid solid solid; + margin-top: 0; +} +/* end */ + +/* Horizontal group of buttons in 1 row */ +button.Left { + border-radius: 4px 0 0 4px; + border-style: solid none solid solid; + margin-right: 0; +} +button.MiddleH { + border-radius: 0; + border-style: solid none solid none; + margin-left: 0; + margin-right: 0; +} +button.Right { + border-radius: 0 4px 4px 0; + border-style: solid solid solid none; + margin-left: 0; +} +/* end */ + +/* [1.23[-][+]] */ +entry, spinbutton { + min-height: 10px; + background-color: #262626; +} + +spinbutton entry { + padding-right: 6px; +} + +entry:disabled, spinbutton:disabled { + background-color: #363636; +} + +entry:hover, spinbutton:hover { + background-color: #565656; +} + +entry:selected { + color: #262626; + background-color: #AAAAAA; +} + +/* Context menus */ +menu { + background-color: #262626; + color: #909090; +} + +/* Context menu item */ +menuitem { + padding: 2px; + margin: 0; + min-height: 10px; +} + +#HistogramPanel { + margin: 0; + padding: 0; +} + +#MyExpander { + margin: 0; + padding: 0; +} +#MyExpander.withScrollbar { + margin-right: 6px; +} + +/* Tool background */ +#ExpanderBox > box, #ExpanderBox > grid { + background-color: #363636; + border-width: 1px; + border-style: solid; + border-radius: 4px; + border-color: #252525; + margin: 0; + padding: 3px; +} + +#ExpanderBox drawingarea { + background-color: #363636; +} + +#ExpanderBox frame, +#ExpanderBox2 frame, +#ExpanderBox3 frame { + padding: 2px 0 0 0; + border-style: none; +} +#ExpanderBox frame > border { + background-color: #3B3B3B; + border-style: solid; + border-width: 1px; + border-radius: 4px; + border-color: #313131; + margin: 3px; + padding: 3px; +} + +#ExpanderBox frame > label, #ExpanderBox frame frame > label, +#ExpanderBox2 frame > label, #ExpanderBox2 frame frame > label, +#ExpanderBox3 frame > label, #ExpanderBox3 frame frame > label { + margin-left: 7pt; + margin-top: 0; +} +#ExpanderBox frame > box, #ExpanderBox frame frame > box, #ExpanderBox frame > grid, #ExpanderBox frame frame > grid, +#ExpanderBox2 frame > box, #ExpanderBox2 frame frame > box, #ExpanderBox2 frame > grid, #ExpanderBox2 frame frame > grid, +#ExpanderBox3 frame > box, #ExpanderBox3 frame frame > box, #ExpanderBox3 frame > grid, #ExpanderBox3 frame frame > grid { + margin: 2px; +} + +#ExpanderBox > box > checkbutton, #ExpanderBox > box > box, #ExpanderBox > grid > checkbutton, #ExpanderBox > box > grid, #ExpanderBox > grid > grid, #ExpanderBox frame > box > grid, #ExpanderBox frame > grid > grid, #ExpanderBox frame > grid > box, +#ExpanderBox2 > box > checkbutton, #ExpanderBox2 > box > box, #ExpanderBox2 > grid > checkbutton, #ExpanderBox2 > box > grid, #ExpanderBox2 > grid > grid, #ExpanderBox2 frame > box > grid, #ExpanderBox2 frame > grid > grid, #ExpanderBox2 frame > grid > box, +#ExpanderBox3 > box > checkbutton, #ExpanderBox3 > box > box, #ExpanderBox3 > grid > checkbutton, #ExpanderBox3 > box > grid, #ExpanderBox3 > grid > grid, #ExpanderBox3 frame > box > grid, #ExpanderBox3 frame > grid > grid, #ExpanderBox3 frame > grid > box { + margin-top: 2px; +} + +#ExpanderBox frame drawingarea { + background-color: #3B3B3B; +} + +#ExpanderBox frame frame > border { + background-color: #414141; + border: 1px solid #373737; + border-radius: 4px; + margin: 3px; + padding: 3px; +} + +#ExpanderBox frame frame drawingarea { + background-color: #414141; +} + +/* Sub-tool (MyExpander) background */ +#ExpanderBox2 > box, #ExpanderBox2 > grid { + background-color: #3B3B3B; + border: 1px solid #2A2A2A; + border-radius: 4px; + margin: 0; + padding: 3px; +} + +#ExpanderBox2 drawingarea { + background-color: #3B3B3B; +} + +#ExpanderBox2 frame > border { + background-color: #414141; + border: 1px solid #373737; + border-radius: 4px; + margin: 3px; + padding: 3px; +} + +#ExpanderBox2 frame drawingarea { + background-color: #414141; +} + +#ExpanderBox2 frame frame > border { + background-color: #474747; + border: 1px solid #3D3D3D; + border-radius: 4px; + margin: 3px; + padding: 3px; +} + +#ExpanderBox2 frame frame drawingarea { + background-color: #474747; +} + +#MyExpanderTitle > box { + margin: 2px 0; + padding: 2px 0; +} + +#MyExpanderTitle label { + color: #CCCCCC; + padding: 0; + margin: 0 3px 0 3px; +} +#MyExpanderTitle:hover { + background-color: #202020; +} +#MyExpanderTitle eventbox:hover image { + background-color: #202020; + border-radius: 3px; +} +#MyExpanderTitle:hover label { + color: #D8D8D8; +} + +#ExpanderBox2 separator, #ExpanderBox3 separator { + color: #292929; +} + +/* Editor tab button */ +#MainNotebook grid label, #MainNotebook grid image { + /* OK */ + padding: 1px; +} + +/* File Browser right side tabs - Toolbox, Inspector, Fast Export, Filter */ +notebook { + padding: 0; + margin: 0; + border-style: none; +} + +notebook header { + box-shadow: none; + background-color: #383838; + border-width: 1px; + border-style: none; + border-color: #262626; + border-radius: 0; + padding: 2px; + margin: 0; +} + +notebook tabs { + padding: 1px; + margin: 0; +} + +notebook tab { + padding: 1px; + margin: 2px; + min-height: 15px; + min-width: 15px; +} + +notebook tab:hover { + background-color: #505050; +} + +notebook tab:active { + padding: 3px; + border-width: 5px; + border-color: #989898; +} + +notebook tab button { + padding: 0 0; + margin: 0 3px; +} + +/* Get rid of shitty notebook header shadow */ +notebook header.top { + border-bottom-style: solid; + padding-bottom: 3px; +} +notebook header.right { + border-left-style: solid; + padding-left: 3px; +} +notebook header.bottom { + border-top-style: solid; + padding-top: 3px; +} +notebook header.left { + border-right-style: solid; + padding-right: 3px; +} + +notebook.frame { + /* OK */ + border-radius: 0; + border-style: none; +} + +/* Pad notebooks, makes the other borders look nicer */ +notebook stack { + /* OK */ + background-color: #484848; + padding: 0; + margin: 0; +} + +paned box, paned grid { + padding: 0; + margin: 0; + border-style: none; +} + +paned > separator { + border-width: 1px; + border-color: #484848; + margin: 0; + padding: 0; +} +paned.horizontal > separator { + min-width: 2px; + border-style: none solid; +} +paned.vertical > separator { + min-height: 2px; + border-style: solid none; +} + +#PlacesPaned { + padding: 0px 0px 5px 5px; +} +#PlacesPaned:first-child { + padding: 0; + margin: 2px 0 4px 4px; +} + +#MainNotebook > header.left tab image { + margin: 0.5em 0 0 0; +} +#MainNotebook > header.top tab image { + margin: 0 0.5em 0 0; +} +#MainNotebook > header.left tab { + margin: 0.5em 0 0.5em 0; +} +#MainNotebook > header.top tab { + margin: 0 0.5em 0 0.5em; +} + +#MainNotebook header { + /* OK */ + background-color: #2A2A2A; + border: 0; + padding: 0; +} +#MainNotebook tabs { + /* OK */ + background-color: #2A2A2A; +} +#MainNotebook tab:hover { + /* OK */ + background-color: #505050; +} +#MainNotebook tab:active { + /* OK */ + border-color: #989898; +} + +#RightNotebook header { + /* OK */ + background-color: #2A2A2A; +} +#RightNotebook tabs { + /* OK */ + background-color: #2A2A2A; + padding-bottom: 5px; +} +#RightNotebook tab:hover { + /* OK */ + background-color: #505050; + color: #D6D6D6; +} +#RightNotebook tab:active { + /* OK */ + border-color: #A5A5A5; +} + +#LabelRightNotebook { + padding: 5px; + margin: 2px; +} + +#ToolPanelNotebook header { + background-color: #383838; + border-color: #262626; + padding: 0; + margin: 0; +} + +#ToolPanelNotebook header tabs { + background-color: #383838; +} + +#ToolPanelNotebook header tab { + padding: 3px; + margin: 0; +} + +/* All tool panels have a frame except for Meta which unlike the rest is a notebook itself. + * So we use CSS to make it look like a frame. */ +#MetaPanelNotebook > stack > box { + border: 1px solid #262626; + background-color: #363636; + border-radius: 0 0 4px 4px; + border-top-style: none; + padding: 0 3px 3px 3px; + margin: 0 5px 5px 5px; +} + +#MetaPanelNotebook header { + border: 1px solid #262626; + background-color: #363636; + border-radius: 4px 4px 0 0; + border-bottom-style: none; + padding: 5px; + margin: 5px 5px 0 5px; +} + +#MetaPanelNotebook > header > tabs { + background-color: #363636; +} + +#MetaPanelNotebook > header tab { + margin: 0 5px; + padding: 5px; +} + +#MetaPanelNotebook textview { + border-radius: 3px; +} + +#MetaPanelNotebook entry, #MetaPanelNotebook scrolledwindow, #MetaPanelNotebook combobox { + margin: 2px 0 2px 0; +} + +#MetaPanelNotebook entry { + padding: 0 1px; +} + +#MetaPanelNotebook label { + padding: 0 5px; +} + +#MetaPanelNotebook text { + border-color: #202020; + background-color: #262626; + border-style: solid; + border-width: 1px; + border-radius: 3px; +} + +#MetaPanelNotebook stack > box > scrolledwindow > viewport { + margin-left: 15px; +} + +#PreviewWindow { + border-style: solid; +} + +/* Decently sized tabs */ +#PrefNotebook tab, #AboutNotebook tab { + padding: 0.8em; +} + +#PrefNotebook, #AboutNotebook { + padding: 0; + margin: 0 0 3pt 0; +} + +#PrefNotebook header, #AboutNotebook header { + padding: 0; + margin: 0; +} + +#PrefNotebook header tabs, #AboutNotebook header tabs { + padding: 0; + margin: 0; +} + +#PrefNotebook stack, #AboutNotebook stack { + padding: 3pt; + margin: 0; +} + +/* Add space between bottom panel and window edge */ +#IopsPanel { + padding: 0 2px 2px; +} + +/* Move places paned (Places and Folders) away from window edges */ +#PlacesPaned { + padding: 5px; +} + +#EditorLeftPaned:first-child { + padding: 0 0 0 3px; +} + +#EditorLeftPaned:last-child { + padding: 10px 0 0 10px; +} + +#EditorRightPaned:last-child { + padding: 0 4px 0 0; +} + +#MainNotebook > header #CloseButton { + padding: 0; + margin: 0 0 0 0.3em; +} +#MainNotebook > header #CloseButton image { + padding: 0; + margin: 0; +} + +#RightNotebook #ToolPanelNotebook stack { + margin: 0px; +} + +#RightNotebook #HistoryPanel { + padding: 4px; +} + +#RightNotebook scrolledwindow { + padding: 4px; +} + + +/* make the "partial profile" dialog a little bit more readable */ +#PartialPasteHeader { + margin: 1.5em 0 0 0; + padding: 0; + font-weight: bold; +} + +#PartialPasteHeaderSep { + background-color: #D8D8D8; +} diff --git a/rtdata/themes/RawTherapee-GTK3-_19.css b/rtdata/themes/RawTherapee-GTK3-_19.css new file mode 100644 index 000000000..8263dd857 --- /dev/null +++ b/rtdata/themes/RawTherapee-GTK3-_19.css @@ -0,0 +1,502 @@ +/* + This file is part of RawTherapee. + + Copyright (c) 2015-2017 DrSlony + Copyright (c) 2016-2017 Hombre + + RawTherapee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + RawTherapee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with RawTherapee. If not, see . +*/ + +* { + color: #AAAAAA; +} + +.view:selected { + color: #262626; + background-color: #AAAAAA +} + +/* The Places and Dir browser panels */ +.view { + background-color: #262626; +} +/* The headers of these panels */ +.view .button { + background-color: #363636; + padding: 2px; +} + +.plainback { + background-color: #404040; +} + +GtkBox { + border-width: 0; + border-style: none; + border-radius: 0; + margin: 0; + padding: 0; +} + +GtkGrid { + margin: 2px; + padding: 0; + border-width: 0; + border-style: none; + border-radius: 0; +} + +/* Affects all frames except in the toolbox */ +GtkFrame { + border-width: 0; + border-color: #303030; + border-radius: 0; + border-style: solid; + /*border-style: none none none solid;*/ + padding: 4px; +} + +GtkFrame > GtkLabel { + color: #D8D8D8; +} + +#FileBrowser { + padding: 10px; + margin: 10px; +} + +/* Frames in Preferences */ +#PrefNotebook GtkFrame { + background-color: #3B3B3B; + border: 1px solid #505050; + border-radius: 4px; +} + +/* Frames in the toolbox. Not MyExpander frames. */ +GtkEventBox .frame { + border-color: #565656; +} + +/*.EditorTopPanel .button, .ToolBarPanelFileBrowser .button, .EditorZoomPanel .button {*/ +.button { + padding: 1px; + margin: 1px; +} + +/* Adjusters */ +.text-button { + padding: 0; +} + +/* Any text-button which is a real button, unlike Slider label */ +.text-button.button { + padding: 4px; +} + +.separator { + color: #363636; +} + +GtkProgressBar { + -GtkProgressBar-min-vertical-bar-width: 10; + -GtkProgressBar-min-horizontal-bar-height: 10; +} + +GtkDrawingArea { + border-radius: 0; + background-color: #363636; + border: 1px solid #252525; +} + +GtkDrawingArea:selected { + background-color: #565656; + border-radius: 10px; +} + +GtkImage { + padding: 1px; +} + + + + + +GtkScale.slider { + margin: 1px; +} +GtkScale.slider:hover { + background-image: linear-gradient(#444444, #3E3E3E, #393939); +} +GtkScale.slider:insensitive { + background-image: none; + background-color: #444; + border-color: #282828; +} +GtkScale.trough { + background-color: #2A2A2A; +} +GtkScale.trough:insensitive { + background-color: #444; + border-color: #282828; +} + + + +GtkLabel { + margin: 0 1px; +} + + +GtkButton { + padding: 0; + margin: 1px; +} +GtkButton, GtkButton.flat:hover { + background-image: linear-gradient(#343434, #2E2E2E, #292929); +} + +GtkButton.flat, GtkCheckButton { + background-image: none; +} + +/* Vertical group of buttons in 1 column */ +GtkButton.Top { + border-radius: 10px 4px 0 0; + border-style: solid solid none solid; + margin-bottom: 0; +} +GtkButton.MiddleV { + border-radius: 0; + border-style: none solid none solid; + margin-top: 0; + margin-bottom: 0; +} +GtkButton.Bottom { + border-radius: 0 0 4px 4px; + border-style: none solid solid solid; + margin-top: 0; +} +/* end */ + +/* Horizontal group of buttons in 1 row */ +GtkButton.Left { + border-radius: 4px 0 0 4px; + border-style: solid none solid solid; + margin-right: 0; +} +GtkButton.MiddleH { + border-radius: 0; + border-style: solid none solid none; + margin-left: 0; + margin-right: 0; +} +GtkButton.Right { + border-radius: 0 4px 4px 0; + border-style: solid solid solid none; + margin-left: 0; +} +/* end */ + +/* [1.23[-][+]] */ +GtkEntry, GtkSpinButton { + background-color: #262626; +} + +GtkEntry:insensitive, GtkSpinButton:insensitive { + background-color: #363636; +} + +GtkEntry:hover, GtkSpinButton:hover { + background-color: #565656; +} + +GtkEntry:selected { + color: #262626; + background-color: #AAAAAA; +} + +/* Context menus */ +GtkMenu { + background-color: #262626; + color: #909090; +} + +/* Context menu item */ +.menuitem { + padding: 2px; +} + +#MyExpander { + margin: 10px; + padding: 5px; +} + +/* Tool background */ +#ExpanderBox { + background-color: #363636; + border-width: 1px; + border-style: solid; + border-radius: 4px; + border-color: #252525; + margin: 9px; + padding: 4px; +} + +#ExpanderBox GtkDrawingArea { + background-color: #363636; +} + +#ExpanderBox GtkFrame { + background-color: #3B3B3B; + border-style: solid; + border-width: 1px; + border-radius: 4px; + border-color: #313131; + margin: 3px; + padding: 2px; +} + +#ExpanderBox GtkFrame GtkDrawingArea { + background-color: #3B3B3B; +} + +#ExpanderBox GtkFrame GtkFrame { + background-color: #414141; + border: 1px solid #373737; + border-radius: 4px; + margin: 3px; + padding: 2px; +} + +#ExpanderBox GtkFrame GtkFrame GtkDrawingArea { + background-color: #414141; +} + +/* Sub-tool (MyExpander) background */ +#ExpanderBox2 { + background-color: #3B3B3B; + border: 1px solid #2A2A2A; + border-radius: 4px; + margin: 9px; + padding: 4px; +} + +#ExpanderBox2 GtkDrawingArea { + background-color: #3B3B3B; +} + +#ExpanderBox2 GtkFrame { + background-color: #414141; + border: 1px solid #373737; + border-radius: 4px; + margin: 3px; + padding: 2px; +} + +#ExpanderBox2 GtkFrame GtkDrawingArea { + background-color: #414141; +} + +#ExpanderBox2 GtkFrame GtkFrame { + background-color: #474747; + border: 1px solid #3D3D3D; + border-radius: 4px; + margin: 3px; + padding: 2px; +} + +#ExpanderBox2 GtkFrame GtkFrame GtkDrawingArea { + background-color: #474747; +} + +#MyExpanderTitle { + margin: 5px; + padding: 3px 1px 3px 1px; + font-size: 120%; +} +#MyExpanderTitle GtkLabel { + color: #CCCCCC; +} +#MyExpanderTitle:hover { + background-color: #202020; +} +#MyExpanderTitle GtkEventBox:hover GtkImage { + background-color: #202020; + border-radius: 3px; +} +#MyExpanderTitle:hover GtkLabel { + color: #D8D8D8; +} + +#ExpanderBox2 GtkSeparator, #ExpanderBox3 GtkSeparator { + color: #292929; +} + +/* Editor tab button */ +#MainNotebook > GtkGrid GtkLabel, #MainNotebook > GtkGrid GtkImage { + /* OK */ + padding: 1px; +} + +/* File Browser right side tabs - Toolbox, Inspector, Fast Export, Filter */ +GtkNotebook tab { + background-color: #383838; + border-width: 1px; + border-style: none; + border-color: #262626; + border-radius: 0; + padding: 3px; +} + +GtkNotebook tab:hover { + background-color: #505050; +} + +GtkNotebook tab:active { + border-width: 5px; + border-color: #989898; +} + +/* Get rid of shitty notebook header shadow */ +GtkNotebook.top tab { + border-bottom-style: solid; + padding-bottom: 8px; +} +GtkNotebook.right tab { + border-left-style: solid; + padding-left: 8px; +} +GtkNotebook.bottom tab { + border-top-style: solid; + padding-top: 8px; +} +GtkNotebook.left tab { + border-right-style: solid; + padding-right: 8px; +} + +/* Get rid of notebook frame border - too many borders */ +GtkNotebook.top.header, GtkNotebook.right.header, GtkNotebook.bottom.header, GtkNotebook.left.header { + box-shadow: none; + border-width: 1px; + border-color: #262626; + border-style: none; + border-radius: 0; + background-color: #383838; + padding: 0; +} +/* Get rid of notebook header border - too many borders */ +GtkNotebook.top.header { + /* OK */ + border-bottom-style: solid; +} +GtkNotebook.right.header { + /* OK */ + border-left-style: solid; +} +GtkNotebook.bottom.header { + /* OK */ + border-top-style: solid; +} +GtkNotebook.left.header { + /* OK */ + border-right-style: solid; +} +GtkNotebook.frame { + /* OK */ + border-radius: 0; + border-style: none; +} + +/* Pad notebooks, makes the other borders look nicer */ +GtkNotebook { + /* OK */ + background-color: #484848; + padding: 0; +} + + +#MainNotebook.header { + /* OK */ + background-color: #2A2A2A; +} +#MainNotebook > tab { + /* OK */ + background-color: #2A2A2A; +} +#MainNotebook > tab:hover { + /* OK */ + background-color: #505050; +} +#MainNotebook > tab:active { + /* OK */ + border-color: #989898; +} + +#RightNotebook.header { + /* OK */ + background-color: #2A2A2A; +} +#RightNotebook > tab { + /* OK */ + background-color: #2A2A2A; +} +#RightNotebook > tab:hover { + /* OK */ + background-color: #505050; +} +#RightNotebook > tab:active { + /* OK */ + border-color: #989898; +} + + +/* All tool panels have a frame except for Meta which unlike the rest is a notebook itself. + * So we use CSS to make it look like a frame. */ +#MetaPanelNotebook.frame { + border: 1px solid #262626; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-top-left-radius: 0; + border-top-right-radius: 0; + border-top-width: 0; +} + +#MetaPanelNotebook.header { + border: 1px solid #262626; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom-width: 0; + padding: 5px; + margin: 5px; +} + +.tooltip { + padding: 0; +} + + +/* make the "partial profile" dialog a little bit more readable */ +#PartialPasteHeader { + margin: 1.5em 0 0 0; + padding: 0; + font-weight: bold; + color: #363636; +} + +#PartialPasteHeaderSep { + color: #D8D8D8; +} diff --git a/rtdata/themes/TooWaBlue - Bright-GTK3-20_.css b/rtdata/themes/TooWaBlue - Bright-GTK3-20_.css new file mode 100644 index 000000000..888533053 --- /dev/null +++ b/rtdata/themes/TooWaBlue - Bright-GTK3-20_.css @@ -0,0 +1,72 @@ +/* + This file is part of RawTherapee. + + Copyright (c) 2016-2017 TooWaBoo + Requires RT 5.0 (Gtk+ >= 3.20) + + RawTherapee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + RawTherapee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with RawTherapee. If not, see . +*/ + + +/*****************************************/ +/**/ @import "TooWaBlue-GTK3-20_.css"; /**/ +/*****************************************/ + +/*** Change me *** rgb(red,green,blue) *** allowed values from 0 to 255 for each color ***/ + +@define-color accent-color rgb(43,119,196); /*** Active color for Lists, Menu, Borders ... * Default: rgb(35,99,166) ***/ +@define-color text-hl-color rgb(255,255,255); /*** Active text color * Default: rgb(210,210,210) ***/ + +@define-color bg-highlighted-text-color rgb(43,119,196); /*** Highlighted text color background* Default: rgb(35,99,166) ***/ +@define-color highlighted-text-color rgb(255,255,255); /*** Highlighted text color * Default: rgb(210,210,210) ***/ + +@define-color bg-image rgb(95,95,95); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ + +@define-color accent-color2 rgb(43,119,196); /*** Scale, Progressbar, Scrollbar, Tabs * Default: rgb(35,99,166) ***/ +@define-color accent-color4 rgb(135,135,135); /*** Slider knob * Default: rgb(115,115,115) ***/ + +@define-color accent-color3 rgb(43,119,196); /*** Selected thumbnail background color * Default: rgb(35,99,166) ***/ +@define-color text-hl-color3 rgb(255,255,255); /*** Selected thumbnail text color * Default: rgb(210,210,210) ***/ + +/*** Change me end *****************************************************************************/ + +@define-color bg-light-grey rgb(115,115,115); +@define-color bg-grey rgb(95,95,95); +@define-color bg-dark-grey rgb(55,55,55); + +@define-color bg-button-hover rgba(0,0,0,.25); +@define-color bg-button-active rgba(0,0,0,.60); + +@define-color winHeaderbar rgb(75,75,75); +@define-color winTitle rgb(210,210,210); + +@define-color bg-tooltip rgb(210,210,210); +@define-color border-tooltip rgb(36,36,36); +@define-color text-tooltip rgb(36,36,36); +/***********************************************/ +@define-color text-color rgb(210,210,210); +@define-color text-tbEntry rgb(230,230,230); +@define-color border-color rgba(255,255,255,.35); +@define-color bg-list-hover rgb(68,68,68); +@define-color bg-scale-entry rgba(0,0,0,.14); +@define-color bg-button-border rgba(0,0,0,.5); +@define-color bg-entry-border rgba(0,0,0,.40); +@define-color view-grid-border rgba(255,255,255,0.25); +@define-color headline-big rgb(210,210,210); +@define-color headline-hl rgb(255,255,255); +@define-color headline-frame rgb(245,245,245); +/*** New Color Variable v2.53 ************************************************************************/ +@define-color fg-disabled rgb(145,145,145); +@define-color bg-tb-spinbutton shade(@bg-grey, 1.3); +/***********************************************************************************************/ diff --git a/rtdata/themes/TooWaBlue - Dark-GTK3-20_.css b/rtdata/themes/TooWaBlue - Dark-GTK3-20_.css new file mode 100644 index 000000000..23e32e1ec --- /dev/null +++ b/rtdata/themes/TooWaBlue - Dark-GTK3-20_.css @@ -0,0 +1,72 @@ +/* + This file is part of RawTherapee. + + Copyright (c) 2016-2017 TooWaBoo + Requires RT 5.0 (Gtk+ >= 3.20) + + RawTherapee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + RawTherapee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with RawTherapee. If not, see . +*/ + + +/*****************************************/ +/**/ @import "TooWaBlue-GTK3-20_.css"; /**/ +/*****************************************/ + +/*** Change me *** rgb(red,green,blue) *** allowed values from 0 to 255 for each color ***/ + +@define-color accent-color rgb(33,82,145); /*** Active color for Lists, Menu, Borders ... * Default: rgb(33,82,145) ***/ +@define-color text-hl-color rgb(200,200,200); /*** Active text color * Default: rgb(200,200,200) ***/ + +@define-color bg-highlighted-text-color rgb(33,82,145); /*** Highlighted text color background* Default: rgb(33,82,145) ***/ +@define-color highlighted-text-color rgb(200,200,200); /*** Highlighted text color * Default: rgb(200,200,200) ***/ + +@define-color bg-image rgb(58,58,58); /*** Image area & File Browser background * Default: rgb(58,58,58) ***/ + +@define-color accent-color2 rgb(33,82,145); /*** Scale, Progressbar, Scrollbar, Tabs * Default: rgb(33,82,145) ***/ +@define-color accent-color4 rgb(98,98,98); /*** Slider knob * Default: rgb(98,98,98) ***/ + +@define-color accent-color3 rgb(33,82,145); /*** Selected thumbnail background color * Default: rgb(33,82,145) ***/ +@define-color text-hl-color3 rgb(200,200,200); /*** Selected thumbnail text color * Default: rgb(200,200,200) ***/ + +/*** Change me end *****************************************************************************/ + +@define-color bg-light-grey rgb(75,75,75); +@define-color bg-grey rgb(58,58,58); +@define-color bg-dark-grey rgb(30,30,30); + +@define-color bg-button-hover rgba(0,0,0,.3); +@define-color bg-button-active rgba(0,0,0,.7); + +@define-color winHeaderbar rgb(50,50,50); +@define-color winTitle rgb(190,190,190); + +@define-color bg-tooltip rgb(170,170,170); +@define-color border-tooltip rgb(36,36,36); +@define-color text-tooltip rgb(36,36,36); +/***********************************************/ +@define-color text-color rgb(176,176,176); +@define-color text-tbEntry rgb(192,192,192); +@define-color border-color rgba(255,255,255,.30); +@define-color bg-list-hover rgb(50,50,50); +@define-color bg-scale-entry rgba(0,0,0,.14); +@define-color bg-button-border rgba(0,0,0,.60); +@define-color bg-entry-border rgba(0,0,0,.40); +@define-color view-grid-border rgba(255,255,255,0.15); +@define-color headline-big rgb(187,187,187); +@define-color headline-hl rgb(215,215,215); +@define-color headline-frame rgb(210,210,210); +/*** New Color Variable v2.53 ************************************************************************/ +@define-color fg-disabled rgb(128,128,128); +@define-color bg-tb-spinbutton shade(@bg-grey, 1.35); +/***********************************************************************************************/ diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css new file mode 100644 index 000000000..e009c6d9a --- /dev/null +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -0,0 +1,1867 @@ +/* + This file is part of RawTherapee. + + Copyright (c) 2016-2017 TooWaBoo + Version 2.53 - requires RT 5.0 (Gtk+ >= 3.20) + + RawTherapee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + RawTherapee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with RawTherapee. If not, see . +*/ + +/*** Change me *** rgb(red,green,blue) *** allowed values from 0 to 255 for each color ***/ + +@define-color accent-color rgb(35,99,166); /*** Active color for Lists, Menu, Borders ... * Default: rgb(35,99,166) ***/ +@define-color text-hl-color rgb(210,210,210); /*** Active text color * Default: rgb(210,210,210) ***/ + +@define-color bg-highlighted-text-color rgb(35,99,166); /*** Highlighted text color background* Default: rgb(35,99,166) ***/ +@define-color highlighted-text-color rgb(210,210,210); /*** Highlighted text color * Default: rgb(210,210,210) ***/ + +@define-color bg-image rgb(75,75,75); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ + +@define-color accent-color2 rgb(35,99,166); /*** Scale, Progressbar, Scrollbar, Tabs * Default: rgb(35,99,166) ***/ +@define-color accent-color4 rgb(115,115,115); /*** Slider knob * Default: rgb(115,115,115) ***/ + +@define-color accent-color3 rgb(35,99,166); /*** Selected thumbnail background color * Default: rgb(35,99,166) ***/ +@define-color text-hl-color3 rgb(210,210,210); /*** Selected thumbnail text color * Default: rgb(210,210,210) ***/ + +/*** Change me end *****************************************************************************/ + +@define-color bg-light-grey rgb(95,95,95); +@define-color bg-grey rgb(75,75,75); +@define-color bg-dark-grey rgb(40,40,40); + +@define-color bg-button-hover rgba(0,0,0,.25); +@define-color bg-button-active rgba(0,0,0,.60); + +@define-color winHeaderbar rgb(55,55,55); +@define-color winTitle rgb(190,190,190); + +@define-color bg-tooltip rgb(185,185,185); +@define-color border-tooltip rgb(40,40,40); +@define-color text-tooltip rgb(40,40,40); +/***********************************************/ +@define-color text-color rgb(186,186,186); +@define-color text-tbEntry rgb(192,192,192); +@define-color border-color rgba(255,255,255,.30); +@define-color bg-list-hover rgb(50,50,50); +@define-color bg-scale-entry rgba(0,0,0,.14); +@define-color bg-button-border rgba(0,0,0,.60); +@define-color bg-entry-border rgba(0,0,0,.40); +@define-color view-grid-border rgba(255,255,255,0.15); +@define-color headline-big rgb(195,195,195); +@define-color headline-hl rgb(230,230,230); +@define-color headline-frame rgb(215,215,215); +/*** New Color Variable v2.53 ************************************************************************/ +@define-color fg-disabled rgb(128,128,128); +@define-color bg-tb-spinbutton shade(@bg-grey, 1.33); +/***********************************************************************************************/ + +* { + color: @text-color; + text-shadow: none; + outline-style: none; /* removes the ugly dashed focus line */ + border-image: none; + transition: none; +} + +*:disabled { + color: @fg-disabled; +} + +#ToolPanelNotebook { + min-width: 24.08334em; +} +#HistoryPanel { + min-width: 18em; +} + +window.background { + background-color: @bg-light-grey; +} +window > box { + padding: 0.41667em; +} +dialog { + background-color: @bg-grey; + border-radius: 0; + -GtkDialog-button-spacing: 6; + -GtkDialog-content-area-spacing: 4; + -GtkDialog-content-area-border: 0; + -GtkDialog-action-area-border: 0; +} +dialog > box { + padding: 0.66667em; +} +messagedialog { + background-color: @bg-light-grey; + border-radius: 0; +} +tooltip { + background-color: @bg-tooltip; + border: 0.08334em solid @border-tooltip; + border-radius: 0.33334em; + padding: 0; + margin: 0; + box-shadow: none; +} +tooltip label { + color: @text-tooltip; +} + +paned { + background-color: @bg-light-grey; +} + +/*?win*/ +#PlacesPaned { + margin: 0; +} + +undershoot { + background-image: none; /* removes the dashed scrollbar line */ +} + +label { + padding: 0; + margin: 0; +} + +.drawingarea:not(.slider) { + background-color: @bg-dark-grey; +} + +/*** Frames ************************************************************************************/ +frame { + border: none; + padding: 0; + margin: 0; + background-color: transparent; + min-height: 0; + min-width: 0; + border-radius: 0; + box-shadow: none; +} + +#BatchQueueButtonsMainContainer frame, +#MyExpander frame, +dialog frame { + margin: 0.16667em 0.5em; +} +/* affects selection list*/ +entry > window > frame, +filechooser frame { + margin: 0; +} + +#PlacesPaned frame { + margin: -8px 0 0; +} + +frame > border { + padding: 0; + border-radius: 0; + border: none; + background-color: transparent; + margin: 0; + min-height: 0; + min-width: 0; + box-shadow: none; +} + +#BatchQueueButtonsMainContainer > frame > border, +#MyExpander frame > border, +dialog frame > border { + padding: 0.5em; + border-radius: 0; + border: 0.08334em solid @border-color; + background-color: transparent; + margin: 0 -0.5em; +} +/* affects selection list*/ +entry > window > frame> border, +filechooser > frame > border { + padding: 0; + border: none; + background-color: transparent; + margin: 0; +} +#PrefNotebook box > frame > border { + padding-top: 0; + padding-bottom: 0.25em; +} + +#BatchQueueButtonsMainContainer frame > label, +#ToolPanelNotebook frame > label, +dialog frame > label { + margin: 0; + padding: 0.16667em 0.5em; +} +#BatchQueueButtonsMainContainer frame > border { + margin-bottom: 0.83334em; +} +#BatchQueueButtonsMainContainer frame:nth-child(3) > border { + padding-left: 0.91667em; +} + +#BatchQueueButtons { + margin-top: 0.66667em; +} + +frame > label { + margin: 0; + padding: 0.5em 0; + color: @headline-frame; +} +frame > checkbutton label{ + color: @headline-frame; +} +/*** end ***************************************************************************************/ + +/*** Lists & Views *****************************************************************************/ +textview.view, treeview.view { + background-color: @bg-dark-grey; + border-color: @view-grid-border; + padding: 0.16667em; + margin: 0; +} +textview:hover, treeview:hover { + background-color: @bg-list-hover; +} +textview:selected, treeview:selected { + color: @text-hl-color; + background-color: @accent-color; + border-top-color: transparent; +} + +#RightNotebook > stack > :nth-child(1) treeview { + border: 0.08334em solid @bg-dark-grey; + border-bottom: none; +} + +#PlacesPaned > box:nth-child(1) treeview { + padding: 0.08334em 0 0.08334em 0.5em; + -gtk-icon-style: symbolic; +} + +#HistoryPanel { + margin-top: 0.5em; +} +#HistoryPanel > border { + margin-top: 1.75em; +} +#HistoryPanel > label { + margin: 0 0 -1.33334em 0; + padding: 0; +} + +#Snapshots > border { + min-height: calc(6.5em + 36px); +} +#Snapshots > label { + margin-bottom: -4px; +} +#Snapshots button { + margin-top: -8px; + margin-bottom: -4px; +} +#Snapshots > box > :nth-child(1) { + margin-bottom: 0.41667em; +} + +#PlacesPaned > box:nth-child(3) > box:nth-child(2), +#PlacesPaned > box:nth-child(1) > :nth-child(1), +#HistoryPanel > border, +#Snapshots > box > :nth-child(1) { + background-color: @bg-dark-grey; + border: 0.08334em solid @bg-dark-grey; +} + +/*Corrects the space of the snapshot view to the paned separator*/ +#Snapshots { + margin-top: -0.33334em; +} +/**/ + +/*** end ***************************************************************************************/ + +/*** Navigator *********************************************************************************/ +#Navigator .drawingarea { + border-top: 0.41667em solid @bg-dark-grey; + border-bottom: 0.25em solid @bg-dark-grey; +} +#Navigator { + background-color: @bg-dark-grey; + padding-bottom: 0.25em; +} +#Navigator box label { + padding: 0.16667em 0; +} + +/*** end ***************************************************************************************/ + +/*** Load - Save dialog ************************************************************************/ +filechooser * { + box-shadow: none; +} +filechooser #pathbarbox { + border: none; + background-color: @bg-dark-grey; + padding: 0.5em; +} + +filechooser box { + border-color: transparent; +} + +filechooser > box > paned > box { + border: 0.08334em solid @bg-dark-grey; + background-color: @bg-dark-grey; +} +filechooser placessidebar { + padding: 0 0.08334em; + background-color: @bg-dark-grey; +} + +filechooser list { + background-color: @bg-dark-grey; + border: none; + box-shadow: none; + padding: 0; + margin: -3px 0 0; +} +filechooser list row { + margin: 0; + padding: 0; + min-height: calc(1.41667em + 8px); +} +filechooser list row label{ + margin: 0; + padding: 0; +} +filechooser list row:hover { + background-color: @bg-list-hover; +} +filechooser list row:selected label, +filechooser list row:selected { + background-color: @accent-color; + color: @text-hl-color; +} +/*** end ***************************************************************************************/ + +/*** Histogram *********************************************************************************/ +#HistogramPanel { + margin: -2px 0; + border: none; +} +#HistogramArea, +#HistogramRGBArea { + border: 0.08334em solid @bg-dark-grey; + background-color: @bg-dark-grey; +} + +#fullButton, +#histButton { + padding: 0.47em 0.41667em; + margin: 0; + border-color: @bg-light-grey; + border-style: solid; + border-width: 0 0 0 0.08334em; + background-color: @bg-dark-grey; + background-image: none; + box-shadow: none; + min-height: 0; + min-width: 0; + border-radius: 0; +} +#fullButton { + padding: 0.47em 0.41667em 0.58334em; +} +#EditorLeftPaned #fullButton, +#EditorLeftPaned #histButton { + border-width: 0 0.08334em 0 0; +} +/*** end ***************************************************************************************/ + +/*** Separator *********************************************************************************/ +separator { + background-color: transparent; +} +grid separator.horizontal, box separator.horizontal { + margin: 0.16667em 0; + padding: 0; +} +grid separator.vertical, box separator.vertical { + margin: 0 0.25em; + padding: 0; +} + +#PlacesPaned .view.separator, +filechooser separator, +dialog separator { + background-color: @border-color; +} +popover separator:not(:only-child) { + margin: 0 0.5em; + background-color: @border-color; +} + +paned.horizontal > separator { + background-color: transparent; + min-width: 0.41667em; + border-left: 0.25em solid @bg-light-grey; + border-right: 0.25em solid @bg-light-grey; + margin: 0 -0.25em; + padding: 0; +} + +paned.vertical > separator { + background-image: image(@bg-dark-grey); + background-color: @bg-light-grey; + min-height: 0.5em; + border-top: 1px solid @bg-light-grey; + border-bottom: 1px solid @bg-light-grey; + margin: 0.25em 0 0; + padding: 0.2em 0 0; +} + +dialog paned.horizontal > separator { + background-color: @bg-grey; + border-color: @bg-grey; + min-width: 0.33334em; +} + +menu separator { + background-color: @view-grid-border; + margin: 0.25em 0.5em; +} + +#Navigator separator { + background-color: @view-grid-border; + margin: 0; + padding: 0; +} + +#EditorTopPanel separator, +#IopsPanel separator, +#FileBrowser separator { + background-color: shade(@bg-light-grey,.75); + margin-top: 0.33334em; + margin-bottom: 0.33334em; +} + +#MyExpander separator { + background-color: @view-grid-border; + margin: 0.33334em 0; +} + +#PlacesPaned .view.separator { + color: @border-color; +} +/*** end****************************************************************************************/ + +/*** PartialPaste ******************************************************************************/ +#PartialPaste { + border-bottom: 0.08334em solid @border-color; + border-top: 0.08334em solid @border-color; + padding-top: 0.5em; + padding-bottom: 0.5em; +} + +#PartialPaste separator.vertical { + margin: 0 0.33334em; + padding: 0; +} + +#PartialPaste separator { /* Struggles with #PartialPasteHeaderSep */ + background-color: @border-color; + margin: 0.16667em 0.5em 0.16667em 1.16667em; +} +#PartialPasteHeaderSep.horizontal { + background-color: rgb(192,192,192); + margin: 0.16667em 0.5em; +} + +#PartialPasteHeader label { + color: @headline-big; + font-weight: bold; +} +#PartialPasteHeader { + margin: 0.5em 0 0 0; + padding: 0; +} +/*** end ***************************************************************************************/ + +/*** Scrollbar *********************************************************************************/ +scrollbar { + background-color: rgba(0,0,0,.40); + border: none; + margin: 0; + padding: 0; +} +scrollbar slider { + background-color: @text-color; + padding: 0; + margin: 0; + border-color: transparent; + border-style: solid; + border-radius: 1em; +} + +scrollbar:not(.overlay-indicator) { + border-color: @bg-dark-grey; + border-style: solid; + background-color: rgba(0,0,0,.30); +} +scrollbar:not(.overlay-indicator).horizontal { + border-width: 0 0.08334em 0.08334em 0.08334em; +} +scrollbar:not(.overlay-indicator).vertical { + border-width: 0.08334em 0.08334em 0.08334em 0; +} +scrollbar:not(.overlay-indicator) slider { + background-color: shade(@text-color, .9); +} + +scrollbar:not(.overlay-indicator).horizontal slider, +scrollbar.horizontal.hovering slider { + min-height: 0.5em; + min-width: 2em; + border-width: 0.25em; +} +scrollbar:not(.overlay-indicator).horizontal.fine-tune slider, +scrollbar.horizontal.hovering.fine-tune slider { + min-height: calc(0.5em - 2px); + border-width: calc(0.25em + 1px); + margin: 0 -1px; +} +scrollbar.horizontal.overlay-indicator:not(.hovering) slider { + min-width: 2em; + min-height: 0.25em; + border-width: 0.08334em; + border-radius: 0.25em; + margin: 0 0.16667em; +} + +scrollbar:not(.overlay-indicator).vertical slider, +scrollbar.vertical.hovering slider { + min-height: 2em; + min-width: 0.5em; + border-width: 0.25em; +} +scrollbar:not(.overlay-indicator).vertical.fine-tune slider, +scrollbar.vertical.hovering.fine-tune slider { + min-width: calc(0.5em - 2px); + border-width: calc(0.25em + 1px); + margin: -1px 0; +} +scrollbar.vertical.overlay-indicator:not(.hovering) slider { + min-width: 0.25em; + min-height: 2em; + border-width: 0.08334em; + border-radius: 0.5em; + margin: 0.16667em 0; +} + +scrollbar:not(.overlay-indicator) slider:hover, +scrollbar slider:hover { + background-color: shade(@accent-color2,1.12); +} + +/* Scrollbar stuck workaround */ +scrollbar:not(.overlay-indicator):hover { + min-width: 1px; +} + +/*** end ***************************************************************************************/ + +/*** Scale**************************************************************************************/ +scale { + padding: 0; + min-height: 1.83334em; + margin: 0 0.25em; +} + +scale slider { + /* Slider size is min-width x min-height; margin have to be half of those values, but negative */ + min-width: 1em; + min-height: 1em; + margin: calc(-0.33334em - 1px); + border-radius: 0.83334em; + background-image: linear-gradient(to bottom, shade (@accent-color4,1.15), shade (@accent-color4,.85)); + border: 0.08334em solid @bg-button-border; + box-shadow: none; +} +scale slider:hover { + background-image: linear-gradient(to bottom, shade (@accent-color4,1.25), shade (@accent-color4,.95)); +} + +scale trough { + margin: 0.5em; /* has to be half of "scale slider / min-width min-height*/ + background-color: @bg-scale-entry; + border: 0.08334em solid @bg-button-border; + box-shadow: inset 0 0.08334em rgba(255, 255, 255, 0.11), 0 0.08334em rgba(242, 242, 242, 0.11); + border-radius: 0.5em; +} +scale:not(:disabled) trough highlight { + background-color: @accent-color2; + border: 0.08334em solid @bg-button-border; + box-shadow: inset 0 0.08334em shade(@accent-color2, 1.3); + border-radius: 0.5em; +} + +scale.fine-tune trough { + margin: calc(0.5em - 1px); + padding: 1px; +} +scale.fine-tune trough highlight { + margin: -2px; +} + +scale:disabled slider, +scale:disabled trough { + background-color: shade(@bg-grey,.9); + box-shadow: none; + background-image: none; +} + +/*** end ***************************************************************************************/ + +/*** Progressbar *******************************************************************************/ +progressbar.vertical { + min-width: 0; + min-height: 9em; +} +progressbar.vertical text { + color: transparent; +} + +progressbar.vertical trough { + min-width: 0.5em; + background-color: transparent; + border-width: 0; +} +progressbar.vertical trough progress { + min-width: 0.5em; + margin: 0 -1px; + background-color: @accent-color2; + border-width: 0; + border-radius: 0.5em; +} + +progressbar.horizontal trough { + min-height: 0.41667em; + background-color: transparent; + border: none; + border-radius: 0.5em; + margin-top: 0.58334em; +} +progressbar.horizontal trough progress { + min-height: 0.41667em; + margin: -1px 0; + background-color: @accent-color2; + border: none; + border-radius: 0.5em; +} + +#IopsPanel progressbar.horizontal trough { + min-height: 0.5em; + background-color: @bg-scale-entry; + border: 0.08334em solid @bg-button-border; + margin-top: 0.25em; +} +#IopsPanel progressbar.horizontal trough progress { + min-height: 0.5em; + margin: -1px 0; + background-color: @accent-color2; + border: none; + border-radius: 0.5em; +} + +/*** end ***************************************************************************************/ + +/*** Notebook **********************************************************************************/ +notebook, +notebook header, +notebook tabs, +notebook tab, +notebook stack { + border-radius: 0; + border: none; + box-shadow: none; + padding: 0; + margin: 0; + min-width: 0; + min-height: 0; +} +notebook header { + background-color: @bg-dark-grey; + padding: 0 0.41667em; +} +notebook header.left { + padding: 0.41667em 0; +} +notebook tabs { + background-color: transparent; +} +notebook header tab { + background-color: transparent; + margin: 0.41667em 0.25em; + padding: 0 0.33334em; +} +notebook header.left tab { + margin: 0.25em 0.41667em; + padding: 0.33334em 0; +} +notebook header tab > grid > image { + min-height: 2.33334em; + min-width: 0; + padding: 0 0.16667em 0 0; + margin: 0; +} +notebook header.left tab > grid > image { + min-height: 0; + min-width: 2.33334em; + padding: 0.16667em 0 0; +} +notebook header tab label { + margin: 0.33334em; +} +notebook header tab:hover label { + color: @headline-hl; +} +notebook header tab:checked { + box-shadow: 0 0.25em @accent-color2; +} +notebook header.left tab:checked { + box-shadow: 0.25em 0 @accent-color2; +} +notebook > header > tabs > arrow { + background-color: transparent; + border-radius: 0.2em; + min-width: 0; + min-height: 0; + padding: 0 0.16667em; + margin: 0.5em 0; +} +notebook > header.left > tabs > arrow { + padding: 0.16667em 0; + margin: 0 0.5em; +} +notebook > header > tabs > arrow:hover { + background-color: rgba(255,255,255,.1); +} +notebook > header > tabs > arrow:active { + background-color: transparent; +} + +notebook stack { + background-color: @bg-light-grey; +} +dialog notebook stack { + background-color: @bg-grey; +} + +/*?win*/ +#MainNotebook > stack { + padding: 0.41667em; +} + +#MainNotebook > stack > :nth-child(2) > box:nth-child(3) { + margin-top: 0.41667em; +} + + +/* Adds a line on top of the notebook as a separtor for the titlebar (only on CSD) */ +dialog.csd #PrefNotebook > header, +dialog.csd #AboutNotebook > header, +window.csd:not(.fullscreen) #MainNotebook > header.top { + border-top: 0.083334em solid rgba(200,200,200,.18); +} +/**/ + +#ToolPanelNotebook > header tabs { + margin-bottom: 0.33334em; +} + +#ToolPanelNotebook > header tab { + margin-left: 0; + margin-right: 0; + padding: 0 0.33334em; +} +#ToolPanelNotebook > header tab + tab { + margin-left: 0.33333em; +} + +#ToolPanelNotebook > header tab image{ + min-height: 2.5em; + min-width: 2em; + padding: 0; + margin: 0; +} + +#RightNotebook > header { + margin: 0 0.41667em 0 0; +} +#RightNotebook > stack { + background-color: @bg-grey; + padding: 0; +} + +#RightNotebook > stack > :nth-child(1) > * > box, +#RightNotebook > stack > :nth-child(4) > * > box { + padding: 0.5em; + border: 0.08334em solid @bg-entry-border; +} + +#PrefNotebook header { + margin: -0.66667em -0.66667em 0.33334em; +} +#AboutNotebook header { + margin: -0.66667em -0.66667em 0.66667em; +} + +#AboutNotebook stack text { + background-color: @bg-dark-grey; +} + +/* All tool panels have a frame except for Meta which unlike the rest is a notebook itself. + * So we use CSS to make it look like a frame. */ + +#MetaPanelNotebook header { + background-color: @bg-grey; + padding: 0.33334em; + margin: 0 0.5em 0; +} +#MetaPanelNotebook > header > tabs { + background-color: @bg-dark-grey; + padding-left: 0.33334em; +} +#MetaPanelNotebook > header tab label{ + margin: 0.08334em; +} + +#MetaPanelNotebook > stack > box { + border: none; + background-color: @bg-grey; + border-radius: 0; + border-top-style: none; + padding: 0 0.33334em 0.25em; + margin: 0 0.5em -0.5em; +} +#MetaPanelNotebook > stack > box:nth-child(1) > scrolledwindow { + margin: 0 0 0.33334em; + padding: 0; +} + +#MetaPanelNotebook > stack > box:nth-child(2) > scrolledwindow > viewport.frame { + padding: 0 0 0 1em; +} + +#MetaPanelNotebook separator { + background-color: @border-color; + margin: 0.16667em 0; +} +#MetaPanelNotebook entry, #MetaPanelNotebook button, #MetaPanelNotebook combobox button { + margin-top: 0; + margin-bottom: 0; + min-height: 1.66667em; + min-width: 0.83334em; +} +#MetaPanelNotebook entry { + padding: 0 0.33334em; + background-color: @bg-dark-grey; + margin: 0; + border-radius: 0; +} + +#MetaPanelNotebook > stack > box:nth-child(2) > scrolledwindow scrolledwindow { + background-color: @bg-dark-grey; + padding: 0; + margin: 0; +} +#MetaPanelNotebook .view { + border: 0.08334em solid @bg-dark-grey; + padding: 0.16667em; + margin: 0; +} +#MetaPanelNotebook textview.view { + background-color: @bg-dark-grey; + padding: 0.08334em 0.33334em; + margin: 0; +} +#MetaPanelNotebook text { + background-color: transparent; + padding: 0; + margin: 0; +} + +#MetaPanelNotebook combobox button { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + border-left: none; +} +#MetaPanelNotebook combobox + button, +#MetaPanelNotebook combobox + button + button { + margin-left: 0.16667em; + min-width: 1.66667em; +} +#MetaPanelNotebook > stack > box > grid > button { + margin-top: 0.08334em; + margin-bottom: 0.08334em; + min-height: 2.16667em; +} + +#MetaPanelNotebook label { + padding: 0.08334em 0; +} + +/*** end ***************************************************************************************/ + +/*** File Browser ******************************************************************************/ +#FileCatalog { + background-color: @bg-image; + border: 0.08334em solid @bg-dark-grey; +} +#FileCatalog:selected { + background-color: @accent-color3; + color: @text-hl-color3; +} + +/*?win*/ +#FileBrowser { + padding: 0; + margin: 0; +} + +#ToolBarPanelFileBrowser { + margin: -2px -1px; + min-height: 0; + min-width: 0; + padding: 0.41667em 0; +} + +#ToolBarPanelFileBrowser > box > button, +#ToolBarPanelFileBrowser > button { + margin: 0 0.08334em; +} +#ToolBarPanelFileBrowser > box > box > button { + min-height: 0.91667em; + min-width: 1.33333em; + padding: 0; + margin: 0.16667em 0 0 0; + border: none; + background-color: transparent; + background-image: none; + box-shadow: none; +} + +#ToolBarPanelFileBrowser entry + button.flat, +#FileBrowser entry + button.flat { + min-height: 1.66667em; + min-width: 1.66667em; + margin: 0 0 0 -1.66667em; + border-radius: 0 0.2em 0.2em 0; + border: 0.08334em solid transparent; + padding: 0; +} +#ToolBarPanelFileBrowser entry, +#FileBrowser entry { + min-height: 1.66667em; + min-width: 12em; + margin: 0 -2px 0 0; + padding: 0 2em 0 0.33334em; +} +#ToolBarPanelFileBrowser label, +#FileBrowser label { + margin: 0 0.33334em 0 0.5em; +} +/*** end ***************************************************************************************/ + +/*** Image Editor ******************************************************************************/ +#EditorRightPaned { + margin: 0; +} + +#BeforeAfterContainer { + background-color: @bg-grey; + border: 0.08334em solid @bg-dark-grey; + border-radius: 0; + padding: 0; + margin: 0.41667em 0; +} +#BeforeAfterContainer > box:nth-child(2) > box:nth-child(2), +#BeforeAfterContainer > box:nth-child(1) > box:nth-child(2){ + border-top: 0.08334em solid @bg-dark-grey; +} +#BeforeAfterContainer > box:nth-child(2){ + border-left: 0.08334em solid @bg-dark-grey; +} + +#BeforeAfterContainer label { + min-height: 2.41667em; + padding: 0 0.5em; +} +/* Small Lock Button */ +#BeforeAfterContainer button { + min-height: 1.66667em; + min-width: 1.75em; + margin: 0.25em; + padding: 0 0 0 0.08334em; +} +/**/ + +#EditorTopPanel { + margin: -2px -2px; + padding: 0; + min-height: 0; +} +#EditorTopPanel button { + margin: 0 0.08334em; + min-height: 2.16667em; + min-width: 2.16667em; +} +/* Removes margin from the last button. Otherwise the filmstrip will cut of the right border. */ +#EditorTopPanel :last-child > button:last-child { + margin-right: 0; +} + +#EditorTopPanel > box:nth-child(9) > button.image-button:not(:nth-child(6)) { + min-width: 0; + padding-left: 0.33334em; + padding-right: 0.33334em; +} + +#EditorTopPanel > box:nth-child(9) > button.image-button:nth-child(6) { + -gtk-icon-shadow: none; +} +#EditorTopPanel > box > box > button { + min-height: 0.625em; + min-width: 0; + margin: 0 0.16667em; + padding: 0 0.16667em; + border: 0.08334em solid transparent; + background-color: transparent; + background-image: none; + box-shadow: none; +} +#EditorTopPanel > box > box > button:hover { + background-color: transparent; + background-image: none; + border: 0.08334em solid transparent; + box-shadow: none; +} +#EditorTopPanel > box > box > button:checked { + background-color: transparent; + background-image: none; + border: 0.08334em solid @bg-button-border; + box-shadow: none; +} + +/*Button editor bottom*/ +#EditorZoomPanel label { + min-width: 4em; + margin: 0; +} +#IopsPanel button.Left image { + padding: 0 2px 0 3px; +} +#EditorZoomPanel button { + margin-left: 0.08334em; + margin-right: 0.08334em; +} +/*** end ***************************************************************************************/ + +/*** Toolbox ***********************************************************************************/ +#ToolPanelNotebook stack { + background-color: @bg-dark-grey; + padding: 0 0 0.5em 0; +} +/*Curve spinbutton background */ +#MyExpander flowbox > flowboxchild { + background-color: transparent; +} +/**/ +#MyExpander .drawingarea:not(.slider) { + border: 0.08334em solid @bg-light-grey; +} +#MyExpander .slider, +#MyExpander .drawingarea:nth-child(2) { + background-image: linear-gradient(to bottom, shade (@accent-color4,1.15), shade (@accent-color4,.85)); + background-color: @accent-color4; + border: 0.08334em solid rgb(15,15,15); +} +#MyExpander .drawingarea:disabled { + background-color: shade(@bg-grey,.85); + border-color: @bg-dark-grey; + background-image: none; +} +#ThresholdAdjuster { + margin: 0.08334em 0 0.16667em 0; +} + +#ToolPanelNotebook scrolledwindow viewport.frame { + padding: 0 0.56em; +} +/* #MyExpander.withScrollbar { + padding: 0 6px; +} + */ + +#MyExpander { + margin: 0; + padding: 0; +} +#ExpanderBox > box, #ExpanderBox > grid { + background-color: @bg-grey; + border: none; + border-radius: 0; + margin: 0; + padding: 0.5em; +} + + /* Sub-tool (MyExpander) */ +#ExpanderBox2 > box, #ExpanderBox2 > grid { + background-color: transparent; + border: 0.08334em solid @border-color; + border-radius: 0; + margin: 0; + padding: 0.5em; +} + +#MyExpanderTitle > box { + margin: 0; + padding: 0.33334em 0; +} + +#MyExpanderTitle label { + color: @headline-big; + padding: 0; + margin: 0 0.25em 0 0.5em; +} + +#MyExpanderTitle:hover label { + color: @headline-hl; +} +/*** end ***************************************************************************************/ + +/*** Context & popups menus *****************************************************************************/ +.popup > decoration { + background-image: none; + border-radius: 0; + border: none; + padding: 0; + margin: 0; + box-shadow: 0 0.25em 0.75em 0.08334em rgba(0, 0, 0, 0.50), 0 0 0 0.08334em @bg-dark-grey; +} + +menu { + background-color: @bg-dark-grey; + border: 0.08334em solid @accent-color; + padding: 0.08334em; + margin: 0; +} +menu > .top, +menu > .top:hover, +menu > .bottom, +menu > .bottom:hover { + background-color: transparent; + border: none; + padding: 0.5em; + min-height: 1.5em; +} + +menuitem { + padding: 0 0.33334em; + margin: 0.08334em; + min-height: 2em; +} +menuitem:hover { + background-color: @accent-color; +} +menuitem:hover > * > *, +menuitem:hover > * { + color: @text-hl-color; +} + +menu image { + min-height: 2em; + padding: 0; + margin: 0 0.33334em 0 0; +} + +/*** Selection popup list (used in filechooser) ***/ +entry > window > frame { + background-color: @bg-dark-grey; +} +entry > window > frame > border { + background-color: @bg-dark-grey; + padding: 0.08334em; + border: 0.08334em solid @accent-color; +} +.csd entry > window > frame > border { + margin: 0.08334em; +} +/* end */ + +/*** end ***************************************************************************************/ + +/*** Popover *** Context menu filechooser ******************************************************/ +.csd popover.background { + box-shadow: 0 1px 6px 1px rgba(0, 0, 0, 0.5), 0 0 0 1px @bg-dark-grey; +} +popover.background { + background-color: @bg-dark-grey; + border: 0.08334em solid @accent-color; + border-radius: 0; + padding: 0; + margin: 0; +} +popover.background > box { + padding: 0; + margin: -9px; +} +popover.background modelbutton { + min-height: 2em; + padding: 0 0.41667em; + margin: 0; + border-radius: 0; +} + +popover.background label { + margin-right: 0.5em; +} +popover.background modelbutton:hover label, +popover.background modelbutton:hover { + background-color: @accent-color; + color: @text-hl-color; +} +/** end ****************************************************************************************/ + +/*** Buttons ***********************************************************************************/ +button { + min-height: 2.16667em; + min-width: 2.16667em; + margin: 0; + padding: 0; /* x */ + border-radius: 0.2em; + border: 0.08334em solid @bg-button-border; + background-color: transparent; + box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.1); + background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); +} +button.flat { + padding: 0;/* x */ +} +button.text-button label { + margin: 0 0.5em;/* x */ +} + +#MainNotebook > header > grid > button, +button.flat { + border: 0.08334em solid transparent; + box-shadow: none; + background-image: none; + background-color: transparent; +} +/* Resetbutton Queue & Save as*/ +dialog scale + button.flat, +scale + button.flat { + min-height: 1.33334em; + min-width: 1.25em; + margin: 0.25em 0 0.16667em 0.16667em; + padding: 0 0 0 0.08334em; + -gtk-icon-shadow: none; +} + +/* Resetbutton */ +#MyExpander button.flat { + min-height: 1.33334em; + min-width: 1.25em; + margin: 0.08334em 0 0.08334em 0.16667em; + padding: 0 0 0 0.08334em; + -gtk-icon-shadow: none; +} + +#MyExpander scale + button.flat { + margin: 0 0 0 0.16667em; +} +#MyExpander image + button.flat { + margin: 0 0 0 0.41667em; +} +#MyExpander spinbutton + button.flat { + margin: 0 0 0 0.16667em; + padding-top: 0.08334em; +} +/**/ + +/* Buttons Curve drawingarea*/ +#MyExpander button.flat + button.flat, +#MyExpander button.flat:first-child { + min-height: 2.16667em; + min-width: 2.16667em; + margin: 0.08334em; + padding: 0; +} +/**/ + +#ToolBarPanelFileBrowser entry + button:hover, +#FileBrowser entry + button:hover, +button.flat:hover, +button:hover { + border-color: @bg-button-border; + box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.1); + background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); + background-color: @bg-button-hover; +} + +#ToolBarPanelFileBrowser entry + button:active, +#FileBrowser entry + button:active, +button.flat:active, +button.flat:checked, +button:active, +button:checked { + border-color: @bg-button-border; + box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.08); + background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); + background-color: @bg-button-active; +} + +/* Add space between connected buttons */ +button.Right, +button.MiddleH { + margin-left: 0.16667em; + border: 0.08334em solid @bg-button-border; +} +/**/ + +/* Applies special styles in main notebook */ +#ProfilePanel { + margin-bottom: -2px; + padding-bottom: 0.41667em; +} +#ProfilePanel combobox { + margin-left: 0.16667em; +} +#PlacesPaned button.Left, +#PlacesPaned button.Right { + margin-top: 3px; +} +#PlacesPaned combobox { + margin-bottom: -3px; +} +/**/ + +/* Button base format for Toolbox and dialogs */ +dialog button, +#MyExpander button, +#BatchQueueButtonsMainContainer button { + min-height: 1.66667em; + min-width: 0; + padding: 0 0.375em; + margin: 0.08334em 0; +} +combobox .combo, +dialog combobox .combo, +#ToolPanelNotebook combobox .combo, +#BatchQueueButtonsMainContainer combobox .combo { + padding: 0 0.208334em; +} +/**/ + +/* Add/remove space between buttons and labels in toolbox*/ +#MyExpander combobox:not(:first-child):not(:only-child), +#MyExpander button:not(.flat).Left, +#MyExpander button:not(.flat) + combobox, +#MyExpander combobox + button:not(.flat), +#MyExpander combobox + combobox +/* Crash +#MyExpander button + label, +#MyExpander combobox + label */ { + margin-left: 0.16667em; +} +#MyExpander label + filechooserbutton, +#MyExpander label + * > button:not(.flat).Left, +#MyExpander label + combobox:not(:first-child):not(:only-child), +#MyExpander label + button:not(.flat):not(spinbutton) { + margin-left: 0.33334em; +} + +buttonbox:not(.dialog-action-area) button{ + margin: 0.08334em 0 0.33334em 0.16667em; +} +#PrefNotebook buttonbox:not(.dialog-action-area) { + margin-right: -5px; +} + +/* Arrow toggle combo button */ +#IopsPanel button:not(.flat).Left + button:not(.flat).Right, +#MyExpander button:not(.flat).Left + button:not(.flat).Right { + border-left: none; + margin-left: 0; + padding-left: 0.33334em; + padding-right: 0.33334em; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +#IopsPanel button:not(.flat).Left, +#MyExpander button:not(.flat).Left { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + min-width: 2.16667em; +} +/**/ + +/**/ +#MyExpander button.text-button label { + margin: 0;/* x */ +} +/* Graduated filter big button */ +#ExpanderBox > box > box:first-child > button:not(.flat):not(.text-button):first-child { + min-height: 2.16667em; + min-width: 2.16667em; + padding: 0; + margin: 0 0 0.5em; +} + +.popupbutton-arrow { + min-width: 0; +} + +button.color { + min-height: 1.16667em; + padding: 0.25em; +} + +/* Save, Cancel, OK ... buttons */ +.dialog-action-area button { + min-height: 2.16667em; + margin-top: 0.33334em; +} +messagedialog .dialog-action-area button { + margin: 0 0.66667em 0.66667em 0.66667em; + min-height: 1.83334em; +} +messagedialog .dialog-action-area button:not(:only-child):nth-child(1) { + margin-right: 0.25em; +} +messagedialog .dialog-action-area button:not(:only-child):nth-child(2) { + margin-left: 0.25em; +} +/**/ + +/* Queue */ +#BatchQueueButtons button { + min-height: 2.16667em; + min-width: 10em; +} +/**/ + +/* View & Filechooser Buttons */ +dialog .view button, +window .view button { + background-color: @bg-dark-grey; + background-image: none; + box-shadow: none; + min-height: 2em; + min-width: 1.33334em; + padding: 0 0.33334em; + margin: 0; +} +dialog .view button.text-button label, +window .view button.text-button label { + margin: 0; +} +window .view button { + border: none; + border-bottom: 0.08334em solid @border-color; +} +dialog .view button { + border: 0.08334em solid @border-color; +} + +.view button:checked, +.view button:hover:not(:active) { + background-image: none; + background-color: @bg-list-hover; +} +.view button:checked label, +.view button:hover:not(:active) label { + color: @headline-hl; +} + +dialog .view header button:not(:first-child):not(:only-child), +window .view header button:not(:first-child):not(:only-child), +.path-bar button:not(:first-child):not(:only-child) { + border-left: none; +} +dialog .view header button, +window .view header button, +.path-bar button { + border-radius: 0; +} + +#pathbarbox button:last-child { + min-height: 2em; + min-width: 2em; + margin: 0; + padding: 0; + } +.path-bar button:first-child { + border-top-left-radius: 0.2em; + border-bottom-left-radius: 0.2em; + min-width: 2em; + margin: 0; + padding: 0; +} +.path-bar button:last-child { + border-top-right-radius: 0.2em; + border-bottom-right-radius: 0.2em; + min-width: 2em; + margin: 0; + padding: 0; +} +.path-bar button label { + margin: 0; + padding: 0 0.33334em; +} +/**/ + +/* Popover Filechooser (Create folder) */ +popover button.text-button { + background-color: @bg-dark-grey; + background-image: none; + border: 0.08334em solid @border-color; + box-shadow: none; + background-image: none; + margin: 0.083334em 0; + min-height: 1.66667em; + padding: 0 0.66667em; +} +popover button.text-button label { + padding: 0; + margin: 0; +} + +popover button.text-button:hover label { + color: @headline-hl; +} +popover button.text-button:hover { + background-color: @bg-list-hover; + +} +popover button.text-button:active label { + color: @text-color; +} +popover button.text-button:active { + background-color: @bg-dark-grey; +} +/**/ + +/* Titlebar & Notebook buttons */ +#MainNotebook > header.top > grid > button { + margin: 0 0 0 0.41667em; +} +#MainNotebook > header.left > grid > button { + margin: 0.41667em 0 0; +} + +headerbar button.titlebutton image { + padding: 0; + margin: 0; +} +headerbar button.titlebutton { + margin: 0 0 0 0.33334em; + background-image: none; + border: 0.08334em solid transparent; + background-color: transparent; + box-shadow: none; + min-width: 1.55em; + min-height: 1.55em; + padding: 0; +} +messagedialog headerbar button.titlebutton { + min-width: 1.25em; + min-height: 1.25em; + margin: 0; +} + +#MainNotebook tab #CloseButton { + padding: 0; + margin: 0.33334em -3px 0.33334em 0.08334em; + min-width: 1.5em; + min-height: 1.5em; +} +#MainNotebook > header > grid > button:hover, +#MainNotebook tab #CloseButton:hover, +headerbar button.titlebutton:hover{ + border-color: rgba(0,0,0,.8); + box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.11); + background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); + background-color: rgba(128, 128, 128,.20); +} +#MainNotebook > header > grid > button:active, +headerbar button.titlebutton:active{ + border-color: rgba(0,0,0,.8); + box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.15); + background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); + background-color: rgba(128, 128, 128,.40); +} +#MainNotebook tab #CloseButton:hover, +headerbar button.titlebutton.close:hover{ + border-color: rgba(0,0,0,.8); + background-image: linear-gradient(to bottom, rgb(180,0,0), rgb(160,0,0) 40%, rgb(130,0,0)); + box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.32); +} +#MainNotebook tab #CloseButton:active, +headerbar button.titlebutton.close:active{ + border-color: rgba(0,0,0,.8); + background-image: linear-gradient(to bottom, rgb(215,0,0), rgb(185,0,0) 40%, rgb(150,0,0)); + box-shadow: inset 0 0.08334em rgba(242, 242, 242, 0.4); +} +/**/ + +/*** end ***************************************************************************************/ + +/*** Ckeckbox & Radio **************************************************************************/ +checkbox, +checkbutton, +radiobutton { + padding: 0; + margin: 0; + min-height: 2em; +} + +check, +radio { + border: calc(0.083334em + 0.18px) solid @text-color; + background-image: none; + background-color: transparent; + margin: 0; + padding: 0; + min-height: 1.16667em; + min-width: 1.16667em; + box-shadow: none; + background-repeat: no-repeat; + -gtk-icon-shadow: none; + color: @text-color; +} +radiobutton label, +checkbutton label { + margin: 0 0.5em; + padding: 0; +} +check { + border-radius: 0.16667em; +} + +radio{ + border-radius: 1.16667em; +} +check:disabled, +radio:disabled { + border-color: @fg-disabled; +} + +frame > checkbutton check{ + margin-left: 0.5em; +} + +#PartialPaste checkbutton:not(#PartialPasteHeader) { + min-height: 1.4em; + margin-left: 1.16667em; +} +#PartialPasteHeader { + min-height: 1.4em; + margin-left: 0.5em; +} + +#MyExpander button + checkbutton:last-child { + margin-left: 0.33334em; +} + +/*** end ***************************************************************************************/ + +/*** Entry & Spinbutton ************************************************************************/ +#MyExpander entry, +entry { + margin: 0.08334em 0; + padding: 0 0.33334em; + min-height: 1.66667em; + min-width: 0; + border-radius: 0.2em; + box-shadow: inset 0.08334em 0.08334em rgba(0, 0, 0, 0.08), 0 0.08334em rgba(242, 242, 242, 0.1); + border: 0.08334em solid @bg-entry-border; + background-color: @bg-scale-entry; +} + +spinbutton { + margin: 0.08334em 0; + padding: 0; + min-height: 1.66667em; + min-width: 0; + border-radius: 0.2em; + background-color: @bg-scale-entry; + border: 0.08334em solid @bg-entry-border; + box-shadow: inset 0.08334em 0.08334em rgba(0, 0, 0, 0.08), 0 0.08334em rgba(242, 242, 242, 0.1); +} + +#MyExpander spinbutton { + margin: 0.16667em 0; + padding: 0; + min-height: 1.33334em; + min-width: 0; + border-top-left-radius: 1.83334em; + border-bottom-left-radius: 1.83334em; + background-color: @bg-tb-spinbutton; + border: 0.08334em solid @bg-button-border; + color: @text-tbEntry; + box-shadow: inset 0.08334em 0.08334em rgba(0, 0, 0, .12), 0 0.08334em rgba(255, 255, 255, 0.12); +} +#MyExpander button + label + spinbutton { + margin: 0.25em 0; /* Needed for Reset & and Auto button height*/ +} +#MyExpander checkbutton + label + spinbutton { + margin: 0.33334em 0; /* Needed for Reset & and Auto checkbox button height*/ +} + +#MyExpander image + spinbutton { + margin-left: 0.25em; +} + +#BatchQueueButtonsMainContainer spinbutton button, +#MyExpander spinbutton button, +spinbutton button { + padding: 0; + margin: 0; + min-height: 0; + min-width: 1.33334em; + background-image: none; + background-color: transparent; + border: none; + border-radius: 0; + box-shadow: none; + -gtk-icon-shadow: none; +} +#MyExpander spinbutton entry, +spinbutton entry { + padding: 0 0.33334em; + margin: 0; + min-height: 0; + min-width: 0; + box-shadow: none; + border: none; + background-color: transparent; +} +#MyExpander spinbutton entry { + padding: 0 0.33334em 0 0.83334em; +} + +#BatchQueueButtonsMainContainer spinbutton button:hover, +#MyExpander spinbutton button:hover, +spinbutton button:hover { + background-color: rgba(0,0,0,0.3); + background-image: none; + border: none; + box-shadow: none; +} +#BatchQueueButtonsMainContainer spinbutton button:active, +#MyExpander spinbutton button:active, +spinbutton button:active { + background-color: rgba(0,0,0,0.5); + background-image: none; + border: none; + box-shadow: none; +} + +#MyExpander entry:disabled, +entry :disabled { + color: rgb(144,144,144); +} + +#MyExpander spinbutton:disabled, +spinbutton:disabled { + background-color: shade(@bg-grey,.9); + color: rgb(144,144,144); + box-shadow: none; + border-color: shade(@bg-entry-border,1.1); +} + + /* Text selection */ +text > selection, +entry > selection { + background-color: transparent; + color: @text-color; +} +text:focus > selection, +entry:focus > selection { + background-color: @bg-highlighted-text-color; + color: @highlighted-text-color; +} + +.view entry { + background-color: @bg-dark-grey; + margin: 0 -2px; + border: 0.08334em solid @accent-color; + box-shadow: none; +} + /* end*/ + +/*** end ***************************************************************************************/ + +/*** Window Layout *****************************************************************************/ +:not(.popup):not(tooltip) > decoration { + background-color: @winHeaderbar; + background-image: none; + border-radius: 0.41667em 0.41667em 0 0; + border: none; + padding: 0; + box-shadow: 0 0.25em 0.75em 0.08334em rgba(0, 0, 0, 0.5), 0 0 0 0.08334em @bg-dark-grey; + margin: 0.83334em; +} +headerbar { + background-color: shade(@winHeaderbar,1.12); + box-shadow: inset 0 0.08334em rgba(200,200,200,.13); + background-image: linear-gradient(shade(@winHeaderbar,1.14), shade(@winHeaderbar,.86)); + border-bottom: 0.08334em solid @bg-dark-grey; + border-radius: 0.41667em 0.41667em 0 0; + min-height: 2.16667em; + padding: 0.08334em 0.41667em 0; + margin: 0; +} +messagedialog headerbar { + min-height: 2em; + +} +headerbar .title{ + color: @winTitle; +} + +/* Window state */ +.maximized > headerbar { + border-radius: 0; +} +/**/ + +/* Window in background */ +:not(.popup):not(tooltip) > decoration:backdrop { + box-shadow: 0 0.25em 0.75em 0.08334em rgba(0, 0, 0, 0.3), 0 0 0 0.08334em @bg-dark-grey; +} +headerbar:backdrop { + box-shadow: none; + background-image: none; +} +headerbar .title:backdrop { + color: alpha(@winTitle,.60); +} +/**/ +/*** end ***************************************************************************************/ diff --git a/rtdata/themes/TooWaBlue-GTK3-_19.css b/rtdata/themes/TooWaBlue-GTK3-_19.css new file mode 100644 index 000000000..530ae3d3a --- /dev/null +++ b/rtdata/themes/TooWaBlue-GTK3-_19.css @@ -0,0 +1,881 @@ +/* + This file is part of RawTherapee. + + Copyright (c) 2016 TooWaBoo (v1.19.5) + Many thanks to the RawTherapee Developer Team for this great piece of software + + RawTherapee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + RawTherapee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with RawTherapee. If not, see . +*/ + +/*** Change me *** rgb(red,green,blue) *** allowed values from 0 to 255 for each color ***/ + +@define-color accent-color rgb(35,99,166); /*** Highlight/selected color for Tab indicator, List, Dropdown menu, Borders ... ***/ +@define-color text-hl-color rgb(210,210,210); /*** Highlight/selected text color ***/ + +@define-color accent-color2 rgb(35,99,166); /*** Slider, Progressbar, Scrollbar ***/ +@define-color accent-color4 rgb(35,99,166); /*** Slider knob ***/ + +@define-color accent-color3 rgb(35,99,166); /*** Selected thumbnail background color ***/ +@define-color text-hl-color3 rgb(210,210,210); /*** Selected thumbnail text color ***/ + +/*** Change me end ************************************************************************/ + +@define-color text-color rgb(180,180,180); +@define-color text-hl-color2 rgb(192,192,192); +@define-color text-tbEntry rgb(192,192,192); +@define-color bg-dark-grey rgb(36,36,36); +@define-color bg-grey rgb(70,70,70); +@define-color bg-light-grey rgb(88,88,88); +@define-color border-color rgba(255,255,255,.25); +@define-color bg-list-hover rgba(255,255,255,.065); +@define-color bg-scale-entry rgba(0,0,0,.14); +@define-color bg-button-border rgba(0,0,0,.48); +@define-color bg-button-border-hover rgba(0,0,0,.58); +@define-color bg-entry-border rgba(0,0,0,.40); +@define-color bg-button-hover rgba(0,0,0,.22); +@define-color bg-spin-button-hover rgba(0,0,0,.25); +@define-color bg-entry-IPTC @bg-dark-grey; +@define-color view-grid-border rgb(64,64,64); + +* { + color: @text-color; + transition: none; + text-shadow: none; + icon-shadow: none; + box-shadow: none; + outline-style: none; /* removes the ugly dotted focus line */ + border-image: none; + -GtkCheckButton-indicator-size: 16; + -GtkCheckMenuItem-indicator-size: 16; + -GtkCheckButton-indicator-spacing: 2; +} + +.undershoot { + background-image: none; /* removes the dotted scrollbar line */ +} +GtkWindow { + background-color: @bg-light-grey; +} +GtkDialog { + background-color: @bg-grey; + -GtkDialog-content-area-spacing: 7; + -GtkDialog-action-area-border: 0; + -GtkDialog-content-area-border: 8; +} + +GtkFontChooser, +GtkColorChooser { + -GtkDialog-action-area-border: 4; + -GtkDialog-content-area-border: 0; +} + +.frame { + border: none; +} +#PrefNotebook > .frame { + border: 1px solid rgba(0,0,0,.50); + border-top: none; +} +#BatchQueueButtonsMainContainer GtkFrame { + padding: 4px 4px 4px 10px; +} + +/*** Add space between buttons and image area***/ +#BeforeAfterContainer GtkFrame { + padding: 2px 0 4px; +} +/*** Add space between before/after image ***/ +#BeforeAfterContainer GtkContainer:nth-child(1) > GtkContainer:nth-child(2) GtkFrame { + padding-right: 14px; +} + +/*** Menu bubble box ***/ +GtkPopover { + background-color: @bg-grey; + border: 1px solid @accent-color; + border-radius: 0; +} + +.menu { + background-color: @bg-dark-grey; + border: 1px solid @accent-color; +} +.menu > .menuitem { + padding: 2px 4px; +} +.menu > .menuitem:hover { + background-color: @accent-color; +} +.menu > .menuitem:hover > * > *, +.menu > .menuitem:hover > * { + color: @text-hl-color; +} + +GtkNotebook { + padding: 4px; + background-color: @bg-light-grey; +} +GtkDialog GtkNotebook { + padding: 2px 0 0; +} +#PrefNotebook { + padding: 4px 8px; +} +#RightNotebook { + padding: 0 0 0 4px; +} + +GtkPaned { + -GtkPaned-handle-size: 4px; + background-color: transparent; +} +.pane-separator { + background-color: @bg-light-grey; +} +GtkDialog .pane-separator { + background-color: @bg-grey; +} + +/*** Separator ***/ +.separator { + color: @bg-light-grey; +} +GtkDialog .separator { + color: @border-color; +} +#RightNotebook .separator { + color: @bg-dark-grey; +} + /*** Navigator ***/ +#Navigator .separator { + color: @view-grid-border; +} +/*** end ***/ + +/*** Background color image area***/ +GtkDrawingArea { + background-color: @bg-grey; + border: 1px solid rgba(0,0,0,.32); +} +/*** Histogram ***/ +#HistogramPanel, +#HistogramArea { + background-color: @bg-dark-grey; + border: none; +} +/*** Histogram RGB-Bar***/ +#HistogramRGBArea { + background-color: rgb(128,128,128); + border: none; +} +/*** Navigator ***/ +#Navigator GtkDrawingArea { + background-color: @bg-dark-grey; + border: 1px solid @bg-dark-grey; +} +#Navigator { + background-color: @bg-dark-grey; + border-top: 156px solid @bg-light-grey; +} + +#RightNotebook GtkDrawingArea { + background-color: @bg-dark-grey; +} + +/*** Label ***/ + .label { + padding: 0 4px; +} + /*** Increase space between labels in navigater ***/ +#Navigator .label { + padding: 6px 0 3px; +} +#Navigator GtkTable .label { + padding: 0 0 4px; +} + /***/ +GtkDialog .label, +#ToolPanelNotebook .label, +.notebook tab .label { + padding: 0 1px; +} +.button .label { + padding: 0; +} + + /*** Add left and right space between frame and labels ***/ +.frame > .label, +#ToolPanelNotebook .frame > .label { + padding: 4px; +} +#BatchQueueButtonsMainContainer GtkFrame:nth-child(3) > .label{ + padding: 2px 0px 4px; +} + +#MyExpanderTitle .label { + padding: 2px 3px; +} +/*** end ***/ + +.tooltip { + border-radius: 0; + padding: 0; +} +.tooltip.background { + background-color: @bg-dark-grey; + border: 1px solid @accent-color; +} + +/*** PartialPaste ***/ +#PartialPaste:nth-child(2) { + background-color: @bg-light-grey; + border: 1px solid rgba(0,0,0,.50); +} +#PartialPaste > .frame { + padding: 8px 10px; +} +#PartialPasteHeaderSep { + color: rgb(192,192,192); +} +#PartialPasteHeader .label { + color: rgb(213,213,213); +} +/*** end ***/ + +/*** Scrollbar ***/ +.scrollbar.trough { + background-color: rgba(0,0,0,.38); + background-image: none; + border: none; +} +.scrollbar.slider:active { + background-color: shade(@accent-color2,1.12); +} + +/*** end ***/ + +/*** Scale & Progressbar ***/ +.scale { + box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(242, 242, 242, 0.1); + -GtkRange-trough-border: 6; + -GtkScale-slider-length: 15; + -GtkRange-slider-width: 15; +} +.scale.trough, +#ToolPanelNotebook .scale.trough { + background-color: @bg-scale-entry; + border-color: @bg-dark-grey; + box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(242, 242, 242, 0.1); +} +.scale.trough.highlight, +#ToolPanelNotebook .scale.trough.highlight { + box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(242, 242, 242, 0.1); + background-image: none; + background-color: @accent-color2; + border: 1px solid @bg-dark-grey; + color: @text-hl-color2; +} +.scale.slider, +#ToolPanelNotebook .scale.slider { + background-image: linear-gradient(to bottom, shade (@accent-color4,1.15), shade (@accent-color4,.85)); + border: 1px solid shade(@bg-dark-grey, 1.25); + box-shadow: none; +} +.scale.fine-tune { + -GtkRange-trough-border: 5; +} +.scale.scale-has-marks-below { + -GtkRange-trough-border: 6; + -GtkScale-slider-length: 6; + -GtkRange-slider-width: 19; +} +.scale.slider.scale-has-marks-below { + border-radius: 0 0 20px 20px; + border: 1px solid @bg-dark-grey; +} +.scale.fine-tune.scale-has-marks-below { + -GtkRange-trough-border: 5; +} +.scale.slider:hover, +#ToolPanelNotebook .scale.slider:hover { + background-image: linear-gradient(to bottom, shade (@accent-color4,1.25), shade (@accent-color4,.95)); +} + +.scale.slider:active, +#ToolPanelNotebook .scale.slider:active { + background-image: linear-gradient(to bottom, shade (@accent-color4,1.25), shade (@accent-color4,.95)); +} + +GtkProgressBar { + -GtkProgressBar-min-vertical-bar-width: 8; + -GtkProgressBar-min-horizontal-bar-height: 8; + -GtkProgressBar-yspacing: 4px; + border-radius: 10px; + box-shadow: inset 0 1px rgba(255, 255, 255, 0.1), 0 1px rgba(242, 242, 242, 0.1); +} +.progressbar { + background-image: none; + background-color: @accent-color2; + border-color: @bg-dark-grey; +} +GtkProgressBar.trough { + background-image: none; + background-color: @bg-scale-entry; +} +#MainNotebook > GtkGrid GtkProgressBar { + box-shadow: none; +} +#MainNotebook > GtkGrid GtkProgressBar.trough { + background-image: none; + background-color: @bg-dark-grey; + border-color: @bg-dark-grey; +} +/*** end ***/ + +/*** Load/Save ***/ +GtkFileChooserWidget { + background-color: @bg-grey; +} +GtkFileChooserWidget > GtkBox { + border-bottom-color: @bg-dark-grey; +} +GtkFileChooserWidget GtkBox { + background-color: transparent; +} +GtkFileChooserWidget GtkListBox * { + padding-top: 1px; + padding-bottom: 1px; +} +GtkFileChooserWidget GtkListBox { + background-color: @bg-dark-grey; +} +GtkFileChooserWidget .list-row * { + padding: 1px 4px; +} +GtkFileChooserWidget .list-row:hover { + background-color: @bg-list-hover; +} +GtkFileChooserWidget .list-row:hover * { + color: @text-hl-color2; +} +GtkFileChooserWidget .list-row:selected { + background-color: @accent-color; +} +GtkFileChooserWidget .list-row:selected * { + color: @text-hl-color; +} +/*** end ***/ + +/*** Tab Bars ***/ +.notebook tab, .notebook.header { + background-color: @bg-dark-grey; + border-color: @bg-dark-grey; +} +#MainNotebook tab { + padding: 5px; +} +.notebook tab.top { + border-width: 0 0 5px 0; +} +.notebook tab.left { + border-width: 0 5px 0 0; +} +#RightNotebook tab.left, +#PrefNotebook tab, +GtkDialog tab { + padding: 9px; +} +#ToolPanelNotebook tab { + padding: 10px 2px 7px; +} +#MetaPanelNotebook tab { + padding: 8px 4px; +} + +.notebook tab:active { + border-color: @accent-color; +} + +/*** end ***/ + +/*** File Browser ***/ +#FileBrowser GtkDrawingArea { + background-color: @bg-grey; +} +#FileBrowser GtkDrawingArea:selected { + background-color: @accent-color3; + color: @text-hl-color3; +} +/*** end ***/ + +/*** Image ***/ +GtkImage { + padding: 0; +} +#MainNotebook > GtkGrid GtkImage { + padding: 1px; +} + +#ToolPanelNotebook GtkImage{ + padding: 0 4px; +} +#MyExpanderTitle GtkImage{ + padding: 0; +} + +#ToolPanelNotebook tab GtkImage, +#ToolPanelNotebook .button GtkImage { + padding: 1px 0; +} + +GtkDialog .button GtkImage{ + padding: 0; +} +GtkFileChooserWidget .button GtkImage{ + padding: 0 4px; +} +/*** end ***/ + +/*** Toolpanel ***/ +#ToolPanelNotebook { + background-color: @bg-dark-grey; + padding: 0; + border-top: 4px solid @bg-dark-grey; +} + +#ToolPanelNotebook GtkScrolledWindow GtkViewport.frame { + padding: 0 4px; +} +#ToolPanelNotebook .separator { + color: transparent; +} +#ToolPanelNotebook GtkFrame, +#PrefNotebook GtkFrame { + border: 1px solid @border-color; + border-radius: 0; + padding: 5px; +} + +#ToolPanelNotebook GtkDrawingArea { + background-color: @bg-dark-grey; + border-color: @bg-light-grey; + color: @text-color; +} +#ToolPanelNotebook GtkDrawingArea { + border-radius: 1px; /* BUG: if 0, scale mini sliders look funny */ +} + +#ExpanderBox #ExpanderBox, +#ExpanderBox2, +#ExpanderBox3 { + border: 1px solid @border-color; +} + +#ExpanderBox, +#ExpanderBox2, +#ExpanderBox3 { + background-color: @bg-grey; + border-radius: 0; +} + +#MyExpanderTitle .label { + color: @text-color; +} +#MyExpanderTitle:hover .label { + color: @text-hl-color2; +} +/*** end ***/ + +/*** View ***/ +.view { + background-color: @bg-dark-grey; + border-color: @view-grid-border; +} +#PrefNotebook .view { + background-color: @bg-grey; +} +#MainNotebook .view.cell:nth-child(2) { + padding: 1px 0px 1px 4px; +} +.view row:hover { + background-color: @bg-list-hover; + color: @text-hl-color2; +} +#PrefNotebook .view row:hover { + background-color: @bg-light-grey; + color: @text-hl-color2; +} +.view row:selected { + color: @text-hl-color; + background-color: @accent-color; +} +#PrefNotebook .view row:selected { + color: @text-hl-color; + background-color: @accent-color; +} +/*** end ***/ + +/*** Metadata ***/ +#MetaPanelNotebook { + padding: 8px 11px 0; +} +#MetaPanelNotebook GtkScrolledWindow GtkViewport.frame { + padding: 8px 10px; +} +#MetaPanelNotebook.frame { + background-color: @bg-grey; + border-bottom: none; + border-top: 4px solid @bg-dark-grey; + border-left: 9px solid @bg-dark-grey; + border-right: 9px solid @bg-dark-grey; +} +#MetaPanelNotebook .separator { + color: @border-color; +} +#MetaPanelNotebook.header { + background-color: @bg-dark-grey; + +} +#MetaPanelNotebook GtkTreeView { + padding: 1px; + background-color: @bg-grey; +} +#MetaPanelNotebook .frame GtkTreeView { + padding: 0px; + background-color: @bg-entry-IPTC; +} +#MetaPanelNotebook GtkTreeView:hover, +#MetaPanelNotebook .frame GtkTreeView:hover { + background-color: @bg-list-hover; + color: @text-hl-color; +} +#MetaPanelNotebook GtkTreeView:selected, +#MetaPanelNotebook .frame GtkTreeView:selected { + color: @text-hl-color; + background-color: @accent-color; +} +#MetaPanelNotebook GtkTextView { + color: @text-color; + background-color: @bg-entry-IPTC; + padding: 2px 4px; +} +/*** end ***/ + +/*** Entry ***/ +.entry { + background-image: none; + background-color: @bg-scale-entry; + border: 1px solid @bg-entry-border; + border-radius: 0; + padding: 2px 4px; + color: @text-color; + box-shadow: inset 1px 1px rgba(0, 0, 0, 0.08), 0 1px rgba(242 , 242, 242, 0.1); +} +#FileBrowser .entry { + padding: 3px 4px; +} +.entry:focused:selected { + color: @text-hl-color; + background-color: @accent-color; +} +.entry:not(:focused):not(:insensitive) {/*Workaround*/ + color: @text-color; + background-color: transparent; +} +.entry:not(:selected):not(:insensitive) { + color: @text-color; + background-color: @bg-scale-entry; +} +#ToolPanelNotebook .entry { + padding: 0 4px 0 8px; + border-radius: 20px 0 0 20px; + background-color: rgba(255,255,255,.12); + border: 1px solid rgba(0,0,0,.46); + color: @text-tbEntry; + box-shadow: inset 1px 1px rgba(0, 0, 0, .12), 0 1px rgba(255 , 255, 255, 0.12); +} +#ToolPanelNotebook .entry:focused:selected { + color: @text-hl-color; + background-color: @accent-color; +} +#ToolPanelNotebook .entry:not(:focused):not(:insensitive) {/*Workaround*/ + color: @text-tbEntry; + background-color: transparent; +} +#ToolPanelNotebook .entry:not(:selected):not(:insensitive) { + color: @text-tbEntry; + background-color: rgba(255,255,255,.12); +} + +#MetaPanelNotebook .entry { + color: @text-color; + background-color: @bg-entry-IPTC; + border: none; + border-radius: 0; + padding: 2px 4px; + box-shadow: none; +} +#MetaPanelNotebook .entry:focused:selected { + color: @text-hl-color; + background-color: @accent-color; + box-shadow: none; +} +#MetaPanelNotebook .entry:not(:focused):not(:insensitive) {/*Workaround*/ + color: @text-color; + background-color: transparent; + box-shadow: none; +} +#MetaPanelNotebook .entry:not(:selected):not(:insensitive) { + color: @text-color; + background-color: @bg-entry-IPTC; + box-shadow: none; +} +/*** end ***/ + +/*** Buttons ***/ +.button { + background-color: transparent; + border: 1px solid @bg-button-border; + border-radius: 0; + padding: 3px 4px; + box-shadow: inset 0 1px rgba(242, 242, 242, 0.1), 0 1px rgba(242, 242, 242, 0.1); + background-image: linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.14) 40%, rgba(0,0,0,.26)); +} +.message-dialog .dialog-action-area .button { + padding: 6px; + } + +.button.Left + .button:not(.image-button).Right { + border-left: none; +} +GtkComboBox .button { + padding: 4px 3px; +} +#ToolPanelNotebook .button, +GtkDialog .button, +#BatchQueueButtonsMainContainer .button { + padding: 0px 3px; +} +#BatchQueueButtons .button { + padding-top: 6px; + padding-bottom: 6px +} +#BeforeAfterContainer .button { + padding: 2px; +} + + /*** Fix: Space between first Retinex Comboboxes ***/ +GtkLabel + GtkComboBox + GtkComboBox { + padding-left: 4px; +} + +.text-button { + padding: 0 2px 0 0; +} +#PartialPaste .text-button { + padding: 0 8px 0 2px; + -GtkCheckButton-indicator-spacing: 1; +} +#ToolPanelNotebook GtkFrame > .text-button { + padding: 0 3px 0 0; +} + +.button.text-button { + padding: 5px 12px; +} +#ToolPanelNotebook .button.text-button, +#PrefNotebook .button.text-button, +GtkFileChooserWidget .button.text-button, +#RightNotebook .button.text-button { + padding: 3px 4px; +} +GtkPopover .button.text-button { + padding: 2px 4px; +} + +.spinbutton .button { + background-image: none; + background-color: transparent; + border: none; + border-radius: 0; + padding: 2px; + box-shadow: none; +} +#ToolPanelNotebook .spinbutton .button { + padding: 0; +} + +.button:hover { + background-color: rgba(0, 0, 0,.18); +} +#ToolPanelNotebook .spinbutton .button:hover { + background-color: @bg-spin-button-hover; +} + +.button:active, +.button:checked { + background-image: linear-gradient(to bottom, rgb(41,41,41), rgb(37,37,37) 40%, rgb(25,25,25)); + background-color: transparent; + border-color: black; +} + +#MainNotebook > GtkGrid .button { + padding: 2px; + border: 4px solid @bg-dark-grey; + background-color: transparent; + background-image: none; + box-shadow: none; +} +#MainNotebook tab .button { + padding: 1px; + border-top: 4px solid @bg-dark-grey; + border-bottom: 4px solid @bg-dark-grey; + border-left: none; + border-right: none; + background-color: transparent; + background-image: none; + box-shadow: none; +} +#MainNotebook > GtkGrid .button:hover, +#MainNotebook tab .button:hover { + background-color: rgba(255,255,255,.20); + box-shadow: inset 0 1px rgba(255, 255, 255, 0.12); + background-image: linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.12) 40%, rgba(0,0,0,.24)); +} +#MainNotebook > GtkGrid .button:active, +#MainNotebook tab .button:active { + background-color: rgba(255,255,255,.27); + box-shadow: inset 0 1px rgba(255, 255, 255, 0.12); + background-image: linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.12) 40%, rgba(0,0,0,.24)); +} +.view .button { + background-color: rgb(20,20,20); + padding: 1px 5px 2px; + background-image: none; + border-color: black; + box-shadow: none; +} +.menu .button.bottom, +.menu .button.bottom:insensitive { + background-color: rgb(20,20,20); + border-color: @accent-color; + border-width: 0 1px 1px 1px; + background-image: none; + box-shadow: none; +} +.menu .button.top, +.menu .button.top:insensitive { + background-color: rgb(20,20,20); + border-color: @accent-color; + border-width: 1px 1px 0 1px; + background-image: none; + box-shadow: none; +} +#fullButton, +#histButton { + padding: 5px; + border: none; + background-color: @bg-dark-grey; + background-image: none; + box-shadow: none; +} +/*** end ***/ + +/*** Check & Radio buttons ***/ +.check, +.check row { + -gtk-icon-source: url("images/twb/checkbox-unchecked.png"); +} +.check:checked, +.check row:checked { + -gtk-icon-source: url("images/twb/checkbox-checked.png"); +} +.check:insensitive, +.check row:insensitive { + -gtk-icon-source: url("images/twb/checkbox-unchecked-disabled.png"); +} +.check:checked:insensitive, +.check row:checked:insensitive { + -gtk-icon-source: url("images/twb/checkbox-checked-disabled.png"); +} +.check:inconsistent, +.check row:inconsistent { + -gtk-icon-source: url("images/twb/checkbox-inconsistent.png"); +} +.check:inconsistent:insensitive, +.check row:inconsistent:insensitive { + -gtk-icon-source: url("images/twb/checkbox-inconsistent-disabled.png"); +} + +.radio, +.radio row { + -gtk-icon-source: url("images/twb/radio-unchecked.png"); +} +.radio:checked, +.radio row:checked { + -gtk-icon-source: url("images/twb/radio-checked.png"); +} +.radio:insensitive, +.radio row:insensitive { + -gtk-icon-source: url("images/twb/radio-unchecked-disabled.png"); +} +.radio:checked:insensitive, +.radio row:checked:insensitive { + -gtk-icon-source: url("images/twb/radio-checked-disabled.png"); +} +.radio:inconsistent, +.radio row:inconsistent { + -gtk-icon-source: url("images/twb/radio-inconsistent.png"); +} +.radio:inconsistent:insensitive, +.radio row:inconsistent:insensitive { + -gtk-icon-source: url("images/twb/radio-inconsistent-disabled.png"); +} +/*** end ***/ + +/*** Disabled Items ***/ + +*:insensitive, +#ToolPanelNotebook *:insensitive { + color: rgb(128,128,128); + box-shadow: none; +} +#ToolPanelNotebook .entry:insensitive { + color: rgb(144,144,144); + background-color: rgba(255,255,255,.06); + box-shadow: none; +} +.button:insensitive { + background-image: none; + background-color: rgba(0,0,0,.10); + border-color: rgba(0,0,0,.30); + box-shadow: none; +} +.spinbutton .button:insensitive { + background-image: none; + background-color: transparent; + border: none; + box-shadow: none; +} +.scale.slider:insensitive, +.scale.trough.highlight:insensitive, +.scale.trough:insensitive, +#ToolPanelNotebook .scale.slider:insensitive, +#ToolPanelNotebook .scale.trough.highlight:insensitive, +#ToolPanelNotebook .scale.trough:insensitive { + background-color: rgb(65,65,65); + box-shadow: none; + background-image: none; +} +/*** end ***/ diff --git a/rtdata/themes/TooWaGrey - Average Surround-GTK3-20_.css b/rtdata/themes/TooWaGrey - Average Surround-GTK3-20_.css new file mode 100644 index 000000000..98ec912b1 --- /dev/null +++ b/rtdata/themes/TooWaGrey - Average Surround-GTK3-20_.css @@ -0,0 +1,72 @@ +/* + This file is part of RawTherapee. + + Copyright (c) 2016-2017 TooWaBoo + Requires RT 5.0 (Gtk+ >= 3.20) + + RawTherapee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + RawTherapee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with RawTherapee. If not, see . +*/ + + +/*****************************************/ +/**/ @import "TooWaBlue-GTK3-20_.css"; /**/ +/*****************************************/ + +/*** Change me *** rgb(red,green,blue) *** allowed values from 0 to 255 for each color ***/ + +@define-color accent-color rgb(110,110,110); /*** Active color for Lists, Menu, Borders ... * Default: rgb(35,99,166) ***/ +@define-color text-hl-color rgb(255,255,255); /*** Active text color * Default: rgb(210,210,210) ***/ + +@define-color bg-highlighted-text-color rgb(49,132,220); /*** Highlighted text color background* Default: rgb(35,99,166) ***/ +@define-color highlighted-text-color rgb(255,255,255); /*** Highlighted text color * Default: rgb(210,210,210) ***/ + +@define-color bg-image rgb(120,120,120); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ + +@define-color accent-color2 rgb(49,132,220); /*** Scale, Progressbar, Scrollbar, Tabs * Default: rgb(35,99,166) ***/ +@define-color accent-color4 rgb(155,155,155); /*** Slider knob * Default: rgb(115,115,115) ***/ + +@define-color accent-color3 rgb(85,85,85); /*** Selected thumbnail background color * Default: rgb(35,99,166) ***/ +@define-color text-hl-color3 rgb(230,230,230); /*** Selected thumbnail text color * Default: rgb(210,210,210) ***/ + +/*** Change me end *****************************************************************************/ + +@define-color bg-light-grey rgb(135,135,135); +@define-color bg-grey rgb(120,120,120); +@define-color bg-dark-grey rgb(85,85,85); + +@define-color bg-button-hover rgba(0,0,0,.15); +@define-color bg-button-active rgba(0,0,0,.5); + +@define-color winHeaderbar rgb(75,75,75); +@define-color winTitle rgb(210,210,210); + +@define-color bg-tooltip rgb(210,210,210); +@define-color border-tooltip rgb(50,50,50); +@define-color text-tooltip rgb(50,50,50); +/***********************************************/ +@define-color text-color rgb(230,230,230); +@define-color text-tbEntry rgb(245,245,245); +@define-color border-color rgba(255,255,255,.35); +@define-color bg-list-hover rgb(95,95,95); +@define-color bg-scale-entry rgba(0,0,0,.14); +@define-color bg-button-border rgba(0,0,0,.45); +@define-color bg-entry-border rgba(0,0,0,.40); +@define-color view-grid-border rgba(255,255,255,0.25); +@define-color headline-big rgb(210,210,210); +@define-color headline-hl rgb(255,255,255); +@define-color headline-frame rgb(245,245,245); +/*** New Color Variable v2.53 ************************************************************************/ +@define-color fg-disabled rgb(180,180,180); +@define-color bg-tb-spinbutton shade(@bg-grey, 1.20); +/***********************************************************************************************/ diff --git a/rtdata/themes/gray_textured/arrow-down-ins.png b/rtdata/themes/gray_textured/arrow-down-ins.png deleted file mode 100644 index 800c23932..000000000 Binary files a/rtdata/themes/gray_textured/arrow-down-ins.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/arrow-down-pre.png b/rtdata/themes/gray_textured/arrow-down-pre.png deleted file mode 100644 index 9923b2912..000000000 Binary files a/rtdata/themes/gray_textured/arrow-down-pre.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/arrow-down.png b/rtdata/themes/gray_textured/arrow-down.png deleted file mode 100644 index 962b2fd5b..000000000 Binary files a/rtdata/themes/gray_textured/arrow-down.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/arrow-left-ins.png b/rtdata/themes/gray_textured/arrow-left-ins.png deleted file mode 100644 index e6e3e8344..000000000 Binary files a/rtdata/themes/gray_textured/arrow-left-ins.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/arrow-left-pre.png b/rtdata/themes/gray_textured/arrow-left-pre.png deleted file mode 100644 index f10f4e271..000000000 Binary files a/rtdata/themes/gray_textured/arrow-left-pre.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/arrow-left.png b/rtdata/themes/gray_textured/arrow-left.png deleted file mode 100644 index 7ea71e8e2..000000000 Binary files a/rtdata/themes/gray_textured/arrow-left.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/arrow-right-ins.png b/rtdata/themes/gray_textured/arrow-right-ins.png deleted file mode 100644 index 54bc784bd..000000000 Binary files a/rtdata/themes/gray_textured/arrow-right-ins.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/arrow-right-pre.png b/rtdata/themes/gray_textured/arrow-right-pre.png deleted file mode 100644 index bdb7e99bd..000000000 Binary files a/rtdata/themes/gray_textured/arrow-right-pre.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/arrow-right.png b/rtdata/themes/gray_textured/arrow-right.png deleted file mode 100644 index 24123dd9a..000000000 Binary files a/rtdata/themes/gray_textured/arrow-right.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/arrow-up-ins.png b/rtdata/themes/gray_textured/arrow-up-ins.png deleted file mode 100644 index b2be1a4ce..000000000 Binary files a/rtdata/themes/gray_textured/arrow-up-ins.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/arrow-up-pre.png b/rtdata/themes/gray_textured/arrow-up-pre.png deleted file mode 100644 index bc5411fa9..000000000 Binary files a/rtdata/themes/gray_textured/arrow-up-pre.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/arrow-up.png b/rtdata/themes/gray_textured/arrow-up.png deleted file mode 100644 index 69befd8dc..000000000 Binary files a/rtdata/themes/gray_textured/arrow-up.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/button-insensitive.png b/rtdata/themes/gray_textured/button-insensitive.png deleted file mode 100644 index fa67fea9a..000000000 Binary files a/rtdata/themes/gray_textured/button-insensitive.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/button-normal.png b/rtdata/themes/gray_textured/button-normal.png deleted file mode 100644 index 573d19a92..000000000 Binary files a/rtdata/themes/gray_textured/button-normal.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/button-normal.xcf b/rtdata/themes/gray_textured/button-normal.xcf deleted file mode 100644 index 6b2b2ddb0..000000000 Binary files a/rtdata/themes/gray_textured/button-normal.xcf and /dev/null differ diff --git a/rtdata/themes/gray_textured/button-prelight.png b/rtdata/themes/gray_textured/button-prelight.png deleted file mode 100644 index 00891f69a..000000000 Binary files a/rtdata/themes/gray_textured/button-prelight.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/button-pressed.png b/rtdata/themes/gray_textured/button-pressed.png deleted file mode 100644 index f49ddd5e9..000000000 Binary files a/rtdata/themes/gray_textured/button-pressed.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/null.png b/rtdata/themes/gray_textured/null.png deleted file mode 100644 index 82b2fb68e..000000000 Binary files a/rtdata/themes/gray_textured/null.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/pbtroughh.png b/rtdata/themes/gray_textured/pbtroughh.png deleted file mode 100644 index b05fddaef..000000000 Binary files a/rtdata/themes/gray_textured/pbtroughh.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/pbtroughv.png b/rtdata/themes/gray_textured/pbtroughv.png deleted file mode 100644 index 2e749620f..000000000 Binary files a/rtdata/themes/gray_textured/pbtroughv.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/rangeslider-ins.png b/rtdata/themes/gray_textured/rangeslider-ins.png deleted file mode 100644 index ee9141c33..000000000 Binary files a/rtdata/themes/gray_textured/rangeslider-ins.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/rangeslider-pre.png b/rtdata/themes/gray_textured/rangeslider-pre.png deleted file mode 100644 index d761d1755..000000000 Binary files a/rtdata/themes/gray_textured/rangeslider-pre.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/rangeslider.png b/rtdata/themes/gray_textured/rangeslider.png deleted file mode 100644 index 208b877a6..000000000 Binary files a/rtdata/themes/gray_textured/rangeslider.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/slider-h-ins.png b/rtdata/themes/gray_textured/slider-h-ins.png deleted file mode 100644 index b4fcdc8f2..000000000 Binary files a/rtdata/themes/gray_textured/slider-h-ins.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/slider-h-pre.png b/rtdata/themes/gray_textured/slider-h-pre.png deleted file mode 100644 index 7f5668cb6..000000000 Binary files a/rtdata/themes/gray_textured/slider-h-pre.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/slider-h.png b/rtdata/themes/gray_textured/slider-h.png deleted file mode 100644 index fb748cce3..000000000 Binary files a/rtdata/themes/gray_textured/slider-h.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/slider-v-ins.png b/rtdata/themes/gray_textured/slider-v-ins.png deleted file mode 100644 index 63754bded..000000000 Binary files a/rtdata/themes/gray_textured/slider-v-ins.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/slider-v-pre.png b/rtdata/themes/gray_textured/slider-v-pre.png deleted file mode 100644 index 266a6d561..000000000 Binary files a/rtdata/themes/gray_textured/slider-v-pre.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/slider-v.png b/rtdata/themes/gray_textured/slider-v.png deleted file mode 100644 index 0039af03d..000000000 Binary files a/rtdata/themes/gray_textured/slider-v.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/trough2-h.png b/rtdata/themes/gray_textured/trough2-h.png deleted file mode 100644 index 7deae8b70..000000000 Binary files a/rtdata/themes/gray_textured/trough2-h.png and /dev/null differ diff --git a/rtdata/themes/gray_textured/trough2.png b/rtdata/themes/gray_textured/trough2.png deleted file mode 100644 index d8dc98143..000000000 Binary files a/rtdata/themes/gray_textured/trough2.png and /dev/null differ diff --git a/rtdata/themes/images/svg/twb/checkbox-checked-disabled.svg b/rtdata/themes/images/svg/twb/checkbox-checked-disabled.svg new file mode 100644 index 000000000..1103ee917 --- /dev/null +++ b/rtdata/themes/images/svg/twb/checkbox-checked-disabled.svg @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/rtdata/themes/images/svg/twb/checkbox-checked.svg b/rtdata/themes/images/svg/twb/checkbox-checked.svg new file mode 100644 index 000000000..c7d28d45d --- /dev/null +++ b/rtdata/themes/images/svg/twb/checkbox-checked.svg @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/rtdata/themes/images/svg/twb/checkbox-inconsistent-disabled.svg b/rtdata/themes/images/svg/twb/checkbox-inconsistent-disabled.svg new file mode 100644 index 000000000..ee55c4f6f --- /dev/null +++ b/rtdata/themes/images/svg/twb/checkbox-inconsistent-disabled.svg @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/rtdata/themes/images/svg/twb/checkbox-inconsistent.svg b/rtdata/themes/images/svg/twb/checkbox-inconsistent.svg new file mode 100644 index 000000000..e0f5bd362 --- /dev/null +++ b/rtdata/themes/images/svg/twb/checkbox-inconsistent.svg @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/rtdata/themes/images/svg/twb/checkbox-unchecked-disabled.svg b/rtdata/themes/images/svg/twb/checkbox-unchecked-disabled.svg new file mode 100644 index 000000000..635dae59b --- /dev/null +++ b/rtdata/themes/images/svg/twb/checkbox-unchecked-disabled.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/rtdata/themes/images/svg/twb/checkbox-unchecked.svg b/rtdata/themes/images/svg/twb/checkbox-unchecked.svg new file mode 100644 index 000000000..0adfe66cc --- /dev/null +++ b/rtdata/themes/images/svg/twb/checkbox-unchecked.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/rtdata/themes/images/svg/twb/radio-checked-disabled.svg b/rtdata/themes/images/svg/twb/radio-checked-disabled.svg new file mode 100644 index 000000000..f415b4be7 --- /dev/null +++ b/rtdata/themes/images/svg/twb/radio-checked-disabled.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/rtdata/themes/images/svg/twb/radio-checked.svg b/rtdata/themes/images/svg/twb/radio-checked.svg new file mode 100644 index 000000000..c6f9b4ee8 --- /dev/null +++ b/rtdata/themes/images/svg/twb/radio-checked.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/rtdata/themes/images/svg/twb/radio-inconsistent-disabled.svg b/rtdata/themes/images/svg/twb/radio-inconsistent-disabled.svg new file mode 100644 index 000000000..e41f3ff9c --- /dev/null +++ b/rtdata/themes/images/svg/twb/radio-inconsistent-disabled.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/rtdata/themes/images/svg/twb/radio-inconsistent.svg b/rtdata/themes/images/svg/twb/radio-inconsistent.svg new file mode 100644 index 000000000..65ea2a8e8 --- /dev/null +++ b/rtdata/themes/images/svg/twb/radio-inconsistent.svg @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/rtdata/themes/images/svg/twb/radio-unchecked-disabled.svg b/rtdata/themes/images/svg/twb/radio-unchecked-disabled.svg new file mode 100644 index 000000000..60098048f --- /dev/null +++ b/rtdata/themes/images/svg/twb/radio-unchecked-disabled.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/rtdata/themes/images/svg/twb/radio-unchecked.svg b/rtdata/themes/images/svg/twb/radio-unchecked.svg new file mode 100644 index 000000000..8b448f3cf --- /dev/null +++ b/rtdata/themes/images/svg/twb/radio-unchecked.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/rtdata/themes/images/twb/checkbox-checked-disabled.png b/rtdata/themes/images/twb/checkbox-checked-disabled.png new file mode 100644 index 000000000..8458b5987 Binary files /dev/null and b/rtdata/themes/images/twb/checkbox-checked-disabled.png differ diff --git a/rtdata/themes/images/twb/checkbox-checked.png b/rtdata/themes/images/twb/checkbox-checked.png new file mode 100644 index 000000000..83d3744d3 Binary files /dev/null and b/rtdata/themes/images/twb/checkbox-checked.png differ diff --git a/rtdata/themes/images/twb/checkbox-inconsistent-disabled.png b/rtdata/themes/images/twb/checkbox-inconsistent-disabled.png new file mode 100644 index 000000000..96c5fbe5f Binary files /dev/null and b/rtdata/themes/images/twb/checkbox-inconsistent-disabled.png differ diff --git a/rtdata/themes/images/twb/checkbox-inconsistent.png b/rtdata/themes/images/twb/checkbox-inconsistent.png new file mode 100644 index 000000000..373f218be Binary files /dev/null and b/rtdata/themes/images/twb/checkbox-inconsistent.png differ diff --git a/rtdata/themes/images/twb/checkbox-unchecked-disabled.png b/rtdata/themes/images/twb/checkbox-unchecked-disabled.png new file mode 100644 index 000000000..985dd07cc Binary files /dev/null and b/rtdata/themes/images/twb/checkbox-unchecked-disabled.png differ diff --git a/rtdata/themes/images/twb/checkbox-unchecked.png b/rtdata/themes/images/twb/checkbox-unchecked.png new file mode 100644 index 000000000..747a9c8c3 Binary files /dev/null and b/rtdata/themes/images/twb/checkbox-unchecked.png differ diff --git a/rtdata/themes/images/twb/radio-checked-disabled.png b/rtdata/themes/images/twb/radio-checked-disabled.png new file mode 100644 index 000000000..0947a5e06 Binary files /dev/null and b/rtdata/themes/images/twb/radio-checked-disabled.png differ diff --git a/rtdata/themes/images/twb/radio-checked.png b/rtdata/themes/images/twb/radio-checked.png new file mode 100644 index 000000000..48cfc16ae Binary files /dev/null and b/rtdata/themes/images/twb/radio-checked.png differ diff --git a/rtdata/themes/images/twb/radio-inconsistent-disabled.png b/rtdata/themes/images/twb/radio-inconsistent-disabled.png new file mode 100644 index 000000000..a59b179e1 Binary files /dev/null and b/rtdata/themes/images/twb/radio-inconsistent-disabled.png differ diff --git a/rtdata/themes/images/twb/radio-inconsistent.png b/rtdata/themes/images/twb/radio-inconsistent.png new file mode 100644 index 000000000..abe1e28ba Binary files /dev/null and b/rtdata/themes/images/twb/radio-inconsistent.png differ diff --git a/rtdata/themes/images/twb/radio-unchecked-disabled.png b/rtdata/themes/images/twb/radio-unchecked-disabled.png new file mode 100644 index 000000000..6cbc076f2 Binary files /dev/null and b/rtdata/themes/images/twb/radio-unchecked-disabled.png differ diff --git a/rtdata/themes/images/twb/radio-unchecked.png b/rtdata/themes/images/twb/radio-unchecked.png new file mode 100644 index 000000000..e28db04f9 Binary files /dev/null and b/rtdata/themes/images/twb/radio-unchecked.png differ diff --git a/rtdata/themes/slim b/rtdata/themes/slim deleted file mode 100644 index bc1c05937..000000000 --- a/rtdata/themes/slim +++ /dev/null @@ -1,140 +0,0 @@ -# -# This file is part of RawTherapee. -# -# Copyright (c) 2004-2011 Gabor Horvath -# -# RawTherapee is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# RawTherapee is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with RawTherapee. If not, see . -# - -# Please keep this gtkrc in sync with the other ones from Clearlooks based themes. - -gtk-color-scheme = "salt_pinch:#95B0DB\nbase_color:#dddddd\nfg_color:#0A0A0A\ntooltip_fg_color:#000000\nselected_bg_color:#95B0DB\nselected_fg_color:#FFFFFF\ntext_color:#000000\nbg_color:#A1A1A1\ntooltip_bg_color:#F5F5B5" - -style "clearlooks-default" { - xthickness = 1 - ythickness = 1 - - ####################### - # Style Properties - ####################### - GtkButton::child-displacement-x = 0 - GtkButton::child-displacement-y = 0 - GtkButton::default-border = { 0, 0, 0, 0 } - GtkButton::image-spacing = 1 - GtkToolButton::icon-spacing = 1 - - GtkCheckButton::indicator-size = 12 - - GtkPaned::handle-size = 3 - - GtkRange::slider-width = 12 - GtkRange::stepper-size = 12 - - GtkScale::slider-width = 8 - GtkScrollbar::slider-width = 12 - - GtkMenuBar::internal-padding = 0 - GtkExpander::expander-size = 12 - GtkExpander::expander-spacing = 0 - GtkToolbar::internal-padding = 0 - GtkTreeView::expander-size = 10 - - GtkMenu::horizontal-padding = 0 - GtkMenu::vertical-padding = 0 - - GtkNotebook::tab-curvature = 0 - - GtkEntry::progress-border = { 2, 2, 2, 2 } - -} - -style "wide" { - xthickness = 1 - ythickness = 1 -} - -style "wider" { - xthickness = 2 - ythickness = 2 -} - -style "clearlooks-entry" { - xthickness = 1 - ythickness = 1 -} -style "clearlooks-scale" { - xthickness = 1 - ythickness = 1 -} - -style "clearlooks-scrollbar" { - xthickness = 1 - ythickness = 1 -} - -style "clearlooks-button" { - xthickness = 0 - ythickness = 0 -} - -# The color is changed by the notebook_bg style, this style -# changes the x/ythickness -style "clearlooks-notebook" { - xthickness = 1 - ythickness = 1 -} - -style "clearlooks-expander" { - xthickness = 0 - ythickness = 0 -} - -style "clearlooks-thresholdselector" { - xthickness = 1 - ythickness = 1 -} - -style "clearlooks-menu" { - xthickness = 0 - ythickness = 0 -} - -style "clearlooks-menu_item" { - xthickness = 2 - ythickness = 3 -} - -# This style is there to modify the separator menu items. The goals are: -# 1. Get a specific height. -# 2. The line should go to the edges (ie. no border at the left/right) -style "clearlooks-separator_menu_item" { - xthickness = 1 - ythickness = 0 - - GtkSeparatorMenuItem::horizontal-padding = 0 - GtkWidget::separator-height = 5 -} - -# The almost useless progress bar style -style "clearlooks-progressbar" { - xthickness = 1 - ythickness = 1 -} - -# This style is based on the clearlooks-default style, so that the colors from the button -# style are overriden again. -style "clearlooks-treeview_header" { - xthickness = 2 - ythickness = 1 -} diff --git a/rtengine/CA_correct_RT.cc b/rtengine/CA_correct_RT.cc index 7c28801ae..aea20d8c9 100644 --- a/rtengine/CA_correct_RT.cc +++ b/rtengine/CA_correct_RT.cc @@ -45,15 +45,14 @@ bool LinEqSolve(int nDim, double* pfMatr, double* pfVect, double* pfSolution) // //============================================================================== - double fMaxElem; double fAcc; - int i, j, k, m; + int i, j, k; for(k = 0; k < (nDim - 1); k++) { // base row of matrix // search of line with max element - fMaxElem = fabs( pfMatr[k * nDim + k] ); - m = k; + double fMaxElem = fabs( pfMatr[k * nDim + k] ); + int m = k; for (i = k + 1; i < nDim; i++) { if(fMaxElem < fabs(pfMatr[i * nDim + k]) ) { @@ -112,7 +111,7 @@ bool LinEqSolve(int nDim, double* pfMatr, double* pfVect, double* pfSolution) using namespace std; using namespace rtengine; -void RawImageSource::CA_correct_RT(const double cared, const double cablue, const double caautostrength) +void RawImageSource::CA_correct_RT(const bool autoCA, const double cared, const double cablue, const double caautostrength, array2D &rawData) { // multithreaded and partly vectorized by Ingo Weyrich constexpr int ts = 128; @@ -134,7 +133,6 @@ void RawImageSource::CA_correct_RT(const double cared, const double cablue, cons plistener->setProgress (progress); } - const bool autoCA = (cared == 0 && cablue == 0); // local variables const int width = W, height = H; //temporary array to store simple interpolation of G @@ -242,7 +240,6 @@ void RawImageSource::CA_correct_RT(const double cared, const double cablue, cons for (int row = rr + top, cc = ccmin; cc < ccmax; cc++) { int col = cc + left; int c = FC(rr, cc); - int indx = row * width + col; int indx1 = rr * ts + cc; rgb[c][indx1] = (rawData[row][col]) / 65535.0f; } @@ -695,7 +692,7 @@ void RawImageSource::CA_correct_RT(const double cared, const double cablue, cons //fitparams[polyord*i+j] gives the coefficients of (vblock^i hblock^j) in a polynomial fit for i,j<=4 } //end of initialization for CA correction pass - //only executed if cared and cablue are zero + //only executed if autoCA is true } // Main algorithm: Tile loop @@ -967,11 +964,10 @@ void RawImageSource::CA_correct_RT(const double cared, const double cablue, cons // copy CA corrected results to temporary image matrix for (int rr = border; rr < rr1 - border; rr++) { - int c = FC(rr + top, left + border + FC(rr + top, 2) & 1); + int c = FC(rr + top, left + border + (FC(rr + top, 2) & 1)); for (int row = rr + top, cc = border + (FC(rr, 2) & 1), indx = (row * width + cc + left) >> 1; cc < cc1 - border; cc += 2, indx++) { - int col = cc + left; - RawDataTmp[indx] = 65535.0f * rgb[c][(rr) * ts + cc] + 0.5f; + RawDataTmp[indx] = 65535.0f * rgb[c][(rr) * ts + cc]; } } diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt index cb484dead..8e8c08fd3 100644 --- a/rtengine/CMakeLists.txt +++ b/rtengine/CMakeLists.txt @@ -1,45 +1,160 @@ -include_directories (${EXTRA_INCDIR} ${GTHREAD_INCLUDE_DIRS} ${GOBJECT_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS} - ${GLIBMM_INCLUDE_DIRS} ${IPTCDATA_INCLUDE_DIRS} ${LCMS_INCLUDE_DIRS} ${EXPAT_INCLUDE_DIRS} ${FFTW3F_INCLUDE_DIRS} - ${GTKMM_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS}) -link_directories ("${PROJECT_SOURCE_DIR}/rtexif" ${EXTRA_LIBDIR} ${GTHREAD_LIBRARY_DIRS} - ${GOBJECT_LIBRARY_DIRS} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS} - ${IPTCDATA_LIBRARY_DIRS} ${LCMS_LIBRARY_DIRS} ${EXPAT_LIBRARY_DIRS} ${FFTW3F_LIBRARY_DIRS}) - -set (CAMCONSTSFILE "camconst.json") - -set (RTENGINESOURCEFILES colortemp.cc curves.cc flatcurves.cc diagonalcurves.cc dcraw.cc iccstore.cc color.cc - dfmanager.cc ffmanager.cc gauss.cc rawimage.cc image8.cc image16.cc imagefloat.cc imagedata.cc imageio.cc improcfun.cc init.cc dcrop.cc - loadinitial.cc procparams.cc rawimagesource.cc demosaic_algos.cc shmap.cc simpleprocess.cc refreshmap.cc - fast_demo.cc amaze_demosaic_RT.cc CA_correct_RT.cc cfa_linedn_RT.cc green_equil_RT.cc hilite_recon.cc expo_before_b.cc - stdimagesource.cc myfile.cc iccjpeg.cc improccoordinator.cc pipettebuffer.cc coord.cc alpha.cc spot.cc - processingjob.cc rtthumbnail.cc utils.cc labimage.cc slicer.cc cieimage.cc - iplab2rgb.cc ipsharpen.cc iptransform.cc ipresize.cc ipvibrance.cc - imagedimensions.cc jpeg_ijg/jpeg_memsrc.cc jdatasrc.cc iimage.cc - EdgePreservingDecomposition.cc cplx_wavelet_dec.cc FTblockDN.cc - PF_correct_RT.cc previewimage.cc ipwavelet.cc - dirpyr_equalizer.cc - calc_distort.cc lcp.cc dcp.cc ipretinex.cc - cJSON.c camconst.cc - klt/convolve.cc klt/error.cc klt/klt.cc klt/klt_util.cc klt/pnmio.cc klt/pyramid.cc klt/selectGoodFeatures.cc - klt/storeFeatures.cc klt/trackFeatures.cc klt/writeFeatures.cc - clutstore.cc - ciecam02.cc +include_directories(${EXTRA_INCDIR} + ${EXPAT_INCLUDE_DIRS} + ${FFTW3F_INCLUDE_DIRS} + ${GLIB2_INCLUDE_DIRS} + ${GLIBMM_INCLUDE_DIRS} + ${GOBJECT_INCLUDE_DIRS} + ${GTHREAD_INCLUDE_DIRS} + ${GTKMM_INCLUDE_DIRS} + ${GTK_INCLUDE_DIRS} + ${IPTCDATA_INCLUDE_DIRS} + ${LCMS_INCLUDE_DIRS} ) -include_directories (BEFORE "${CMAKE_CURRENT_BINARY_DIR}") +link_directories("${PROJECT_SOURCE_DIR}/rtexif" + ${EXPAT_LIBRARY_DIRS} + ${EXTRA_LIBDIR} + ${FFTW3F_LIBRARY_DIRS} + ${GLIB2_LIBRARY_DIRS} + ${GLIBMM_LIBRARY_DIRS} + ${GOBJECT_LIBRARY_DIRS} + ${GTHREAD_LIBRARY_DIRS} + ${IPTCDATA_LIBRARY_DIRS} + ${LCMS_LIBRARY_DIRS} + ) -add_library (rtengine ${RTENGINESOURCEFILES}) -add_dependencies (rtengine AboutFile) +set(CAMCONSTSFILE "camconst.json") -#It may be nice to store library version too -IF (BUILD_SHARED_LIBS) +set(RTENGINESOURCEFILES + CA_correct_RT.cc + EdgePreservingDecomposition.cc + FTblockDN.cc + PF_correct_RT.cc + alpha.cc + amaze_demosaic_RT.cc + cJSON.c + calc_distort.cc + camconst.cc + cfa_linedn_RT.cc + ciecam02.cc + cieimage.cc + clutstore.cc + color.cc + colortemp.cc + coord.cc + cplx_wavelet_dec.cc + curves.cc + dcp.cc + dcraw.cc + dcrop.cc + demosaic_algos.cc + dfmanager.cc + diagonalcurves.cc + dirpyr_equalizer.cc + dynamicprofile.cc + expo_before_b.cc + fast_demo.cc + ffmanager.cc + flatcurves.cc + gauss.cc + green_equil_RT.cc + hilite_recon.cc + iccjpeg.cc + iccstore.cc + icons.cc + iimage.cc + image16.cc + image8.cc + imagedata.cc + imagedimensions.cc + imagefloat.cc + imageio.cc + improccoordinator.cc + improcfun.cc + init.cc + iplab2rgb.cc + ipresize.cc + ipretinex.cc + ipsharpen.cc + iptransform.cc + ipvibrance.cc + ipwavelet.cc + jdatasrc.cc + jpeg_ijg/jpeg_memsrc.cc + klt/convolve.cc + klt/error.cc + klt/klt.cc + klt/klt_util.cc + klt/pnmio.cc + klt/pyramid.cc + klt/selectGoodFeatures.cc + klt/storeFeatures.cc + klt/trackFeatures.cc + klt/writeFeatures.cc + labimage.cc + lcp.cc + loadinitial.cc + myfile.cc + pipettebuffer.cc + pixelshift.cc + previewimage.cc + processingjob.cc + procparams.cc + profilestore.cc + rawimage.cc + rawimagesource.cc + refreshmap.cc + rtthumbnail.cc + shmap.cc + simpleprocess.cc + slicer.cc + spot.cc + stdimagesource.cc + utils.cc + ) + +if(NOT WITH_SYSTEM_KLT) + set(RTENGINESOURCEFILES ${RTENGINESOURCEFILES} + klt/convolve.cc + klt/error.cc + klt/klt.cc + klt/klt_util.cc + klt/pnmio.cc + klt/pyramid.cc + klt/selectGoodFeatures.cc + klt/storeFeatures.cc + klt/trackFeatures.cc + klt/writeFeatures.cc + ) + set(KLT_LIBRARIES) +endif() + +include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}") + +add_library(rtengine ${RTENGINESOURCEFILES}) +add_dependencies(rtengine UpdateInfo) + +# It may be nice to store library version too +if(BUILD_SHARED_LIBS) install (TARGETS rtengine DESTINATION ${LIBDIR}) -ENDIF (BUILD_SHARED_LIBS) +endif() -set_target_properties (rtengine PROPERTIES COMPILE_FLAGS "${RTENGINE_CXX_FLAGS}") +set_target_properties(rtengine PROPERTIES COMPILE_FLAGS "${RTENGINE_CXX_FLAGS}") -target_link_libraries (rtengine rtexif ${EXTRA_LIB} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES} - ${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${LCMS_LIBRARIES} ${EXPAT_LIBRARIES} ${FFTW3F_LIBRARIES} ${IPTCDATA_LIBRARIES} - ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${TIFF_LIBRARIES} ${ZLIB_LIBRARIES}) +target_link_libraries(rtengine rtexif + ${EXPAT_LIBRARIES} + ${EXTRA_LIB} + ${FFTW3F_LIBRARIES} + ${GLIB2_LIBRARIES} + ${GLIBMM_LIBRARIES} + ${GOBJECT_LIBRARIES} + ${GTHREAD_LIBRARIES} + ${IPTCDATA_LIBRARIES} + ${JPEG_LIBRARIES} + ${LCMS_LIBRARIES} + ${PNG_LIBRARIES} + ${TIFF_LIBRARIES} + ${ZLIB_LIBRARIES} + ) -install (FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +install(FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) diff --git a/rtengine/EdgePreservingDecomposition.cc b/rtengine/EdgePreservingDecomposition.cc index 7bc292c3f..1424af1b3 100644 --- a/rtengine/EdgePreservingDecomposition.cc +++ b/rtengine/EdgePreservingDecomposition.cc @@ -6,7 +6,6 @@ #endif #include "sleef.c" #include "opthelper.h" - #define pow_F(a,b) (xexpf(b*xlogf(a))) #define DIAGONALS 5 @@ -21,7 +20,7 @@ Takes less memory with OkToModify_b = true, and Preconditioner = nullptr. */ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), float *b, int n, bool OkToModify_b, float *x, float RMSResidual, void *Pass, int MaximumIterates, void Preconditioner(float *Product, float *x, void *Pass)) { - int iterate, i; + int iterate; float* buffer = (float*)malloc(2 * n * sizeof(float) + 128); float *r = (buffer + 16); @@ -395,6 +394,9 @@ SSEFUNCTION void MultiDiagonalSymmetricMatrix::VectorProduct(float* RESTRICT Pro } } } +#ifdef _OPENMP + static_cast(chunkSize); // to silence cppcheck warning +#endif } bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int MaxFillAbove) @@ -411,7 +413,7 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max //How many diagonals in the decomposition? MaxFillAbove++; //Conceptually, now "fill" includes an existing diagonal. Simpler in the math that follows. - int i, j, mic, fp; + int j, mic, fp; mic = 1; fp = 1; @@ -423,7 +425,10 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max //Initialize the decomposition - setup memory, start rows, etc. MultiDiagonalSymmetricMatrix *ic = new MultiDiagonalSymmetricMatrix(n, mic); - ic->CreateDiagonal(0, 0); //There's always a main diagonal in this type of decomposition. + if(!ic->CreateDiagonal(0, 0)) { //There's always a main diagonal in this type of decomposition. + delete ic; + return false; + } mic = 1; for(int ii = 1; ii < m; ii++) { @@ -441,8 +446,8 @@ bool MultiDiagonalSymmetricMatrix::CreateIncompleteCholeskyFactorization(int Max } //It's all initialized? Uhkay. Do the actual math then. - int sss, ss; - int MaxStartRow = StartRows[m - 1]; //Handy number. + int sss; + // int MaxStartRow = StartRows[m - 1]; //Handy number. float **l = ic->Diagonals; float *d = ic->Diagonals[0]; //Describes D in LDLt. int icm = ic->m; @@ -657,7 +662,7 @@ void MultiDiagonalSymmetricMatrix::CholeskyBackSolve(float* RESTRICT x, float* R } } -EdgePreservingDecomposition::EdgePreservingDecomposition(int width, int height) +EdgePreservingDecomposition::EdgePreservingDecomposition(int width, int height) : a0(nullptr) , a_1(nullptr), a_w(nullptr), a_w_1(nullptr), a_w1(nullptr) { w = width; h = height; @@ -880,7 +885,7 @@ float *EdgePreservingDecomposition::CreateIteratedBlur(float *Source, float Scal return Blur; } -SSEFUNCTION float *EdgePreservingDecomposition::CompressDynamicRange(float *Source, float Scale, float EdgeStopping, float CompressionExponent, float DetailBoost, int Iterates, int Reweightings, float *Compressed) +SSEFUNCTION void EdgePreservingDecomposition::CompressDynamicRange(float *Source, float Scale, float EdgeStopping, float CompressionExponent, float DetailBoost, int Iterates, int Reweightings) { if(w < 300 && h < 300) { // set number of Reweightings to zero for small images (thumbnails). We could try to find a better solution here. Reweightings = 0; @@ -923,12 +928,7 @@ SSEFUNCTION float *EdgePreservingDecomposition::CompressDynamicRange(float *Sour //Blur. Also setup memory for Compressed (we can just use u since each element of u is used in one calculation). float *u = CreateIteratedBlur(Source, Scale, EdgeStopping, Iterates, Reweightings); - if(Compressed == nullptr) { - Compressed = u; - } - //Apply compression, detail boost, unlogging. Compression is done on the logged data and detail boost on unlogged. -// float temp = CompressionExponent - 1.0f; float temp; if(DetailBoost > 0.f) { @@ -955,8 +955,7 @@ SSEFUNCTION float *EdgePreservingDecomposition::CompressDynamicRange(float *Sour cev = xexpf(LVFU(Source[i]) + LVFU(u[i]) * (tempv)) - epsv; uev = xexpf(LVFU(u[i])) - epsv; sourcev = xexpf(LVFU(Source[i])) - epsv; - _mm_storeu_ps( &Source[i], sourcev); - _mm_storeu_ps( &Compressed[i], cev + DetailBoostv * (sourcev - uev) ); + _mm_storeu_ps( &Source[i], cev + DetailBoostv * (sourcev - uev) ); } } @@ -964,7 +963,7 @@ SSEFUNCTION float *EdgePreservingDecomposition::CompressDynamicRange(float *Sour float ce = xexpf(Source[i] + u[i] * (temp)) - eps; float ue = xexpf(u[i]) - eps; Source[i] = xexpf(Source[i]) - eps; - Compressed[i] = ce + DetailBoost * (Source[i] - ue); + Source[i] = ce + DetailBoost * (Source[i] - ue); } #else @@ -976,16 +975,11 @@ SSEFUNCTION float *EdgePreservingDecomposition::CompressDynamicRange(float *Sour float ce = xexpf(Source[i] + u[i] * (temp)) - eps; float ue = xexpf(u[i]) - eps; Source[i] = xexpf(Source[i]) - eps; - Compressed[i] = ce + DetailBoost * (Source[i] - ue); + Source[i] = ce + DetailBoost * (Source[i] - ue); } #endif - if(Compressed != u) { - delete[] u; - } - - return Compressed; - + delete[] u; } diff --git a/rtengine/EdgePreservingDecomposition.h b/rtengine/EdgePreservingDecomposition.h index bf567f103..1eca7b2c8 100644 --- a/rtengine/EdgePreservingDecomposition.h +++ b/rtengine/EdgePreservingDecomposition.h @@ -152,7 +152,7 @@ public: the more compression is applied, with Compression = 1 giving no effect and above 1 the opposite effect. You can totally use Compression = 1 and play with DetailBoost for some really sweet unsharp masking. If working on luma/grey, consider giving it a logarithm. In place calculation to save memory (Source == Compressed) is totally ok. Reweightings > 0 invokes CreateIteratedBlur instead of CreateBlur. */ - float *CompressDynamicRange(float *Source, float Scale = 1.0f, float EdgeStopping = 1.4f, float CompressionExponent = 0.8f, float DetailBoost = 0.1f, int Iterates = 20, int Reweightings = 0, float *Compressed = nullptr); + void CompressDynamicRange(float *Source, float Scale = 1.0f, float EdgeStopping = 1.4f, float CompressionExponent = 0.8f, float DetailBoost = 0.1f, int Iterates = 20, int Reweightings = 0); private: MultiDiagonalSymmetricMatrix *A; //The equations are simple enough to not mandate a matrix class, but fast solution NEEDS a complicated preconditioner. diff --git a/rtengine/FTblockDN.cc b/rtengine/FTblockDN.cc index 6bb0c4c3c..50b178388 100644 --- a/rtengine/FTblockDN.cc +++ b/rtengine/FTblockDN.cc @@ -125,7 +125,7 @@ void ImProcFunctions::Median_Denoise(float **src, float **dst, const int width, medBuffer[1] = dst; } - float ** medianIn, ** medianOut; + float ** medianIn, ** medianOut = nullptr; int BufferIndex = 0; for (int iteration = 1; iteration <= iterations; ++iteration) { @@ -454,10 +454,10 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef const bool useNoiseLCurve = (noiseLCurve && noiseLCurve.getSum() >= 7.f); const bool autoch = (settings->leveldnautsimpl == 1 && (dnparams.Cmethod == "AUT" || dnparams.Cmethod == "PRE")) || (settings->leveldnautsimpl == 0 && (dnparams.C2method == "AUTO" || dnparams.C2method == "PREV")); - float** lumcalc; - float* lumcalcBuffer; - float** ccalc; - float* ccalcBuffer; + float** lumcalc = nullptr; + float* lumcalcBuffer = nullptr; + float** ccalc = nullptr; + float* ccalcBuffer = nullptr; bool ponder = false; float ponderCC = 1.f; @@ -495,9 +495,9 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef //printf("NL=%f \n",noisevarL); if (useNoiseLCurve || useNoiseCCurve) { - int hei = calclum->height; - int wid = calclum->width; - TMatrix wprofi = iccStore->workingSpaceMatrix (params->icm.working); + int hei = calclum->getHeight(); + int wid = calclum->getWidth(); + TMatrix wprofi = ICCStore::getInstance()->workingSpaceMatrix (params->icm.working); const float wpi[3][3] = { {static_cast(wprofi[0][0]), static_cast(wprofi[0][1]), static_cast(wprofi[0][2])}, @@ -518,7 +518,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef ccalc[i] = ccalcBuffer + (i * wid); } - float cn100Precalc; + float cn100Precalc = 0.f; if (useNoiseCCurve) { cn100Precalc = SQR(1.f + ponderCC * (4.f * noiseCCurve[100.f / 60.f])); @@ -573,7 +573,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef calclum = nullptr; } - const short int imheight = src->height, imwidth = src->width; + const short int imheight = src->getHeight(), imwidth = src->getWidth(); if (dnparams.luma != 0 || dnparams.chroma != 0 || dnparams.methodmed == "Lab" || dnparams.methodmed == "Lonly") { // gamma transform for input data @@ -622,13 +622,13 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef for (int i = 0; i < TS; ++i) { float i1 = abs((i > TS / 2 ? i - TS + 1 : i)); - float vmask = (i1 < border ? SQR(sin((M_PI * i1) / (2 * border))) : 1.0f); - float vmask2 = (i1 < 2 * border ? SQR(sin((M_PI * i1) / (2 * border))) : 1.0f); + float vmask = (i1 < border ? SQR(sin((rtengine::RT_PI * i1) / (2 * border))) : 1.0f); + float vmask2 = (i1 < 2 * border ? SQR(sin((rtengine::RT_PI * i1) / (2 * border))) : 1.0f); for (int j = 0; j < TS; ++j) { float j1 = abs((j > TS / 2 ? j - TS + 1 : j)); - tilemask_in[i][j] = (vmask * (j1 < border ? SQR(sin((M_PI * j1) / (2 * border))) : 1.0f)) + epsilon; - tilemask_out[i][j] = (vmask2 * (j1 < 2 * border ? SQR(sin((M_PI * j1) / (2 * border))) : 1.0f)) + epsilon; + tilemask_in[i][j] = (vmask * (j1 < border ? SQR(sin((rtengine::RT_PI * j1) / (2 * border))) : 1.0f)) + epsilon; + tilemask_out[i][j] = (vmask2 * (j1 < 2 * border ? SQR(sin((rtengine::RT_PI * j1) / (2 * border))) : 1.0f)) + epsilon; } } @@ -764,7 +764,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef } } - TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params->icm.working); + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params->icm.working); //inverse matrix user select const float wip[3][3] = { {static_cast(wiprof[0][0]), static_cast(wiprof[0][1]), static_cast(wiprof[0][2])}, @@ -772,7 +772,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef {static_cast(wiprof[2][0]), static_cast(wiprof[2][1]), static_cast(wiprof[2][2])} }; - TMatrix wprof = iccStore->workingSpaceMatrix (params->icm.working); + TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params->icm.working); const float wp[3][3] = { {static_cast(wprof[0][0]), static_cast(wprof[0][1]), static_cast(wprof[0][2])}, @@ -1512,7 +1512,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef } for (int i = 0; i < overlap; ++i) { - float mask = SQR(xsinf((M_PI * i) / (2 * overlap))); + float mask = SQR(xsinf((rtengine::RT_PI * i) / (2 * overlap))); if (tiletop > 0) { Vmask[i] = mask; @@ -1717,8 +1717,8 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef #pragma omp parallel for #endif - for (int i = 0; i < dst->height; ++i) { - for (int j = 0; j < dst->width; ++j) { + for (int i = 0; i < dst->getHeight(); ++i) { + for (int j = 0; j < dst->getWidth(); ++j) { dst->r(i, j) = Color::gammatab_srgb[ dst->r(i, j) ]; dst->g(i, j) = Color::gammatab_srgb[ dst->g(i, j) ]; dst->b(i, j) = Color::gammatab_srgb[ dst->b(i, j) ]; @@ -1746,7 +1746,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise(int kall, Imagefloat * src, Imagef //median 3x3 in complement on RGB if (dnparams.methodmed == "RGB" && dnparams.median) { //printf("RGB den\n"); - int wid = dst->width, hei = dst->height; + int wid = dst->getWidth(), hei = dst->getHeight(); float** tm; tm = new float*[hei]; @@ -3115,9 +3115,9 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat float** lumcalc; float** acalc; float** bcalc; - hei = provicalc->height; - wid = provicalc->width; - TMatrix wprofi = iccStore->workingSpaceMatrix (params->icm.working); + hei = provicalc->getHeight(); + wid = provicalc->getWidth(); + TMatrix wprofi = ICCStore::getInstance()->workingSpaceMatrix (params->icm.working); const float wpi[3][3] = { {static_cast(wprofi[0][0]), static_cast(wprofi[0][1]), static_cast(wprofi[0][2])}, @@ -3165,7 +3165,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - const int imheight = src->height, imwidth = src->width; + const int imheight = src->getHeight(), imwidth = src->getWidth(); bool denoiseMethodRgb = (dnparams.dmethod == "RGB"); @@ -3192,7 +3192,7 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - TMatrix wprof = iccStore->workingSpaceMatrix (params->icm.working); + TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params->icm.working); const float wp[3][3] = { {static_cast(wprof[0][0]), static_cast(wprof[0][1]), static_cast(wprof[0][2])}, {static_cast(wprof[1][0]), static_cast(wprof[1][1]), static_cast(wprof[1][2])}, @@ -3497,7 +3497,8 @@ SSEFUNCTION void ImProcFunctions::RGB_denoise_info(Imagefloat * src, Imagefloat bdecomp = new wavelet_decomposition (labdn->data + 2 * datalen, labdn->W, labdn->H, levwav, 1); } } - bool autoch = dnparams.autochroma; + const bool autoch = (settings->leveldnautsimpl == 1 && (dnparams.Cmethod == "AUT" || dnparams.Cmethod == "PRE")) || (settings->leveldnautsimpl == 0 && (dnparams.C2method == "AUTO" || dnparams.C2method == "PREV")); + if (comptlevel == 0) { WaveletDenoiseAll_info( diff --git a/rtengine/LUT.h b/rtengine/LUT.h index d83a431ca..2701c4ffc 100644 --- a/rtengine/LUT.h +++ b/rtengine/LUT.h @@ -169,6 +169,11 @@ public: { data = nullptr; reset(); +#if defined( __SSE2__ ) && defined( __x86_64__ ) + maxsv = ZEROV; + sizev = ZEROV; + sizeiv = _mm_setzero_si128(); +#endif } ~LUT() @@ -579,7 +584,7 @@ public: numVals = std::min(numVals, passThrough.getSize()); float mult = dest.size - 1; - for (int i = 0; i < numVals; i++) { + for (unsigned int i = 0; i < numVals; i++) { int hi = (int)(mult * passThrough[i]); dest[hi] += this->data[i] ; } @@ -599,7 +604,7 @@ public: vint sumv = (vint)ZEROV; vfloat avgv = ZEROV; - for(; i < size - 3; i += 4) { + for(; i < static_cast(size) - 3; i += 4) { vint datav = _mm_loadu_si128((__m128i*)&data[i]); sumv += datav; avgv += iv * _mm_cvtepi32_ps(datav); @@ -611,7 +616,7 @@ public: avg = vhadd(avgv); #endif - for (; i < size; i++) { + for (; i < static_cast(size); i++) { T val = data[i]; sum += val; avg += i * val; diff --git a/rtengine/PF_correct_RT.cc b/rtengine/PF_correct_RT.cc index 6808fd4eb..6e1fe75d6 100644 --- a/rtengine/PF_correct_RT.cc +++ b/rtengine/PF_correct_RT.cc @@ -663,12 +663,10 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d const int width = src->W, height = src->H; const float piid = 3.14159265f / 180.f; - float shfabs, shmed; - int i1, j1, tot; + int i1, j1; const float eps = 1.0f; const float eps2 = 0.01f; - float shsum, dirsh, norm, sum; float** sraa; sraa = new float*[height]; @@ -848,13 +846,13 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d __m128 onev = F2V(1.0f); #endif // __SSE2__ #ifdef _OPENMP - #pragma omp for private(shfabs, shmed,i1,j1) + #pragma omp for private(i1,j1) #endif for (int i = 0; i < height; i++) { for (j = 0; j < 2; j++) { - shfabs = fabs(src->sh_p[i][j] - tmL[i][j]); - shmed = 0.0f; + float shfabs = fabs(src->sh_p[i][j] - tmL[i][j]); + float shmed = 0.0f; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = 0; j1 <= j + 2; j1++ ) { @@ -879,8 +877,8 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d } for (; j < width - 2; j++) { - shfabs = fabs(src->sh_p[i][j] - tmL[i][j]); - shmed = 0.0f; + float shfabs = fabs(src->sh_p[i][j] - tmL[i][j]); + float shmed = 0.0f; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = j - 2; j1 <= j + 2; j1++ ) { @@ -893,8 +891,8 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d #else for (; j < width - 2; j++) { - shfabs = fabs(src->sh_p[i][j] - tmL[i][j]); - shmed = 0.0f; + float shfabs = fabs(src->sh_p[i][j] - tmL[i][j]); + float shmed = 0.0f; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = j - 2; j1 <= j + 2; j1++ ) { @@ -907,8 +905,8 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d #endif for (; j < width; j++) { - shfabs = fabs(src->sh_p[i][j] - tmL[i][j]); - shmed = 0.0f; + float shfabs = fabs(src->sh_p[i][j] - tmL[i][j]); + float shmed = 0.0f; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = j - 2; j1 < width; j1++ ) { @@ -927,7 +925,7 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d { int j; #ifdef _OPENMP - #pragma omp for private(shsum,norm,dirsh,sum,i1,j1) schedule(dynamic,16) + #pragma omp for private(i1,j1) schedule(dynamic,16) #endif for (int i = 0; i < height; i++) { @@ -936,10 +934,10 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d continue; } - norm = 0.0f; - shsum = 0.0f; - sum = 0.0f; - tot = 0; + float norm = 0.0f; + float shsum = 0.0f; + float sum = 0.0f; + int tot = 0; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = 0; j1 <= j + 2; j1++ ) { @@ -953,7 +951,7 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d sum += src->sh_p[i1][j1]; tot++; - dirsh = 1.f / (SQR(src->sh_p[i1][j1] - src->sh_p[i][j]) + eps); + float dirsh = 1.f / (SQR(src->sh_p[i1][j1] - src->sh_p[i][j]) + eps); shsum += dirsh * src->sh_p[i1][j1]; norm += dirsh; } @@ -972,10 +970,10 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d continue; } - norm = 0.0f; - shsum = 0.0f; - sum = 0.0f; - tot = 0; + float norm = 0.0f; + float shsum = 0.0f; + float sum = 0.0f; + int tot = 0; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = j - 2; j1 <= j + 2; j1++ ) { @@ -989,7 +987,7 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d sum += src->sh_p[i1][j1]; tot++; - dirsh = 1.f / (SQR(src->sh_p[i1][j1] - src->sh_p[i][j]) + eps); + float dirsh = 1.f / (SQR(src->sh_p[i1][j1] - src->sh_p[i][j]) + eps); shsum += dirsh * src->sh_p[i1][j1]; norm += dirsh; } @@ -1008,10 +1006,10 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d continue; } - norm = 0.0f; - shsum = 0.0f; - sum = 0.0f; - tot = 0; + float norm = 0.0f; + float shsum = 0.0f; + float sum = 0.0f; + int tot = 0; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = j - 2; j1 < width; j1++ ) { @@ -1025,7 +1023,7 @@ SSEFUNCTION void ImProcFunctions::Badpixelscam(CieImage * src, CieImage * dst, d sum += src->sh_p[i1][j1]; tot++; - dirsh = 1.f / (SQR(src->sh_p[i1][j1] - src->sh_p[i][j]) + eps); + float dirsh = 1.f / (SQR(src->sh_p[i1][j1] - src->sh_p[i][j]) + eps); shsum += dirsh * src->sh_p[i1][j1]; norm += dirsh; } @@ -1272,13 +1270,10 @@ SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, d t1.set(); const int width = src->W, height = src->H; -// const float piid=3.14159265f/180.f; - float shfabs, shmed; - int i1, j1, tot; + int i1, j1; const float eps = 1.0f; const float eps2 = 0.01f; - float shsum, dirsh, norm, sum; float** sraa; sraa = new float*[height]; @@ -1455,13 +1450,13 @@ SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, d __m128 onev = F2V(1.0f); #endif // __SSE2__ #ifdef _OPENMP - #pragma omp for private(shfabs, shmed,i1,j1) + #pragma omp for private(i1,j1) #endif for (int i = 0; i < height; i++) { for (j = 0; j < 2; j++) { - shfabs = fabs(src->L[i][j] - tmL[i][j]); - shmed = 0.0f; + float shfabs = fabs(src->L[i][j] - tmL[i][j]); + float shmed = 0.0f; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = 0; j1 <= j + 2; j1++ ) { @@ -1486,8 +1481,8 @@ SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, d } for (; j < width - 2; j++) { - shfabs = fabs(src->L[i][j] - tmL[i][j]); - shmed = 0.0f; + float shfabs = fabs(src->L[i][j] - tmL[i][j]); + float shmed = 0.0f; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = j - 2; j1 <= j + 2; j1++ ) { @@ -1500,8 +1495,8 @@ SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, d #else for (; j < width - 2; j++) { - shfabs = fabs(src->L[i][j] - tmL[i][j]); - shmed = 0.0f; + float shfabs = fabs(src->L[i][j] - tmL[i][j]); + float shmed = 0.0f; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = j - 2; j1 <= j + 2; j1++ ) { @@ -1514,8 +1509,8 @@ SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, d #endif for (; j < width; j++) { - shfabs = fabs(src->L[i][j] - tmL[i][j]); - shmed = 0.0f; + float shfabs = fabs(src->L[i][j] - tmL[i][j]); + float shmed = 0.0f; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = j - 2; j1 < width; j1++ ) { @@ -1534,7 +1529,7 @@ SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, d { int j; #ifdef _OPENMP - #pragma omp for private(shsum,norm,dirsh,sum,i1,j1) schedule(dynamic,16) + #pragma omp for private(i1,j1) schedule(dynamic,16) #endif for (int i = 0; i < height; i++) { @@ -1543,10 +1538,10 @@ SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, d continue; } - norm = 0.0f; - shsum = 0.0f; - sum = 0.0f; - tot = 0; + float norm = 0.0f; + float shsum = 0.0f; + float sum = 0.0f; + int tot = 0; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = 0; j1 <= j + 2; j1++ ) { @@ -1560,7 +1555,7 @@ SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, d sum += src->L[i1][j1]; tot++; - dirsh = 1.f / (SQR(src->L[i1][j1] - src->L[i][j]) + eps); + float dirsh = 1.f / (SQR(src->L[i1][j1] - src->L[i][j]) + eps); shsum += dirsh * src->L[i1][j1]; norm += dirsh; } @@ -1579,10 +1574,10 @@ SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, d continue; } - norm = 0.0f; - shsum = 0.0f; - sum = 0.0f; - tot = 0; + float norm = 0.0f; + float shsum = 0.0f; + float sum = 0.0f; + int tot = 0; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = j - 2; j1 <= j + 2; j1++ ) { @@ -1596,7 +1591,7 @@ SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, d sum += src->L[i1][j1]; tot++; - dirsh = 1.f / (SQR(src->L[i1][j1] - src->L[i][j]) + eps); + float dirsh = 1.f / (SQR(src->L[i1][j1] - src->L[i][j]) + eps); shsum += dirsh * src->L[i1][j1]; norm += dirsh; } @@ -1615,10 +1610,10 @@ SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, d continue; } - norm = 0.0f; - shsum = 0.0f; - sum = 0.0f; - tot = 0; + float norm = 0.0f; + float shsum = 0.0f; + float sum = 0.0f; + int tot = 0; for (i1 = max(0, i - 2); i1 <= min(i + 2, height - 1); i1++ ) for (j1 = j - 2; j1 < width; j1++ ) { @@ -1632,7 +1627,7 @@ SSEFUNCTION void ImProcFunctions::BadpixelsLab(LabImage * src, LabImage * dst, d sum += src->L[i1][j1]; tot++; - dirsh = 1.f / (SQR(src->L[i1][j1] - src->L[i][j]) + eps); + float dirsh = 1.f / (SQR(src->L[i1][j1] - src->L[i][j]) + eps); shsum += dirsh * src->L[i1][j1]; norm += dirsh; } diff --git a/rtengine/amaze_demosaic_RT.cc b/rtengine/amaze_demosaic_RT.cc index c5535493c..3cb0ee8de 100644 --- a/rtengine/amaze_demosaic_RT.cc +++ b/rtengine/amaze_demosaic_RT.cc @@ -38,7 +38,7 @@ namespace rtengine { -SSEFUNCTION void RawImageSource::amaze_demosaic_RT(int winx, int winy, int winw, int winh) +SSEFUNCTION void RawImageSource::amaze_demosaic_RT(int winx, int winy, int winw, int winh, array2D &rawData, array2D &red, array2D &green, array2D &blue) { BENCHFUN diff --git a/rtengine/array2D.h b/rtengine/array2D.h index 2fe4ecad4..25d644c85 100644 --- a/rtengine/array2D.h +++ b/rtengine/array2D.h @@ -113,7 +113,7 @@ public: // use as empty declaration, resize before use! // very useful as a member object array2D() : - x(0), y(0), owner(0), ptr(nullptr), data(nullptr), lock(0), flags(0) + x(0), y(0), owner(0), flags(0), ptr(nullptr), data(nullptr), lock(false) { //printf("got empty array2D init\n"); } @@ -143,7 +143,7 @@ public: { flags = flgs; //if (lock) { printf("array2D attempt to overwrite data\n");raise(SIGSEGV);} - lock |= flags & ARRAY2D_LOCK_DATA; + lock = flags & ARRAY2D_LOCK_DATA; // when by reference // TODO: improve this code with ar_realloc() owner = (flags & ARRAY2D_BYREFERENCE) ? 0 : 1; @@ -202,7 +202,7 @@ public: } // use with indices - T * operator[](int index) + T * operator[](int index) const { assert((index >= 0) && (index < y)); return ptr[index]; @@ -281,34 +281,6 @@ public: return (x > 0 && y > 0); } - array2D & operator=( array2D & rhs) - { - if (this != &rhs) - - { - flags = rhs.flags; - lock = rhs.lock; - if (!owner) { // we can only copy same size data - if ((x != rhs.x) || (y != rhs.y)) { - printf(" assignment error in array2D\n"); - printf(" sizes differ and not owner\n"); - raise( SIGSEGV); - } - - } else { - ar_realloc(rhs.x, rhs.y); - } - - // we could have been created from a different - // array format where each row is created by 'new' - for (int i = 0; i < y; i++) { - memcpy(ptr[i], rhs.ptr[i], x * sizeof(T)); - } - } - - return *this; - } - }; template class multi_array2D diff --git a/rtengine/bilateral2.h b/rtengine/bilateral2.h index 7a919546f..3356843b2 100644 --- a/rtengine/bilateral2.h +++ b/rtengine/bilateral2.h @@ -126,7 +126,7 @@ using namespace rtengine; A v = a11*ELEM(-5,-5) + a12*ELEM(-5,-4) + a13*ELEM(-5,-3) + a14*ELEM(-5,-2) + a15*ELEM(-5,-1) + a16*ELEM(-5,0) + a15*ELEM(-5,1) + a14*ELEM(-5,2) + a13*ELEM(-5,3) + a12*ELEM(-5,4) + a11*ELEM(-5,5) + \ a21*ELEM(-4,-5) + a22*ELEM(-4,-4) + a23*ELEM(-4,-3) + a24*ELEM(-4,-2) + a25*ELEM(-4,-1) + a26*ELEM(-4,0) + a25*ELEM(-4,1) + a24*ELEM(-4,2) + a23*ELEM(-4,3) + a22*ELEM(-4,4) + a21*ELEM(-4,5) + \ a31*ELEM(-3,-5) + a32*ELEM(-3,-4) + a33*ELEM(-3,-3) + a34*ELEM(-3,-2) + a35*ELEM(-3,-1) + a36*ELEM(-3,0) + a35*ELEM(-3,1) + a34*ELEM(-3,2) + a33*ELEM(-3,3) + a32*ELEM(-3,4) + a31*ELEM(-3,5) + \ - a41*ELEM(-2,-5) + a42*ELEM(-2,-4) + a43*ELEM(-2,-3) + a44*ELEM(-2,-2) + a45*ELEM(-2,-1) + a46*ELEM(-2,0) + a45*ELEM(-2,1) + a44*ELEM(-2,2) + a43*ELEM(-2,3) + a42*ELEM(-2,4) + a41*ELEM(-4,5) + \ + a41*ELEM(-2,-5) + a42*ELEM(-2,-4) + a43*ELEM(-2,-3) + a44*ELEM(-2,-2) + a45*ELEM(-2,-1) + a46*ELEM(-2,0) + a45*ELEM(-2,1) + a44*ELEM(-2,2) + a43*ELEM(-2,3) + a42*ELEM(-2,4) + a41*ELEM(-2,5) + \ a51*ELEM(-1,-5) + a52*ELEM(-1,-4) + a53*ELEM(-1,-3) + a54*ELEM(-1,-2) + a55*ELEM(-1,-1) + a56*ELEM(-1,0) + a55*ELEM(-1,1) + a54*ELEM(-1,2) + a53*ELEM(-1,3) + a52*ELEM(-1,4) + a51*ELEM(-1,5) + \ a61*ELEM(0,-5) + a62*ELEM(0,-4) + a63*ELEM(0,-3) + a64*ELEM(0,-2) + a65*ELEM(0,-1) + a66*ELEM(0,0) + a65*ELEM(0,1) + a64*ELEM(0,2) + a63*ELEM(0,3) + a62*ELEM(0,4) + a61*ELEM(0,5) + \ a51*ELEM(1,-5) + a52*ELEM(1,-4) + a53*ELEM(1,-3) + a54*ELEM(1,-2) + a55*ELEM(1,-1) + a56*ELEM(1,0) + a55*ELEM(1,1) + a54*ELEM(1,2) + a53*ELEM(1,3) + a52*ELEM(1,4) + a51*ELEM(1,5) + \ @@ -137,7 +137,7 @@ using namespace rtengine; v /= a11*SULY(-5,-5) + a12*SULY(-5,-4) + a13*SULY(-5,-3) + a14*SULY(-5,-2) + a15*SULY(-5,-1) + a16*SULY(-5,0) + a15*SULY(-5,1) + a14*SULY(-5,2) + a13*SULY(-5,3) + a12*SULY(-5,4) + a11*SULY(-5,5) + \ a21*SULY(-4,-5) + a22*SULY(-4,-4) + a23*SULY(-4,-3) + a24*SULY(-4,-2) + a25*SULY(-4,-1) + a26*SULY(-4,0) + a25*SULY(-4,1) + a24*SULY(-4,2) + a23*SULY(-4,3) + a22*SULY(-4,4) + a21*SULY(-4,5) + \ a31*SULY(-3,-5) + a32*SULY(-3,-4) + a33*SULY(-3,-3) + a34*SULY(-3,-2) + a35*SULY(-3,-1) + a36*SULY(-3,0) + a35*SULY(-3,1) + a34*SULY(-3,2) + a33*SULY(-3,3) + a32*SULY(-3,4) + a31*SULY(-3,5) + \ - a41*SULY(-2,-5) + a42*SULY(-2,-4) + a43*SULY(-2,-3) + a44*SULY(-2,-2) + a45*SULY(-2,-1) + a46*SULY(-2,0) + a45*SULY(-2,1) + a44*SULY(-2,2) + a43*SULY(-2,3) + a42*SULY(-2,4) + a41*SULY(-4,5) + \ + a41*SULY(-2,-5) + a42*SULY(-2,-4) + a43*SULY(-2,-3) + a44*SULY(-2,-2) + a45*SULY(-2,-1) + a46*SULY(-2,0) + a45*SULY(-2,1) + a44*SULY(-2,2) + a43*SULY(-2,3) + a42*SULY(-2,4) + a41*SULY(-2,5) + \ a51*SULY(-1,-5) + a52*SULY(-1,-4) + a53*SULY(-1,-3) + a54*SULY(-1,-2) + a55*SULY(-1,-1) + a56*SULY(-1,0) + a55*SULY(-1,1) + a54*SULY(-1,2) + a53*SULY(-1,3) + a52*SULY(-1,4) + a51*SULY(-1,5) + \ a61*SULY(0,-5) + a62*SULY(0,-4) + a63*SULY(0,-3) + a64*SULY(0,-2) + a65*SULY(0,-1) + a66*SULY(0,0) + a65*SULY(0,1) + a64*SULY(0,2) + a63*SULY(0,3) + a62*SULY(0,4) + a61*SULY(0,5) + \ a51*SULY(1,-5) + a52*SULY(1,-4) + a53*SULY(1,-3) + a54*SULY(1,-2) + a55*SULY(1,-1) + a56*SULY(1,0) + a55*SULY(1,1) + a54*SULY(1,2) + a53*SULY(1,3) + a52*SULY(1,4) + a51*SULY(1,5) + \ diff --git a/rtengine/cache.h b/rtengine/cache.h index f4c232673..ec284b2ae 100644 --- a/rtengine/cache.h +++ b/rtengine/cache.h @@ -19,11 +19,12 @@ #pragma once -#include -#include -#include -#include #include +#include +#include +#include +#include +#include #include "../rtgui/threadutils.h" @@ -87,9 +88,9 @@ public: lru_list.splice( lru_list.begin(), lru_list, - store_it->second.lru_list_it + store_it->second->lru_list_it ); - value = store_it->second.value; + value = store_it->second->value; } mutex.unlock(); @@ -139,7 +140,7 @@ public: mutex.lock(); if (hook) { for (const auto& entry : store) { - hook->onRemove(entry.first, entry.second.value); + hook->onRemove(entry.first, entry.second->value); } } lru_list.clear(); @@ -152,13 +153,13 @@ private: using Store = typename std::conditional< cache_helper::has_hash::value, - std::unordered_map, - std::map + std::unordered_map>, + std::map> >::type; using StoreIterator = typename Store::iterator; using StoreConstIterator = typename Store::const_iterator; - typedef std::list LruList; + using LruList = std::list; using LruListIterator = typename LruList::iterator; struct Value { @@ -176,7 +177,7 @@ private: { const StoreIterator store_it = lru_list.back(); if (hook) { - hook->onDiscard(store_it->first, store_it->second.value); + hook->onDiscard(store_it->first, store_it->second->value); } store.erase(store_it); lru_list.pop_back(); @@ -193,23 +194,25 @@ private: discard(); } lru_list.push_front(store.end()); - const Value v = { - value, - lru_list.begin() - }; - lru_list.front() = store.emplace(key, v).first; + std::unique_ptr v( + new Value{ + value, + lru_list.begin() + } + ); + lru_list.front() = store.emplace(key, std::move(v)).first; } } else { if (mode == Mode::UNCOND || mode == Mode::KNOWN) { if (hook) { - hook->onDisplace(key, store_it->second.value); + hook->onDisplace(key, store_it->second->value); } lru_list.splice( lru_list.begin(), lru_list, - store_it->second.lru_list_it + store_it->second->lru_list_it ); - store_it->second.value = value; + store_it->second->value = value; } } mutex.unlock(); @@ -220,9 +223,9 @@ private: void remove(const StoreIterator& store_it) { if (hook) { - hook->onRemove(store_it->first, store_it->second.value); + hook->onRemove(store_it->first, store_it->second->value); } - lru_list.erase(store_it->second.lru_list_it); + lru_list.erase(store_it->second->lru_list_it); store.erase(store_it); } diff --git a/rtengine/calc_distort.cc b/rtengine/calc_distort.cc index 80d61d654..7af47adb2 100644 --- a/rtengine/calc_distort.cc +++ b/rtengine/calc_distort.cc @@ -102,6 +102,9 @@ int calcDistortion(unsigned char* img1, unsigned char* img2, int ncols, int nrow if (n < 5) { printf ("Not sufficient features.\n"); distortion = 0.0; + KLTFreeFeatureTable(ft); + KLTFreeFeatureList(fl); + KLTFreeTrackingContext(tc); return -1; } @@ -154,6 +157,9 @@ int calcDistortion(unsigned char* img1, unsigned char* img2, int ncols, int nrow if (new_n < 5) { printf ("Not sufficient features.\n"); distortion = 0.0; + KLTFreeFeatureTable(ft); + KLTFreeFeatureList(fl); + KLTFreeTrackingContext(tc); return -1; } @@ -252,17 +258,27 @@ int calcDistortion(unsigned char* img1, unsigned char* img2, int ncols, int nrow if (total_delta / new_n > DELTA_2) { printf ("Deviation is too big.\n"); distortion = 0.0; + KLTFreeFeatureTable(ft); + KLTFreeFeatureList(fl); + KLTFreeTrackingContext(tc); return -2; } if (rxy < RXY_LIMIT) { printf ("Not linear enough\n"); distortion = 0.0; + KLTFreeFeatureTable(ft); + KLTFreeFeatureList(fl); + KLTFreeTrackingContext(tc); return -3; } printf ("distortion amount=%lf scale=%lf deviation=%lf, rxy=%lf\n", a, b, total_delta / n, rxy); distortion = a; + + KLTFreeFeatureTable(ft); + KLTFreeFeatureList(fl); + KLTFreeTrackingContext(tc); return 1; } diff --git a/rtengine/camconst.cc b/rtengine/camconst.cc index 5a155e051..6b4a36c4b 100644 --- a/rtengine/camconst.cc +++ b/rtengine/camconst.cc @@ -27,9 +27,6 @@ CameraConst::CameraConst() white_max = 0; } -CameraConst::~CameraConst() -{ -} bool CameraConst::parseApertureScaling(CameraConst *cc, void *ji_) @@ -183,11 +180,10 @@ CameraConst::parseLevels(CameraConst *cc, int bw, void *ji_) CameraConst * CameraConst::parseEntry(void *cJSON_, const char *make_model) { - CameraConst *cc = nullptr; cJSON *js, *ji, *jranges; js = (cJSON *)cJSON_; - cc = new CameraConst; + CameraConst *cc = new CameraConst; cc->make_model = Glib::ustring(make_model); ji = cJSON_GetObjectItem(js, "dcraw_matrix"); @@ -317,6 +313,7 @@ CameraConst::parseEntry(void *cJSON_, const char *make_model) return cc; parse_error: + delete cc; return nullptr; } @@ -418,6 +415,18 @@ CameraConst::update_Levels(const CameraConst *other) // } } +void +CameraConst::update_Crop(CameraConst *other) +{ + if (!other) { + return; + } + + if (other->has_rawCrop()) { + other->get_rawCrop(raw_crop[0], raw_crop[1], raw_crop[2], raw_crop[3]); + } +} + bool CameraConst::get_Levels(struct camera_const_levels & lvl, int bw, int iso, float fnumber) { @@ -668,6 +677,7 @@ CameraConstantsStore::parse_camera_constants_file(Glib::ustring filename_) existingcc->update_dcrawMatrix(cc->get_dcrawMatrix()); // deleting all the existing levels, replaced by the new ones existingcc->update_Levels(cc); + existingcc->update_Crop(cc); if (settings->verbose) { printf("Merging camera constants for \"%s\"\n", make_model.c_str()); @@ -696,6 +706,14 @@ CameraConstantsStore::CameraConstantsStore() { } + +CameraConstantsStore::~CameraConstantsStore() +{ + for (auto &p : mCameraConstants) { + delete p.second; + } +} + void CameraConstantsStore::init(Glib::ustring baseDir, Glib::ustring userSettingsDir) { parse_camera_constants_file(Glib::build_filename(baseDir, "camconst.json")); diff --git a/rtengine/camconst.h b/rtengine/camconst.h index b57c3fee9..31b65f3e8 100644 --- a/rtengine/camconst.h +++ b/rtengine/camconst.h @@ -26,7 +26,6 @@ private: std::map mApertureScaling; CameraConst(); - ~CameraConst(); static bool parseLevels(CameraConst *cc, int bw, void *ji); static bool parseApertureScaling(CameraConst *cc, void *ji); bool get_Levels(struct camera_const_levels & lvl, int bw, int iso, float fnumber); @@ -43,6 +42,7 @@ public: int get_BlackLevel(int idx, int iso_speed); int get_WhiteLevel(int idx, int iso_speed, float fnumber); void update_Levels(const CameraConst *other); + void update_Crop(CameraConst *other); }; class CameraConstantsStore @@ -54,6 +54,7 @@ private: bool parse_camera_constants_file(Glib::ustring filename); public: + ~CameraConstantsStore(); void init(Glib::ustring baseDir, Glib::ustring userSettingsDir); static CameraConstantsStore *getInstance(void); CameraConst *get(const char make[], const char model[]); diff --git a/rtengine/camconst.json b/rtengine/camconst.json index 7ddcefaba..137339ceb 100644 --- a/rtengine/camconst.json +++ b/rtengine/camconst.json @@ -444,7 +444,7 @@ Camera constants: { "aperture": 2.2, "scale_factor": 1.035 }, // 13954/13422=1.039 { "aperture": 2.5, "scale_factor": 1.025 }, // 11400/11000=1.028 { "aperture": 2.8, "scale_factor": 1.015 }, // 13562/13422 - 13731,13688,13562 - { "aperture": 3.2, "scale_factor": 1.010 }, // + { "aperture": 3.2, "scale_factor": 1.010 }, // guessed { "aperture": 3.5, "scale_factor": 1.005 } // 13508/13422 ] } @@ -470,7 +470,7 @@ Camera constants: { "aperture": 1.8, "scale_factor": 1.040 }, // 15501/14733=1.0521, 15352/14733=1.042 16030/15390 { "aperture": 2.0, "scale_factor": 1.025 }, // 15129/14733=1.0268 - 15800/15383=1.027 { "aperture": 2.2, "scale_factor": 1.013 }, // 15591/15383, 14931/14733 - { "aperture": 2.5, "scale_factor": 1.008 }, // 14857/14733guessed + { "aperture": 2.5, "scale_factor": 1.008 }, // 14857/14733 { "aperture": 2.8, "scale_factor": 1.003 }, // 14783/14733 15435/15383 { "aperture": 3.2, "scale_factor": 1.001 }, // 15409/15383 { "aperture": 3.5, "scale_factor": 1.000 } // 14733/14733 @@ -509,6 +509,41 @@ Camera constants: } }, + { // Quality B, some missing scaling factors are safely guessed + "make_model": "Canon EOS 6D Mark II", + "dcraw_matrix": [ 6875,-970,-932,-4691,12459,2501,-874,1953,5809 ], // DNG v_9.12 D65 + "raw_crop": [ 120, 44, 6264, 4180 ], // fullraw size 6384x4224 usefull 120,44,6264x4180 + // "raw_crop": [ 128, 52, 6248, 4168 ], // official jpeg crop 120+12,44+12,6240x4160 + "masked_areas": [ 44, 4, 4220, 116 ], + "ranges": { + "white": [ + { "iso": [ 50, 100, 125, 200, 250, 400, 500, 800, 1000, 1600, 2000, 3200 ], "levels": 16300 }, // typical 16383 + { "iso": [ 4000, 6400, 8000, 12800 ], "levels": 16200 }, // typical 16383 + { "iso": [ 16000, 25600 ], "levels": 16100 }, // typical 16383 + { "iso": [ 160 ], "levels": 13000 }, // typical 13044 + { "iso": [ 320, 640, 1250, 2500 ], "levels": 13250 }, // typical 13337 + { "iso": [ 5000, 10000 ], "levels": 13100 }, // typical 13367 + { "iso": [ 20000, 40000 ], "levels": 12900 }, // typical 13367 + { "iso": [ 51200, 102400 ], "levels": 15900 } // typical 16383 + ], + "white_max": 16383, + "aperture_scaling": [ + // no scale factors known for f/1.0 (had no lenses to test with), but the + // ISO 160-320... 13044 white levels maxes out at "white_max" for f/1.2 and below anyway. + { "aperture": 1.2, "scale_factor": 1.130 }, // guessed + { "aperture": 1.4, "scale_factor": 1.100 }, // guessed + { "aperture": 1.6, "scale_factor": 1.080 }, // guessed + { "aperture": 1.8, "scale_factor": 1.060 }, // 13890/13044=1.065 11284/10512 = 1.073 + { "aperture": 2.0, "scale_factor": 1.040 }, // 13602/13044=1.042 11151/10512 = 1.060 + { "aperture": 2.2, "scale_factor": 1.030 }, // 10982/10512=1.045 + { "aperture": 2.5, "scale_factor": 1.020 }, // 10840/10512 = 1.030 + { "aperture": 2.8, "scale_factor": 1.010 }, // 13530/13367= 1.012 - 12225/12048 = 1.015 + { "aperture": 3.2, "scale_factor": 1.005 }, // 12194/12048 = 1.012 + { "aperture": 3.5, "scale_factor": 1.000 } // 12092/12048 = 1.004 + ] + } + }, + { // Quality A, ISO and aperture WL data by CharlyW at RawTherapee forums, missing samples safely guessed "make_model": "Canon EOS 7D", "dcraw_matrix": [ 5962,-171,-732,-4189,12307,2099,-911,1981,6304 ], // Colin Walker @@ -696,7 +731,7 @@ Camera constants: } }, - { // Quality C, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed + { // Quality B, White Levels not properly indicated, aperture scaling..missing scaling factors are guessed "make_model": "Canon EOS 80D", "dcraw_matrix": [ 7457,-671,-937,-4849,12495,2643,-1213,2354,5492 ], // DNG_V9.5 D65 "raw_crop": [ 264, 34, 6024, 4022 ], // full size 6288x4056, official crop 276,46,6275,4045 @@ -728,6 +763,38 @@ Camera constants: } }, + { // Quality B, aperture scaling..missing scaling factors are guessed + "make_model": [ "Canon EOS 77D", "Canon EOS 9000D" ], + "dcraw_matrix": [ 7377,-742,-998,-4235,11981,2549,-673,1918,5538 ], // DNG_V9.10.1 D65 + "raw_crop": [ 264, 36, 6024, 4020 ], // full size 6288x4056, official crop 276,48,6275,4047 + "masked_areas": [ 40, 96, 4000, 260 ], + "ranges": { + "white": [ + { "iso": [ 100 ], "levels": 16300 }, // nominal 16383 + { "iso": [ 125, 200, 250, 400 ], "levels": 16300 }, // nominal 16383 + { "iso": [ 160 ], "levels": 13000 }, // nominal 13109, + { "iso": [ 320, 640, 1250 ], "levels": 13300 }, // G1,G2 13403 + { "iso": [ 500, 800, 1000 ], "levels": 16200 }, // nominal 16383 + { "iso": [ 1600, 2000, 3200 ], "levels": 16100 }, // nominal 16383 + { "iso": [ 2500, 5000 ], "levels": 13150 }, // G1,G2 13423 + { "iso": [ 4000, 6400 ], "levels": 16000 }, // nominal 16383 + { "iso": [ 8000, 10000,12800, 16000 ], "levels": 15800 }, // R,G1,G2 16383 + { "iso": [ 25600, 51200 ], "levels": 15500 } // R,G1,G2 16383 + ], + "white_max": 16383, + "aperture_scaling": [ + // need for more data to properly fill all scale factors + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.130 }, // 15264/13423 + { "aperture": 1.8, "scale_factor": 1.090 }, // guessed + { "aperture": 2.0, "scale_factor": 1.060 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.005 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 } // guessed + ] + } + }, + // Canon mid-range DSLRs (Rebels) { // Quality B, ISO and aperture WL data by ..... at RawTherapee forums, missing samples safely guessed @@ -837,6 +904,70 @@ Camera constants: } }, + { // Quality C, white levels and apperture scaling copied from Canon EOS77d + "make_model": [ "Canon EOS Rebel T7i", "Canon EOS 800D", "Canon EOS Kiss X9i" ], + "dcraw_matrix": [ 6970,-512,-968,-4425,12161,2553,-739,1982,5601 ], // DNG_V9.10.1 D65 + "raw_crop": [ 264, 36, 6024, 4020 ], // full size 6288x4056, official crop 276,48,6275,4047 + "masked_areas": [ 40, 96, 4000, 260 ], + "ranges": { + "white": [ + { "iso": [ 100 ], "levels": 16300 }, // nominal 16383 + { "iso": [ 125, 200, 250, 400 ], "levels": 16300 }, // nominal 16383 + { "iso": [ 160 ], "levels": 13000 }, // nominal 13109, + { "iso": [ 320, 640, 1250 ], "levels": 13300 }, // G1,G2 13403 + { "iso": [ 500, 800, 1000 ], "levels": 16200 }, // nominal 16383 + { "iso": [ 1600, 2000, 3200 ], "levels": 16100 }, // nominal 16383 + { "iso": [ 2500, 5000 ], "levels": 13150 }, // G1,G2 13423 + { "iso": [ 4000, 6400 ], "levels": 16000 }, // nominal 16383 + { "iso": [ 8000, 10000,12800, 16000 ], "levels": 15800 }, // R,G1,G2 16383 + { "iso": [ 25600, 51200 ], "levels": 15500 } // R,G1,G2 16383 + ], + "white_max": 16383, + "aperture_scaling": [ + // need for more data to properly fill all scale factors + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.130 }, // 15264/13423 + { "aperture": 1.8, "scale_factor": 1.090 }, // guessed + { "aperture": 2.0, "scale_factor": 1.060 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.005 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 } // guessed + ] + } + }, + + { // Quality B, apperture scaling copied from Canon EOS77d + "make_model": [ "Canon EOS Rebel SL2", "Canon EOS 200D", "Canon EOS Kiss X9" ], + "dcraw_matrix": [ 7377,-742,-998,-4235,11981,2549,-673,1918,5538 ], // DNG_V9.12 D65 + "raw_crop": [ 264, 36, 6024, 4020 ], // full size 6288x4056, official crop 276,48,6275,4047 + "masked_areas": [ 40, 96, 4000, 260 ], + "ranges": { + "white": [ + { "iso": [ 100 ], "levels": 16300 }, // nominal 16383 + { "iso": [ 125, 200, 250, 400 ], "levels": 16300 }, // nominal 16383 + { "iso": [ 160 ], "levels": 13000 }, // nominal 13106, + { "iso": [ 320, 640, 1250 ], "levels": 13300 }, // G1,G2 13423 + { "iso": [ 500, 800, 1000 ], "levels": 16200 }, // nominal 16383 + { "iso": [ 1600, 2000, 3200 ], "levels": 16100 }, // nominal 16383 + { "iso": [ 2500, 5000 ], "levels": 13150 }, // G1,G2 13423 + { "iso": [ 4000, 6400 ], "levels": 16000 }, // nominal 16383 + { "iso": [ 8000, 10000,12800, 16000 ], "levels": 15800 }, // R,G1,G2 16383 + { "iso": [ 25600, 51200 ], "levels": 15500 } // R,G1,G2 16383 + ], + "white_max": 16383, + "aperture_scaling": [ + // need for more data to properly fill all scale factors + { "aperture": 1.4, "scale_factor": 1.200 }, // guessed + { "aperture": 1.6, "scale_factor": 1.130 }, // 15264/13423 + { "aperture": 1.8, "scale_factor": 1.090 }, // guessed + { "aperture": 2.0, "scale_factor": 1.060 }, // guessed + { "aperture": 2.2, "scale_factor": 1.025 }, // guessed + { "aperture": 2.5, "scale_factor": 1.005 }, // guessed + { "aperture": 2.8, "scale_factor": 1.000 } // guessed + ] + } + }, + // Canon low-range DSLRs // Canon EOS 1200D/Rebel T5/Kiss X70" is upper at the same item as 600D/T3i/X5 @@ -958,7 +1089,7 @@ Camera constants: }, { // Quality C, White Levels not properly indicated, aperture scaling..missing factors are guessed - "make_model": "Canon EOS M5", + "make_model": [ "Canon EOS M5","Canon EOS M6" ], "dcraw_matrix": [ 8532,-701,-1167,-4095,11879,2508,-797,2424,7010 ], // DNG_V9.8 D65 "raw_crop": [ 264, 36, 6024, 4020 ], // full size 6288x4056, //"raw_crop": [ 272, 44, 6008, 4008 ], // matched to official crop 276,48,6275,4047 - official jpeg 6000X4000 @@ -966,11 +1097,13 @@ Camera constants: "ranges": { "white": [ { "iso": [ 100, 125, 200, 250 ], "levels": 15600 }, // nominal 15660-15800 - { "iso": [ 160 ], "levels": 13000 }, // guessed - { "iso": [ 320 ], "levels": 13200 }, // nominal green13528-14466-14380-14368 - blue13262-14186, - { "iso": [ 640, 1250 ], "levels": 13150 }, // iso 640 G1,G2 13260-13450 - blue13230-13430 -iso 1250 13430 - { "iso": [ 2500, 5000, 10000 ], "levels": 13100 }, // - { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400 ], "levels": 16100 }, // 16383 + { "iso": [ 160 ], "levels": 12600 }, // green 12650-12750 + { "iso": [ 320 ], "levels": 13100 }, // nominal green 13200, 13528-14466-14380-14368 - blue13262-14186, + { "iso": [ 640, 1250 ], "levels": 13200 }, // iso 640 G1,G2 13260-13450 - blue13230-13430 -iso 1250 13430 + { "iso": [ 2500, 5000, 10000 ], "levels": 13000 }, // + { "iso": [ 400, 500, 800, 1000, 1600, 2000, 3200, 4000, 6400 ], "levels": 16100 }, // 16383 + // { "iso": [ 1600 ], "levels": 15000 }, // one sample of m6 = 15100 !! + // { "iso": [ 6400 ], "levels": 15500 }, // one sample of m6 = 15600 !! { "iso": [ 8000, 12800, 16000, 25600 ], "levels": 16000 } // R,G1,G2 16383, B 16243 ], "white_max": 16383, @@ -978,8 +1111,8 @@ Camera constants: // need for more data to properly fill all scale factors { "aperture": 1.4, "scale_factor": 1.200 }, // 31/25 { "aperture": 1.6, "scale_factor": 1.080 }, // guessed - { "aperture": 1.8, "scale_factor": 1.050 }, // guessed - { "aperture": 2.0, "scale_factor": 1.030 }, // 15292/ 14916/ 320-14466/ 320-13528/ + { "aperture": 1.8, "scale_factor": 1.060 }, // guessed + { "aperture": 2.0, "scale_factor": 1.040 }, // 15292/ 14916/ 320-14466/ 320-13528/ { "aperture": 2.2, "scale_factor": 1.020 }, // guessed { "aperture": 2.5, "scale_factor": 1.010 }, // guessed { "aperture": 2.8, "scale_factor": 1.000 }, // @@ -1048,12 +1181,12 @@ Camera constants: }, { // Quality B, - "make_model": [ "Canon PowerShot G5 X", "Canon PowerShot G9 X", "Canon PowerShot G7 X Mark II" ], + "make_model": [ "Canon PowerShot G5 X", "Canon PowerShot G9 X", "Canon PowerShot G7 X Mark II", "Canon PowerShot G9 X Mark II" ], "dcraw_matrix": [ 9602,-3823,-937,-2984,11495,1675,-407,1415,5049 ], // DNG_V8.7 D65 //"raw_crop": [ 116, 24, 5504, 3680 ], // Sensor size 5632x3710. Largest useful frame 120-5616X28-3702 = 5504x3682, 4pix RTborders, Left Border 120-4, Top border 28-4 "raw_crop": [ 128, 36, 5480, 3656 ], // Default official 3/2 frame 5472X3648, 4pix borders, Left Border 132-4, Top border 40-4 "masked_areas": [ 40, 4, 3680, 76 ], - "ranges": { "white": 16300 } + "ranges": { "white": 15500 } // some sporadic samples are clipped lower than 16383, one ISO125 sample at 15500 }, { // Quality A, changes for raw crop which is wrong (larger) in dcraw @@ -1072,6 +1205,15 @@ Camera constants: "ranges": { "white": 4050 } // nominal 4080-4093 }, + { // Quality B + "make_model": "FUJIFILM GFX 50S", + "dcraw_matrix": [ 11756,-4754,-874,-3056,11045,2305,-381,1457,6006 ], // DNGv9.9 D65 + //"dcraw_matrix": [ 12407,-5222,-1086,-2971,11116,2120,-294,1029,5284 ], // copy from X-A3 DNGv9.8 D65 + "raw_crop": [ 0, 0, 8280, 6208 ], // full raw 9216X6210 - usefull 8280x6208 + //"raw_crop": [ 6, 6, 8264, 6200 ], // fuji official JPEG 8256X6192 10,11,9,8 - experimental crop to match with official + "ranges": { "white": 16000 } + }, + { // Quality A "make_model": "FUJIFILM S1", "dcraw_matrix": [ 12297,-4882,-1202,-2106,10691,1623,-88,1312,4790 ] // DNG_v8.5 D65 @@ -1123,7 +1265,7 @@ Camera constants: }, { // Quality B - "make_model": [ "FUJIFILM X-PRO2", "FUJIFILM X-T2" ], + "make_model": [ "FUJIFILM X-PRO2", "FUJIFILM X-T2", "FUJIFILM X100F", "FUJIFILM X-T20" ], "dcraw_matrix": [ 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 ], // DNG_v9.4 D65 //"raw_crop": [ 0, 0, 6032, 4032 ], // full raw 6160,4032, Usable 6032,4032 - experimental crop "ranges": { "white": 16100 } @@ -1153,11 +1295,17 @@ Camera constants: "raw_crop": [ 4, 4, -4, -4 ] // full raw 6016x4016, Official 6000x4000 }, - { // Quality B, frame corrections + { // Quality C "make_model": "LG mobile LG-H815", "dcraw_matrix": [ 5859,547,-1250,-6484,15547,547,-2422,5625,3906 ], // DNG D65 - "raw_crop": [ 0, 0, -8, 0 ], // full frame 5312x2988, 8 black columns at the left - "ranges": { "white_max": 1023 } + //"dcraw_matrix": [ 11563,-2891,-3203,-5313,15625,625,-781,2813,5625 ], // DNG A + "ranges": { "white_max": 1000 } + }, + { // Quality C + "make_model": "LG mobile LG-H850", + //"dcraw_matrix": [ 10000,-2188,-2813,-5156,15469,625,-703,2734,5078 ], // DNG A + "dcraw_matrix": [ 5313,1016,-1172,-6250,15391,547,-2344,5547,3359 ], // DNG D65 + "ranges": { "white_max": 1000 } }, { // Quality A @@ -1280,6 +1428,12 @@ Camera constants: "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety, }, + { // Quality B + "make_model": "Nikon D7500", + "dcraw_matrix": [ 8813,-3210,-1036,-4703,12868,2021,-1054,1940,6129 ], // adobe dng_v9.12 d65 + "ranges": { "white": 16300 } // WL value is for 14-bit files, RT auto adapts it for 12-bit files. WL typical 16383 set to 16300 for safety, + }, + { // Quality B, samples by joachip at RT forums, are measures at long exposures with LongExposureNoiseReduction // aperture scaling known to exist, but little to gain as the levels are so close to white_max "make_model": "Nikon D600", @@ -1329,7 +1483,7 @@ Camera constants: }, { // Quality B, data from RussellCottrell at RT forums. Largest aperture scale factor is 1.013, about 1/50th of a stop - "make_model": "Nikon D800E", + "make_model": [ "Nikon D800", "Nikon D800E" ], "dcraw_matrix": [ 7866,-2108,-555,-4869,12483,2681,-1176,2069,7501 ], // D800/D800E from dcraw.c "ranges": { "white": [ @@ -1347,6 +1501,12 @@ Camera constants: "ranges": { "white": 16300 } // WL values for 14-bit files, RT auto adapts it for 12-bit files. Typical WL at 16383 }, + { // Quality B + "make_model": "Nikon D80", + "dcraw_matrix": [ 8629,-2410,-883,-9055,16940,2171,-1490,1363,8520 ], // Dcraw.c d65 + "ranges": { "white": 3980 } // 12-bit files. + }, + { // Quality B, 16Mp and 64Mp raw frames "make_model": "OLYMPUS E-M5MarkII", "dcraw_matrix": [ 9422,-3258,-711,-2655,10898,2015,-512,1354,5512 ], // DNG_v8.8 D65 @@ -1420,6 +1580,12 @@ Camera constants: "ranges": { "white": 4050 } // safe for worst case detected, nominal is 4093 }, + { // Quality B, + "make_model": "OLYMPUS TG-5", + "dcraw_matrix": [ 10899,-3833,-1082,-2112,10736,1575,-267,1452,5269 ], // DNG_V9.12 D65 + "ranges": { "white": 4050 } // safe for worst case detected, nominal is 4093 + }, + /* Since dcraw_v9.21 Panasonic base BL is read from Exif (tags 0x001c BlackLevelRed15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset, 0x001d BlackLevelGreen, 0x001e BlackLevelBlue and we define here the needed offset of around 15. The total BL is base+offset @@ -1594,7 +1760,7 @@ Camera constants: { // Quality A, Replicated from rawimage.cc "make_model": "Panasonic DMC-GH2", - // "dcraw_matrix": [ 6855,-1765,-456,-4223,11600,2996,-1450,2602,5761 ], // Colin Walker - disabled due to problems with underwater + //"dcraw_matrix": [ 6855,-1765,-456,-4223,11600,2996,-1450,2602,5761 ], // Colin Walker - disabled due to problems with underwater "dcraw_matrix": [ 7780,-2410,-806,-3913,11724,2484,-1018,2390,5298 ], // dcraw d65 "ranges": { "black": 15, // 15 is BL offset. dcraw/RT read the base black from Exif and calculates total BL = BLbase+BLoffset @@ -1630,6 +1796,19 @@ Camera constants: } }, + { // Quality C + "make_model": "Panasonic DC-GH5", + "dcraw_matrix": [ 7641,-2336,-605,-3218,11299,2187,-485,1338,5121 ], // DNG_v9.9 D65 + "ranges": { + "black": 15, // 16 is BL offset. dcraw/RT read the base BL from Exif and calculates total BL = BLbase+BLoffset + "white": [ + { "iso": 100, "levels": 4080 }, // Exif_linearitylimit 2111 + { "iso": 125, "levels": 4080 }, // Exif_linearitylimit 2626 + { "iso": [ 160, 200, 250, 320, 400,500, 640, 800, 1000, 1250, 1600, 2000, 2500, 3200, 4000, 5000, 6400, 12800, 25600 ], "levels": 4080 } // nominal 4095 + ] + } + }, + { // Quality A "make_model": "Panasonic DMC-GM1", "dcraw_matrix": [ 6770,-1895,-744,-5232,13145,2303,-1664,2691,5703 ], @@ -1765,7 +1944,7 @@ Camera constants: //"dcraw_matrix": [ 8050,-2061,-1264,-4359,12953,1515,-1096,1965,6075 ], // PENTAX DNG D65 "dcraw_matrix": [ 8766,-3149,-747,-3976,11943,2292,-517,1259,5552 ], // Adobe DNGv9.8 D65 "raw_crop": [ 58, 28, 6022, 4020 ], // full frame 6080x4064, usefull raw frame 56,28,6080,4049, official DNG raw_crop 58,28,6080,4052, official jpeg crop 58+8,28+4 6000x4000 - // "raw_crop": [ 62, 28, 6000, 4000 ], // matched to official jpeg crop 58+8,28+4 6000x4000 + //"raw_crop": [ 62, 28, 6000, 4000 ], // matched to official jpeg crop 58+8,28+4 6000x4000 "ranges": { "white": [ { "iso": 100, "levels": 16300 }, // 16319-16377 @@ -1780,11 +1959,31 @@ Camera constants: } }, + { // Quality B, Intemediate ISO samples missing. Pentax_DNG WLtags are after BL sutraction and not valid + "make_model": [ "RICOH PENTAX KP", "PENTAX KP" ], + "dcraw_matrix": [ 7357,-2031,-1320,-4842,13555,1349,-1538,2416,5736 ], // Adobe DNGv9.12 D65 + "raw_crop": [ 52, 28, 6032, 4030 ], // full frame 6112x4060, usefull raw frame 52,28,6084,4049, official DNG raw_crop 54,28,6082,4060 + "ranges": { + "white": [ + { "iso": 100, "levels": 16300 }, // 16383 + { "iso": 200, "levels": 16250 }, // 16383 + { "iso": 400, "levels": 16250 }, // 16383 + { "iso": 800, "levels": 16200 }, // 16383 + { "iso": 1600, "levels": 16100 }, // 16383 + { "iso": [ 3200, 6400 ], "levels": 16000 }, // 16383 + { "iso": [ 12800, 25600 ], "levels": 15800 }, // 16383 + { "iso": [ 51200, 102400 ], "levels": 15500 }, // 16383 + { "iso": [ 204800, 409600 ], "levels": 15000 }, // 16383 + { "iso": [ 819200 ], "levels": 14500 } // 16383-16200 + ] + } + }, + { // Quality B, Intemediate ISO samples missing, Pentax_DNG WLtags are after BL sutraction and not valid "make_model": [ "RICOH PENTAX K-1", "PENTAX K-1" ], "dcraw_matrix": [ 8596,-2981,-639,-4202,12046,2431,-685,1424,6122 ], // adobe DNG v9.7 D65 //"dcraw_matrix": [ 8566,-2746,-1201,-3612,12204,1550,-893,1680,6264 ], // PENTAX DNG - "raw_crop": [ 6, 18, 7376, 4932 ], // full frame 7392x4950, cropped to official DNG raw_crop 6,18,7382,4950, official jpeg crop 8,10,7360x4912 + //"raw_crop": [ 6, 18, 7376, 4932 ], // full frame 7392x4950, cropped to official DNG raw_crop 6,18,7382,4950, official jpeg crop 8,10,7360x4912 "ranges": { "white": [ { "iso": [ 100, 200, 400, 800 ], "levels": 16300 }, // 16380 @@ -1920,6 +2119,10 @@ Camera constants: "raw_crop": [ 12, 0, -110, -62 ] // for small size all numbers/2 }, + { // Quality C, only raw crop for now - see #3858 + "make_model": "Sigma sd Quattro", + "raw_crop": [ 200, 74, 5632, 3698 ] + }, { // Quality A, correction for color matrix from Colin Walker's d50 to dng d65 "make_model": "Sony NEX-C3", //"dcraw_matrix": [ 5130,-1055,-269,-4473,11797,3050,-701,1310,7121 ], // Colin walker's d50 kept for possible consistency issues @@ -2003,6 +2206,13 @@ Camera constants: "ranges": { "black": 512, "white": 16300 } }, + { // Quality B, color matrix copied from a7rm2 + "make_model": "Sony ILCE-9", + "dcraw_matrix": [ 6389,-1703,-378,-4562,12265,2587,-670,1489,6550 ], // DNG_v9.12 D65 + "raw_crop": [ 8, 8, 6008, 4008 ], // full raw frame 6048x4024 Dcraw auto identify 6024x4024, jpeg 12,12,6000x4000 + "ranges": { "black": 512, "white": 16300 } + }, + { // Quality B, correction for frame width "make_model": [ "Sony ILCE-7S", "Sony ILCE-7SM2" ], "dcraw_matrix": [ 5838,-1430,-246,-3497,11477,2297,-748,1885,5778 ], // DNG_v9.2 D65 diff --git a/rtengine/cfa_linedn_RT.cc b/rtengine/cfa_linedn_RT.cc index 21fcfb1e5..0f9e27634 100644 --- a/rtengine/cfa_linedn_RT.cc +++ b/rtengine/cfa_linedn_RT.cc @@ -46,7 +46,7 @@ void RawImageSource::CLASS cfa_linedn(float noise) const float clip_pt = 0.8 * initialGain * 65535.0; - float eps = 1e-5; //tolerance to avoid dividing by zero + const float eps = 1e-5; //tolerance to avoid dividing by zero const float gauss[5] = {0.20416368871516755, 0.18017382291138087, 0.1238315368057753, 0.0662822452863612, 0.02763055063889883}; const float rolloff[8] = {0, 0.135335, 0.249352, 0.411112, 0.606531, 0.800737, 0.945959, 1}; //gaussian with sigma=3 @@ -231,7 +231,7 @@ void RawImageSource::CLASS cfa_linedn(float noise) for (int col = 16 + left, indx = rr * TS + 16; indx < rr * TS + numcols - 16; indx++, col++) { if (rawData[row][col] < clip_pt && cfadn[indx] < clip_pt) { - RawDataTmp[row * width + col] = CLIP((int)(cfadn[indx] + 0.5f)); + RawDataTmp[row * width + col] = CLIP(cfadn[indx]); } } } diff --git a/rtengine/ciecam02.cc b/rtengine/ciecam02.cc index f10ae4b31..488093060 100644 --- a/rtengine/ciecam02.cc +++ b/rtengine/ciecam02.cc @@ -39,10 +39,10 @@ namespace rtengine extern const Settings* settings; #endif -void Ciecam02::curvecolor(double satind, double satval, double &sres, double parsat) +void Ciecam02::curvecolor (double satind, double satval, double &sres, double parsat) { if (satind >= 0.0) { - sres = (1. - (satind) / 100.) * satval + (satind) / 100.*(1. - SQR(SQR(1. - min(satval, 1.0)))); + sres = (1. - (satind) / 100.) * satval + (satind) / 100.* (1. - SQR (SQR (1. - min (satval, 1.0)))); if (sres > parsat) { sres = parsat; @@ -58,17 +58,17 @@ void Ciecam02::curvecolor(double satind, double satval, double &sres, double par } } -void Ciecam02::curvecolorfloat(float satind, float satval, float &sres, float parsat) +void Ciecam02::curvecolorfloat (float satind, float satval, float &sres, float parsat) { if (satind > 0.f) { if (satval >= 1.f) { // The calculation below goes wrong direction when satval > 1 sres = satval; } else { - sres = (1.f - (satind) / 100.f) * satval + (satind) / 100.f * (1.f - SQR(SQR(1.f - min(satval, 1.0f)))); + sres = (1.f - (satind) / 100.f) * satval + (satind) / 100.f * (1.f - SQR (SQR (1.f - min (satval, 1.0f)))); } if (sres > parsat) { - sres = max(parsat, satval); + sres = max (parsat, satval); } } else if (satind < 0.f) { sres = satval * (1.f + (satind) / 100.f); @@ -79,35 +79,35 @@ void Ciecam02::curvecolorfloat(float satind, float satval, float &sres, float pa void Ciecam02::curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & histogram ) { - LUTf dcurve(65536, 0); + LUTf dcurve (65536, 0); int skip = 1; // check if brightness curve is needed if (br > 0.00001 || br < -0.00001) { std::vector brightcurvePoints; - brightcurvePoints.resize(9); - brightcurvePoints.at(0) = double(DCT_NURBS); + brightcurvePoints.resize (9); + brightcurvePoints.at (0) = double (DCT_NURBS); - brightcurvePoints.at(1) = 0.; // black point. Value in [0 ; 1] range - brightcurvePoints.at(2) = 0.; // black point. Value in [0 ; 1] range + brightcurvePoints.at (1) = 0.; // black point. Value in [0 ; 1] range + brightcurvePoints.at (2) = 0.; // black point. Value in [0 ; 1] range if (br > 0) { - brightcurvePoints.at(3) = 0.1; // toe point - brightcurvePoints.at(4) = 0.1 + br / 150.0; //value at toe point + brightcurvePoints.at (3) = 0.1; // toe point + brightcurvePoints.at (4) = 0.1 + br / 150.0; //value at toe point - brightcurvePoints.at(5) = 0.7; // shoulder point - brightcurvePoints.at(6) = min(1.0, 0.7 + br / 300.0); //value at shoulder point + brightcurvePoints.at (5) = 0.7; // shoulder point + brightcurvePoints.at (6) = min (1.0, 0.7 + br / 300.0); //value at shoulder point } else { - brightcurvePoints.at(3) = 0.1 - br / 150.0; // toe point - brightcurvePoints.at(4) = 0.1; // value at toe point + brightcurvePoints.at (3) = 0.1 - br / 150.0; // toe point + brightcurvePoints.at (4) = 0.1; // value at toe point - brightcurvePoints.at(5) = min(1.0, 0.7 - br / 300.0); // shoulder point - brightcurvePoints.at(6) = 0.7; // value at shoulder point + brightcurvePoints.at (5) = min (1.0, 0.7 - br / 300.0); // shoulder point + brightcurvePoints.at (6) = 0.7; // value at shoulder point } - brightcurvePoints.at(7) = 1.; // white point - brightcurvePoints.at(8) = 1.; // value at white point + brightcurvePoints.at (7) = 1.; // white point + brightcurvePoints.at (8) = 1.; // value at white point DiagonalCurve* brightcurve = new DiagonalCurve (brightcurvePoints, CURVES_MIN_POLY_POINTS / skip); @@ -121,7 +121,7 @@ void Ciecam02::curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & val = brightcurve->getVal (val); // store result in a temporary array - dcurve[i] = CLIPD(val); + dcurve[i] = CLIPD (val); } delete brightcurve; @@ -149,20 +149,20 @@ void Ciecam02::curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & avg /= sum; std::vector contrastcurvePoints; - contrastcurvePoints.resize(9); - contrastcurvePoints.at(0) = double(DCT_NURBS); + contrastcurvePoints.resize (9); + contrastcurvePoints.at (0) = double (DCT_NURBS); - contrastcurvePoints.at(1) = 0.; // black point. Value in [0 ; 1] range - contrastcurvePoints.at(2) = 0.; // black point. Value in [0 ; 1] range + contrastcurvePoints.at (1) = 0.; // black point. Value in [0 ; 1] range + contrastcurvePoints.at (2) = 0.; // black point. Value in [0 ; 1] range - contrastcurvePoints.at(3) = avg - avg * (0.6 - contr / 250.0); // toe point - contrastcurvePoints.at(4) = avg - avg * (0.6 + contr / 250.0); // value at toe point + contrastcurvePoints.at (3) = avg - avg * (0.6 - contr / 250.0); // toe point + contrastcurvePoints.at (4) = avg - avg * (0.6 + contr / 250.0); // value at toe point - contrastcurvePoints.at(5) = avg + (1 - avg) * (0.6 - contr / 250.0); // shoulder point - contrastcurvePoints.at(6) = avg + (1 - avg) * (0.6 + contr / 250.0); // value at shoulder point + contrastcurvePoints.at (5) = avg + (1 - avg) * (0.6 - contr / 250.0); // shoulder point + contrastcurvePoints.at (6) = avg + (1 - avg) * (0.6 + contr / 250.0); // value at shoulder point - contrastcurvePoints.at(7) = 1.; // white point - contrastcurvePoints.at(8) = 1.; // value at white point + contrastcurvePoints.at (7) = 1.; // white point + contrastcurvePoints.at (8) = 1.; // value at white point DiagonalCurve* contrastcurve = new DiagonalCurve (contrastcurvePoints, CURVES_MIN_POLY_POINTS / skip); @@ -186,8 +186,8 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf // check if brightness curve is needed if (br > 0.00001f || br < -0.00001f) { - std::vector brightcurvePoints(9); - brightcurvePoints[0] = double(DCT_NURBS); + std::vector brightcurvePoints (9); + brightcurvePoints[0] = double (DCT_NURBS); brightcurvePoints[1] = 0.f; // black point. Value in [0 ; 1] range brightcurvePoints[2] = 0.f; // black point. Value in [0 ; 1] range @@ -197,19 +197,19 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf brightcurvePoints[4] = 0.1f + br / 150.0f; //value at toe point brightcurvePoints[5] = 0.7f; // shoulder point - brightcurvePoints[6] = min(1.0f, 0.7f + br / 300.0f); //value at shoulder point + brightcurvePoints[6] = min (1.0f, 0.7f + br / 300.0f); //value at shoulder point } else { brightcurvePoints[3] = 0.1f - br / 150.0f; // toe point brightcurvePoints[4] = 0.1f; // value at toe point - brightcurvePoints[5] = min(1.0f, 0.7f - br / 300.0f); // shoulder point + brightcurvePoints[5] = min (1.0f, 0.7f - br / 300.0f); // shoulder point brightcurvePoints[6] = 0.7f; // value at shoulder point } brightcurvePoints[7] = 1.f; // white point brightcurvePoints[8] = 1.f; // value at white point - DiagonalCurve brightcurve(brightcurvePoints, CURVES_MIN_POLY_POINTS); + DiagonalCurve brightcurve (brightcurvePoints, CURVES_MIN_POLY_POINTS); // Applying brightness curve for (int i = 0; i < 32768; i++) { @@ -221,12 +221,12 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf val = brightcurve.getVal (val); // store result - outCurve[i] = CLIPD(val); + outCurve[i] = CLIPD (val); } } else { // set the identity curve - outCurve.makeIdentity(32767.f); + outCurve.makeIdentity (32767.f); } @@ -242,9 +242,9 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf } avg /= sum; - std::vector contrastcurvePoints(9); + std::vector contrastcurvePoints (9); - contrastcurvePoints[0] = double(DCT_NURBS); + contrastcurvePoints[0] = double (DCT_NURBS); contrastcurvePoints[1] = 0.f; // black point. Value in [0 ; 1] range contrastcurvePoints[2] = 0.f; // black point. Value in [0 ; 1] range @@ -258,11 +258,11 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf contrastcurvePoints[7] = 1.f; // white point contrastcurvePoints[8] = 1.f; // value at white point - DiagonalCurve contrastcurve(contrastcurvePoints, CURVES_MIN_POLY_POINTS); + DiagonalCurve contrastcurve (contrastcurvePoints, CURVES_MIN_POLY_POINTS); // apply contrast enhancement for (int i = 0; i < 32768; i++) { - outCurve[i] = contrastcurve.getVal(outCurve[i]); + outCurve[i] = contrastcurve.getVal (outCurve[i]); } } @@ -295,17 +295,17 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf * */ -double Ciecam02::d_factor( double f, double la ) +double Ciecam02::d_factor ( double f, double la ) { - return f * (1.0 - ((1.0 / 3.6) * exp((-la - 42.0) / 92.0))); + return f * (1.0 - ((1.0 / 3.6) * exp ((-la - 42.0) / 92.0))); } -float Ciecam02::d_factorfloat( float f, float la ) +float Ciecam02::d_factorfloat ( float f, float la ) { - return f * (1.0f - ((1.0f / 3.6f) * xexpf((-la - 42.0f) / 92.0f))); + return f * (1.0f - ((1.0f / 3.6f) * xexpf ((-la - 42.0f) / 92.0f))); } -double Ciecam02::calculate_fl_from_la_ciecam02( double la ) +double Ciecam02::calculate_fl_from_la_ciecam02 ( double la ) { double la5 = la * 5.0; double k = 1.0 / (la5 + 1.0); @@ -314,10 +314,10 @@ double Ciecam02::calculate_fl_from_la_ciecam02( double la ) k = k * k; k = k * k; - return (0.2 * k * la5) + (0.1 * (1.0 - k) * (1.0 - k) * std::cbrt(la5)); + return (0.2 * k * la5) + (0.1 * (1.0 - k) * (1.0 - k) * std::cbrt (la5)); } -float Ciecam02::calculate_fl_from_la_ciecam02float( float la ) +float Ciecam02::calculate_fl_from_la_ciecam02float ( float la ) { float la5 = la * 5.0f; float k = 1.0f / (la5 + 1.0f); @@ -326,66 +326,66 @@ float Ciecam02::calculate_fl_from_la_ciecam02float( float la ) k = k * k; k = k * k; - return (0.2f * k * la5) + (0.1f * (1.0f - k) * (1.0f - k) * std::cbrt(la5)); + return (0.2f * k * la5) + (0.1f * (1.0f - k) * (1.0f - k) * std::cbrt (la5)); } -double Ciecam02::achromatic_response_to_white( double x, double y, double z, double d, double fl, double nbb, int gamu ) +double Ciecam02::achromatic_response_to_white ( double x, double y, double z, double d, double fl, double nbb, int gamu ) { double r, g, b; double rc, gc, bc; double rp, gp, bp; double rpa, gpa, bpa; gamu = 1; - xyz_to_cat02( r, g, b, x, y, z, gamu ); + xyz_to_cat02 ( r, g, b, x, y, z, gamu ); rc = r * (((y * d) / r) + (1.0 - d)); gc = g * (((y * d) / g) + (1.0 - d)); bc = b * (((y * d) / b) + (1.0 - d)); - cat02_to_hpe( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpe ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0); - gp = MAXR(gp, 0.0); - bp = MAXR(bp, 0.0); + rp = MAXR (rp, 0.0); + gp = MAXR (gp, 0.0); + bp = MAXR (bp, 0.0); } - rpa = nonlinear_adaptation( rp, fl ); - gpa = nonlinear_adaptation( gp, fl ); - bpa = nonlinear_adaptation( bp, fl ); + rpa = nonlinear_adaptation ( rp, fl ); + gpa = nonlinear_adaptation ( gp, fl ); + bpa = nonlinear_adaptation ( bp, fl ); return ((2.0 * rpa) + gpa + ((1.0 / 20.0) * bpa) - 0.305) * nbb; } -float Ciecam02::achromatic_response_to_whitefloat( float x, float y, float z, float d, float fl, float nbb, int gamu ) +float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int gamu ) { float r, g, b; float rc, gc, bc; float rp, gp, bp; float rpa, gpa, bpa; gamu = 1; - xyz_to_cat02float( r, g, b, x, y, z, gamu ); + xyz_to_cat02float ( r, g, b, x, y, z, gamu ); rc = r * (((y * d) / r) + (1.0f - d)); gc = g * (((y * d) / g) + (1.0f - d)); bc = b * (((y * d) / b) + (1.0f - d)); - cat02_to_hpefloat( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0f); - gp = MAXR(gp, 0.0f); - bp = MAXR(bp, 0.0f); + rp = MAXR (rp, 0.0f); + gp = MAXR (gp, 0.0f); + bp = MAXR (bp, 0.0f); } - rpa = nonlinear_adaptationfloat( rp, fl ); - gpa = nonlinear_adaptationfloat( gp, fl ); - bpa = nonlinear_adaptationfloat( bp, fl ); + rpa = nonlinear_adaptationfloat ( rp, fl ); + gpa = nonlinear_adaptationfloat ( gp, fl ); + bpa = nonlinear_adaptationfloat ( bp, fl ); return ((2.0f * rpa) + gpa + ((1.0f / 20.0f) * bpa) - 0.305f) * nbb; } -void Ciecam02::xyz_to_cat02( double &r, double &g, double &b, double x, double y, double z, int gamu ) +void Ciecam02::xyz_to_cat02 ( double &r, double &g, double &b, double x, double y, double z, int gamu ) { gamu = 1; @@ -403,7 +403,7 @@ void Ciecam02::xyz_to_cat02( double &r, double &g, double &b, double x, double y } } -void Ciecam02::xyz_to_cat02float( float &r, float &g, float &b, float x, float y, float z, int gamu ) +void Ciecam02::xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z, int gamu ) { gamu = 1; @@ -421,16 +421,16 @@ void Ciecam02::xyz_to_cat02float( float &r, float &g, float &b, float x, float y } } #ifdef __SSE2__ -void Ciecam02::xyz_to_cat02float( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z ) +void Ciecam02::xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z ) { //gamut correction M.H.Brill S.Susstrunk - r = ( F2V(1.007245f) * x) + (F2V(0.011136f) * y) - (F2V(0.018381f) * z);//Changjun Li - g = (F2V(-0.318061f) * x) + (F2V(1.314589f) * y) + (F2V(0.003471f) * z); + r = ( F2V (1.007245f) * x) + (F2V (0.011136f) * y) - (F2V (0.018381f) * z); //Changjun Li + g = (F2V (-0.318061f) * x) + (F2V (1.314589f) * y) + (F2V (0.003471f) * z); b = z; } #endif -void Ciecam02::cat02_to_xyz( double &x, double &y, double &z, double r, double g, double b, int gamu ) +void Ciecam02::cat02_to_xyz ( double &x, double &y, double &z, double r, double g, double b, int gamu ) { gamu = 1; @@ -448,7 +448,7 @@ void Ciecam02::cat02_to_xyz( double &x, double &y, double &z, double r, double g } } -void Ciecam02::cat02_to_xyzfloat( float &x, float &y, float &z, float r, float g, float b, int gamu ) +void Ciecam02::cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int gamu ) { gamu = 1; @@ -466,16 +466,16 @@ void Ciecam02::cat02_to_xyzfloat( float &x, float &y, float &z, float r, float g } } #ifdef __SSE2__ -void Ciecam02::cat02_to_xyzfloat( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) +void Ciecam02::cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) { //gamut correction M.H.Brill S.Susstrunk - x = ( F2V(0.99015849f) * r) - (F2V(0.00838772f) * g) + (F2V(0.018229217f) * b); //Changjun Li - y = ( F2V(0.239565979f) * r) + (F2V(0.758664642f) * g) + (F2V(0.001770137f) * b); + x = ( F2V (0.99015849f) * r) - (F2V (0.00838772f) * g) + (F2V (0.018229217f) * b); //Changjun Li + y = ( F2V (0.239565979f) * r) + (F2V (0.758664642f) * g) + (F2V (0.001770137f) * b); z = b; } #endif -void Ciecam02::hpe_to_xyz( double &x, double &y, double &z, double r, double g, double b ) +void Ciecam02::hpe_to_xyz ( double &x, double &y, double &z, double r, double g, double b ) { x = (1.910197 * r) - (1.112124 * g) + (0.201908 * b); y = (0.370950 * r) + (0.629054 * g) - (0.000008 * b); @@ -483,22 +483,22 @@ void Ciecam02::hpe_to_xyz( double &x, double &y, double &z, double r, double g, } -void Ciecam02::hpe_to_xyzfloat( float &x, float &y, float &z, float r, float g, float b ) +void Ciecam02::hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b ) { x = (1.910197f * r) - (1.112124f * g) + (0.201908f * b); y = (0.370950f * r) + (0.629054f * g) - (0.000008f * b); z = b; } #ifdef __SSE2__ -void Ciecam02::hpe_to_xyzfloat( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) +void Ciecam02::hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) { - x = (F2V(1.910197f) * r) - (F2V(1.112124f) * g) + (F2V(0.201908f) * b); - y = (F2V(0.370950f) * r) + (F2V(0.629054f) * g) - (F2V(0.000008f) * b); + x = (F2V (1.910197f) * r) - (F2V (1.112124f) * g) + (F2V (0.201908f) * b); + y = (F2V (0.370950f) * r) + (F2V (0.629054f) * g) - (F2V (0.000008f) * b); z = b; } #endif -void Ciecam02::cat02_to_hpe( double &rh, double &gh, double &bh, double r, double g, double b, int gamu ) +void Ciecam02::cat02_to_hpe ( double &rh, double &gh, double &bh, double r, double g, double b, int gamu ) { gamu = 1; @@ -513,7 +513,7 @@ void Ciecam02::cat02_to_hpe( double &rh, double &gh, double &bh, double r, doubl } } -void Ciecam02::cat02_to_hpefloat( float &rh, float &gh, float &bh, float r, float g, float b, int gamu ) +void Ciecam02::cat02_to_hpefloat ( float &rh, float &gh, float &bh, float r, float g, float b, int gamu ) { gamu = 1; @@ -529,16 +529,16 @@ void Ciecam02::cat02_to_hpefloat( float &rh, float &gh, float &bh, float r, floa } #ifdef __SSE2__ -void Ciecam02::cat02_to_hpefloat( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b) +void Ciecam02::cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b) { //Changjun Li - rh = ( F2V(0.550930835f) * r) + (F2V(0.519435987f) * g) - ( F2V(0.070356303f) * b); - gh = ( F2V(0.055954056f) * r) + (F2V(0.89973132f) * g) + (F2V(0.044315524f) * b); + rh = ( F2V (0.550930835f) * r) + (F2V (0.519435987f) * g) - ( F2V (0.070356303f) * b); + gh = ( F2V (0.055954056f) * r) + (F2V (0.89973132f) * g) + (F2V (0.044315524f) * b); bh = b; } #endif -void Ciecam02::Aab_to_rgb( double &r, double &g, double &b, double A, double aa, double bb, double nbb ) +void Ciecam02::Aab_to_rgb ( double &r, double &g, double &b, double A, double aa, double bb, double nbb ) { double x = (A / nbb) + 0.305; @@ -550,7 +550,7 @@ void Ciecam02::Aab_to_rgb( double &r, double &g, double &b, double A, double aa, b = (0.32787 * x) - (0.15681 * aa) - (4.49038 * bb); } -void Ciecam02::Aab_to_rgbfloat( float &r, float &g, float &b, float A, float aa, float bb, float nbb ) +void Ciecam02::Aab_to_rgbfloat ( float &r, float &g, float &b, float A, float aa, float bb, float nbb ) { float x = (A / nbb) + 0.305f; @@ -562,28 +562,28 @@ void Ciecam02::Aab_to_rgbfloat( float &r, float &g, float &b, float A, float aa, b = (0.32787f * x) - (0.15681f * aa) - (4.49038f * bb); } #ifdef __SSE2__ -void Ciecam02::Aab_to_rgbfloat( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ) +void Ciecam02::Aab_to_rgbfloat ( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ) { - vfloat c1 = F2V(0.32787f) * ((A / nbb) + F2V(0.305f)); + vfloat c1 = F2V (0.32787f) * ((A / nbb) + F2V (0.305f)); /* c1 c2 c3 */ - r = c1 + (F2V(0.32145f) * aa) + (F2V(0.20527f) * bb); + r = c1 + (F2V (0.32145f) * aa) + (F2V (0.20527f) * bb); /* c1 c4 c5 */ - g = c1 - (F2V(0.63507f) * aa) - (F2V(0.18603f) * bb); + g = c1 - (F2V (0.63507f) * aa) - (F2V (0.18603f) * bb); /* c1 c6 c7 */ - b = c1 - (F2V(0.15681f) * aa) - (F2V(4.49038f) * bb); + b = c1 - (F2V (0.15681f) * aa) - (F2V (4.49038f) * bb); } #endif -void Ciecam02::calculate_ab( double &aa, double &bb, double h, double e, double t, double nbb, double a ) +void Ciecam02::calculate_ab ( double &aa, double &bb, double h, double e, double t, double nbb, double a ) { - double hrad = (h * M_PI) / 180.0; - double sinh = sin( hrad ); - double cosh = cos( hrad ); + double hrad = (h * rtengine::RT_PI) / 180.0; + double sinh = sin ( hrad ); + double cosh = cos ( hrad ); double x = (a / nbb) + 0.305; double p3 = 21.0 / 20.0; - if ( fabs( sinh ) >= fabs( cosh ) ) { + if ( fabs ( sinh ) >= fabs ( cosh ) ) { bb = ((0.32787 * x) * (2.0 + p3)) / ((e / (t * sinh)) - // ((0.32145 - 0.63507 - (p3 * 0.15681)) * (cosh / sinh)) - @@ -603,24 +603,24 @@ void Ciecam02::calculate_ab( double &aa, double &bb, double h, double e, double bb = (aa * sinh) / cosh; } } -void Ciecam02::calculate_abfloat( float &aa, float &bb, float h, float e, float t, float nbb, float a ) +void Ciecam02::calculate_abfloat ( float &aa, float &bb, float h, float e, float t, float nbb, float a ) { - float2 sincosval = xsincosf((h * M_PI) / 180.0f); + float2 sincosval = xsincosf ((h * rtengine::RT_PI) / 180.0f); float sinh = sincosval.x; float cosh = sincosval.y; float x = (a / nbb) + 0.305f; float p3 = 1.05f; - bool swapValues = fabs( sinh ) > fabs( cosh ); + bool swapValues = fabs ( sinh ) > fabs ( cosh ); if (swapValues) { - std::swap(sinh, cosh); + std::swap (sinh, cosh); } float c1 = 1.f; float c2 = sinh / cosh; if (swapValues) { - std::swap(c1, c2); + std::swap (c1, c2); } float div = ((e / (t * cosh)) - (-0.31362f - (p3 * 0.15681f)) * c1 - ((0.01924f - (p3 * 4.49038f)) * (c2))); @@ -629,7 +629,7 @@ void Ciecam02::calculate_abfloat( float &aa, float &bb, float h, float e, float // Additionally it seems useful to limit the minimum value of div // I limited it, but I'm sure the actual limit is not the best one - if (signf(div) != signf(cosh) || fabsf(div) <= fabsf(cosh) * 2.f) { + if (signf (div) != signf (cosh) || fabsf (div) <= fabsf (cosh) * 2.f) { div = cosh * 2.f; } @@ -637,132 +637,146 @@ void Ciecam02::calculate_abfloat( float &aa, float &bb, float h, float e, float bb = (aa * sinh) / cosh; if (swapValues) { - std::swap(aa, bb); + std::swap (aa, bb); } } #ifdef __SSE2__ -void Ciecam02::calculate_abfloat( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ) +void Ciecam02::calculate_abfloat ( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ) { - vfloat2 sincosval = xsincosf((h * F2V(M_PI)) / F2V(180.0f)); + vfloat2 sincosval = xsincosf ((h * F2V (rtengine::RT_PI)) / F2V (180.0f)); vfloat sinh = sincosval.x; vfloat cosh = sincosval.y; - vfloat x = (a / nbb) + F2V(0.305f); - vfloat p3 = F2V(1.05f); - vmask swapMask = vmaskf_gt(vabsf(sinh), vabsf(cosh)); - vswap(swapMask, sinh, cosh); - vfloat c1 = F2V(1.f); + vfloat x = (a / nbb) + F2V (0.305f); + vfloat p3 = F2V (1.05f); + vmask swapMask = vmaskf_gt (vabsf (sinh), vabsf (cosh)); + vswap (swapMask, sinh, cosh); + vfloat c1 = F2V (1.f); vfloat c2 = sinh / cosh; - vswap(swapMask, c1, c2); + vswap (swapMask, c1, c2); - vfloat div = ((e / (t * cosh)) - (F2V(-0.31362f) - (p3 * F2V(0.15681f))) * c1 - ((F2V(0.01924f) - (p3 * F2V(4.49038f))) * (c2))); + vfloat div = ((e / (t * cosh)) - (F2V (-0.31362f) - (p3 * F2V (0.15681f))) * c1 - ((F2V (0.01924f) - (p3 * F2V (4.49038f))) * (c2))); // for large values of t the above calculation can change its sign which results in a hue shift of 180 degree // so we have to check the sign to avoid this shift. // Additionally it seems useful to limit the minimum value of div // I limited it, but I'm sure the actual limit is not the best one - vmask limitMask = vmaskf_neq(vsignf(div), vsignf(cosh)); - limitMask = vorm(limitMask, vmaskf_le(vabsf(div), vabsf(cosh) * F2V(2.f))); - div = vself(limitMask, cosh * F2V(2.f), div); + vmask limitMask = vmaskf_neq (vsignf (div), vsignf (cosh)); + limitMask = vorm (limitMask, vmaskf_le (vabsf (div), vabsf (cosh) * F2V (2.f))); + div = vself (limitMask, cosh * F2V (2.f), div); - aa = ((F2V(0.32787f) * x) * (F2V(2.0f) + p3)) / div; + aa = ((F2V (0.32787f) * x) * (F2V (2.0f) + p3)) / div; bb = (aa * sinh) / cosh; - vswap(swapMask, aa, bb); + vswap (swapMask, aa, bb); } #endif -void Ciecam02::initcam1(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, - double &cz, double &aw, double &wh, double &pfl, double &fl, double &c) +void Ciecam02::initcam1 (double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + double &cz, double &aw, double &wh, double &pfl, double &fl, double &c) { n = yb / yw; if (pilotd == 2.0) { - d = d_factor( f, la ); + d = d_factor ( f, la ); } else { d = pilotd; } - fl = calculate_fl_from_la_ciecam02( la ); - nbb = ncb = 0.725 * pow( 1.0 / n, 0.2 ); - cz = 1.48 + sqrt( n ); - aw = achromatic_response_to_white( xw, yw, zw, d, fl, nbb, gamu ); - wh = ( 4.0 / c ) * ( aw + 4.0 ) * pow( fl, 0.25 ); - pfl = pow( fl, 0.25 ); + fl = calculate_fl_from_la_ciecam02 ( la ); + nbb = ncb = 0.725 * pow ( 1.0 / n, 0.2 ); + cz = 1.48 + sqrt ( n ); + aw = achromatic_response_to_white ( xw, yw, zw, d, fl, nbb, gamu ); + wh = ( 4.0 / c ) * ( aw + 4.0 ) * pow ( fl, 0.25 ); + pfl = pow ( fl, 0.25 ); #ifdef _DEBUG if (settings->verbose) { - printf("Source double d=%f aw=%f fl=%f wh=%f\n", d, aw, fl, wh); + printf ("Source double d=%f aw=%f fl=%f wh=%f\n", d, aw, fl, wh); } #endif } -void Ciecam02::initcam1float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &wh, float &pfl, float &fl, float &c) +void Ciecam02::initcam1float (float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + float &cz, float &aw, float &wh, float &pfl, float &fl, float &c) { n = yb / yw; if (pilotd == 2.0) { - d = d_factorfloat( f, la ); + d = d_factorfloat ( f, la ); } else { d = pilotd; } - fl = calculate_fl_from_la_ciecam02float( la ); - nbb = ncb = 0.725f * pow_F( 1.0f / n, 0.2f ); - cz = 1.48f + sqrt( n ); - aw = achromatic_response_to_whitefloat( xw, yw, zw, d, fl, nbb, gamu ); - wh = ( 4.0f / c ) * ( aw + 4.0f ) * pow_F( fl, 0.25f ); - pfl = pow_F( fl, 0.25f ); + fl = calculate_fl_from_la_ciecam02float ( la ); + nbb = ncb = 0.725f * pow_F ( 1.0f / n, 0.2f ); + cz = 1.48f + sqrt ( n ); + aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, gamu ); + wh = ( 4.0f / c ) * ( aw + 4.0f ) * pow_F ( fl, 0.25f ); + pfl = pow_F ( fl, 0.25f ); #ifdef _DEBUG if (settings->verbose) { - printf("Source float d=%f aw=%f fl=%f wh=%f c=%f awc=%f\n", d, aw, fl, wh, c, (4.f / c) * (aw + 4.f)); + printf ("Source float d=%f aw=%f fl=%f wh=%f c=%f awc=%f\n", d, aw, fl, wh, c, (4.f / c) * (aw + 4.f)); } #endif } -void Ciecam02::initcam2(double gamu, double yb, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, - double &cz, double &aw, double &fl) +void Ciecam02::initcam2 (double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + double &cz, double &aw, double &fl) { n = yb / yw; - d = d_factor( f, la ); - fl = calculate_fl_from_la_ciecam02( la ); - nbb = ncb = 0.725 * pow( 1.0 / n, 0.2 ); - cz = 1.48 + sqrt( n ); - aw = achromatic_response_to_white( xw, yw, zw, d, fl, nbb, gamu ); + + if (pilotd == 2.0) { + d = d_factorfloat ( f, la ); + } else { + d = pilotd; + } + +// d = d_factor( f, la ); + fl = calculate_fl_from_la_ciecam02 ( la ); + nbb = ncb = 0.725 * pow ( 1.0 / n, 0.2 ); + cz = 1.48 + sqrt ( n ); + aw = achromatic_response_to_white ( xw, yw, zw, d, fl, nbb, gamu ); #ifdef _DEBUG if (settings->verbose) { - printf("Viewing double d=%f aw=%f fl=%f n=%f\n", d, aw, fl, n); + printf ("Viewing double d=%f aw=%f fl=%f n=%f\n", d, aw, fl, n); } #endif } -void Ciecam02::initcam2float(float gamu, float yb, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &fl) +void Ciecam02::initcam2float (float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + float &cz, float &aw, float &fl) { n = yb / yw; - d = d_factorfloat( f, la ); - fl = calculate_fl_from_la_ciecam02float( la ); - nbb = ncb = 0.725f * pow_F( 1.0f / n, 0.2f ); - cz = 1.48f + sqrt( n ); - aw = achromatic_response_to_whitefloat( xw, yw, zw, d, fl, nbb, gamu ); + + if (pilotd == 2.0) { + d = d_factorfloat ( f, la ); + } else { + d = pilotd; + } + +// d = d_factorfloat( f, la ); + fl = calculate_fl_from_la_ciecam02float ( la ); + nbb = ncb = 0.725f * pow_F ( 1.0f / n, 0.2f ); + cz = 1.48f + sqrt ( n ); + aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, gamu ); #ifdef _DEBUG if (settings->verbose) { - printf("Viewing float d=%f aw=%f fl=%f n=%f\n", d, aw, fl, n); + printf ("Viewing float d=%f aw=%f fl=%f n=%f\n", d, aw, fl, n); } #endif } -void Ciecam02::xyz2jchqms_ciecam02( double &J, double &C, double &h, double &Q, double &M, double &s, double &aw, double &fl, double &wh, - double x, double y, double z, double xw, double yw, double zw, - double yb, double la, double f, double c, double nc, double pilotd, int gamu , double n, double nbb, double ncb, double pfl, double cz, double d) +void Ciecam02::xyz2jchqms_ciecam02 ( double &J, double &C, double &h, double &Q, double &M, double &s, double &aw, double &fl, double &wh, + double x, double y, double z, double xw, double yw, double zw, + double yb, double la, double f, double c, double nc, double pilotd, int gamu, double n, double nbb, double ncb, double pfl, double cz, double d) { double r, g, b; double rw, gw, bw; @@ -773,28 +787,28 @@ void Ciecam02::xyz2jchqms_ciecam02( double &J, double &C, double &h, double &Q, double e, t; double myh; gamu = 1; - xyz_to_cat02( r, g, b, x, y, z, gamu ); - xyz_to_cat02( rw, gw, bw, xw, yw, zw, gamu ); + xyz_to_cat02 ( r, g, b, x, y, z, gamu ); + xyz_to_cat02 ( rw, gw, bw, xw, yw, zw, gamu ); rc = r * (((yw * d) / rw) + (1.0 - d)); gc = g * (((yw * d) / gw) + (1.0 - d)); bc = b * (((yw * d) / bw) + (1.0 - d)); - cat02_to_hpe( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpe ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0); - gp = MAXR(gp, 0.0); - bp = MAXR(bp, 0.0); + rp = MAXR (rp, 0.0); + gp = MAXR (gp, 0.0); + bp = MAXR (bp, 0.0); } - rpa = nonlinear_adaptation( rp, fl ); - gpa = nonlinear_adaptation( gp, fl ); - bpa = nonlinear_adaptation( bp, fl ); + rpa = nonlinear_adaptation ( rp, fl ); + gpa = nonlinear_adaptation ( gp, fl ); + bpa = nonlinear_adaptation ( bp, fl ); ca = rpa - ((12.0 * gpa) / 11.0) + (bpa / 11.0); cb = (1.0 / 9.0) * (rpa + gpa - (2.0 * bpa)); - myh = (180.0 / M_PI) * atan2( cb, ca ); + myh = (180.0 / rtengine::RT_PI) * atan2 ( cb, ca ); if ( myh < 0.0 ) { myh += 360.0; @@ -826,24 +840,24 @@ void Ciecam02::xyz2jchqms_ciecam02( double &J, double &C, double &h, double &Q, a = ((2.0 * rpa) + gpa + ((1.0 / 20.0) * bpa) - 0.305) * nbb; if (gamu == 1) { - a = MAXR(a, 0.0); //gamut correction M.H.Brill S.Susstrunk + a = MAXR (a, 0.0); //gamut correction M.H.Brill S.Susstrunk } - J = 100.0 * pow( a / aw, c * cz ); + J = 100.0 * pow ( a / aw, c * cz ); - e = ((12500.0 / 13.0) * nc * ncb) * (cos( ((myh * M_PI) / 180.0) + 2.0 ) + 3.8); - t = (e * sqrt( (ca * ca) + (cb * cb) )) / (rpa + gpa + ((21.0 / 20.0) * bpa)); + e = ((12500.0 / 13.0) * nc * ncb) * (cos ( ((myh * rtengine::RT_PI) / 180.0) + 2.0 ) + 3.8); + t = (e * sqrt ( (ca * ca) + (cb * cb) )) / (rpa + gpa + ((21.0 / 20.0) * bpa)); - C = pow( t, 0.9 ) * sqrt( J / 100.0 ) - * pow( 1.64 - pow( 0.29, n ), 0.73 ); + C = pow ( t, 0.9 ) * sqrt ( J / 100.0 ) + * pow ( 1.64 - pow ( 0.29, n ), 0.73 ); - Q = wh * sqrt( J / 100.0 ); + Q = wh * sqrt ( J / 100.0 ); M = C * pfl; - s = 100.0 * sqrt( M / Q ); + s = 100.0 * sqrt ( M / Q ); h = myh; } -void Ciecam02::xyz2jchqms_ciecam02float( float &J, float &C, float &h, float &Q, float &M, float &s, float aw, float fl, float wh, +void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q, float &M, float &s, float aw, float fl, float wh, float x, float y, float z, float xw, float yw, float zw, float c, float nc, int gamu, float pow1, float nbb, float ncb, float pfl, float cz, float d) @@ -857,55 +871,55 @@ void Ciecam02::xyz2jchqms_ciecam02float( float &J, float &C, float &h, float &Q, float e, t; float myh; gamu = 1; - xyz_to_cat02float( r, g, b, x, y, z, gamu ); - xyz_to_cat02float( rw, gw, bw, xw, yw, zw, gamu ); + xyz_to_cat02float ( r, g, b, x, y, z, gamu ); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, gamu ); rc = r * (((yw * d) / rw) + (1.f - d)); gc = g * (((yw * d) / gw) + (1.f - d)); bc = b * (((yw * d) / bw) + (1.f - d)); - cat02_to_hpefloat( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0f); - gp = MAXR(gp, 0.0f); - bp = MAXR(bp, 0.0f); + rp = MAXR (rp, 0.0f); + gp = MAXR (gp, 0.0f); + bp = MAXR (bp, 0.0f); } - rpa = nonlinear_adaptationfloat( rp, fl ); - gpa = nonlinear_adaptationfloat( gp, fl ); - bpa = nonlinear_adaptationfloat( bp, fl ); + rpa = nonlinear_adaptationfloat ( rp, fl ); + gpa = nonlinear_adaptationfloat ( gp, fl ); + bpa = nonlinear_adaptationfloat ( bp, fl ); ca = rpa - ((12.0f * gpa) - bpa) / 11.0f; cb = (0.11111111f) * (rpa + gpa - (2.0f * bpa)); - myh = xatan2f( cb, ca ); + myh = xatan2f ( cb, ca ); if ( myh < 0.0f ) { - myh += (2.f * M_PI); + myh += (2.f * rtengine::RT_PI); } a = ((2.0f * rpa) + gpa + (0.05f * bpa) - 0.305f) * nbb; if (gamu == 1) { - a = MAXR(a, 0.0f); //gamut correction M.H.Brill S.Susstrunk + a = MAXR (a, 0.0f); //gamut correction M.H.Brill S.Susstrunk } - J = pow_F( a / aw, c * cz * 0.5f); + J = pow_F ( a / aw, c * cz * 0.5f); - e = ((961.53846f) * nc * ncb) * (xcosf( myh + 2.0f ) + 3.8f); - t = (e * sqrtf( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa)); + e = ((961.53846f) * nc * ncb) * (xcosf ( myh + 2.0f ) + 3.8f); + t = (e * sqrtf ( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa)); - C = pow_F( t, 0.9f ) * J * pow1; + C = pow_F ( t, 0.9f ) * J * pow1; Q = wh * J; J *= J * 100.0f; M = C * pfl; Q = (Q == 0.f ? 0.0001f : Q); // avoid division by zero - s = 100.0f * sqrtf( M / Q ); - h = (myh * 180.f) / (float)M_PI; + s = 100.0f * sqrtf ( M / Q ); + h = (myh * 180.f) / (float)rtengine::RT_PI; } #ifdef __SSE2__ -void Ciecam02::xyz2jchqms_ciecam02float( vfloat &J, vfloat &C, vfloat &h, vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, +void Ciecam02::xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, vfloat x, vfloat y, vfloat z, vfloat xw, vfloat yw, vfloat zw, vfloat c, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d) @@ -918,53 +932,53 @@ void Ciecam02::xyz2jchqms_ciecam02float( vfloat &J, vfloat &C, vfloat &h, vfloat vfloat a, ca, cb; vfloat e, t; - xyz_to_cat02float( r, g, b, x, y, z); - xyz_to_cat02float( rw, gw, bw, xw, yw, zw); - vfloat onev = F2V(1.f); + xyz_to_cat02float ( r, g, b, x, y, z); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw); + vfloat onev = F2V (1.f); rc = r * (((yw * d) / rw) + (onev - d)); gc = g * (((yw * d) / gw) + (onev - d)); bc = b * (((yw * d) / bw) + (onev - d)); - cat02_to_hpefloat( rp, gp, bp, rc, gc, bc); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc); //gamut correction M.H.Brill S.Susstrunk - rp = _mm_max_ps(rp, ZEROV); - gp = _mm_max_ps(gp, ZEROV); - bp = _mm_max_ps(bp, ZEROV); - rpa = nonlinear_adaptationfloat( rp, fl ); - gpa = nonlinear_adaptationfloat( gp, fl ); - bpa = nonlinear_adaptationfloat( bp, fl ); + rp = _mm_max_ps (rp, ZEROV); + gp = _mm_max_ps (gp, ZEROV); + bp = _mm_max_ps (bp, ZEROV); + rpa = nonlinear_adaptationfloat ( rp, fl ); + gpa = nonlinear_adaptationfloat ( gp, fl ); + bpa = nonlinear_adaptationfloat ( bp, fl ); - ca = rpa - ((F2V(12.0f) * gpa) - bpa) / F2V(11.0f); - cb = F2V(0.11111111f) * (rpa + gpa - (bpa + bpa)); + ca = rpa - ((F2V (12.0f) * gpa) - bpa) / F2V (11.0f); + cb = F2V (0.11111111f) * (rpa + gpa - (bpa + bpa)); - vfloat myh = xatan2f( cb, ca ); - vfloat temp = F2V(M_PI); + vfloat myh = xatan2f ( cb, ca ); + vfloat temp = F2V (rtengine::RT_PI); temp += temp; temp += myh; - myh = vself(vmaskf_lt(myh, ZEROV), temp, myh); + myh = vself (vmaskf_lt (myh, ZEROV), temp, myh); - a = ((rpa + rpa) + gpa + (F2V(0.05f) * bpa) - F2V(0.305f)) * nbb; - a = _mm_max_ps(a, ZEROV); //gamut correction M.H.Brill S.Susstrunk + a = ((rpa + rpa) + gpa + (F2V (0.05f) * bpa) - F2V (0.305f)) * nbb; + a = _mm_max_ps (a, ZEROV); //gamut correction M.H.Brill S.Susstrunk - J = pow_F( a / aw, c * cz * F2V(0.5f)); + J = pow_F ( a / aw, c * cz * F2V (0.5f)); - e = ((F2V(961.53846f)) * nc * ncb) * (xcosf( myh + F2V(2.0f) ) + F2V(3.8f)); - t = (e * _mm_sqrt_ps( (ca * ca) + (cb * cb) )) / (rpa + gpa + (F2V(1.05f) * bpa)); + e = ((F2V (961.53846f)) * nc * ncb) * (xcosf ( myh + F2V (2.0f) ) + F2V (3.8f)); + t = (e * _mm_sqrt_ps ( (ca * ca) + (cb * cb) )) / (rpa + gpa + (F2V (1.05f) * bpa)); - C = pow_F( t, F2V(0.9f) ) * J * pow1; + C = pow_F ( t, F2V (0.9f) ) * J * pow1; Q = wh * J; - J *= J * F2V(100.0f); + J *= J * F2V (100.0f); M = C * pfl; - Q = _mm_max_ps(Q, F2V(0.0001f)); // avoid division by zero - s = F2V(100.0f) * _mm_sqrt_ps( M / Q ); - h = (myh * F2V(180.f)) / F2V(M_PI); + Q = _mm_max_ps (Q, F2V (0.0001f)); // avoid division by zero + s = F2V (100.0f) * _mm_sqrt_ps ( M / Q ); + h = (myh * F2V (180.f)) / F2V (rtengine::RT_PI); } #endif -void Ciecam02::xyz2jch_ciecam02float( float &J, float &C, float &h, float aw, float fl, - float x, float y, float z, float xw, float yw, float zw, - float c, float nc, float pow1, float nbb, float ncb, float cz, float d) +void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, float fl, + float x, float y, float z, float xw, float yw, float zw, + float c, float nc, float pow1, float nbb, float ncb, float cz, float d) { float r, g, b; @@ -976,54 +990,54 @@ void Ciecam02::xyz2jch_ciecam02float( float &J, float &C, float &h, float aw, fl float e, t; float myh; int gamu = 1; - xyz_to_cat02float( r, g, b, x, y, z, gamu ); - xyz_to_cat02float( rw, gw, bw, xw, yw, zw, gamu ); + xyz_to_cat02float ( r, g, b, x, y, z, gamu ); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, gamu ); rc = r * (((yw * d) / rw) + (1.f - d)); gc = g * (((yw * d) / gw) + (1.f - d)); bc = b * (((yw * d) / bw) + (1.f - d)); - cat02_to_hpefloat( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0f); - gp = MAXR(gp, 0.0f); - bp = MAXR(bp, 0.0f); + rp = MAXR (rp, 0.0f); + gp = MAXR (gp, 0.0f); + bp = MAXR (bp, 0.0f); } - rpa = nonlinear_adaptationfloat( rp, fl ); - gpa = nonlinear_adaptationfloat( gp, fl ); - bpa = nonlinear_adaptationfloat( bp, fl ); + rpa = nonlinear_adaptationfloat ( rp, fl ); + gpa = nonlinear_adaptationfloat ( gp, fl ); + bpa = nonlinear_adaptationfloat ( bp, fl ); ca = rpa - ((12.0f * gpa) - bpa) / 11.0f; cb = (0.11111111f) * (rpa + gpa - (2.0f * bpa)); - myh = xatan2f( cb, ca ); + myh = xatan2f ( cb, ca ); if ( myh < 0.0f ) { - myh += (2.f * M_PI); + myh += (2.f * rtengine::RT_PI); } a = ((2.0f * rpa) + gpa + (0.05f * bpa) - 0.305f) * nbb; if (gamu == 1) { - a = MAXR(a, 0.0f); //gamut correction M.H.Brill S.Susstrunk + a = MAXR (a, 0.0f); //gamut correction M.H.Brill S.Susstrunk } - J = pow_F( a / aw, c * cz * 0.5f); + J = pow_F ( a / aw, c * cz * 0.5f); - e = ((961.53846f) * nc * ncb) * (xcosf( myh + 2.0f ) + 3.8f); - t = (e * sqrtf( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa)); + e = ((961.53846f) * nc * ncb) * (xcosf ( myh + 2.0f ) + 3.8f); + t = (e * sqrtf ( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa)); - C = pow_F( t, 0.9f ) * J * pow1; + C = pow_F ( t, 0.9f ) * J * pow1; J *= J * 100.0f; - h = (myh * 180.f) / (float)M_PI; + h = (myh * 180.f) / (float)rtengine::RT_PI; } -void Ciecam02::jch2xyz_ciecam02( double &x, double &y, double &z, double J, double C, double h, - double xw, double yw, double zw, double yb, double la, - double f, double c, double nc , int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw ) +void Ciecam02::jch2xyz_ciecam02 ( double &x, double &y, double &z, double J, double C, double h, + double xw, double yw, double zw, double yb, double la, + double f, double c, double nc, int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw ) { double r, g, b; double rc, gc, bc; @@ -1033,31 +1047,31 @@ void Ciecam02::jch2xyz_ciecam02( double &x, double &y, double &z, double J, doub double a, ca, cb; double e, t; gamu = 1; - xyz_to_cat02( rw, gw, bw, xw, yw, zw, gamu ); - e = ((12500.0 / 13.0) * nc * ncb) * (cos( ((h * M_PI) / 180.0) + 2.0 ) + 3.8); - a = pow( J / 100.0, 1.0 / (c * cz) ) * aw; - t = pow( C / (sqrt( J / 100) * pow( 1.64 - pow( 0.29, n ), 0.73 )), 10.0 / 9.0 ); + xyz_to_cat02 ( rw, gw, bw, xw, yw, zw, gamu ); + e = ((12500.0 / 13.0) * nc * ncb) * (cos ( ((h * rtengine::RT_PI) / 180.0) + 2.0 ) + 3.8); + a = pow ( J / 100.0, 1.0 / (c * cz) ) * aw; + t = pow ( C / (sqrt ( J / 100) * pow ( 1.64 - pow ( 0.29, n ), 0.73 )), 10.0 / 9.0 ); - calculate_ab( ca, cb, h, e, t, nbb, a ); - Aab_to_rgb( rpa, gpa, bpa, a, ca, cb, nbb ); + calculate_ab ( ca, cb, h, e, t, nbb, a ); + Aab_to_rgb ( rpa, gpa, bpa, a, ca, cb, nbb ); - rp = inverse_nonlinear_adaptation( rpa, fl ); - gp = inverse_nonlinear_adaptation( gpa, fl ); - bp = inverse_nonlinear_adaptation( bpa, fl ); + rp = inverse_nonlinear_adaptation ( rpa, fl ); + gp = inverse_nonlinear_adaptation ( gpa, fl ); + bp = inverse_nonlinear_adaptation ( bpa, fl ); - hpe_to_xyz( x, y, z, rp, gp, bp ); - xyz_to_cat02( rc, gc, bc, x, y, z, gamu ); + hpe_to_xyz ( x, y, z, rp, gp, bp ); + xyz_to_cat02 ( rc, gc, bc, x, y, z, gamu ); r = rc / (((yw * d) / rw) + (1.0 - d)); g = gc / (((yw * d) / gw) + (1.0 - d)); b = bc / (((yw * d) / bw) + (1.0 - d)); - cat02_to_xyz( x, y, z, r, g, b, gamu ); + cat02_to_xyz ( x, y, z, r, g, b, gamu ); } -void Ciecam02::jch2xyz_ciecam02float( float &x, float &y, float &z, float J, float C, float h, - float xw, float yw, float zw, - float f, float c, float nc , int gamu, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw) +void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, float C, float h, + float xw, float yw, float zw, + float f, float c, float nc, int gamu, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw) { float r, g, b; float rc, gc, bc; @@ -1067,32 +1081,32 @@ void Ciecam02::jch2xyz_ciecam02float( float &x, float &y, float &z, float J, flo float a, ca, cb; float e, t; gamu = 1; - xyz_to_cat02float( rw, gw, bw, xw, yw, zw, gamu ); - e = ((961.53846f) * nc * ncb) * (xcosf( ((h * M_PI) / 180.0f) + 2.0f ) + 3.8f); - a = pow_F( J / 100.0f, 1.0f / (c * cz) ) * aw; - t = pow_F( 10.f * C / (sqrtf( J ) * pow1), 1.1111111f ); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, gamu ); + e = ((961.53846f) * nc * ncb) * (xcosf ( ((h * rtengine::RT_PI) / 180.0f) + 2.0f ) + 3.8f); + a = pow_F ( J / 100.0f, 1.0f / (c * cz) ) * aw; + t = pow_F ( 10.f * C / (sqrtf ( J ) * pow1), 1.1111111f ); - calculate_abfloat( ca, cb, h, e, t, nbb, a ); - Aab_to_rgbfloat( rpa, gpa, bpa, a, ca, cb, nbb ); + calculate_abfloat ( ca, cb, h, e, t, nbb, a ); + Aab_to_rgbfloat ( rpa, gpa, bpa, a, ca, cb, nbb ); - rp = inverse_nonlinear_adaptationfloat( rpa, fl ); - gp = inverse_nonlinear_adaptationfloat( gpa, fl ); - bp = inverse_nonlinear_adaptationfloat( bpa, fl ); + rp = inverse_nonlinear_adaptationfloat ( rpa, fl ); + gp = inverse_nonlinear_adaptationfloat ( gpa, fl ); + bp = inverse_nonlinear_adaptationfloat ( bpa, fl ); - hpe_to_xyzfloat( x, y, z, rp, gp, bp ); - xyz_to_cat02float( rc, gc, bc, x, y, z, gamu ); + hpe_to_xyzfloat ( x, y, z, rp, gp, bp ); + xyz_to_cat02float ( rc, gc, bc, x, y, z, gamu ); r = rc / (((yw * d) / rw) + (1.0f - d)); g = gc / (((yw * d) / gw) + (1.0f - d)); b = bc / (((yw * d) / bw) + (1.0f - d)); - cat02_to_xyzfloat( x, y, z, r, g, b, gamu ); + cat02_to_xyzfloat ( x, y, z, r, g, b, gamu ); } #ifdef __SSE2__ -void Ciecam02::jch2xyz_ciecam02float( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat C, vfloat h, - vfloat xw, vfloat yw, vfloat zw, - vfloat f, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz) +void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat C, vfloat h, + vfloat xw, vfloat yw, vfloat zw, + vfloat f, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz) { vfloat r, g, b; vfloat rc, gc, bc; @@ -1101,70 +1115,70 @@ void Ciecam02::jch2xyz_ciecam02float( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat rw, gw, bw; vfloat a, ca, cb; vfloat e, t; - xyz_to_cat02float( rw, gw, bw, xw, yw, zw); - e = ((F2V(961.53846f)) * nc * ncb) * (xcosf( ((h * F2V(M_PI)) / F2V(180.0f)) + F2V(2.0f) ) + F2V(3.8f)); - a = pow_F( J / F2V(100.0f), reccmcz ) * aw; - t = pow_F( F2V(10.f) * C / (_mm_sqrt_ps( J ) * pow1), F2V(1.1111111f) ); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw); + e = ((F2V (961.53846f)) * nc * ncb) * (xcosf ( ((h * F2V (rtengine::RT_PI)) / F2V (180.0f)) + F2V (2.0f) ) + F2V (3.8f)); + a = pow_F ( J / F2V (100.0f), reccmcz ) * aw; + t = pow_F ( F2V (10.f) * C / (_mm_sqrt_ps ( J ) * pow1), F2V (1.1111111f) ); - calculate_abfloat( ca, cb, h, e, t, nbb, a ); - Aab_to_rgbfloat( rpa, gpa, bpa, a, ca, cb, nbb ); + calculate_abfloat ( ca, cb, h, e, t, nbb, a ); + Aab_to_rgbfloat ( rpa, gpa, bpa, a, ca, cb, nbb ); - rp = inverse_nonlinear_adaptationfloat( rpa, fl ); - gp = inverse_nonlinear_adaptationfloat( gpa, fl ); - bp = inverse_nonlinear_adaptationfloat( bpa, fl ); + rp = inverse_nonlinear_adaptationfloat ( rpa, fl ); + gp = inverse_nonlinear_adaptationfloat ( gpa, fl ); + bp = inverse_nonlinear_adaptationfloat ( bpa, fl ); - hpe_to_xyzfloat( x, y, z, rp, gp, bp ); - xyz_to_cat02float( rc, gc, bc, x, y, z ); + hpe_to_xyzfloat ( x, y, z, rp, gp, bp ); + xyz_to_cat02float ( rc, gc, bc, x, y, z ); - r = rc / (((yw * d) / rw) + (F2V(1.0f) - d)); - g = gc / (((yw * d) / gw) + (F2V(1.0f) - d)); - b = bc / (((yw * d) / bw) + (F2V(1.0f) - d)); + r = rc / (((yw * d) / rw) + (F2V (1.0f) - d)); + g = gc / (((yw * d) / gw) + (F2V (1.0f) - d)); + b = bc / (((yw * d) / bw) + (F2V (1.0f) - d)); - cat02_to_xyzfloat( x, y, z, r, g, b ); + cat02_to_xyzfloat ( x, y, z, r, g, b ); } #endif -double Ciecam02::nonlinear_adaptation( double c, double fl ) +double Ciecam02::nonlinear_adaptation ( double c, double fl ) { double p; if (c < 0.0) { - p = pow( (-1.0 * fl * c) / 100.0, 0.42 ); + p = pow ( (-1.0 * fl * c) / 100.0, 0.42 ); return ((-1.0 * 400.0 * p) / (27.13 + p)) + 0.1; } else { - p = pow( (fl * c) / 100.0, 0.42 ); + p = pow ( (fl * c) / 100.0, 0.42 ); return ((400.0 * p) / (27.13 + p)) + 0.1; } } -float Ciecam02::nonlinear_adaptationfloat( float c, float fl ) +float Ciecam02::nonlinear_adaptationfloat ( float c, float fl ) { float p; if (c < 0.0f) { - p = pow_F( (-1.0f * fl * c) / 100.0f, 0.42f ); + p = pow_F ( (-1.0f * fl * c) / 100.0f, 0.42f ); return ((-1.0f * 400.0f * p) / (27.13f + p)) + 0.1f; } else { - p = pow_F( (fl * c) / 100.0f, 0.42f ); + p = pow_F ( (fl * c) / 100.0f, 0.42f ); return ((400.0f * p) / (27.13f + p)) + 0.1f; } } #ifdef __SSE2__ -vfloat Ciecam02::nonlinear_adaptationfloat( vfloat c, vfloat fl ) +vfloat Ciecam02::nonlinear_adaptationfloat ( vfloat c, vfloat fl ) { - vfloat c100 = F2V(100.f); - vfloat czd42 = F2V(0.42f); - vfloat c400 = vmulsignf(F2V(400.f), c); - fl = vmulsignf(fl, c); - vfloat p = pow_F( (fl * c) / c100, czd42 ); - vfloat c27d13 = F2V(27.13); - vfloat czd1 = F2V(0.1f); + vfloat c100 = F2V (100.f); + vfloat czd42 = F2V (0.42f); + vfloat c400 = vmulsignf (F2V (400.f), c); + fl = vmulsignf (fl, c); + vfloat p = pow_F ( (fl * c) / c100, czd42 ); + vfloat c27d13 = F2V (27.13); + vfloat czd1 = F2V (0.1f); return ((c400 * p) / (c27d13 + p)) + czd1; } #endif -double Ciecam02::inverse_nonlinear_adaptation( double c, double fl ) +double Ciecam02::inverse_nonlinear_adaptation ( double c, double fl ) { int c1; @@ -1174,10 +1188,10 @@ double Ciecam02::inverse_nonlinear_adaptation( double c, double fl ) c1 = 1; } - return c1 * (100.0 / fl) * pow( (27.13 * fabs( c - 0.1 )) / (400.0 - fabs( c - 0.1 )), 1.0 / 0.42 ); + return c1 * (100.0 / fl) * pow ( (27.13 * fabs ( c - 0.1 )) / (400.0 - fabs ( c - 0.1 )), 1.0 / 0.42 ); } -float Ciecam02::inverse_nonlinear_adaptationfloat( float c, float fl ) +float Ciecam02::inverse_nonlinear_adaptationfloat ( float c, float fl ) { c -= 0.1f; @@ -1191,17 +1205,17 @@ float Ciecam02::inverse_nonlinear_adaptationfloat( float c, float fl ) c = 399.99f; } - return (100.0f / fl) * pow_F( (27.13f * fabsf( c )) / (400.0f - fabsf( c )), 2.38095238f ); + return (100.0f / fl) * pow_F ( (27.13f * fabsf ( c )) / (400.0f - fabsf ( c )), 2.38095238f ); } #ifdef __SSE2__ -vfloat Ciecam02::inverse_nonlinear_adaptationfloat( vfloat c, vfloat fl ) +vfloat Ciecam02::inverse_nonlinear_adaptationfloat ( vfloat c, vfloat fl ) { - c -= F2V(0.1f); - fl = vmulsignf(fl, c); - c = vabsf(c); - c = _mm_min_ps( c, F2V(399.99f)); - return (F2V(100.0f) / fl) * pow_F( (F2V(27.13f) * c) / (F2V(400.0f) - c), F2V(2.38095238f) ); + c -= F2V (0.1f); + fl = vmulsignf (fl, c); + c = vabsf (c); + c = _mm_min_ps ( c, F2V (399.99f)); + return (F2V (100.0f) / fl) * pow_F ( (F2V (27.13f) * c) / (F2V (400.0f) - c), F2V (2.38095238f) ); } #endif //end CIECAM Billy Bigg diff --git a/rtengine/ciecam02.h b/rtengine/ciecam02.h index a551b2504..1e0f755c1 100644 --- a/rtengine/ciecam02.h +++ b/rtengine/ciecam02.h @@ -28,12 +28,12 @@ namespace rtengine class Ciecam02 { private: - static double d_factor( double f, double la ); - static float d_factorfloat( float f, float la ); - static double calculate_fl_from_la_ciecam02( double la ); - static float calculate_fl_from_la_ciecam02float( float la ); - static double achromatic_response_to_white( double x, double y, double z, double d, double fl, double nbb, int gamu ); - static float achromatic_response_to_whitefloat( float x, float y, float z, float d, float fl, float nbb, int gamu ); + static double d_factor ( double f, double la ); + static float d_factorfloat ( float f, float la ); + static double calculate_fl_from_la_ciecam02 ( double la ); + static float calculate_fl_from_la_ciecam02float ( float la ); + static double achromatic_response_to_white ( double x, double y, double z, double d, double fl, double nbb, int gamu ); + static float achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int gamu ); static void xyz_to_cat02 ( double &r, double &g, double &b, double x, double y, double z, int gamu ); static void cat02_to_hpe ( double &rh, double &gh, double &bh, double r, double g, double b, int gamu ); static void cat02_to_xyz ( double &x, double &y, double &z, double r, double g, double b, int gamu ); @@ -45,97 +45,97 @@ private: #ifdef __SSE2__ static void xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z ); static void cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b ); - static vfloat nonlinear_adaptationfloat( vfloat c, vfloat fl ); + static vfloat nonlinear_adaptationfloat ( vfloat c, vfloat fl ); #endif - static void Aab_to_rgb( double &r, double &g, double &b, double A, double aa, double bb, double nbb ); - static void calculate_ab( double &aa, double &bb, double h, double e, double t, double nbb, double a ); + static void Aab_to_rgb ( double &r, double &g, double &b, double A, double aa, double bb, double nbb ); + static void calculate_ab ( double &aa, double &bb, double h, double e, double t, double nbb, double a ); - static double nonlinear_adaptation( double c, double fl ); - static float nonlinear_adaptationfloat( float c, float fl ); - static double inverse_nonlinear_adaptation( double c, double fl ); + static double nonlinear_adaptation ( double c, double fl ); + static float nonlinear_adaptationfloat ( float c, float fl ); + static double inverse_nonlinear_adaptation ( double c, double fl ); - static float inverse_nonlinear_adaptationfloat( float c, float fl ); - static void calculate_abfloat( float &aa, float &bb, float h, float e, float t, float nbb, float a ); - static void Aab_to_rgbfloat( float &r, float &g, float &b, float A, float aa, float bb, float nbb ); + static float inverse_nonlinear_adaptationfloat ( float c, float fl ); + static void calculate_abfloat ( float &aa, float &bb, float h, float e, float t, float nbb, float a ); + static void Aab_to_rgbfloat ( float &r, float &g, float &b, float A, float aa, float bb, float nbb ); static void hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b ); static void cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int gamu ); #ifdef __SSE2__ - static vfloat inverse_nonlinear_adaptationfloat( vfloat c, vfloat fl ); - static void calculate_abfloat( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ); - static void Aab_to_rgbfloat( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ); + static vfloat inverse_nonlinear_adaptationfloat ( vfloat c, vfloat fl ); + static void calculate_abfloat ( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ); + static void Aab_to_rgbfloat ( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ); static void hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ); static void cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ); #endif public: Ciecam02 () {} - static void curvecolor(double satind, double satval, double &sres, double parsat); - static void curvecolorfloat(float satind, float satval, float &sres, float parsat); - static void curveJ (double br, double contr, int db, LUTf & outCurve , LUTu & histogram ) ; + static void curvecolor (double satind, double satval, double &sres, double parsat); + static void curvecolorfloat (float satind, float satval, float &sres, float parsat); + static void curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & histogram ) ; static void curveJfloat (float br, float contr, const LUTu & histogram, LUTf & outCurve ) ; /** * Inverse transform from CIECAM02 JCh to XYZ. */ - static void jch2xyz_ciecam02( double &x, double &y, double &z, - double J, double C, double h, - double xw, double yw, double zw, - double yb, double la, - double f, double c, double nc, int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw); + static void jch2xyz_ciecam02 ( double &x, double &y, double &z, + double J, double C, double h, + double xw, double yw, double zw, + double yb, double la, + double f, double c, double nc, int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw); - static void jch2xyz_ciecam02float( float &x, float &y, float &z, - float J, float C, float h, - float xw, float yw, float zw, - float f, float c, float nc, int gamu, float n, float nbb, float ncb, float fl, float cz, float d, float aw ); + static void jch2xyz_ciecam02float ( float &x, float &y, float &z, + float J, float C, float h, + float xw, float yw, float zw, + float f, float c, float nc, int gamu, float n, float nbb, float ncb, float fl, float cz, float d, float aw ); #ifdef __SSE2__ - static void jch2xyz_ciecam02float( vfloat &x, vfloat &y, vfloat &z, - vfloat J, vfloat C, vfloat h, - vfloat xw, vfloat yw, vfloat zw, - vfloat f, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz ); + static void jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, + vfloat J, vfloat C, vfloat h, + vfloat xw, vfloat yw, vfloat zw, + vfloat f, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz ); #endif /** * Forward transform from XYZ to CIECAM02 JCh. */ - static void initcam1(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, - double &cz, double &aw, double &wh, double &pfl, double &fl, double &c); + static void initcam1 (double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + double &cz, double &aw, double &wh, double &pfl, double &fl, double &c); - static void initcam2(double gamu, double yb, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, - double &cz, double &aw, double &fl); + static void initcam2 (double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + double &cz, double &aw, double &fl); - static void initcam1float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &wh, float &pfl, float &fl, float &c); + static void initcam1float (float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + float &cz, float &aw, float &wh, float &pfl, float &fl, float &c); - static void initcam2float(float gamu, float yb, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &fl); + static void initcam2float (float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + float &cz, float &aw, float &fl); - static void xyz2jchqms_ciecam02( double &J, double &C, double &h, - double &Q, double &M, double &s, double &aw, double &fl, double &wh, - double x, double y, double z, - double xw, double yw, double zw, - double yb, double la, - double f, double c, double nc, double pilotd, int gamu , double n, double nbb, double ncb, double pfl, double cz, double d ); + static void xyz2jchqms_ciecam02 ( double &J, double &C, double &h, + double &Q, double &M, double &s, double &aw, double &fl, double &wh, + double x, double y, double z, + double xw, double yw, double zw, + double yb, double la, + double f, double c, double nc, double pilotd, int gamu, double n, double nbb, double ncb, double pfl, double cz, double d ); - static void xyz2jch_ciecam02float( float &J, float &C, float &h, - float aw, float fl, - float x, float y, float z, - float xw, float yw, float zw, - float c, float nc, float n, float nbb, float ncb, float cz, float d ); + static void xyz2jch_ciecam02float ( float &J, float &C, float &h, + float aw, float fl, + float x, float y, float z, + float xw, float yw, float zw, + float c, float nc, float n, float nbb, float ncb, float cz, float d ); - static void xyz2jchqms_ciecam02float( float &J, float &C, float &h, - float &Q, float &M, float &s, float aw, float fl, float wh, - float x, float y, float z, - float xw, float yw, float zw, - float c, float nc, int gamu, float n, float nbb, float ncb, float pfl, float cz, float d ); + static void xyz2jchqms_ciecam02float ( float &J, float &C, float &h, + float &Q, float &M, float &s, float aw, float fl, float wh, + float x, float y, float z, + float xw, float yw, float zw, + float c, float nc, int gamu, float n, float nbb, float ncb, float pfl, float cz, float d ); #ifdef __SSE2__ - static void xyz2jchqms_ciecam02float( vfloat &J, vfloat &C, vfloat &h, - vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, - vfloat x, vfloat y, vfloat z, - vfloat xw, vfloat yw, vfloat zw, - vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d ); + static void xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, + vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, + vfloat x, vfloat y, vfloat z, + vfloat xw, vfloat yw, vfloat zw, + vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d ); #endif diff --git a/rtengine/clutstore.cc b/rtengine/clutstore.cc index f3ef27a79..ba117a2fd 100644 --- a/rtengine/clutstore.cc +++ b/rtengine/clutstore.cc @@ -2,10 +2,12 @@ #include "clutstore.h" +#include "iccstore.h" +#include "imagefloat.h" #include "opthelper.h" #include "rt_math.h" -#include "imagefloat.h" #include "stdimagesource.h" + #include "../rtgui/options.h" namespace @@ -30,7 +32,7 @@ bool loadFile( bool res = false; if (fw == fh) { - unsigned int level = 1; + int level = 1; while (level * level * level < fw) { ++level; @@ -284,7 +286,7 @@ void rtengine::HaldCLUT::splitClutFilename( profile_name = "sRGB"; if (!name.empty()) { - for (const auto& working_profile : rtengine::getWorkingProfiles()) { + for (const auto& working_profile : rtengine::ICCStore::getWorkingProfiles()) { if ( !working_profile.empty() // This isn't strictly needed, but an empty wp name should be skipped anyway && std::search(name.rbegin(), name.rend(), working_profile.rbegin(), working_profile.rend()) == name.rbegin() @@ -307,12 +309,17 @@ std::shared_ptr rtengine::CLUTStore::getClut(const Glib::ust { std::shared_ptr result; - if (!cache.get(filename, result)) { + const Glib::ustring full_filename = + !Glib::path_is_absolute(filename) + ? Glib::ustring(Glib::build_filename(options.clutsDir, filename)) + : filename; + + if (!cache.get(full_filename, result)) { std::unique_ptr clut(new rtengine::HaldCLUT); - if (clut->load(filename)) { + if (clut->load(full_filename)) { result = std::move(clut); - cache.insert(filename, result); + cache.insert(full_filename, result); } } diff --git a/rtengine/color.cc b/rtengine/color.cc index 5cf1d45b1..0957ac71e 100644 --- a/rtengine/color.cc +++ b/rtengine/color.cc @@ -773,37 +773,38 @@ void Color::hsl2rgb01 (float h, float s, float l, float &r, float &g, float &b) void Color::rgb2hsv(float r, float g, float b, float &h, float &s, float &v) { - double var_R = r / 65535.0; - double var_G = g / 65535.0; - double var_B = b / 65535.0; + const double var_R = r / 65535.0; + const double var_G = g / 65535.0; + const double var_B = b / 65535.0; - double var_Min = min(var_R, var_G, var_B); - double var_Max = max(var_R, var_G, var_B); - double del_Max = var_Max - var_Min; + const double var_Min = min(var_R, var_G, var_B); + const double var_Max = max(var_R, var_G, var_B); + const double del_Max = var_Max - var_Min; + + h = 0.f; v = var_Max; if (del_Max < 0.00001 && del_Max > -0.00001) { // no fabs, slow! - h = 0; - s = 0; + s = 0.f; } else { s = del_Max / var_Max; - if ( var_R == var_Max ) { + if (var_R == var_Max) { h = (var_G - var_B) / del_Max; - } else if ( var_G == var_Max ) { + } else if (var_G == var_Max) { h = 2.0 + (var_B - var_R) / del_Max; - } else if ( var_B == var_Max ) { + } else if (var_B == var_Max) { h = 4.0 + (var_R - var_G) / del_Max; } - h /= 6.0; + h /= 6.f; - if ( h < 0 ) { - h += 1; + if (h < 0.f) { + h += 1.f; } - if ( h > 1 ) { - h -= 1; + if (h > 1.f) { + h -= 1.f; } } } @@ -1530,18 +1531,8 @@ void Color::interpolateRGBColor (float realL, float iplow, float iphigh, int alg int toDo, const double xyz_rgb[3][3], const double rgb_xyz[3][3], float &ro, float &go, float &bo) { float X1, Y1, Z1, X2, Y2, Z2, X, Y, Z, XL, YL, ZL; - float L1, L2, LL, a_1, b_1, a_2, b_2, a, b, a_L, b_L; - float c1, c2, h1, h2, cL, hL; - float RR, GG, BB; - float Lr; - float slc = 0.f; - float hh = 0.f; - float ll = 0.f; - float sh = 0.f; - bool LCH = false; + float L1 = 0.f, L2, LL, a_1 = 0.f, b_1 = 0.f, a_2 = 0.f, b_2 = 0.f, a_L, b_L; - float ha, hb, hc, ba; - float c_1, h_1; // converting color 1 to Lab (image) Color::rgbxyz(r1, g1, b1, X1, Y1, Z1, xyz_rgb); @@ -1566,19 +1557,16 @@ void Color::interpolateRGBColor (float realL, float iplow, float iphigh, int alg X2 = x2; Y2 = y2; Z2 = z2; - float c_2, h_2; if(algm == 1 ) { Color::XYZ2Lab(X2, Y2, Z2, L2, a_2, b_2); //Color::Lab2Lch(a_2, b_2, c_2, h_2) ; } - float bal, balH, cal, calH, calm; - bal = balH = balance; + float cal, calH, calm; cal = calH = calm = 1.f - chromat; float med = 1.f; float medH = 0.f; - float medL = (iphigh + iplow) / 2.f; float calan; calan = chromat; @@ -1589,19 +1577,6 @@ void Color::interpolateRGBColor (float realL, float iplow, float iphigh, int alg if(twoc == 0) { // 2 colours calan = chromat; - //calculate new balance in function of (arbitrary) "med".. I hope no error !! - if (realL > iplow && realL <= med) { - bal = realL * balance / (iplow - med) - med * balance / (iplow - med); - } else if (realL <= iplow) { - bal = realL * balance / iplow; - } - - if (realL > medH && realL <= iphigh) { - balH = realL * balance / (iphigh - medH) - medH * balance / (iphigh - medH); - } else if (realL > iphigh) { - balH = realL * balance * (iphigh - 1.f) - balance * (iphigh - 1.f); - } - //calculate new balance chroma if (realL > iplow && realL <= med) { cal = realL * calan / (iplow - med) - med * calan / (iplow - med); @@ -1616,8 +1591,7 @@ void Color::interpolateRGBColor (float realL, float iplow, float iphigh, int alg } } - float hX = 0.f; - float hLL, hH, ccL, ccH, llH, aaH, bbH; + float aaH, bbH; if(algm <= 1) { if(twoc == 0 && metchrom == 3) { // 2 colours only with special "ab" @@ -1639,8 +1613,6 @@ void Color::interpolateRGBColor (float realL, float iplow, float iphigh, int alg b_1 = b_1 + (b_2 - b_1) * calby * balance; } } - } else { - h1 = hX; } Color::Lab2XYZ(L1, a_1, b_1, X, Y, Z); @@ -1846,7 +1818,7 @@ void Color::Lab2Yuv(float L, float a, float b, float &Y, float &u, float &v) v = 9.0 * Y / (X + 15 * Y + 3 * Z) - v0; } -void Color::Yuv2Lab(float Yin, float u, float v, float &L, float &a, float &b, double wp[3][3]) +void Color::Yuv2Lab(float Yin, float u, float v, float &L, float &a, float &b, const double wp[3][3]) { float u1 = u + u0; float v1 = v + v0; diff --git a/rtengine/color.h b/rtengine/color.h index 77db1f4f7..5889095ca 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -498,7 +498,7 @@ public: * @param a channel [-42000 ; +42000] ; can be more than 42000 (return value) * @param b channel [-42000 ; +42000] ; can be more than 42000 (return value) */ - static void Yuv2Lab(float Y, float u, float v, float &L, float &a, float &b, double wp[3][3]); + static void Yuv2Lab(float Y, float u, float v, float &L, float &a, float &b, const double wp[3][3]); /** @@ -780,18 +780,18 @@ public: static inline T interpolatePolarHue_PI (T h1, T h2, U balance) { if (h1==h2) return h1; - if ((h1 > h2) && (h1-h2 > T(M_PI))){ - h1 -= T(2*M_PI); + if ((h1 > h2) && (h1-h2 > T(rtengine::RT_PI))){ + h1 -= T(2*rtengine::RT_PI); T value = h1 + T(balance) * (h2-h1); - if (value < T(-M_PI)) - value += T(2*M_PI); + if (value < T(-rtengine::RT_PI)) + value += T(2*rtengine::RT_PI); return value; } - else if (h2-h1 > T(M_PI)) { - h2 -= T(2*M_PI); + else if (h2-h1 > T(rtengine::RT_PI)) { + h2 -= T(2*rtengine::RT_PI); T value = h1 + T(balance) * (h2-h1); if (value < T(0)) - value += T(2*M_PI); + value += T(2*rtengine::RT_PI); return value; } else @@ -821,21 +821,21 @@ public: f = 1.f - f; } - if (d < T(-M_PI) || d < T(0) || d > T(M_PI)) { //there was an inversion here !! d > T(M_PI) - h1 += T(2 * M_PI); + if (d < T(-rtengine::RT_PI) || d < T(0) || d > T(rtengine::RT_PI)) { //there was an inversion here !! d > T(rtengine::RT_PI) + h1 += T(2 * rtengine::RT_PI); h = h1 + f * (h2 - h1); - h = std::fmod(h, 2 * M_PI); + h = std::fmod(h, 2 * rtengine::RT_PI); } else { h = h1 + f * d; } // not strictly necessary..but in case of - if(h < T(-M_PI)) { - h = T(2 * M_PI) - h; + if(h < T(-rtengine::RT_PI)) { + h = T(2 * rtengine::RT_PI) - h; } - if(h > T(M_PI)) { - h = h - T(2 * M_PI); + if(h > T(rtengine::RT_PI)) { + h = h - T(2 * rtengine::RT_PI); } return h; @@ -864,7 +864,7 @@ public: f = 1.f - f; } - if (d < T(0) || d < T(0.5) || d > T(1.)) { //there was an inversion here !! d > T(M_PI) + if (d < T(0) || d < T(0.5) || d > T(1.)) { //there was an inversion here !! d > T(rtengine::RT_PI) h1 += T(1.); h = h1 + f * (h2 - h1); h = std::fmod(h, 1.); diff --git a/rtengine/colortemp.cc b/rtengine/colortemp.cc index 5cf880b41..ea90f2735 100644 --- a/rtengine/colortemp.cc +++ b/rtengine/colortemp.cc @@ -1141,11 +1141,9 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, double x, y, z; double Xchk[50], Ychk[50], Zchk[50]; //50 : I think it's a good limit for number of color : for CRI and Palette double Xcam02[50], Ycam02[50], Zcam02[50]; - double Xcam02pal[50], Ycam02pal[50], Zcam02pal[50]; double XchkLamp[50], YchkLamp[50], ZchkLamp[50]; double Xcam02Lamp[50], Ycam02Lamp[50], Zcam02Lamp[50]; - double Xpal[50], Ypal[50], Zpal[50]; const double epsilon = 0.008856; //Lab const double whiteD50[3] = {0.9646019585, 1.0, 0.8244507152}; //calculate with this tool : spect 5nm double CAM02BB00, CAM02BB01, CAM02BB02, CAM02BB10, CAM02BB11, CAM02BB12, CAM02BB20, CAM02BB21, CAM02BB22; //for CIECAT02 @@ -1153,105 +1151,74 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, double xr[50], yr[50], zr[50]; double fx[50], fy[50], fz[50]; - int palet = -1; - bool palette = false; +// bool palette = false; // double tempalet; // correlated temperature // We first test for specially handled methods if (method == "Daylight" ) { spectrum_to_xyz_preset(Daylight5300_spect, x, y, z); - palet = 0; /*tempalet=5300;*/ } else if(method == "Cloudy" ) { spectrum_to_xyz_preset(Cloudy6200_spect, x, y, z); - palet = 1; /*tempalet=6200;*/ } else if(method == "Shade" ) { spectrum_to_xyz_preset(Shade7600_spect, x, y, z); - palet = 2; /*tempalet=7600;*/ } else if(method == "Tungsten" ) { spectrum_to_xyz_preset(A2856_spect, x, y, z); - palet = 3; /*tempalet=2856;*/ } else if(method == "Fluo F1" ) { spectrum_to_xyz_preset(FluoF1_spect, x, y, z); - palet = 4; /*tempalet=6430;*/ } else if(method == "Fluo F2" ) { spectrum_to_xyz_preset(FluoF2_spect, x, y, z); - palet = 5; /*tempalet=4230;*/ } else if(method == "Fluo F3" ) { spectrum_to_xyz_preset(FluoF3_spect, x, y, z); - palet = 6; /*tempalet=3450;*/ } else if(method == "Fluo F4" ) { spectrum_to_xyz_preset(FluoF4_spect, x, y, z); - palet = 7; /*tempalet=2940;*/ } else if(method == "Fluo F5" ) { spectrum_to_xyz_preset(FluoF5_spect, x, y, z); - palet = 8; /*tempalet=6350;*/ } else if(method == "Fluo F6" ) { spectrum_to_xyz_preset(FluoF6_spect, x, y, z); - palet = 9; /*tempalet=4150;*/ } else if(method == "Fluo F7" ) { spectrum_to_xyz_preset(FluoF7_spect, x, y, z); - palet = 10; /*tempalet=6500;*/ } else if(method == "Fluo F8" ) { spectrum_to_xyz_preset(FluoF8_spect, x, y, z); - palet = 11; /*tempalet=5020;*/ } else if(method == "Fluo F9" ) { spectrum_to_xyz_preset(FluoF9_spect, x, y, z); - palet = 12; /*tempalet=4330;*/ } else if(method == "Fluo F10" ) { spectrum_to_xyz_preset(FluoF10_spect, x, y, z); - palet = 13; /*tempalet=5300;*/ } else if(method == "Fluo F11" ) { spectrum_to_xyz_preset(FluoF11_spect, x, y, z); - palet = 14; /*tempalet=4000;*/ } else if(method == "Fluo F12" ) { spectrum_to_xyz_preset(FluoF12_spect, x, y, z); - palet = 15; /*tempalet=3000;*/ } else if(method == "HMI Lamp" ) { spectrum_to_xyz_preset(HMI_spect, x, y, z); - palet = 16; /*tempalet=4760;*/ } else if(method == "GTI Lamp" ) { spectrum_to_xyz_preset(GTI_spect, x, y, z); - palet = 17; /*tempalet=5000;*/ } else if(method == "JudgeIII Lamp" ) { spectrum_to_xyz_preset(JudgeIII_spect, x, y, z); - palet = 18; /*tempalet=5100;*/ } else if(method == "Solux Lamp 3500K" ) { spectrum_to_xyz_preset(Solux3500_spect, x, y, z); - palet = 19; /*tempalet=3480;*/ } else if(method == "Solux Lamp 4100K" ) { spectrum_to_xyz_preset(Solux4100_spect, x, y, z); - palet = 20; /*tempalet=3930;*/ } else if(method == "Solux Lamp 4700K" ) { spectrum_to_xyz_preset(Solux4700_spect, x, y, z); - palet = 21; /*tempalet=4700;*/ } else if(method == "NG Solux Lamp 4700K" ) { spectrum_to_xyz_preset(NG_Solux4700_spect, x, y, z); - palet = 22; /*tempalet=4480;*/ } else if(method == "LED LSI Lumelex 2040") { spectrum_to_xyz_preset(NG_LEDLSI2040_spect, x, y, z); - palet = 23; /*tempalet=2970;*/ } else if(method == "LED CRS SP12 WWMR16" ) { spectrum_to_xyz_preset(NG_CRSSP12WWMR16_spect, x, y, z); - palet = 24; /*tempalet=3050;*/ } else if(method == "Flash 5500K" ) { spectrum_to_xyz_preset(Flash5500_spect, x, y, z); - palet = 25; /*tempalet=5500;*/ } else if(method == "Flash 6000K" ) { spectrum_to_xyz_preset(Flash6000_spect, x, y, z); - palet = 26; /*tempalet=6000;*/ } else if(method == "Flash 6500K" ) { spectrum_to_xyz_preset(Flash6500_spect, x, y, z); - palet = 27; /*tempalet=6500;*/ } else { // otherwise we use the Temp+Green generic solution if (temp <= INITIALBLACKBODY) { // if temperature is between 2000K and 4000K we use blackbody, because there will be no Daylight reference below 4000K... // of course, the previous version of RT used the "magical" but wrong formula of U.Fuchs (Ufraw). spectrum_to_xyz_blackbody(temp, x, y, z); - palet = 28; } else { // from 4000K up to 25000K: using the D illuminant (daylight) which is standard - palet = 29; if (temp <= 7000) { x_D = -4.6070e9 / (temp * temp * temp) + 2.9678e6 / (temp * temp) + 0.09911e3 / temp + 0.244063; @@ -1321,129 +1288,6 @@ void ColorTemp::temp2mul (double temp, double green, double equal, double& rmul, gmul /= max; bmul /= max; - if(palette) // palette of color : 32 skin, 4 grey, 4 blue sky - //calculate L a b in function of color and illuminant - //J.Desmis january 2012 - { - double x_x, y_y, z_z; - // illuminants - // color - const double* spec_colorpalet[] = { - ColabSkin98_m2_10_spect, ColabSkin95_0_4_spect, ColabSkin91_4_14_spect, ColabSkin90_m1_20_spect, - ColorchechSGSkiK285_11_17_spect, ColabSkin87_8_8_spect, ColabSkin87_3_10_spect, ColabSkin89_8_21_spect, - ColabSkin70_7_32_spect, ColabSkin77_12_21_spect, ColabSkin75_8_4_spect, ColabSkin75_10_33_spect, - ColorchechSkiB166_18_18_spect, ColabSkin65_7_24_spect, ColorchechSGSkiF763_14_26_spect, ColabSkin65_33_11_spect, - ColabSkin57_19_6_spect, ColabSkin57_4_19_spect, ColabSkin57_10_28_spect, ColabSkin57_22_18_spect, - ColabSkin40_17_17_spect, ColabSkin40_7_19_spect, ColabSkin40_4_11_spect, ColabSkin40_17_6_spect, - ColorchechSkiA138_13_14_spect, ColabSkin33_6_15_spect, ColabSkin35_15_17_spect, ColabSkin33_15_5_spect, - ColabSkin26_18_18_spect, ColabSkin24_7_5_spect, ColabSkin24_5_6_spect, ColabSkin20_4_2_spect, - ColabSky42_0_m24_spect, ColorchechBluC150_m5_m22_spect, ColorchechWhiA496_spect, ColorchechSGBlaN3_6_spect, - JDC468_GraK14_44_spect, ColorchechGraC4_67_spect, ColabSky60_0_m31_spect, ColorchechDCBluN881_m7_m14_spect - //ColabSkin33_10_15_spect, - //ColabSkin81_2_14_spect, - }; - - int N_col = sizeof(spec_colorpalet) / sizeof(spec_colorpalet[0]); //number of color - - if(palet < 28) { - const double* spect_illummax[] = { - Daylight5300_spect, Cloudy6200_spect, Shade7600_spect, A2856_spect, FluoF1_spect, FluoF2_spect, FluoF3_spect, FluoF4_spect, FluoF5_spect, FluoF6_spect, FluoF7_spect, - FluoF8_spect, FluoF9_spect, FluoF10_spect, FluoF11_spect, FluoF12_spect, HMI_spect, GTI_spect, JudgeIII_spect, Solux3500_spect, Solux4100_spect, Solux4700_spect, NG_Solux4700_spect, NG_CRSSP12WWMR16_spect, NG_CRSSP12WWMR16_spect, - Flash5500_spect, Flash6000_spect, Flash6500_spect - }; - for(int i = 0; i < N_col; i++) { - spectrum_to_color_xyz_preset(spec_colorpalet[i], spect_illummax[palet], x_x, y_y, z_z); - Xpal[i] = x_x; - Ypal[i] = y_y; - Zpal[i] = z_z; - } - } else /*if(palet >= 28)*/ { - if(temp < INITIALBLACKBODY) { - for(int i = 0; i < N_col; i++) { - spectrum_to_color_xyz_blackbody(spec_colorpalet[i], temp, x_x, y_y, z_z); - Xpal[i] = x_x; - Ypal[i] = y_y; - Zpal[i] = z_z; - } - } else { - double m11p, m22p; - m11p = m1; - m22p = m2; - - for(int i = 0; i < N_col; i++) { // calculate XYZ palette for illuminant and color - spectrum_to_color_xyz_daylight(spec_colorpalet[i], m11p, m22p, x_x, y_y, z_z); - Xpal[i] = x_x; - Ypal[i] = y_y; - Zpal[i] = z_z; - } - } - } - - double xp = xD; - double yp = yD; - double Xwbpal = xp / yp; //white balance - double Ywbpal = 1.0; - double Zwbpal = (1.0 - xp - yp) / yp; - //chromatic adaptation CIECAT02 at temp - double adap = 1.0; - cieCAT02(Xwbpal, Ywbpal, Zwbpal, CAM02BB00, CAM02BB01, CAM02BB02, CAM02BB10, CAM02BB11, CAM02BB12, CAM02BB20, CAM02BB21, CAM02BB22, adap); - - //here new value of X,Y,Z with chromatic CAM02 adaptation - for(int i = 0; i < N_col; i++) { - Xcam02pal[i] = CAM02BB00 * Xpal[i] + CAM02BB01 * Ypal[i] + CAM02BB02 * Zpal[i] ; - Ycam02pal[i] = CAM02BB10 * Xpal[i] + CAM02BB11 * Ypal[i] + CAM02BB12 * Zpal[i] ; - Zcam02pal[i] = CAM02BB20 * Xpal[i] + CAM02BB21 * Ypal[i] + CAM02BB22 * Zpal[i] ; - //printf("CoulXYZ %i X %f Y %f Z %f\n", i, Xpal[i],Ypal[i],Zpal[i]); - //printf("CoulCAM %i X %f Y %f Z %f\n", i, Xcam02pal[i],Ycam02pal[i],Zcam02pal[i]); - } - - //Calculate Lab - for(int i = 0; i < N_col; i++) { - xr[i] = Xcam02pal[i] / whiteD50[0]; - yr[i] = Ycam02pal[i] / whiteD50[1]; - zr[i] = Zcam02pal[i] / whiteD50[2]; - - // xr, yr , zr > epsilon - if(xr[i] > epsilon) { - fx[i] = std::cbrt(xr[i]); - } else { - fx[i] = (903.3 * xr[i] + 16.0) / 116.0; - } - - if(yr[i] > epsilon) { - fy[i] = std::cbrt(yr[i]); - } else { - fy[i] = (903.3 * yr[i] + 16.0) / 116.0; - } - - if(zr[i] > epsilon) { - fz[i] = std::cbrt(zr[i]); - } else { - fz[i] = (903.3 * zr[i] + 16.0) / 116.0; - } - } - - //Lab values in function of color and illuminant - //these values can be compared to preview values when using white-balance (skin / sky / BW) - double Lpal[50], apal[50], bpal[50]; - - for(int i = 0; i < N_col; i++) { - Lpal[i] = 116.0 * fy[i] - 16.0; - apal[i] = 500.0 * (fx[i] - fy[i]); - bpal[i] = 200.0 * (fy[i] - fz[i]); - } - - // uncomment to display Lab values - //for(int i=0;iCRI_color != 0) { - printf("Lpal=%2.2f apal=%2.2f bpal=%2.2f\n", Lpal[0], apal[0], bpal[0]); //sample - } - - //} - - } //end palette - // begin CRI_RT : color rendering index RT - adaptation of CRI by J.Desmis // CRI = 100 for Blackbody and Daylight // calculate from spectral data values X, Y, Z , for color of colorchecker24 , SG, DC, JDC_468 diff --git a/rtengine/colortemp.h b/rtengine/colortemp.h index 33a2b1b04..2d346dd81 100644 --- a/rtengine/colortemp.h +++ b/rtengine/colortemp.h @@ -57,10 +57,13 @@ public: ColorTemp (double t, double g, double e, const Glib::ustring &m); ColorTemp (double mulr, double mulg, double mulb, double e); - void update (const double rmul, const double gmul, const double bmul, const double equal) + void update (const double rmul, const double gmul, const double bmul, const double equal, const double tempBias=0.0) { this->equal = equal; mul2temp (rmul, gmul, bmul, this->equal, temp, green); + if (tempBias != 0.0 && tempBias >= -1.0 && tempBias <= 1.0) { + temp += temp * tempBias; + } } void useDefaults (const double equal) { diff --git a/rtengine/coord.cc b/rtengine/coord.cc index 8a3d7d080..bf9ee816e 100644 --- a/rtengine/coord.cc +++ b/rtengine/coord.cc @@ -27,7 +27,7 @@ namespace rtengine Coord& Coord::operator= (const PolarCoord& other) { const auto radius = other.radius; - const auto angle = other.angle / 180.0 * M_PI; + const auto angle = other.angle / 180.0 * rtengine::RT_PI; x = radius * std::cos (angle); y = radius * std::sin (angle); @@ -41,7 +41,7 @@ PolarCoord& PolarCoord::operator= (const Coord& other) const double y = other.y; radius = rtengine::norm2 (x, y); - angle = std::atan2 (y, x) * 180.0 / M_PI; + angle = std::atan2 (y, x) * 180.0 / rtengine::RT_PI; return *this; } diff --git a/rtengine/coord2d.h b/rtengine/coord2d.h index f896cd0d0..bc030f22e 100644 --- a/rtengine/coord2d.h +++ b/rtengine/coord2d.h @@ -28,7 +28,7 @@ class Coord2D public: double x, y; Coord2D (double x_, double y_) : x(x_), y(y_) {} - Coord2D () {} + Coord2D () : x(0), y(0) {} void set (double x_, double y_) { x = x_; diff --git a/rtengine/curves.cc b/rtengine/curves.cc index cf2fd0d04..3096f19f4 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -45,7 +45,7 @@ using namespace std; namespace rtengine { -Curve::Curve () : N(0), ppn(0), x(nullptr), y(nullptr), mc(0.0), mfc(0.0), msc(0.0), mhc(0.0), ypp(nullptr), x1(0.0), y1(0.0), x2(0.0), y2(0.0), x3(0.0), y3(0.0), firstPointIncluded(false), increment(0.0), nbr_points(0), hashSize(1000 /* has to be initialized to the maximum value */) {} +Curve::Curve () : N(0), ppn(0), x(nullptr), y(nullptr), mc(0.0), mfc(0.0), msc(0.0), mhc(0.0), hashSize(1000 /* has to be initialized to the maximum value */), ypp(nullptr), x1(0.0), y1(0.0), x2(0.0), y2(0.0), x3(0.0), y3(0.0), firstPointIncluded(false), increment(0.0), nbr_points(0) {} void Curve::AddPolygons () { @@ -104,7 +104,7 @@ void Curve::fillHash() milestone = 0.; polyIter = 0; - for (unsigned int i = 0; i < (hashSize + 1);) { + for (unsigned int i = 0; i < hashSize + 1u;) { while(poly_x[polyIter] < (milestone + increment)) { ++polyIter; } @@ -1376,7 +1376,7 @@ void ColorGradientCurve::SetXYZ(const Curve *pCurve, const double xyz_rgb[3][3], } float r, g, b, xx, yy, zz; - float lr1, lr2; + float lr1, lr2 = 0.f; int upperBound = lut1.getUpperBound(); if (pCurve->isIdentity()) { @@ -1765,7 +1765,7 @@ float PerceptualToneCurve::get_curve_val(float x, float range[2], float lut[], s int idx = (int)xm; - if (idx >= lut_size - 1) { + if (idx >= static_cast(lut_size) - 1) { return lut[lut_size - 1]; } @@ -1790,7 +1790,7 @@ float PerceptualToneCurve::calculateToneCurveContrastValue() const const float xd = 0.07; const float tx[] = { 0.30, 0.35, 0.40, 0.45 }; // we only look in the midtone range - for (int i = 0; i < sizeof(tx) / sizeof(tx[0]); i++) { + for (size_t i = 0; i < sizeof(tx) / sizeof(tx[0]); i++) { float x0 = tx[i] - xd; float y0 = CurveFactory::gamma2(lutToneCurve[CurveFactory::igamma2(x0) * 65535.f] / 65535.f) - k * x0; float x1 = tx[i] + xd; @@ -1807,7 +1807,7 @@ float PerceptualToneCurve::calculateToneCurveContrastValue() const { const float tx[] = { 0.20, 0.25, 0.50, 0.55 }; // we only look in the midtone range - for (int i = 0; i < sizeof(tx) / sizeof(tx[0]); i++) { + for (size_t i = 0; i < sizeof(tx) / sizeof(tx[0]); i++) { float x0 = tx[i] - xd; float y0 = CurveFactory::gamma2(lutToneCurve[CurveFactory::igamma2(x0) * 65535.f] / 65535.f) - k * x0; float x1 = tx[i] + xd; @@ -2140,7 +2140,7 @@ void PerceptualToneCurve::initApplyState(PerceptualToneCurveState & state, Glib: state.isProphoto = true; } else { state.isProphoto = false; - TMatrix Work = iccStore->workingSpaceMatrix(workingSpace); + TMatrix Work = ICCStore::getInstance()->workingSpaceMatrix(workingSpace); memset(state.Working2Prophoto, 0, sizeof(state.Working2Prophoto)); for (int i = 0; i < 3; i++) @@ -2149,7 +2149,7 @@ void PerceptualToneCurve::initApplyState(PerceptualToneCurveState & state, Glib: state.Working2Prophoto[i][j] += prophoto_xyz[i][k] * Work[k][j]; } - Work = iccStore->workingSpaceInverseMatrix (workingSpace); + Work = ICCStore::getInstance()->workingSpaceInverseMatrix (workingSpace); memset(state.Prophoto2Working, 0, sizeof(state.Prophoto2Working)); for (int i = 0; i < 3; i++) diff --git a/rtengine/curves.h b/rtengine/curves.h index 348772075..c20b78772 100644 --- a/rtengine/curves.h +++ b/rtengine/curves.h @@ -273,7 +273,7 @@ public: } float R = hlrange / (val * comp); - return log(1.0 + Y) * R; + return log1p(Y) * R; } else { return exp_scale; } @@ -994,8 +994,9 @@ inline void LuminanceToneCurve::Apply(float &r, float &g, float &b) const assert (lutToneCurve); float currLuminance = r * 0.2126729f + g * 0.7151521f + b * 0.0721750f; - float newLuminance = lutToneCurve[currLuminance]; - float coef = newLuminance / currLuminance; + const float newLuminance = lutToneCurve[currLuminance]; + currLuminance = currLuminance == 0.f ? 0.00001f : currLuminance; + const float coef = newLuminance / currLuminance; r = LIM(r * coef, 0.f, 65535.f); g = LIM(g * coef, 0.f, 65535.f); b = LIM(b * coef, 0.f, 65535.f); diff --git a/rtengine/dcp.cc b/rtengine/dcp.cc index a597fa8db..43aa98480 100644 --- a/rtengine/dcp.cc +++ b/rtengine/dcp.cc @@ -309,8 +309,6 @@ double xyCoordToTemperature(const std::array& white_xy) { 600, 0.33724, 0.36051, -116.45 } }; - constexpr double tint_scale = -3000.0; - double res = 0; // Convert to uv space. @@ -406,8 +404,10 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) : has_tone_curve(false), has_baseline_exposure_offset(false), will_interpolate(false), + valid(false), baseline_exposure_offset(0.0) { + delta_info.hue_step = delta_info.val_step = look_info.hue_step = look_info.val_step = 0; constexpr int tiff_float_size = 4; enum class TagKey : int { @@ -691,6 +691,11 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) : FILE* const file = g_fopen(filename.c_str(), "rb"); + if (file == nullptr) { + printf ("Unable to load DCP profile '%s' !", filename.c_str()); + return; + } + std::unique_ptr tagDir(ExifManager::parseTIFF(file, false)); Tag* tag = tagDir->getTag(toUnderlying(TagKey::CALIBRATION_ILLUMINANT_1)); @@ -738,6 +743,7 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) : if (!tag) { std::cerr << "DCP '" << filename << "' is missing 'ColorMatrix1'. Skipped." << std::endl; + fclose(file); return; } @@ -840,7 +846,7 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) : // Saturation maps. Need to be unwinded. tag = tagDir->getTag(toUnderlying(TagKey::PROFILE_HUE_SAT_MAP_DATA_2)); - for (int i = 0; i < delta_info.array_count; ++i) { + for (unsigned int i = 0; i < delta_info.array_count; ++i) { deltas_2[i].hue_shift = tag->toDouble((i * 3) * tiff_float_size); deltas_2[i].sat_scale = tag->toDouble((i * 3 + 1) * tiff_float_size); deltas_2[i].val_scale = tag->toDouble((i * 3 + 2) * tiff_float_size); @@ -935,6 +941,8 @@ DCPProfile::DCPProfile(const Glib::ustring& filename) : if (file) { fclose(file); } + + valid = true; } DCPProfile::~DCPProfile() @@ -988,7 +996,7 @@ void DCPProfile::apply( ) const { - const TMatrix work_matrix = iccStore->workingSpaceInverseMatrix(working_space); + const TMatrix work_matrix = ICCStore::getInstance()->workingSpaceInverseMatrix(working_space); const Matrix xyz_cam = makeXyzCam(white_balance, pre_mul, cam_wb_matrix, preferred_illuminant); // Camera RGB to XYZ D50 matrix @@ -1015,8 +1023,8 @@ void DCPProfile::apply( #pragma omp parallel for #endif - for (int y = 0; y < img->height; ++y) { - for (int x = 0; x < img->width; x++) { + for (int y = 0; y < img->getHeight(); ++y) { + for (int x = 0; x < img->getWidth(); x++) { const float& newr = mat[0][0] * img->r(y, x) + mat[0][1] * img->g(y, x) + mat[0][2] * img->b(y, x); const float& newg = mat[1][0] * img->r(y, x) + mat[1][1] * img->g(y, x) + mat[1][2] * img->b(y, x); const float& newb = mat[2][0] * img->r(y, x) + mat[2][1] * img->g(y, x) + mat[2][2] * img->b(y, x); @@ -1053,8 +1061,8 @@ void DCPProfile::apply( #pragma omp parallel for schedule(dynamic,16) #endif - for (int y = 0; y < img->height; ++y) { - for (int x = 0; x < img->width; x++) { + for (int y = 0; y < img->getHeight(); ++y) { + for (int x = 0; x < img->getWidth(); x++) { float newr = pro_photo[0][0] * img->r(y, x) + pro_photo[0][1] * img->g(y, x) + pro_photo[0][2] * img->b(y, x); float newg = pro_photo[1][0] * img->r(y, x) + pro_photo[1][1] * img->g(y, x) + pro_photo[1][2] * img->b(y, x); float newb = pro_photo[2][0] * img->r(y, x) + pro_photo[2][1] * img->g(y, x) + pro_photo[2][2] * img->b(y, x); @@ -1110,7 +1118,7 @@ void DCPProfile::setStep2ApplyState(const Glib::ustring& working_space, bool use as_out.data->already_pro_photo = false; TMatrix mWork; - mWork = iccStore->workingSpaceMatrix (working_space); + mWork = ICCStore::getInstance()->workingSpaceMatrix (working_space); memset(as_out.data->pro_photo, 0, sizeof(as_out.data->pro_photo)); for (int i = 0; i < 3; i++) @@ -1119,7 +1127,7 @@ void DCPProfile::setStep2ApplyState(const Glib::ustring& working_space, bool use as_out.data->pro_photo[i][j] += prophoto_xyz[i][k] * mWork[k][j]; } - mWork = iccStore->workingSpaceInverseMatrix (working_space); + mWork = ICCStore::getInstance()->workingSpaceInverseMatrix (working_space); memset(as_out.data->work, 0, sizeof(as_out.data->work)); for (int i = 0; i < 3; i++) @@ -1683,18 +1691,37 @@ void DCPProfile::hsdApply(const HsdTableInfo& table_info, const std::vector dirs = { rt_profile_dir @@ -1717,10 +1744,8 @@ void DCPStore::init(const Glib::ustring& rt_profile_dir) return; } - dirname += '/'; - for (const Glib::ustring& sname : *dir) { - const Glib::ustring fname = dirname + sname; + const Glib::ustring fname = Glib::build_filename(dirname, sname); if (!Glib::file_test(fname, Glib::FILE_TEST_IS_DIR)) { // File @@ -1770,9 +1795,12 @@ DCPProfile* DCPStore::getProfile(const Glib::ustring& filename) const DCPProfile* const res = new DCPProfile(filename); - if (*res) { + if (res->isValid()) { // Add profile profile_cache[filename] = res; + if (options.rtSettings.verbose) { + printf("DCP profile '%s' loaded from disk\n", filename.c_str()); + } return res; } @@ -1780,15 +1808,25 @@ DCPProfile* DCPStore::getProfile(const Glib::ustring& filename) const return nullptr; } -DCPProfile* DCPStore::getStdProfile(const Glib::ustring& cam_short_name) const +DCPProfile* DCPStore::getStdProfile(const Glib::ustring& requested_cam_short_name) const { - const Glib::ustring name = cam_short_name.uppercase(); + const Glib::ustring name = requested_cam_short_name.uppercase(); // Warning: do NOT use map.find(), since it does not seem to work reliably here - for (const auto& file_std_profile : file_std_profiles) + for (const auto& file_std_profile : file_std_profiles) { if (file_std_profile.first == name) { return getProfile(file_std_profile.second); } + } + + // profile not found, looking if we're in loadAll=false mode + if (!profileDir.empty()) { + const Glib::ustring fname = Glib::build_filename(profileDir, requested_cam_short_name + Glib::ustring(".dcp")); + + if (Glib::file_test(fname, Glib::FILE_TEST_EXISTS)) { + return getProfile(fname); + } + } return nullptr; } diff --git a/rtengine/dcp.h b/rtengine/dcp.h index 8b781ce6b..10bbf8f7e 100644 --- a/rtengine/dcp.h +++ b/rtengine/dcp.h @@ -75,6 +75,7 @@ public: bool getHasBaselineExposureOffset() const; Illuminants getIlluminants() const; + bool isValid(); void apply( Imagefloat* img, @@ -130,6 +131,7 @@ private: bool has_tone_curve; bool has_baseline_exposure_offset; bool will_interpolate; + bool valid; Matrix forward_matrix_1; Matrix forward_matrix_2; double temperature_1; @@ -150,9 +152,10 @@ class DCPStore final : public NonCopyable { public: + ~DCPStore(); static DCPStore* getInstance(); - void init(const Glib::ustring& rt_profile_dir); + void init(const Glib::ustring& rt_profile_dir, bool loadAll = true); bool isValidDCPFileName(const Glib::ustring& filename) const; @@ -163,6 +166,7 @@ private: DCPStore() = default; mutable MyMutex mutex; + Glib::ustring profileDir; // these contain standard profiles from RT. keys are all in uppercase, file path is value std::map file_std_profiles; diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index dcfe66ee5..d6bac40de 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -1,3 +1,16 @@ +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Warray-bounds" +#pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wparentheses" +#if (__GNUC__ >= 6) +#pragma GCC diagnostic ignored "-Wmisleading-indentation" +#if (__GNUC__ >= 7) +#pragma GCC diagnostic ignored "-Wdangling-else" +#endif +#endif +#endif + /*RT*/#include /*RT*/#include /*RT*/#undef MAX @@ -9,8 +22,10 @@ /*RT*/#define NO_JASPER /*RT*/#define LOCALTIME /*RT*/#define DJGPP +/*RT*/#include "jpeg.h" #include "opthelper.h" + /* dcraw.c -- Dave Coffin's raw photo decoder Copyright 1997-2016 by Dave Coffin, dcoffin a cybercom o net @@ -53,6 +68,7 @@ #include #include #include +#include #include #if defined(DJGPP) || defined(__MINGW32__) @@ -248,7 +264,11 @@ void CLASS derror() if (feof(ifp)) fprintf (stderr,_("Unexpected end of file\n")); else +#ifdef WIN32 + fprintf (stderr,_("Corrupt data near 0x%I64x\n"), (INT64) ftello(ifp)); +#else fprintf (stderr,_("Corrupt data near 0x%llx\n"), (INT64) ftello(ifp)); +#endif } data_error++; /*RT Issue 2467 longjmp (failure, 1);*/ @@ -325,7 +345,7 @@ void CLASS read_shorts (ushort *pixel, int count) { if (fread (pixel, 2, count, ifp) < count) derror(); if ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) - swab ((char*)pixel, (char*)pixel, count*2); + rtengine::swab ((char*)pixel, (char*)pixel, count*2); } void CLASS cubic_spline (const int *x_, const int *y_, const int len) @@ -1046,7 +1066,7 @@ void CLASS ljpeg_idct (struct jhead *jh) 47,55,62,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63 }; if (!cs[0]) - FORC(106) cs[c] = cos((c & 31)*M_PI/16)/2; + FORC(106) cs[c] = cos((c & 31)*rtengine::RT_PI/16)/2; memset (work, 0, sizeof work); work[0][0][0] = jh->vpred[0] += ljpeg_diff (jh->huff[0]) * jh->quant[0]; for (i=1; i < 64; i++ ) { @@ -1058,8 +1078,8 @@ void CLASS ljpeg_idct (struct jhead *jh) coef -= (1 << len) - 1; ((float *)work)[zigzag[i]] = coef * jh->quant[i]; } - FORC(8) work[0][0][c] *= M_SQRT1_2; - FORC(8) work[0][c][0] *= M_SQRT1_2; + FORC(8) work[0][0][c] *= rtengine::RT_SQRT1_2; + FORC(8) work[0][c][0] *= rtengine::RT_SQRT1_2; for (i=0; i < 8; i++) for (j=0; j < 8; j++) FORC(8) work[1][i][j] += work[0][i][c] * cs[(j*2+1)*c]; @@ -1837,13 +1857,12 @@ void CLASS parse_hasselblad_gain() not be seen as clipped). */ - ushort raw_h, count, ch_count, u16; - int i, offset; + int offset; off_t base; base = ftell(ifp); fseek(ifp, 2 * 23, SEEK_CUR); - raw_h = get2(); + get2(); fseek(ifp, 48, SEEK_CUR); offset = get4(); hbd.levels = offset ? base + offset : 0; @@ -2011,7 +2030,7 @@ void CLASS hasselblad_correct() {bhu-1,0},{bhu-1,bwu/2},{bhu-1,bwu-1}}; for (col = 0; col < bw; col++) { for (i = 0; i < 9; i++) { - ushort dist = (ushort)sqrt(abs(corners[i][0] - row) * abs(corners[i][0] - row) + abs(corners[i][1] - col) * abs(corners[i][1] - col)); + ushort dist = (ushort)sqrt(abs((int)(corners[i][0] - row)) * abs((int)(corners[i][0] - row)) + abs((int)(corners[i][1] - col)) * abs((int)(corners[i][1] - col))); ushort weight = dist > maxdist ? 0 : maxdist - dist; corners_weight[9*(row*bw+col)+i] = weight; } @@ -2603,7 +2622,7 @@ void CLASS kodak_radc_load_raw() #ifdef NO_JPEG void CLASS kodak_jpeg_load_raw() {} -void CLASS lossy_dng_load_raw() {} +// RT void CLASS lossy_dng_load_raw() {} #else METHODDEF(boolean) @@ -2613,7 +2632,7 @@ fill_input_buffer (j_decompress_ptr cinfo) size_t nbytes; nbytes = fread (jpeg_buffer, 1, 4096, ifp); - swab ((char*)jpeg_buffer, (char*)jpeg_buffer, nbytes); + rtengine::swab ((char*)jpeg_buffer, (char*)jpeg_buffer, nbytes); cinfo->src->next_input_byte = jpeg_buffer; cinfo->src->bytes_in_buffer = nbytes; return TRUE; @@ -2660,6 +2679,7 @@ void CLASS kodak_jpeg_load_raw() } void CLASS gamma_curve (double pwr, double ts, int mode, int imax); +/*RT*/#endif void CLASS lossy_dng_load_raw() { @@ -2703,7 +2723,8 @@ void CLASS lossy_dng_load_raw() fseek (ifp, save+=4, SEEK_SET); if (tile_length < INT_MAX) fseek (ifp, get4(), SEEK_SET); - jpeg_stdio_src (&cinfo, ifp); + /*RT jpeg_stdio_src (&cinfo, ifp); */ + /*RT*/jpeg_memory_src(&cinfo, fdata(ftell(ifp), ifp), ifp->size - ftell(ifp)); jpeg_read_header (&cinfo, TRUE); jpeg_start_decompress (&cinfo); buf = (*cinfo.mem->alloc_sarray) @@ -2723,7 +2744,7 @@ void CLASS lossy_dng_load_raw() jpeg_destroy_decompress (&cinfo); maximum = 0xffff; } -#endif +/*RT #endif */ void CLASS kodak_dc120_load_raw() { @@ -3626,7 +3647,7 @@ short * CLASS foveon_make_curve (double max, double mul, double filt) double x; if (!filt) filt = 0.8; - size = 4*M_PI*max / filt; + size = 4*rtengine::RT_PI*max / filt; if (size == UINT_MAX) size--; curve = (short *) calloc (size+1, sizeof *curve); merror (curve, "foveon_make_curve()"); @@ -4506,6 +4527,7 @@ void CLASS colorcheck() // free (fimg); //} +/* void CLASS scale_colors() { unsigned bottom, right, size, row, col, ur, uc, i, x, y, c, sum[8]; @@ -4621,6 +4643,7 @@ skip_block: ; } } +*/ void CLASS pre_interpolate() { ushort (*img)[4]; @@ -5892,7 +5915,7 @@ int CLASS parse_tiff_ifd (int base) break; case 33422: /* CFAPattern */ if (filters == 9) { - FORC(36) ((char *)xtrans)[c] = fgetc(ifp) & 3; + FORC(36) ((int *)xtrans)[c] = fgetc(ifp) & 3; break; } case 64777: /* Kodak P-series */ @@ -6264,6 +6287,7 @@ void CLASS apply_tiff() tile_width = tiff_ifd[i].tile_width; tile_length = tiff_ifd[i].tile_length; shutter = tiff_ifd[i].shutter; + raw_size = tiff_ifd[i].bytes; raw = i; } } @@ -6677,7 +6701,7 @@ void CLASS parse_sinar_ia() void CLASS parse_phase_one (int base) { - unsigned entries, tag, type, len, data, save, i, c; + unsigned entries, tag, len, data, save, i, c; float romm_cam[3][3]; char *cp; @@ -6690,7 +6714,7 @@ void CLASS parse_phase_one (int base) get4(); while (entries--) { tag = get4(); - type = get4(); + get4(); len = get4(); data = get4(); save = ftell(ifp); @@ -8572,7 +8596,7 @@ void CLASS identify() parse_fuji (i); } load_raw = &CLASS unpacked_load_raw; - fseek (ifp, 100+28*(shot_select > 0), SEEK_SET); + fseek (ifp, 100+28*(shot_select > 0 && shot_select < is_raw), SEEK_SET); parse_tiff (data_offset = get4()); parse_tiff (thumb_offset+12); /*RT*/ exif_base = thumb_offset+12; @@ -8743,6 +8767,10 @@ void CLASS identify() if (width == 7424 && !strcmp(model,"645D")) { height = 5502; width = 7328; filters = 0x61616161; top_margin = 29; left_margin = 48; } + if (width == 7392 && !strncmp(model,"K-1",3)) + { left_margin = 6; width = 7376; if(!dng_version) {top_margin = 18; height -= top_margin; }} + if (width == 4832 && !strncmp(model,"K-1",3)) // K-1 APS-C format + if(!dng_version) {top_margin = 18; height -= top_margin; } if (height == 3014 && width == 4096) /* Ricoh GX200 */ width = 4014; if (dng_version) { @@ -9010,7 +9038,7 @@ canon_a5: } if (fuji_layout) raw_width *= is_raw; if (filters == 9) - FORC(36) ((char *)xtrans)[c] = + FORC(36) ((int *)xtrans)[c] = xtrans_abs[(c/6+top_margin) % 6][(c+left_margin) % 6]; } else if (!strcmp(model,"KD-400Z")) { height = 1712; @@ -9482,7 +9510,7 @@ dng_skip: adobe_coeff (make, model); if(!strncmp(make, "Samsung", 7) && !strncmp(model, "NX1",3)) adobe_coeff (make, model); - if(!strncmp(make, "Pentax", 6) && (!strncmp(model, "K10D",4) || !strncmp(model, "K-70",4))) + if((!strncmp(make, "Pentax", 6) && (!strncmp(model, "K10D",4) || !strncmp(model, "K-70",4) || !strncmp(model, "K-1",3))) && filters != 0) adobe_coeff (make, model); if(!strncmp(make, "Leica", 5) && !strncmp(model, "Q",1)) adobe_coeff (make, model); @@ -9516,8 +9544,8 @@ dng_skip: } #endif #ifdef NO_JPEG - if (load_raw == &CLASS kodak_jpeg_load_raw || - load_raw == &CLASS lossy_dng_load_raw) { + if (load_raw == &CLASS kodak_jpeg_load_raw /* RT || + load_raw == &CLASS lossy_dng_load_raw*/) { fprintf (stderr,_("%s: You must link dcraw with %s!!\n"), ifname, "libjpeg"); is_raw = 0; @@ -9727,10 +9755,28 @@ static void copyFloatDataToInt(float * src, ushort * dst, size_t size, float max } void CLASS deflate_dng_load_raw() { + float_raw_image = new float[raw_width * raw_height]; + +#ifdef _OPENMP +#pragma omp parallel for +#endif + for (size_t i = 0; i < raw_width * raw_height; ++i) + float_raw_image[i] = 0.0f; + + if(tiff_samples != 1) { + fprintf(stderr, "deflate_dng_load_raw %s: demosaiced float dng files are not supported\n",ifname); + return; + } + struct tiff_ifd * ifd = &tiff_ifd[0]; while (ifd < &tiff_ifd[tiff_nifds] && ifd->offset != data_offset) ++ifd; if (ifd == &tiff_ifd[tiff_nifds]) { - fprintf(stderr, "DNG Deflate: Raw image not found???\n"); + fprintf(stderr, "deflate_dng_load_raw %s: Raw image not found???\n",ifname); + return; + } + + if (ifd->sample_format != 3) { // no floating point data + fprintf(stderr, "deflate_dng_load_raw %s: Only float format is supported for deflate compressed dng files\n",ifname); return; } @@ -9742,16 +9788,6 @@ void CLASS deflate_dng_load_raw() { default: predFactor = 0; break; } - if (ifd->sample_format == 3) { // Floating point data - float_raw_image = new float[raw_width * raw_height]; - -#ifdef _OPENMP -#pragma omp parallel for -#endif - for (size_t i = 0; i < raw_width * raw_height; ++i) - float_raw_image[i] = 0.0f; - } - // NOTE: This reader is based on the official DNG SDK from Adobe. // It assumes tiles without subtiles, but the standard does not say that // subtiles or strips couldn't be used. @@ -9779,20 +9815,22 @@ void CLASS deflate_dng_load_raw() { } uLongf dstLen = tile_width * tile_length * 4; -#ifdef _OPENMP +#if defined(_OPENMP) && ZLIB_VER_REVISION == 8 #pragma omp parallel #endif { Bytef * cBuffer = new Bytef[maxCompressed]; Bytef * uBuffer = new Bytef[dstLen]; -#ifdef _OPENMP +#if defined(_OPENMP) && ZLIB_VER_REVISION == 8 #pragma omp for collapse(2) nowait #endif for (size_t y = 0; y < raw_height; y += tile_length) { for (size_t x = 0; x < raw_width; x += tile_width) { size_t t = (y / tile_length) * tilesWide + (x / tile_width); +#if defined(_OPENMP) && ZLIB_VER_REVISION == 8 #pragma omp critical +#endif { fseek(ifp, tileOffsets[t], SEEK_SET); fread(cBuffer, 1, tileBytes[t], ifp); @@ -9851,6 +9889,8 @@ struct tiff_hdr { char desc[512], make[64], model[64], soft[32], date[20], artist[64]; }; +#include "fujicompressed.cc" + /* RT: Delete from here */ /*RT*/#undef SQR /*RT*/#undef MAX @@ -9859,3 +9899,6 @@ struct tiff_hdr { /*RT*/#undef LIM /*RT*/#undef ULIM /*RT*/#undef CLIP +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif \ No newline at end of file diff --git a/rtengine/dcraw.h b/rtengine/dcraw.h index 0a68b02cc..a109b43c2 100644 --- a/rtengine/dcraw.h +++ b/rtengine/dcraw.h @@ -76,7 +76,8 @@ protected: FILE *ofp; short order; const char *ifname; - char *meta_data, xtrans[6][6],xtrans_abs[6][6]; + char *meta_data; + int xtrans[6][6],xtrans_abs[6][6]; char cdesc[5], desc[512], make[64], model[64], model2[64], model3[64], artist[64]; float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len; time_t timestamp; @@ -89,8 +90,52 @@ protected: unsigned black, cblack[4102], maximum, mix_green, raw_color, zero_is_bad; unsigned zero_after_ff, is_raw, dng_version, is_foveon, data_error; unsigned tile_width, tile_length, gpsdata[32], load_flags; + bool xtransCompressed = false; + struct fuji_compressed_params + { + char *q_table; /* quantization table */ + int q_point[5]; /* quantization points */ + int max_bits; + int min_value; + int raw_bits; + int total_values; + int maxDiff; + ushort line_width; + }; + + struct int_pair { + int value1; + int value2; + }; + + enum _xt_lines + { + _R0=0,_R1,_R2,_R3,_R4, + _G0,_G1,_G2,_G3,_G4,_G5,_G6,_G7, + _B0,_B1,_B2,_B3,_B4, + _ltotal + }; + + struct fuji_compressed_block { + int cur_bit; // current bit being read (from left to right) + int cur_pos; // current position in a buffer + INT64 cur_buf_offset; // offset of this buffer in a file + unsigned max_read_size; // Amount of data to be read + int cur_buf_size; // buffer size + uchar *cur_buf; // currently read block + int fillbytes; // Counter to add extra byte for block size N*16 + IMFILE *input; + struct int_pair grad_even[3][41]; // tables of gradients + struct int_pair grad_odd[3][41]; + ushort *linealloc; + ushort *linebuf[_ltotal]; + }; + + int fuji_total_lines, fuji_total_blocks, fuji_block_width, fuji_bits, fuji_raw_type; + ushort raw_height, raw_width, height, width, top_margin, left_margin; ushort shrink, iheight, iwidth, fuji_width, thumb_width, thumb_height; + unsigned raw_size; ushort *raw_image; float * float_raw_image; ushort white[8][8], curve[0x10000], cr2_slice[3], sraw_mul[4]; @@ -226,6 +271,26 @@ void adobe_copy_pixel (unsigned row, unsigned col, ushort **rp); void lossless_dng_load_raw(); void packed_dng_load_raw(); void deflate_dng_load_raw(); +void init_fuji_compr(struct fuji_compressed_params* info); +void fuji_fill_buffer(struct fuji_compressed_block *info); +void init_fuji_block(struct fuji_compressed_block* info, const struct fuji_compressed_params *params, INT64 raw_offset, unsigned dsize); +void copy_line_to_xtrans(struct fuji_compressed_block* info, int cur_line, int cur_block, int cur_block_width); +void copy_line_to_bayer(struct fuji_compressed_block* info, int cur_line, int cur_block, int cur_block_width); +void fuji_zerobits(struct fuji_compressed_block* info, int *count); +void fuji_read_code(struct fuji_compressed_block* info, int *data, int bits_to_read); +int fuji_decode_sample_even(struct fuji_compressed_block* info, const struct fuji_compressed_params * params, ushort* line_buf, int pos, struct int_pair* grads); +int fuji_decode_sample_odd(struct fuji_compressed_block* info, const struct fuji_compressed_params * params, ushort* line_buf, int pos, struct int_pair* grads); +void fuji_decode_interpolation_even(int line_width, ushort* line_buf, int pos); +void fuji_extend_generic(ushort *linebuf[_ltotal], int line_width, int start, int end); +void fuji_extend_red(ushort *linebuf[_ltotal], int line_width); +void fuji_extend_green(ushort *linebuf[_ltotal], int line_width); +void fuji_extend_blue(ushort *linebuf[_ltotal], int line_width); +void xtrans_decode_block(struct fuji_compressed_block* info, const struct fuji_compressed_params *params, int cur_line); +void fuji_bayer_decode_block(struct fuji_compressed_block* info, const struct fuji_compressed_params *params, int cur_line); +void fuji_decode_strip(const struct fuji_compressed_params* info_common, int cur_block, INT64 raw_offset, unsigned dsize); +void fuji_compressed_load_raw(); +void fuji_decode_loop(const struct fuji_compressed_params* common_info, int count, INT64* raw_block_offsets, unsigned *block_sizes); +void parse_fuji_compressed_header(); void pentax_load_raw(); void nikon_load_raw(); int nikon_is_compressed(); @@ -279,7 +344,7 @@ void nokia_load_raw(); // pana_bits(int nbits); class pana_bits_t{ public: - pana_bits_t(IMFILE *&i,unsigned &u):ifp(i),load_flags(u){} + pana_bits_t(IMFILE *&i,unsigned &u):ifp(i),load_flags(u),vbits(0){} unsigned operator()(int nbits); private: IMFILE *&ifp; @@ -344,23 +409,10 @@ void foveon_make_curves(short **curvep, float dq[3], float div[3], float filt); int foveon_apply_curve (short *curve, int i); void foveon_interpolate(); -//void xtrans_interpolate (int passes); -//void cielab (ushort rgb[3], short lab[3]); - -//void remove_zeroes(); -//void bad_pixels (const char *cfname); -//void subtract (const char *fname); void gamma_curve (double pwr, double ts, int mode, int imax); void pseudoinverse (double (*in)[3], double (*out)[3], int size); void cam_xyz_coeff (float rgb_cam[3][4], double cam_xyz[4][3]); -//void hat_transform (float *temp, float *base, int st, int size, int sc); -//void wavelet_denoise(); -void scale_colors(); void pre_interpolate(); -//void border_interpolate (int border); -//void median_filter(); -//void blend_highlights(); -//void recover_highlights(); void crop_masked_pixels(); void tiff_get (unsigned base, unsigned *tag, unsigned *type, unsigned *len, unsigned *save); diff --git a/rtengine/dcraw.patch b/rtengine/dcraw.patch index 22c53d831..43f9e12eb 100644 --- a/rtengine/dcraw.patch +++ b/rtengine/dcraw.patch @@ -1,5 +1,5 @@ ---- dcraw.c 2016-10-28 13:45:27 +0000 -+++ dcraw.cc 2016-10-31 13:35:15 +0000 +--- dcraw.c 2016-11-01 01:07:55 +0000 ++++ dcraw.cc 2016-11-01 14:54:02 +0000 @@ -1,3 +1,16 @@ +/*RT*/#include +/*RT*/#include @@ -2892,8 +2892,12 @@ parse_ciff (hlen, flen-hlen, 0); load_raw = &CLASS canon_load_raw; } else if (parse_tiff(0)) apply_tiff(); -@@ -8494,6 +8575,7 @@ - fseek (ifp, 100+28*(shot_select > 0), SEEK_SET); +@@ -8491,9 +8572,10 @@ + parse_fuji (i); + } + load_raw = &CLASS unpacked_load_raw; +- fseek (ifp, 100+28*(shot_select > 0), SEEK_SET); ++ fseek (ifp, 100+28*(shot_select > 0 && shot_select < is_raw), SEEK_SET); parse_tiff (data_offset = get4()); parse_tiff (thumb_offset+12); +/*RT*/ exif_base = thumb_offset+12; diff --git a/rtengine/dcraw.patch.README b/rtengine/dcraw.patch.README index 22b2323d7..7d2c6dc4f 100644 --- a/rtengine/dcraw.patch.README +++ b/rtengine/dcraw.patch.README @@ -1,8 +1,7 @@ Patch for vanilla dcraw. Please run this against any new dcraw version copied here. Instructions for patching: -1) Download newest dcraw.c file, and copy to this folder. -2) Run 'patch -p0 < dcraw.patch' to patch the file. If there are any rejections, please fix them manually. -3) Move the patched dcraw.c to dcraw.cc -4) Re-copy the vanilla downloaded dcraw.c back to this folder, and update the patch: 'diff -u dcraw.c dcraw.cc > dcraw.patch' - +1) Create the patch: 'diff -u dcraw.c dcraw.cc > dcraw.patch' +2) Download newest dcraw.c file, and copy to this folder. +3) Run 'patch -p0 < dcraw.patch' to patch the file. If there are any rejections, please fix them manually. +4) Move the patched dcraw.c to dcraw.cc diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 8ec850b0b..3cf16762d 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -22,8 +22,18 @@ #include "mytime.h" #include "refreshmap.h" #include "rt_math.h" + +namespace +{ + // "ceil" rounding -#define SKIPS(a,b) ((a) / (b) + ((a) % (b) > 0)) +template +constexpr T skips (T a, T b) +{ + return a / b + static_cast (a % b); +} + +} namespace rtengine { @@ -31,15 +41,15 @@ namespace rtengine extern const Settings* settings; Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow) - : PipetteBuffer(editDataProvider), origCrop(nullptr), spotCrop(nullptr), laboCrop(nullptr), labnCrop(nullptr), - cropImg(nullptr), cbuf_real(nullptr), cshmap(nullptr), transCrop(nullptr), cieCrop(nullptr), cbuffer(nullptr), - updating(false), newUpdatePending(false), skip(10), padding(0), - cropx(0), cropy(0), cropw(-1), croph(-1), - trafx(0), trafy(0), trafw(-1), trafh(-1), - rqcropx(0), rqcropy(0), rqcropw(-1), rqcroph(-1), - borderRequested(32), upperBorder(0), leftBorder(0), - cropAllocated(false), - cropImageListener(nullptr), parent(parent), isDetailWindow(isDetailWindow) + : PipetteBuffer (editDataProvider), origCrop (nullptr), spotCrop(nullptr), laboCrop (nullptr), labnCrop (nullptr), + cropImg (nullptr), cbuf_real (nullptr), cshmap (nullptr), transCrop (nullptr), cieCrop (nullptr), cbuffer (nullptr), + updating (false), newUpdatePending (false), skip (10),/* padding(0),*/ + cropx (0), cropy (0), cropw (-1), croph (-1), + trafx (0), trafy (0), trafw (-1), trafh (-1), + rqcropx (0), rqcropy (0), rqcropw (-1), rqcroph (-1), + borderRequested (32), upperBorder (0), leftBorder (0), + cropAllocated (false), + cropImageListener (nullptr), parent (parent), isDetailWindow (isDetailWindow) { parent->crops.push_back (this); } @@ -47,7 +57,7 @@ Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool Crop::~Crop () { - MyMutex::MyLock cropLock(cropMutex); + MyMutex::MyLock cropLock (cropMutex); std::vector::iterator i = std::find (parent->crops.begin(), parent->crops.end(), this); @@ -55,14 +65,14 @@ Crop::~Crop () parent->crops.erase (i); } - MyMutex::MyLock processingLock(parent->mProcessing); + MyMutex::MyLock processingLock (parent->mProcessing); freeAll (); } void Crop::destroy () { - MyMutex::MyLock lock(cropMutex); - MyMutex::MyLock processingLock(parent->mProcessing); + MyMutex::MyLock lock (cropMutex); + MyMutex::MyLock processingLock (parent->mProcessing); freeAll(); } @@ -70,7 +80,7 @@ void Crop::setListener (DetailedCropListener* il) { // We can make reads in the IF, because the mProcessing lock is only needed for change if (cropImageListener != il) { - MyMutex::MyLock lock(cropMutex); + MyMutex::MyLock lock (cropMutex); cropImageListener = il; } } @@ -85,9 +95,9 @@ EditUniqueID Crop::getCurrEditID() * Delete the edit image buffer if there's no subscriber anymore. * If allocation has to be done, it is deferred to Crop::update */ -void Crop::setEditSubscriber(EditSubscriber* newSubscriber) +void Crop::setEditSubscriber (EditSubscriber* newSubscriber) { - MyMutex::MyLock lock(cropMutex); + MyMutex::MyLock lock (cropMutex); // At this point, editCrop.dataProvider->currSubscriber is the old subscriber EditSubscriber *oldSubscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : nullptr; @@ -103,7 +113,7 @@ void Crop::setEditSubscriber(EditSubscriber* newSubscriber) PipetteBuffer::LabBuffer = nullptr; } - if (PipetteBuffer::singlePlaneBuffer.getW() != -1) { + if (PipetteBuffer::singlePlaneBuffer.getWidth() != -1) { PipetteBuffer::singlePlaneBuffer.flushData(); } } @@ -111,9 +121,15 @@ void Crop::setEditSubscriber(EditSubscriber* newSubscriber) // If oldSubscriber == NULL && newSubscriber != NULL && newSubscriber->getEditingType() == ET_PIPETTE-> the image will be allocated when necessary } +bool Crop::hasListener() +{ + MyMutex::MyLock cropLock (cropMutex); + return cropImageListener; +} + void Crop::update (int todo) { - MyMutex::MyLock cropLock(cropMutex); + MyMutex::MyLock cropLock (cropMutex); ProcParams& params = parent->params; // CropGUIListener* cropgl; @@ -153,9 +169,9 @@ void Crop::update (int todo) bool needstransform = parent->ipf.needsTransform(); if (todo & (M_INIT | M_LINDENOISE)) { - MyMutex::MyLock lock(parent->minit); // Also used in improccoord + MyMutex::MyLock lock (parent->minit); // Also used in improccoord - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); if (!needsinitupdate) { setCropSizes (rqcropx, rqcropy, rqcropw, rqcroph, skip, true); @@ -170,17 +186,17 @@ void Crop::update (int todo) float autoNR = (float) settings->nrauto;// float autoNRmax = (float) settings->nrautomax;// - params.dirpyrDenoise.getCurves(noiseLCurve, noiseCCurve); + params.dirpyrDenoise.getCurves (noiseLCurve, noiseCCurve); int tilesize; int overlap; - if(settings->leveldnti == 0) { + if (settings->leveldnti == 0) { tilesize = 1024; overlap = 128; } - if(settings->leveldnti == 1) { + if (settings->leveldnti == 1) { tilesize = 768; overlap = 96; } @@ -201,35 +217,35 @@ void Crop::update (int todo) int *centerTile_X = new int [numtiles_W]; int *centerTile_Y = new int [numtiles_H]; - for(int cX = 0; cX < numtiles_W; cX++) { + for (int cX = 0; cX < numtiles_W; cX++) { centerTile_X[cX] = tileWskip / 2 + tileWskip * cX; } - for(int cY = 0; cY < numtiles_H; cY++) { + for (int cY = 0; cY < numtiles_H; cY++) { centerTile_Y[cY] = tileHskip / 2 + tileHskip * cY; } - if(settings->leveldnautsimpl == 1) { - if(params.dirpyrDenoise.Cmethod == "MAN" || params.dirpyrDenoise.Cmethod == "PON" ) { + if (settings->leveldnautsimpl == 1) { + if (params.dirpyrDenoise.Cmethod == "MAN" || params.dirpyrDenoise.Cmethod == "PON" ) { PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip); parent->imgsrc->getImage (parent->currWB, tr, baseCrop, pp, params.toneCurve, params.icm, params.raw ); } } else { - if(params.dirpyrDenoise.C2method == "MANU") { + if (params.dirpyrDenoise.C2method == "MANU") { PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip); parent->imgsrc->getImage (parent->currWB, tr, baseCrop, pp, params.toneCurve, params.icm, params.raw ); } } - if((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PRE") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "PREV")) { + if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PRE") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "PREV")) { PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip); parent->imgsrc->getImage (parent->currWB, tr, baseCrop, pp, params.toneCurve, params.icm, params.raw ); - if((!isDetailWindow) && parent->adnListener && skip == 1 && params.dirpyrDenoise.enabled) { + if ((!isDetailWindow) && parent->adnListener && skip == 1 && params.dirpyrDenoise.enabled) { float lowdenoise = 1.f; int levaut = settings->leveldnaut; - if(levaut == 1) { //Standard + if (levaut == 1) { //Standard lowdenoise = 0.7f; } @@ -240,16 +256,16 @@ void Crop::update (int todo) int poscenterX = 0; int poscenterY = 0; - for(int cc = 0; cc < numtiles_W; cc++) { - if(abs(centerTile_X[cc] - CenterPreview_X) < minimuX) { - minimuX = abs(centerTile_X[cc] - CenterPreview_X); + for (int cc = 0; cc < numtiles_W; cc++) { + if (abs (centerTile_X[cc] - CenterPreview_X) < minimuX) { + minimuX = abs (centerTile_X[cc] - CenterPreview_X); poscenterX = cc; } } - for(int cc = 0; cc < numtiles_H; cc++) { - if(abs(centerTile_Y[cc] - CenterPreview_Y) < minimuY) { - minimuY = abs(centerTile_Y[cc] - CenterPreview_Y); + for (int cc = 0; cc < numtiles_H; cc++) { + if (abs (centerTile_Y[cc] - CenterPreview_Y) < minimuY) { + minimuY = abs (centerTile_Y[cc] - CenterPreview_Y); poscenterY = cc; } } @@ -257,20 +273,20 @@ void Crop::update (int todo) // printf("TileCX=%d TileCY=%d prevX=%d prevY=%d \n",centerTile_X[poscenterX],centerTile_Y[poscenterY],CenterPreview_X,CenterPreview_Y); int crW; - if(settings->leveldnv == 0) { + if (settings->leveldnv == 0) { crW = 100; } - if(settings->leveldnv == 1) { + if (settings->leveldnv == 1) { crW = 250; } // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int((tileWskip/2));}//adapted to scale of preview - if(settings->leveldnv == 2) { - crW = int(tileWskip / 2); + if (settings->leveldnv == 2) { + crW = int (tileWskip / 2); } - if(settings->leveldnv == 3) { + if (settings->leveldnv == 3) { crW = tileWskip - 10; } @@ -292,7 +308,7 @@ void Crop::update (int todo) adjustr = 1.f / 1.2f; } - if(parent->adnListener) { + if (parent->adnListener) { parent->adnListener->noiseTilePrev (centerTile_X[poscenterX], centerTile_Y[poscenterY], CenterPreview_X, CenterPreview_Y, crW, trafw * skip); } @@ -309,15 +325,15 @@ void Crop::update (int todo) int H = baseCrop->getHeight(); Imagefloat *provicalc = new Imagefloat ((W + 1) / 2, (H + 1) / 2); //for denoise curves - for(int ii = 0; ii < H; ii += 2) { - for(int jj = 0; jj < W; jj += 2) { - provicalc->r(ii >> 1, jj >> 1) = baseCrop->r(ii, jj); - provicalc->g(ii >> 1, jj >> 1) = baseCrop->g(ii, jj); - provicalc->b(ii >> 1, jj >> 1) = baseCrop->b(ii, jj); + for (int ii = 0; ii < H; ii += 2) { + for (int jj = 0; jj < W; jj += 2) { + provicalc->r (ii >> 1, jj >> 1) = baseCrop->r (ii, jj); + provicalc->g (ii >> 1, jj >> 1) = baseCrop->g (ii, jj); + provicalc->b (ii >> 1, jj >> 1) = baseCrop->b (ii, jj); } } - parent->imgsrc->convertColorSpace(provicalc, params.icm, parent->currWB);//for denoise luminance curve + parent->imgsrc->convertColorSpace (provicalc, params.icm, parent->currWB); //for denoise luminance curve float maxr = 0.f; float maxb = 0.f; @@ -331,19 +347,19 @@ void Crop::update (int todo) maxblueaut = 0.f; minredaut = 0.f; minblueaut = 0.f; - LUTf gamcurve(65536, 0); + LUTf gamcurve (65536, 0); float gam, gamthresh, gamslope; - parent->ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); - parent->ipf.RGB_denoise_info(baseCrop, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc, true); + parent->ipf.RGB_denoise_infoGamCurve (params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); + parent->ipf.RGB_denoise_info (baseCrop, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc, true); // printf("redy=%f skin=%f pcskin=%f\n",redyel, skinc,nsknc); // printf("DCROP skip=%d cha=%4.0f Nb=%d red=%4.0f bl=%4.0f redM=%4.0f bluM=%4.0f L=%4.0f sigL=%4.0f Ch=%4.0f Si=%4.0f\n",skip, chaut,Nb, redaut,blueaut, maxredaut, maxblueaut, lumema, sigma_L, chromina, sigma); float multip = 1.f; - if(!parent->imgsrc->isRAW()) { + if (!parent->imgsrc->isRAW()) { multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good for gamma=1 } - float maxmax = max(maxredaut, maxblueaut); + float maxmax = max (maxredaut, maxblueaut); float delta; int mode = 0; // float redyel, skinc, nsknc; @@ -351,18 +367,18 @@ void Crop::update (int todo) parent->ipf.calcautodn_info (chaut, delta, Nb, levaut, maxmax, lumema, chromina, mode, lissage, redyel, skinc, nsknc); - if(maxredaut > maxblueaut) { + if (maxredaut > maxblueaut) { // maxr=(maxredaut-chaut)/((autoNRmax*multip*adjustr)/2.f); maxr = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - if(minblueaut <= minredaut && minblueaut < chaut) { + if (minblueaut <= minredaut && minblueaut < chaut) { maxb = (-chaut + minblueaut) / (autoNRmax * multip * adjustr * lowdenoise); } } else { // maxb=(maxblueaut-chaut)/((autoNRmax*multip*adjustr)/2.f); maxb = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - if(minredaut <= minblueaut && minredaut < chaut) { + if (minredaut <= minblueaut && minredaut < chaut) { maxr = (-chaut + minredaut) / (autoNRmax * multip * adjustr * lowdenoise); } }//maxb mxr - empirical evaluation red / blue @@ -371,35 +387,31 @@ void Crop::update (int todo) params.dirpyrDenoise.chroma = chaut / (autoNR * multip * adjustr * lowdenoise); params.dirpyrDenoise.redchro = maxr; params.dirpyrDenoise.bluechro = maxb; - parent->adnListener->chromaChanged(params.dirpyrDenoise.chroma, params.dirpyrDenoise.redchro, params.dirpyrDenoise.bluechro); + parent->adnListener->chromaChanged (params.dirpyrDenoise.chroma, params.dirpyrDenoise.redchro, params.dirpyrDenoise.bluechro); delete provicalc; } } - if(skip == 1 && params.dirpyrDenoise.enabled && !parent->denoiseInfoStore.valid && ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO"))) { + if (skip == 1 && params.dirpyrDenoise.enabled && !parent->denoiseInfoStore.valid && ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO"))) { MyTime t1aue, t2aue; t1aue.set(); - int crW, crH; + int crW = 100; // settings->leveldnv == 0 + int crH = 100; // settings->leveldnv == 0 - if(settings->leveldnv == 0) { - crW = 100; - crH = 100; - } - - if(settings->leveldnv == 1) { + if (settings->leveldnv == 1) { crW = 250; crH = 250; } // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int((tileWskip/2));}//adapted to scale of preview - if(settings->leveldnv == 2) { - crW = int(tileWskip / 2); - crH = int(tileHskip / 2); + if (settings->leveldnv == 2) { + crW = int (tileWskip / 2); + crH = int (tileHskip / 2); } - if(settings->leveldnv == 3) { + if (settings->leveldnv == 3) { crW = tileWskip - 10; crH = tileHskip - 10; } @@ -407,13 +419,13 @@ void Crop::update (int todo) float lowdenoise = 1.f; int levaut = settings->leveldnaut; - if(levaut == 1) { //Standard + if (levaut == 1) { //Standard lowdenoise = 0.7f; } - LUTf gamcurve(65536, 0); + LUTf gamcurve (65536, 0); float gam, gamthresh, gamslope; - parent->ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); + parent->ipf.RGB_denoise_infoGamCurve (params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); int Nb[9]; #ifdef _OPENMP #pragma omp parallel @@ -436,26 +448,26 @@ void Crop::update (int todo) #pragma omp for schedule(dynamic) collapse(2) nowait #endif - for(int wcr = 0; wcr <= 2; wcr++) { - for(int hcr = 0; hcr <= 2; hcr++) { - PreviewProps ppP (coordW[wcr] , coordH[hcr], crW, crH, 1); + for (int wcr = 0; wcr <= 2; wcr++) { + for (int hcr = 0; hcr <= 2; hcr++) { + PreviewProps ppP (coordW[wcr], coordH[hcr], crW, crH, 1); parent->imgsrc->getImage (parent->currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw ); // we only need image reduced to 1/4 here - for(int ii = 0; ii < crH; ii += 2) { - for(int jj = 0; jj < crW; jj += 2) { - provicalc->r(ii >> 1, jj >> 1) = origCropPart->r(ii, jj); - provicalc->g(ii >> 1, jj >> 1) = origCropPart->g(ii, jj); - provicalc->b(ii >> 1, jj >> 1) = origCropPart->b(ii, jj); + for (int ii = 0; ii < crH; ii += 2) { + for (int jj = 0; jj < crW; jj += 2) { + provicalc->r (ii >> 1, jj >> 1) = origCropPart->r (ii, jj); + provicalc->g (ii >> 1, jj >> 1) = origCropPart->g (ii, jj); + provicalc->b (ii >> 1, jj >> 1) = origCropPart->b (ii, jj); } } - parent->imgsrc->convertColorSpace(provicalc, params.icm, parent->currWB);//for denoise luminance curve + parent->imgsrc->convertColorSpace (provicalc, params.icm, parent->currWB); //for denoise luminance curve float pondcorrec = 1.0f; float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; int nb = 0; - parent->ipf.RGB_denoise_info(origCropPart, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + parent->ipf.RGB_denoise_info (origCropPart, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); //printf("DCROP skip=%d cha=%f red=%f bl=%f redM=%f bluM=%f chrom=%f sigm=%f lum=%f\n",skip, chaut,redaut,blueaut, maxredaut, maxblueaut, chromina, sigma, lumema); Nb[hcr * 3 + wcr] = nb; @@ -494,7 +506,7 @@ void Crop::update (int todo) float multip = 1.f; - if(!parent->imgsrc->isRAW()) { + if (!parent->imgsrc->isRAW()) { multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good fot gamma=1 } @@ -521,15 +533,15 @@ void Crop::update (int todo) int lissage = settings->leveldnliss; for (int k = 0; k < 9; k++) { - float maxmax = max(parent->denoiseInfoStore.max_r[k], parent->denoiseInfoStore.max_b[k]); + float maxmax = max (parent->denoiseInfoStore.max_r[k], parent->denoiseInfoStore.max_b[k]); parent->ipf.calcautodn_info (parent->denoiseInfoStore.ch_M[k], delta[k], Nb[k], levaut, maxmax, lumL[k], chromC[k], mode, lissage, ry[k], sk[k], pcsk[k]); // printf("ch_M=%f delta=%f\n",ch_M[k], delta[k]); } for (int k = 0; k < 9; k++) { - if(parent->denoiseInfoStore.max_r[k] > parent->denoiseInfoStore.max_b[k]) { + if (parent->denoiseInfoStore.max_r[k] > parent->denoiseInfoStore.max_b[k]) { Max_R[k] = (delta[k]) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - Min_B[k] = -(parent->denoiseInfoStore.ch_M[k] - min_b[k]) / (autoNRmax * multip * adjustr * lowdenoise); + Min_B[k] = - (parent->denoiseInfoStore.ch_M[k] - min_b[k]) / (autoNRmax * multip * adjustr * lowdenoise); Max_B[k] = 0.f; Min_R[k] = 0.f; } else { @@ -548,19 +560,19 @@ void Crop::update (int todo) MinRMoy += Min_R[k]; MinBMoy += Min_B[k]; - if(Max_R[k] > MaxR) { + if (Max_R[k] > MaxR) { MaxR = Max_R[k]; } - if(Max_B[k] > MaxB) { + if (Max_B[k] > MaxB) { MaxB = Max_B[k]; } - if(Min_R[k] < MinR) { + if (Min_R[k] < MinR) { MinR = Min_R[k]; } - if(Min_B[k] < MinB) { + if (Min_B[k] < MinB) { MinB = Min_B[k]; } } @@ -571,7 +583,7 @@ void Crop::update (int todo) MinBMoy /= 9; MinRMoy /= 9; - if(MaxR > MaxB) { + if (MaxR > MaxB) { maxr = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; //#std Dev //maxb=MinB; maxb = MinBMoy + (MinB - MinBMoy) * 0.66f; @@ -585,55 +597,56 @@ void Crop::update (int todo) params.dirpyrDenoise.redchro = maxr; params.dirpyrDenoise.bluechro = maxb; parent->denoiseInfoStore.valid = true; - if(parent->adnListener) { - parent->adnListener->chromaChanged(params.dirpyrDenoise.chroma, params.dirpyrDenoise.redchro, params.dirpyrDenoise.bluechro); + + if (parent->adnListener) { + parent->adnListener->chromaChanged (params.dirpyrDenoise.chroma, params.dirpyrDenoise.redchro, params.dirpyrDenoise.bluechro); } if (settings->verbose) { t2aue.set(); - printf("Info denoise auto performed in %d usec:\n", t2aue.etime(t1aue)); + printf ("Info denoise auto performed in %d usec:\n", t2aue.etime (t1aue)); } //end evaluate noise } // if(params.dirpyrDenoise.Cmethod=="AUT" || params.dirpyrDenoise.Cmethod=="PON") {//reinit baseCrop after Auto - if((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { //reinit baseCrop after Auto + if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { //reinit baseCrop after Auto PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip); parent->imgsrc->getImage (parent->currWB, tr, baseCrop, pp, params.toneCurve, params.icm, params.raw ); } DirPyrDenoiseParams denoiseParams = params.dirpyrDenoise; - if(params.dirpyrDenoise.Lmethod == "CUR") { - if(noiseLCurve) { + if (params.dirpyrDenoise.Lmethod == "CUR") { + if (noiseLCurve) { denoiseParams.luma = 0.5f; //very small value to init process - select curve or slider } else { denoiseParams.luma = 0.0f; } - } else if(denoiseParams.Lmethod == "SLI") { + } else if (denoiseParams.Lmethod == "SLI") { noiseLCurve.Reset(); } - if((noiseLCurve || noiseCCurve ) && skip == 1 && denoiseParams.enabled) { //only allocate memory if enabled and skip + if ((noiseLCurve || noiseCCurve ) && skip == 1 && denoiseParams.enabled) { //only allocate memory if enabled and skip // we only need image reduced to 1/4 here int W = baseCrop->getWidth(); int H = baseCrop->getHeight(); calclum = new Imagefloat ((W + 1) / 2, (H + 1) / 2); //for denoise curves - for(int ii = 0; ii < H; ii += 2) { - for(int jj = 0; jj < W; jj += 2) { - calclum->r(ii >> 1, jj >> 1) = baseCrop->r(ii, jj); - calclum->g(ii >> 1, jj >> 1) = baseCrop->g(ii, jj); - calclum->b(ii >> 1, jj >> 1) = baseCrop->b(ii, jj); + for (int ii = 0; ii < H; ii += 2) { + for (int jj = 0; jj < W; jj += 2) { + calclum->r (ii >> 1, jj >> 1) = baseCrop->r (ii, jj); + calclum->g (ii >> 1, jj >> 1) = baseCrop->g (ii, jj); + calclum->b (ii >> 1, jj >> 1) = baseCrop->b (ii, jj); } } - parent->imgsrc->convertColorSpace(calclum, params.icm, parent->currWB);//for denoise luminance curve + parent->imgsrc->convertColorSpace (calclum, params.icm, parent->currWB); //for denoise luminance curve } - if(skip != 1) if(parent->adnListener) { - parent->adnListener->noiseChanged(0.f, 0.f); + if (skip != 1) if (parent->adnListener) { + parent->adnListener->noiseChanged (0.f, 0.f); } if (todo & M_LINDENOISE) { @@ -641,26 +654,26 @@ void Crop::update (int todo) int kall = 0; float chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi; - parent->ipf.RGB_denoise(kall, baseCrop, baseCrop, calclum, parent->denoiseInfoStore.ch_M, parent->denoiseInfoStore.max_r, parent->denoiseInfoStore.max_b, parent->imgsrc->isRAW(), /*Roffset,*/ denoiseParams, parent->imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi); + parent->ipf.RGB_denoise (kall, baseCrop, baseCrop, calclum, parent->denoiseInfoStore.ch_M, parent->denoiseInfoStore.max_r, parent->denoiseInfoStore.max_b, parent->imgsrc->isRAW(), /*Roffset,*/ denoiseParams, parent->imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi); if (parent->adnListener) { - parent->adnListener->noiseChanged(nresi, highresi); + parent->adnListener->noiseChanged (nresi, highresi); } if (settings->leveldnautsimpl == 1) { if ((denoiseParams.Cmethod == "AUT" || denoiseParams.Cmethod == "PRE") && (parent->adnListener)) { // force display value of sliders - parent->adnListener->chromaChanged(denoiseParams.chroma, denoiseParams.redchro, denoiseParams.bluechro); + parent->adnListener->chromaChanged (denoiseParams.chroma, denoiseParams.redchro, denoiseParams.bluechro); } } else { - if((denoiseParams.C2method == "AUTO" || denoiseParams.C2method == "PREV") && (parent->adnListener)) { // force display value of sliders - parent->adnListener->chromaChanged(denoiseParams.chroma, denoiseParams.redchro, denoiseParams.bluechro); + if ((denoiseParams.C2method == "AUTO" || denoiseParams.C2method == "PREV") && (parent->adnListener)) { // force display value of sliders + parent->adnListener->chromaChanged (denoiseParams.chroma, denoiseParams.redchro, denoiseParams.bluechro); } } } } - parent->imgsrc->convertColorSpace(baseCrop, params.icm, parent->currWB); + parent->imgsrc->convertColorSpace (baseCrop, params.icm, parent->currWB); delete [] min_r; delete [] min_b; @@ -675,7 +688,7 @@ void Crop::update (int todo) } // has to be called after setCropSizes! Tools prior to this point can't handle the Edit mechanism, but that shouldn't be a problem. - createBuffer(cropw, croph); + createBuffer (cropw, croph); // transform if (needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) { @@ -684,11 +697,14 @@ void Crop::update (int todo) } if (needstransform) - parent->ipf.transform (baseCrop, transCrop, cropx / skip, cropy / skip, trafx / skip, trafy / skip, SKIPS(parent->fw, skip), SKIPS(parent->fh, skip), parent->getFullWidth(), parent->getFullHeight(), + parent->ipf.transform (baseCrop, transCrop, cropx / skip, cropy / skip, trafx / skip, trafy / skip, skips (parent->fw, skip), skips (parent->fh, skip), parent->getFullWidth(), parent->getFullHeight(), parent->imgsrc->getMetaData()->getFocalLen(), parent->imgsrc->getMetaData()->getFocalLen35mm(), - parent->imgsrc->getMetaData()->getFocusDist(), parent->imgsrc->getRotateDegree(), false); - else - baseCrop->copyData(transCrop); + parent->imgsrc->getMetaData()->getFocusDist(), + parent->imgsrc->getMetaData()->getFNumber(), + parent->imgsrc->getRotateDegree(), false); + else { + baseCrop->copyData (transCrop); + } if (transCrop) { baseCrop = transCrop; @@ -705,29 +721,29 @@ void Crop::update (int todo) const int W = baseCrop->getWidth(); const int H = baseCrop->getHeight(); - LabImage labcbdl(W, H); - parent->ipf.rgb2lab(*baseCrop, labcbdl, params.icm.working); + LabImage labcbdl (W, H); + parent->ipf.rgb2lab (*baseCrop, labcbdl, params.icm.working); parent->ipf.dirpyrequalizer (&labcbdl, skip); - parent->ipf.lab2rgb(labcbdl, *baseCrop, params.icm.working); + parent->ipf.lab2rgb (labcbdl, *baseCrop, params.icm.working); } // blurmap for shadow & highlights if ((todo & M_BLURMAP) && params.sh.enabled) { - double radius = sqrt (double(SKIPS(parent->fw, skip) * SKIPS(parent->fw, skip) + SKIPS(parent->fh, skip) * SKIPS(parent->fh, skip))) / 2.0; + double radius = sqrt (double (skips (parent->fw, skip) * skips (parent->fw, skip) + skips (parent->fh, skip) * skips (parent->fh, skip))) / 2.0; double shradius = params.sh.radius; if (!params.sh.hq) { shradius *= radius / 1800.0; } - if(!cshmap) { + if (!cshmap) { cshmap = new SHMap (cropw, croph, true); } cshmap->update (baseCrop, shradius, parent->ipf.lumimul, params.sh.hq, skip); - if(parent->shmap->min_f < 65535.f) { // don't call forceStat with wrong values + if (parent->shmap->min_f < 65535.f) { // don't call forceStat with wrong values cshmap->forceStat (parent->shmap->max_f, parent->shmap->min_f, parent->shmap->avg); } } @@ -751,10 +767,10 @@ void Crop::update (int todo) if(!spotCrop) { spotCrop = new Imagefloat (cropw, croph); } - baseCrop->copyData(spotCrop); + baseCrop->copyData (spotCrop); PreviewProps pp (cropx, cropy, cropw, croph, skip); - parent->ipf.removeSpots(spotCrop, params.spot.entries, pp); + parent->ipf.removeSpots (spotCrop, params.spot.entries, pp); } } else { if (spotCrop) { @@ -770,11 +786,11 @@ void Crop::update (int todo) if (todo & M_RGBCURVE) { double rrm, ggm, bbm; DCPProfile::ApplyState as; - DCPProfile *dcpProf = parent->imgsrc->getDCP(params.icm, parent->currWB, as); + DCPProfile *dcpProf = parent->imgsrc->getDCP (params.icm, parent->currWB, as); LUTu histToneCurve; parent->ipf.rgbProc (baseCrop, laboCrop, this, parent->hltonecurve, parent->shtonecurve, parent->tonecurve, cshmap, - 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->bwAutoR, parent->bwAutoG, parent->bwAutoB, dcpProf, as, histToneCurve); } @@ -798,7 +814,7 @@ void Crop::update (int todo) // apply luminance operations if (todo & (M_LUMINANCE + M_COLOR)) { //I made a little change here. Rather than have luminanceCurve (and others) use in/out lab images, we can do more if we copy right here. - labnCrop->CopyFrom(laboCrop); + labnCrop->CopyFrom (laboCrop); //parent->ipf.luminanceCurve (labnCrop, labnCrop, parent->lumacurve); @@ -811,29 +827,28 @@ void Crop::update (int todo) bool wavcontlutili = parent->wavcontlutili; LUTu dummy; - int moderetinex; // parent->ipf.MSR(labnCrop, labnCrop->W, labnCrop->H, 1); parent->ipf.chromiLuminanceCurve (this, 1, labnCrop, labnCrop, parent->chroma_acurve, parent->chroma_bcurve, parent->satcurve, parent->lhskcurve, parent->clcurve, parent->lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); parent->ipf.vibrance (labnCrop); - if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { - parent->ipf.EPDToneMap(labnCrop, 5, 1); + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { + parent->ipf.EPDToneMap (labnCrop, 5, skip); } //parent->ipf.EPDToneMap(labnCrop, 5, 1); //Go with much fewer than normal iterates for fast redisplay. // for all treatments Defringe, Sharpening, Contrast detail , Microcontrast they are activated if "CIECAM" function are disabled if (skip == 1) { - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { parent->ipf.impulsedenoise (labnCrop); } - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled) ) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled) ) { parent->ipf.defringe (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.sharpening (labnCrop, (float**)cbuffer, params.sharpening); } @@ -842,46 +857,46 @@ void Crop::update (int todo) // if (skip==1) { WaveletParams WaveParams = params.wavelet; - if(params.dirpyrequalizer.cbdlMethod == "aft") { - if(((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled))) { + if (params.dirpyrequalizer.cbdlMethod == "aft") { + if (((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled))) { parent->ipf.dirpyrequalizer (labnCrop, skip); // parent->ipf.Lanczoslab (labnCrop,labnCrop , 1.f/skip); } } int kall = 0; - int minwin = min(labnCrop->W, labnCrop->H); + int minwin = min (labnCrop->W, labnCrop->H); int maxlevelcrop = 10; // if(cp.mul[9]!=0)maxlevelcrop=10; // adap maximum level wavelet to size of crop - if(minwin * skip < 1024) { + if (minwin * skip < 1024) { maxlevelcrop = 9; //sampling wavelet 512 } - if(minwin * skip < 512) { + if (minwin * skip < 512) { maxlevelcrop = 8; //sampling wavelet 256 } - if(minwin * skip < 256) { + if (minwin * skip < 256) { maxlevelcrop = 7; //sampling 128 } - if(minwin * skip < 128) { + if (minwin * skip < 128) { maxlevelcrop = 6; } - if(minwin < 64) { + if (minwin < 64) { maxlevelcrop = 5; } int realtile; - if(params.wavelet.Tilesmethod == "big") { + if (params.wavelet.Tilesmethod == "big") { realtile = 22; } - if(params.wavelet.Tilesmethod == "lit") { + if (params.wavelet.Tilesmethod == "lit") { realtile = 12; } @@ -893,32 +908,32 @@ void Crop::update (int todo) parent->ipf.Tile_calc (tilesize, overlap, kall, labnCrop->W, labnCrop->H, numtiles_W, numtiles_H, tilewidth, tileheight, tileWskip, tileHskip); //now we have tile dimensions, overlaps //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - int minsizetile = min(tilewidth, tileheight); + int minsizetile = min (tilewidth, tileheight); int maxlev2 = 10; - if(minsizetile < 1024 && maxlevelcrop == 10) { + if (minsizetile < 1024 && maxlevelcrop == 10) { maxlev2 = 9; } - if(minsizetile < 512) { + if (minsizetile < 512) { maxlev2 = 8; } - if(minsizetile < 256) { + if (minsizetile < 256) { maxlev2 = 7; } - if(minsizetile < 128) { + if (minsizetile < 128) { maxlev2 = 6; } - int maxL = min(maxlev2, maxlevelcrop); + int maxL = min (maxlev2, maxlevelcrop); - if(parent->awavListener) { - parent->awavListener->wavChanged(float(maxL)); + if (parent->awavListener) { + parent->awavListener->wavChanged (float (maxL)); } - if((params.wavelet.enabled)) { + if ((params.wavelet.enabled)) { WavCurve wavCLVCurve; WavOpacityCurveRG waOpacityCurveRG; WavOpacityCurveBY waOpacityCurveBY; @@ -927,35 +942,35 @@ void Crop::update (int todo) LUTf wavclCurve; LUTu dummy; - params.wavelet.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); + params.wavelet.getCurves (wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); - parent->ipf.ip_wavelet(labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, wavcontlutili, skip); + parent->ipf.ip_wavelet (labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, wavcontlutili, skip); } // } // } - if(params.colorappearance.enabled) { + if (params.colorappearance.enabled) { float fnum = parent->imgsrc->getMetaData()->getFNumber (); // F number float fiso = parent->imgsrc->getMetaData()->getISOSpeed () ; // ISO float fspeed = parent->imgsrc->getMetaData()->getShutterSpeed () ; // Speed double fcomp = parent->imgsrc->getMetaData()->getExpComp (); // Compensation +/- double adap; // Scene's luminosity adaptation factor - if(fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong adap = 2000.; } else { - double E_V = fcomp + log2 (double((fnum * fnum) / fspeed / (fiso / 100.f))); + double E_V = fcomp + log2 (double ((fnum * fnum) / fspeed / (fiso / 100.f))); E_V += params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV - E_V += log2(params.raw.expos);// exposure raw white point ; log2 ==> linear to EV - adap = pow(2., E_V - 3.); // cd / m2 + E_V += log2 (params.raw.expos); // exposure raw white point ; log2 ==> linear to EV + adap = pow (2., E_V - 3.); // cd / m2 // end calculation adaptation scene luminosity } int begh = 0, endh = labnCrop->H; bool execsharp = false; - if(skip == 1) { + if (skip == 1) { execsharp = true; } @@ -963,15 +978,15 @@ void Crop::update (int todo) cieCrop = new CieImage (cropw, croph); } - if(settings->ciecamfloat) { - float d; // not used after this block - parent->ipf.ciecam_02float (cieCrop, float(adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, - dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, 1, execsharp, d, skip, 1); + if (settings->ciecamfloat) { + float d, dj, yb; // not used after this block + parent->ipf.ciecam_02float (cieCrop, float (adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, + dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, yb, 1); } else { - double dd; // not used after this block + double dd, dj, yb; // not used after this block parent->ipf.ciecam_02 (cieCrop, adap, begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, - dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, 1, execsharp, dd, skip, 1); + dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, dd, dj, yb, 1); } } else { // CIECAM is disbaled, we free up its image buffer to save some space @@ -1081,6 +1096,22 @@ void Crop::freeAll () cropAllocated = false; } + +namespace +{ + +bool check_need_larger_crop_for_lcp_distortion (int fw, int fh, int x, int y, int w, int h, const ProcParams ¶ms) +{ + if (x == 0 && y == 0 && w == fw && h == fh) { + return false; + } + + return (params.lensProf.lcpFile.length() > 0 && + params.lensProf.useDist); +} + +} // namespace + /** @brief Handles crop's image buffer reallocation and trigger sizeChanged of SizeListener[s] * If the scale changes, this method will free all buffers and reallocate ones of the new size. * It will then tell to the SizeListener that size has changed (sizeChanged) @@ -1104,12 +1135,12 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte rqcroph = rch; // store and set requested crop size - int rqx1 = LIM(rqcropx, 0, parent->fullw - 1); - int rqy1 = LIM(rqcropy, 0, parent->fullh - 1); + int rqx1 = LIM (rqcropx, 0, parent->fullw - 1); + int rqy1 = LIM (rqcropy, 0, parent->fullh - 1); int rqx2 = rqx1 + rqcropw - 1; int rqy2 = rqy1 + rqcroph - 1; - rqx2 = LIM(rqx2, 0, parent->fullw - 1); - rqy2 = LIM(rqy2, 0, parent->fullh - 1); + rqx2 = LIM (rqx2, 0, parent->fullw - 1); + rqy2 = LIM (rqy2, 0, parent->fullh - 1); this->skip = skip; @@ -1119,33 +1150,78 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte int bx2 = rqx2 + skip * borderRequested; int by2 = rqy2 + skip * borderRequested; // clip it to fit into image area - bx1 = LIM(bx1, 0, parent->fullw - 1); - by1 = LIM(by1, 0, parent->fullh - 1); - bx2 = LIM(bx2, 0, parent->fullw - 1); - by2 = LIM(by2, 0, parent->fullh - 1); + bx1 = LIM (bx1, 0, parent->fullw - 1); + by1 = LIM (by1, 0, parent->fullh - 1); + bx2 = LIM (bx2, 0, parent->fullw - 1); + by2 = LIM (by2, 0, parent->fullh - 1); int bw = bx2 - bx1 + 1; int bh = by2 - by1 + 1; // determine which part of the source image is required to compute the crop rectangle int orx, ory, orw, orh; + orx = bx1; + ory = by1; + orw = bw; + orh = bh; ProcParams& params = parent->params; + parent->ipf.transCoord (parent->fw, parent->fh, bx1, by1, bw, bh, orx, ory, orw, orh); + if (check_need_larger_crop_for_lcp_distortion (parent->fw, parent->fh, orx, ory, orw, orh, parent->params)) { + // TODO - this is an estimate of the max distortion relative to the image size. ATM it is hardcoded to be 15%, which seems enough. If not, need to revise + int dW = int (double (parent->fw) * 0.15 / (2 * skip)); + int dH = int (double (parent->fh) * 0.15 / (2 * skip)); + int x1 = orx - dW; + int x2 = orx + orw + dW; + int y1 = ory - dH; + int y2 = ory + orh + dH; + + if (x1 < 0) { + x2 += -x1; + x1 = 0; + } + + if (x2 > parent->fw) { + x1 -= x2 - parent->fw; + x2 = parent->fw; + } + + if (y1 < 0) { + y2 += -y1; + y1 = 0; + } + + if (y2 > parent->fh) { + y1 -= y2 - parent->fh; + y2 = parent->fh; + } + + orx = max (x1, 0); + ory = max (y1, 0); + orw = min (x2 - x1, parent->fw - orx); + orh = min (y2 - y1, parent->fh - ory); + } + + PreviewProps cp (orx, ory, orw, orh, skip); int orW, orH; parent->imgsrc->getSize (cp, orW, orH); - int cw = SKIPS(bw, skip); - int ch = SKIPS(bh, skip); + trafx = orx; + trafy = ory; - leftBorder = SKIPS(rqx1 - bx1, skip); - upperBorder = SKIPS(rqy1 - by1, skip); + int cw = skips (bw, skip); + int ch = skips (bh, skip); + + leftBorder = skips (rqx1 - bx1, skip); + upperBorder = skips (rqy1 - by1, skip); if (settings->verbose) { printf ("setsizes starts (%d, %d, %d, %d, %d, %d)\n", orW, orH, trafw, trafh, cw, ch); } EditType editType = ET_PIPETTE; + if (const auto editProvider = PipetteBuffer::getDataProvider ()) { if (const auto editSubscriber = editProvider->getCurrSubscriber ()) { editType = editSubscriber->getEditingType (); @@ -1163,11 +1239,11 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte origCrop = new Imagefloat; } - origCrop->allocate(trafw, trafh); // Resizing the buffer (optimization) + origCrop->allocate (trafw, trafh); // Resizing the buffer (optimization) // if transCrop doesn't exist yet, it'll be created where necessary if (transCrop) { - transCrop->allocate(cropw, croph); + transCrop->allocate (cropw, croph); } if (laboCrop) { @@ -1186,7 +1262,7 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte cropImg = new Image8; } - cropImg->allocate(cropw, croph); // Resizing the buffer (optimization) + cropImg->allocate (cropw, croph); // Resizing the buffer (optimization) //cieCrop is only used in Crop::update, it is destroyed now but will be allocated on first use if (cieCrop) { @@ -1208,18 +1284,18 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte } cbuffer = new float*[croph]; - cbuf_real = new float[(croph + 2)*cropw]; + cbuf_real = new float[ (croph + 2)*cropw]; for (int i = 0; i < croph; i++) { cbuffer[i] = cbuf_real + cropw * i + cropw; } - if(params.sh.enabled) { + if (params.sh.enabled) { cshmap = new SHMap (cropw, croph, true); } if (editType == ET_PIPETTE) { - PipetteBuffer::resize(cropw, croph); + PipetteBuffer::resize (cropw, croph); } else if (PipetteBuffer::bufferCreated()) { PipetteBuffer::flush(); } @@ -1231,8 +1307,6 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte cropx = bx1; cropy = by1; - trafx = orx; - trafy = ory; if (settings->verbose) { printf ("setsizes ends\n"); @@ -1307,5 +1381,22 @@ void Crop::fullUpdate () parent->updaterThreadStart.unlock (); } +int Crop::get_skip() +{ + MyMutex::MyLock lock (cropMutex); + return skip; } +int Crop::getLeftBorder() +{ + MyMutex::MyLock lock (cropMutex); + return leftBorder; +} + +int Crop::getUpperBorder() +{ + MyMutex::MyLock lock (cropMutex); + return upperBorder; +} + +} diff --git a/rtengine/dcrop.h b/rtengine/dcrop.h index 3739d4561..36ea81b1b 100644 --- a/rtengine/dcrop.h +++ b/rtengine/dcrop.h @@ -16,8 +16,7 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#ifndef _CROP_H_ -#define _CROP_H_ +#pragma once #include "improccoordinator.h" #include "rtengine.h" @@ -58,19 +57,18 @@ protected: bool updating; /// Flag telling if an updater thread is currently processing bool newUpdatePending; /// Flag telling the updater thread that a new update is pending int skip; - int padding; /// Minimum space allowed around image in the display area int cropx, cropy, cropw, croph; /// size of the detail crop image ('skip' taken into account), with border int trafx, trafy, trafw, trafh; /// the size and position to get from the imagesource that is transformed to the requested crop area int rqcropx, rqcropy, rqcropw, rqcroph; /// size of the requested detail crop image (the image might be smaller) (without border) - int borderRequested; /// requested extra border size for image processing + const int borderRequested; /// requested extra border size for image processing int upperBorder, leftBorder; /// extra border size really allocated for image processing bool cropAllocated; DetailedCropListener* cropImageListener; MyMutex cropMutex; - ImProcCoordinator* parent; - bool isDetailWindow; + ImProcCoordinator* const parent; + const bool isDetailWindow; EditUniqueID getCurrEditID(); bool setCropSizes (int cropX, int cropY, int cropW, int cropH, int skip, bool internal); void freeAll (); @@ -79,19 +77,8 @@ public: Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow); virtual ~Crop (); - void mLock () - { - cropMutex.lock(); - } - void mUnlock () - { - cropMutex.lock(); - } void setEditSubscriber(EditSubscriber* newSubscriber); - bool hasListener () - { - return cropImageListener; - } + bool hasListener(); void update (int todo); void setWindow (int cropX, int cropY, int cropW, int cropH, int skip) { @@ -107,22 +94,8 @@ public: void setListener (DetailedCropListener* il); void destroy (); - int get_skip () - { - return skip; - } - int getPadding () - { - return padding; - } - int getLeftBorder () - { - return leftBorder; - } - int getUpperBorder () - { - return upperBorder; - } + int get_skip(); + int getLeftBorder(); + int getUpperBorder(); }; } -#endif diff --git a/rtengine/demosaic_algos.cc b/rtengine/demosaic_algos.cc index e641ed777..6a5b8eba8 100644 --- a/rtengine/demosaic_algos.cc +++ b/rtengine/demosaic_algos.cc @@ -601,7 +601,7 @@ void RawImageSource::vng4_demosaic () const unsigned prefilters = ri->prefilters; const int width = W, height = H; - const int colors = 4; + constexpr unsigned int colors = 4; float (*image)[4]; image = (float (*)[4]) calloc (height * width, sizeof * image); @@ -647,7 +647,7 @@ void RawImageSource::vng4_demosaic () int colcount = 0; - for (int c = 0; c < colors; c++) + for (unsigned int c = 0; c < colors; c++) if (c != fc(row, col)) { *ip++ = c; csum[row][col][colcount] = sum[c]; @@ -670,7 +670,7 @@ void RawImageSource::vng4_demosaic () sum[ip[1]] += pix[ip[0]] * mul[row & 15][col & 15][i]; } - for (int i = 0; i < colors - 1; i++, ip++) { + for (unsigned int i = 0; i < colors - 1; i++, ip++) { pix[ip[0]] = sum[ip[0]] / csum[row & 15][col & 15][i]; } } @@ -693,7 +693,7 @@ void RawImageSource::vng4_demosaic () int x2 = *cp++; int weight = *cp++; int grads = *cp++; - int color = fc(row + y1, col + x1); + unsigned int color = fc(row + y1, col + x1); if (fc(row + y2, col + x2) != color) { continue; @@ -723,7 +723,7 @@ void RawImageSource::vng4_demosaic () int y = *cp++; int x = *cp++; *ip++ = (y * width + x) * 4; - int color = fc(row, col); + unsigned int color = fc(row, col); if (fc(row + y, col + x) != color && fc(row + y * 2, col + x * 2) == color) { *ip++ = (y * width + x) * 8 + color; @@ -877,7 +877,7 @@ void RawImageSource::vng4_demosaic () #define fc(row,col) \ (ri->get_filters() >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3) -#define FORCC for (int c=0; c < colors; c++) +#define FORCC for (unsigned int c=0; c < colors; c++) /* Patterned Pixel Grouping Interpolation by Alain Desbiolles @@ -886,7 +886,7 @@ void RawImageSource::ppg_demosaic() { int width = W, height = H; int dir[5] = { 1, width, -1, -width, 1 }; - int row, col, diff[2], guess[2], c, d, i; + int row, col, diff[2] = {}, guess[2], c, d, i; float (*pix)[4]; float (*image)[4]; @@ -997,7 +997,7 @@ void RawImageSource::ppg_demosaic() void RawImageSource::border_interpolate(unsigned int border, float (*image)[4], unsigned int start, unsigned int end) { - unsigned row, col, y, x, f, c, sum[8]; + unsigned row, col, y, x, f, sum[8]; unsigned int width = W, height = H; unsigned int colors = 3; @@ -1315,7 +1315,7 @@ void RawImageSource::jdl_interpolate_omp() // from "Lassus" // Adapted to RawTherapee by Jacques Desmis 3/2013 // Improved speed and reduced memory consumption by Ingo Weyrich 2/2015 //TODO Tiles to reduce memory consumption -SSEFUNCTION void RawImageSource::lmmse_interpolate_omp(int winw, int winh, int iterations) +SSEFUNCTION void RawImageSource::lmmse_interpolate_omp(int winw, int winh, array2D &rawData, array2D &red, array2D &green, array2D &blue, int iterations) { const int width = winw, height = winh; const int ba = 10; @@ -1337,8 +1337,8 @@ SSEFUNCTION void RawImageSource::lmmse_interpolate_omp(int winw, int winh, int i h2 /= hs; h3 /= hs; h4 /= hs; - int passref; - int iter; + int passref = 0; + int iter = 0; if(iterations <= 4) { iter = iterations - 1; @@ -1878,9 +1878,7 @@ SSEFUNCTION void RawImageSource::lmmse_interpolate_omp(int winw, int winh, int i if(applyGamma) { gamtab = &(Color::igammatab_24_17); } else { - for(int i = 0; i < 65536; i++) { - (*gamtab)[i] = (float)i + 0.5f; - } + gamtab->makeIdentity(); } array2D (*rgb[3]); @@ -2630,7 +2628,7 @@ void RawImageSource::ahd_demosaic(int winx, int winy, int winw, int winh) int width = W, height = H; float (*image)[4]; - int colors = 3; + unsigned int colors = 3; const double xyz_rgb[3][3] = { /* XYZ from RGB */ { 0.412453, 0.357580, 0.180423 }, @@ -2660,7 +2658,7 @@ void RawImageSource::ahd_demosaic(int winx, int winy, int winw, int winh) } for (i = 0; i < 3; i++) - for (j = 0; j < colors; j++) + for (unsigned int j = 0; j < colors; j++) for (xyz_cam[i][j] = k = 0; k < 3; k++) { xyz_cam[i][j] += xyz_rgb[i][k] * imatrices.rgb_cam[k][j] / d65_white[i]; } @@ -3251,7 +3249,7 @@ void RawImageSource::refinement_lassus(int PassCount) * the code is open source (BSD licence) */ -#define TILESIZE 256 +#define TILESIZE 192 #define TILEBORDER 10 #define CACHESIZE (TILESIZE+2*TILEBORDER) @@ -3279,7 +3277,7 @@ inline void RawImageSource::dcb_initTileLimits(int &colMin, int &rowMin, int &co } } -void RawImageSource::fill_raw( float (*cache )[4], int x0, int y0, float** rawData) +void RawImageSource::fill_raw( float (*cache )[3], int x0, int y0, float** rawData) { int rowMin, colMin, rowMax, colMax; dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 0); @@ -3290,14 +3288,14 @@ void RawImageSource::fill_raw( float (*cache )[4], int x0, int y0, float** rawDa } } -void RawImageSource::fill_border( float (*cache )[4], int border, int x0, int y0) +void RawImageSource::fill_border( float (*cache )[3], int border, int x0, int y0) { - unsigned row, col, y, x, f, c; + unsigned f; float sum[8]; - const unsigned int colors = 3; // used in FORCC + constexpr unsigned int colors = 3; // used in FORCC - for (row = y0; row < y0 + TILESIZE + TILEBORDER && row < H; row++) { - for (col = x0; col < x0 + TILESIZE + TILEBORDER && col < W; col++) { + for (int row = y0; row < y0 + TILESIZE + TILEBORDER && row < H; row++) { + for (int col = x0; col < x0 + TILESIZE + TILEBORDER && col < W; col++) { if (col >= border && col < W - border && row >= border && row < H - border) { col = W - border; @@ -3308,8 +3306,8 @@ void RawImageSource::fill_border( float (*cache )[4], int border, int x0, int y0 memset(sum, 0, sizeof sum); - for (y = row - 1; y != row + 2; y++) - for (x = col - 1; x != col + 2; x++) + for (int y = row - 1; y != row + 2; y++) + for (int x = col - 1; x != col + 2; x++) if (y < H && y < y0 + TILESIZE + TILEBORDER && x < W && x < x0 + TILESIZE + TILEBORDER) { f = fc(y, x); sum[f] += cache[(y - y0 + TILEBORDER) * CACHESIZE + TILEBORDER + x - x0][f]; @@ -3325,93 +3323,55 @@ void RawImageSource::fill_border( float (*cache )[4], int border, int x0, int y0 } } } + // saves red and blue -void RawImageSource::copy_to_buffer( float (*buffer)[3], float (*image)[4]) + +// change buffer[3] -> buffer[2], possibly to buffer[1] if split +// into two loops, one for R and another for B, could also be smaller because +// there is no need for green pixels pass +// this would decrease the amount of needed memory +// from megapixels*2 records to megapixels*0.5 +// also don't know if float is needed as data is 1-65536 integer (I believe!!) +// comment from Ingo: float is needed because rawdata in rt is float +void RawImageSource::copy_to_buffer( float (*buffer)[2], float (*image)[3]) { for (int indx = 0; indx < CACHESIZE * CACHESIZE; indx++) { buffer[indx][0] = image[indx][0]; //R - buffer[indx][2] = image[indx][2]; //B + buffer[indx][1] = image[indx][2]; //B } } // restores red and blue -void RawImageSource::restore_from_buffer(float (*image)[4], float (*buffer)[3]) + +// other comments like in copy_to_buffer +void RawImageSource::restore_from_buffer(float (*image)[3], float (*buffer)[2]) { for (int indx = 0; indx < CACHESIZE * CACHESIZE; indx++) { image[indx][0] = buffer[indx][0]; //R - image[indx][2] = buffer[indx][2]; //B + image[indx][2] = buffer[indx][1]; //B } } // First pass green interpolation -void RawImageSource::dcb_hid(float (*image)[4], float (*bufferH)[3], float (*bufferV)[3], int x0, int y0) + +// remove entirely: bufferH and bufferV +void RawImageSource::dcb_hid(float (*image)[3], int x0, int y0) { - const int u = CACHESIZE, v = 2 * CACHESIZE; + const int u = CACHESIZE; int rowMin, colMin, rowMax, colMax; dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 2); - // green pixels - for (int row = rowMin; row < rowMax; row++) { +// simple green bilinear in R and B pixels + for (int row = rowMin; row < rowMax; row++) for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col; col < colMax; col += 2, indx += 2) { - assert(indx - u >= 0 && indx + u < u * u); - bufferH[indx][1] = (image[indx - 1][1] + image[indx + 1][1]) * 0.5f; - bufferV[indx][1] = (image[indx + u][1] + image[indx - u][1]) * 0.5f; - } - } + assert(indx - u - 1 >= 0 && indx + u + 1 < u * u); - // red in blue pixel, blue in red pixel - for (int row = rowMin; row < rowMax; row++) - for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col, c = 2 - FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col); col < colMax; col += 2, indx += 2) { - assert(indx - u - 1 >= 0 && indx + u + 1 < u * u && c >= 0 && c < 3); - - bufferH[indx][c] = ( 4.f * bufferH[indx][1] - - bufferH[indx + u + 1][1] - bufferH[indx + u - 1][1] - bufferH[indx - u + 1][1] - bufferH[indx - u - 1][1] - + image[indx + u + 1][c] + image[indx + u - 1][c] + image[indx - u + 1][c] + image[indx - u - 1][c] ) * 0.25f; - bufferV[indx][c] = ( 4.f * bufferV[indx][1] - - bufferV[indx + u + 1][1] - bufferV[indx + u - 1][1] - bufferV[indx - u + 1][1] - bufferV[indx - u - 1][1] - + image[indx + u + 1][c] + image[indx + u - 1][c] + image[indx - u + 1][c] + image[indx - u - 1][c] ) * 0.25f; - } - - // red or blue in green pixels - for (int row = rowMin; row < rowMax; row++) - for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin + 1) & 1), indx = row * CACHESIZE + col, c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col + 1), d = 2 - c; col < colMax; col += 2, indx += 2) { - assert(indx - u >= 0 && indx + u < u * u && c >= 0 && c < 3 && d >= 0 && d < 3); - bufferH[indx][c] = (image[indx + 1][c] + image[indx - 1][c]) * 0.5f; - bufferH[indx][d] = (2.f * bufferH[indx][1] - bufferH[indx + u][1] - bufferH[indx - u][1] + image[indx + u][d] + image[indx - u][d]) * 0.5f; - bufferV[indx][c] = (2.f * bufferV[indx][1] - bufferV[indx + 1][1] - bufferV[indx - 1][1] + image[indx + 1][c] + image[indx - 1][c]) * 0.5f; - bufferV[indx][d] = (image[indx + u][d] + image[indx - u][d]) * 0.5f; - } - - // Decide green pixels - for (int row = rowMin; row < rowMax; row++) - for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col, c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col), d = 2 - c; col < colMax; col += 2, indx += 2) { - float current = max(image[indx + v][c], image[indx - v][c], image[indx - 2][c], image[indx + 2][c]) - - min(image[indx + v][c], image[indx - v][c], image[indx - 2][c], image[indx + 2][c]) + - max(image[indx + 1 + u][d], image[indx + 1 - u][d], image[indx - 1 + u][d], image[indx - 1 - u][d]) - - min(image[indx + 1 + u][d], image[indx + 1 - u][d], image[indx - 1 + u][d], image[indx - 1 - u][d]); - - float currentH = max(bufferH[indx + v][d], bufferH[indx - v][d], bufferH[indx - 2][d], bufferH[indx + 2][d]) - - min(bufferH[indx + v][d], bufferH[indx - v][d], bufferH[indx - 2][d], bufferH[indx + 2][d]) + - max(bufferH[indx + 1 + u][c], bufferH[indx + 1 - u][c], bufferH[indx - 1 + u][c], bufferH[indx - 1 - u][c]) - - min(bufferH[indx + 1 + u][c], bufferH[indx + 1 - u][c], bufferH[indx - 1 + u][c], bufferH[indx - 1 - u][c]); - - float currentV = max(bufferV[indx + v][d], bufferV[indx - v][d], bufferV[indx - 2][d], bufferV[indx + 2][d]) - - min(bufferV[indx + v][d], bufferV[indx - v][d], bufferV[indx - 2][d], bufferV[indx + 2][d]) + - max(bufferV[indx + 1 + u][c], bufferV[indx + 1 - u][c], bufferV[indx - 1 + u][c], bufferV[indx - 1 - u][c]) - - min(bufferV[indx + 1 + u][c], bufferV[indx + 1 - u][c], bufferV[indx - 1 + u][c], bufferV[indx - 1 - u][c]); - - assert(indx >= 0 && indx < u * u); - - if (ABS(current - currentH) < ABS(current - currentV)) { - image[indx][1] = bufferH[indx][1]; - } else { - image[indx][1] = bufferV[indx][1]; - } + image[indx][1] = 0.25*(image[indx-1][1]+image[indx+1][1]+image[indx-u][1]+image[indx+u][1]); } } -// missing colors are interpolated -void RawImageSource::dcb_color(float (*image)[4], int x0, int y0) +// missing colours are interpolated +void RawImageSource::dcb_color(float (*image)[3], int x0, int y0) { const int u = CACHESIZE; int rowMin, colMin, rowMax, colMax; @@ -3421,32 +3381,57 @@ void RawImageSource::dcb_color(float (*image)[4], int x0, int y0) for (int row = rowMin; row < rowMax; row++) for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col, c = 2 - FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col); col < colMax; col += 2, indx += 2) { assert(indx >= 0 && indx < u * u && c >= 0 && c < 4); + + +//Jacek comment: one multiplication less + image[indx][c] = image[indx][1] + + ( image[indx + u + 1][c] + image[indx + u - 1][c] + image[indx - u + 1][c] + image[indx - u - 1][c] + - (image[indx + u + 1][1] + image[indx + u - 1][1] + image[indx - u + 1][1] + image[indx - u - 1][1]) ) * 0.25f; + +/* original image[indx][c] = ( 4.f * image[indx][1] - image[indx + u + 1][1] - image[indx + u - 1][1] - image[indx - u + 1][1] - image[indx - u - 1][1] + image[indx + u + 1][c] + image[indx + u - 1][c] + image[indx - u + 1][c] + image[indx - u - 1][c] ) * 0.25f; - } +*/ + } // red or blue in green pixels for (int row = rowMin; row < rowMax; row++) for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin + 1) & 1), indx = row * CACHESIZE + col, c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col + 1), d = 2 - c; col < colMax; col += 2, indx += 2) { assert(indx >= 0 && indx < u * u && c >= 0 && c < 4); + +//Jacek comment: two multiplications (in total) less + image[indx][c] = image[indx][1] + (image[indx + 1][c] + image[indx - 1][c] - (image[indx + 1][1] + image[indx - 1][1])) * 0.5f; + image[indx][d] = image[indx][1] + (image[indx + u][d] + image[indx - u][d] - (image[indx + u][1] + image[indx - u][1])) * 0.5f; + + +/* original image[indx][c] = (2.f * image[indx][1] - image[indx + 1][1] - image[indx - 1][1] + image[indx + 1][c] + image[indx - 1][c]) * 0.5f; image[indx][d] = (2.f * image[indx][1] - image[indx + u][1] - image[indx - u][1] + image[indx + u][d] + image[indx - u][d]) * 0.5f; +*/ } } // green correction -void RawImageSource::dcb_hid2(float (*image)[4], int x0, int y0) +void RawImageSource::dcb_hid2(float (*image)[3], int x0, int y0) { - const int u = CACHESIZE, v = 2 * CACHESIZE; + const int v = 2 * CACHESIZE; int rowMin, colMin, rowMax, colMax; dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 2); for (int row = rowMin; row < rowMax; row++) { for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col, c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col); col < colMax; col += 2, indx += 2) { - assert(indx - v >= 0 && indx + v < u * u); + assert(indx - v >= 0 && indx + v < CACHESIZE * CACHESIZE); + +//Jacek comment: one multiplication less + image[indx][1] = image[indx][c] + + (image[indx + v][1] + image[indx - v][1] + image[indx - 2][1] + image[indx + 2][1] + - (image[indx + v][c] + image[indx - v][c] + image[indx - 2][c] + image[indx + 2][c])) * 0.25f; + +/* original image[indx][1] = (image[indx + v][1] + image[indx - v][1] + image[indx - 2][1] + image[indx + 2][1]) * 0.25f + image[indx][c] - ( image[indx + v][c] + image[indx - v][c] + image[indx - 2][c] + image[indx + 2][c]) * 0.25f; +*/ } } } @@ -3456,9 +3441,12 @@ void RawImageSource::dcb_hid2(float (*image)[4], int x0, int y0) // 1 = vertical // 0 = horizontal // saved in image[][3] -void RawImageSource::dcb_map(float (*image)[4], int x0, int y0) + +// seems at least 2 persons implemented some code, as this one has different coding style, could be unified +// I don't know if *pix is faster than a loop working on image[] directly +void RawImageSource::dcb_map(float (*image)[3], uint8_t *map, int x0, int y0) { - const int u = 4 * CACHESIZE; + const int u = 3 * CACHESIZE; int rowMin, colMin, rowMax, colMax; dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 2); @@ -3468,36 +3456,41 @@ void RawImageSource::dcb_map(float (*image)[4], int x0, int y0) assert(indx >= 0 && indx < u * u); - if ( *pix > ( pix[-4] + pix[+4] + pix[-u] + pix[+u]) / 4 ) { - image[indx][3] = ((min(pix[-4], pix[+4]) + pix[-4] + pix[+4] ) < (min(pix[-u], pix[+u]) + pix[-u] + pix[+u])); + // comparing 4 * a to (b+c+d+e) instead of a to (b+c+d+e)/4 is faster because divisions are slow + if ( 4 * (*pix) > ( (pix[-3] + pix[+3]) + (pix[-u] + pix[+u])) ) { + map[indx] = ((min(pix[-3], pix[+3]) + (pix[-3] + pix[+3]) ) < (min(pix[-u], pix[+u]) + (pix[-u] + pix[+u]))); } else { - image[indx][3] = ((max(pix[-4], pix[+4]) + pix[-4] + pix[+4] ) > (max(pix[-u], pix[+u]) + pix[-u] + pix[+u])); + map[indx] = ((max(pix[-3], pix[+3]) + (pix[-3] + pix[+3]) ) > (max(pix[-u], pix[+u]) + (pix[-u] + pix[+u]))); } } } } // interpolated green pixels are corrected using the map -void RawImageSource::dcb_correction(float (*image)[4], int x0, int y0) +void RawImageSource::dcb_correction(float (*image)[3], uint8_t *map, int x0, int y0) { const int u = CACHESIZE, v = 2 * CACHESIZE; int rowMin, colMin, rowMax, colMax; dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 2); for (int row = rowMin; row < rowMax; row++) { - for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col; col < colMax; col += 2, indx += 2) { - float current = 4.f * image[indx][3] + - 2.f * (image[indx + u][3] + image[indx - u][3] + image[indx + 1][3] + image[indx - 1][3]) + - image[indx + v][3] + image[indx - v][3] + image[indx + 2][3] + image[indx - 2][3]; + for (int indx = row * CACHESIZE + colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1); indx < row * CACHESIZE + colMax; indx += 2) { +// for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col; col < colMax; col += 2, indx += 2) { + float current = 4 * map[indx] + + 2 * (map[indx + u] + map[indx - u] + map[indx + 1] + map[indx - 1]) + + map[indx + v] + map[indx - v] + map[indx + 2] + map[indx - 2]; assert(indx >= 0 && indx < u * u); - image[indx][1] = ((16.f - current) * (image[indx - 1][1] + image[indx + 1][1]) * 0.5f + current * (image[indx - u][1] + image[indx + u][1]) * 0.5f ) * 0.0625f; + image[indx][1] = ((16.f - current) * (image[indx - 1][1] + image[indx + 1][1]) + current * (image[indx - u][1] + image[indx + u][1]) ) * 0.03125f; +// image[indx][1] = ((16.f - current) * (image[indx - 1][1] + image[indx + 1][1]) * 0.5f + current * (image[indx - u][1] + image[indx + u][1]) * 0.5f ) * 0.0625f; } } } // R and B smoothing using green contrast, all pixels except 2 pixel wide border -void RawImageSource::dcb_pp(float (*image)[4], int x0, int y0) + +// again code with *pix, is this kind of calculating faster in C, than this what was commented? +void RawImageSource::dcb_pp(float (*image)[3], int x0, int y0) { const int u = CACHESIZE; int rowMin, colMin, rowMax, colMax; @@ -3505,10 +3498,10 @@ void RawImageSource::dcb_pp(float (*image)[4], int x0, int y0) for (int row = rowMin; row < rowMax; row++) for (int col = colMin, indx = row * CACHESIZE + col; col < colMax; col++, indx++) { - //int r1 = ( image[indx-1][0] + image[indx+1][0] + image[indx-u][0] + image[indx+u][0] + image[indx-u-1][0] + image[indx+u+1][0] + image[indx-u+1][0] + image[indx+u-1][0])/8; - //int g1 = ( image[indx-1][1] + image[indx+1][1] + image[indx-u][1] + image[indx+u][1] + image[indx-u-1][1] + image[indx+u+1][1] + image[indx-u+1][1] + image[indx+u-1][1])/8; - //int b1 = ( image[indx-1][2] + image[indx+1][2] + image[indx-u][2] + image[indx+u][2] + image[indx-u-1][2] + image[indx+u+1][2] + image[indx-u+1][2] + image[indx+u-1][2])/8; - float (*pix)[4] = image + (indx - u - 1); +// float r1 = image[indx-1][0] + image[indx+1][0] + image[indx-u][0] + image[indx+u][0] + image[indx-u-1][0] + image[indx+u+1][0] + image[indx-u+1][0] + image[indx+u-1][0]; +// float g1 = image[indx-1][1] + image[indx+1][1] + image[indx-u][1] + image[indx+u][1] + image[indx-u-1][1] + image[indx+u+1][1] + image[indx-u+1][1] + image[indx+u-1][1]; +// float b1 = image[indx-1][2] + image[indx+1][2] + image[indx-u][2] + image[indx+u][2] + image[indx-u-1][2] + image[indx+u+1][2] + image[indx-u+1][2] + image[indx+u-1][2]; + float (*pix)[3] = image + (indx - u - 1); float r1 = (*pix)[0]; float g1 = (*pix)[1]; float b1 = (*pix)[2]; @@ -3543,8 +3536,8 @@ void RawImageSource::dcb_pp(float (*image)[4], int x0, int y0) r1 *= 0.125f; g1 *= 0.125f; b1 *= 0.125f; - r1 = r1 + ( image[indx][1] - g1 ); - b1 = b1 + ( image[indx][1] - g1 ); + r1 += ( image[indx][1] - g1 ); + b1 += ( image[indx][1] - g1 ); assert(indx >= 0 && indx < u * u); image[indx][0] = r1; @@ -3554,70 +3547,90 @@ void RawImageSource::dcb_pp(float (*image)[4], int x0, int y0) // interpolated green pixels are corrected using the map // with correction -void RawImageSource::dcb_correction2(float (*image)[4], int x0, int y0) +void RawImageSource::dcb_correction2(float (*image)[3], uint8_t *map, int x0, int y0) { const int u = CACHESIZE, v = 2 * CACHESIZE; int rowMin, colMin, rowMax, colMax; dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 4); for (int row = rowMin; row < rowMax; row++) { - for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col, c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col); col < colMax; col += 2, indx += 2) { - float current = 4.f * image[indx][3] + - 2.f * (image[indx + u][3] + image[indx - u][3] + image[indx + 1][3] + image[indx - 1][3]) + - image[indx + v][3] + image[indx - v][3] + image[indx + 2][3] + image[indx - 2][3]; + for (int indx = row * CACHESIZE + colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1)); indx < row * CACHESIZE + colMax; indx += 2) { + // map values are uint8_t either 0 or 1. Adding them using integer instructions is perfectly valid and fast. Final result is converted to float then + float current = 4 * map[indx] + + 2 * (map[indx + u] + map[indx - u] + map[indx + 1] + map[indx - 1]) + + map[indx + v] + map[indx - v] + map[indx + 2] + map[indx - 2]; assert(indx >= 0 && indx < u * u); + +// Jacek comment: works now, and has 3 float mults and 9 float adds + image[indx][1] = image[indx][c] + + ((16.f - current) * (image[indx - 1][1] + image[indx + 1][1] - (image[indx + 2][c] + image[indx - 2][c])) + + current * (image[indx - u][1] + image[indx + u][1] - (image[indx + v][c] + image[indx - v][c]))) * 0.03125f; + + + // 4 float mults and 9 float adds + // Jacek comment: not mathematically identical to original +/* image[indx][1] = 16.f * image[indx][c] + + ((16.f - current) * ((image[indx - 1][1] + image[indx + 1][1]) + - (image[indx + 2][c] + image[indx - 2][c])) + + current * ((image[indx - u][1] + image[indx + u][1]) - (image[indx + v][c] + image[indx - v][c]))) * 0.03125f; +*/ + // 7 float mults and 10 float adds + // original code +/* image[indx][1] = ((16.f - current) * ((image[indx - 1][1] + image[indx + 1][1]) * 0.5f + image[indx][c] - (image[indx + 2][c] + image[indx - 2][c]) * 0.5f) + current * ((image[indx - u][1] + image[indx + u][1]) * 0.5f + image[indx][c] - (image[indx + v][c] + image[indx - v][c]) * 0.5f)) * 0.0625f; +*/ } } } // image refinement -void RawImageSource::dcb_refinement(float (*image)[4], int x0, int y0) +void RawImageSource::dcb_refinement(float (*image)[3], uint8_t *map, int x0, int y0) { - const int u = CACHESIZE, v = 2 * CACHESIZE, w = 3 * CACHESIZE; + const int u = CACHESIZE, v = 2 * CACHESIZE; int rowMin, colMin, rowMax, colMax; dcb_initTileLimits(colMin, rowMin, colMax, rowMax, x0, y0, 4); - float f[5], g1, g2; + float f0, f1, f2, g1, h0, h1, h2, g2; for (int row = rowMin; row < rowMax; row++) for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin) & 1), indx = row * CACHESIZE + col, c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col); col < colMax; col += 2, indx += 2) { - float current = 4.f * image[indx][3] + - 2.f * (image[indx + u][3] + image[indx - u][3] + image[indx + 1][3] + image[indx - 1][3]) - + image[indx + v][3] + image[indx - v][3] + image[indx - 2][3] + image[indx + 2][3]; - f[0] = (float)(image[indx - u][1] + image[indx + u][1]) / (2.f + 2.f * image[indx][c]); - f[1] = 2.f * image[indx - u][1] / (2 + image[indx - v][c] + image[indx][c]); - f[2] = (float)(image[indx - u][1] + image[indx - w][1]) / (2.f + 2.f * image[indx - v][c]); - f[3] = 2.f * image[indx + u][1] / (2 + image[indx + v][c] + image[indx][c]); - f[4] = (float)(image[indx + u][1] + image[indx + w][1]) / (2.f + 2.f * image[indx + v][c]); + float current = 4 * map[indx] + + 2 * (map[indx + u] + map[indx - u] + map[indx + 1] + map[indx - 1]) + + map[indx + v] + map[indx - v] + map[indx - 2] + map[indx + 2]; - g1 = (f[0] + f[1] + f[2] + f[3] + f[4] - max(f[1], f[2], f[3], f[4]) - min(f[1], f[2], f[3], f[4])) / 3.f; + float currPix = image[indx][c]; - f[0] = (float)(image[indx - 1][1] + image[indx + 1][1]) / (2.f + 2.f * image[indx][c]); - f[1] = 2.f * image[indx - 1][1] / (2 + image[indx - 2][c] + image[indx][c]); - f[2] = (float)(image[indx - 1][1] + image[indx - 3][1]) / (2.f + 2.f * image[indx - 2][c]); - f[3] = 2.f * image[indx + 1][1] / (2 + image[indx + 2][c] + image[indx][c]); - f[4] = (float)(image[indx + 1][1] + image[indx + 3][1]) / (2.f + 2.f * image[indx + 2][c]); + f0 = (float)(image[indx - u][1] + image[indx + u][1]) / (1.f + 2.f * currPix); + f1 = 2.f * image[indx - u][1] / (1.f + image[indx - v][c] + currPix); + f2 = 2.f * image[indx + u][1] / (1.f + image[indx + v][c] + currPix); - g2 = (f[0] + f[1] + f[2] + f[3] + f[4] - max(f[1], f[2], f[3], f[4]) - min(f[1], f[2], f[3], f[4])) / 3.f; + g1 = f0 + f1 + f2; + h0 = (float)(image[indx - 1][1] + image[indx + 1][1]) / (1.f + 2.f * currPix); + h1 = 2.f * image[indx - 1][1] / (1.f + image[indx - 2][c] + currPix); + h2 = 2.f * image[indx + 1][1] / (1.f + image[indx + 2][c] + currPix); + + g2 = h0 + h1 + h2; + + // new green value assert(indx >= 0 && indx < u * u); - image[indx][1] = (2.f + image[indx][c]) * (current * g1 + (16.f - current) * g2) * 0.0625f; + currPix *= (current * g1 + (16.f - current) * g2) / 48.f; - // get rid of the overshooted pixels - float min_f = min(image[indx + 1 + u][1], min(image[indx + 1 - u][1], min(image[indx - 1 + u][1], min(image[indx - 1 - u][1], min(image[indx - 1][1], min(image[indx + 1][1], min(image[indx - u][1], image[indx + u][1]))))))); - float max_f = max(image[indx + 1 + u][1], max(image[indx + 1 - u][1], max(image[indx - 1 + u][1], max(image[indx - 1 - u][1], max(image[indx - 1][1], max(image[indx + 1][1], max(image[indx - u][1], image[indx + u][1]))))))); + // get rid of the overshot pixels + float minVal = min(image[indx - 1][1], min(image[indx + 1][1], min(image[indx - u][1], image[indx + u][1]))); + float maxVal = max(image[indx - 1][1], max(image[indx + 1][1], max(image[indx - u][1], image[indx + u][1]))); + + image[indx][1] = LIM(currPix, minVal, maxVal); - image[indx][1] = LIM(image[indx][1], min_f, max_f); } } -// missing colors are interpolated using high quality algorithm by Luis Sanz Rodriguez -void RawImageSource::dcb_color_full(float (*image)[4], int x0, int y0, float (*chroma)[2]) +// missing colours are interpolated using high quality algorithm by Luis Sanz Rodriguez +void RawImageSource::dcb_color_full(float (*image)[3], int x0, int y0, float (*chroma)[2]) { const int u = CACHESIZE, w = 3 * CACHESIZE; int rowMin, colMin, rowMax, colMax; @@ -3637,10 +3650,15 @@ void RawImageSource::dcb_color_full(float (*image)[4], int x0, int y0, float (*c f[1] = 1.f / (float)(1.f + fabs(chroma[indx - u + 1][c] - chroma[indx + u - 1][c]) + fabs(chroma[indx - u + 1][c] - chroma[indx - w + 3][c]) + fabs(chroma[indx + u - 1][c] - chroma[indx - w + 3][c])); f[2] = 1.f / (float)(1.f + fabs(chroma[indx + u - 1][c] - chroma[indx - u + 1][c]) + fabs(chroma[indx + u - 1][c] - chroma[indx + w + 3][c]) + fabs(chroma[indx - u + 1][c] - chroma[indx + w - 3][c])); f[3] = 1.f / (float)(1.f + fabs(chroma[indx + u + 1][c] - chroma[indx - u - 1][c]) + fabs(chroma[indx + u + 1][c] - chroma[indx + w - 3][c]) + fabs(chroma[indx - u - 1][c] - chroma[indx + w + 3][c])); - g[0] = 1.325f * chroma[indx - u - 1][c] - 0.175f * chroma[indx - w - 3][c] - 0.075f * chroma[indx - w - 1][c] - 0.075f * chroma[indx - u - 3][c]; - g[1] = 1.325f * chroma[indx - u + 1][c] - 0.175f * chroma[indx - w + 3][c] - 0.075f * chroma[indx - w + 1][c] - 0.075f * chroma[indx - u + 3][c]; - g[2] = 1.325f * chroma[indx + u - 1][c] - 0.175f * chroma[indx + w - 3][c] - 0.075f * chroma[indx + w - 1][c] - 0.075f * chroma[indx + u - 3][c]; - g[3] = 1.325f * chroma[indx + u + 1][c] - 0.175f * chroma[indx + w + 3][c] - 0.075f * chroma[indx + w + 1][c] - 0.075f * chroma[indx + u + 3][c]; + g[0] = 1.325f * chroma[indx - u - 1][c] - 0.175f * chroma[indx - w - 3][c] - 0.075f * (chroma[indx - w - 1][c] + chroma[indx - u - 3][c]); + g[1] = 1.325f * chroma[indx - u + 1][c] - 0.175f * chroma[indx - w + 3][c] - 0.075f * (chroma[indx - w + 1][c] + chroma[indx - u + 3][c]); + g[2] = 1.325f * chroma[indx + u - 1][c] - 0.175f * chroma[indx + w - 3][c] - 0.075f * (chroma[indx + w - 1][c] + chroma[indx + u - 3][c]); + g[3] = 1.325f * chroma[indx + u + 1][c] - 0.175f * chroma[indx + w + 3][c] - 0.075f * (chroma[indx + w + 1][c] + chroma[indx + u + 3][c]); + +// g[0] = 1.325f * chroma[indx - u - 1][c] - 0.175f * chroma[indx - w - 3][c] - 0.075f * chroma[indx - w - 1][c] - 0.075f * chroma[indx - u - 3][c]; +// g[1] = 1.325f * chroma[indx - u + 1][c] - 0.175f * chroma[indx - w + 3][c] - 0.075f * chroma[indx - w + 1][c] - 0.075f * chroma[indx - u + 3][c]; +// g[2] = 1.325f * chroma[indx + u - 1][c] - 0.175f * chroma[indx + w - 3][c] - 0.075f * chroma[indx + w - 1][c] - 0.075f * chroma[indx + u - 3][c]; +// g[3] = 1.325f * chroma[indx + u + 1][c] - 0.175f * chroma[indx + w + 3][c] - 0.075f * chroma[indx + w + 1][c] - 0.075f * chroma[indx + u + 3][c]; assert(indx >= 0 && indx < u * u && c >= 0 && c < 2); chroma[indx][c] = (f[0] * g[0] + f[1] * g[1] + f[2] * g[2] + f[3] * g[3]) / (f[0] + f[1] + f[2] + f[3]); @@ -3649,15 +3667,20 @@ void RawImageSource::dcb_color_full(float (*image)[4], int x0, int y0, float (*c for (int row = rowMin; row < rowMax; row++) for (int col = colMin + (FC(y0 - TILEBORDER + row, x0 - TILEBORDER + colMin + 1) & 1), indx = row * CACHESIZE + col, c = FC(y0 - TILEBORDER + row, x0 - TILEBORDER + col + 1) / 2; col < colMax; col += 2, indx += 2) for(int d = 0; d <= 1; c = 1 - c, d++) { - f[0] = 1.f / (float)(1.f + fabs(chroma[indx - u][c] - chroma[indx + u][c]) + fabs(chroma[indx - u][c] - chroma[indx - w][c]) + fabs(chroma[indx + u][c] - chroma[indx - w][c])); - f[1] = 1.f / (float)(1.f + fabs(chroma[indx + 1][c] - chroma[indx - 1][c]) + fabs(chroma[indx + 1][c] - chroma[indx + 3][c]) + fabs(chroma[indx - 1][c] - chroma[indx + 3][c])); - f[2] = 1.f / (float)(1.f + fabs(chroma[indx - 1][c] - chroma[indx + 1][c]) + fabs(chroma[indx - 1][c] - chroma[indx - 3][c]) + fabs(chroma[indx + 1][c] - chroma[indx - 3][c])); - f[3] = 1.f / (float)(1.f + fabs(chroma[indx + u][c] - chroma[indx - u][c]) + fabs(chroma[indx + u][c] - chroma[indx + w][c]) + fabs(chroma[indx - u][c] - chroma[indx + w][c])); + f[0] = 1.f / (1.f + fabs(chroma[indx - u][c] - chroma[indx + u][c]) + fabs(chroma[indx - u][c] - chroma[indx - w][c]) + fabs(chroma[indx + u][c] - chroma[indx - w][c])); + f[1] = 1.f / (1.f + fabs(chroma[indx + 1][c] - chroma[indx - 1][c]) + fabs(chroma[indx + 1][c] - chroma[indx + 3][c]) + fabs(chroma[indx - 1][c] - chroma[indx + 3][c])); + f[2] = 1.f / (1.f + fabs(chroma[indx - 1][c] - chroma[indx + 1][c]) + fabs(chroma[indx - 1][c] - chroma[indx - 3][c]) + fabs(chroma[indx + 1][c] - chroma[indx - 3][c])); + f[3] = 1.f / (1.f + fabs(chroma[indx + u][c] - chroma[indx - u][c]) + fabs(chroma[indx + u][c] - chroma[indx + w][c]) + fabs(chroma[indx - u][c] - chroma[indx + w][c])); - g[0] = 0.875f * chroma[indx - u][c] + 0.125f * chroma[indx - w][c]; - g[1] = 0.875f * chroma[indx + 1][c] + 0.125f * chroma[indx + 3][c]; - g[2] = 0.875f * chroma[indx - 1][c] + 0.125f * chroma[indx - 3][c]; - g[3] = 0.875f * chroma[indx + u][c] + 0.125f * chroma[indx + w][c]; + g[0] = intp(0.875f, chroma[indx - u][c], chroma[indx - w][c]); + g[1] = intp(0.875f, chroma[indx + 1][c], chroma[indx + 3][c]); + g[2] = intp(0.875f, chroma[indx - 1][c], chroma[indx - 3][c]); + g[3] = intp(0.875f, chroma[indx + u][c], chroma[indx + w][c]); + +// g[0] = 0.875f * chroma[indx - u][c] + 0.125f * chroma[indx - w][c]; +// g[1] = 0.875f * chroma[indx + 1][c] + 0.125f * chroma[indx + 3][c]; +// g[2] = 0.875f * chroma[indx - 1][c] + 0.125f * chroma[indx - 3][c]; +// g[3] = 0.875f * chroma[indx + u][c] + 0.125f * chroma[indx + w][c]; assert(indx >= 0 && indx < u * u && c >= 0 && c < 2); chroma[indx][c] = (f[0] * g[0] + f[1] * g[1] + f[2] * g[2] + f[3] * g[3]) / (f[0] + f[1] + f[2] + f[3]); @@ -3672,9 +3695,10 @@ void RawImageSource::dcb_color_full(float (*image)[4], int x0, int y0, float (*c } } -// DCB demosaicing main routine (sharp version) +// DCB demosaicing main routine void RawImageSource::dcb_demosaic(int iterations, bool dcb_enhance) { +BENCHFUN double currentProgress = 0.0; if(plistener) { @@ -3686,29 +3710,24 @@ void RawImageSource::dcb_demosaic(int iterations, bool dcb_enhance) int hTiles = H / TILESIZE + (H % TILESIZE ? 1 : 0); int numTiles = wTiles * hTiles; int tilesDone = 0; + constexpr int cldf = 2; // factor to multiply cache line distance. 1 = 64 bytes, 2 = 128 bytes ... + #ifdef _OPENMP - int nthreads = omp_get_max_threads(); - float (**image)[4] = (float(**)[4]) calloc( nthreads, sizeof( void*) ); - float (**image2)[3] = (float(**)[3]) calloc( nthreads, sizeof( void*) ); - float (**image3)[3] = (float(**)[3]) calloc( nthreads, sizeof( void*) ); - float (**chroma)[2] = (float (**)[2]) calloc( nthreads, sizeof( void*) ); - - for(int i = 0; i < nthreads; i++) { - image[i] = (float(*)[4]) calloc( CACHESIZE * CACHESIZE, sizeof **image); - image2[i] = (float(*)[3]) calloc( CACHESIZE * CACHESIZE, sizeof **image2); - image3[i] = (float(*)[3]) calloc( CACHESIZE * CACHESIZE, sizeof **image3); - chroma[i] = (float (*)[2]) calloc( CACHESIZE * CACHESIZE, sizeof **chroma); - } - -#else - float (*image)[4] = (float(*)[4]) calloc( CACHESIZE * CACHESIZE, sizeof * image); - float (*image2)[3] = (float(*)[3]) calloc( CACHESIZE * CACHESIZE, sizeof * image2); - float (*image3)[3] = (float(*)[3]) calloc( CACHESIZE * CACHESIZE, sizeof * image3); - float (*chroma)[2] = (float (*)[2]) calloc( CACHESIZE * CACHESIZE, sizeof * chroma); + #pragma omp parallel #endif +{ + // assign working space + char *buffer0 = (char *) malloc(5 * sizeof(float) * CACHESIZE * CACHESIZE + sizeof(uint8_t) * CACHESIZE * CACHESIZE + 3 * cldf * 64 + 63); + // aligned to 64 byte boundary + char *data = (char*)( ( uintptr_t(buffer0) + uintptr_t(63)) / 64 * 64); + + float (*tile)[3] = (float(*)[3]) data; + float (*buffer)[2] = (float(*)[2]) ((char*)tile + sizeof(float) * CACHESIZE * CACHESIZE * 3 + cldf * 64); + float (*chrm)[2] = (float(*)[2]) (buffer); // No overlap in usage of buffer and chrm means we can reuse buffer + uint8_t *map = (uint8_t*) ((char*)buffer + sizeof(float) * CACHESIZE * CACHESIZE * 2 + cldf * 64); #ifdef _OPENMP - #pragma omp parallel for + #pragma omp for schedule(dynamic) nowait #endif for( int iTile = 0; iTile < numTiles; iTile++) { @@ -3717,19 +3736,8 @@ void RawImageSource::dcb_demosaic(int iterations, bool dcb_enhance) int x0 = xTile * TILESIZE; int y0 = yTile * TILESIZE; -#ifdef _OPENMP - int tid = omp_get_thread_num(); - assert(tid < nthreads); - float (*tile)[4] = image[tid]; - float (*buffer)[3] = image2[tid]; - float (*buffer2)[3] = image3[tid]; - float (*chrm)[2] = chroma[tid]; -#else - float (*tile)[4] = image; - float (*buffer)[3] = image2; - float (*buffer2)[3] = image3; - float (*chrm)[2] = chroma; -#endif + memset(tile, 0, CACHESIZE * CACHESIZE * sizeof * tile); + memset(map, 0, CACHESIZE * CACHESIZE * sizeof * map); fill_raw( tile, x0, y0, rawData ); @@ -3737,7 +3745,44 @@ void RawImageSource::dcb_demosaic(int iterations, bool dcb_enhance) fill_border(tile, 6, x0, y0); } + copy_to_buffer(buffer, tile); + dcb_hid(tile, x0, y0); + + for (int i = iterations; i > 0; i--) { + dcb_hid2(tile, x0, y0); + dcb_hid2(tile, x0, y0); + dcb_hid2(tile, x0, y0); + dcb_map(tile, map, x0, y0); + dcb_correction(tile, map, x0, y0); + } + + dcb_color(tile, x0, y0); + dcb_pp(tile, x0, y0); + dcb_map(tile, map, x0, y0); + dcb_correction2(tile, map, x0, y0); + dcb_map(tile, map, x0, y0); + dcb_correction(tile, map, x0, y0); + dcb_color(tile, x0, y0); + dcb_map(tile, map, x0, y0); + dcb_correction(tile, map, x0, y0); + dcb_map(tile, map, x0, y0); + dcb_correction(tile, map, x0, y0); + dcb_map(tile, map, x0, y0); + restore_from_buffer(tile, buffer); + + if (!dcb_enhance) + dcb_color(tile, x0, y0); + else + { + memset(chrm, 0, CACHESIZE * CACHESIZE * sizeof * chrm); + dcb_refinement(tile, map, x0, y0); + dcb_color_full(tile, x0, y0, chrm); + } + + /* dcb_hid(tile, buffer, buffer2, x0, y0); + dcb_color(tile, x0, y0); + copy_to_buffer(buffer, tile); for (int i = iterations; i > 0; i--) { @@ -3761,13 +3806,13 @@ void RawImageSource::dcb_demosaic(int iterations, bool dcb_enhance) dcb_correction(tile, x0, y0); dcb_map(tile, x0, y0); restore_from_buffer(tile, buffer); - dcb_color(tile, x0, y0); + dcb_color_full(tile, x0, y0, chrm); if (dcb_enhance) { dcb_refinement(tile, x0, y0); dcb_color_full(tile, x0, y0, chrm); - } - + } +*/ for(int y = 0; y < TILESIZE && y0 + y < H; y++) { for (int j = 0; j < TILESIZE && x0 + j < W; j++) { red[y0 + y][x0 + j] = tile[(y + TILEBORDER) * CACHESIZE + TILEBORDER + j][0]; @@ -3792,21 +3837,8 @@ void RawImageSource::dcb_demosaic(int iterations, bool dcb_enhance) #endif tilesDone++; } - -#ifdef _OPENMP - - for(int i = 0; i < nthreads; i++) { - free(image[i]); - free(image2[i]); - free(image3[i]); - free(chroma[i]); - } - -#endif - free(image); - free(image2); - free(image3); - free(chroma); + free(buffer0); +} if(plistener) { plistener->setProgress (1.0); @@ -3902,7 +3934,7 @@ void RawImageSource::xtransborder_interpolate (int border) { const int height = H, width = W; - char xtrans[6][6]; + int xtrans[6][6]; ri->getXtransMatrix(xtrans); for (int row = 0; row < height; row++) @@ -3966,7 +3998,7 @@ void RawImageSource::xtrans_interpolate (const int passes, const bool useCieLab) plistener->setProgress (progress); } - char xtrans[6][6]; + int xtrans[6][6]; ri->getXtransMatrix(xtrans); constexpr short orth[12] = { 1, 0, 0, 1, -1, 0, 0, -1, 1, 0, 0, 1 }, @@ -3977,7 +4009,7 @@ void RawImageSource::xtrans_interpolate (const int passes, const bool useCieLab) // sgrow/sgcol is the offset in the sensor matrix of the solitary // green pixels - ushort sgrow, sgcol; + ushort sgrow = 0, sgcol = 0; const int height = H, width = W; @@ -4686,17 +4718,16 @@ void RawImageSource::xtrans_interpolate (const int passes, const bool useCieLab) /* Average the most homogeneous pixels for the final result: */ - uint8_t hm[8]; + uint8_t hm[8] = {}; for (int row = MIN(top, 8); row < mrow - 8; row++) for (int col = MIN(left, 8); col < mcol - 8; col++) { - int d = 0; - for (; d < 4; d++) { + for (int d = 0; d < 4; d++) { hm[d] = homosum[d][row][col]; } - for (; d < ndir; d++) { + for (int d = 4; d < ndir; d++) { hm[d] = homosum[d][row][col]; if (hm[d - 4] < hm[d]) { @@ -4710,7 +4741,7 @@ void RawImageSource::xtrans_interpolate (const int passes, const bool useCieLab) uint8_t maxval = homosummax[row][col]; - for (d = 0; d < ndir; d++) + for (int d = 0; d < ndir; d++) if (hm[d] >= maxval) { FORC3 avg[c] += rgb[d][row][col][c]; avg[3]++; @@ -4757,7 +4788,7 @@ void RawImageSource::fast_xtrans_interpolate () const int height = H, width = W; xtransborder_interpolate (1); - char xtrans[6][6]; + int xtrans[6][6]; ri->getXtransMatrix(xtrans); #pragma omp parallel for diff --git a/rtengine/dfmanager.cc b/rtengine/dfmanager.cc index 728d40d53..bc35b3c71 100644 --- a/rtengine/dfmanager.cc +++ b/rtengine/dfmanager.cc @@ -144,7 +144,7 @@ void dfInfo::updateRawImage() } else { int H = ri->get_height(); int W = ri->get_width(); - ri->compress_image(); + ri->compress_image(0); int rSize = W * ((ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) ? 1 : 3); acc_t **acc = new acc_t*[H]; @@ -164,7 +164,7 @@ void dfInfo::updateRawImage() RawImage* temp = new RawImage(*iName); if( !temp->loadRaw(true)) { - temp->compress_image(); //\ TODO would be better working on original, because is temporary + temp->compress_image(0); //\ TODO would be better working on original, because is temporary nFiles++; if( ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS ) { @@ -204,16 +204,19 @@ void dfInfo::updateRawImage() delete ri; ri = nullptr; } else { - ri->compress_image(); + ri->compress_image(0); } } } void dfInfo::updateBadPixelList( RawImage *df ) { + if(!df) { + return; + } const float threshold = 10.f / 8.f; - if( ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS ) { + if( df->getSensorType() == ST_BAYER || df->getSensorType() == ST_FUJI_XTRANS ) { std::vector badPixelsTemp; #pragma omp parallel diff --git a/rtengine/diagonalcurves.cc b/rtengine/diagonalcurves.cc index 2178e3dac..3f885782c 100644 --- a/rtengine/diagonalcurves.cc +++ b/rtengine/diagonalcurves.cc @@ -33,7 +33,6 @@ DiagonalCurve::DiagonalCurve (const std::vector& p, int poly_pn) { ppn = poly_pn > 65500 ? 65500 : poly_pn; - bool identity = true; if (ppn < 500) { hashSize = 100; // Arbitrary cut-off value, but mutliple of 10 @@ -46,6 +45,7 @@ DiagonalCurve::DiagonalCurve (const std::vector& p, int poly_pn) if (p.size() < 3) { kind = DCT_Empty; } else { + bool identity = true; kind = (DiagonalCurveType)p[0]; if (kind == DCT_Linear || kind == DCT_Spline || kind == DCT_NURBS) { @@ -58,7 +58,9 @@ DiagonalCurve::DiagonalCurve (const std::vector& p, int poly_pn) x[i] = p[ix++]; y[i] = p[ix++]; - if (x[i] != y[i]) { + if (std::fabs(x[i] - y[i]) >= 0.000009) { + // the smallest possible difference between x and y curve point values is ~ 0.00001 + // checking against >= 0.000009 is a bit saver than checking against >= 0.00001 identity = false; } } @@ -241,8 +243,8 @@ void DiagonalCurve::NURBS_set () nbr_points = (int)(((double)(ppn + N - 2) * sc_length[i / 3] ) / total_length); if (nbr_points < 0) { - for(size_t it = 0; it < sc_x.size(); it += 3) { - printf("sc_length[%zu/3]=%f \n", it, sc_length[it / 3]); + for(unsigned int it = 0; it < sc_x.size(); it += 3) { // used unsigned int instead of size_t to avoid %zu in printf + printf("sc_length[%u/3]=%f \n", it, sc_length[it / 3]); } printf("NURBS diagonal curve: error detected!\n i=%u nbr_points=%d ppn=%d N=%d sc_length[i/3]=%f total_length=%f", i, nbr_points, ppn, N, sc_length[i / 3], total_length); @@ -364,7 +366,6 @@ double DiagonalCurve::getVal (double t) const } return poly_y[k_lo] + (t - poly_x[k_lo]) * dyByDx[k_lo]; - break; } case DCT_Empty : diff --git a/rtengine/dirpyr_equalizer.cc b/rtengine/dirpyr_equalizer.cc index a3a6d81b0..8f3ebae9f 100644 --- a/rtengine/dirpyr_equalizer.cc +++ b/rtengine/dirpyr_equalizer.cc @@ -149,7 +149,7 @@ SSEFUNCTION void ImProcFunctions :: dirpyr_equalizer(float ** src, float ** dst, level ++; } - float **tmpHue, **tmpChr; + float **tmpHue = nullptr, **tmpChr = nullptr; if(skinprot != 0.f) { // precalculate hue and chroma, use SSE, if available @@ -368,9 +368,6 @@ void ImProcFunctions :: dirpyr_equalizercam (CieImage *ncie, float ** src, float idirpyr_eq_channelcam(dirpyrlo[level], dirpyrlo[level - 1], buffer, srcwidth, srcheight, level, multi, dirpyrThreshold , h_p, C_p, skinprot, b_l, t_l, t_r); } - - scale = scales[0]; - idirpyr_eq_channelcam(dirpyrlo[0], dst, buffer, srcwidth, srcheight, 0, multi, dirpyrThreshold, h_p, C_p, skinprot, b_l, t_l, t_r); @@ -625,7 +622,7 @@ SSEFUNCTION void ImProcFunctions::dirpyr_channel(float ** data_fine, float ** da //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -void ImProcFunctions::idirpyr_eq_channel(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[5], const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r , int choice) +void ImProcFunctions::idirpyr_eq_channel(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[6], const double dirpyrThreshold, float ** hue, float ** chrom, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r , int choice) { const float skinprotneg = -skinprot; const float factorHard = (1.f - skinprotneg / 100.f); @@ -717,7 +714,7 @@ void ImProcFunctions::idirpyr_eq_channel(float ** data_coarse, float ** data_fin } -void ImProcFunctions::idirpyr_eq_channelcam(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[5], const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, float b_l, float t_l, float t_r) +void ImProcFunctions::idirpyr_eq_channelcam(float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float mult[6], const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, float b_l, float t_l, float t_r) { const float skinprotneg = -skinprot; diff --git a/rtengine/dynamicprofile.cc b/rtengine/dynamicprofile.cc new file mode 100644 index 000000000..5ac408da5 --- /dev/null +++ b/rtengine/dynamicprofile.cc @@ -0,0 +1,261 @@ +/* -*- C++ -*- + * This file is part of RawTherapee. + * + * Copyright (c) 2017 Alberto Griggio + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#include "../rtengine/dynamicprofile.h" + +#include +#include + +using namespace rtengine; +using namespace rtengine::procparams; + +namespace +{ + +const int ISO_MAX = 512000; +const double FNUMBER_MAX = 100.0; +const double FOCALLEN_MAX = 10000.0; +const double SHUTTERSPEED_MAX = 1000.0; +const double EXPCOMP_MIN = -20.0; +const double EXPCOMP_MAX = 20.0; + +} // namespace + +DynamicProfileRules dynamicProfileRules; + +bool DynamicProfileRule::Optional::operator() (const Glib::ustring &val) const +{ + if (!enabled) { + return true; + } + + if (value.find ("re:") == 0) { + // this is a regexp + return Glib::Regex::match_simple (value.substr (3), val, Glib::REGEX_CASELESS); + } else { + // normal string comparison + return value.casefold() == val.casefold(); + } +} + + +DynamicProfileRule::DynamicProfileRule(): + serial_number (0), + iso (0, ISO_MAX), + fnumber (0, FNUMBER_MAX), + focallen (0, FOCALLEN_MAX), + shutterspeed (0, SHUTTERSPEED_MAX), + expcomp (EXPCOMP_MIN, EXPCOMP_MAX) +{ +} + + +bool DynamicProfileRule::operator< (const DynamicProfileRule &other) const +{ + return serial_number < other.serial_number; +} + + +bool DynamicProfileRule::matches (const rtengine::ImageMetaData *im) const +{ + return (iso (im->getISOSpeed()) + && fnumber (im->getFNumber()) + && focallen (im->getFocalLen()) + && shutterspeed (im->getShutterSpeed()) + && expcomp (im->getExpComp()) + && camera (im->getCamera()) + && lens (im->getLens())); +} + +namespace +{ + +void get_int_range (DynamicProfileRule::Range &dest, + const Glib::KeyFile &kf, const Glib::ustring &group, + const Glib::ustring &key) +{ + try { + int min = kf.get_integer (group, key + "_min"); + int max = kf.get_integer (group, key + "_max"); + + if (min <= max) { + dest.min = min; + dest.max = max; + } + } catch (Glib::KeyFileError &e) { + } +} + + +void get_double_range (DynamicProfileRule::Range &dest, + const Glib::KeyFile &kf, const Glib::ustring &group, + const Glib::ustring &key) +{ + try { + double min = kf.get_double (group, key + "_min"); + double max = kf.get_double (group, key + "_max"); + + if (min <= max) { + dest.min = min; + dest.max = max; + } + } catch (Glib::KeyFileError &e) { + } +} + + +void get_optional (DynamicProfileRule::Optional &dest, + const Glib::KeyFile &kf, const Glib::ustring &group, + const Glib::ustring &key) +{ + try { + bool e = kf.get_boolean (group, key + "_enabled"); + + if (e) { + Glib::ustring s = kf.get_string (group, key + "_value"); + dest.enabled = e; + dest.value = s; + } + } catch (Glib::KeyFileError &) { + } +} + +void set_int_range (Glib::KeyFile &kf, const Glib::ustring &group, + const Glib::ustring &key, + const DynamicProfileRule::Range &val) +{ + kf.set_integer (group, key + "_min", val.min); + kf.set_integer (group, key + "_max", val.max); +} + +void set_double_range (Glib::KeyFile &kf, const Glib::ustring &group, + const Glib::ustring &key, + const DynamicProfileRule::Range &val) +{ + kf.set_double (group, key + "_min", val.min); + kf.set_double (group, key + "_max", val.max); +} + +void set_optional (Glib::KeyFile &kf, const Glib::ustring &group, + const Glib::ustring &key, + const DynamicProfileRule::Optional &val) +{ + kf.set_boolean (group, key + "_enabled", val.enabled); + kf.set_string (group, key + "_value", val.value); +} + +} // namespace + +bool DynamicProfileRules::loadRules() +{ + dynamicRules.clear(); + Glib::KeyFile kf; + + try { + if (!kf.load_from_file (Glib::build_filename (Options::rtdir, "dynamicprofile.cfg"))) { + return false; + } + } catch (Glib::Error &e) { + return false; + } + + if (options.rtSettings.verbose) { + printf ("loading dynamic profiles...\n"); + } + + auto groups = kf.get_groups(); + + for (auto group : groups) { + // groups are of the form "rule N", where N is a positive integer + if (group.find ("rule ") != 0) { + return false; + } + + std::istringstream buf (group.c_str() + 5); + int serial = 0; + + if (! (buf >> serial) || !buf.eof()) { + return false; + } + + if (options.rtSettings.verbose) { + printf (" loading rule %d\n", serial); + } + + dynamicRules.emplace_back (DynamicProfileRule()); + DynamicProfileRule &rule = dynamicRules.back(); + rule.serial_number = serial; + get_int_range (rule.iso, kf, group, "iso"); + get_double_range (rule.fnumber, kf, group, "fnumber"); + get_double_range (rule.focallen, kf, group, "focallen"); + get_double_range (rule.shutterspeed, kf, group, "shutterspeed"); + get_double_range (rule.expcomp, kf, group, "expcomp"); + get_optional (rule.camera, kf, group, "camera"); + get_optional (rule.lens, kf, group, "lens"); + + try { + rule.profilepath = kf.get_string (group, "profilepath"); + } catch (Glib::KeyFileError &) { + dynamicRules.pop_back(); + } + } + + std::sort (dynamicRules.begin(), dynamicRules.end()); + rulesLoaded = true; + return true; +} + +bool DynamicProfileRules::storeRules() +{ + if (options.rtSettings.verbose) { + printf ("saving dynamic profiles...\n"); + } + + Glib::KeyFile kf; + + for (auto &rule : dynamicRules) { + std::ostringstream buf; + buf << "rule " << rule.serial_number; + Glib::ustring group = buf.str(); + set_int_range (kf, group, "iso", rule.iso); + set_double_range (kf, group, "fnumber", rule.fnumber); + set_double_range (kf, group, "focallen", rule.focallen); + set_double_range (kf, group, "shutterspeed", rule.shutterspeed); + set_double_range (kf, group, "expcomp", rule.expcomp); + set_optional (kf, group, "camera", rule.camera); + set_optional (kf, group, "lens", rule.lens); + kf.set_string (group, "profilepath", rule.profilepath); + } + + return kf.save_to_file (Glib::build_filename (Options::rtdir, "dynamicprofile.cfg")); +} + +const std::vector &DynamicProfileRules::getRules() +{ + if (!rulesLoaded) { + loadRules(); + } + + return dynamicRules; +} + +void DynamicProfileRules::setRules (const std::vector &r) +{ + dynamicRules = r; +} diff --git a/rtengine/dynamicprofile.h b/rtengine/dynamicprofile.h new file mode 100644 index 000000000..cfe46d9ba --- /dev/null +++ b/rtengine/dynamicprofile.h @@ -0,0 +1,79 @@ +/* -*- C++ -*- + * This file is part of RawTherapee. + * + * Copyright (c) 2017 Alberto Griggio + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ +#ifndef _DYNAMICPROFILE_H_ +#define _DYNAMICPROFILE_H_ + +#include +#include +#include "../rtgui/options.h" + +class DynamicProfileRule +{ +public: + template + struct Range { + T min; + T max; + explicit Range (T l = T(), T u = T()): min (l), max (u) {} + + bool operator() (T val) const + { + return val >= min && val <= max; + } + }; + + struct Optional { + Glib::ustring value; + bool enabled; + explicit Optional (const Glib::ustring v = "", bool e = false): + value (v), enabled (e) {} + + bool operator() (const Glib::ustring &val) const; + }; + + DynamicProfileRule(); + bool matches (const rtengine::ImageMetaData *im) const; + bool operator< (const DynamicProfileRule &other) const; + + int serial_number; + Range iso; + Range fnumber; + Range focallen; + Range shutterspeed; + Range expcomp; + Optional camera; + Optional lens; + Glib::ustring profilepath; +}; + +class DynamicProfileRules +{ +protected: + /** cache for dynamic profile rules */ + std::vector dynamicRules; + bool rulesLoaded; + +public: + bool loadRules(); + bool storeRules(); + const std::vector &getRules(); + void setRules (const std::vector &r); +}; + +#endif // _DYNAMICPROFILE_H_ diff --git a/rtengine/expo_before_b.cc b/rtengine/expo_before_b.cc index 0854647c5..98fed04f7 100644 --- a/rtengine/expo_before_b.cc +++ b/rtengine/expo_before_b.cc @@ -44,7 +44,7 @@ namespace rtengine extern const Settings* settings; -void RawImageSource::processRawWhitepoint(float expos, float preser) +void RawImageSource::processRawWhitepoint(float expos, float preser, array2D &rawData) { MyTime t1e, t2e; diff --git a/rtengine/fast_demo.cc b/rtengine/fast_demo.cc index d5bca20b9..12286d9f1 100644 --- a/rtengine/fast_demo.cc +++ b/rtengine/fast_demo.cc @@ -277,7 +277,6 @@ SSEFUNCTION void RawImageSource::fast_demosaic(int winx, int winy, int winw, int int j, cc; __m128 wtuv, wtdv, wtlv, wtrv; __m128 greenv, tempv, absv, abs2v; - __m128 onev = _mm_set1_ps( 1.0f ); __m128 c16v = _mm_set1_ps( 16.0f ); __m128 fourv = _mm_set1_ps( 4.0f ); vmask selmask; diff --git a/rtengine/ffmanager.cc b/rtengine/ffmanager.cc index 069bbf563..87ae98905 100644 --- a/rtengine/ffmanager.cc +++ b/rtengine/ffmanager.cc @@ -130,14 +130,13 @@ void ffInfo::updateRawImage() if( !pathNames.empty() ) { std::list::iterator iName = pathNames.begin(); ri = new RawImage(*iName); // First file used also for extra pixels informations (width,height, shutter, filters etc.. ) - if( ri->loadRaw(true)) { delete ri; ri = nullptr; } else { int H = ri->get_height(); int W = ri->get_width(); - ri->compress_image(); + ri->compress_image(0); int rSize = W * ((ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS) ? 1 : 3); acc_t **acc = new acc_t*[H]; @@ -157,7 +156,7 @@ void ffInfo::updateRawImage() RawImage* temp = new RawImage(*iName); if( !temp->loadRaw(true)) { - temp->compress_image(); //\ TODO would be better working on original, because is temporary + temp->compress_image(0); //\ TODO would be better working on original, because is temporary nFiles++; if( ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS ) { @@ -192,12 +191,11 @@ void ffInfo::updateRawImage() } } else { ri = new RawImage(pathname); - if( ri->loadRaw(true)) { delete ri; ri = nullptr; } else { - ri->compress_image(); + ri->compress_image(0); } } diff --git a/rtengine/flatcurves.cc b/rtengine/flatcurves.cc index ae1a895ff..fe5ecc5e1 100644 --- a/rtengine/flatcurves.cc +++ b/rtengine/flatcurves.cc @@ -30,9 +30,8 @@ FlatCurve::FlatCurve (const std::vector& p, bool isPeriodic, int poly_pn poly_x.clear(); poly_y.clear(); - bool identity = true; - if (p.size() > 4) { + bool identity = true; kind = (FlatCurveType)p[0]; if (kind == FCT_MinMaxCPoints) { @@ -146,7 +145,6 @@ void FlatCurve::CtrlPoints_set () double length; double dx; double dy; - double xp1, xp2, yp2, xp3; bool startLinear, endLinear; startLinear = (rightTangent[i] == 0.) || (y[i] == y[i + 1]); @@ -171,6 +169,7 @@ void FlatCurve::CtrlPoints_set () sc_length[k++] = length; total_length += length; } else { + double xp1, xp2, yp2, xp3; if (startLinear) { xp1 = x[i]; } else { @@ -363,7 +362,6 @@ double FlatCurve::getVal (double t) const } return poly_y[k_lo] + (t - poly_x[k_lo]) * dyByDx[k_lo]; - break; } /*case Parametric : { diff --git a/rtengine/fujicompressed.cc b/rtengine/fujicompressed.cc new file mode 100644 index 000000000..156c338d5 --- /dev/null +++ b/rtengine/fujicompressed.cc @@ -0,0 +1,1037 @@ +/* -*- C++ -*- + * File: fujicompressed.cpp + * Copyright (C) 2016 Alexey Danilchenko + * + * Adopted to LibRaw by Alex Tutubalin, lexa@lexa.ru + * LibRaw Fujifilm/compressed decoder + +LibRaw is free software; you can redistribute it and/or modify +it under the terms of the one of three licenses as you choose: + +1. GNU LESSER GENERAL PUBLIC LICENSE version 2.1 + (See file LICENSE.LGPL provided in LibRaw distribution archive for details). + +2. COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 + (See file LICENSE.CDDL provided in LibRaw distribution archive for details). + + * Adopted to RawTherapee by Ingo Weyrich + + */ + +namespace { + +int bitDiff (int value1, int value2) +{ + int decBits = 0; + + if ( value2 < value1 ) + while (decBits <= 12 && (value2 << ++decBits) < value1) + ; + + return decBits; +} + +} + +void CLASS init_fuji_compr (struct fuji_compressed_params* info) +{ + int cur_val; + char *qt; + + if ((fuji_block_width % 3 && fuji_raw_type == 16) || (fuji_block_width & 1 && fuji_raw_type == 0)) { + derror(); + } + + info->q_table = (char *) malloc (32768); + merror (info->q_table, "init_fuji_compr()"); + + if (fuji_raw_type == 16) { + info->line_width = (fuji_block_width * 2) / 3; + } else { + info->line_width = fuji_block_width >> 1; + } + + info->q_point[0] = 0; + info->q_point[1] = 0x12; + info->q_point[2] = 0x43; + info->q_point[3] = 0x114; + info->q_point[4] = (1 << fuji_bits) - 1; + info->min_value = 0x40; + + cur_val = -info->q_point[4]; + + for (qt = info->q_table; cur_val <= info->q_point[4]; ++qt, ++cur_val) { + if (cur_val <= -info->q_point[3]) { + *qt = -4; + } else if (cur_val <= -info->q_point[2]) { + *qt = -3; + } else if (cur_val <= -info->q_point[1]) { + *qt = -2; + } else if (cur_val < 0) { + *qt = -1; + } else if (cur_val == 0) { + *qt = 0; + } else if (cur_val < info->q_point[1]) { + *qt = 1; + } else if (cur_val < info->q_point[2]) { + *qt = 2; + } else if (cur_val < info->q_point[3]) { + *qt = 3; + } else { + *qt = 4; + } + } + + // populting gradients + if (info->q_point[4] == 0x3FFF) { + info->total_values = 0x4000; + info->raw_bits = 14; + info->max_bits = 56; + info->maxDiff = 256; + } else if (info->q_point[4] == 0xFFF) { + info->total_values = 4096; + info->raw_bits = 12; + info->max_bits = 48; + info->maxDiff = 64; + } else { + derror(); + } +} + +#define FUJI_BUF_SIZE 0x10000u + +void CLASS fuji_fill_buffer (struct fuji_compressed_block *info) +{ + if (info->cur_pos >= info->cur_buf_size) { + info->cur_pos = 0; + info->cur_buf_offset += info->cur_buf_size; +#ifdef MYFILE_MMAP + info->cur_buf_size = info->max_read_size; + info->cur_buf = fdata(info->cur_buf_offset, info->input); +#else +#ifdef _OPENMP + #pragma omp critical +#endif + { + fseek (info->input, info->cur_buf_offset, SEEK_SET); + info->cur_buf_size = fread (info->cur_buf, 1, std::min (info->max_read_size, FUJI_BUF_SIZE), info->input); + } +#endif + if (info->cur_buf_size < 1) { // nothing read + if (info->fillbytes > 0) { + int ls = std::max (1, std::min (info->fillbytes, (int)FUJI_BUF_SIZE)); + memset (info->cur_buf, 0, ls); + info->fillbytes -= ls; + } + } + + info->max_read_size -= info->cur_buf_size; + } +} + +void CLASS init_fuji_block (struct fuji_compressed_block* info, const struct fuji_compressed_params *params, INT64 raw_offset, unsigned dsize) +{ + info->linealloc = (ushort*)calloc (sizeof (ushort), _ltotal * (params->line_width + 2)); + merror (info->linealloc, "init_fuji_block()"); + + info->input = ifp; + INT64 fsize = info->input->size; + info->max_read_size = std::min (unsigned (fsize - raw_offset), dsize + 16); // Data size may be incorrect? + info->fillbytes = 1; + + info->linebuf[_R0] = info->linealloc; + + for (int i = _R1; i <= _B4; i++) { + info->linebuf[i] = info->linebuf[i - 1] + params->line_width + 2; + } + + // init buffer +#ifndef MYFILE_MMAP + info->cur_buf = (uchar*)malloc (FUJI_BUF_SIZE); + merror (info->cur_buf, "init_fuji_block()"); +#endif + info->cur_bit = 0; + info->cur_pos = 0; + info->cur_buf_offset = raw_offset; + + for (int j = 0; j < 3; j++) + for (int i = 0; i < 41; i++) { + info->grad_even[j][i].value1 = params->maxDiff; + info->grad_even[j][i].value2 = 1; + info->grad_odd[j][i].value1 = params->maxDiff; + info->grad_odd[j][i].value2 = 1; + } + + info->cur_buf_size = 0; + fuji_fill_buffer (info); +} + +void CLASS copy_line_to_xtrans (struct fuji_compressed_block* info, int cur_line, int cur_block, int cur_block_width) +{ + ushort *lineBufB[3]; + ushort *lineBufG[6]; + ushort *lineBufR[3]; + ushort* line_buf; + int index; + + int offset = fuji_block_width * cur_block + 6 * raw_width * cur_line; + ushort* raw_block_data = raw_image + offset; + int row_count = 0; + + for (int i = 0; i < 3; i++) { + lineBufR[i] = info->linebuf[_R2 + i] + 1; + lineBufB[i] = info->linebuf[_B2 + i] + 1; + } + + for (int i = 0; i < 6; i++) { + lineBufG[i] = info->linebuf[_G2 + i] + 1; + } + + while (row_count < 6) { + unsigned pixel_count = 0; + + while (static_cast(pixel_count) < cur_block_width) { + switch (xtrans_abs[row_count][ (pixel_count % 6)]) { + case 1: // green + line_buf = lineBufG[row_count]; + break; + + case 0: // red + line_buf = lineBufR[row_count >> 1]; + break; + + case 2: // blue + default: + line_buf = lineBufB[row_count >> 1]; + break; + } + + index = (((pixel_count * 2 / 3) & 0x7FFFFFFE) | ((pixel_count % 3) & 1)) + ((pixel_count % 3) >> 1); + raw_block_data[pixel_count] = line_buf[index]; + + ++pixel_count; + } + + ++row_count; + raw_block_data += raw_width; + } +} + +void CLASS copy_line_to_bayer (struct fuji_compressed_block *info, int cur_line, int cur_block, int cur_block_width) +{ + ushort *lineBufB[3]; + ushort *lineBufG[6]; + ushort *lineBufR[3]; + ushort *line_buf; + + int fuji_bayer[2][2]; + + for (int r = 0; r < 2; r++) + for (int c = 0; c < 2; c++) { + fuji_bayer[r][c] = FC (r, c); // We'll downgrade G2 to G below + } + + int offset = fuji_block_width * cur_block + 6 * raw_width * cur_line; + ushort *raw_block_data = raw_image + offset; + int row_count = 0; + + for (int i = 0; i < 3; i++) { + lineBufR[i] = info->linebuf[_R2 + i] + 1; + lineBufB[i] = info->linebuf[_B2 + i] + 1; + } + + for (int i = 0; i < 6; i++) { + lineBufG[i] = info->linebuf[_G2 + i] + 1; + } + + while (row_count < 6) { + unsigned pixel_count = 0; + + while (static_cast(pixel_count) < cur_block_width) { + switch (fuji_bayer[row_count & 1][pixel_count & 1]) { + case 0: // red + line_buf = lineBufR[row_count >> 1]; + break; + + case 1: // green + case 3: // second green + default: // to make static analyzer happy + line_buf = lineBufG[row_count]; + break; + + case 2: // blue + line_buf = lineBufB[row_count >> 1]; + break; + } + + raw_block_data[pixel_count] = line_buf[pixel_count >> 1]; + ++pixel_count; + } + + ++row_count; + raw_block_data += raw_width; + } +} + + +#define fuji_quant_gradient(i,v1,v2) (9*i->q_table[i->q_point[4]+(v1)] + i->q_table[i->q_point[4]+(v2)]) + +inline void CLASS fuji_zerobits (struct fuji_compressed_block* info, int *count) +{ + uchar zero = 0; + *count = 0; + + while (zero == 0) { + zero = (info->cur_buf[info->cur_pos] >> (7 - info->cur_bit)) & 1; + info->cur_bit++; + info->cur_bit &= 7; + + if (!info->cur_bit) { + ++info->cur_pos; +#ifndef MYFILE_MMAP + fuji_fill_buffer (info); +#endif + } + + if (zero) { + break; + } + + ++*count; + } +} + +inline void CLASS fuji_read_code (struct fuji_compressed_block* info, int *data, int bits_to_read) +{ + *data = 0; + + if (!bits_to_read) { + return; + } + + uchar bits_left = bits_to_read; + uchar bits_left_in_byte = 8 - (info->cur_bit & 7); + + if (bits_to_read >= bits_left_in_byte) { + do { + *data <<= bits_left_in_byte; + bits_left -= bits_left_in_byte; + *data |= info->cur_buf[info->cur_pos] & ((1 << bits_left_in_byte) - 1); + ++info->cur_pos; +#ifndef MYFILE_MMAP + fuji_fill_buffer (info); +#endif + bits_left_in_byte = 8; + } while (bits_left >= 8); + } + + if (!bits_left) { + info->cur_bit = (8 - (bits_left_in_byte & 7)) & 7; + return; + } + + *data <<= bits_left; + bits_left_in_byte -= bits_left; + *data |= ((1 << bits_left) - 1) & ((unsigned)info->cur_buf[info->cur_pos] >> bits_left_in_byte); + info->cur_bit = (8 - (bits_left_in_byte & 7)) & 7; +} + +int CLASS fuji_decode_sample_even (struct fuji_compressed_block* info, const struct fuji_compressed_params * params, ushort* line_buf, int pos, struct int_pair* grads) +{ + int interp_val = 0; + int errcnt = 0; + + int sample = 0, code = 0; + ushort* line_buf_cur = line_buf + pos; + int Rb = line_buf_cur[-2 - params->line_width]; + int Rc = line_buf_cur[-3 - params->line_width]; + int Rd = line_buf_cur[-1 - params->line_width]; + int Rf = line_buf_cur[-4 - 2 * params->line_width]; + + int grad, gradient, diffRcRb, diffRfRb, diffRdRb; + + grad = fuji_quant_gradient (params, Rb - Rf, Rc - Rb); + gradient = std::abs (grad); + diffRcRb = std::abs (Rc - Rb); + diffRfRb = std::abs (Rf - Rb); + diffRdRb = std::abs (Rd - Rb); + + if ( diffRcRb > diffRfRb && diffRcRb > diffRdRb ) { + interp_val = Rf + Rd + 2 * Rb; + } else if ( diffRdRb > diffRcRb && diffRdRb > diffRfRb ) { + interp_val = Rf + Rc + 2 * Rb; + } else { + interp_val = Rd + Rc + 2 * Rb; + } + + + fuji_zerobits (info, &sample); + + if (sample < params->max_bits - params->raw_bits - 1) { + int decBits = bitDiff (grads[gradient].value1, grads[gradient].value2); + fuji_read_code (info, &code, decBits); + code += sample << decBits; + } else { + fuji_read_code (info, &code, params->raw_bits); + code++; + } + + if (code < 0 || code >= params->total_values) { + errcnt++; + } + + if (code & 1) { + code = -1 - code / 2; + } else { + code /= 2; + } + + grads[gradient].value1 += std::abs (code); + + if (grads[gradient].value2 == params->min_value ) { + grads[gradient].value1 >>= 1; + grads[gradient].value2 >>= 1; + } + + grads[gradient].value2++; + + if (grad < 0) { + interp_val = (interp_val >> 2) - code; + } else { + interp_val = (interp_val >> 2) + code; + } + + if ( interp_val < 0 ) { + interp_val += params->total_values; + } else if (interp_val > params->q_point[4]) { + interp_val -= params->total_values; + } + + if ( interp_val >= 0 ) { + line_buf_cur[0] = std::min (interp_val, params->q_point[4]); + } else { + line_buf_cur[0] = 0; + } + + return errcnt; +} + +int CLASS fuji_decode_sample_odd (struct fuji_compressed_block* info, const struct fuji_compressed_params * params, ushort* line_buf, int pos, struct int_pair* grads) +{ + int interp_val = 0; + int errcnt = 0; + + int sample = 0, code = 0; + ushort* line_buf_cur = line_buf + pos; + int Ra = line_buf_cur[-1]; + int Rb = line_buf_cur[-2 - params->line_width]; + int Rc = line_buf_cur[-3 - params->line_width]; + int Rd = line_buf_cur[-1 - params->line_width]; + int Rg = line_buf_cur[1]; + + int grad, gradient; + + grad = fuji_quant_gradient (params, Rb - Rc, Rc - Ra); + gradient = std::abs (grad); + + if ((Rb > Rc && Rb > Rd) || (Rb < Rc && Rb < Rd)) { + interp_val = (Rg + Ra + 2 * Rb) >> 2; + } else { + interp_val = (Ra + Rg) >> 1; + } + + fuji_zerobits (info, &sample); + + if (sample < params->max_bits - params->raw_bits - 1) { + int decBits = bitDiff (grads[gradient].value1, grads[gradient].value2); + fuji_read_code (info, &code, decBits); + code += sample << decBits; + } else { + fuji_read_code (info, &code, params->raw_bits); + code++; + } + + if (code < 0 || code >= params->total_values) { + errcnt++; + } + + if (code & 1) { + code = -1 - code / 2; + } else { + code /= 2; + } + + grads[gradient].value1 += std::abs (code); + + if (grads[gradient].value2 == params->min_value) { + grads[gradient].value1 >>= 1; + grads[gradient].value2 >>= 1; + } + + grads[gradient].value2++; + + if (grad < 0) { + interp_val -= code; + } else { + interp_val += code; + } + + if ( interp_val < 0 ) { + interp_val += params->total_values; + } else if (interp_val > params->q_point[4]) { + interp_val -= params->total_values; + } + + if ( interp_val >= 0 ) { + line_buf_cur[0] = std::min (interp_val, params->q_point[4]); + } else { + line_buf_cur[0] = 0; + } + + return errcnt; +} + +void CLASS fuji_decode_interpolation_even (int line_width, ushort* line_buf, int pos) +{ + ushort* line_buf_cur = line_buf + pos; + int Rb = line_buf_cur[-2 - line_width]; + int Rc = line_buf_cur[-3 - line_width]; + int Rd = line_buf_cur[-1 - line_width]; + int Rf = line_buf_cur[-4 - 2 * line_width]; + int diffRcRb = std::abs (Rc - Rb); + int diffRfRb = std::abs (Rf - Rb); + int diffRdRb = std::abs (Rd - Rb); + + if ( diffRcRb > diffRfRb && diffRcRb > diffRdRb ) { + *line_buf_cur = (Rf + Rd + 2 * Rb) >> 2; + } else if ( diffRdRb > diffRcRb && diffRdRb > diffRfRb ) { + *line_buf_cur = (Rf + Rc + 2 * Rb) >> 2; + } else { + *line_buf_cur = (Rd + Rc + 2 * Rb) >> 2; + } +} + +void CLASS fuji_extend_generic (ushort *linebuf[_ltotal], int line_width, int start, int end) +{ + for (int i = start; i <= end; i++) { + linebuf[i][0] = linebuf[i - 1][1]; + linebuf[i][line_width + 1] = linebuf[i - 1][line_width]; + } +} + +void CLASS fuji_extend_red (ushort *linebuf[_ltotal], int line_width) +{ + fuji_extend_generic (linebuf, line_width, _R2, _R4); +} + +void CLASS fuji_extend_green (ushort *linebuf[_ltotal], int line_width) +{ + fuji_extend_generic (linebuf, line_width, _G2, _G7); +} + +void CLASS fuji_extend_blue (ushort *linebuf[_ltotal], int line_width) +{ + fuji_extend_generic (linebuf, line_width, _B2, _B4); +} + +void CLASS xtrans_decode_block (struct fuji_compressed_block* info, const struct fuji_compressed_params *params, int cur_line) +{ + int r_even_pos = 0, r_odd_pos = 1; + int g_even_pos = 0, g_odd_pos = 1; + int b_even_pos = 0, b_odd_pos = 1; + + int errcnt = 0; + + const int line_width = params->line_width; + + while (g_even_pos < line_width || g_odd_pos < line_width) { + if (g_even_pos < line_width) { + fuji_decode_interpolation_even (line_width, info->linebuf[_R2] + 1, r_even_pos); + r_even_pos += 2; + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_G2] + 1, g_even_pos, info->grad_even[0]); + g_even_pos += 2; + } + + if (g_even_pos > 8) { + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_R2] + 1, r_odd_pos, info->grad_odd[0]); + r_odd_pos += 2; + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_G2] + 1, g_odd_pos, info->grad_odd[0]); + g_odd_pos += 2; + } + } + + fuji_extend_red (info->linebuf, line_width); + fuji_extend_green (info->linebuf, line_width); + + g_even_pos = 0, g_odd_pos = 1; + + while (g_even_pos < line_width || g_odd_pos < line_width) { + if (g_even_pos < line_width) { + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_G3] + 1, g_even_pos, info->grad_even[1]); + g_even_pos += 2; + fuji_decode_interpolation_even (line_width, info->linebuf[_B2] + 1, b_even_pos); + b_even_pos += 2; + } + + if (g_even_pos > 8) { + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_G3] + 1, g_odd_pos, info->grad_odd[1]); + g_odd_pos += 2; + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_B2] + 1, b_odd_pos, info->grad_odd[1]); + b_odd_pos += 2; + } + } + + fuji_extend_green (info->linebuf, line_width); + fuji_extend_blue (info->linebuf, line_width); + + r_even_pos = 0, r_odd_pos = 1; + g_even_pos = 0, g_odd_pos = 1; + + while (g_even_pos < line_width || g_odd_pos < line_width) { + if (g_even_pos < line_width) { + if (r_even_pos & 3) { + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_R3] + 1, r_even_pos, info->grad_even[2]); + } else { + fuji_decode_interpolation_even (line_width, info->linebuf[_R3] + 1, r_even_pos); + } + + r_even_pos += 2; + fuji_decode_interpolation_even (line_width, info->linebuf[_G4] + 1, g_even_pos); + g_even_pos += 2; + } + + if (g_even_pos > 8) { + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_R3] + 1, r_odd_pos, info->grad_odd[2]); + r_odd_pos += 2; + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_G4] + 1, g_odd_pos, info->grad_odd[2]); + g_odd_pos += 2; + } + } + + fuji_extend_red (info->linebuf, line_width); + fuji_extend_green (info->linebuf, line_width); + + g_even_pos = 0, g_odd_pos = 1; + b_even_pos = 0, b_odd_pos = 1; + + while (g_even_pos < line_width || g_odd_pos < line_width) { + if (g_even_pos < line_width) { + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_G5] + 1, g_even_pos, info->grad_even[0]); + g_even_pos += 2; + + if ((b_even_pos & 3) == 2) { + fuji_decode_interpolation_even (line_width, info->linebuf[_B3] + 1, b_even_pos); + } else { + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_B3] + 1, b_even_pos, info->grad_even[0]); + } + + b_even_pos += 2; + } + + if (g_even_pos > 8) { + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_G5] + 1, g_odd_pos, info->grad_odd[0]); + g_odd_pos += 2; + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_B3] + 1, b_odd_pos, info->grad_odd[0]); + b_odd_pos += 2; + } + } + + fuji_extend_green (info->linebuf, line_width); + fuji_extend_blue (info->linebuf, line_width); + + r_even_pos = 0, r_odd_pos = 1; + g_even_pos = 0, g_odd_pos = 1; + + while (g_even_pos < line_width || g_odd_pos < line_width) { + if (g_even_pos < line_width) { + if ((r_even_pos & 3) == 2) { + fuji_decode_interpolation_even (line_width, info->linebuf[_R4] + 1, r_even_pos); + } else { + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_R4] + 1, r_even_pos, info->grad_even[1]); + } + + r_even_pos += 2; + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_G6] + 1, g_even_pos, info->grad_even[1]); + g_even_pos += 2; + } + + if (g_even_pos > 8) { + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_R4] + 1, r_odd_pos, info->grad_odd[1]); + r_odd_pos += 2; + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_G6] + 1, g_odd_pos, info->grad_odd[1]); + g_odd_pos += 2; + } + } + + fuji_extend_red (info->linebuf, line_width); + fuji_extend_green (info->linebuf, line_width); + + g_even_pos = 0, g_odd_pos = 1; + b_even_pos = 0, b_odd_pos = 1; + + while (g_even_pos < line_width || g_odd_pos < line_width) { + if (g_even_pos < line_width) { + fuji_decode_interpolation_even (line_width, info->linebuf[_G7] + 1, g_even_pos); + g_even_pos += 2; + + if (b_even_pos & 3) { + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_B4] + 1, b_even_pos, info->grad_even[2]); + } else { + fuji_decode_interpolation_even (line_width, info->linebuf[_B4] + 1, b_even_pos); + } + + b_even_pos += 2; + } + + if (g_even_pos > 8) { + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_G7] + 1, g_odd_pos, info->grad_odd[2]); + g_odd_pos += 2; + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_B4] + 1, b_odd_pos, info->grad_odd[2]); + b_odd_pos += 2; + } + } + + fuji_extend_green (info->linebuf, line_width); + fuji_extend_blue (info->linebuf, line_width); + + if (errcnt) { + derror(); + } +} + +void CLASS fuji_bayer_decode_block (struct fuji_compressed_block *info, const struct fuji_compressed_params *params, + int cur_line) +{ + int r_even_pos = 0, r_odd_pos = 1; + int g_even_pos = 0, g_odd_pos = 1; + int b_even_pos = 0, b_odd_pos = 1; + + int errcnt = 0; + + const int line_width = params->line_width; + + while (g_even_pos < line_width || g_odd_pos < line_width) { + if (g_even_pos < line_width) { + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_R2] + 1, r_even_pos, info->grad_even[0]); + r_even_pos += 2; + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_G2] + 1, g_even_pos, info->grad_even[0]); + g_even_pos += 2; + } + + if (g_even_pos > 8) { + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_R2] + 1, r_odd_pos, info->grad_odd[0]); + r_odd_pos += 2; + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_G2] + 1, g_odd_pos, info->grad_odd[0]); + g_odd_pos += 2; + } + } + + fuji_extend_red (info->linebuf, line_width); + fuji_extend_green (info->linebuf, line_width); + + g_even_pos = 0, g_odd_pos = 1; + + while (g_even_pos < line_width || g_odd_pos < line_width) { + if (g_even_pos < line_width) { + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_G3] + 1, g_even_pos, info->grad_even[1]); + g_even_pos += 2; + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_B2] + 1, b_even_pos, info->grad_even[1]); + b_even_pos += 2; + } + + if (g_even_pos > 8) { + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_G3] + 1, g_odd_pos, info->grad_odd[1]); + g_odd_pos += 2; + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_B2] + 1, b_odd_pos, info->grad_odd[1]); + b_odd_pos += 2; + } + } + + fuji_extend_green (info->linebuf, line_width); + fuji_extend_blue (info->linebuf, line_width); + + r_even_pos = 0, r_odd_pos = 1; + g_even_pos = 0, g_odd_pos = 1; + + while (g_even_pos < line_width || g_odd_pos < line_width) { + if (g_even_pos < line_width) { + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_R3] + 1, r_even_pos, info->grad_even[2]); + r_even_pos += 2; + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_G4] + 1, g_even_pos, info->grad_even[2]); + g_even_pos += 2; + } + + if (g_even_pos > 8) { + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_R3] + 1, r_odd_pos, info->grad_odd[2]); + r_odd_pos += 2; + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_G4] + 1, g_odd_pos, info->grad_odd[2]); + g_odd_pos += 2; + } + } + + fuji_extend_red (info->linebuf, line_width); + fuji_extend_green (info->linebuf, line_width); + + g_even_pos = 0, g_odd_pos = 1; + b_even_pos = 0, b_odd_pos = 1; + + while (g_even_pos < line_width || g_odd_pos < line_width) { + if (g_even_pos < line_width) { + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_G5] + 1, g_even_pos, info->grad_even[0]); + g_even_pos += 2; + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_B3] + 1, b_even_pos, info->grad_even[0]); + b_even_pos += 2; + } + + if (g_even_pos > 8) { + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_G5] + 1, g_odd_pos, info->grad_odd[0]); + g_odd_pos += 2; + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_B3] + 1, b_odd_pos, info->grad_odd[0]); + b_odd_pos += 2; + } + } + + fuji_extend_green (info->linebuf, line_width); + fuji_extend_blue (info->linebuf, line_width); + + r_even_pos = 0, r_odd_pos = 1; + g_even_pos = 0, g_odd_pos = 1; + + while (g_even_pos < line_width || g_odd_pos < line_width) { + if (g_even_pos < line_width) { + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_R4] + 1, r_even_pos, info->grad_even[1]); + r_even_pos += 2; + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_G6] + 1, g_even_pos, info->grad_even[1]); + g_even_pos += 2; + } + + if (g_even_pos > 8) { + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_R4] + 1, r_odd_pos, info->grad_odd[1]); + r_odd_pos += 2; + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_G6] + 1, g_odd_pos, info->grad_odd[1]); + g_odd_pos += 2; + } + } + + fuji_extend_red (info->linebuf, line_width); + fuji_extend_green (info->linebuf, line_width); + + g_even_pos = 0, g_odd_pos = 1; + b_even_pos = 0, b_odd_pos = 1; + + while (g_even_pos < line_width || g_odd_pos < line_width) { + if (g_even_pos < line_width) { + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_G7] + 1, g_even_pos, info->grad_even[2]); + g_even_pos += 2; + errcnt += fuji_decode_sample_even (info, params, info->linebuf[_B4] + 1, b_even_pos, info->grad_even[2]); + b_even_pos += 2; + } + + if (g_even_pos > 8) { + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_G7] + 1, g_odd_pos, info->grad_odd[2]); + g_odd_pos += 2; + errcnt += fuji_decode_sample_odd (info, params, info->linebuf[_B4] + 1, b_odd_pos, info->grad_odd[2]); + b_odd_pos += 2; + } + } + + fuji_extend_green (info->linebuf, line_width); + fuji_extend_blue (info->linebuf, line_width); + + if (errcnt) { + derror(); + } +} + +void CLASS fuji_decode_strip (const struct fuji_compressed_params* info_common, int cur_block, INT64 raw_offset, unsigned dsize) +{ + int cur_block_width, cur_line; + unsigned line_size; + struct fuji_compressed_block info; + + init_fuji_block (&info, info_common, raw_offset, dsize); + line_size = sizeof (ushort) * (info_common->line_width + 2); + + cur_block_width = fuji_block_width; + + if (cur_block + 1 == fuji_total_blocks) { + cur_block_width = raw_width - cur_block * fuji_block_width; + } + + struct i_pair { + int a, b; + }; + + const i_pair mtable[6] = { {_R0, _R3}, {_R1, _R4}, {_G0, _G6}, {_G1, _G7}, {_B0, _B3}, {_B1, _B4}}, + ztable[3] = {{_R2, 3}, {_G2, 6}, {_B2, 3}}; + + for (cur_line = 0; cur_line < fuji_total_lines; cur_line++) { + if (fuji_raw_type == 16) { + xtrans_decode_block (&info, info_common, cur_line); + } else { + fuji_bayer_decode_block (&info, info_common, cur_line); + } + + // copy data from line buffers and advance + for (int i = 0; i < 6; i++) { + memcpy (info.linebuf[mtable[i].a], info.linebuf[mtable[i].b], line_size); + } + + if (fuji_raw_type == 16) { + copy_line_to_xtrans (&info, cur_line, cur_block, cur_block_width); + } else { + copy_line_to_bayer (&info, cur_line, cur_block, cur_block_width); + } + + for (int i = 0; i < 3; i++) { + memset (info.linebuf[ztable[i].a], 0, ztable[i].b * line_size); + info.linebuf[ztable[i].a][0] = info.linebuf[ztable[i].a - 1][1]; + info.linebuf[ztable[i].a][info_common->line_width + 1] = info.linebuf[ztable[i].a - 1][info_common->line_width]; + } + } + + // release data + free (info.linealloc); +#ifndef MYFILE_MMAP + free (info.cur_buf); +#endif +} + +static unsigned sgetn (int n, uchar *s) +{ + unsigned result = 0; + + while (n-- > 0) { + result = (result << 8) | (*s++); + } + + return result; +} + +void CLASS fuji_compressed_load_raw() +{ + struct fuji_compressed_params common_info; + int cur_block; + unsigned *block_sizes; + INT64 raw_offset, *raw_block_offsets; + //struct fuji_compressed_block info; + + init_fuji_compr (&common_info); + + // read block sizes + block_sizes = (unsigned*) malloc (sizeof (unsigned) * fuji_total_blocks); + merror (block_sizes, "fuji_compressed_load_raw()"); + raw_block_offsets = (INT64*) malloc (sizeof (INT64) * fuji_total_blocks); + merror (raw_block_offsets, "fuji_compressed_load_raw()"); + + raw_offset = sizeof (unsigned) * fuji_total_blocks; + + if (raw_offset & 0xC) { + raw_offset += 0x10 - (raw_offset & 0xC); + } + + raw_offset += data_offset; + + fseek (ifp, data_offset, SEEK_SET); + fread (block_sizes, 1, sizeof (unsigned)*fuji_total_blocks, ifp); + + raw_block_offsets[0] = raw_offset; + + // calculating raw block offsets + for (cur_block = 0; cur_block < fuji_total_blocks; cur_block++) { + unsigned bsize = sgetn (4, (uchar *) (block_sizes + cur_block)); + block_sizes[cur_block] = bsize; + } + + for (cur_block = 1; cur_block < fuji_total_blocks; cur_block++) { + raw_block_offsets[cur_block] = raw_block_offsets[cur_block - 1] + block_sizes[cur_block - 1] ; + } + + fuji_decode_loop (&common_info, fuji_total_blocks, raw_block_offsets, block_sizes); + + free (block_sizes); + free (raw_block_offsets); + free (common_info.q_table); +} + +void CLASS fuji_decode_loop (const struct fuji_compressed_params* common_info, int count, INT64* raw_block_offsets, unsigned *block_sizes) +{ + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,1) // dynamic scheduling is faster if count > number of cores (e.g. count for GFX 50S is 12) +#endif + + for (int cur_block = 0; cur_block < count ; cur_block++) { + fuji_decode_strip (common_info, cur_block, raw_block_offsets[cur_block], block_sizes[cur_block]); + } +} + + +void CLASS parse_fuji_compressed_header() +{ + + uchar header[16]; + + ushort signature; + uchar version; + uchar h_raw_type; + uchar h_raw_bits; + ushort h_raw_height; + ushort h_raw_rounded_width; + ushort h_raw_width; + ushort h_block_size; + uchar h_blocks_in_row; + ushort h_total_lines; + + fseek (ifp, data_offset, SEEK_SET); + fread (header, 1, sizeof (header), ifp); + + signature = sgetn (2, header); + version = header[2]; + h_raw_type = header[3]; + h_raw_bits = header[4]; + h_raw_height = sgetn (2, header + 5); + h_raw_rounded_width = sgetn (2, header + 7); + h_raw_width = sgetn (2, header + 9); + h_block_size = sgetn (2, header + 11); + h_blocks_in_row = header[13]; + h_total_lines = sgetn (2, header + 14); + + + // general validation + if (signature != 0x4953 + || version != 1 + || h_raw_height > 0x3000 + || h_raw_height < 6 + || h_raw_height % 6 + || h_raw_width > 0x3000 + || h_raw_width < 0x300 + || h_raw_width % 24 + || h_raw_rounded_width > 0x3000 + || h_block_size != 0x300 + || h_raw_rounded_width < h_block_size + || h_raw_rounded_width % h_block_size + || h_raw_rounded_width - h_raw_width >= h_block_size + || h_blocks_in_row > 0x10 + || h_blocks_in_row == 0 + || h_blocks_in_row != h_raw_rounded_width / h_block_size + || h_total_lines > 0x800 + || h_total_lines == 0 + || h_total_lines != h_raw_height / 6 + || (h_raw_bits != 12 && h_raw_bits != 14) + || (h_raw_type != 16 && h_raw_type != 0)) { + xtransCompressed = false; + return; + } + + // modify data + fuji_total_lines = h_total_lines; + fuji_total_blocks = h_blocks_in_row; + fuji_block_width = h_block_size; + fuji_bits = h_raw_bits; + fuji_raw_type = h_raw_type; + raw_width = h_raw_width; + raw_height = h_raw_height; + data_offset += 16; + load_raw = &CLASS fuji_compressed_load_raw; +} diff --git a/rtengine/gauss.cc b/rtengine/gauss.cc index 4b84a125a..09c91db1e 100644 --- a/rtengine/gauss.cc +++ b/rtengine/gauss.cc @@ -231,8 +231,8 @@ template void gaussHorizontal3 (T** src, T** dst, int W, int H, const f #ifdef __SSE2__ template SSEFUNCTION void gaussVertical3 (T** src, T** dst, int W, int H, const float c0, const float c1) { - vfloat Tv, Tm1v, Tp1v; - vfloat Tv1, Tm1v1, Tp1v1; + vfloat Tv = F2V(0.f), Tm1v, Tp1v; + vfloat Tv1 = F2V(0.f), Tm1v1, Tp1v1; vfloat c0v, c1v; c0v = F2V(c0); c1v = F2V(c1); @@ -921,7 +921,7 @@ template void gaussVertical (T** src, T** dst, const int W, const int H #pragma omp for nowait #endif - for (int i = 0; i < W - numcols + 1; i += numcols) { + for (unsigned int i = 0; i < static_cast(std::max(0, W - numcols + 1)); i += numcols) { for (int k = 0; k < numcols; k++) { temp2[0][k] = B * src[0][i + k] + b1 * src[0][i + k] + b2 * src[0][i + k] + b3 * src[0][i + k]; temp2[1][k] = B * src[1][i + k] + b1 * temp2[0][k] + b2 * src[0][i + k] + b3 * src[0][i + k]; diff --git a/rtengine/green_equil_RT.cc b/rtengine/green_equil_RT.cc index a9183509d..8b1136359 100644 --- a/rtengine/green_equil_RT.cc +++ b/rtengine/green_equil_RT.cc @@ -30,12 +30,11 @@ #include "rt_math.h" #include "rawimagesource.h" - namespace rtengine { //void green_equilibrate()//for dcraw implementation -void RawImageSource::green_equilibrate(float thresh) +void RawImageSource::green_equilibrate(float thresh, array2D &rawData) { // thresh = threshold for performing green equilibration; max percentage difference of G1 vs G2 // G1-G2 differences larger than this will be assumed to be Nyquist texture, and left untouched @@ -79,7 +78,7 @@ void RawImageSource::green_equilibrate(float thresh) */ //now smooth the cfa data #ifdef _OPENMP - #pragma omp parallel for + #pragma omp parallel for schedule(dynamic,16) #endif for (int rr = 4; rr < height - 4; rr++) @@ -99,8 +98,8 @@ void RawImageSource::green_equilibrate(float thresh) float d1 = (o1_1 + o1_2 + o1_3 + o1_4) * 0.25f; float d2 = (o2_1 + o2_2 + o2_3 + o2_4) * 0.25f; - float c1 = (fabs(o1_1 - o1_2) + fabs(o1_1 - o1_3) + fabs(o1_1 - o1_4) + fabs(o1_2 - o1_3) + fabs(o1_3 - o1_4) + fabs(o1_2 - o1_4)) / 6.0; - float c2 = (fabs(o2_1 - o2_2) + fabs(o2_1 - o2_3) + fabs(o2_1 - o2_4) + fabs(o2_2 - o2_3) + fabs(o2_3 - o2_4) + fabs(o2_2 - o2_4)) / 6.0; + float c1 = (fabs(o1_1 - o1_2) + fabs(o1_1 - o1_3) + fabs(o1_1 - o1_4) + fabs(o1_2 - o1_3) + fabs(o1_3 - o1_4) + fabs(o1_2 - o1_4)) / 6.f; + float c2 = (fabs(o2_1 - o2_2) + fabs(o2_1 - o2_3) + fabs(o2_1 - o2_4) + fabs(o2_2 - o2_3) + fabs(o2_3 - o2_4) + fabs(o2_2 - o2_4)) / 6.f; //%%%%%%%%%%%%%%%%%%%%%% //vote1=(checker[rr-2][cc]+checker[rr][cc-2]+checker[rr][cc+2]+checker[rr+2][cc]); @@ -111,10 +110,10 @@ void RawImageSource::green_equilibrate(float thresh) //pixel interpolation float gin = cfa[rr][cc]; - float gse = (cfa[rr + 1][cc + 1]) + 0.5 * (cfa[rr][cc] - cfa[rr + 2][cc + 2]); - float gnw = (cfa[rr - 1][cc - 1]) + 0.5 * (cfa[rr][cc] - cfa[rr - 2][cc - 2]); - float gne = (cfa[rr - 1][cc + 1]) + 0.5 * (cfa[rr][cc] - cfa[rr - 2][cc + 2]); - float gsw = (cfa[rr + 1][cc - 1]) + 0.5 * (cfa[rr][cc] - cfa[rr + 2][cc - 2]); + float gse = (cfa[rr + 1][cc + 1]) + 0.5f * (cfa[rr][cc] - cfa[rr + 2][cc + 2]); + float gnw = (cfa[rr - 1][cc - 1]) + 0.5f * (cfa[rr][cc] - cfa[rr - 2][cc - 2]); + float gne = (cfa[rr - 1][cc + 1]) + 0.5f * (cfa[rr][cc] - cfa[rr - 2][cc + 2]); + float gsw = (cfa[rr + 1][cc - 1]) + 0.5f * (cfa[rr][cc] - cfa[rr + 2][cc - 2]); diff --git a/rtengine/helpersse2.h b/rtengine/helpersse2.h index 23dd016fa..7e2185a7f 100644 --- a/rtengine/helpersse2.h +++ b/rtengine/helpersse2.h @@ -30,7 +30,7 @@ typedef __m128i vint2; // #ifdef __GNUC__ -#if ((__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4) && (!defined(WIN32) || defined( __x86_64__ )) +#if (!defined(WIN32) || defined( __x86_64__ )) #define LVF(x) _mm_load_ps((float*)&x) #define LVFU(x) _mm_loadu_ps(&x) #define STVF(x,y) _mm_store_ps(&x,y) diff --git a/rtengine/hilite_recon.cc b/rtengine/hilite_recon.cc index 9f618ace5..f9e630f9d 100644 --- a/rtengine/hilite_recon.cc +++ b/rtengine/hilite_recon.cc @@ -217,7 +217,6 @@ void RawImageSource::boxblur_resamp(float **src, float **dst, float ** temp, int #pragma omp parallel #endif { - float tempval; #ifdef _OPENMP #pragma omp for #endif @@ -227,7 +226,7 @@ void RawImageSource::boxblur_resamp(float **src, float **dst, float ** temp, int for (int row = 0; row < H; row++) { int len = box + 1; - tempval = src[row][0] / len; + float tempval = src[row][0] / len; for (int j = 1; j <= box; j++) { tempval += src[row][j] / len; @@ -339,12 +338,11 @@ void RawImageSource::boxblur_resamp(float **src, float **dst, float ** temp, int // process remaining columns #pragma omp single { - float tempval; //vertical blur for (int col = (W / samp) - ((W / samp) % numCols); col < W / samp; col++) { int len = box + 1; - tempval = temp[0][col] / len; + float tempval = temp[0][col] / len; for (int i = 1; i <= box; i++) { tempval += temp[i][col] / len; @@ -398,23 +396,20 @@ void RawImageSource :: HLRecovery_inpaint (float** red, float** green, float** b int height = H; int width = W; - static const int range = 2; - static const int pitch = 4; + constexpr int range = 2; + constexpr int pitch = 4; - static const int numdirs = 4; - - static const float threshpct = 0.25f; - static const float fixthreshpct = 0.7f; - static const float maxpct = 0.95f; - static const float epsilon = 0.00001f; + constexpr float threshpct = 0.25f; + constexpr float maxpct = 0.95f; + constexpr float epsilon = 0.00001f; //%%%%%%%%%%%%%%%%%%%% //for blend algorithm: - static const float blendthresh = 1.0; - static const int ColorCount = 3; + constexpr float blendthresh = 1.0; + constexpr int ColorCount = 3; // Transform matrixes rgb>lab and back - static const float trans[ColorCount][ColorCount] = + constexpr float trans[ColorCount][ColorCount] = { { 1.f, 1.f, 1.f }, { 1.7320508f, -1.7320508f, 0.f }, { -1.f, -1.f, 2.f } }; - static const float itrans[ColorCount][ColorCount] = + constexpr float itrans[ColorCount][ColorCount] = { { 1.f, 0.8660254f, -0.5f }, { 1.f, -0.8660254f, -0.5f }, { 1.f, 0.f, 1.f } }; if(settings->verbose) diff --git a/rtengine/iccjpeg.cc b/rtengine/iccjpeg.cc index 31aa0ec7c..5e652296f 100644 --- a/rtengine/iccjpeg.cc +++ b/rtengine/iccjpeg.cc @@ -55,7 +55,6 @@ write_icc_profile (j_compress_ptr cinfo, { unsigned int num_markers; /* total number of markers we'll write */ int cur_marker = 1; /* per spec, counting starts at 1 */ - unsigned int length; /* number of bytes to write in this marker */ /* Calculate the number of markers we'll need, rounding up of course */ num_markers = icc_data_len / MAX_DATA_BYTES_IN_MARKER; @@ -66,7 +65,7 @@ write_icc_profile (j_compress_ptr cinfo, while (icc_data_len > 0) { /* length of profile to put in this marker */ - length = icc_data_len; + unsigned int length = icc_data_len; /* number of bytes to write in this marker */ if (length > MAX_DATA_BYTES_IN_MARKER) { length = MAX_DATA_BYTES_IN_MARKER; diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index 3cb9b4a71..49ff4790e 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -16,94 +16,161 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "iccstore.h" - #include +#include +#include + #ifdef WIN32 #include #else #include #endif -#include +#include "iccstore.h" #include "iccmatrices.h" +#include "procparams.h" #include "../rtgui/options.h" +#include "../rtgui/threadutils.h" namespace rtengine { + extern const Settings* settings; -void loadProfiles (const Glib::ustring& dirName, - std::map* profiles, - std::map* profileContents, - std::map* profileNames, - bool nameUpper) +} + +namespace { - if (dirName.empty ()) { + +// Not recursive +void loadProfiles( + const Glib::ustring& dirName, + std::map* profiles, + std::map* profileContents, + std::map* profileNames, + bool nameUpper +) +{ + if (dirName.empty()) { return; } try { + Glib::Dir dir(dirName); - Glib::Dir dir (dirName); - - for (Glib::DirIterator entry = dir.begin (); entry != dir.end (); ++entry) { - + for (Glib::DirIterator entry = dir.begin(); entry != dir.end(); ++entry) { const Glib::ustring fileName = *entry; - if (fileName.size () < 4) { + if (fileName.size() < 4) { continue; } - const Glib::ustring extension = fileName.substr (fileName.size () - 4).casefold (); + const Glib::ustring extension = rtengine::getFileExtension(fileName); - if (extension.compare (".icc") != 0 && extension.compare (".icm") != 0) { + if (extension != "icc" && extension != "icm") { continue; } - const Glib::ustring filePath = Glib::build_filename (dirName, fileName); + const Glib::ustring filePath = Glib::build_filename(dirName, fileName); - if (!Glib::file_test (filePath, Glib::FILE_TEST_IS_REGULAR)) { + if (!Glib::file_test(filePath, Glib::FILE_TEST_IS_REGULAR)) { continue; } - Glib::ustring name = fileName.substr (0, fileName.size() - 4); + Glib::ustring name = fileName.substr(0, fileName.size() - 4); if (nameUpper) { - name = name.uppercase (); + name = name.uppercase(); } if (profiles) { - const ProfileContent content (filePath); - const cmsHPROFILE profile = content.toProfile (); + const rtengine::ProfileContent content(filePath); + const cmsHPROFILE profile = content.toProfile(); if (profile) { - profiles->insert (std::make_pair (name, profile)); + profiles->emplace(name, profile); if (profileContents) { - profileContents->insert (std::make_pair (name, content)); + profileContents->emplace(name, content); } } } if (profileNames) { - profileNames->insert (std::make_pair (name, filePath)); + profileNames->emplace(name, filePath); } } - } catch (Glib::Exception&) {} + } catch (Glib::Exception&) { + } } -inline void getSupportedIntent (cmsHPROFILE profile, cmsUInt32Number intent, cmsUInt32Number direction, uint8_t& result) +// Version dedicated to single profile load when loadAll==false (cli version "-q" mode) +bool loadProfile( + const Glib::ustring& profile, + const Glib::ustring& dirName, + std::map* profiles, + std::map* profileContents +) { - if (cmsIsIntentSupported (profile, intent, direction)) { + if (dirName.empty() || profiles == nullptr) { + return false; + } + + try { + Glib::Dir dir(dirName); + + for (Glib::DirIterator entry = dir.begin(); entry != dir.end(); ++entry) { + const Glib::ustring fileName = *entry; + + if (fileName.size() < 4) { + continue; + } + + const Glib::ustring extension = rtengine::getFileExtension(fileName); + + if (extension != "icc" && extension != "icm") { + continue; + } + + const Glib::ustring filePath = Glib::build_filename(dirName, fileName); + + if (!Glib::file_test(filePath, Glib::FILE_TEST_IS_REGULAR)) { + continue; + } + + const Glib::ustring name = fileName.substr(0, fileName.size() - 4); + + if (name == profile) { + const rtengine::ProfileContent content(filePath); + const cmsHPROFILE profile = content.toProfile(); + + if (profile) { + profiles->emplace(name, profile); + + if (profileContents) { + profileContents->emplace(name, content); + } + return true; + } + } + } + } catch (Glib::Exception&) { + } + + return false; +} + +void getSupportedIntent(cmsHPROFILE profile, cmsUInt32Number intent, cmsUInt32Number direction, uint8_t& result) +{ + if (cmsIsIntentSupported(profile, intent, direction)) { result |= 1 << intent; } } -inline uint8_t getSupportedIntents (cmsHPROFILE profile, cmsUInt32Number direction) +uint8_t getSupportedIntents(cmsHPROFILE profile, cmsUInt32Number direction) { if (!profile) { return 0; @@ -111,22 +178,22 @@ inline uint8_t getSupportedIntents (cmsHPROFILE profile, cmsUInt32Number directi uint8_t result = 0; - getSupportedIntent (profile, INTENT_PERCEPTUAL, direction, result); - getSupportedIntent (profile, INTENT_RELATIVE_COLORIMETRIC, direction, result); - getSupportedIntent (profile, INTENT_SATURATION, direction, result); - getSupportedIntent (profile, INTENT_ABSOLUTE_COLORIMETRIC, direction, result); + getSupportedIntent(profile, INTENT_PERCEPTUAL, direction, result); + getSupportedIntent(profile, INTENT_RELATIVE_COLORIMETRIC, direction, result); + getSupportedIntent(profile, INTENT_SATURATION, direction, result); + getSupportedIntent(profile, INTENT_ABSOLUTE_COLORIMETRIC, direction, result); return result; } -inline cmsHPROFILE createXYZProfile () +cmsHPROFILE createXYZProfile() { double mat[3][3] = { {1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0} }; - return ICCStore::createFromMatrix (mat, false, "XYZ"); + return rtengine::ICCStore::createFromMatrix(mat, false, "XYZ"); } -const double (*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_bruce, xyz_beta, xyz_best, xyz_rec2020}; -const double (*iwprofiles[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, bruce_xyz, beta_xyz, best_xyz, rec2020_xyz}; +const double(*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_bruce, xyz_beta, xyz_best, xyz_rec2020}; +const double(*iwprofiles[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, bruce_xyz, beta_xyz, best_xyz, rec2020_xyz}; const char* wpnames[] = {"sRGB", "Adobe RGB", "ProPhoto", "WideGamut", "BruceRGB", "Beta RGB", "BestRGB", "Rec2020"}; const char* wpgamma[] = {"default", "BT709_g2.2_s4.5", "sRGB_g2.4_s12.92", "linear_g1.0", "standard_g2.2", "standard_g1.8", "High_g1.3_s3.35", "Low_g2.6_s6.9"}; //gamma free //default = gamma inside profile @@ -138,68 +205,624 @@ const char* wpgamma[] = {"default", "BT709_g2.2_s4.5", "sRGB_g2.4_s12.92", "line } -namespace rtengine +rtengine::ProfileContent::ProfileContent() = default; + +rtengine::ProfileContent::ProfileContent(const Glib::ustring& fileName) { + FILE* const f = g_fopen(fileName.c_str(), "rb"); -std::vector getGamma () -{ - - std::vector res; - - for (unsigned int i = 0; i < sizeof(wpgamma) / sizeof(wpgamma[0]); i++) { - res.push_back (wpgamma[i]); + if (!f) { + return; } - return res; + fseek(f, 0, SEEK_END); + long length = ftell(f); + if(length > 0) { + char* d = new char[length + 1]; + fseek(f, 0, SEEK_SET); + length = fread(d, 1, length, f); + d[length] = 0; + data.assign(d, length); + delete[] d; + } else { + data.clear(); + } + fclose(f); + } -std::vector getWorkingProfiles () +rtengine::ProfileContent::ProfileContent(cmsHPROFILE hProfile) +{ + if (hProfile != nullptr) { + cmsUInt32Number bytesNeeded = 0; + cmsSaveProfileToMem(hProfile, nullptr, &bytesNeeded); + + if (bytesNeeded > 0) { + char* d = new char[bytesNeeded + 1]; + cmsSaveProfileToMem(hProfile, d, &bytesNeeded); + data.assign(d, bytesNeeded); + delete[] d; + } + } +} + +cmsHPROFILE rtengine::ProfileContent::toProfile() const +{ + + return + !data.empty() + ? cmsOpenProfileFromMem(data.c_str(), data.size()) + : nullptr; +} + +const std::string& rtengine::ProfileContent::getData() const +{ + return data; +} + +class rtengine::ICCStore::Implementation +{ +public: + Implementation() : + loadAll(true), + xyz(createXYZProfile()), + srgb(cmsCreate_sRGBProfile()) + { + //cmsErrorAction(LCMS_ERROR_SHOW); + + constexpr int N = sizeof(wpnames) / sizeof(wpnames[0]); + + for (int i = 0; i < N; ++i) { + wProfiles[wpnames[i]] = createFromMatrix(wprofiles[i]); + wProfilesGamma[wpnames[i]] = createFromMatrix(wprofiles[i], true); + wMatrices[wpnames[i]] = wprofiles[i]; + iwMatrices[wpnames[i]] = iwprofiles[i]; + } + } + + ~Implementation() + { + for (auto &p : wProfiles) { + if (p.second) { + cmsCloseProfile(p.second); + } + } + for (auto &p : wProfilesGamma) { + if (p.second) { + cmsCloseProfile(p.second); + } + } + for (auto &p : fileProfiles) { + if(p.second) { + cmsCloseProfile(p.second); + } + } + if(srgb) { + cmsCloseProfile(srgb); + } + if(xyz) { + cmsCloseProfile(xyz); + } + } + + void init(const Glib::ustring& usrICCDir, const Glib::ustring& rtICCDir, bool loadAll) + { + // Reads all profiles from the given profiles dir + + MyMutex::MyLock lock(mutex); + + this->loadAll = loadAll; + + // RawTherapee's profiles take precedence if a user's profile of the same name exists + profilesDir = Glib::build_filename(rtICCDir, "output"); + userICCDir = usrICCDir; + fileProfiles.clear(); + fileProfileContents.clear(); + if (loadAll) { + loadProfiles(profilesDir, &fileProfiles, &fileProfileContents, nullptr, false); + loadProfiles(userICCDir, &fileProfiles, &fileProfileContents, nullptr, false); + } + + // Input profiles + // Load these to different areas, since the short name(e.g. "NIKON D700" may overlap between system/user and RT dir) + stdProfilesDir = Glib::build_filename(rtICCDir, "input"); + fileStdProfiles.clear(); + fileStdProfilesFileNames.clear(); + if (loadAll) { + loadProfiles(stdProfilesDir, nullptr, nullptr, &fileStdProfilesFileNames, true); + } + + defaultMonitorProfile = settings->monitorProfile; + } + + cmsHPROFILE workingSpace(const Glib::ustring& name) const + { + const ProfileMap::const_iterator r = wProfiles.find(name); + + return + r != wProfiles.end() + ? r->second + : wProfiles.find("sRGB")->second; + } + + cmsHPROFILE workingSpaceGamma(const Glib::ustring& name) const + { + + const ProfileMap::const_iterator r = wProfilesGamma.find(name); + + return + r != wProfilesGamma.end() + ? r->second + : wProfilesGamma.find("sRGB")->second; + } + + TMatrix workingSpaceMatrix(const Glib::ustring& name) const + { + const MatrixMap::const_iterator r = wMatrices.find(name); + + return + r != wMatrices.end() + ? r->second + : wMatrices.find("sRGB")->second; + } + + TMatrix workingSpaceInverseMatrix(const Glib::ustring& name) const + { + + const MatrixMap::const_iterator r = iwMatrices.find(name); + + return + r != iwMatrices.end() + ? r->second + : iwMatrices.find("sRGB")->second; + } + + bool outputProfileExist(const Glib::ustring& name) const + { + MyMutex::MyLock lock(mutex); + return fileProfiles.find(name) != fileProfiles.end(); + } + + cmsHPROFILE getProfile(const Glib::ustring& name) + { + MyMutex::MyLock lock(mutex); + + const ProfileMap::const_iterator r = fileProfiles.find(name); + + if (r != fileProfiles.end()) { + return r->second; + } + + if (!name.compare(0, 5, "file:")) { + const ProfileContent content(name.substr(5)); + const cmsHPROFILE profile = content.toProfile(); + + if (profile) { + fileProfiles.emplace(name, profile); + fileProfileContents.emplace(name, content); + + return profile; + } + } else if (!loadAll) { + // Look for a standard profile + if (!loadProfile(name, profilesDir, &fileProfiles, &fileProfileContents)) { + loadProfile(name, userICCDir, &fileProfiles, &fileProfileContents); + } + const ProfileMap::const_iterator r = fileProfiles.find(name); + if (r != fileProfiles.end()) { + return r->second; + } + } + + return nullptr; + } + + cmsHPROFILE getStdProfile(const Glib::ustring& name) + { + const Glib::ustring nameUpper = name.uppercase(); + + MyMutex::MyLock lock(mutex); + + const ProfileMap::const_iterator r = fileStdProfiles.find(nameUpper); + + // Return profile from store + if (r != fileStdProfiles.end()) { + return r->second; + } else if (!loadAll) { + // Directory not scanned, so looking and adding now... + if (!loadProfile(name, profilesDir, &fileProfiles, &fileProfileContents)) { + loadProfile(name, userICCDir, &fileProfiles, &fileProfileContents); + } + const ProfileMap::const_iterator r = fileProfiles.find(name); + if (r != fileProfiles.end()) { + return r->second; + } + } + + // Profile is not yet in store + const NameMap::const_iterator f = fileStdProfilesFileNames.find(nameUpper); + + // Profile does not exist + if (f == fileStdProfilesFileNames.end()) { + return nullptr; + } + + // But there exists one --> load it + const ProfileContent content(f->second); + const cmsHPROFILE profile = content.toProfile(); + + if (profile) { + fileStdProfiles.emplace(f->first, profile); + } + + // Profile invalid or stored now --> remove entry from fileStdProfilesFileNames + fileStdProfilesFileNames.erase(f); + return profile; + } + + ProfileContent getContent(const Glib::ustring& name) const + { + MyMutex::MyLock lock(mutex); + + const ContentMap::const_iterator r = fileProfileContents.find(name); + + return + r != fileProfileContents.end() + ? r->second + : ProfileContent(); + } + + cmsHPROFILE getXYZProfile() const + { + return xyz; + } + + cmsHPROFILE getsRGBProfile() const + { + return srgb; + } + + std::vector getProfiles(ProfileType type) const + { + std::vector res; + + MyMutex::MyLock lock(mutex); + + for (const auto profile : fileProfiles) { + if ( + ( + type==ICCStore::ProfileType::MONITOR + && cmsGetDeviceClass(profile.second) == cmsSigDisplayClass + && cmsGetColorSpace(profile.second) == cmsSigRgbData + ) + ||( + type==ICCStore::ProfileType::PRINTER + && cmsGetDeviceClass(profile.second) == cmsSigOutputClass + ) + ||( + type==ICCStore::ProfileType::OUTPUT + && (cmsGetDeviceClass(profile.second) == cmsSigDisplayClass || cmsGetDeviceClass(profile.second) == cmsSigOutputClass) + && cmsGetColorSpace(profile.second) == cmsSigRgbData + ) + ) { + res.push_back(profile.first); + } + } + + return res; + } + + std::vector getProfilesFromDir(const Glib::ustring& dirName) const + { + std::vector res; + ProfileMap profiles; + + MyMutex::MyLock lock(mutex); + + loadProfiles(profilesDir, &profiles, nullptr, nullptr, false); + loadProfiles(dirName, &profiles, nullptr, nullptr, false); + + for (const auto& profile : profiles) { + res.push_back(profile.first); + } + + return res; + } + + std::uint8_t getInputIntents(cmsHPROFILE profile) + { + MyMutex::MyLock lock(mutex); + + return getSupportedIntents(profile, LCMS_USED_AS_INPUT); + } + + std::uint8_t getOutputIntents(cmsHPROFILE profile) + { + MyMutex::MyLock lock(mutex); + + return getSupportedIntents(profile, LCMS_USED_AS_OUTPUT); + } + + std::uint8_t getProofIntents(cmsHPROFILE profile) + { + MyMutex::MyLock lock(mutex); + + return getSupportedIntents(profile, LCMS_USED_AS_PROOF); + } + + std::uint8_t getInputIntents(const Glib::ustring &name) + { + return getInputIntents(getProfile(name)); + } + + std::uint8_t getOutputIntents(const Glib::ustring &name) + { + return getOutputIntents(getProfile(name)); + } + + std::uint8_t getProofIntents(const Glib::ustring &name) + { + return getProofIntents(getProfile(name)); + } + + Glib::ustring getDefaultMonitorProfileName() const + { + return defaultMonitorProfile; + } + + void setDefaultMonitorProfileName(const Glib::ustring &name) + { + defaultMonitorProfile = name; + } + +private: + using ProfileMap = std::map; + using MatrixMap = std::map; + using ContentMap = std::map; + using NameMap = std::map; + + ProfileMap wProfiles; + ProfileMap wProfilesGamma; + MatrixMap wMatrices; + MatrixMap iwMatrices; + + // These contain profiles from user/system directory(supplied on init) + Glib::ustring profilesDir; + Glib::ustring userICCDir; + ProfileMap fileProfiles; + ContentMap fileProfileContents; + + //These contain standard profiles from RT. Keys are all in uppercase. + Glib::ustring stdProfilesDir; + NameMap fileStdProfilesFileNames; + ProfileMap fileStdProfiles; + + Glib::ustring defaultMonitorProfile; + + bool loadAll; + + const cmsHPROFILE xyz; + const cmsHPROFILE srgb; + + mutable MyMutex mutex; +}; + +rtengine::ICCStore* rtengine::ICCStore::getInstance() +{ + static rtengine::ICCStore instance; + return &instance; +} + +void rtengine::ICCStore::init(const Glib::ustring& usrICCDir, const Glib::ustring& stdICCDir, bool loadAll) +{ + implementation->init(usrICCDir, stdICCDir, loadAll); +} + +cmsHPROFILE rtengine::ICCStore::workingSpace(const Glib::ustring& name) const +{ + return implementation->workingSpace(name); +} + +cmsHPROFILE rtengine::ICCStore::workingSpaceGamma(const Glib::ustring& name) const +{ + return implementation->workingSpaceGamma(name); +} + +rtengine::TMatrix rtengine::ICCStore::workingSpaceMatrix(const Glib::ustring& name) const +{ + return implementation->workingSpaceMatrix(name); +} + +rtengine::TMatrix rtengine::ICCStore::workingSpaceInverseMatrix(const Glib::ustring& name) const +{ + return implementation->workingSpaceInverseMatrix(name); +} + +bool rtengine::ICCStore::outputProfileExist(const Glib::ustring& name) const +{ + return implementation->outputProfileExist(name); +} + +cmsHPROFILE rtengine::ICCStore::getProfile(const Glib::ustring& name) const +{ + return implementation->getProfile(name); +} + +cmsHPROFILE rtengine::ICCStore::getStdProfile(const Glib::ustring& name) const +{ + return implementation->getStdProfile(name); +} + +rtengine::ProfileContent rtengine::ICCStore::getContent(const Glib::ustring& name) const +{ + return implementation->getContent(name); +} + + +Glib::ustring rtengine::ICCStore::getDefaultMonitorProfileName() const +{ + return implementation->getDefaultMonitorProfileName(); +} + + +void rtengine::ICCStore::setDefaultMonitorProfileName(const Glib::ustring &name) +{ + implementation->setDefaultMonitorProfileName(name); +} + +cmsHPROFILE rtengine::ICCStore::getXYZProfile() const +{ + return implementation->getXYZProfile(); +} + +cmsHPROFILE rtengine::ICCStore::getsRGBProfile() const +{ + return implementation->getsRGBProfile(); +} + +std::vector rtengine::ICCStore::getProfiles(ProfileType type) const +{ + return implementation->getProfiles(type); +} + +std::vector rtengine::ICCStore::getProfilesFromDir(const Glib::ustring& dirName) const +{ + return implementation->getProfilesFromDir(dirName); +} + +std::uint8_t rtengine::ICCStore::getInputIntents(cmsHPROFILE profile) const +{ + return implementation->getInputIntents(profile); +} + +std::uint8_t rtengine::ICCStore::getOutputIntents(cmsHPROFILE profile) const +{ + return implementation->getOutputIntents(profile); +} + +std::uint8_t rtengine::ICCStore::getProofIntents(cmsHPROFILE profile) const +{ + return implementation->getProofIntents(profile); +} + +std::uint8_t rtengine::ICCStore::getInputIntents(const Glib::ustring& name) const +{ + return implementation->getInputIntents(name); +} + +std::uint8_t rtengine::ICCStore::getOutputIntents(const Glib::ustring& name) const +{ + return implementation->getOutputIntents(name); +} + +std::uint8_t rtengine::ICCStore::getProofIntents(const Glib::ustring& name) const +{ + return implementation->getProofIntents(name); +} + +rtengine::ICCStore::ICCStore() : + implementation(new Implementation) +{ +} + +rtengine::ICCStore::~ICCStore() = default; + +std::vector rtengine::ICCStore::getWorkingProfiles() { std::vector res; for (unsigned int i = 0; i < sizeof(wpnames) / sizeof(wpnames[0]); i++) { - res.push_back (wpnames[i]); + res.push_back(wpnames[i]); } return res; } -std::vector ICCStore::getProfiles (const bool onlyRgb) const +std::vector rtengine::ICCStore::getGamma() { - MyMutex::MyLock lock(mutex_); - std::vector res; - for (ProfileMap::const_iterator profile = fileProfiles.begin (); profile != fileProfiles.end (); ++profile) { - if (!onlyRgb || (onlyRgb && cmsGetColorSpace (profile->second) == cmsSigRgbData)) - res.push_back (profile->first); + for (unsigned int i = 0; i < sizeof(wpgamma) / sizeof(wpgamma[0]); i++) { + res.push_back(wpgamma[i]); } return res; } -std::vector ICCStore::getProfilesFromDir (const Glib::ustring& dirName) const +void rtengine::ICCStore::getGammaArray(const procparams::ColorManagementParams &icm, GammaValues &ga) { + const double eps = 0.000000001; // not divide by zero + if (!icm.freegamma) {//if Free gamma not selected + // gamma : ga[0],ga[1],ga[2],ga[3],ga[4],ga[5] by calcul + if(icm.gamma == "BT709_g2.2_s4.5") { + ga[0] = 2.22; //BT709 2.2 4.5 - my preferred as D.Coffin + ga[1] = 0.909995; + ga[2] = 0.090005; + ga[3] = 0.222222; + ga[4] = 0.081071; + } else if (icm.gamma == "sRGB_g2.4_s12.92") { + ga[0] = 2.40; //sRGB 2.4 12.92 - RT default as Lightroom + ga[1] = 0.947858; + ga[2] = 0.052142; + ga[3] = 0.077399; + ga[4] = 0.039293; + } else if (icm.gamma == "High_g1.3_s3.35") { + ga[0] = 1.3 ; //for high dynamic images + ga[1] = 0.998279; + ga[2] = 0.001721; + ga[3] = 0.298507; + ga[4] = 0.005746; + } else if (icm.gamma == "Low_g2.6_s6.9") { + ga[0] = 2.6 ; //gamma 2.6 variable : for low contrast images + ga[1] = 0.891161; + ga[2] = 0.108839; + ga[3] = 0.144928; + ga[4] = 0.076332; + } else if (icm.gamma == "standard_g2.2") { + ga[0] = 2.2; //gamma=2.2(as gamma of Adobe, Widegamut...) + ga[1] = 1.; + ga[2] = 0.; + ga[3] = 1. / eps; + ga[4] = 0.; + } else if (icm.gamma == "standard_g1.8") { + ga[0] = 1.8; //gamma=1.8(as gamma of Prophoto) + ga[1] = 1.; + ga[2] = 0.; + ga[3] = 1. / eps; + ga[4] = 0.; + } else /* if (icm.gamma == "linear_g1.0") */ { + ga[0] = 1.0; //gamma=1 linear : for high dynamic images(cf : D.Coffin...) + ga[1] = 1.; + ga[2] = 0.; + ga[3] = 1. / eps; + ga[4] = 0.; + } + ga[5] = 0.0; + ga[6] = 0.0; + } else { //free gamma selected + GammaValues g_a; //gamma parameters + double pwr = 1.0 / icm.gampos; + double ts = icm.slpos; + double slope = icm.slpos == 0 ? eps : icm.slpos; - MyMutex::MyLock lock(mutex_); - - std::vector res; - - ProfileMap profiles; - - loadProfiles (profilesDir, &profiles, nullptr, nullptr, false); - loadProfiles (dirName, &profiles, nullptr, nullptr, false); - - for (ProfileMap::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) { - res.push_back (profile->first); + int mode = 0, imax = 0; + Color::calcGamma(pwr, ts, mode, imax, g_a); // call to calcGamma with selected gamma and slope : return parameters for LCMS2 + ga[4] = g_a[3] * ts; + //printf("g_a.gamma0=%f g_a.gamma1=%f g_a.gamma2=%f g_a.gamma3=%f g_a.gamma4=%f\n", g_a.gamma0,g_a.gamma1,g_a.gamma2,g_a.gamma3,g_a.gamma4); + ga[0] = icm.gampos; + ga[1] = 1. /(1.0 + g_a[4]); + ga[2] = g_a[4] /(1.0 + g_a[4]); + ga[3] = 1. / slope; + ga[5] = 0.0; + ga[6] = 0.0; + //printf("ga[0]=%f ga[1]=%f ga[2]=%f ga[3]=%f ga[4]=%f\n", ga[0],ga[1],ga[2],ga[3],ga[4]); } - - return res; } -cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) +// WARNING: the caller must lock lcmsMutex +cmsHPROFILE rtengine::ICCStore::makeStdGammaProfile(cmsHPROFILE iprof) { // forgive me for the messy code, quick hack to change gamma of an ICC profile to the RT standard gamma if (!iprof) { @@ -228,8 +851,8 @@ cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) } tags[tag_count]; const uint32_t gamma = 0x239; - int gamma_size = (gamma == 0 || gamma == 256) ? 12 : 14; - int data_size = (gamma_size + 3) & ~3; + int gamma_size = 14; + int data_size =(gamma_size + 3) & ~3; for (uint32_t i = 0; i < tag_count; i++) { memcpy(&tags[i], p, 12); @@ -242,7 +865,7 @@ cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) tags[i].sig != 0x67545243 && // gTRC tags[i].sig != 0x72545243 && // rTRC tags[i].sig != 0x6B545243) { // kTRC - data_size += (tags[i].size + 3) & ~3; + data_size +=(tags[i].size + 3) & ~3; } } @@ -273,7 +896,7 @@ cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) memcpy(&nd[offset + 12], &gm, 2); } - offset += (gamma_size + 3) & ~3; + offset +=(gamma_size + 3) & ~3; } tag.offset = htonl(gamma_offset); @@ -282,160 +905,115 @@ cmsHPROFILE ICCStore::makeStdGammaProfile (cmsHPROFILE iprof) tag.offset = htonl(offset); tag.size = htonl(tags[i].size); memcpy(&nd[offset], &data[tags[i].offset], tags[i].size); - offset += (tags[i].size + 3) & ~3; + offset +=(tags[i].size + 3) & ~3; } memcpy(&nd[128 + 4 + i * 12], &tag, 12); } - cmsHPROFILE oprof = cmsOpenProfileFromMem (nd, ntohl(sz)); + cmsHPROFILE oprof = cmsOpenProfileFromMem(nd, ntohl(sz)); delete [] nd; delete [] data; return oprof; } -ICCStore* ICCStore::getInstance () -{ - static ICCStore instance_; - return &instance_; -} - -ICCStore::ICCStore () : - xyz (createXYZProfile ()), - srgb (cmsCreate_sRGBProfile ()) -{ - //cmsErrorAction (LCMS_ERROR_SHOW); - - int N = sizeof(wpnames) / sizeof(wpnames[0]); - - for (int i = 0; i < N; i++) { - wProfiles[wpnames[i]] = createFromMatrix (wprofiles[i]); - wProfilesGamma[wpnames[i]] = createFromMatrix (wprofiles[i], true); - wMatrices[wpnames[i]] = wprofiles[i]; - iwMatrices[wpnames[i]] = iwprofiles[i]; - } -} - -TMatrix ICCStore::workingSpaceMatrix (const Glib::ustring& name) const +cmsHPROFILE rtengine::ICCStore::createFromMatrix(const double matrix[3][3], bool gamma, const Glib::ustring& name) { - const MatrixMap::const_iterator r = wMatrices.find (name); + static const unsigned phead[] = { + 1024, 0, 0x2100000, 0x6d6e7472, 0x52474220, 0x58595a20, 0, 0, 0, + 0x61637370, 0, 0, 0, 0, 0, 0, 0, 0xf6d6, 0x10000, 0xd32d + }; + unsigned pbody[] = { + 10, 0x63707274, 0, 36, /* cprt */ + 0x64657363, 0, 40, /* desc */ + 0x77747074, 0, 20, /* wtpt */ + 0x626b7074, 0, 20, /* bkpt */ + 0x72545243, 0, 14, /* rTRC */ + 0x67545243, 0, 14, /* gTRC */ + 0x62545243, 0, 14, /* bTRC */ + 0x7258595a, 0, 20, /* rXYZ */ + 0x6758595a, 0, 20, /* gXYZ */ + 0x6258595a, 0, 20 + }; /* bXYZ */ + static const unsigned pwhite[] = { 0xf351, 0x10000, 0x116cc };//D65 + //static const unsigned pwhite[] = { 0xf6d6, 0x10000, 0xd340 };//D50 + + // 0x63757276 : curveType, 0 : reserved, 1 : entries(1=gamma, 0=identity), 0x1000000=1.0 + unsigned pcurve[] = { 0x63757276, 0, 0, 0x1000000 }; +// unsigned pcurve[] = { 0x63757276, 0, 1, 0x1000000 }; + + if (gamma) { + pcurve[2] = 1; + // pcurve[3] = 0x1f00000;// pcurve for gamma BT709 : g=2.22 s=4.5 + // normalize gamma in RT, default(Emil's choice = sRGB) + pcurve[3] = 0x2390000;//pcurve for gamma sRGB : g:2.4 s=12.92 - if (r != wMatrices.end()) { - return r->second; } else { - return wMatrices.find ("sRGB")->second; + // lcms2 up to 2.4 has a bug with linear gamma causing precision loss(banding) + // of floating point data when a normal icc encoding of linear gamma is used + //(i e 0 table entries), but by encoding a gamma curve which is 1.0 the + // floating point path is taken within lcms2 so no precision loss occurs and + // gamma is still 1.0. + pcurve[2] = 1; + pcurve[3] = 0x1000000; //pcurve for gamma 1 } -} -TMatrix ICCStore::workingSpaceInverseMatrix (const Glib::ustring& name) const -{ + // constructing profile header + unsigned* oprof = new unsigned [phead[0] / sizeof(unsigned)]; + memset(oprof, 0, phead[0]); + memcpy(oprof, phead, sizeof(phead)); - const MatrixMap::const_iterator r = iwMatrices.find (name); + oprof[0] = 132 + 12 * pbody[0]; - if (r != iwMatrices.end()) { - return r->second; - } else { - return iwMatrices.find ("sRGB")->second; + // constructing tag directory(pointers inside the file), and types + // 0x74657874 : text + // 0x64657363 : description tag + for (unsigned int i = 0; i < pbody[0]; i++) { + oprof[oprof[0] / 4] = i ?(i > 1 ? 0x58595a20 : 0x64657363) : 0x74657874; + pbody[i * 3 + 2] = oprof[0]; + oprof[0] +=(pbody[i * 3 + 3] + 3) & -4; } -} -cmsHPROFILE ICCStore::workingSpace (const Glib::ustring& name) const -{ + memcpy(oprof + 32, pbody, sizeof(pbody)); - const ProfileMap::const_iterator r = wProfiles.find (name); + // wtpt + memcpy((char *)oprof + pbody[8] + 8, pwhite, sizeof(pwhite)); - if (r != wProfiles.end()) { - return r->second; - } else { - return wProfiles.find ("sRGB")->second; + // r/g/b TRC + for (int i = 4; i < 7; i++) { + memcpy((char *)oprof + pbody[i * 3 + 2], pcurve, sizeof(pcurve)); } -} -cmsHPROFILE ICCStore::workingSpaceGamma (const Glib::ustring& name) const -{ - - const ProfileMap::const_iterator r = wProfilesGamma.find (name); - - if (r != wProfilesGamma.end()) { - return r->second; - } else { - return wProfilesGamma.find ("sRGB")->second; - } -} - -void ICCStore::getGammaArray(const procparams::ColorManagementParams &icm, GammaValues &ga) -{ - const double eps = 0.000000001; // not divide by zero - if (!icm.freegamma) {//if Free gamma not selected - // gamma : ga[0],ga[1],ga[2],ga[3],ga[4],ga[5] by calcul - if(icm.gamma == "BT709_g2.2_s4.5") { - ga[0] = 2.22; //BT709 2.2 4.5 - my preferred as D.Coffin - ga[1] = 0.909995; - ga[2] = 0.090005; - ga[3] = 0.222222; - ga[4] = 0.081071; - } else if (icm.gamma == "sRGB_g2.4_s12.92") { - ga[0] = 2.40; //sRGB 2.4 12.92 - RT default as Lightroom - ga[1] = 0.947858; - ga[2] = 0.052142; - ga[3] = 0.077399; - ga[4] = 0.039293; - } else if (icm.gamma == "High_g1.3_s3.35") { - ga[0] = 1.3 ; //for high dynamic images - ga[1] = 0.998279; - ga[2] = 0.001721; - ga[3] = 0.298507; - ga[4] = 0.005746; - } else if (icm.gamma == "Low_g2.6_s6.9") { - ga[0] = 2.6 ; //gamma 2.6 variable : for low contrast images - ga[1] = 0.891161; - ga[2] = 0.108839; - ga[3] = 0.144928; - ga[4] = 0.076332; - } else if (icm.gamma == "standard_g2.2") { - ga[0] = 2.2; //gamma=2.2 (as gamma of Adobe, Widegamut...) - ga[1] = 1.; - ga[2] = 0.; - ga[3] = 1. / eps; - ga[4] = 0.; - } else if (icm.gamma == "standard_g1.8") { - ga[0] = 1.8; //gamma=1.8 (as gamma of Prophoto) - ga[1] = 1.; - ga[2] = 0.; - ga[3] = 1. / eps; - ga[4] = 0.; - } else /* if (icm.gamma == "linear_g1.0") */ { - ga[0] = 1.0; //gamma=1 linear : for high dynamic images (cf : D.Coffin...) - ga[1] = 1.; - ga[2] = 0.; - ga[3] = 1. / eps; - ga[4] = 0.; + // r/g/b XYZ +// pseudoinverse((double(*)[3]) out_rgb[output_color-1], inverse, 3); + for (int i = 0; i < 3; i++) + for (int j = 0; j < 3; j++) { + oprof[pbody[j * 3 + 23] / 4 + i + 2] = matrix[i][j] * 0x10000 + 0.5; +// for (num = k=0; k < 3; k++) +// num += xyzd50_srgb[i][k] * inverse[j][k]; } - ga[5] = 0.0; - ga[6] = 0.0; - } else { //free gamma selected - GammaValues g_a; //gamma parameters - double pwr = 1.0 / icm.gampos; - double ts = icm.slpos; - double slope = icm.slpos == 0 ? eps : icm.slpos; - int mode = 0, imax = 0; - Color::calcGamma(pwr, ts, mode, imax, g_a); // call to calcGamma with selected gamma and slope : return parameters for LCMS2 - ga[4] = g_a[3] * ts; - //printf("g_a.gamma0=%f g_a.gamma1=%f g_a.gamma2=%f g_a.gamma3=%f g_a.gamma4=%f\n", g_a.gamma0,g_a.gamma1,g_a.gamma2,g_a.gamma3,g_a.gamma4); - ga[0] = icm.gampos; - ga[1] = 1. / (1.0 + g_a[4]); - ga[2] = g_a[4] / (1.0 + g_a[4]); - ga[3] = 1. / slope; - ga[5] = 0.0; - ga[6] = 0.0; - //printf("ga[0]=%f ga[1]=%f ga[2]=%f ga[3]=%f ga[4]=%f\n", ga[0],ga[1],ga[2],ga[3],ga[4]); + // convert to network byte order + for (unsigned int i = 0; i < phead[0] / 4; i++) { + oprof[i] = htonl(oprof[i]); } + + // cprt + strcpy((char *)oprof + pbody[2] + 8, "--rawtherapee profile--"); + + // desc + oprof[pbody[5] / 4 + 2] = name.size() + 1; + strcpy((char *)oprof + pbody[5] + 12, name.c_str()); + + + cmsHPROFILE p = cmsOpenProfileFromMem(oprof, ntohl(oprof[0])); + delete [] oprof; + return p; } -// WARNING: the caller must lock lcmsMutex -cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParams &icm, GammaValues &ga) { +cmsHPROFILE rtengine::ICCStore::createGammaProfile(const procparams::ColorManagementParams &icm, GammaValues &ga) +{ float p[6]; //primaries ga[6] = 0.0; @@ -520,49 +1098,50 @@ cmsHPROFILE ICCStore::createGammaProfile (const procparams::ColorManagementParam // 7 parameters for smoother curves cmsFloat64Number Parameters[7] = { ga[0], ga[1], ga[2], ga[3], ga[4], ga[5], ga[6] } ; - //lcmsMutex->lock (); Mutex acquired by the caller - cmsWhitePointFromTemp(&xyD, (double)temp); + //lcmsMutex->lock(); Mutex acquired by the caller + cmsWhitePointFromTemp(&xyD,(double)temp); GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, Parameters); //5 = smoother than 4 cmsHPROFILE oprofdef = cmsCreateRGBProfile(&xyD, &Primaries, GammaTRC); //oprofdef become Outputprofile cmsFreeToneCurve(GammaTRC[0]); - //lcmsMutex->unlock (); + //lcmsMutex->unlock(); return oprofdef; } // WARNING: the caller must lock lcmsMutex -cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, GammaValues &ga) { +cmsHPROFILE rtengine::ICCStore::createCustomGammaOutputProfile(const procparams::ColorManagementParams &icm, GammaValues &ga) +{ bool pro = false; Glib::ustring outProfile; cmsHPROFILE outputProfile = nullptr; if (icm.freegamma && icm.gampos < 1.35) { pro = true; //select profil with gammaTRC modified : - } else if (icm.gamma == "linear_g1.0" || (icm.gamma == "High_g1.3_s3.35")) { + } else if (icm.gamma == "linear_g1.0" ||(icm.gamma == "High_g1.3_s3.35")) { pro = true; //pro=0 RT_sRGB || Prophoto } // Check that output profiles exist, otherwise use LCMS2 // Use the icc/icm profiles associated to possible working profiles, set in "options" - if (icm.working == "ProPhoto" && iccStore->outputProfileExist(options.rtSettings.prophoto) && !pro) { + if (icm.working == "ProPhoto" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.prophoto) && !pro) { outProfile = options.rtSettings.prophoto; - } else if (icm.working == "Adobe RGB" && iccStore->outputProfileExist(options.rtSettings.adobe) ) { + } else if (icm.working == "Adobe RGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.adobe) ) { outProfile = options.rtSettings.adobe; - } else if (icm.working == "WideGamut" && iccStore->outputProfileExist(options.rtSettings.widegamut) ) { + } else if (icm.working == "WideGamut" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.widegamut) ) { outProfile = options.rtSettings.widegamut; - } else if (icm.working == "Beta RGB" && iccStore->outputProfileExist(options.rtSettings.beta) ) { + } else if (icm.working == "Beta RGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.beta) ) { outProfile = options.rtSettings.beta; - } else if (icm.working == "BestRGB" && iccStore->outputProfileExist(options.rtSettings.best) ) { + } else if (icm.working == "BestRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.best) ) { outProfile = options.rtSettings.best; - } else if (icm.working == "BruceRGB" && iccStore->outputProfileExist(options.rtSettings.bruce) ) { + } else if (icm.working == "BruceRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.bruce) ) { outProfile = options.rtSettings.bruce; - } else if (icm.working == "sRGB" && iccStore->outputProfileExist(options.rtSettings.srgb) && !pro) { + } else if (icm.working == "sRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.srgb) && !pro) { outProfile = options.rtSettings.srgb; - } else if (icm.working == "sRGB" && iccStore->outputProfileExist(options.rtSettings.srgb10) && pro) { + } else if (icm.working == "sRGB" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.srgb10) && pro) { outProfile = options.rtSettings.srgb10; - } else if (icm.working == "ProPhoto" && iccStore->outputProfileExist(options.rtSettings.prophoto10) && pro) { + } else if (icm.working == "ProPhoto" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.prophoto10) && pro) { outProfile = options.rtSettings.prophoto10; - } else if (icm.working == "Rec2020" && iccStore->outputProfileExist(options.rtSettings.rec2020) ) { + } else if (icm.working == "Rec2020" && rtengine::ICCStore::getInstance()->outputProfileExist(options.rtSettings.rec2020) ) { outProfile = options.rtSettings.rec2020; } else { // Should not occurs @@ -579,7 +1158,7 @@ cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorMan printf("Output Gamma - profile: \"%s\"\n", outProfile.c_str() ); //c_str() } - outputProfile = iccStore->getProfile(outProfile); //get output profile + outputProfile = ICCStore::getInstance()->getProfile(outProfile); //get output profile if (outputProfile == nullptr) { @@ -627,7 +1206,7 @@ cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorMan // create description with gamma + slope + primaries std::wostringstream gammaWs; gammaWs.precision(2); - gammaWs << "Manual GammaTRC: g=" << (float)icm.gampos << " s=" << (float)icm.slpos; + gammaWs << "Manual GammaTRC: g=" <<(float)icm.gampos << " s=" <<(float)icm.slpos; cmsMLUsetWide(mlu, "en", "US", gammaWs.str().c_str()); } @@ -646,15 +1225,14 @@ cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorMan */ - cmsMLUfree (mlu); + cmsMLUfree(mlu); } // Calculate output profile's rTRC gTRC bTRC - cmsToneCurve* GammaTRC = nullptr; - GammaTRC = cmsBuildParametricToneCurve(nullptr, 5, Parameters); - cmsWriteTag(outputProfile, cmsSigRedTRCTag, (void*)GammaTRC ); - cmsWriteTag(outputProfile, cmsSigGreenTRCTag, (void*)GammaTRC ); - cmsWriteTag(outputProfile, cmsSigBlueTRCTag, (void*)GammaTRC ); + cmsToneCurve* GammaTRC = cmsBuildParametricToneCurve(nullptr, 5, Parameters); + cmsWriteTag(outputProfile, cmsSigRedTRCTag,(void*)GammaTRC ); + cmsWriteTag(outputProfile, cmsSigGreenTRCTag,(void*)GammaTRC ); + cmsWriteTag(outputProfile, cmsSigBlueTRCTag,(void*)GammaTRC ); if (GammaTRC) { cmsFreeToneCurve(GammaTRC); @@ -662,334 +1240,3 @@ cmsHPROFILE ICCStore::createCustomGammaOutputProfile (const procparams::ColorMan return outputProfile; } - -bool ICCStore::outputProfileExist (const Glib::ustring& name) const -{ - - MyMutex::MyLock lock(mutex_); - return fileProfiles.find(name) != fileProfiles.end(); -} - -cmsHPROFILE ICCStore::getProfile (const Glib::ustring& name) const -{ - - MyMutex::MyLock lock(mutex_); - - const ProfileMap::const_iterator r = fileProfiles.find (name); - - if (r != fileProfiles.end ()) { - return r->second; - } - - if (name.compare (0, 5, "file:") == 0) { - const ProfileContent content (name.substr (5)); - const cmsHPROFILE profile = content.toProfile (); - - if (profile) { - const_cast(fileProfiles).insert(std::make_pair(name, profile)); - const_cast(fileProfileContents).insert(std::make_pair(name, content)); - - return profile; - } - } - - return nullptr; -} - -cmsHPROFILE ICCStore::getStdProfile (const Glib::ustring& name) const -{ - - const Glib::ustring nameUpper = name.uppercase (); - - MyMutex::MyLock lock(mutex_); - - const ProfileMap::const_iterator r = fileStdProfiles.find (nameUpper); - - // return profile from store - if (r != fileStdProfiles.end ()) { - return r->second; - } - - // profile is not yet in store - const NameMap::const_iterator f = fileStdProfilesFileNames.find (nameUpper); - - // profile does not exist - if (f == fileStdProfilesFileNames.end ()) { - return nullptr; - } - - // but there exists one => load it - const ProfileContent content (f->second); - const cmsHPROFILE profile = content.toProfile (); - - if (profile) { - const_cast(fileStdProfiles).insert (std::make_pair (f->first, profile)); - } - - // profile is not valid or it is now stored => remove entry from fileStdProfilesFileNames - const_cast(fileStdProfilesFileNames).erase (f); - return profile; -} - -ProfileContent ICCStore::getContent (const Glib::ustring& name) const -{ - - MyMutex::MyLock lock(mutex_); - - const ContentMap::const_iterator r = fileProfileContents.find (name); - - return r != fileProfileContents.end () ? r->second : ProfileContent(); -} - -uint8_t ICCStore::getInputIntents (cmsHPROFILE profile) const -{ - MyMutex::MyLock lock (mutex_); - - return getSupportedIntents (profile, LCMS_USED_AS_INPUT); -} - -uint8_t ICCStore::getOutputIntents (cmsHPROFILE profile) const -{ - MyMutex::MyLock lock (mutex_); - - return getSupportedIntents (profile, LCMS_USED_AS_OUTPUT); -} - -uint8_t ICCStore::getProofIntents (cmsHPROFILE profile) const -{ - MyMutex::MyLock lock (mutex_); - - return getSupportedIntents (profile, LCMS_USED_AS_PROOF); -} - -// Reads all profiles from the given profiles dir -void ICCStore::init (const Glib::ustring& usrICCDir, const Glib::ustring& rtICCDir) -{ - - MyMutex::MyLock lock(mutex_); - - // RawTherapee's profiles take precedence if a user's profile of the same name exists - profilesDir = Glib::build_filename (rtICCDir, "output"); - fileProfiles.clear(); - fileProfileContents.clear(); - loadProfiles (profilesDir, &fileProfiles, &fileProfileContents, nullptr, false); - loadProfiles (usrICCDir, &fileProfiles, &fileProfileContents, nullptr, false); - - // Input profiles - // Load these to different areas, since the short name (e.g. "NIKON D700" may overlap between system/user and RT dir) - stdProfilesDir = Glib::build_filename (rtICCDir, "input"); - fileStdProfiles.clear(); - fileStdProfilesFileNames.clear(); - loadProfiles (stdProfilesDir, nullptr, nullptr, &fileStdProfilesFileNames, true); -} - -// Determine the first monitor default profile of operating system, if selected -void ICCStore::findDefaultMonitorProfile () -{ - defaultMonitorProfile.clear (); - -#ifdef WIN32 - // Get current main monitor. Could be fine tuned to get the current windows monitor (multi monitor setup), - // but problem is that we live in RTEngine with no GUI window to query around - HDC hDC = GetDC(NULL); - - if (hDC != NULL) { - if (SetICMMode(hDC, ICM_ON)) { - char profileName[MAX_PATH + 1]; - DWORD profileLength = MAX_PATH; - - if (GetICMProfileA(hDC, &profileLength, profileName)) { - defaultMonitorProfile = Glib::ustring(profileName); - defaultMonitorProfile = Glib::path_get_basename(defaultMonitorProfile); - size_t pos = defaultMonitorProfile.rfind("."); - - if (pos != Glib::ustring::npos) { - defaultMonitorProfile = defaultMonitorProfile.substr(0, pos); - } - } - - // might fail if e.g. the monitor has no profile - } - - ReleaseDC(NULL, hDC); - } - -#else -// TODO: Add other OS specific code here -#endif - - if (options.rtSettings.verbose) { - printf("Default monitor profile is: %s\n", defaultMonitorProfile.c_str()); - } -} - -ProfileContent::ProfileContent (const Glib::ustring& fileName) : data(nullptr), length(0) -{ - - FILE* f = g_fopen (fileName.c_str (), "rb"); - - if (!f) { - return; - } - - fseek (f, 0, SEEK_END); - length = ftell (f); - fseek (f, 0, SEEK_SET); - data = new char[length + 1]; - fread (data, length, 1, f); - data[length] = 0; - fclose (f); -} - -ProfileContent::ProfileContent (const ProfileContent& other) -{ - - length = other.length; - - if (other.data) { - data = new char[length + 1]; - memcpy (data, other.data, length + 1); - } else { - data = nullptr; - } -} - -ProfileContent::ProfileContent (cmsHPROFILE hProfile) : data(nullptr), length(0) -{ - - if (hProfile != nullptr) { - cmsUInt32Number bytesNeeded = 0; - cmsSaveProfileToMem(hProfile, nullptr, &bytesNeeded); - - if (bytesNeeded > 0) { - data = new char[bytesNeeded + 1]; - cmsSaveProfileToMem(hProfile, data, &bytesNeeded); - length = (int)bytesNeeded; - } - } -} - - -ProfileContent& ProfileContent::operator= (const ProfileContent& other) -{ - - length = other.length; - - delete [] data; - - if (other.data) { - data = new char[length + 1]; - memcpy (data, other.data, length + 1); - } else { - data = nullptr; - } - - return *this; -} - -cmsHPROFILE ProfileContent::toProfile () const -{ - - if (data) { - return cmsOpenProfileFromMem (data, length); - } else { - return nullptr; - } -} - -cmsHPROFILE ICCStore::createFromMatrix (const double matrix[3][3], bool gamma, const Glib::ustring& name) -{ - - static const unsigned phead[] = { - 1024, 0, 0x2100000, 0x6d6e7472, 0x52474220, 0x58595a20, 0, 0, 0, - 0x61637370, 0, 0, 0, 0, 0, 0, 0, 0xf6d6, 0x10000, 0xd32d - }; - unsigned pbody[] = { - 10, 0x63707274, 0, 36, /* cprt */ - 0x64657363, 0, 40, /* desc */ - 0x77747074, 0, 20, /* wtpt */ - 0x626b7074, 0, 20, /* bkpt */ - 0x72545243, 0, 14, /* rTRC */ - 0x67545243, 0, 14, /* gTRC */ - 0x62545243, 0, 14, /* bTRC */ - 0x7258595a, 0, 20, /* rXYZ */ - 0x6758595a, 0, 20, /* gXYZ */ - 0x6258595a, 0, 20 - }; /* bXYZ */ - static const unsigned pwhite[] = { 0xf351, 0x10000, 0x116cc };//D65 - //static const unsigned pwhite[] = { 0xf6d6, 0x10000, 0xd340 };//D50 - - // 0x63757276 : curveType, 0 : reserved, 1 : entries (1=gamma, 0=identity), 0x1000000=1.0 - unsigned pcurve[] = { 0x63757276, 0, 0, 0x1000000 }; -// unsigned pcurve[] = { 0x63757276, 0, 1, 0x1000000 }; - - if (gamma) { - pcurve[2] = 1; - // pcurve[3] = 0x1f00000;// pcurve for gamma BT709 : g=2.22 s=4.5 - // normalize gamma in RT, default (Emil's choice = sRGB) - pcurve[3] = 0x2390000;//pcurve for gamma sRGB : g:2.4 s=12.92 - - } else { - // lcms2 up to 2.4 has a bug with linear gamma causing precision loss (banding) - // of floating point data when a normal icc encoding of linear gamma is used - // (i e 0 table entries), but by encoding a gamma curve which is 1.0 the - // floating point path is taken within lcms2 so no precision loss occurs and - // gamma is still 1.0. - pcurve[2] = 1; - pcurve[3] = 0x1000000; //pcurve for gamma 1 - } - - // constructing profile header - unsigned* oprof = new unsigned [phead[0] / sizeof(unsigned)]; - memset (oprof, 0, phead[0]); - memcpy (oprof, phead, sizeof(phead)); - - oprof[0] = 132 + 12 * pbody[0]; - - // constructing tag directory (pointers inside the file), and types - // 0x74657874 : text - // 0x64657363 : description tag - for (unsigned int i = 0; i < pbody[0]; i++) { - oprof[oprof[0] / 4] = i ? (i > 1 ? 0x58595a20 : 0x64657363) : 0x74657874; - pbody[i * 3 + 2] = oprof[0]; - oprof[0] += (pbody[i * 3 + 3] + 3) & -4; - } - - memcpy (oprof + 32, pbody, sizeof(pbody)); - - // wtpt - memcpy ((char *)oprof + pbody[8] + 8, pwhite, sizeof(pwhite)); - - // r/g/b TRC - for (int i = 4; i < 7; i++) { - memcpy ((char *)oprof + pbody[i * 3 + 2], pcurve, sizeof(pcurve)); - } - - // r/g/b XYZ -// pseudoinverse ((double (*)[3]) out_rgb[output_color-1], inverse, 3); - for (int i = 0; i < 3; i++) - for (int j = 0; j < 3; j++) { - oprof[pbody[j * 3 + 23] / 4 + i + 2] = matrix[i][j] * 0x10000 + 0.5; -// for (num = k=0; k < 3; k++) -// num += xyzd50_srgb[i][k] * inverse[j][k]; - } - - // convert to network byte order - for (unsigned int i = 0; i < phead[0] / 4; i++) { - oprof[i] = htonl(oprof[i]); - } - - // cprt - strcpy ((char *)oprof + pbody[2] + 8, "--rawtherapee profile--"); - - // desc - oprof[pbody[5] / 4 + 2] = name.size() + 1; - strcpy ((char *)oprof + pbody[5] + 12, name.c_str()); - - - cmsHPROFILE p = cmsOpenProfileFromMem (oprof, ntohl(oprof[0])); - delete [] oprof; - return p; -} - -} diff --git a/rtengine/iccstore.h b/rtengine/iccstore.h index bb9693f1a..48efae087 100644 --- a/rtengine/iccstore.h +++ b/rtengine/iccstore.h @@ -16,163 +16,101 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#ifndef __ICCSTORE__ -#define __ICCSTORE__ +#pragma once + +#include +#include +#include + +#include #include -#include -#include -#include -#include -#include "procparams.h" + #include "color.h" -#include "../rtgui/threadutils.h" namespace rtengine { -typedef const double (*TMatrix)[3]; +namespace procparams +{ + + class ColorManagementParams; + +} + +typedef const double(*TMatrix)[3]; class ProfileContent { - public: - char* data; - int length; + ProfileContent(); - ProfileContent (); - ~ProfileContent (); + explicit ProfileContent(const Glib::ustring& fileName); + explicit ProfileContent(cmsHPROFILE hProfile); + cmsHPROFILE toProfile() const; - ProfileContent (const ProfileContent& other); - ProfileContent& operator= (const rtengine::ProfileContent& other); + const std::string& getData() const; - explicit ProfileContent (const Glib::ustring& fileName); - explicit ProfileContent (cmsHPROFILE hProfile); - cmsHPROFILE toProfile () const; +private: + std::string data; }; class ICCStore { - typedef std::map ProfileMap; - typedef std::map MatrixMap; - typedef std::map ContentMap; - typedef std::map NameMap; - - ProfileMap wProfiles; - ProfileMap wProfilesGamma; - MatrixMap wMatrices; - MatrixMap iwMatrices; - - // these contain profiles from user/system directory (supplied on init) - Glib::ustring profilesDir; - ProfileMap fileProfiles; - ContentMap fileProfileContents; - - // these contain standard profiles from RT. keys are all in uppercase - Glib::ustring stdProfilesDir; - NameMap fileStdProfilesFileNames; - ProfileMap fileStdProfiles; - - Glib::ustring defaultMonitorProfile; - - const cmsHPROFILE xyz; - const cmsHPROFILE srgb; - - mutable MyMutex mutex_; - - ICCStore (); - public: + enum class ProfileType { + MONITOR, + PRINTER, + OUTPUT //(actually correspond to the same profiles than with MONITOR) + }; - static ICCStore* getInstance (); + static ICCStore* getInstance(); - void init (const Glib::ustring& usrICCDir, const Glib::ustring& stdICCDir); + void init(const Glib::ustring& usrICCDir, const Glib::ustring& stdICCDir, bool loadAll); - static void getGammaArray(const procparams::ColorManagementParams &icm, GammaValues &ga); - static cmsHPROFILE makeStdGammaProfile (cmsHPROFILE iprof); - static cmsHPROFILE createFromMatrix (const double matrix[3][3], bool gamma = false, const Glib::ustring& name = Glib::ustring()); - static cmsHPROFILE createGammaProfile (const procparams::ColorManagementParams &icm, GammaValues &ga); - static cmsHPROFILE createCustomGammaOutputProfile (const procparams::ColorManagementParams &icm, GammaValues &ga); + cmsHPROFILE workingSpace(const Glib::ustring& name) const; + cmsHPROFILE workingSpaceGamma(const Glib::ustring& name) const; + TMatrix workingSpaceMatrix(const Glib::ustring& name) const; + TMatrix workingSpaceInverseMatrix(const Glib::ustring& name) const; - // Main monitors standard profile name, from OS - void findDefaultMonitorProfile (); - cmsHPROFILE getDefaultMonitorProfile () const; - Glib::ustring getDefaultMonitorProfileName () const; + bool outputProfileExist(const Glib::ustring& name) const; + cmsHPROFILE getProfile(const Glib::ustring& name) const; + cmsHPROFILE getStdProfile(const Glib::ustring& name) const; + ProfileContent getContent(const Glib::ustring& name) const; - cmsHPROFILE workingSpace (const Glib::ustring& name) const; - cmsHPROFILE workingSpaceGamma (const Glib::ustring& name) const; - TMatrix workingSpaceMatrix (const Glib::ustring& name) const; - TMatrix workingSpaceInverseMatrix (const Glib::ustring& name) const; + Glib::ustring getDefaultMonitorProfileName() const; + void setDefaultMonitorProfileName(const Glib::ustring &name); - bool outputProfileExist (const Glib::ustring& name) const; - cmsHPROFILE getProfile (const Glib::ustring& name) const; - cmsHPROFILE getStdProfile (const Glib::ustring& name) const; - ProfileContent getContent (const Glib::ustring& name) const; + cmsHPROFILE getXYZProfile() const; + cmsHPROFILE getsRGBProfile() const; - cmsHPROFILE getXYZProfile () const; - cmsHPROFILE getsRGBProfile () const; + std::vector getProfiles(ProfileType type = ProfileType::MONITOR) const; + std::vector getProfilesFromDir(const Glib::ustring& dirName) const; - std::vector getProfiles (const bool onlyRgb = false) const; - std::vector getProfilesFromDir (const Glib::ustring& dirName) const; + std::uint8_t getInputIntents(cmsHPROFILE profile) const; + std::uint8_t getOutputIntents(cmsHPROFILE profile) const; + std::uint8_t getProofIntents(cmsHPROFILE profile) const; - uint8_t getInputIntents (cmsHPROFILE profile) const; - uint8_t getOutputIntents (cmsHPROFILE profile) const; - uint8_t getProofIntents (cmsHPROFILE profile) const; + std::uint8_t getInputIntents(const Glib::ustring& name) const; + std::uint8_t getOutputIntents(const Glib::ustring& name) const; + std::uint8_t getProofIntents(const Glib::ustring& name) const; - uint8_t getInputIntents (const Glib::ustring& name) const; - uint8_t getOutputIntents (const Glib::ustring& name) const; - uint8_t getProofIntents (const Glib::ustring& name) const; + static std::vector getWorkingProfiles(); + static std::vector getGamma(); + + static void getGammaArray(const procparams::ColorManagementParams& icm, GammaValues& ga); + static cmsHPROFILE makeStdGammaProfile(cmsHPROFILE iprof); + static cmsHPROFILE createFromMatrix(const double matrix[3][3], bool gamma = false, const Glib::ustring& name = Glib::ustring()); + static cmsHPROFILE createGammaProfile(const procparams::ColorManagementParams& icm, GammaValues& ga); + static cmsHPROFILE createCustomGammaOutputProfile(const procparams::ColorManagementParams& icm, GammaValues& ga); + +private: + class Implementation; + + ICCStore(); + ~ICCStore(); + + const std::unique_ptr implementation; }; -#define iccStore ICCStore::getInstance() - -inline ProfileContent::ProfileContent () : - data(nullptr), - length(0) -{ } - -inline ProfileContent::~ProfileContent () -{ - delete [] data; -} - -inline cmsHPROFILE ICCStore::getDefaultMonitorProfile () const -{ - return getProfile (defaultMonitorProfile); -} - -inline Glib::ustring ICCStore::getDefaultMonitorProfileName () const -{ - return defaultMonitorProfile; -} - -inline uint8_t ICCStore::getInputIntents (const Glib::ustring &name) const -{ - return getInputIntents (getProfile (name)); -} - -inline uint8_t ICCStore::getOutputIntents (const Glib::ustring &name) const -{ - return getOutputIntents (getProfile (name)); -} - -inline uint8_t ICCStore::getProofIntents (const Glib::ustring &name) const -{ - return getProofIntents (getProfile (name)); -} - -inline cmsHPROFILE ICCStore::getXYZProfile () const -{ - return xyz; -} - -inline cmsHPROFILE ICCStore::getsRGBProfile () const -{ - return srgb; -} - -} - -#endif - diff --git a/rtengine/icons.cc b/rtengine/icons.cc new file mode 100644 index 000000000..2c5075007 --- /dev/null +++ b/rtengine/icons.cc @@ -0,0 +1,120 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * Copyright (c) 2011 Jean-Christophe FRISCH + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#include "icons.h" + +#include + +namespace rtengine +{ + +std::vector imagePaths; + +bool loadIconSet(const Glib::ustring& iconSet) +{ + try { + + Glib::KeyFile keyFile; + keyFile.load_from_file (iconSet); + + auto iconSetDir = keyFile.get_string ("General", "Iconset"); + + if (!iconSetDir.empty ()) { + imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "actions")); + imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir)); + imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "devices")); + imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "places")); + } + + iconSetDir = keyFile.get_string ("General", "FallbackIconset"); + + if (!iconSetDir.empty ()) { + imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "actions")); + imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir)); + imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "devices")); + imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "places")); + } + + return true; + + } catch (const Glib::Exception& exception) { + + if (options.rtSettings.verbose) { + std::cerr << "Failed to load icon set \"" << iconSet << "\": " << exception.what() << std::endl; + } + + return false; + + } +} + +Glib::ustring findIconAbsolutePath (const Glib::ustring& iconName) +{ + try { + + for (const auto& imagePath : imagePaths) { + const auto iconPath = Glib::build_filename(imagePath, iconName); + + if (Glib::file_test(iconPath, Glib::FILE_TEST_IS_REGULAR)) { + return iconPath; + } + } + + } catch(const Glib::Exception&) {} + + if (options.rtSettings.verbose) { + std::cerr << "Icon \"" << iconName << "\" could not be found!" << std::endl; + } + + return Glib::ustring(); +} + +void setPaths (const Options& options) +{ + // TODO: Forcing the Dark theme, so reading the icon set files is useless for now... + + /*Glib::ustring iconSet; + + // Either use the system icon set or the one specified in the options. + if (options.useSystemTheme) { + iconSet = Glib::build_filename (argv0, "themes", "system.iconset"); + } else { + iconSet = Glib::build_filename (argv0, "themes", options.theme + ".iconset"); + } + + imagePaths.clear (); + + if (!loadIconSet (iconSet)) { + // If the preferred icon set is unavailable, fall back to the default icon set. + loadIconSet (Glib::build_filename (argv0, "themes", "Default.iconset")); + }*/ + + imagePaths.clear (); + + imagePaths.push_back (Glib::build_filename(argv0, "images", "Dark")); + imagePaths.push_back (Glib::build_filename(argv0, "images", "Dark", "actions")); + imagePaths.push_back (Glib::build_filename(argv0, "images", "Dark", "devices")); + imagePaths.push_back (Glib::build_filename(argv0, "images", "Dark", "places")); + + // The images folder is the second fallback solution. + imagePaths.push_back (Glib::build_filename(argv0, "images")); +} + +} diff --git a/rtengine/icons.h b/rtengine/icons.h new file mode 100644 index 000000000..9f6654a9c --- /dev/null +++ b/rtengine/icons.h @@ -0,0 +1,33 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ +#ifndef _ICONS_ +#define _ICONS_ + +#include +#include "../rtgui/options.h" + +namespace rtengine +{ + +Glib::ustring findIconAbsolutePath (const Glib::ustring& iconName); +void setPaths (const Options& options); + +} + +#endif diff --git a/rtengine/iimage.h b/rtengine/iimage.h index ad053ee08..bae1e3cda 100644 --- a/rtengine/iimage.h +++ b/rtengine/iimage.h @@ -393,6 +393,9 @@ public: v(y, x) = tmp; } } +#ifdef _OPENMP + static_cast(bigImage); // to silence cppcheck warning +#endif } } @@ -477,6 +480,9 @@ public: v(i, j) = v(i, x); v(i, x) = temp; } +#ifdef _OPENMP + static_cast(bigImage); // to silence cppcheck warning +#endif } void vflip () @@ -499,6 +505,9 @@ public: v(i, j) = v(y, j); v(y, j) = temp; } +#ifdef _OPENMP + static_cast(bigImage); // to silence cppcheck warning +#endif } void calcHist(unsigned int *hist16) @@ -826,6 +835,9 @@ public: b(y, x) = tmp; } } +#ifdef _OPENMP + static_cast(bigImage); // to silence cppcheck warning +#endif } } @@ -914,6 +926,9 @@ public: b(i, j) = b(i, x); b(i, x) = temp; } +#ifdef _OPENMP + static_cast(bigImage); // to silence cppcheck warning +#endif } void vflip () @@ -944,6 +959,9 @@ public: b(i, j) = b(y, j); b(y, j) = tempB; } +#ifdef _OPENMP + static_cast(bigImage); // to silence cppcheck warning +#endif } void calcGrayscaleHist(unsigned int *hist16) @@ -1327,7 +1345,7 @@ public: b.height_ = height; #endif - abData.resize(width * height * 3); + abData.resize(width * height * 3u); if (!abData.isEmpty()) { data = abData.data; diff --git a/rtengine/image16.cc b/rtengine/image16.cc index e7f836c6b..f76aa6ca2 100644 --- a/rtengine/image16.cc +++ b/rtengine/image16.cc @@ -167,8 +167,8 @@ void Image16::getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, const P transform (pp, tran, sx1, sy1, sx2, sy2); - int imwidth = image->width; // Destination image - int imheight = image->height; // Destination image + int imwidth = image->getWidth(); // Destination image + int imheight = image->getHeight(); // Destination image if (((tran & TR_ROT) == TR_R90) || ((tran & TR_ROT) == TR_R270)) { int swap = imwidth; @@ -179,7 +179,7 @@ void Image16::getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, const P int maxx = width; // Source image int maxy = height; // Source image int mtran = tran & TR_ROT; - int skip = pp.skip; + int skip = pp.getSkip(); //if ((sx1 + skip*imwidth)>maxx) imwidth -- ; // we have a boundary condition that can cause errors diff --git a/rtengine/image8.cc b/rtengine/image8.cc index dfbb555ea..dd895ee66 100644 --- a/rtengine/image8.cc +++ b/rtengine/image8.cc @@ -67,7 +67,7 @@ void Image8::setScanline (int row, unsigned char* buffer, int bps, float *minVal switch (sampleFormat) { case (IIOSF_UNSIGNED_CHAR): - memcpy (data + row * width * 3, buffer, width * 3); + memcpy (data + row * width * 3u, buffer, width * 3); break; case (IIOSF_UNSIGNED_SHORT): { @@ -113,8 +113,8 @@ void Image8::getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, const Pr transform (pp, tran, sx1, sy1, sx2, sy2); - int imwidth = image->width; // Destination image - int imheight = image->height; // Destination image + int imwidth = image->getWidth(); // Destination image + int imheight = image->getHeight(); // Destination image if (((tran & TR_ROT) == TR_R90) || ((tran & TR_ROT) == TR_R270)) { int swap = imwidth; @@ -125,7 +125,7 @@ void Image8::getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, const Pr int maxx = width; // Source image int maxy = height; // Source image int mtran = tran & TR_ROT; - int skip = pp.skip; + int skip = pp.getSkip(); //if ((sx1 + skip*imwidth)>maxx) imwidth -- ; // we have a boundary condition that can cause errors diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index f8e257ddc..5faa6175e 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -16,9 +16,11 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ +#include +#include + #include "imagedata.h" #include "iptcpairs.h" -#include using namespace rtengine; @@ -46,8 +48,7 @@ ImageMetaData* ImageMetaData::fromFile (const Glib::ustring& fname, RawMetaDataL ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) : iso_speed(0), aperture(0.), shutter(0.) { - - size_t dotpos = fname.find_last_of ('.'); + memset (&time, 0, sizeof(time)); root = nullptr; iptc = nullptr; @@ -72,7 +73,7 @@ ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) : iso_speed( fclose (f); extractInfo (); } - } else if ((dotpos < fname.size() - 3 && !fname.casefold().compare (dotpos, 4, ".jpg")) || (dotpos < fname.size() - 4 && !fname.casefold().compare (dotpos, 5, ".jpeg"))) { + } else if (hasJpegExtension(fname)) { FILE* f = g_fopen (fname.c_str (), "rb"); if (f) { @@ -83,7 +84,7 @@ ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) : iso_speed( iptc = iptc_data_new_from_jpeg_file (ff); fclose (ff); } - } else if ((dotpos < fname.size() - 3 && !fname.casefold().compare (dotpos, 4, ".tif")) || (dotpos < fname.size() - 4 && !fname.casefold().compare (dotpos, 5, ".tiff"))) { + } else if (hasTiffExtension(fname)) { FILE* f = g_fopen (fname.c_str (), "rb"); if (f) { @@ -110,7 +111,6 @@ ImageData::ImageData (Glib::ustring fname, RawMetaDataLocation* ri) : iso_speed( orientation = "Unknown"; expcomp = 0; focal_len = 0; - memset (&time, 0, sizeof(time)); } } @@ -157,7 +157,8 @@ void ImageData::extractInfo () "SAMSUNG", "Mamiya", "MOTOROLA", - "Leaf" + "Leaf", + "Panasonic" }) { if (make.find(corp) != std::string::npos) { // Simplify company names make = corp; @@ -331,7 +332,7 @@ void ImageData::extractInfo () if (mnote->getTag ("LensData")) { std::string ldata = mnote->getTag ("LensData")->valueToString (); - int pos; + size_t pos; if (ldata.size() > 10 && (pos = ldata.find ("Lens = ")) != Glib::ustring::npos) { lens = ldata.substr (pos + 7); @@ -339,7 +340,7 @@ void ImageData::extractInfo () if (lens.compare (0, 7, "Unknown")) { lensOk = true; } else { - int pos = lens.find("$FL$"); // is there a placeholder for focallength? + size_t pos = lens.find("$FL$"); // is there a placeholder for focallength? if(pos != Glib::ustring::npos) { // then fill in focallength lens = lens.replace(pos, 4, exif->getTag ("FocalLength")->valueToString ()); @@ -361,7 +362,7 @@ void ImageData::extractInfo () if (!lensOk && mnote->getTag ("Lens")) { std::string ldata = mnote->getTag ("Lens")->valueToString (); size_t i = 0, j = 0; - double n[4]; + double n[4] = {0.0}; for (int m = 0; m < 4; m++) { while (i < ldata.size() && ldata[i] != '/') { @@ -379,7 +380,7 @@ void ImageData::extractInfo () int den = atoi(ldata.substr(j, i).c_str()); j = i + 2; i += 2; - n[m] = (double) nom / den; + n[m] = (double) nom / std::max(den,1); } std::ostringstream str; @@ -482,6 +483,17 @@ void ImageData::extractInfo () lens = eq->getTag ("LensType")->valueToString (); } } + } else if (mnote && !make.compare (0, 9, "Panasonic")) { + if (mnote->getTag ("LensType")) { + std::string panalens = mnote->getTag("LensType")->valueToString(); + + if (panalens.find("LUMIX") != Glib::ustring::npos) { + lens = "Panasonic " + panalens; + } + else { + lens = panalens; + } + } } } else if (exif->getTag ("DNGLensInfo")) { lens = exif->getTag ("DNGLensInfo")->valueToString (); @@ -566,7 +578,7 @@ std::string ImageMetaData::shutterToString (double shutter) char buffer[256]; - if (shutter > 0.0 && shutter < 0.9) { + if (shutter > 0.0 && shutter <= 0.5) { sprintf (buffer, "1/%0.0f", 1.0 / shutter); } else { sprintf (buffer, "%0.1f", shutter); diff --git a/rtengine/imagedimensions.cc b/rtengine/imagedimensions.cc index a3c22cfbc..2604114df 100644 --- a/rtengine/imagedimensions.cc +++ b/rtengine/imagedimensions.cc @@ -20,49 +20,96 @@ #include "imagedimensions.h" #include "rtengine.h" -void ImageDimensions::transform (const PreviewProps & pp, int tran, int &sx1, int &sy1, int &sx2, int &sy2) +PreviewProps::PreviewProps(int _x, int _y, int _width, int _height, int _skip) : + x(_x), + y(_y), + width(_width), + height(_height), + skip(_skip) { +} - int sw = width, sh = height; +int PreviewProps::getX() const +{ + return x; +} + +int PreviewProps::getY() const +{ + return y; +} + +int PreviewProps::getWidth() const +{ + return width; +} + +int PreviewProps::getHeight() const +{ + return height; +} + +int PreviewProps::getSkip() const +{ + return skip; +} + +void PreviewProps::set (int x, int y, int w, int h, int skip) { + this->x = x; + this->y = y; + this->width = w; + this->height = h; + this->skip = skip; +} + +ImageDimensions::ImageDimensions() : + width(-1), + height(-1) +{ +} + +void ImageDimensions::transform(const PreviewProps& pp, int tran, int& sx1, int& sy1, int& sx2, int& sy2) const +{ + int sw = width; + int sh = height; if ((tran & TR_ROT) == TR_R90 || (tran & TR_ROT) == TR_R270) { - sw = height; - sh = width; + std::swap(sw, sh); } - int ppx = pp.x, ppy = pp.y; + int ppx = pp.getX(); + int ppy = pp.getY(); if (tran & TR_HFLIP) { - ppx = sw - pp.x - pp.w; + ppx = sw - pp.getX() - pp.getWidth(); } if (tran & TR_VFLIP) { - ppy = sh - pp.y - pp.h; + ppy = sh - pp.getY() - pp.getHeight(); } sx1 = ppx; sy1 = ppy; - sx2 = ppx + pp.w; - sy2 = ppy + pp.h; + sx2 = ppx + pp.getWidth(); + sy2 = ppy + pp.getHeight(); if ((tran & TR_ROT) == TR_R180) { - sx1 = width - ppx - pp.w; - sy1 = height - ppy - pp.h; - sx2 = sx1 + pp.w; - sy2 = sy1 + pp.h; + sx1 = width - ppx - pp.getWidth(); + sy1 = height - ppy - pp.getHeight(); + sx2 = sx1 + pp.getWidth(); + sy2 = sy1 + pp.getHeight(); } else if ((tran & TR_ROT) == TR_R90) { sx1 = ppy; - sy1 = height - ppx - pp.w; - sx2 = sx1 + pp.h; - sy2 = sy1 + pp.w; + sy1 = height - ppx - pp.getWidth(); + sx2 = sx1 + pp.getHeight(); + sy2 = sy1 + pp.getWidth(); } else if ((tran & TR_ROT) == TR_R270) { - sx1 = width - ppy - pp.h; + sx1 = width - ppy - pp.getHeight(); sy1 = ppx; - sx2 = sx1 + pp.h; - sy2 = sy1 + pp.w; + sx2 = sx1 + pp.getHeight(); + sy2 = sy1 + pp.getWidth(); } - //printf ("ppx %d ppy %d ppw %d pph %d s: %d %d %d %d\n",pp.x, pp.y,pp.w,pp.h,sx1,sy1,sx2,sy2); if (sx1 < 0) { sx1 = 0; } diff --git a/rtengine/imagedimensions.h b/rtengine/imagedimensions.h index 485209844..90c002cc2 100644 --- a/rtengine/imagedimensions.h +++ b/rtengine/imagedimensions.h @@ -17,67 +17,48 @@ * along with RawTherapee. If not, see . */ -#ifndef _IMAGEDIMENSIONS_ -#define _IMAGEDIMENSIONS_ +#pragma once class PreviewProps { public: - int x, y, w, h, skip; - PreviewProps (int x, int y, int w, int h, int skip); + PreviewProps(int _x, int _y, int _width, int _height, int _skip); + int getX() const; + int getY() const; + int getWidth() const; + int getHeight() const; + int getSkip() const; void set (int x, int y, int w, int h, int skip); + +private: + int x; + int y; + int width; + int height; + int skip; }; /* - * Description of an image dimension, with getter and setter + * Description of an image dimension, with getter */ class ImageDimensions { - public: + ImageDimensions(); + + int getWidth() const + { + return width; + } + int getHeight() const + { + return height; + } + + void transform(const PreviewProps& pp, int tran, int& sx1, int& sy1, int& sx2, int& sy2) const; + +protected: int width; int height; - -public: - ImageDimensions (); - int getW (); - int getH (); - int getWidth () const; - int getHeight () const; - void transform (const PreviewProps & pp, int tran, int &sx1, int &sy1, int &sx2, int &sy2); }; - -inline PreviewProps::PreviewProps (int x, int y, int w, int h, int skip) : - x (x), y (y), w (w), h (h), skip (skip) { -} - -inline void PreviewProps::set (int x, int y, int w, int h, int skip) { - this->x = x; - this->y = y; - this->w = w; - this->h = h; - this->skip = skip; -} - -inline ImageDimensions::ImageDimensions () : - width (-1), height (-1) { -} - -inline int ImageDimensions::getW () { - return width; -} - -inline int ImageDimensions::getH () { - return height; -} - -inline int ImageDimensions::getWidth () const { - return width; -} - -inline int ImageDimensions::getHeight () const { - return height; -} - -#endif diff --git a/rtengine/imagefloat.cc b/rtengine/imagefloat.cc index 9a2e6a67f..347f97c67 100644 --- a/rtengine/imagefloat.cc +++ b/rtengine/imagefloat.cc @@ -217,7 +217,7 @@ void Imagefloat::getStdImage (ColorTemp ctemp, int tran, Imagefloat* image, cons int maxx = width; // Source image int maxy = height; // Source image int mtran = tran & TR_ROT; - int skip = pp.skip; + int skip = pp.getSkip(); // improve speed by integrating the area division into the multipliers // switched to using ints for the red/green/blue channel buffer. @@ -443,7 +443,7 @@ void Imagefloat::calcCroppedHistogram(const ProcParams ¶ms, float scale, LUT hist.clear(); // Set up factors to calc the lightness - TMatrix wprof = iccStore->workingSpaceMatrix (params.icm.working); + TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working); float facRed = wprof[1][0]; float facGreen = wprof[1][1]; @@ -461,10 +461,8 @@ void Imagefloat::calcCroppedHistogram(const ProcParams ¶ms, float scale, LUT #pragma omp for nowait for (int y = y1; y < y2; y++) { - int i; - for (int x = x1; x < x2; x++) { - i = (int)(facRed * r(y, x) + facGreen * g(y, x) + facBlue * b(y, x)); + int i = (int)(facRed * r(y, x) + facGreen * g(y, x) + facBlue * b(y, x)); if (i < 0) { i = 0; diff --git a/rtengine/imageio.cc b/rtengine/imageio.cc index e886dabce..01bbddf13 100644 --- a/rtengine/imageio.cc +++ b/rtengine/imageio.cc @@ -52,7 +52,6 @@ namespace // Opens a file for binary writing and request exclusive lock (cases were you need "wb" mode plus locking) FILE* g_fopen_withBinaryAndLock(const Glib::ustring& fname) { - FILE* f = nullptr; #ifdef WIN32 @@ -61,6 +60,7 @@ FILE* g_fopen_withBinaryAndLock(const Glib::ustring& fname) std::unique_ptr wfname (reinterpret_cast(g_utf8_to_utf16 (fname.c_str (), -1, NULL, NULL, NULL)), g_free); HANDLE hFile = CreateFileW ( wfname.get (), GENERIC_READ | GENERIC_WRITE, 0 /* no sharing allowed */, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + FILE* f = nullptr; if (hFile != INVALID_HANDLE_VALUE) { f = _fdopen (_open_osfhandle ((intptr_t)hFile, 0), "wb"); @@ -68,7 +68,7 @@ FILE* g_fopen_withBinaryAndLock(const Glib::ustring& fname) #else - f = ::g_fopen (fname.c_str (), "wb"); + FILE* f = ::g_fopen (fname.c_str (), "wb"); #endif @@ -175,7 +175,7 @@ void ImageIO::setMetadata (const rtexif::TagDirectory* eroot, const rtengine::pr iptc_data_sort (iptc); } -void ImageIO::setOutputProfile (char* pdata, int plen) +void ImageIO::setOutputProfile (const char* pdata, int plen) { delete [] profileData; @@ -216,9 +216,8 @@ int ImageIO::getPNGSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, //reading PNG header unsigned char header[8]; - fread (header, 1, 8, file); - if (png_sig_cmp (header, 0, 8)) { + if (fread (header, 1, 8, file) != 8 || png_sig_cmp (header, 0, 8)) { fclose(file); return IMIO_HEADERERROR; } @@ -295,9 +294,8 @@ int ImageIO::loadPNG (Glib::ustring fname) //reading PNG header unsigned char header[8]; - fread (header, 1, 8, file); - if (png_sig_cmp (header, 0, 8)) { + if (fread (header, 1, 8, file) != 8 || png_sig_cmp (header, 0, 8)) { fclose(file); return IMIO_HEADERERROR; } @@ -698,7 +696,7 @@ int ImageIO::getTIFFSampleFormat (Glib::ustring fname, IIOSampleFormat &sFormat, sFormat = IIOSF_HALF; return IMIO_SUCCESS; }*/ - if ((samplesperpixel == 3 || samplesperpixel == 4) && bitspersample == 32) { + if (bitspersample == 32) { sFormat = IIOSF_FLOAT; return IMIO_SUCCESS; } @@ -869,8 +867,8 @@ int ImageIO::loadTIFF (Glib::ustring fname) ); #endif - float minVal = min( min( minValue[0], minValue[1] ), minValue[2] ); - float maxVal = max( max( maxValue[0], maxValue[1] ), maxValue[2] ); + float minVal = rtengine::min(minValue[0], minValue[1], minValue[2]); + float maxVal = rtengine::max(maxValue[0], maxValue[1], maxValue[2]); normalizeFloat(minVal, maxVal); } @@ -895,7 +893,7 @@ int ImageIO::loadPPMFromMemory(const char* buffer, int width, int height, bool s char swapped[line_length]; for ( int row = 0; row < height; ++row ) { - ::swab(((char*)buffer) + (row * line_length), swapped, line_length); + ::rtengine::swab(((char*)buffer) + (row * line_length), swapped, line_length); setScanline(row, (unsigned char*)&swapped[0], bps); } } else { @@ -909,8 +907,11 @@ int ImageIO::loadPPMFromMemory(const char* buffer, int width, int height, bool s int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) { + if (getWidth() < 1 || getHeight() < 1) { + return IMIO_HEADERERROR; + } - FILE *file = g_fopen_withBinaryAndLock (fname); + FILE* const file = g_fopen_withBinaryAndLock (fname); if (!file) { return IMIO_CANNOTWRITEFILE; @@ -946,8 +947,8 @@ int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) png_set_compression_level(png, compression); - int width = getW (); - int height = getH (); + int width = getWidth (); + int height = getHeight (); if (bps < 0) { bps = getBPS (); @@ -1003,8 +1004,11 @@ int ImageIO::savePNG (Glib::ustring fname, int compression, volatile int bps) // Quality 0..100, subsampling: 1=low quality, 2=medium, 3=high int ImageIO::saveJPEG (Glib::ustring fname, int quality, int subSamp) { + if (getWidth() < 1 || getHeight() < 1) { + return IMIO_HEADERERROR; + } - FILE *file = g_fopen_withBinaryAndLock (fname); + FILE* const file = g_fopen_withBinaryAndLock (fname); if (!file) { return IMIO_CANNOTWRITEFILE; @@ -1048,8 +1052,8 @@ int ImageIO::saveJPEG (Glib::ustring fname, int quality, int subSamp) jpeg_stdio_dest (&cinfo, file); - int width = getW (); - int height = getH (); + int width = getWidth (); + int height = getHeight (); cinfo.image_width = width; cinfo.image_height = height; @@ -1190,11 +1194,14 @@ int ImageIO::saveJPEG (Glib::ustring fname, int quality, int subSamp) int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed) { + if (getWidth() < 1 || getHeight() < 1) { + return IMIO_HEADERERROR; + } //TODO: Handling 32 bits floating point output images! bool writeOk = true; - int width = getW (); - int height = getH (); + int width = getWidth (); + int height = getHeight (); if (bps < 0) { bps = getBPS (); @@ -1236,7 +1243,7 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed) // The maximum lenght is strangely not the same than for the JPEG file... // Which maximum length is the good one ? - if (size > 0 && size <= bufferSize) { + if (size > 0 && size <= static_cast(bufferSize)) { fwrite (buffer, size, 1, file); } @@ -1342,7 +1349,7 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed) } - TIFFSetField (out, TIFFTAG_SOFTWARE, "RawTherapee " VERSION); + TIFFSetField (out, TIFFTAG_SOFTWARE, "RawTherapee " RTVERSION); TIFFSetField (out, TIFFTAG_IMAGEWIDTH, width); TIFFSetField (out, TIFFTAG_IMAGELENGTH, height); TIFFSetField (out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); @@ -1441,19 +1448,11 @@ void png_flush(png_structp png_ptr) int ImageIO::load (Glib::ustring fname) { - size_t lastdot = fname.find_last_of ('.'); - - if( Glib::ustring::npos == lastdot ) { - return IMIO_FILETYPENOTSUPPORTED; - } - - if (!fname.casefold().compare (lastdot, 4, ".png")) { + if (hasPngExtension(fname)) { return loadPNG (fname); - } else if (!fname.casefold().compare (lastdot, 4, ".jpg") || - !fname.casefold().compare (lastdot, 5, ".jpeg")) { + } else if (hasJpegExtension(fname)) { return loadJPEG (fname); - } else if (!fname.casefold().compare (lastdot, 4, ".tif") || - !fname.casefold().compare (lastdot, 5, ".tiff")) { + } else if (hasTiffExtension(fname)) { return loadTIFF (fname); } else { return IMIO_FILETYPENOTSUPPORTED; @@ -1462,20 +1461,11 @@ int ImageIO::load (Glib::ustring fname) int ImageIO::save (Glib::ustring fname) { - - size_t lastdot = fname.find_last_of ('.'); - - if( Glib::ustring::npos == lastdot ) { - return IMIO_FILETYPENOTSUPPORTED; - } - - if (!fname.casefold().compare (lastdot, 4, ".png")) { + if (hasPngExtension(fname)) { return savePNG (fname); - } else if (!fname.casefold().compare (lastdot, 4, ".jpg") || - !fname.casefold().compare (lastdot, 5, ".jpeg")) { + } else if (hasJpegExtension(fname)) { return saveJPEG (fname); - } else if (!fname.casefold().compare (lastdot, 4, ".tif") || - !fname.casefold().compare (lastdot, 5, ".tiff")) { + } else if (hasTiffExtension(fname)) { return saveTIFF (fname); } else { return IMIO_FILETYPENOTSUPPORTED; diff --git a/rtengine/imageio.h b/rtengine/imageio.h index f00e05b9a..f25cb5470 100644 --- a/rtengine/imageio.h +++ b/rtengine/imageio.h @@ -176,7 +176,7 @@ public: void setMetadata (const rtexif::TagDirectory* eroot); void setMetadata (const rtexif::TagDirectory* eroot, const rtengine::procparams::ExifPairs& exif, const rtengine::procparams::IPTCPairs& iptcc); - void setOutputProfile (char* pdata, int plen); + void setOutputProfile (const char* pdata, int plen); MyMutex& mutex () { return imutex; diff --git a/rtengine/imagesource.h b/rtengine/imagesource.h index 59d46035b..0eec1325a 100644 --- a/rtengine/imagesource.h +++ b/rtengine/imagesource.h @@ -66,12 +66,12 @@ public: embProfile(nullptr), idata(nullptr), dirpyrdenoiseExpComp(INFINITY) {} virtual ~ImageSource () {} - virtual int load (const Glib::ustring &fname, bool batch = false) = 0; + virtual int load (const Glib::ustring &fname, int imageNum = 0, bool batch = false) = 0; virtual void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse, bool prepareDenoise = true) {}; virtual void demosaic (const RAWParams &raw) {}; - virtual void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &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 (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {}; - virtual void retinexPrepareBuffers (ColorManagementParams cmp, RetinexParams retinexParams, multi_array2D &conversionBuffer, LUTu &lhist16RETI) {}; + virtual void retinex (ColorManagementParams cmp, const RetinexParams &deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &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 RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {}; + virtual void retinexPrepareBuffers (ColorManagementParams cmp, const RetinexParams &retinexParams, multi_array2D &conversionBuffer, LUTu &lhist16RETI) {}; virtual void flushRawData () {}; virtual void flushRGB () {}; virtual void HLRecovery_Global (ToneCurveParams hrp) {}; @@ -80,12 +80,13 @@ public: virtual bool IsrgbSourceModified() const = 0; // tracks whether cached rgb output of demosaic has been modified + virtual void setCurrentFrame(unsigned int frameNum) = 0; + virtual int getFrameCount() = 0; + + // use right after demosaicing image, add coarse transformation and put the result in the provided Imagefloat* virtual void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hlp, const ColorManagementParams &cmp, const RAWParams &raw) = 0; - virtual eSensorType getSensorType () - { - return ST_NONE; - } + virtual eSensorType getSensorType () const = 0; // true is ready to provide the AutoWB, i.e. when the image has been demosaiced for RawImageSource virtual bool isWBProviderReady () = 0; @@ -100,7 +101,7 @@ public: } virtual void getFullSize (int& w, int& h, int tr = TR_NONE) {} - virtual void getSize (PreviewProps pp, int& w, int& h) = 0; + virtual void getSize (const PreviewProps &pp, int& w, int& h) = 0; virtual int getRotateDegree() const { return 0; @@ -157,6 +158,7 @@ public: { return this; } + virtual void getRawValues(int x, int y, int rotate, int &R, int &G, int &B) = 0; }; } #endif diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index fb6ba2db9..ab35f97c6 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -33,63 +33,64 @@ namespace rtengine extern const Settings* settings; ImProcCoordinator::ImProcCoordinator () - : orig_prev(nullptr), oprevi(nullptr), spotprevi(nullptr), oprevl(nullptr), nprevl(nullptr), previmg(nullptr), workimg(nullptr), - ncie(nullptr), imgsrc(nullptr), shmap(nullptr), lastAwbEqual(0.), ipf(¶ms, true), previewProps(-1, -1, -1, -1, 1), monitorIntent(RI_RELATIVE), - softProof(false), gamutCheck(false), scale(10), highDetailPreprocessComputed(false), highDetailRawComputed(false), - allocated(false), bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(NAN), + : orig_prev (nullptr), oprevi (nullptr), spotprevi (nullptr), oprevl (nullptr), nprevl (nullptr), previmg (nullptr), workimg (nullptr), + ncie (nullptr), imgsrc (nullptr), shmap (nullptr), lastAwbEqual (0.), lastAwbTempBias (0.0), ipf (¶ms, true), previewProps(-1, -1, -1, -1, 1), monitorIntent (RI_RELATIVE), + softProof (false), gamutCheck (false), scale (10), highDetailPreprocessComputed (false), highDetailRawComputed (false), + allocated (false), bwAutoR (-9000.f), bwAutoG (-9000.f), bwAutoB (-9000.f), CAMMean (NAN), - ctColorCurve(), - hltonecurve(65536), - shtonecurve(65536), - tonecurve(65536, 0), //,1); - lumacurve(32770, 0), // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation - chroma_acurve(65536, 0), - chroma_bcurve(65536, 0), - satcurve(65536, 0), - lhskcurve(65536, 0), - clcurve(65536, 0), - wavclCurve(65536, 0), - clToningcurve(65536, 0), - cl2Toningcurve(65536, 0), - Noisecurve(65536, 0), - NoiseCCcurve(65536, 0), - vhist16(65536), vhist16bw(65536), - lhist16CAM(65536), - lhist16CCAM(65536), + hltonecurve (65536), + shtonecurve (65536), + tonecurve (65536, 0), //,1); + lumacurve (32770, 0), // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation + chroma_acurve (65536, 0), + chroma_bcurve (65536, 0), + satcurve (65536, 0), + lhskcurve (65536, 0), + clcurve (65536, 0), + conversionBuffer (1, 1), + wavclCurve (65536, 0), + clToningcurve (65536, 0), + cl2Toningcurve (65536, 0), + Noisecurve (65536, 0), + NoiseCCcurve (65536, 0), + vhist16 (65536), vhist16bw (65536), + lhist16CAM (65536), + lhist16CCAM (65536), lhist16RETI(), - lhist16LClad(65536), - histRed(256), histRedRaw(256), - histGreen(256), histGreenRaw(256), - histBlue(256), histBlueRaw(256), - histLuma(256), - histToneCurve(256), - histToneCurveBW(256), - histLCurve(256), - histCCurve(256), - histLLCurve(256), + lhist16LClad (65536), + histRed (256), histRedRaw (256), + histGreen (256), histGreenRaw (256), + histBlue (256), histBlueRaw (256), + histLuma (256), + histToneCurve (256), + histToneCurveBW (256), + histLCurve (256), + histCCurve (256), + histLLCurve (256), - histLCAM(256), - histCCAM(256), - histClad(256), - bcabhist(256), - histChroma(256), + histLCAM (256), + histCCAM (256), + histClad (256), + bcabhist (256), + histChroma (256), - histLRETI(256), + histLRETI (256), CAMBrightCurveJ(), CAMBrightCurveQ(), rCurve(), gCurve(), bCurve(), - rcurvehist(256), rcurvehistCropped(256), rbeforehist(256), - gcurvehist(256), gcurvehistCropped(256), gbeforehist(256), - bcurvehist(256), bcurvehistCropped(256), bbeforehist(256), - fw(0), fh(0), tr(0), - fullw(1), fullh(1), - pW(-1), pH(-1), - plistener(nullptr), imageListener(nullptr), aeListener(nullptr), acListener(nullptr), abwListener(nullptr), actListener(nullptr), adnListener(nullptr), awavListener(nullptr), dehaListener(nullptr), hListener(nullptr), - resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), thread(nullptr), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), wavcontlutili(false), - butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), conversionBuffer(1, 1), colourToningSatLimit(0.f), colourToningSatLimitOpacity(0.f) + ctColorCurve(), + rcurvehist (256), rcurvehistCropped (256), rbeforehist (256), + gcurvehist (256), gcurvehistCropped (256), gbeforehist (256), + bcurvehist (256), bcurvehistCropped (256), bbeforehist (256), + fw (0), fh (0), tr (0), + fullw (1), fullh (1), + pW (-1), pH (-1), + plistener (nullptr), imageListener (nullptr), aeListener (nullptr), acListener (nullptr), abwListener (nullptr), awbListener (nullptr), frameCountListener (nullptr), imageTypeListener (nullptr), actListener (nullptr), adnListener (nullptr), awavListener (nullptr), dehaListener (nullptr), hListener (nullptr), + resultValid (false), lastOutputProfile ("BADFOOD"), lastOutputIntent (RI__COUNT), lastOutputBPC (false), thread (nullptr), changeSinceLast (0), updaterRunning (false), destroying (false), utili (false), autili (false), + butili (false), ccutili (false), cclutili (false), clcutili (false), opautili (false), wavcontlutili (false), colourToningSatLimit (0.f), colourToningSatLimitOpacity (0.f) {} void ImProcCoordinator::assign (ImageSource* imgsrc) @@ -133,7 +134,7 @@ DetailedCrop* ImProcCoordinator::createCrop (::EditDataProvider *editDataProvid void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) { - MyMutex::MyLock processingLock(mProcessing); + MyMutex::MyLock processingLock (mProcessing); int numofphases = 15; int readyphase = 0; @@ -164,15 +165,15 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) ColorManagementParams cmp = params.icm; LCurveParams lcur = params.labCurve; - if( !highDetailNeeded ) { + if ( !highDetailNeeded ) { // if below 100% magnification, take a fast path - if(rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::none] && rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::mono]) { + if (rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::none] && rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::mono]) { rp.bayersensor.method = RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::fast]; } //bayerrp.all_enhance = false; - if(rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::none] && rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::mono]) { + if (rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::none] && rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::mono]) { rp.xtranssensor.method = RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::fast]; } @@ -183,10 +184,16 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) progress ("Applying white balance, color correction & sRGB conversion...", 100 * readyphase / numofphases); + if (frameCountListener) { + frameCountListener->FrameCountChanged (imgsrc->getFrameCount(), params.raw.bayersensor.imageNum); + } + // raw auto CA is bypassed if no high detail is needed, so we have to compute it when high detail is needed if ( (todo & M_PREPROC) || (!highDetailPreprocessComputed && highDetailNeeded)) { - imgsrc->preprocess( rp, params.lensProf, params.coarse ); - imgsrc->getRAWHistogram( histRedRaw, histGreenRaw, histBlueRaw ); + imgsrc->setCurrentFrame (params.raw.bayersensor.imageNum); + + imgsrc->preprocess ( rp, params.lensProf, params.coarse ); + imgsrc->getRAWHistogram ( histRedRaw, histGreenRaw, histBlueRaw ); if (highDetailNeeded) { highDetailPreprocessComputed = true; @@ -207,6 +214,10 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) */ // If high detail (=100%) is newly selected, do a demosaic update, since the last was just with FAST + if (imageTypeListener) { + imageTypeListener->imageTypeChanged (imgsrc->isRAW(), imgsrc->getSensorType() == ST_BAYER, imgsrc->getSensorType() == ST_FUJI_XTRANS); + } + if ( (todo & M_RAW) || (!highDetailRawComputed && highDetailNeeded) || ( params.toneCurve.hrenabled && params.toneCurve.method != "Color" && imgsrc->IsrgbSourceModified()) @@ -214,13 +225,13 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) if (settings->verbose) { if (imgsrc->getSensorType() == ST_BAYER) { - printf("Demosaic Bayer image using method: %s\n", rp.bayersensor.method.c_str()); + printf ("Demosaic Bayer image n.%d using method: %s\n", rp.bayersensor.imageNum + 1, rp.bayersensor.method.c_str()); } else if (imgsrc->getSensorType() == ST_FUJI_XTRANS) { - 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()); } } - imgsrc->demosaic( rp);//enabled demosaic + imgsrc->demosaic ( rp); //enabled demosaic // if a demosaic happened we should also call getimage later, so we need to set the M_INIT flag todo |= M_INIT; @@ -231,10 +242,10 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } if (params.retinex.enabled) { - lhist16RETI(32768); + lhist16RETI (32768); lhist16RETI.clear(); - imgsrc->retinexPrepareBuffers(params.icm, params.retinex, conversionBuffer, lhist16RETI); + imgsrc->retinexPrepareBuffers (params.icm, params.retinex, conversionBuffer, lhist16RETI); } } @@ -245,12 +256,12 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) LUTf cdcurve (65536, 0); LUTf mapcurve (65536, 0); - imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, lhist16RETI, histLRETI); + imgsrc->retinexPrepareCurves (params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, lhist16RETI, histLRETI); float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI);//enabled Retinex + imgsrc->retinex ( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI); //enabled Retinex - if(dehaListener) { - dehaListener->minmaxChanged(maxCD, minCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); + if (dehaListener) { + dehaListener->minmaxChanged (maxCD, minCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); } } @@ -259,7 +270,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // It has to be done there, because the next 'if' statement will use the value computed here if (todo & M_AUTOEXP) { if (params.toneCurve.autoexp) {// this enabled HLRecovery - if (ToneCurveParams::HLReconstructionNecessary(histRedRaw, histGreenRaw, histBlueRaw) && !params.toneCurve.hrenabled) { + if (ToneCurveParams::HLReconstructionNecessary (histRedRaw, histGreenRaw, histBlueRaw) && !params.toneCurve.hrenabled) { // switching params.toneCurve.hrenabled to true -> shouting in listener's ears! params.toneCurve.hrenabled = true; @@ -270,9 +281,9 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } if (todo & (M_INIT | M_LINDENOISE)) { - MyMutex::MyLock initLock(minit); // Also used in crop window + MyMutex::MyLock initLock (minit); // Also used in crop window - imgsrc->HLRecovery_Global( params.toneCurve); // this handles Color HLRecovery + imgsrc->HLRecovery_Global ( params.toneCurve); // this handles Color HLRecovery if (settings->verbose) { @@ -284,16 +295,18 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) if (params.wb.method == "Camera") { currWB = imgsrc->getWB (); } else if (params.wb.method == "Auto") { - if (lastAwbEqual != params.wb.equal) { + if (lastAwbEqual != params.wb.equal || lastAwbTempBias != params.wb.tempBias) { double rm, gm, bm; - imgsrc->getAutoWBMultipliers(rm, gm, bm); + imgsrc->getAutoWBMultipliers (rm, gm, bm); if (rm != -1.) { - autoWB.update(rm, gm, bm, params.wb.equal); + autoWB.update (rm, gm, bm, params.wb.equal, params.wb.tempBias); lastAwbEqual = params.wb.equal; + lastAwbTempBias = params.wb.tempBias; } else { lastAwbEqual = -1.; - autoWB.useDefaults(params.wb.equal); + lastAwbTempBias = 0.0; + autoWB.useDefaults (params.wb.equal); } //double rr,gg,bb; @@ -306,13 +319,17 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) params.wb.temperature = currWB.getTemp (); params.wb.green = currWB.getGreen (); - int tr = getCoarseBitMask(params.coarse); + if (params.wb.method == "Auto" && awbListener) { + awbListener->WBChanged (params.wb.temperature, params.wb.green); + } + + int tr = getCoarseBitMask (params.coarse); imgsrc->getFullSize (fw, fh, tr); // Will (re)allocate the preview's buffers setScale (scale); - previewProps.set(0, 0, fw, fh, scale); + previewProps.set (0, 0, fw, fh, scale); // Tells to the ImProcFunctions' tools what is the preview scale, which may lead to some simplifications ipf.setScale (scale); @@ -361,7 +378,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } } */ - imgsrc->convertColorSpace(orig_prev, params.icm, currWB); + imgsrc->convertColorSpace (orig_prev, params.icm, currWB); ipf.firstAnalysis (orig_prev, params, vhist16); } @@ -372,42 +389,45 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // Remove transformation if unneeded bool needstransform = ipf.needsTransform(); - if (!needstransform && !((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) && orig_prev != oprevi) { + if (!needstransform && ! ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) && orig_prev != oprevi) { delete oprevi; spotprevi = oprevi = orig_prev; } if ((needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) ) { - if(!oprevi || oprevi == orig_prev) + if (!oprevi || oprevi == orig_prev) { spotprevi = oprevi = new Imagefloat (pW, pH); + } + if (needstransform) ipf.transform (orig_prev, oprevi, 0, 0, 0, 0, pW, pH, fw, fh, imgsrc->getMetaData()->getFocalLen(), - imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getRotateDegree(), false); - else - orig_prev->copyData(oprevi); + imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getMetaData()->getFNumber(), imgsrc->getRotateDegree(), false); + else { + orig_prev->copyData (oprevi); + } } if ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { const int W = oprevi->getWidth(); const int H = oprevi->getHeight(); - LabImage labcbdl(W, H); - ipf.rgb2lab(*oprevi, labcbdl, params.icm.working); + LabImage labcbdl (W, H); + ipf.rgb2lab (*oprevi, labcbdl, params.icm.working); ipf.dirpyrequalizer (&labcbdl, scale); - ipf.lab2rgb(labcbdl, *oprevi, params.icm.working); + ipf.lab2rgb (labcbdl, *oprevi, params.icm.working); } readyphase++; progress ("Preparing shadow/highlight map...", 100 * readyphase / numofphases); if ((todo & M_BLURMAP) && params.sh.enabled) { - double radius = sqrt (double(pW * pW + pH * pH)) / 2.0; + double radius = sqrt (double (pW * pW + pH * pH)) / 2.0; double shradius = params.sh.radius; if (!params.sh.hq) { shradius *= radius / 1800.0; } - if(!shmap) { + if (!shmap) { shmap = new SHMap (pW, pH, true); } @@ -434,13 +454,13 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) progress ("Spot Removal...", 100 * readyphase / numofphases); - if ((todo & M_SPOT) && params.spot.enabled && !params.spot.entries.empty()) { - if(spotprevi == oprevi) { + if ((todo & M_SPOT) && params.spot.enabled && !params.spot.entries.empty ()) { + if (spotprevi == oprevi) { spotprevi = new Imagefloat (pW, pH); } - oprevi->copyData(spotprevi); - ipf.removeSpots(spotprevi, params.spot.entries, previewProps); + oprevi->copyData (spotprevi); + ipf.removeSpots (spotprevi, params.spot.entries, previewProps); } else { if (spotprevi != oprevi) { delete spotprevi; @@ -469,47 +489,47 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) opautili = false; - if(params.colorToning.enabled) { - TMatrix wprof = iccStore->workingSpaceMatrix (params.icm.working); + if (params.colorToning.enabled) { + TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working); double wp[3][3] = { {wprof[0][0], wprof[0][1], wprof[0][2]}, {wprof[1][0], wprof[1][1], wprof[1][2]}, {wprof[2][0], wprof[2][1], wprof[2][2]} }; - TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params.icm.working); + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params.icm.working); double wip[3][3] = { {wiprof[0][0], wiprof[0][1], wiprof[0][2]}, {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, {wiprof[2][0], wiprof[2][1], wiprof[2][2]} }; - params.colorToning.getCurves(ctColorCurve, ctOpacityCurve, wp, wip, opautili); - CurveFactory::curveToning(params.colorToning.clcurve, clToningcurve, scale == 1 ? 1 : 16); - CurveFactory::curveToning(params.colorToning.cl2curve, cl2Toningcurve, scale == 1 ? 1 : 16); + params.colorToning.getCurves (ctColorCurve, ctOpacityCurve, wp, wip, opautili); + CurveFactory::curveToning (params.colorToning.clcurve, clToningcurve, scale == 1 ? 1 : 16); + CurveFactory::curveToning (params.colorToning.cl2curve, cl2Toningcurve, scale == 1 ? 1 : 16); } - if(params.blackwhite.enabled) { + if (params.blackwhite.enabled) { CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, vhist16bw, histToneCurveBW, beforeToneCurveBW, afterToneCurveBW, 1); } - colourToningSatLimit = float(params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; - colourToningSatLimitOpacity = 1.f - (float(params.colorToning.saturatedOpacity) / 100.f); + colourToningSatLimit = float (params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; + colourToningSatLimitOpacity = 1.f - (float (params.colorToning.saturatedOpacity) / 100.f); int satTH = 80; int satPR = 30; int indi = 0; - if(params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings + if (params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings float moyS = 0.f; float eqty = 0.f; ipf.moyeqt (spotprevi, moyS, eqty);//return image : mean saturation and standard dev of saturation //printf("moy=%f ET=%f\n", moyS,eqty); float satp = ((moyS + 1.5f * eqty) - 0.3f) / 0.7f; //1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale - if(satp >= 0.92f) { + if (satp >= 0.92f) { satp = 0.92f; //avoid values too high (out of gamut) } - if(satp <= 0.15f) { + if (satp <= 0.15f) { satp = 0.15f; //avoid too low values } @@ -522,22 +542,22 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) satPR = (int) 100.f * (moyS - 0.85f * eqty); } - if(actListener) { + if (actListener) { //if(params.blackwhite.enabled) {actListener->autoColorTonChanged(0, satTH, satPR);} - if(params.blackwhite.enabled && params.colorToning.autosat) { - actListener->autoColorTonChanged(0, satTH, satPR); //hide sliders only if autosat + if (params.blackwhite.enabled && params.colorToning.autosat) { + actListener->autoColorTonChanged (0, satTH, satPR); //hide sliders only if autosat indi = 0; } else { - if(params.colorToning.autosat) { + if (params.colorToning.autosat) { if (params.colorToning.method == "Lab") { indi = 1; - } else if(params.colorToning.method == "RGBCurves") { + } else if (params.colorToning.method == "RGBCurves") { indi = 1; - } else if(params.colorToning.method == "RGBSliders") { + } else if (params.colorToning.method == "RGBSliders") { indi = 1; - } else if(params.colorToning.method == "Splico") { + } else if (params.colorToning.method == "Splico") { indi = 2; - } else if(params.colorToning.method == "Splitlr") { + } else if (params.colorToning.method == "Splitlr") { indi = 2; } @@ -554,25 +574,25 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) double bbm = 33.; DCPProfile::ApplyState as; - DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); + DCPProfile *dcpProf = imgsrc->getDCP (params.icm, currWB, as); ipf.rgbProc (spotprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, shmap, 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) { if (settings->verbose) { - printf("ImProcCoordinator / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", bwAutoR, bwAutoG, bwAutoB); + printf ("ImProcCoordinator / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", bwAutoR, bwAutoG, bwAutoB); } abwListener->BWChanged((float) rrm, (float) ggm, (float) bbm); } - if(params.colorToning.autosat && actListener) { + if (params.colorToning.autosat && actListener) { if (settings->verbose) { - printf("ImProcCoordinator / Auto CT: indi=%d satH=%d satPR=%d\n", indi, (int)colourToningSatLimit , (int) colourToningSatLimitOpacity); + printf ("ImProcCoordinator / Auto CT: indi=%d satH=%d satPR=%d\n", indi, (int)colourToningSatLimit, (int) colourToningSatLimitOpacity); } - actListener->autoColorTonChanged(indi, (int) colourToningSatLimit, (int)colourToningSatLimitOpacity);//change sliders autosat + actListener->autoColorTonChanged (indi, (int) colourToningSatLimit, (int)colourToningSatLimitOpacity); //change sliders autosat } // correct GUI black and white with value @@ -580,20 +600,20 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // compute L channel histogram int x1, y1, x2, y2; - params.crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); + params.crop.mapToResized (pW, pH, scale, x1, x2, y1, y2); } readyphase++; if (todo & (M_LUMACURVE | M_CROP)) { - LUTu lhist16(32768); + LUTu lhist16 (32768); lhist16.clear(); #ifdef _OPENMP - const int numThreads = min(max(pW * pH / (int)lhist16.getSize(), 1), omp_get_max_threads()); + const int numThreads = min (max (pW * pH / (int)lhist16.getSize(), 1), omp_get_max_threads()); #pragma omp parallel num_threads(numThreads) if(numThreads>1) #endif { - LUTu lhist16thr(lhist16.getSize()); + LUTu lhist16thr (lhist16.getSize()); lhist16thr.clear(); #ifdef _OPENMP #pragma omp for nowait @@ -601,7 +621,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) for (int x = 0; x < pH; x++) for (int y = 0; y < pW; y++) { - int pos = (int)(oprevl->L[x][y]); + int pos = (int) (oprevl->L[x][y]); lhist16thr[pos]++; } @@ -610,29 +630,32 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) #endif lhist16 += lhist16thr; } +#ifdef _OPENMP + static_cast (numThreads); // to silence cppcheck warning +#endif CurveFactory::complexLCurve (params.labCurve.brightness, params.labCurve.contrast, params.labCurve.lcurve, lhist16, lumacurve, histLCurve, scale == 1 ? 1 : 16, utili); } if (todo & M_LUMACURVE) { - CurveFactory::curveCL(clcutili, params.labCurve.clcurve, clcurve, scale == 1 ? 1 : 16); + CurveFactory::curveCL (clcutili, params.labCurve.clcurve, clcurve, scale == 1 ? 1 : 16); CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, params.labCurve.lccurve, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, scale == 1 ? 1 : 16); } if (todo & (M_LUMINANCE + M_COLOR) ) { - nprevl->CopyFrom(oprevl); + nprevl->CopyFrom (oprevl); progress ("Applying Color Boost...", 100 * readyphase / numofphases); // ipf.MSR(nprevl, nprevl->W, nprevl->H, 1); histCCurve.clear(); histLCurve.clear(); ipf.chromiLuminanceCurve (nullptr, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); - ipf.vibrance(nprevl); + ipf.vibrance (nprevl); - if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { - ipf.EPDToneMap(nprevl, 5, 1); + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { + ipf.EPDToneMap (nprevl, 5, scale); } // for all treatments Defringe, Sharpening, Contrast detail , Microcontrast they are activated if "CIECAM" function are disabled @@ -678,8 +701,8 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } } */ - if(params.dirpyrequalizer.cbdlMethod == "aft") { - if(((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) ) { + if (params.dirpyrequalizer.cbdlMethod == "aft") { + if (((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) ) { progress ("Pyramid wavelet...", 100 * readyphase / numofphases); ipf.dirpyrequalizer (nprevl, scale); //ipf.Lanczoslab (ip_wavelet(LabImage * lab, LabImage * dst, const procparams::EqualizerParams & eqparams), nprevl, 1.f/scale); @@ -690,35 +713,35 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) wavcontlutili = false; //CurveFactory::curveWavContL ( wavcontlutili,params.wavelet.lcurve, wavclCurve, LUTu & histogramwavcl, LUTu & outBeforeWavCLurveHistogram,int skip); - 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; // WaveParams.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY); - WaveParams.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); + WaveParams.getCurves (wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); int kall = 0; progress ("Wavelet...", 100 * readyphase / numofphases); // ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, scale); - ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, scale); + ipf.ip_wavelet (nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, scale); } - if(params.colorappearance.enabled) { + if (params.colorappearance.enabled) { //L histo and Chroma histo for ciecam // histogram well be for Lab (Lch) values, because very difficult to do with J,Q, M, s, C int x1, y1, x2, y2; - params.crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); + params.crop.mapToResized (pW, pH, scale, x1, x2, y1, y2); lhist16CAM.clear(); lhist16CCAM.clear(); - if(!params.colorappearance.datacie) { + if (!params.colorappearance.datacie) { for (int x = 0; x < pH; x++) for (int y = 0; y < pW; y++) { - int pos = CLIP((int)(nprevl->L[x][y])); - int posc = CLIP((int)sqrt(nprevl->a[x][y] * nprevl->a[x][y] + nprevl->b[x][y] * nprevl->b[x][y])); + int pos = CLIP ((int) (nprevl->L[x][y])); + int posc = CLIP ((int)sqrt (nprevl->a[x][y] * nprevl->a[x][y] + nprevl->b[x][y] * nprevl->b[x][y])); lhist16CAM[pos]++; lhist16CCAM[posc]++; } @@ -733,31 +756,31 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) double fcomp = imgsrc->getMetaData()->getExpComp (); // Compensation +/- double adap; - if(fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong adap = 2000.; } else { - double E_V = fcomp + log2 (double((fnum * fnum) / fspeed / (fiso / 100.f))); + double E_V = fcomp + log2 (double ((fnum * fnum) / fspeed / (fiso / 100.f))); E_V += params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV - E_V += log2(params.raw.expos);// exposure raw white point ; log2 ==> linear to EV - adap = powf(2.f, E_V - 3.f); // cd / m2 + E_V += log2 (params.raw.expos); // exposure raw white point ; log2 ==> linear to EV + adap = powf (2.f, E_V - 3.f); // cd / m2 // end calculation adaptation scene luminosity } int begh = 0; int endh = pH; - float d; + float d, dj, yb; bool execsharp = false; - if(!ncie) { + if (!ncie) { ncie = new CieImage (pW, pH); } if (!CAMBrightCurveJ && (params.colorappearance.algo == "JC" || params.colorappearance.algo == "JS" || params.colorappearance.algo == "ALL")) { - CAMBrightCurveJ(32768, 0); + CAMBrightCurveJ (32768, 0); } if (!CAMBrightCurveQ && (params.colorappearance.algo == "QM" || params.colorappearance.algo == "ALL")) { - CAMBrightCurveQ(32768, 0); + CAMBrightCurveQ (32768, 0); } // Issue 2785, only float version of ciecam02 for navigator and pan background @@ -765,14 +788,18 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) CAMBrightCurveJ.dirty = true; CAMBrightCurveQ.dirty = true; - ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, execsharp, d, scale, 1); + ipf.ciecam_02float (ncie, float (adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, yb, 1); - if(params.colorappearance.autodegree && acListener && params.colorappearance.enabled) { - acListener->autoCamChanged(100.*(double)d); + if ((params.colorappearance.autodegree || params.colorappearance.autodegreeout) && acListener && params.colorappearance.enabled) { + acListener->autoCamChanged (100.* (double)d, 100.* (double)dj); } - if(params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) { - acListener->adapCamChanged(adap); //real value of adapt scene luminosity + if (params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) { + acListener->adapCamChanged (adap); //real value of adapt scene + } + + if (params.colorappearance.autoybscen && acListener && params.colorappearance.enabled) { + acListener->ybCamChanged ((int) yb); //real value Yb scene } readyphase++; @@ -795,11 +822,11 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } // Update the monitor color transform if necessary - if ((todo & M_MONITOR) || (lastOutputProfile!=params.icm.output) || lastOutputIntent!=params.icm.outputIntent || lastOutputBPC!=params.icm.outputBPC) { + if ((todo & M_MONITOR) || (lastOutputProfile != params.icm.output) || lastOutputIntent != params.icm.outputIntent || lastOutputBPC != params.icm.outputBPC) { lastOutputProfile = params.icm.output; lastOutputIntent = params.icm.outputIntent; lastOutputBPC = params.icm.outputBPC; - ipf.updateColorProfiles(params.icm, monitorProfile, monitorIntent, softProof, gamutCheck); + ipf.updateColorProfiles (monitorProfile, monitorIntent, softProof, gamutCheck); } // process crop, if needed @@ -811,16 +838,16 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) progress ("Conversion to RGB...", 100 * readyphase / numofphases); if ((todo != CROP && todo != MINUPDATE) || (todo & M_MONITOR)) { - MyMutex::MyLock prevImgLock(previmg->getMutex()); + MyMutex::MyLock prevImgLock (previmg->getMutex()); try { - // Computing the preview image, i.e. converting from WCS->Monitor color space (soft-proofing disabled) or WCS->Output profile->Monitor color space (soft-proofing enabled) + // Computing the preview image, i.e. converting from WCS->Monitor color space (soft-proofing disabled) or WCS->Printer profile->Monitor color space (soft-proofing enabled) ipf.lab2monitorRgb (nprevl, previmg); // Computing the internal image for analysis, i.e. conversion from WCS->Output profile delete workimg; workimg = ipf.lab2rgb (nprevl, 0, 0, pW, pH, params.icm); - } catch(char * str) { + } catch (char * str) { progress ("Error converting file...", 0); return; } @@ -846,6 +873,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) updateLRGBHistograms (); hListener->histogramChanged (histRed, histGreen, histBlue, histLuma, histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRedRaw, histGreenRaw, histBlueRaw, histChroma, histLRETI); } + } @@ -878,7 +906,7 @@ void ImProcCoordinator::freeAll () delete ncie; } - ncie = NULL; + ncie = nullptr; if (imageListener) { imageListener->delImage (previmg); @@ -888,7 +916,7 @@ void ImProcCoordinator::freeAll () delete workimg; - if(shmap) { + if (shmap) { delete shmap; } @@ -912,7 +940,7 @@ void ImProcCoordinator::setScale (int prevscale) printf ("setscale before lock\n"); } - tr = getCoarseBitMask(params.coarse); + tr = getCoarseBitMask (params.coarse); int nW, nH; imgsrc->getFullSize (fw, fh, tr); @@ -923,7 +951,7 @@ void ImProcCoordinator::setScale (int prevscale) prevscale--; PreviewProps pp (0, 0, fw, fh, prevscale); imgsrc->getSize (pp, nW, nH); - } while(nH < 400 && prevscale > 1 && (nW * nH < 1000000) ); // actually hardcoded values, perhaps a better choice is possible + } while (nH < 400 && prevscale > 1 && (nW * nH < 1000000) ); // actually hardcoded values, perhaps a better choice is possible if (settings->verbose) { printf ("setscale starts (%d, %d)\n", nW, nH); @@ -944,7 +972,7 @@ void ImProcCoordinator::setScale (int prevscale) previmg = new Image8 (pW, pH); workimg = new Image8 (pW, pH); - if(params.sh.enabled) { + if (params.sh.enabled) { shmap = new SHMap (pW, pH, true); } @@ -976,7 +1004,7 @@ void ImProcCoordinator::updateLRGBHistograms () { int x1, y1, x2, y2; - params.crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); + params.crop.mapToResized (pW, pH, scale, x1, x2, y1, y2); #pragma omp parallel sections { @@ -987,7 +1015,7 @@ void ImProcCoordinator::updateLRGBHistograms () for (int i = y1; i < y2; i++) for (int j = x1; j < x2; j++) { - histChroma[(int)(sqrtf(SQR(nprevl->a[i][j]) + SQR(nprevl->b[i][j])) / 188.f)]++; //188 = 48000/256 + histChroma[ (int) (sqrtf (SQR (nprevl->a[i][j]) + SQR (nprevl->b[i][j])) / 188.f)]++; //188 = 48000/256 } } #pragma omp section @@ -997,7 +1025,7 @@ void ImProcCoordinator::updateLRGBHistograms () for (int i = y1; i < y2; i++) for (int j = x1; j < x2; j++) { - histLuma[(int)(nprevl->L[i][j] / 128.f)]++; + histLuma[ (int) (nprevl->L[i][j] / 128.f)]++; } } #pragma omp section @@ -1034,21 +1062,23 @@ void ImProcCoordinator::progress (Glib::ustring str, int pr) }*/ } -bool ImProcCoordinator::getAutoWB (double& temp, double& green, double equal) +bool ImProcCoordinator::getAutoWB (double& temp, double& green, double equal, double tempBias) { if (imgsrc) { - if (lastAwbEqual != equal) { + if (lastAwbEqual != equal || lastAwbTempBias != tempBias) { // Issue 2500 MyMutex::MyLock lock(minit); // Also used in crop window double rm, gm, bm; - imgsrc->getAutoWBMultipliers(rm, gm, bm); + imgsrc->getAutoWBMultipliers (rm, gm, bm); if (rm != -1) { - autoWB.update(rm, gm, bm, equal); + autoWB.update (rm, gm, bm, equal, tempBias); lastAwbEqual = equal; + lastAwbTempBias = tempBias; } else { lastAwbEqual = -1.; - autoWB.useDefaults(equal); + autoWB.useDefaults (equal); + lastAwbTempBias = 0.0; } } @@ -1078,7 +1108,7 @@ void ImProcCoordinator::getSpotWB (int x, int y, int rect, double& temp, double& ColorTemp ret; { - MyMutex::MyLock lock(mProcessing); + MyMutex::MyLock lock (mProcessing); std::vector points, red, green, blue; for (int i = y - rect; i <= y + rect; i++) @@ -1088,7 +1118,7 @@ void ImProcCoordinator::getSpotWB (int x, int y, int rect, double& temp, double& ipf.transCoord (fw, fh, points, red, green, blue); - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); ret = imgsrc->getSpotWB (red, green, blue, tr, params.wb.equal); currWB = ColorTemp (params.wb.temperature, params.wb.green, params.wb.equal, params.wb.method); @@ -1109,15 +1139,15 @@ void ImProcCoordinator::getSpotWB (int x, int y, int rect, double& temp, double& void ImProcCoordinator::getAutoCrop (double ratio, int &x, int &y, int &w, int &h) { - MyMutex::MyLock lock(mProcessing); + MyMutex::MyLock lock (mProcessing); LCPMapper *pLCPMap = nullptr; if (params.lensProf.lcpFile.length() && imgsrc->getMetaData()->getFocalLen() > 0) { - LCPProfile *pLCPProf = lcpStore->getProfile(params.lensProf.lcpFile); + LCPProfile *pLCPProf = lcpStore->getProfile (params.lensProf.lcpFile); - if (pLCPProf) pLCPMap = new LCPMapper(pLCPProf, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), - 0, false, params.lensProf.useDist, fullw, fullh, params.coarse, imgsrc->getRotateDegree()); + if (pLCPProf) pLCPMap = new LCPMapper (pLCPProf, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), + 0, false, params.lensProf.useDist, fullw, fullh, params.coarse, imgsrc->getRotateDegree()); } double fillscale = ipf.getTransformAutoFill (fullw, fullh, pLCPMap); @@ -1166,11 +1196,11 @@ void ImProcCoordinator::getSoftProofing (bool &softProof, bool &gamutCheck) void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool apply_wb) { - MyMutex::MyLock lock(mProcessing); + MyMutex::MyLock lock (mProcessing); int fW, fH; - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); imgsrc->getFullSize (fW, fH, tr); PreviewProps pp (0, 0, fW, fH, 1); @@ -1178,23 +1208,25 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool ppar.toneCurve.hrenabled = false; ppar.icm.input = "(none)"; Imagefloat* im = new Imagefloat (fW, fH); - imgsrc->preprocess( ppar.raw, ppar.lensProf, ppar.coarse ); - imgsrc->demosaic(ppar.raw ); + imgsrc->preprocess ( ppar.raw, ppar.lensProf, ppar.coarse ); + imgsrc->demosaic (ppar.raw ); ColorTemp currWB = ColorTemp (params.wb.temperature, params.wb.green, params.wb.equal, params.wb.method); if (params.wb.method == "Camera") { currWB = imgsrc->getWB (); } else if (params.wb.method == "Auto") { - if (lastAwbEqual != params.wb.equal) { + if (lastAwbEqual != params.wb.equal || lastAwbTempBias != params.wb.tempBias) { double rm, gm, bm; - imgsrc->getAutoWBMultipliers(rm, gm, bm); + imgsrc->getAutoWBMultipliers (rm, gm, bm); if (rm != -1.) { - autoWB.update(rm, gm, bm, params.wb.equal); + autoWB.update (rm, gm, bm, params.wb.equal, params.wb.tempBias); lastAwbEqual = params.wb.equal; + lastAwbTempBias = params.wb.tempBias; } else { lastAwbEqual = -1.; - autoWB.useDefaults(params.wb.equal); + lastAwbTempBias = 0.0; + autoWB.useDefaults (params.wb.equal); } } @@ -1211,7 +1243,7 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool if (ipf.needsTransform()) { Imagefloat* trImg = new Imagefloat (fW, fH); ipf.transform (im, trImg, 0, 0, 0, 0, fW, fH, fW, fH, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), - imgsrc->getMetaData()->getFocusDist(), imgsrc->getRotateDegree(), true); + imgsrc->getMetaData()->getFocusDist(), imgsrc->getMetaData()->getFNumber(), imgsrc->getRotateDegree(), true); delete im; im = trImg; } @@ -1226,9 +1258,9 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool for (int i = cy; i < cy + ch; i++) { for (int j = cx; j < cx + cw; j++) { - tmpim->r(i - cy, j - cx) = im->r(i, j); - tmpim->g(i - cy, j - cx) = im->g(i, j); - tmpim->b(i - cy, j - cx) = im->b(i, j); + tmpim->r (i - cy, j - cx) = im->r (i, j); + tmpim->g (i - cy, j - cx) = im->g (i, j); + tmpim->b (i - cy, j - cx) = im->b (i, j); } } @@ -1239,11 +1271,11 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool // image may contain out of range samples, clip them to avoid wrap-arounds #pragma omp parallel for - for(int i = 0; i < im->height; i++) { - for(int j = 0; j < im->width; j++) { - im->r(i, j) = CLIP(im->r(i, j)); - im->g(i, j) = CLIP(im->g(i, j)); - im->b(i, j) = CLIP(im->b(i, j)); + for (int i = 0; i < im->getHeight(); i++) { + for (int j = 0; j < im->getWidth(); j++) { + im->r (i, j) = CLIP (im->r (i, j)); + im->g (i, j) = CLIP (im->g (i, j)); + im->b (i, j) = CLIP (im->b (i, j)); } } @@ -1251,7 +1283,7 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool delete im; int imw, imh; - double tmpScale = ipf.resizeScale(¶ms, fW, fH, imw, imh); + double tmpScale = ipf.resizeScale (¶ms, fW, fH, imw, imh); if (tmpScale != 1.0) { Image16* tempImage = new Image16 (imw, imh); @@ -1297,13 +1329,13 @@ void ImProcCoordinator::startProcessing () //batchThread->yield(); //the running batch should wait other threads to avoid conflict - thread = Glib::Thread::create(sigc::mem_fun(*this, &ImProcCoordinator::process), 0, true, true, Glib::THREAD_PRIORITY_NORMAL); + thread = Glib::Thread::create (sigc::mem_fun (*this, &ImProcCoordinator::process), 0, true, true, Glib::THREAD_PRIORITY_NORMAL); } } } -void ImProcCoordinator::startProcessing(int changeCode) +void ImProcCoordinator::startProcessing (int changeCode) { paramsUpdateMutex.lock(); changeSinceLast |= changeCode; @@ -1351,7 +1383,7 @@ ProcParams* ImProcCoordinator::beginUpdateParams () void ImProcCoordinator::endUpdateParams (ProcEvent change) { - endUpdateParams( refreshmap[(int)change] ); + endUpdateParams ( refreshmap[ (int)change] ); } void ImProcCoordinator::endUpdateParams (int changeFlags) diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 39be5df4d..9c1c0c9a2 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -70,6 +70,7 @@ protected: ColorTemp autoWB; double lastAwbEqual; + double lastAwbTempBias; ImProcFunctions ipf; PreviewProps previewProps; @@ -158,6 +159,10 @@ protected: AutoExpListener* aeListener; AutoCamListener* acListener; AutoBWListener* abwListener; + AutoWBListener* awbListener; + FrameCountListener *frameCountListener; + ImageTypeListener *imageTypeListener; + AutoColorTonListener* actListener; AutoChromaListener* adnListener; WaveletListener* awavListener; @@ -220,7 +225,7 @@ public: *dst = params; } - void startProcessing(int changeCode); + void startProcessing (int changeCode); ProcParams* beginUpdateParams (); void endUpdateParams (ProcEvent change); // must be called after beginUpdateParams, triggers update void endUpdateParams (int changeFlags); @@ -258,7 +263,7 @@ public: DetailedCrop* createCrop (::EditDataProvider *editDataProvider, bool isDetailWindow); - bool getAutoWB (double& temp, double& green, double equal); + bool getAutoWB (double& temp, double& green, double equal, double tempBias); void getCamWB (double& temp, double& green); void getSpotWB (int x, int y, int rectSize, double& temp, double& green); void getAutoCrop (double ratio, int &x, int &y, int &w, int &h); @@ -301,7 +306,7 @@ public: { aeListener = ael; } - void setHistogramListener(HistogramListener *h) + void setHistogramListener (HistogramListener *h) { hListener = h; } @@ -313,6 +318,10 @@ public: { abwListener = abw; } + void setAutoWBListener (AutoWBListener* awb) + { + awbListener = awb; + } void setAutoColorTonListener (AutoColorTonListener* bwct) { actListener = bwct; @@ -330,6 +339,16 @@ public: awavListener = awa; } + void setFrameCountListener (FrameCountListener* fcl) + { + frameCountListener = fcl; + } + + void setImageTypeListener (ImageTypeListener* itl) + { + imageTypeListener = itl; + } + void saveInputICCReference (const Glib::ustring& fname, bool apply_wb); InitialImage* getInitialImage () @@ -338,7 +357,7 @@ public: } struct DenoiseInfoStore { - DenoiseInfoStore () : chM(0), max_r{}, max_b{}, ch_M{}, valid(false) {} + DenoiseInfoStore () : chM (0), max_r{}, max_b{}, ch_M{}, valid (false) {} float chM; float max_r[9]; float max_b[9]; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 3e0433197..6d6fccc88 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -68,7 +68,7 @@ void ImProcFunctions::setScale (double iscale) scale = iscale; } -void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck) +void ImProcFunctions::updateColorProfiles (const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck) { // set up monitor transform if (monitorTransform) { @@ -77,51 +77,51 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con monitorTransform = nullptr; -#if !defined(__APPLE__) // No support for monitor profiles on OS X, all data is sRGB + cmsHPROFILE monitor = nullptr; - cmsHPROFILE monitor = iccStore->getProfile (monitorProfile); + if (!monitorProfile.empty()) { +#if !defined(__APPLE__) // No support for monitor profiles on OS X, all data is sRGB + monitor = ICCStore::getInstance()->getProfile (monitorProfile); +#else + monitor = ICCStore::getInstance()->getProfile ("RT_sRGB"); +#endif + } if (monitor) { MyMutex::MyLock lcmsLock (*lcmsMutex); cmsUInt32Number flags; - cmsHPROFILE iprof = cmsCreateLab4Profile(nullptr); + cmsHPROFILE iprof = cmsCreateLab4Profile (nullptr); bool softProofCreated = false; if (softProof) { cmsHPROFILE oprof = nullptr; - if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - GammaValues ga; - iccStore->getGammaArray(icm, ga); - oprof = iccStore->createGammaProfile (icm, ga); - } - else if (!icm.output.empty() && icm.output != ColorManagementParams::NoICMString) { - if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - GammaValues ga; - iccStore->getGammaArray(icm, ga); - oprof = iccStore->createCustomGammaOutputProfile (icm, ga); - } else { - oprof = iccStore->getProfile(icm.output); - } + + if (!settings->printerProfile.empty()) { + oprof = ICCStore::getInstance()->getProfile (settings->printerProfile); } if (oprof) { // NOCACHE is for thread safety, NOOPTIMIZE for precision flags = cmsFLAGS_SOFTPROOFING | cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; - if (icm.outputBPC) { + + if (settings->printerBPC) { flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; } + if (gamutCheck) { flags |= cmsFLAGS_GAMUTCHECK; } - monitorTransform = cmsCreateProofingTransform( - iprof, TYPE_Lab_FLT, - monitor, TYPE_RGB_8, - oprof, - monitorIntent, icm.outputIntent, - flags - ); + + monitorTransform = cmsCreateProofingTransform ( + iprof, TYPE_Lab_FLT, + monitor, TYPE_RGB_8, + oprof, + monitorIntent, settings->printerIntent, + flags + ); + if (monitorTransform) { softProofCreated = true; } @@ -130,42 +130,42 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con if (!softProofCreated) { flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; + if (settings->monitorBPC) { flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; } + monitorTransform = cmsCreateTransform (iprof, TYPE_Lab_FLT, monitor, TYPE_RGB_8, monitorIntent, flags); } - cmsCloseProfile(iprof); + cmsCloseProfile (iprof); } - -#endif } void ImProcFunctions::firstAnalysis (const Imagefloat* const original, const ProcParams ¶ms, LUTu & histogram) { - TMatrix wprof = iccStore->workingSpaceMatrix (params.icm.working); + TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working); lumimul[0] = wprof[1][0]; lumimul[1] = wprof[1][1]; lumimul[2] = wprof[1][2]; - int W = original->width; - int H = original->height; + int W = original->getWidth(); + int H = original->getHeight(); - float lumimulf[3] = {static_cast(lumimul[0]), static_cast(lumimul[1]), static_cast(lumimul[2])}; + float lumimulf[3] = {static_cast (lumimul[0]), static_cast (lumimul[1]), static_cast (lumimul[2])}; // calculate histogram of the y channel needed for contrast curve calculation in exposure adjustments histogram.clear(); - if(multiThread) { + if (multiThread) { #ifdef _OPENMP - const int numThreads = min(max(W * H / (int)histogram.getSize(), 1), omp_get_max_threads()); + const int numThreads = min (max (W * H / (int)histogram.getSize(), 1), omp_get_max_threads()); #pragma omp parallel num_threads(numThreads) if(numThreads>1) #endif { - LUTu hist(histogram.getSize()); + LUTu hist (histogram.getSize()); hist.clear(); #ifdef _OPENMP #pragma omp for nowait @@ -174,9 +174,9 @@ void ImProcFunctions::firstAnalysis (const Imagefloat* const original, const Pro for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { - float r = original->r(i, j); - float g = original->g(i, j); - float b = original->b(i, j); + float r = original->r (i, j); + float g = original->g (i, j); + float b = original->b (i, j); int y = (lumimulf[0] * r + lumimulf[1] * g + lumimulf[2] * b); hist[y]++; @@ -189,13 +189,16 @@ void ImProcFunctions::firstAnalysis (const Imagefloat* const original, const Pro histogram += hist; } +#ifdef _OPENMP + static_cast (numThreads); // to silence cppcheck warning +#endif } else { for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { - float r = original->r(i, j); - float g = original->g(i, j); - float b = original->b(i, j); + float r = original->r (i, j); + float g = original->g (i, j); + float b = original->b (i, j); int y = (lumimulf[0] * r + lumimulf[1] * g + lumimulf[2] * b); histogram[y]++; @@ -205,13 +208,13 @@ void ImProcFunctions::firstAnalysis (const Imagefloat* const original, const Pro } // Copyright (c) 2012 Jacques Desmis -void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params , +void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve2, const ColorAppearance & customColCurve3, - LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, int scalecd, int rtt) + LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, double &yb, int rtt) { - if(params->colorappearance.enabled) { + if (params->colorappearance.enabled) { //int lastskip; -//if(rtt==1) {lastskip=scalecd;} //not for Rtthumbnail +//if(rtt==1) {lastskip=scale;} //not for Rtthumbnail #ifdef _DEBUG MyTime t1e, t2e; @@ -220,43 +223,39 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh LUTf dLcurve; LUTu hist16JCAM; bool jp = false; - float val; //preparate for histograms CIECAM - if(pW != 1) { //only with improccoordinator - dLcurve(65536, 0); + if (pW != 1) { //only with improccoordinator + dLcurve (65536, 0); dLcurve.clear(); - hist16JCAM(65536, 0); + hist16JCAM (65536, 0); hist16JCAM.clear(); for (int i = 0; i < 32768; i++) { //# 32768*1.414 approximation maxi for chroma - val = (double)i / 32767.0; - dLcurve[i] = CLIPD(val); + float val = (double)i / 32767.0; + dLcurve[i] = CLIPD (val); } } LUTf dCcurve; LUTu hist16_CCAM; bool chropC = false; - float valc; - if(pW != 1) { //only with improccoordinator - dCcurve(65536, 0); - hist16_CCAM(65536); + if (pW != 1) { //only with improccoordinator + dCcurve (65536, 0); + hist16_CCAM (65536); hist16_CCAM.clear(); for (int i = 0; i < 48000; i++) { //# 32768*1.414 approximation maxi for chroma - valc = (double)i / 47999.0; - dCcurve[i] = CLIPD(valc); + float valc = (double)i / 47999.0; + dCcurve[i] = CLIPD (valc); } } //end preparate histogram int width = lab->W, height = lab->H; float minQ = 10000.f; - float minM = 10000.f; float maxQ = -1000.f; - float maxM = -1000.f; float w_h; float a_w; float c_; @@ -264,9 +263,13 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double Yw; Yw = 1.0; double Xw, Zw; - double f, c, nc, yb, la, xw, yw, zw, f2, c2, nc2, yb2, la2; + double Xwout, Zwout; + double Xwsc, Zwsc; + + double f = 0., c = 0., nc = 0., yb = 0., la, xw, yw, zw, f2 = 0., c2 = 0., nc2 = 0., yb2 = 0., la2; double fl, n, nbb, ncb, aw; - double xwd, ywd, zwd; + double xwd = 0., ywd, zwd = 0.; + double xws, yws, zws; int alg = 0; bool algepd = false; float sum = 0.f; @@ -274,121 +277,153 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh bool ciedata = params->colorappearance.datacie; ColorTemp::temp2mulxyz (params->wb.temperature, params->wb.green, params->wb.method, Xw, Zw); //compute white Xw Yw Zw : white current WB + ColorTemp::temp2mulxyz (params->colorappearance.tempout, params->colorappearance.greenout, "Custom", Xwout, Zwout); + ColorTemp::temp2mulxyz (params->colorappearance.tempsc, params->colorappearance.greensc, "Custom", Xwsc, Zwsc); - //viewing condition for surround - if(params->colorappearance.surround == "Average") { + //viewing condition for surrsrc + if (params->colorappearance.surrsrc == "Average") { f = 1.00; c = 0.69; nc = 1.00; + } else if (params->colorappearance.surrsrc == "Dim") { + f = 0.9; + c = 0.59; + nc = 0.9; + } else if (params->colorappearance.surrsrc == "Dark") { + f = 0.8; + c = 0.525; + nc = 0.8; + } else if (params->colorappearance.surrsrc == "ExtremelyDark") { + f = 0.8; + c = 0.41; + nc = 0.8; + } + + + //viewing condition for surround + if (params->colorappearance.surround == "Average") { f2 = 1.0, c2 = 0.69, nc2 = 1.0; - } else if(params->colorappearance.surround == "Dim") { + } else if (params->colorappearance.surround == "Dim") { f2 = 0.9; c2 = 0.59; nc2 = 0.9; - f = 1.0, c = 0.69, nc = 1.0; - } else if(params->colorappearance.surround == "Dark") { + } else if (params->colorappearance.surround == "Dark") { f2 = 0.8; c2 = 0.525; nc2 = 0.8; - f = 1.0, c = 0.69, nc = 1.0; - } else if(params->colorappearance.surround == "ExtremelyDark") { + } else if (params->colorappearance.surround == "ExtremelyDark") { f2 = 0.8; c2 = 0.41; nc2 = 0.8; - f = 1.0, c = 0.69, nc = 1.0; - } - - //scene condition for surround - if(params->colorappearance.surrsource) { - f = 0.85; // if user => source image has surround very dark - c = 0.55; - nc = 0.85; } + /* + //scene condition for surround + if (params->colorappearance.surrsource) { + f = 0.85; // if user => source image has surround very dark + c = 0.55; + nc = 0.85; + } + */ //with which algorithme if (params->colorappearance.algo == "JC") { alg = 0; - } else if(params->colorappearance.algo == "JS") { + } else if (params->colorappearance.algo == "JS") { alg = 1; - } else if(params->colorappearance.algo == "QM") { + } else if (params->colorappearance.algo == "QM") { alg = 2; algepd = true; - } else if(params->colorappearance.algo == "ALL") { + } else if (params->colorappearance.algo == "ALL") { alg = 3; algepd = true; } bool needJ = (alg == 0 || alg == 1 || alg == 3); bool needQ = (alg == 2 || alg == 3); + /* + //settings white point of output device - or illuminant viewing + if (settings->viewingdevice == 0) { + xwd = 96.42; //5000K + ywd = 100.0; + zwd = 82.52; + } else if (settings->viewingdevice == 1) { + xwd = 95.68; //5500 + ywd = 100.0; + zwd = 92.15; + } else if (settings->viewingdevice == 2) { + xwd = 95.24; //6000 + ywd = 100.0; + zwd = 100.81; + } else if (settings->viewingdevice == 3) { + xwd = 95.04; //6500 + ywd = 100.0; + zwd = 108.88; + } else if (settings->viewingdevice == 4) { + xwd = 109.85; //tungsten + ywd = 100.0; + zwd = 35.58; + } else if (settings->viewingdevice == 5) { + xwd = 99.18; //fluo F2 + ywd = 100.0; + zwd = 67.39; + } else if (settings->viewingdevice == 6) { + xwd = 95.04; //fluo F7 + ywd = 100.0; + zwd = 108.75; + } else if (settings->viewingdevice == 7) { + xwd = 100.96; //fluo F11 + ywd = 100.0; + zwd = 64.35; + } + */ - //settings white point of output device - or illuminant viewing - if(settings->viewingdevice == 0) { - xwd = 96.42; //5000K - ywd = 100.0; - zwd = 82.52; - } else if(settings->viewingdevice == 1) { - xwd = 95.68; //5500 - ywd = 100.0; - zwd = 92.15; - } else if(settings->viewingdevice == 2) { - xwd = 95.24; //6000 - ywd = 100.0; - zwd = 100.81; - } else if(settings->viewingdevice == 3) { - xwd = 95.04; //6500 - ywd = 100.0; - zwd = 108.88; - } else if(settings->viewingdevice == 4) { - xwd = 109.85; //tungsten - ywd = 100.0; - zwd = 35.58; - } else if(settings->viewingdevice == 5) { - xwd = 99.18; //fluo F2 - ywd = 100.0; - zwd = 67.39; - } else if(settings->viewingdevice == 6) { - xwd = 95.04; //fluo F7 - ywd = 100.0; - zwd = 108.75; - } else if(settings->viewingdevice == 7) { - xwd = 100.96; //fluo F11 - ywd = 100.0; - zwd = 64.35; - } + xwd = 100. * Xwout; + zwd = 100. * Zwout; + ywd = 100. / params->colorappearance.greenout;//approximation to simplify + xws = 100. * Xwsc; + zws = 100. * Zwsc; + yws = 100. / params->colorappearance.greensc;//approximation to simplify - //settings mean Luminance Y of output device or viewing - if(settings->viewingdevicegrey == 0) { - yb2 = 5.0; - } else if(settings->viewingdevicegrey == 1) { - yb2 = 10.0; - } else if(settings->viewingdevicegrey == 2) { - yb2 = 15.0; - } else if(settings->viewingdevicegrey == 3) { - yb2 = 18.0; - } else if(settings->viewingdevicegrey == 4) { - yb2 = 23.0; - } else if(settings->viewingdevicegrey == 5) { - yb2 = 30.0; - } else if(settings->viewingdevicegrey == 6) { - yb2 = 40.0; - } + /* + //settings mean Luminance Y of output device or viewing + if (settings->viewingdevicegrey == 0) { + yb2 = 5.0; + } else if (settings->viewingdevicegrey == 1) { + yb2 = 10.0; + } else if (settings->viewingdevicegrey == 2) { + yb2 = 15.0; + } else if (settings->viewingdevicegrey == 3) { + yb2 = 18.0; + } else if (settings->viewingdevicegrey == 4) { + yb2 = 23.0; + } else if (settings->viewingdevicegrey == 5) { + yb2 = 30.0; + } else if (settings->viewingdevicegrey == 6) { + yb2 = 40.0; + } + */ + yb2 = params->colorappearance.ybout; //La and la2 = ambiant luminosity scene and viewing - la = double(params->colorappearance.adapscen); + la = double (params->colorappearance.adapscen); - if(pwb == 2) { - if(params->colorappearance.autoadapscen) { + if (pwb == 2) { + if (params->colorappearance.autoadapscen) { la = adap; } } - la2 = double(params->colorappearance.adaplum); + la2 = double (params->colorappearance.adaplum); // level of adaptation double deg = (params->colorappearance.degree) / 100.0; double pilot = params->colorappearance.autodegree ? 2.0 : deg; + + const float degout = (params->colorappearance.degreeout) / 100.0; + const float pilotout = params->colorappearance.autodegreeout ? 2.0 : degout; + //algoritm's params float jli = params->colorappearance.jlight; float chr = params->colorappearance.chroma; @@ -400,20 +435,20 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh float hue = params->colorappearance.colorh; double rstprotection = 100. - params->colorappearance.rstprotection; - if(schr > 0.0) { + if (schr > 0.0) { schr = schr / 2.0f; //divide sensibility for saturation } // extracting datas from 'params' to avoid cache flush (to be confirmed) ColorAppearanceParams::eTCModeId curveMode = params->colorappearance.curveMode; ColorAppearanceParams::eTCModeId curveMode2 = params->colorappearance.curveMode2; - bool hasColCurve1 = bool(customColCurve1); - bool hasColCurve2 = bool(customColCurve2); + bool hasColCurve1 = bool (customColCurve1); + bool hasColCurve2 = bool (customColCurve2); ColorAppearanceParams::eCTCModeId curveMode3 = params->colorappearance.curveMode3; - bool hasColCurve3 = bool(customColCurve3); + bool hasColCurve3 = bool (customColCurve3); - if(CAMBrightCurveJ.dirty || CAMBrightCurveQ.dirty) { + if (CAMBrightCurveJ.dirty || CAMBrightCurveQ.dirty) { LUTu hist16J; LUTu hist16Q; @@ -437,34 +472,34 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh if (currL > 95.) { koef = 1.f; - } else if(currL > 85.) { + } else if (currL > 85.) { koef = 0.97f; - } else if(currL > 80.) { + } else if (currL > 80.) { koef = 0.93f; - } else if(currL > 70.) { + } else if (currL > 70.) { koef = 0.87f; - } else if(currL > 60.) { + } else if (currL > 60.) { koef = 0.85f; - } else if(currL > 50.) { + } else if (currL > 50.) { koef = 0.8f; - } else if(currL > 40.) { + } else if (currL > 40.) { koef = 0.75f; - } else if(currL > 30.) { + } else if (currL > 30.) { koef = 0.7f; - } else if(currL > 20.) { + } else if (currL > 20.) { koef = 0.7f; - } else if(currL > 10.) { + } else if (currL > 10.) { koef = 0.9f; - } else if(currL > 0.) { + } else if (currL > 0.) { koef = 1.0f; } if (needJ) { - hist16J[CLIP((int)((koef * lab->L[i][j])))]++; //evaluate histogram luminance L # J + hist16J[CLIP ((int) ((koef * lab->L[i][j])))]++; //evaluate histogram luminance L # J } if (needQ) { - hist16Q[CLIP((int) (32768.f * sqrt((koef * (lab->L[i][j])) / 32768.f)))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L + hist16Q[CLIP ((int) (32768.f * sqrt ((koef * (lab->L[i][j])) / 32768.f)))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L } sum += koef * lab->L[i][j]; //evaluate mean J to calcualte Yb @@ -476,7 +511,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh //evaluate lightness, contrast if (needJ) { if (!CAMBrightCurveJ) { - CAMBrightCurveJ(65536, 0); + CAMBrightCurveJ (65536, 0); CAMBrightCurveJ.dirty = false; } @@ -485,7 +520,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh if (needQ) { if (!CAMBrightCurveQ) { - CAMBrightCurveQ(65536, 0); + CAMBrightCurveQ (65536, 0); CAMBrightCurveQ.dirty = false; } @@ -493,79 +528,90 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } } - if(settings->viewinggreySc == 0) { //auto + // if (settings->viewinggreySc == 0) { //auto + if (params->colorappearance.autoybscen && pwb == 2) {//auto + if (mean < 15.f) { yb = 3.0; - } else if(mean < 30.f) { + } else if (mean < 30.f) { yb = 5.0; - } else if(mean < 40.f) { + } else if (mean < 40.f) { yb = 10.0; - } else if(mean < 45.f) { + } else if (mean < 45.f) { yb = 15.0; - } else if(mean < 50.f) { + } else if (mean < 50.f) { yb = 18.0; - } else if(mean < 55.f) { + } else if (mean < 55.f) { yb = 23.0; - } else if(mean < 60.f) { + } else if (mean < 60.f) { yb = 30.0; - } else if(mean < 70.f) { + } else if (mean < 70.f) { yb = 40.0; - } else if(mean < 80.f) { + } else if (mean < 80.f) { yb = 60.0; - } else if(mean < 90.f) { + } else if (mean < 90.f) { yb = 80.0; } else { yb = 90.0; } + } else { + yb = params->colorappearance.ybscen; } - if(settings->viewinggreySc == 1) { + if (settings->viewinggreySc == 1) { yb = 18.0; } int gamu = 0; bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated - if(params->colorappearance.gamut) { + if (params->colorappearance.gamut) { gamu = 1; //enabled gamut control } xw = 100.0 * Xw; yw = 100.0 * Yw; zw = 100.0 * Zw; - double xw1, yw1, zw1, xw2, yw2, zw2; + double xw1 = 0., yw1 = 0., zw1 = 0., xw2 = 0., yw2 = 0., zw2 = 0.; // settings of WB: scene and viewing - if(params->colorappearance.wbmodel == "RawT") { + if (params->colorappearance.wbmodel == "RawT") { xw1 = 96.46; //use RT WB; CAT 02 is used for output device (see prefreneces) yw1 = 100.0; zw1 = 82.445; xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else /*if(params->colorappearance.wbmodel == "RawTCAT02")*/ { + } else if (params->colorappearance.wbmodel == "RawTCAT02") { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; xw2 = xwd; yw2 = ywd; zw2 = zwd; + } else if (params->colorappearance.wbmodel == "free") { + xw1 = xws; // free temp and green + yw1 = yws; + zw1 = zws; + xw2 = xwd; + yw2 = ywd; + zw2 = zwd; } double cz, wh, pfl; - Ciecam02::initcam1(gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); - double nj, dj, nbbj, ncbj, czj, awj, flj; - Ciecam02::initcam2(gamu, yb2, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); + Ciecam02::initcam1 (gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); + double nj, nbbj, ncbj, czj, awj, flj; + Ciecam02::initcam2 (gamu, yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); #ifndef _DEBUG - #pragma omp parallel default(shared) firstprivate(lab,xw1,xw2,yw1,yw2,zw1,zw2,pilot,jli,chr,yb,la,yb2,la2,fl,nc,f,c, height,width,begh, endh,nc2,f2,c2, alg,algepd, gamu, highlight, rstprotection, pW, scalecd) + #pragma omp parallel default(shared) firstprivate(lab,xw1,xw2,yw1,yw2,zw1,zw2,pilot,jli,chr,yb,la,yb2,la2,fl,nc,f,c, height,width,begh, endh,nc2,f2,c2, alg,algepd, gamu, highlight, rstprotection, pW, scale) #endif { //matrix for current working space - TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params->icm.working); + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params->icm.working); double wip[3][3] = { {wiprof[0][0], wiprof[0][1], wiprof[0][2]}, {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, @@ -588,7 +634,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double x, y, z; double epsil = 0.0001; //convert Lab => XYZ - Color::Lab2XYZ(L, a, b, x1, y1, z1); + Color::Lab2XYZ (L, a, b, x1, y1, z1); // double J, C, h, Q, M, s, aw, fl, wh; double J, C, h, Q, M, s; @@ -603,12 +649,12 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh y = (double)y1 / 655.35; z = (double)z1 / 655.35; //process source==> normal - Ciecam02::xyz2jchqms_ciecam02( J, C, h, - Q, M, s, aw, fl, wh, - x, y, z, - xw1, yw1, zw1, - yb, la, - f, c, nc, pilot, gamu , n, nbb, ncb, pfl, cz, d ); + Ciecam02::xyz2jchqms_ciecam02 ( J, C, h, + Q, M, s, aw, fl, wh, + x, y, z, + xw1, yw1, zw1, + yb, la, + f, c, nc, pilot, gamu, n, nbb, ncb, pfl, cz, d ); Jpro = J; Cpro = C; hpro = h; @@ -621,60 +667,60 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh f_l = fl; // we cannot have all algoritms with all chroma curves - if(alg == 1) { + if (alg == 1) { // Lightness saturation - if(Jpro > 99.9f) { + if (Jpro > 99.9f) { Jpro = 99.9f; } - Jpro = (CAMBrightCurveJ[(float)(Jpro * 327.68)]) / 327.68; //ligthness CIECAM02 + contrast + Jpro = (CAMBrightCurveJ[ (float) (Jpro * 327.68)]) / 327.68; //ligthness CIECAM02 + contrast double sres; double Sp = spro / 100.0; double parsat = 1.5; //parsat=1.5 =>saturation ; 1.8 => chroma ; 2.5 => colorfullness (personal evaluation) - if(schr == -100.0) { + if (schr == -100.0) { schr = -99.8; } - Ciecam02::curvecolor(schr, Sp , sres, parsat); - double coe = pow(fl, 0.25); + Ciecam02::curvecolor (schr, Sp, sres, parsat); + double coe = pow (fl, 0.25); float dred = 100.f; // in C mode float protect_red = 80.0f; // in C mode - dred = 100.0 * sqrt((dred * coe) / Qpro); - protect_red = 100.0 * sqrt((protect_red * coe) / Qpro); + dred = 100.0 * sqrt ((dred * coe) / Qpro); + protect_red = 100.0 * sqrt ((protect_red * coe) / Qpro); int sk = 0; float ko = 100.f; - Color::skinred(Jpro, hpro, sres, Sp, dred, protect_red, sk, rstprotection, ko, spro); - Qpro = ( 4.0 / c ) * sqrt( Jpro / 100.0 ) * ( aw + 4.0 ) ; + Color::skinred (Jpro, hpro, sres, Sp, dred, protect_red, sk, rstprotection, ko, spro); + Qpro = ( 4.0 / c ) * sqrt ( Jpro / 100.0 ) * ( aw + 4.0 ) ; Cpro = (spro * spro * Qpro) / (10000.0); - } else if(alg == 3 || alg == 0 || alg == 2) { + } else if (alg == 3 || alg == 0 || alg == 2) { double coef = 32760. / wh; - if(alg == 3 || alg == 2) { - if(Qpro * coef > 32767.0f) { - Qpro = (CAMBrightCurveQ[(float)32767.0f]) / coef; //brightness and contrast + if (alg == 3 || alg == 2) { + if (Qpro * coef > 32767.0f) { + Qpro = (CAMBrightCurveQ[ (float)32767.0f]) / coef; //brightness and contrast } else { - Qpro = (CAMBrightCurveQ[(float)(Qpro * coef)]) / coef; //brightness and contrast + Qpro = (CAMBrightCurveQ[ (float) (Qpro * coef)]) / coef; //brightness and contrast } } double Mp, sres; - double coe = pow(fl, 0.25); + double coe = pow (fl, 0.25); Mp = Mpro / 100.0; double parsat = 2.5; - if(mchr == -100.0) { + if (mchr == -100.0) { mchr = -99.8 ; } - if(mchr == 100.0) { + if (mchr == 100.0) { mchr = 99.9; } - if(alg == 3 || alg == 2) { - Ciecam02::curvecolor(mchr, Mp , sres, parsat); + if (alg == 3 || alg == 2) { + Ciecam02::curvecolor (mchr, Mp, sres, parsat); } else { - Ciecam02::curvecolor(0.0, Mp , sres, parsat); //colorfullness + Ciecam02::curvecolor (0.0, Mp, sres, parsat); //colorfullness } float dred = 100.f; //in C mode @@ -683,77 +729,77 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh protect_red *= coe; //M mode int sk = 0; float ko = 100.f; - Color::skinred(Jpro, hpro, sres, Mp, dred, protect_red, sk, rstprotection, ko, Mpro); + Color::skinred (Jpro, hpro, sres, Mp, dred, protect_red, sk, rstprotection, ko, Mpro); Jpro = (100.0 * Qpro * Qpro) / (wh * wh); Cpro = Mpro / coe; - spro = 100.0 * sqrt( Mpro / Qpro ); + spro = 100.0 * sqrt ( Mpro / Qpro ); - if(alg != 2) { - if(Jpro > 99.9f) { + if (alg != 2) { + if (Jpro > 99.9f) { Jpro = 99.9f; } - Jpro = (CAMBrightCurveJ[(float)(Jpro * 327.68f)]) / 327.68f; //ligthness CIECAM02 + contrast + Jpro = (CAMBrightCurveJ[ (float) (Jpro * 327.68f)]) / 327.68f; //ligthness CIECAM02 + contrast } double Cp; double Sp = spro / 100.0; parsat = 1.5; - if(schr == -100.0) { + if (schr == -100.0) { schr = -99.; } - if(schr == 100.0) { + if (schr == 100.0) { schr = 98.; } - if(alg == 3) { - Ciecam02::curvecolor(schr, Sp , sres, parsat); + if (alg == 3) { + Ciecam02::curvecolor (schr, Sp, sres, parsat); } else { - Ciecam02::curvecolor(0.0, Sp , sres, parsat); //saturation + Ciecam02::curvecolor (0.0, Sp, sres, parsat); //saturation } dred = 100.f; // in C mode protect_red = 80.0f; // in C mode - dred = 100.0 * sqrt((dred * coe) / Q); - protect_red = 100.0 * sqrt((protect_red * coe) / Q); + dred = 100.0 * sqrt ((dred * coe) / Q); + protect_red = 100.0 * sqrt ((protect_red * coe) / Q); sk = 0; - Color::skinred(Jpro, hpro, sres, Sp, dred, protect_red, sk, rstprotection, ko, spro); + Color::skinred (Jpro, hpro, sres, Sp, dred, protect_red, sk, rstprotection, ko, spro); //double Q1; - Qpro = ( 4.0 / c ) * sqrt( Jpro / 100.0 ) * ( aw + 4.0 ) ; + Qpro = ( 4.0 / c ) * sqrt ( Jpro / 100.0 ) * ( aw + 4.0 ) ; Cpro = (spro * spro * Qpro) / (10000.0); Cp = Cpro / 100.0; parsat = 1.8; //parsat=1.5 =>saturation ; 1.8 => chroma ; 2.5 => colorfullness (personal evaluation : for not) - if(chr == -100.0) { + if (chr == -100.0) { chr = -99.8; } - if(alg != 2) { - Ciecam02::curvecolor(chr, Cp , sres, parsat); + if (alg != 2) { + Ciecam02::curvecolor (chr, Cp, sres, parsat); } else { - Ciecam02::curvecolor(0.0, Cp , sres, parsat); //chroma + Ciecam02::curvecolor (0.0, Cp, sres, parsat); //chroma } dred = 55.f; protect_red = 30.0f; sk = 1; - Color::skinred(Jpro, hpro, sres, Cp, dred, protect_red, sk, rstprotection, ko, Cpro); + Color::skinred (Jpro, hpro, sres, Cp, dred, protect_red, sk, rstprotection, ko, Cpro); - if(Jpro < 1. && Cpro > 12.) { + if (Jpro < 1. && Cpro > 12.) { Cpro = 12.; //reduce artifacts by "pseudo gamut control CIECAM" - } else if(Jpro < 2. && Cpro > 15.) { + } else if (Jpro < 2. && Cpro > 15.) { Cpro = 15.; - } else if(Jpro < 4. && Cpro > 30.) { + } else if (Jpro < 4. && Cpro > 30.) { Cpro = 30.; - } else if(Jpro < 7. && Cpro > 50.) { + } else if (Jpro < 7. && Cpro > 50.) { Cpro = 50.; } hpro = hpro + hue; - if( hpro < 0.0 ) { + if ( hpro < 0.0 ) { hpro += 360.0; //hue } } @@ -771,28 +817,28 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh float Jold100 = (float) Jpro; float redu = 25.f; float reduc = 1.f; - const Lightcurve& userColCurveJ1 = static_cast(customColCurve1); - userColCurveJ1.Apply(Jj); + const Lightcurve& userColCurveJ1 = static_cast (customColCurve1); + userColCurveJ1.Apply (Jj); - if(Jj > Jold) { - if(Jj < 65535.f) { - if(Jold < 327.68f * redu) { + if (Jj > Jold) { + if (Jj < 65535.f) { + if (Jold < 327.68f * redu) { Jj = 0.3f * (Jj - Jold) + Jold; //divide sensibility } else { - reduc = LIM((100.f - Jold100) / (100.f - redu), 0.f, 1.f); + reduc = LIM ((100.f - Jold100) / (100.f - redu), 0.f, 1.f); Jj = 0.3f * reduc * (Jj - Jold) + Jold; //reduct sensibility in highlights } } - } else if(Jj > 10.f) { + } else if (Jj > 10.f) { Jj = 0.8f * (Jj - Jold) + Jold; } else if (Jj >= 0.f) { Jj = 0.90f * (Jj - Jold) + Jold; // not zero ==>artifacts } - Jpro = (double)(Jj / 327.68f); + Jpro = (double) (Jj / 327.68f); - if(Jpro < 1.) { + if (Jpro < 1.) { Jpro = 1.; } @@ -807,29 +853,29 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh float redu = 20.f; float reduc = 1.f; - const Brightcurve& userColCurveB1 = static_cast(customColCurve1); - userColCurveB1.Apply(Qq); + const Brightcurve& userColCurveB1 = static_cast (customColCurve1); + userColCurveB1.Apply (Qq); - if(Qq > Qold) { - if(Qq < 65535.f) { - if(Qold < 327.68f * redu) { + if (Qq > Qold) { + if (Qq < 65535.f) { + if (Qold < 327.68f * redu) { Qq = 0.25f * (Qq - Qold) + Qold; //divide sensibility } else { - reduc = LIM((100.f - Qold100) / (100.f - redu), 0.f, 1.f); + reduc = LIM ((100.f - Qold100) / (100.f - redu), 0.f, 1.f); Qq = 0.25f * reduc * (Qq - Qold) + Qold; //reduct sensibility in highlights } } - } else if(Qq > 10.f) { + } else if (Qq > 10.f) { Qq = 0.5f * (Qq - Qold) + Qold; } else if (Qq >= 0.f) { Qq = 0.7f * (Qq - Qold) + Qold; // not zero ==>artifacts } - Qpro = (double)(Qq * (coef) / 327.68f); - Jpro = 100.*(Qpro * Qpro) / ((4.0 / c) * (4.0 / c) * (aw + 4.0) * (aw + 4.0)); + Qpro = (double) (Qq * (coef) / 327.68f); + Jpro = 100.* (Qpro * Qpro) / ((4.0 / c) * (4.0 / c) * (aw + 4.0) * (aw + 4.0)); t1B = true; - if(Jpro < 1.) { + if (Jpro < 1.) { Jpro = 1.; } @@ -848,35 +894,35 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh float Jold100 = (float) Jpro; float redu = 25.f; float reduc = 1.f; - const Lightcurve& userColCurveJ2 = static_cast(customColCurve2); - userColCurveJ2.Apply(Jj); + const Lightcurve& userColCurveJ2 = static_cast (customColCurve2); + userColCurveJ2.Apply (Jj); - if(Jj > Jold) { - if(Jj < 65535.f) { - if(Jold < 327.68f * redu) { + if (Jj > Jold) { + if (Jj < 65535.f) { + if (Jold < 327.68f * redu) { Jj = 0.3f * (Jj - Jold) + Jold; //divide sensibility } else { - reduc = LIM((100.f - Jold100) / (100.f - redu), 0.f, 1.f); + reduc = LIM ((100.f - Jold100) / (100.f - redu), 0.f, 1.f); Jj = 0.3f * reduc * (Jj - Jold) + Jold; //reduct sensibility in highlights } } - } else if(Jj > 10.f) { - if(!t1L) { + } else if (Jj > 10.f) { + if (!t1L) { Jj = 0.8f * (Jj - Jold) + Jold; } else { Jj = 0.4f * (Jj - Jold) + Jold; } } else if (Jj >= 0.f) { - if(!t1L) { + if (!t1L) { Jj = 0.90f * (Jj - Jold) + Jold; // not zero ==>artifacts } else { Jj = 0.5f * (Jj - Jold) + Jold; } } - Jpro = (double)(Jj / 327.68f); + Jpro = (double) (Jj / 327.68f); - if(Jpro < 1.) { + if (Jpro < 1.) { Jpro = 1.; } @@ -889,40 +935,40 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh float redu = 20.f; float reduc = 1.f; - const Brightcurve& userColCurveB2 = static_cast(customColCurve2); - userColCurveB2.Apply(Qq); + const Brightcurve& userColCurveB2 = static_cast (customColCurve2); + userColCurveB2.Apply (Qq); - if(Qq > Qold) { - if(Qq < 65535.f) { - if(Qold < 327.68f * redu) { + if (Qq > Qold) { + if (Qq < 65535.f) { + if (Qold < 327.68f * redu) { Qq = 0.25f * (Qq - Qold) + Qold; //divide sensibility } else { - reduc = LIM((100.f - Qold100) / (100.f - redu), 0.f, 1.f); + reduc = LIM ((100.f - Qold100) / (100.f - redu), 0.f, 1.f); Qq = 0.25f * reduc * (Qq - Qold) + Qold; //reduct sensibility in highlights } } - } else if(Qq > 10.f) { + } else if (Qq > 10.f) { Qq = 0.5f * (Qq - Qold) + Qold; } else if (Qq >= 0.f) { Qq = 0.7f * (Qq - Qold) + Qold; // not zero ==>artifacts } - Qpro = (double)(Qq * (coef) / 327.68f); - Jpro = 100.*(Qpro * Qpro) / ((4.0 / c) * (4.0 / c) * (aw + 4.0) * (aw + 4.0)); + Qpro = (double) (Qq * (coef) / 327.68f); + Jpro = 100.* (Qpro * Qpro) / ((4.0 / c) * (4.0 / c) * (aw + 4.0) * (aw + 4.0)); t2B = true; - if(t1L) { //to workaround the problem if we modify curve1-lightnees after curve2 brightness(the cat that bites its own tail!) in fact it's another type of curve only for this case + if (t1L) { //to workaround the problem if we modify curve1-lightnees after curve2 brightness(the cat that bites its own tail!) in fact it's another type of curve only for this case coef = 2.f; //adapt Q to J approximation Qq = (float) Qpro * coef; Qold = Qq; - const Lightcurve& userColCurveJ1 = static_cast(customColCurve1); - userColCurveJ1.Apply(Qq); + const Lightcurve& userColCurveJ1 = static_cast (customColCurve1); + userColCurveJ1.Apply (Qq); Qq = 0.1f * (Qq - Qold) + Qold; //approximative adaptation - Qpro = (double)(Qq / coef); - Jpro = 100.*(Qpro * Qpro) / ((4.0 / c) * (4.0 / c) * (aw + 4.0) * (aw + 4.0)); + Qpro = (double) (Qq / coef); + Jpro = 100.* (Qpro * Qpro) / ((4.0 / c) * (4.0 / c) * (aw + 4.0) * (aw + 4.0)); } - if(Jpro < 1.) { + if (Jpro < 1.) { Jpro = 1.; } } @@ -934,21 +980,21 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double coef = 327.68 / parsat; float Cc = (float) Cpro * coef; float Ccold = Cc; - const Chromacurve& userColCurve = static_cast(customColCurve3); - userColCurve.Apply(Cc); + const Chromacurve& userColCurve = static_cast (customColCurve3); + userColCurve.Apply (Cc); float dred = 55.f; float protect_red = 30.0f; float sk = 1; float ko = 1.f / coef; - Color::skinred(Jpro, hpro, Cc, Ccold, dred, protect_red, sk, rstprotection, ko, Cpro); + Color::skinred (Jpro, hpro, Cc, Ccold, dred, protect_red, sk, rstprotection, ko, Cpro); - if(Jpro < 1. && Cpro > 12.) { + if (Jpro < 1. && Cpro > 12.) { Cpro = 12.; //reduce artifacts by "pseudo gamut control CIECAM" - } else if(Jpro < 2. && Cpro > 15.) { + } else if (Jpro < 2. && Cpro > 15.) { Cpro = 15.; - } else if(Jpro < 4. && Cpro > 30.) { + } else if (Jpro < 4. && Cpro > 30.) { Cpro = 30.; - } else if(Jpro < 7. && Cpro > 50.) { + } else if (Jpro < 7. && Cpro > 50.) { Cpro = 50.; } @@ -958,18 +1004,18 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double coef = 327.68 / parsat; float Ss = (float) spro * coef; float Sold = Ss; - const Saturcurve& userColCurve = static_cast(customColCurve3); - userColCurve.Apply(Ss); + const Saturcurve& userColCurve = static_cast (customColCurve3); + userColCurve.Apply (Ss); Ss = 0.6f * (Ss - Sold) + Sold; //divide sensibility saturation - double coe = pow(fl, 0.25); + double coe = pow (fl, 0.25); float dred = 100.f; // in C mode float protect_red = 80.0f; // in C mode - dred = 100.0 * sqrt((dred * coe) / Qpro); - protect_red = 100.0 * sqrt((protect_red * coe) / Qpro); + dred = 100.0 * sqrt ((dred * coe) / Qpro); + protect_red = 100.0 * sqrt ((protect_red * coe) / Qpro); int sk = 0; float ko = 1.f / coef; - Color::skinred(Jpro, hpro, Ss, Sold, dred, protect_red, sk, rstprotection, ko, spro); - Qpro = ( 4.0 / c ) * sqrt( Jpro / 100.0 ) * ( aw + 4.0 ) ; + Color::skinred (Jpro, hpro, Ss, Sold, dred, protect_red, sk, rstprotection, ko, spro); + Qpro = ( 4.0 / c ) * sqrt ( Jpro / 100.0 ) * ( aw + 4.0 ) ; Cpro = (spro * spro * Qpro) / (10000.0); c1s = 1; @@ -978,25 +1024,25 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double coef = 327.68 / parsat; float Mm = (float) Mpro * coef; float Mold = Mm; - const Colorfcurve& userColCurve = static_cast(customColCurve3); - userColCurve.Apply(Mm); - double coe = pow(fl, 0.25); + const Colorfcurve& userColCurve = static_cast (customColCurve3); + userColCurve.Apply (Mm); + double coe = pow (fl, 0.25); float dred = 100.f; //in C mode float protect_red = 80.0f; // in C mode dred *= coe; //in M mode protect_red *= coe; int sk = 0; float ko = 1.f / coef; - Color::skinred(Jpro, hpro, Mm, Mold, dred, protect_red, sk, rstprotection, ko, Mpro); + Color::skinred (Jpro, hpro, Mm, Mold, dred, protect_red, sk, rstprotection, ko, Mpro); Cpro = Mpro / coe; - if(Jpro < 1. && Mpro > 12.*coe) { + if (Jpro < 1. && Mpro > 12.*coe) { Mpro = 12.*coe; //reduce artifacts by "pseudo gamut control CIECAM" - } else if(Jpro < 2. && Mpro > 15.*coe) { + } else if (Jpro < 2. && Mpro > 15.*coe) { Mpro = 15.*coe; - } else if(Jpro < 4. && Mpro > 30.*coe) { + } else if (Jpro < 4. && Mpro > 30.*coe) { Mpro = 30.*coe; - } else if(Jpro < 7. && Mpro > 50.*coe) { + } else if (Jpro < 7. && Mpro > 50.*coe) { Mpro = 50.*coe; } @@ -1006,17 +1052,17 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } //to retrieve the correct values of variables - if(t2B && t1B) { + if (t2B && t1B) { Jpro = (100.0 * Qpro * Qpro) / (wh * wh); // for brightness curve } - if(c1s == 1) { - Qpro = ( 4.0 / c ) * sqrt( Jpro / 100.0 ) * ( aw + 4.0 ) ; //for saturation curve + if (c1s == 1) { + Qpro = ( 4.0 / c ) * sqrt ( Jpro / 100.0 ) * ( aw + 4.0 ) ; //for saturation curve Cpro = (spro * spro * Qpro) / (10000.0); } - if(c1co == 1) { - double coe = pow(fl, 0.25); // for colorfullness curve + if (c1co == 1) { + double coe = pow (fl, 0.25); // for colorfullness curve Cpro = Mpro / coe; } @@ -1028,7 +1074,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh h = hpro; s = spro; - if(params->colorappearance.tonecie || settings->autocielab) { //use pointer for tonemapping with CIECAM and also sharpening , defringe, contrast detail + if (params->colorappearance.tonecie || settings->autocielab) { //use pointer for tonemapping with CIECAM and also sharpening , defringe, contrast detail // if(params->colorappearance.tonecie || params->colorappearance.sharpcie){//use pointer for tonemapping with CIECAM and also sharpening , defringe, contrast detail float Qred = ( 4.0 / c) * ( aw + 4.0 ); //estimate Q max if J=100.0 ncie->Q_p[i][j] = (float)Q + epsil; //epsil to avoid Q=0 @@ -1037,19 +1083,19 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh ncie->h_p[i][j] = (float)h; ncie->C_p[i][j] = (float)C + epsil; // ncie->s_p[i][j]=(float)s; - ncie->sh_p[i][j] = (float) 32768.*(( 4.0 / c ) * sqrt( J / 100.0 ) * ( aw + 4.0 )) / Qred ; + ncie->sh_p[i][j] = (float) 32768.* (( 4.0 / c ) * sqrt ( J / 100.0 ) * ( aw + 4.0 )) / Qred ; // ncie->ch_p[i][j]=(float) 327.68*C; - if(ncie->Q_p[i][j] < minQ) { + if (ncie->Q_p[i][j] < minQ) { minQ = ncie->Q_p[i][j]; //minima } - if(ncie->Q_p[i][j] > maxQ) { + if (ncie->Q_p[i][j] > maxQ) { maxQ = ncie->Q_p[i][j]; //maxima } } - if(!params->colorappearance.tonecie || !settings->autocielab || !params->epd.enabled ) { + if (!params->colorappearance.tonecie || !settings->autocielab || !params->epd.enabled ) { // if(!params->epd.enabled || !params->colorappearance.tonecie || !settings->autocielab){ // if(!params->epd.enabled || !params->colorappearance.tonecie || !params->colorappearance.sharpcie){ @@ -1058,36 +1104,37 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh int libr = 0; int colch = 0; - if(curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) { + if (curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) { brli = 70.0; libr = 1; - } else if(curveMode == ColorAppearanceParams::TC_MODE_LIGHT) { + } else if (curveMode == ColorAppearanceParams::TC_MODE_LIGHT) { brli = 327.; libr = 0; } if (curveMode3 == ColorAppearanceParams::TC_MODE_CHROMA) { - chsacol = 327.; + chsacol = 400.;//327.; colch = 0; - } else if(curveMode3 == ColorAppearanceParams::TC_MODE_SATUR) { + } else if (curveMode3 == ColorAppearanceParams::TC_MODE_SATUR) { chsacol = 450.0; colch = 1; - } else if(curveMode3 == ColorAppearanceParams::TC_MODE_COLORF) { - chsacol = 327.0; + } else if (curveMode3 == ColorAppearanceParams::TC_MODE_COLORF) { + chsacol = 400.;//327.0; colch = 2; } - if(ciedata) { + if (ciedata) { // Data for J Q M s and C histograms //update histogram jp = true; - if(pW != 1) { //only with improccoordinator + if (pW != 1) { //only with improccoordinator int posl; - if(libr == 1) { - posl = CLIP((int)(Q * brli)); //40.0 to 100.0 approximative factor for Q - 327 for J - } else /*if(libr == 0)*/ { - posl = CLIP((int)(J * brli)); //327 for J + + if (libr == 1) { + posl = CLIP ((int) (Q * brli)); //40.0 to 100.0 approximative factor for Q - 327 for J + } else { /*if(libr == 0)*/ + posl = CLIP ((int) (J * brli)); //327 for J } hist16JCAM[posl]++; @@ -1095,14 +1142,15 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh chropC = true; - if(pW != 1) { //only with improccoordinator + if (pW != 1) { //only with improccoordinator int posc; - if(colch == 0) { - posc = CLIP((int)(C * chsacol)); //450.0 approximative factor for s 320 for M - } else if(colch == 1) { - posc = CLIP((int)(s * chsacol)); - } else /*if(colch == 2)*/ { - posc = CLIP((int)(M * chsacol)); + + if (colch == 0) { + posc = CLIP ((int) (C * chsacol)); //450.0 approximative factor for s 320 for M + } else if (colch == 1) { + posc = CLIP ((int) (s * chsacol)); + } else { /*if(colch == 2)*/ + posc = CLIP ((int) (M * chsacol)); } hist16_CCAM[posc]++; @@ -1112,42 +1160,42 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double xx, yy, zz; //double nj, nbbj, ncbj, flj, czj, dj, awj; //process normal==> viewing - Ciecam02::jch2xyz_ciecam02( xx, yy, zz, - J, C, h, - xw2, yw2, zw2, - yb2, la2, - f2, c2, nc2, gamu, nj, nbbj, ncbj, flj, czj, dj, awj); + Ciecam02::jch2xyz_ciecam02 ( xx, yy, zz, + J, C, h, + xw2, yw2, zw2, + yb2, la2, + f2, c2, nc2, gamu, nj, nbbj, ncbj, flj, czj, dj, awj); x = (float)xx * 655.35; y = (float)yy * 655.35; z = (float)zz * 655.35; float Ll, aa, bb; //convert xyz=>lab - Color::XYZ2Lab(x, y, z, Ll, aa, bb); + Color::XYZ2Lab (x, y, z, Ll, aa, bb); lab->L[i][j] = Ll; lab->a[i][j] = aa; lab->b[i][j] = bb; // gamut control in Lab mode; I must study how to do with cIECAM only - if(gamu == 1) { + if (gamu == 1) { float R, G, B; float HH, Lprov1, Chprov1; Lprov1 = lab->L[i][j] / 327.68f; - Chprov1 = sqrt(SQR(lab->a[i][j] / 327.68f) + SQR(lab->b[i][j] / 327.68f)); - HH = atan2(lab->b[i][j], lab->a[i][j]); + Chprov1 = sqrt (SQR (lab->a[i][j] / 327.68f) + SQR (lab->b[i][j] / 327.68f)); + HH = atan2 (lab->b[i][j], lab->a[i][j]); #ifdef _DEBUG bool neg = false; bool more_rgb = false; //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f, neg, more_rgb); + Color::gamutLchonly (HH, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f, neg, more_rgb); #else //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f); + Color::gamutLchonly (HH, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f); #endif lab->L[i][j] = Lprov1 * 327.68f; - lab->a[i][j] = 327.68f * Chprov1 * cos(HH); - lab->b[i][j] = 327.68f * Chprov1 * sin(HH); + lab->a[i][j] = 327.68f * Chprov1 * cos (HH); + lab->b[i][j] = 327.68f * Chprov1 * sin (HH); } } @@ -1155,26 +1203,26 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } // End of parallelization - if(!params->epd.enabled || !params->colorappearance.tonecie || !settings->autocielab) { //normal + if (!params->epd.enabled || !params->colorappearance.tonecie || !settings->autocielab) { //normal //if(!params->epd.enabled || !params->colorappearance.tonecie || !params->colorappearance.sharpcie){//normal - if(ciedata) { + if (ciedata) { //update histogram J - if(pW != 1) { //only with improccoordinator + if (pW != 1) { //only with improccoordinator for (int i = 0; i < 32768; i++) { // if (jp) { float hval = dLcurve[i]; - int hi = (int)(255.0 * CLIPD(hval)); // + int hi = (int) (255.0 * CLIPD (hval)); // histLCAM[hi] += hist16JCAM[i] ; } } } - if(pW != 1) { //only with improccoordinator + if (pW != 1) { //only with improccoordinator for (int i = 0; i < 48000; i++) { // if (chropC) { float hvalc = dCcurve[i]; - int hic = (int)(255.0 * CLIPD(hvalc)); // + int hic = (int) (255.0 * CLIPD (hvalc)); // histCCAM[hic] += hist16_CCAM[i] ; } } @@ -1186,81 +1234,78 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh if (settings->verbose) { t2e.set(); - printf("CIECAM02 performed in %d usec:\n", t2e.etime(t1e)); + printf ("CIECAM02 performed in %d usec:\n", t2e.etime (t1e)); // printf("minc=%f maxc=%f minj=%f maxj=%f\n",minc,maxc,minj,maxj); } #endif - if(settings->autocielab) { + if (settings->autocielab) { //if(params->colorappearance.sharpcie) { //all this treatments reduce artifacts, but can lead to slightly different results - if(params->defringe.enabled) if(execsharp) { + if (params->defringe.enabled) if (execsharp) { ImProcFunctions::defringecam (ncie); // } //if(params->dirpyrequalizer.enabled) if(execsharp) { - if(params->dirpyrequalizer.enabled) { - if(params->dirpyrequalizer.gamutlab /*&& execsharp*/) { - float b_l = static_cast(params->dirpyrequalizer.hueskin.value[0]) / 100.0f; - float t_l = static_cast(params->dirpyrequalizer.hueskin.value[1]) / 100.0f; - float b_r = static_cast(params->dirpyrequalizer.hueskin.value[2]) / 100.0f; - float t_r = static_cast(params->dirpyrequalizer.hueskin.value[3]) / 100.0f; - int choice = 0; + if (params->dirpyrequalizer.enabled) { + if (params->dirpyrequalizer.gamutlab /*&& execsharp*/) { + float b_l = static_cast (params->dirpyrequalizer.hueskin.value[0]) / 100.0f; + float t_l = static_cast (params->dirpyrequalizer.hueskin.value[1]) / 100.0f; + float b_r = static_cast (params->dirpyrequalizer.hueskin.value[2]) / 100.0f; + float t_r = static_cast (params->dirpyrequalizer.hueskin.value[3]) / 100.0f; - bool alread = false; float artifact = (float) settings->artifact_cbdl; - if(artifact > 6.f) { + if (artifact > 6.f) { artifact = 6.f; } - if(artifact < 0.f) { + if (artifact < 0.f) { artifact = 1.f; } - int hotbad = 0; float chrom = 50.f; { - ImProcFunctions::badpixcam (ncie, artifact, 5, 2 , b_l, t_l, t_r, b_r, params->dirpyrequalizer.skinprotect , chrom, hotbad); //enabled remove artifacts for cbDL - alread = true; + int hotbad = 0; + ImProcFunctions::badpixcam (ncie, artifact, 5, 2, b_l, t_l, t_r, b_r, params->dirpyrequalizer.skinprotect, chrom, hotbad); //enabled remove artifacts for cbDL } } } - if(params->colorappearance.badpixsl > 0) if(execsharp) { + if (params->colorappearance.badpixsl > 0) if (execsharp) { int mode = params->colorappearance.badpixsl; ImProcFunctions::badpixcam (ncie, 3.4, 5, mode, 0, 0, 0, 0, 0, 0, 1);//for bad pixels CIECAM } - if (params->sharpenMicro.enabled)if(execsharp) { - ImProcFunctions::MLmicrocontrastcam(ncie); + if (params->sharpenMicro.enabled)if (execsharp) { + ImProcFunctions::MLmicrocontrastcam (ncie); } - if(params->sharpening.enabled) - if(execsharp) { + if (params->sharpening.enabled) + if (execsharp) { float **buffer = lab->L; // We can use the L-buffer from lab as buffer to save some memory ImProcFunctions::sharpeningcam (ncie, buffer); // sharpening adapted to CIECAM } //if(params->dirpyrequalizer.enabled) if(execsharp) { - if(params->dirpyrequalizer.enabled /*&& (execsharp)*/) { - float b_l = static_cast(params->dirpyrequalizer.hueskin.value[0]) / 100.0f; - float t_l = static_cast(params->dirpyrequalizer.hueskin.value[1]) / 100.0f; - float b_r = static_cast(params->dirpyrequalizer.hueskin.value[2]) / 100.0f; - float t_r = static_cast(params->dirpyrequalizer.hueskin.value[3]) / 100.0f; - int choice = 0; //not disabled in case of ! always 0 + if (params->dirpyrequalizer.enabled /*&& (execsharp)*/) { // if (params->dirpyrequalizer.algo=="FI") choice=0; // else if(params->dirpyrequalizer.algo=="LA") choice=1; - if(rtt == 1) { - dirpyr_equalizercam(ncie, ncie->sh_p, ncie->sh_p, ncie->W, ncie->H, ncie->h_p, ncie->C_p, params->dirpyrequalizer.mult, params->dirpyrequalizer.threshold, params->dirpyrequalizer.skinprotect, true, params->dirpyrequalizer.gamutlab, b_l, t_l, t_r, b_r, choice, scalecd); //contrast by detail adapted to CIECAM + if (rtt == 1) { + float b_l = static_cast (params->dirpyrequalizer.hueskin.value[0]) / 100.0f; + float t_l = static_cast (params->dirpyrequalizer.hueskin.value[1]) / 100.0f; + float b_r = static_cast (params->dirpyrequalizer.hueskin.value[2]) / 100.0f; + float t_r = static_cast (params->dirpyrequalizer.hueskin.value[3]) / 100.0f; + int choice = 0; //not disabled in case of ! always 0 + dirpyr_equalizercam (ncie, ncie->sh_p, ncie->sh_p, ncie->W, ncie->H, ncie->h_p, ncie->C_p, params->dirpyrequalizer.mult, params->dirpyrequalizer.threshold, params->dirpyrequalizer.skinprotect, true, params->dirpyrequalizer.gamutlab, b_l, t_l, t_r, b_r, choice, scale); //contrast by detail adapted to CIECAM } } float Qredi = ( 4.0 / c_) * ( a_w + 4.0 ); - float co_e = (pow(f_l, 0.25f)); + float co_e = (pow (f_l, 0.25f)); #ifndef _DEBUG #pragma omp parallel default(shared) firstprivate(height,width, Qredi,a_w,c_) @@ -1274,18 +1319,18 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh for (int j = 0; j < width; j++) { float interm = Qredi * ncie->sh_p[i][j] / (32768.f); ncie->J_p[i][j] = 100.0 * interm * interm / ((a_w + 4.) * (a_w + 4.) * (4. / c_) * (4. / c_)); - ncie->Q_p[i][j] = ( 4.0 / c_) * ( a_w + 4.0 ) * sqrt(ncie->J_p[i][j] / 100.f); + ncie->Q_p[i][j] = ( 4.0 / c_) * ( a_w + 4.0 ) * sqrt (ncie->J_p[i][j] / 100.f); ncie->M_p[i][j] = ncie->C_p[i][j] * co_e; } } } - if((params->colorappearance.tonecie || (params->colorappearance.tonecie && params->epd.enabled)) || (params->sharpening.enabled && settings->autocielab) + if ((params->colorappearance.tonecie || (params->colorappearance.tonecie && params->epd.enabled)) || (params->sharpening.enabled && settings->autocielab) || (params->dirpyrequalizer.enabled && settings->autocielab) || (params->defringe.enabled && settings->autocielab) || (params->sharpenMicro.enabled && settings->autocielab) || (params->colorappearance.badpixsl > 0 && settings->autocielab)) { - if(params->epd.enabled && params->colorappearance.tonecie && algepd) { - ImProcFunctions::EPDToneMapCIE(ncie, a_w, c_, w_h, width, height, begh, endh, minQ, maxQ, Iterates, scale ); + if (params->epd.enabled && params->colorappearance.tonecie && algepd) { + ImProcFunctions::EPDToneMapCIE (ncie, a_w, c_, w_h, width, height, begh, endh, minQ, maxQ, Iterates, scale ); } //EPDToneMapCIE adapted to CIECAM @@ -1295,7 +1340,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh #pragma omp parallel default(shared) firstprivate(lab,xw2,yw2,zw2,chr,yb,la2,yb2, height,width,begh, endh, nc2,f2,c2, gamu, highlight,pW) #endif { - TMatrix wiprofa = iccStore->workingSpaceInverseMatrix (params->icm.working); + TMatrix wiprofa = ICCStore::getInstance()->workingSpaceInverseMatrix (params->icm.working); double wipa[3][3] = { {wiprofa[0][0], wiprofa[0][1], wiprofa[0][2]}, {wiprofa[1][0], wiprofa[1][1], wiprofa[1][2]}, @@ -1314,11 +1359,11 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double xx, yy, zz; float x, y, z; const float eps = 0.0001; - float co_e = (pow(f_l, 0.25f)) + eps; + float co_e = (pow (f_l, 0.25f)) + eps; // if(params->epd.enabled) ncie->J_p[i][j]=(100.0* ncie->Q_p[i][j]*ncie->Q_p[i][j])/(w_h*w_h); - if(params->epd.enabled) { - ncie->J_p[i][j] = (100.0 * ncie->Q_p[i][j] * ncie->Q_p[i][j]) / SQR((4. / c) * (aw + 4.)); + if (params->epd.enabled) { + ncie->J_p[i][j] = (100.0 * ncie->Q_p[i][j] * ncie->Q_p[i][j]) / SQR ((4. / c) * (aw + 4.)); } ncie->C_p[i][j] = (ncie->M_p[i][j]) / co_e; @@ -1327,38 +1372,38 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double chsacol = 327.; int libr = 0; int colch = 0; - float sa_t; - if(curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) { + if (curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) { brli = 70.0; libr = 1; - } else if(curveMode == ColorAppearanceParams::TC_MODE_LIGHT) { + } else if (curveMode == ColorAppearanceParams::TC_MODE_LIGHT) { brli = 327.; libr = 0; } if (curveMode3 == ColorAppearanceParams::TC_MODE_CHROMA) { - chsacol = 327.; + chsacol = 400.;//327.; colch = 0; - } else if(curveMode3 == ColorAppearanceParams::TC_MODE_SATUR) { + } else if (curveMode3 == ColorAppearanceParams::TC_MODE_SATUR) { chsacol = 450.0; colch = 1; - } else if(curveMode3 == ColorAppearanceParams::TC_MODE_COLORF) { - chsacol = 327.0; + } else if (curveMode3 == ColorAppearanceParams::TC_MODE_COLORF) { + chsacol = 400.;//327.0; colch = 2; } - if(ciedata) { + if (ciedata) { // Data for J Q M s and C histograms //update histogram jp = true; - if(pW != 1) { //only with improccoordinator + if (pW != 1) { //only with improccoordinator int posl; - if(libr == 1) { - posl = CLIP((int)(ncie->Q_p[i][j] * brli)); //40.0 to 100.0 approximative factor for Q - 327 for J - } else /*if(libr == 0)*/ { - posl = CLIP((int)(ncie->J_p[i][j] * brli)); //327 for J + + if (libr == 1) { + posl = CLIP ((int) (ncie->Q_p[i][j] * brli)); //40.0 to 100.0 approximative factor for Q - 327 for J + } else { /*if(libr == 0)*/ + posl = CLIP ((int) (ncie->J_p[i][j] * brli)); //327 for J } hist16JCAM[posl]++; @@ -1366,15 +1411,16 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh chropC = true; - if(pW != 1) { //only with improccoordinator + if (pW != 1) { //only with improccoordinator int posc; - if(colch == 0) { - posc = CLIP((int)(ncie->C_p[i][j] * chsacol)); //450.0 approximative factor for s 320 for M - } else if(colch == 1) { - sa_t = 100.f * sqrt(ncie->C_p[i][j] / ncie->Q_p[i][j]); //Q_p always > 0 - posc = CLIP((int)(sa_t * chsacol)); - } else /*if(colch == 2)*/ { - posc = CLIP((int)(ncie->M_p[i][j] * chsacol)); + + if (colch == 0) { + posc = CLIP ((int) (ncie->C_p[i][j] * chsacol)); //450.0 approximative factor for s 320 for M + } else if (colch == 1) { + float sa_t = 100.f * sqrt (ncie->C_p[i][j] / ncie->Q_p[i][j]); //Q_p always > 0 + posc = CLIP ((int) (sa_t * chsacol)); + } else { /*if(colch == 2)*/ + posc = CLIP ((int) (ncie->M_p[i][j] * chsacol)); } hist16_CCAM[posc]++; @@ -1383,41 +1429,41 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh //end histograms // double nd, nbbd, ncbd, fld, czd, dd, awd; - Ciecam02::jch2xyz_ciecam02( xx, yy, zz, - ncie->J_p[i][j], ncie->C_p[i][j], ncie->h_p[i][j], - xw2, yw2, zw2, - yb2, la2, - f2, c2, nc2, gamu, nj, nbbj, ncbj, flj, czj, dj, awj); + Ciecam02::jch2xyz_ciecam02 ( xx, yy, zz, + ncie->J_p[i][j], ncie->C_p[i][j], ncie->h_p[i][j], + xw2, yw2, zw2, + yb2, la2, + f2, c2, nc2, gamu, nj, nbbj, ncbj, flj, czj, dj, awj); x = (float)xx * 655.35; y = (float)yy * 655.35; z = (float)zz * 655.35; float Ll, aa, bb; //convert xyz=>lab - Color::XYZ2Lab(x, y, z, Ll, aa, bb); + Color::XYZ2Lab (x, y, z, Ll, aa, bb); lab->L[i][j] = Ll; lab->a[i][j] = aa; lab->b[i][j] = bb; - if(gamu == 1) { + if (gamu == 1) { float R, G, B; float HH, Lprov1, Chprov1; Lprov1 = lab->L[i][j] / 327.68f; - Chprov1 = sqrt(SQR(lab->a[i][j] / 327.68f) + SQR(lab->b[i][j] / 327.68f)); - HH = atan2(lab->b[i][j], lab->a[i][j]); + Chprov1 = sqrt (SQR (lab->a[i][j] / 327.68f) + SQR (lab->b[i][j] / 327.68f)); + HH = atan2 (lab->b[i][j], lab->a[i][j]); #ifdef _DEBUG bool neg = false; bool more_rgb = false; //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, Lprov1, Chprov1, R, G, B, wipa, highlight, 0.15f, 0.96f, neg, more_rgb); + Color::gamutLchonly (HH, Lprov1, Chprov1, R, G, B, wipa, highlight, 0.15f, 0.96f, neg, more_rgb); #else //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, Lprov1, Chprov1, R, G, B, wipa, highlight, 0.15f, 0.96f); + Color::gamutLchonly (HH, Lprov1, Chprov1, R, G, B, wipa, highlight, 0.15f, 0.96f); #endif lab->L[i][j] = Lprov1 * 327.68f; - lab->a[i][j] = 327.68f * Chprov1 * cos(HH); - lab->b[i][j] = 327.68f * Chprov1 * sin(HH); + lab->a[i][j] = 327.68f * Chprov1 * cos (HH); + lab->b[i][j] = 327.68f * Chprov1 * sin (HH); } } @@ -1426,24 +1472,24 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh //end parallelization //show CIECAM histograms - if(ciedata) { + if (ciedata) { //update histogram J and Q - if(pW != 1) { //only with improccoordinator + if (pW != 1) { //only with improccoordinator for (int i = 0; i < 32768; i++) { // if (jp) { float hval = dLcurve[i]; - int hi = (int)(255.0 * CLIPD(hval)); // + int hi = (int) (255.0 * CLIPD (hval)); // histLCAM[hi] += hist16JCAM[i] ; } } } //update color histogram M,s,C - if(pW != 1) { //only with improccoordinator + if (pW != 1) { //only with improccoordinator for (int i = 0; i < 48000; i++) { // if (chropC) { float hvalc = dCcurve[i]; - int hic = (int)(255.0 * CLIPD(hvalc)); // + int hic = (int) (255.0 * CLIPD (hvalc)); // histCCAM[hic] += hist16_CCAM[i] ; } } @@ -1460,9 +1506,9 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh // Copyright (c) 2012 Jacques Desmis void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve2, const ColorAppearance & customColCurve3, - LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, int scalecd, int rtt) + LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt) { - if(params->colorappearance.enabled) { + if (params->colorappearance.enabled) { #ifdef _DEBUG MyTime t1e, t2e; @@ -1473,10 +1519,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int LUTu hist16JCAM; LUTu hist16_CCAM; - if(pW != 1 && params->colorappearance.datacie) { //only with improccoordinator - hist16JCAM(32768); + if (pW != 1 && params->colorappearance.datacie) { //only with improccoordinator + hist16JCAM (32768); hist16JCAM.clear(); - hist16_CCAM(48000); + hist16_CCAM (48000); hist16_CCAM.clear(); } @@ -1487,55 +1533,74 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float Yw; Yw = 1.0; double Xw, Zw; - float f, nc, yb, la, c, xw, yw, zw, f2, c2, nc2, yb2; + float f = 0.f, nc = 0.f, la, c = 0.f, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2; float fl, n, nbb, ncb, aw; //d - float xwd, ywd, zwd; + float xwd, ywd, zwd, xws, yws, zws; int alg = 0; bool algepd = false; + double Xwout, Zwout; + double Xwsc, Zwsc; const bool epdEnabled = params->epd.enabled; - bool ciedata = (params->colorappearance.datacie && pW != 1) && !((params->colorappearance.tonecie && (epdEnabled)) || (params->sharpening.enabled && settings->autocielab && execsharp) + bool ciedata = (params->colorappearance.datacie && pW != 1) && ! ((params->colorappearance.tonecie && (epdEnabled)) || (params->sharpening.enabled && settings->autocielab && execsharp) || (params->dirpyrequalizer.enabled && settings->autocielab) || (params->defringe.enabled && settings->autocielab) || (params->sharpenMicro.enabled && settings->autocielab) || (params->impulseDenoise.enabled && settings->autocielab) || (params->colorappearance.badpixsl > 0 && settings->autocielab)); ColorTemp::temp2mulxyz (params->wb.temperature, params->wb.green, params->wb.method, Xw, Zw); //compute white Xw Yw Zw : white current WB + ColorTemp::temp2mulxyz (params->colorappearance.tempout, params->colorappearance.greenout, "Custom", Xwout, Zwout); + ColorTemp::temp2mulxyz (params->colorappearance.tempsc, params->colorappearance.greensc, "Custom", Xwsc, Zwsc); - //viewing condition for surround - if(params->colorappearance.surround == "Average") { + //viewing condition for surrsrc + if (params->colorappearance.surrsrc == "Average") { f = 1.00f; c = 0.69f; nc = 1.00f; + } else if (params->colorappearance.surrsrc == "Dim") { + f = 0.9f; + c = 0.59f; + nc = 0.9f; + } else if (params->colorappearance.surrsrc == "Dark") { + f = 0.8f; + c = 0.525f; + nc = 0.8f; + } else if (params->colorappearance.surrsrc == "ExtremelyDark") { + f = 0.8f; + c = 0.41f; + nc = 0.8f; + } + + + //viewing condition for surround + if (params->colorappearance.surround == "Average") { f2 = 1.0f, c2 = 0.69f, nc2 = 1.0f; - } else if(params->colorappearance.surround == "Dim") { + } else if (params->colorappearance.surround == "Dim") { f2 = 0.9f; c2 = 0.59f; nc2 = 0.9f; - f = 1.0f, c = 0.69f, nc = 1.0f; - } else if(params->colorappearance.surround == "Dark") { + } else if (params->colorappearance.surround == "Dark") { f2 = 0.8f; c2 = 0.525f; nc2 = 0.8f; - f = 1.0f, c = 0.69f, nc = 1.0f; - } else if(params->colorappearance.surround == "ExtremelyDark") { + } else if (params->colorappearance.surround == "ExtremelyDark") { f2 = 0.8f; c2 = 0.41f; nc2 = 0.8f; - f = 1.0f, c = 0.69f, nc = 1.0f; - } - - //scene condition for surround - if(params->colorappearance.surrsource) { - f = 0.85f; // if user => source image has surround very dark - c = 0.55f; - nc = 0.85f; } + /* + //scene condition for surround + if (params->colorappearance.surrsource) { + f = 0.85f; // if user => source image has surround very dark + c = 0.55f; + nc = 0.85f; + } + */ //with which algorithm if (params->colorappearance.algo == "JC") { alg = 0; - } else if(params->colorappearance.algo == "JS") { + } else if (params->colorappearance.algo == "JS") { alg = 1; - } else if(params->colorappearance.algo == "QM") { + } else if (params->colorappearance.algo == "QM") { alg = 2; algepd = true; } else { /*if(params->colorappearance.algo == "ALL")*/ @@ -1543,104 +1608,122 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int algepd = true; } - //settings white point of output device - or illuminant viewing - if(settings->viewingdevice == 0) { - xwd = 96.42f; //5000K - ywd = 100.0f; - zwd = 82.52f; - } else if(settings->viewingdevice == 1) { - xwd = 95.68f; //5500 - ywd = 100.0f; - zwd = 92.15f; - } else if(settings->viewingdevice == 2) { - xwd = 95.24f; //6000 - ywd = 100.0f; - zwd = 100.81f; - } else if(settings->viewingdevice == 3) { - xwd = 95.04f; //6500 - ywd = 100.0f; - zwd = 108.88f; - } else if(settings->viewingdevice == 4) { - xwd = 109.85f; //tungsten - ywd = 100.0f; - zwd = 35.58f; - } else if(settings->viewingdevice == 5) { - xwd = 99.18f; //fluo F2 - ywd = 100.0f; - zwd = 67.39f; - } else if(settings->viewingdevice == 6) { - xwd = 95.04f; //fluo F7 - ywd = 100.0f; - zwd = 108.75f; - } else { /*if(settings->viewingdevice == 7) */ - xwd = 100.96f; //fluo F11 - ywd = 100.0f; - zwd = 64.35f; - } + xwd = 100.f * Xwout; + zwd = 100.f * Zwout; + ywd = 100.f / params->colorappearance.greenout;//approximation to simplify + + xws = 100.f * Xwsc; + zws = 100.f * Zwsc; + yws = 100.f / params->colorappearance.greensc;//approximation to simplify - //settings mean Luminance Y of output device or viewing - if(settings->viewingdevicegrey == 0) { - yb2 = 5.0f; - } else if(settings->viewingdevicegrey == 1) { - yb2 = 10.0f; - } else if(settings->viewingdevicegrey == 2) { - yb2 = 15.0f; - } else if(settings->viewingdevicegrey == 3) { - yb2 = 18.0f; - } else if(settings->viewingdevicegrey == 4) { - yb2 = 23.0f; - } else if(settings->viewingdevicegrey == 5) { - yb2 = 30.0f; - } else { /* if(settings->viewingdevicegrey == 6)*/ - yb2 = 40.0f; - } - + /* + //settings white point of output device - or illuminant viewing + if (settings->viewingdevice == 0) { + xwd = 96.42f; //5000K + ywd = 100.0f; + zwd = 82.52f; + } else if (settings->viewingdevice == 1) { + xwd = 95.68f; //5500 + ywd = 100.0f; + zwd = 92.15f; + } else if (settings->viewingdevice == 2) { + xwd = 95.24f; //6000 + ywd = 100.0f; + zwd = 100.81f; + } else if (settings->viewingdevice == 3) { + xwd = 95.04f; //6500 + ywd = 100.0f; + zwd = 108.88f; + } else if (settings->viewingdevice == 4) { + xwd = 109.85f; //tungsten + ywd = 100.0f; + zwd = 35.58f; + } else if (settings->viewingdevice == 5) { + xwd = 99.18f; //fluo F2 + ywd = 100.0f; + zwd = 67.39f; + } else if (settings->viewingdevice == 6) { + xwd = 95.04f; //fluo F7 + ywd = 100.0f; + zwd = 108.75f; + } else { + xwd = 100.96f; //fluo F11 + ywd = 100.0f; + zwd = 64.35f; + } + */ + yb2 = params->colorappearance.ybout; + /* + //settings mean Luminance Y of output device or viewing + if (settings->viewingdevicegrey == 0) { + yb2 = 5.0f; + } else if (settings->viewingdevicegrey == 1) { + yb2 = 10.0f; + } else if (settings->viewingdevicegrey == 2) { + yb2 = 15.0f; + } else if (settings->viewingdevicegrey == 3) { + yb2 = 18.0f; + } else if (settings->viewingdevicegrey == 4) { + yb2 = 23.0f; + } else if (settings->viewingdevicegrey == 5) { + yb2 = 30.0f; + } else { + yb2 = 40.0f; + } + */ //La and la2 = ambiant luminosity scene and viewing - la = float(params->colorappearance.adapscen); + la = float (params->colorappearance.adapscen); - if(pwb == 2) { - if(params->colorappearance.autoadapscen) { + if (pwb == 2) { + if (params->colorappearance.autoadapscen) { la = adap; } } - const float la2 = float(params->colorappearance.adaplum); + if (alg >= 2 && la < 200.f) { + la = 200.f; + } + + const float la2 = float (params->colorappearance.adaplum); // level of adaptation const float deg = (params->colorappearance.degree) / 100.0f; const float pilot = params->colorappearance.autodegree ? 2.0f : deg; + const float degout = (params->colorappearance.degreeout) / 100.0f; + const float pilotout = params->colorappearance.autodegreeout ? 2.0f : degout; + //algoritm's params float chr = 0.f; - if(alg == 0 || alg == 3) { + if (alg == 0 || alg == 3) { chr = params->colorappearance.chroma; - if(chr == -100.0f) { + if (chr == -100.0f) { chr = -99.8f; } } float schr = 0.f; - if(alg == 3 || alg == 1) { + if (alg == 3 || alg == 1) { schr = params->colorappearance.schroma; - if(schr > 0.0) { + if (schr > 0.0) { schr = schr / 2.0f; //divide sensibility for saturation } - if(alg == 3) { - if(schr == -100.0f) { + if (alg == 3) { + if (schr == -100.0f) { schr = -99.f; } - if(schr == 100.0f) { + if (schr == 100.0f) { schr = 98.f; } } else { - if(schr == -100.0f) { + if (schr == -100.0f) { schr = -99.8f; } } @@ -1648,14 +1731,14 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float mchr = 0.f; - if(alg == 3 || alg == 2) { + if (alg == 3 || alg == 2) { mchr = params->colorappearance.mchroma; - if(mchr == -100.0f) { + if (mchr == -100.0f) { mchr = -99.8f ; } - if(mchr == 100.0f) { + if (mchr == 100.0f) { mchr = 99.9f; } } @@ -1665,35 +1748,21 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int // extracting datas from 'params' to avoid cache flush (to be confirmed) const ColorAppearanceParams::eTCModeId curveMode = params->colorappearance.curveMode; - const bool hasColCurve1 = bool(customColCurve1); - bool t1L = false; - bool t1B = false; - - if (hasColCurve1 && curveMode == ColorAppearanceParams::TC_MODE_LIGHT) { - t1L = true; - } - - if(hasColCurve1 && curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) { - t1B = true; - } + const bool hasColCurve1 = bool (customColCurve1); + const bool t1L = hasColCurve1 && curveMode == ColorAppearanceParams::TC_MODE_LIGHT; const ColorAppearanceParams::eTCModeId curveMode2 = params->colorappearance.curveMode2; - const bool hasColCurve2 = bool(customColCurve2); - bool t2B = false; - - if(hasColCurve2 && curveMode2 == ColorAppearanceParams::TC_MODE_BRIGHT) { - t2B = true; - } + const bool hasColCurve2 = bool (customColCurve2); const ColorAppearanceParams::eCTCModeId curveMode3 = params->colorappearance.curveMode3; - const bool hasColCurve3 = bool(customColCurve3); + const bool hasColCurve3 = bool (customColCurve3); bool needJ = (alg == 0 || alg == 1 || alg == 3); bool needQ = (alg == 2 || alg == 3); LUTu hist16J; LUTu hist16Q; - if((needJ && CAMBrightCurveJ.dirty) || (needQ && CAMBrightCurveQ.dirty) || (std::isnan(mean) && settings->viewinggreySc != 0)) { + if ((needJ && CAMBrightCurveJ.dirty) || (needQ && CAMBrightCurveQ.dirty) || (std::isnan (mean) && settings->viewinggreySc != 0)) { if (needJ) { hist16J (32768); @@ -1708,7 +1777,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float sum = 0.f; #ifdef _OPENMP - const int numThreads = min(max(width * height / 65536, 1), omp_get_max_threads()); + const int numThreads = min (max (width * height / 65536, 1), omp_get_max_threads()); #pragma omp parallel num_threads(numThreads) if(numThreads>1) #endif { @@ -1716,12 +1785,12 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int LUTu hist16Qthr; if (needJ) { - hist16Jthr(hist16J.getSize()); + hist16Jthr (hist16J.getSize()); hist16Jthr.clear(); } if (needQ) { - hist16Qthr(hist16Q.getSize()); + hist16Qthr (hist16Q.getSize()); hist16Qthr.clear(); } @@ -1732,10 +1801,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float currL = lab->L[i][j] / 327.68f; float koef; //rough correspondence between L and J - if(currL > 50.f) { - if(currL > 70.f) { - if(currL > 80.f) { - if(currL > 85.f) { + if (currL > 50.f) { + if (currL > 70.f) { + if (currL > 80.f) { + if (currL > 85.f) { koef = 0.97f; } else { koef = 0.93f; @@ -1751,9 +1820,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } } } else { - if(currL > 10.f) { - if(currL > 20.f) { - if(currL > 40.f) { + if (currL > 10.f) { + if (currL > 20.f) { + if (currL > 40.f) { koef = 0.75f; } else { koef = 0.7f; @@ -1767,11 +1836,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } if (needJ) { - hist16Jthr[(int)((koef * lab->L[i][j]))]++; //evaluate histogram luminance L # J + hist16Jthr[ (int) ((koef * lab->L[i][j]))]++; //evaluate histogram luminance L # J } if (needQ) { - hist16Qthr[(int) (sqrtf((koef * (lab->L[i][j])) * 32768.f))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L + hist16Qthr[ (int) (sqrtf ((koef * (lab->L[i][j])) * 32768.f))]++; //for brightness Q : approximation for Q=wh*sqrt(J/100) J not equal L } sum += koef * lab->L[i][j]; //evaluate mean J to calculate Yb @@ -1779,17 +1848,17 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int #pragma omp critical { - if(needJ) { + if (needJ) { hist16J += hist16Jthr; } - if(needQ) { + if (needQ) { hist16Q += hist16Qthr; } } - if(std::isnan(mean)) { + if (std::isnan (mean)) { mean = (sum / ((height) * width)) / 327.68f; //for Yb for all image...if one day "pipette" we can adapt Yb for each zone } } @@ -1799,32 +1868,38 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int //evaluate lightness, contrast } - if(settings->viewinggreySc == 0) { //auto + + + // if (settings->viewinggreySc == 0) { //auto + if (params->colorappearance.autoybscen && pwb == 2) {//auto + if (mean < 15.f) { yb = 3.0f; - } else if(mean < 30.f) { + } else if (mean < 30.f) { yb = 5.0f; - } else if(mean < 40.f) { + } else if (mean < 40.f) { yb = 10.0f; - } else if(mean < 45.f) { + } else if (mean < 45.f) { yb = 15.0f; - } else if(mean < 50.f) { + } else if (mean < 50.f) { yb = 18.0f; - } else if(mean < 55.f) { + } else if (mean < 55.f) { yb = 23.0f; - } else if(mean < 60.f) { + } else if (mean < 60.f) { yb = 30.0f; - } else if(mean < 70.f) { + } else if (mean < 70.f) { yb = 40.0f; - } else if(mean < 80.f) { + } else if (mean < 80.f) { yb = 60.0f; - } else if(mean < 90.f) { + } else if (mean < 90.f) { yb = 80.0f; } else { yb = 90.0f; } - } else if(settings->viewinggreySc == 1) { - yb = 18.0f; //fixed + +// } else if (settings->viewinggreySc == 1) { + } else { + yb = (float) params->colorappearance.ybscen; } const bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated @@ -1833,32 +1908,40 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xw = 100.0f * Xw; yw = 100.0f * Yw; zw = 100.0f * Zw; - float xw1, yw1, zw1, xw2, yw2, zw2; + float xw1 = 0.f, yw1 = 0.f, zw1 = 0.f, xw2 = 0.f, yw2 = 0.f, zw2 = 0.f; // settings of WB: scene and viewing - if(params->colorappearance.wbmodel == "RawT") { + if (params->colorappearance.wbmodel == "RawT") { xw1 = 96.46f; //use RT WB; CAT 02 is used for output device (see prefreneces) yw1 = 100.0f; zw1 = 82.445f; xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else /*if(params->colorappearance.wbmodel == "RawTCAT02")*/ { + } else if (params->colorappearance.wbmodel == "RawTCAT02") { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; xw2 = xwd; yw2 = ywd; zw2 = zwd; + } else if (params->colorappearance.wbmodel == "free") { + xw1 = xws; // free temp and green + yw1 = yws; + zw1 = zws; + xw2 = xwd; + yw2 = ywd; + zw2 = zwd; } + float cz, wh, pfl; - Ciecam02::initcam1float(gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); - const float pow1 = pow_F( 1.64f - pow_F( 0.29f, n ), 0.73f ); - float nj, dj, nbbj, ncbj, czj, awj, flj; - Ciecam02::initcam2float(gamu, yb2, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); + Ciecam02::initcam1float (gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); + const float pow1 = pow_F ( 1.64f - pow_F ( 0.29f, n ), 0.73f ); + float nj, nbbj, ncbj, czj, awj, flj; + Ciecam02::initcam2float (gamu, yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); const float reccmcz = 1.f / (c2 * czj); - const float pow1n = pow_F( 1.64f - pow_F( 0.29f, nj ), 0.73f ); + const float pow1n = pow_F ( 1.64f - pow_F ( 0.29f, nj ), 0.73f ); const float epsil = 0.0001f; const float w_h = wh + epsil; @@ -1866,19 +1949,19 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int const float a_w = aw; const float c_ = c; const float f_l = fl; - const float coe = pow_F(fl, 0.25f); + const float coe = pow_F (fl, 0.25f); const float QproFactor = ( 0.4f / c ) * ( aw + 4.0f ) ; - const bool LabPassOne = !((params->colorappearance.tonecie && (epdEnabled)) || (params->sharpening.enabled && settings->autocielab && execsharp) - || (params->dirpyrequalizer.enabled && settings->autocielab) || (params->defringe.enabled && settings->autocielab) || (params->sharpenMicro.enabled && settings->autocielab) - || (params->impulseDenoise.enabled && settings->autocielab) || (params->colorappearance.badpixsl > 0 && settings->autocielab)); + const bool LabPassOne = ! ((params->colorappearance.tonecie && (epdEnabled)) || (params->sharpening.enabled && settings->autocielab && execsharp) + || (params->dirpyrequalizer.enabled && settings->autocielab) || (params->defringe.enabled && settings->autocielab) || (params->sharpenMicro.enabled && settings->autocielab) + || (params->impulseDenoise.enabled && settings->autocielab) || (params->colorappearance.badpixsl > 0 && settings->autocielab)); if (needJ) { if (!CAMBrightCurveJ) { - CAMBrightCurveJ(32768, LUT_CLIP_ABOVE); + CAMBrightCurveJ (32768, LUT_CLIP_ABOVE); } - if(CAMBrightCurveJ.dirty) { + if (CAMBrightCurveJ.dirty) { Ciecam02::curveJfloat (params->colorappearance.jlight, params->colorappearance.contrast, hist16J, CAMBrightCurveJ);//lightness and contrast J CAMBrightCurveJ /= 327.68f; CAMBrightCurveJ.dirty = false; @@ -1887,10 +1970,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int if (needQ) { if (!CAMBrightCurveQ) { - CAMBrightCurveQ(32768, LUT_CLIP_ABOVE); + CAMBrightCurveQ (32768, LUT_CLIP_ABOVE); } - if(CAMBrightCurveQ.dirty) { + if (CAMBrightCurveQ.dirty) { Ciecam02::curveJfloat (params->colorappearance.qbright, params->colorappearance.qcontrast, hist16Q, CAMBrightCurveQ);//brightness and contrast Q CAMBrightCurveQ /= coefQ; CAMBrightCurveQ.dirty = false; @@ -1899,11 +1982,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int //matrix for current working space - TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params->icm.working); + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params->icm.working); const float wip[3][3] = { - {(float)wiprof[0][0], (float)wiprof[0][1], (float)wiprof[0][2]}, - {(float)wiprof[1][0], (float)wiprof[1][1], (float)wiprof[1][2]}, - {(float)wiprof[2][0], (float)wiprof[2][1], (float)wiprof[2][2]} + { (float)wiprof[0][0], (float)wiprof[0][1], (float)wiprof[0][2]}, + { (float)wiprof[1][0], (float)wiprof[1][1], (float)wiprof[1][2]}, + { (float)wiprof[2][0], (float)wiprof[2][1], (float)wiprof[2][2]} }; #ifdef __SSE2__ @@ -1935,42 +2018,42 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int vfloat x, y, z; vfloat J, C, h, Q, M, s; - vfloat c655d35 = F2V(655.35f); + vfloat c655d35 = F2V (655.35f); - for(k = 0; k < width - 3; k += 4) { - Color::Lab2XYZ(LVFU(lab->L[i][k]), LVFU(lab->a[i][k]), LVFU(lab->b[i][k]), x, y, z); + for (k = 0; k < width - 3; k += 4) { + Color::Lab2XYZ (LVFU (lab->L[i][k]), LVFU (lab->a[i][k]), LVFU (lab->b[i][k]), x, y, z); x = x / c655d35; y = y / c655d35; z = z / c655d35; - Ciecam02::xyz2jchqms_ciecam02float( J, C, h, - Q, M, s, F2V(aw), F2V(fl), F2V(wh), - x, y, z, - F2V(xw1), F2V(yw1), F2V(zw1), - F2V(c), F2V(nc), F2V(pow1), F2V(nbb), F2V(ncb), F2V(pfl), F2V(cz), F2V(d)); - STVF(Jbuffer[k], J); - STVF(Cbuffer[k], C); - STVF(hbuffer[k], h); - STVF(Qbuffer[k], Q); - STVF(Mbuffer[k], M); - STVF(sbuffer[k], s); + Ciecam02::xyz2jchqms_ciecam02float ( J, C, h, + Q, M, s, F2V (aw), F2V (fl), F2V (wh), + x, y, z, + F2V (xw1), F2V (yw1), F2V (zw1), + F2V (c), F2V (nc), F2V (pow1), F2V (nbb), F2V (ncb), F2V (pfl), F2V (cz), F2V (d)); + STVF (Jbuffer[k], J); + STVF (Cbuffer[k], C); + STVF (hbuffer[k], h); + STVF (Qbuffer[k], Q); + STVF (Mbuffer[k], M); + STVF (sbuffer[k], s); } - for(; k < width; k++) { + for (; k < width; k++) { float L = lab->L[i][k]; float a = lab->a[i][k]; float b = lab->b[i][k]; float x, y, z; //convert Lab => XYZ - Color::Lab2XYZ(L, a, b, x, y, z); + Color::Lab2XYZ (L, a, b, x, y, z); x = x / 655.35f; y = y / 655.35f; z = z / 655.35f; float J, C, h, Q, M, s; - Ciecam02::xyz2jchqms_ciecam02float( J, C, h, - Q, M, s, aw, fl, wh, - x, y, z, - xw1, yw1, zw1, - c, nc, gamu, pow1, nbb, ncb, pfl, cz, d); + Ciecam02::xyz2jchqms_ciecam02float ( J, C, h, + Q, M, s, aw, fl, wh, + x, y, z, + xw1, yw1, zw1, + c, nc, gamu, pow1, nbb, ncb, pfl, cz, d); Jbuffer[k] = J; Cbuffer[k] = C; hbuffer[k] = h; @@ -1999,16 +2082,16 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float b = lab->b[i][j]; float x1, y1, z1; //convert Lab => XYZ - Color::Lab2XYZ(L, a, b, x1, y1, z1); + Color::Lab2XYZ (L, a, b, x1, y1, z1); x = (float)x1 / 655.35f; y = (float)y1 / 655.35f; z = (float)z1 / 655.35f; //process source==> normal - Ciecam02::xyz2jchqms_ciecam02float( J, C, h, - Q, M, s, aw, fl, wh, - x, y, z, - xw1, yw1, zw1, - c, nc, gamu, pow1, nbb, ncb, pfl, cz, d); + Ciecam02::xyz2jchqms_ciecam02float ( J, C, h, + Q, M, s, aw, fl, wh, + x, y, z, + xw1, yw1, zw1, + c, nc, gamu, pow1, nbb, ncb, pfl, cz, d); #endif float Jpro, Cpro, hpro, Qpro, Mpro, spro; Jpro = J; @@ -2019,75 +2102,75 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int spro = s; // we cannot have all algorithms with all chroma curves - if(alg == 0) { + if (alg == 0) { Jpro = CAMBrightCurveJ[Jpro * 327.68f]; //lightness CIECAM02 + contrast - Qpro = QproFactor * sqrtf(Jpro); + Qpro = QproFactor * sqrtf (Jpro); float Cp = (spro * spro * Qpro) / (1000000.f); Cpro = Cp * 100.f; float sres; - Ciecam02::curvecolorfloat(chr, Cp , sres, 1.8f); - Color::skinredfloat(Jpro, hpro, sres, Cp, 55.f, 30.f, 1, rstprotection, 100.f, Cpro); - } else if(alg == 1) { + Ciecam02::curvecolorfloat (chr, Cp, sres, 1.8f); + Color::skinredfloat (Jpro, hpro, sres, Cp, 55.f, 30.f, 1, rstprotection, 100.f, Cpro); + } else if (alg == 1) { // Lightness saturation Jpro = CAMBrightCurveJ[Jpro * 327.68f]; //lightness CIECAM02 + contrast float sres; float Sp = spro / 100.0f; float parsat = 1.5f; //parsat=1.5 =>saturation ; 1.8 => chroma ; 2.5 => colorfullness (personal evaluation) - Ciecam02::curvecolorfloat(schr, Sp , sres, parsat); + Ciecam02::curvecolorfloat (schr, Sp, sres, parsat); float dred = 100.f; // in C mode float protect_red = 80.0f; // in C mode - dred = 100.0f * sqrtf((dred * coe) / Qpro); - protect_red = 100.0f * sqrtf((protect_red * coe) / Qpro); - Color::skinredfloat(Jpro, hpro, sres, Sp, dred, protect_red, 0, rstprotection, 100.f, spro); - Qpro = QproFactor * sqrtf(Jpro); + dred = 100.0f * sqrtf ((dred * coe) / Qpro); + protect_red = 100.0f * sqrtf ((protect_red * coe) / Qpro); + Color::skinredfloat (Jpro, hpro, sres, Sp, dred, protect_red, 0, rstprotection, 100.f, spro); + Qpro = QproFactor * sqrtf (Jpro); Cpro = (spro * spro * Qpro) / (10000.0f); - } else if(alg == 2) { - Qpro = CAMBrightCurveQ[(float)(Qpro * coefQ)]; //brightness and contrast + } else if (alg == 2) { + Qpro = CAMBrightCurveQ[ (float) (Qpro * coefQ)]; //brightness and contrast float Mp, sres; Mp = Mpro / 100.0f; - Ciecam02::curvecolorfloat(mchr, Mp , sres, 2.5f); + Ciecam02::curvecolorfloat (mchr, Mp, sres, 2.5f); float dred = 100.f; //in C mode float protect_red = 80.0f; // in C mode dred *= coe; //in M mode protect_red *= coe; //M mode - Color::skinredfloat(Jpro, hpro, sres, Mp, dred, protect_red, 0, rstprotection, 100.f, Mpro); - Jpro = SQR((10.f * Qpro) / wh); + Color::skinredfloat (Jpro, hpro, sres, Mp, dred, protect_red, 0, rstprotection, 100.f, Mpro); + Jpro = SQR ((10.f * Qpro) / wh); Cpro = Mpro / coe; Qpro = (Qpro == 0.f ? epsil : Qpro); // avoid division by zero - spro = 100.0f * sqrtf( Mpro / Qpro ); + spro = 100.0f * sqrtf ( Mpro / Qpro ); } else { /*if(alg == 3) */ - Qpro = CAMBrightCurveQ[(float)(Qpro * coefQ)]; //brightness and contrast + Qpro = CAMBrightCurveQ[ (float) (Qpro * coefQ)]; //brightness and contrast float Mp, sres; Mp = Mpro / 100.0f; - Ciecam02::curvecolorfloat(mchr, Mp , sres, 2.5f); + Ciecam02::curvecolorfloat (mchr, Mp, sres, 2.5f); float dred = 100.f; //in C mode float protect_red = 80.0f; // in C mode dred *= coe; //in M mode protect_red *= coe; //M mode - Color::skinredfloat(Jpro, hpro, sres, Mp, dred, protect_red, 0, rstprotection, 100.f, Mpro); - Jpro = SQR((10.f * Qpro) / wh); + Color::skinredfloat (Jpro, hpro, sres, Mp, dred, protect_red, 0, rstprotection, 100.f, Mpro); + Jpro = SQR ((10.f * Qpro) / wh); Cpro = Mpro / coe; Qpro = (Qpro == 0.f ? epsil : Qpro); // avoid division by zero - spro = 100.0f * sqrtf( Mpro / Qpro ); + spro = 100.0f * sqrtf ( Mpro / Qpro ); - if(Jpro > 99.9f) { + if (Jpro > 99.9f) { Jpro = 99.9f; } - Jpro = CAMBrightCurveJ[(float)(Jpro * 327.68f)]; //lightness CIECAM02 + contrast + Jpro = CAMBrightCurveJ[ (float) (Jpro * 327.68f)]; //lightness CIECAM02 + contrast float Sp = spro / 100.0f; - Ciecam02::curvecolorfloat(schr, Sp , sres, 1.5f); + Ciecam02::curvecolorfloat (schr, Sp, sres, 1.5f); dred = 100.f; // in C mode protect_red = 80.0f; // in C mode - dred = 100.0f * sqrtf((dred * coe) / Q); - protect_red = 100.0f * sqrtf((protect_red * coe) / Q); - Color::skinredfloat(Jpro, hpro, sres, Sp, dred, protect_red, 0, rstprotection, 100.f, spro); - Qpro = QproFactor * sqrtf(Jpro); + dred = 100.0f * sqrtf ((dred * coe) / Q); + protect_red = 100.0f * sqrtf ((protect_red * coe) / Q); + Color::skinredfloat (Jpro, hpro, sres, Sp, dred, protect_red, 0, rstprotection, 100.f, spro); + Qpro = QproFactor * sqrtf (Jpro); float Cp = (spro * spro * Qpro) / (1000000.f); Cpro = Cp * 100.f; - Ciecam02::curvecolorfloat(chr, Cp , sres, 1.8f); - Color::skinredfloat(Jpro, hpro, sres, Cp, 55.f, 30.f, 1, rstprotection, 100.f, Cpro); + Ciecam02::curvecolorfloat (chr, Cp, sres, 1.8f); + Color::skinredfloat (Jpro, hpro, sres, Cp, 55.f, 30.f, 1, rstprotection, 100.f, Cpro); // disabled this code, Issue 2690 // if(Jpro < 1.f && Cpro > 12.f) Cpro=12.f;//reduce artifacts by "pseudo gamut control CIECAM" // else if(Jpro < 2.f && Cpro > 15.f) Cpro=15.f; @@ -2095,7 +2178,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int // else if(Jpro < 7.f && Cpro > 50.f) Cpro=50.f; hpro = hpro + hue; - if( hpro < 0.0f ) { + if ( hpro < 0.0f ) { hpro += 360.0f; //hue } } @@ -2107,27 +2190,27 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float Jold100 = (float) Jpro; float redu = 25.f; float reduc = 1.f; - const Lightcurve& userColCurveJ1 = static_cast(customColCurve1); - userColCurveJ1.Apply(Jj); + const Lightcurve& userColCurveJ1 = static_cast (customColCurve1); + userColCurveJ1.Apply (Jj); - if(Jj > Jold) { - if(Jj < 65535.f) { - if(Jold < 327.68f * redu) { + if (Jj > Jold) { + if (Jj < 65535.f) { + if (Jold < 327.68f * redu) { Jj = 0.3f * (Jj - Jold) + Jold; //divide sensibility } else { - reduc = LIM((100.f - Jold100) / (100.f - redu), 0.f, 1.f); + reduc = LIM ((100.f - Jold100) / (100.f - redu), 0.f, 1.f); Jj = 0.3f * reduc * (Jj - Jold) + Jold; //reduct sensibility in highlights } } - } else if(Jj > 10.f) { + } else if (Jj > 10.f) { Jj = 0.8f * (Jj - Jold) + Jold; } else if (Jj >= 0.f) { Jj = 0.90f * (Jj - Jold) + Jold; // not zero ==>artifacts } - Jpro = (float)(Jj / 327.68f); + Jpro = (float) (Jj / 327.68f); - if(Jpro < 1.f) { + if (Jpro < 1.f) { Jpro = 1.f; } } else if (curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) { @@ -2140,28 +2223,28 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float redu = 20.f; float reduc = 1.f; - const Brightcurve& userColCurveB1 = static_cast(customColCurve1); - userColCurveB1.Apply(Qq); + const Brightcurve& userColCurveB1 = static_cast (customColCurve1); + userColCurveB1.Apply (Qq); - if(Qq > Qold) { - if(Qq < 65535.f) { - if(Qold < 327.68f * redu) { + if (Qq > Qold) { + if (Qq < 65535.f) { + if (Qold < 327.68f * redu) { Qq = 0.25f * (Qq - Qold) + Qold; //divide sensibility } else { - reduc = LIM((100.f - Qold100) / (100.f - redu), 0.f, 1.f); + reduc = LIM ((100.f - Qold100) / (100.f - redu), 0.f, 1.f); Qq = 0.25f * reduc * (Qq - Qold) + Qold; //reduct sensibility in highlights } } - } else if(Qq > 10.f) { + } else if (Qq > 10.f) { Qq = 0.5f * (Qq - Qold) + Qold; } else if (Qq >= 0.f) { Qq = 0.7f * (Qq - Qold) + Qold; // not zero ==>artifacts } - Qpro = (float)(Qq * (coef) / 327.68f); + Qpro = (float) (Qq * (coef) / 327.68f); Jpro = 100.f * (Qpro * Qpro) / ((4.0f / c) * (4.0f / c) * (aw + 4.0f) * (aw + 4.0f)); - if(Jpro < 1.f) { + if (Jpro < 1.f) { Jpro = 1.f; } } @@ -2174,35 +2257,35 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float Jold100 = (float) Jpro; float redu = 25.f; float reduc = 1.f; - const Lightcurve& userColCurveJ2 = static_cast(customColCurve2); - userColCurveJ2.Apply(Jj); + const Lightcurve& userColCurveJ2 = static_cast (customColCurve2); + userColCurveJ2.Apply (Jj); - if(Jj > Jold) { - if(Jj < 65535.f) { - if(Jold < 327.68f * redu) { + if (Jj > Jold) { + if (Jj < 65535.f) { + if (Jold < 327.68f * redu) { Jj = 0.3f * (Jj - Jold) + Jold; //divide sensibility } else { - reduc = LIM((100.f - Jold100) / (100.f - redu), 0.f, 1.f); + reduc = LIM ((100.f - Jold100) / (100.f - redu), 0.f, 1.f); Jj = 0.3f * reduc * (Jj - Jold) + Jold; //reduct sensibility in highlights } } - } else if(Jj > 10.f) { - if(!t1L) { + } else if (Jj > 10.f) { + if (!t1L) { Jj = 0.8f * (Jj - Jold) + Jold; } else { Jj = 0.4f * (Jj - Jold) + Jold; } } else if (Jj >= 0.f) { - if(!t1L) { + if (!t1L) { Jj = 0.90f * (Jj - Jold) + Jold; // not zero ==>artifacts } else { Jj = 0.5f * (Jj - Jold) + Jold; } } - Jpro = (float)(Jj / 327.68f); + Jpro = (float) (Jj / 327.68f); - if(Jpro < 1.f) { + if (Jpro < 1.f) { Jpro = 1.f; } @@ -2215,39 +2298,39 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float redu = 20.f; float reduc = 1.f; - const Brightcurve& userColCurveB2 = static_cast(customColCurve2); - userColCurveB2.Apply(Qq); + const Brightcurve& userColCurveB2 = static_cast (customColCurve2); + userColCurveB2.Apply (Qq); - if(Qq > Qold) { - if(Qq < 65535.f) { - if(Qold < 327.68f * redu) { + if (Qq > Qold) { + if (Qq < 65535.f) { + if (Qold < 327.68f * redu) { Qq = 0.25f * (Qq - Qold) + Qold; //divide sensibility } else { - reduc = LIM((100.f - Qold100) / (100.f - redu), 0.f, 1.f); + reduc = LIM ((100.f - Qold100) / (100.f - redu), 0.f, 1.f); Qq = 0.25f * reduc * (Qq - Qold) + Qold; //reduct sensibility in highlights } } - } else if(Qq > 10.f) { + } else if (Qq > 10.f) { Qq = 0.5f * (Qq - Qold) + Qold; } else if (Qq >= 0.f) { Qq = 0.7f * (Qq - Qold) + Qold; // not zero ==>artifacts } - Qpro = (float)(Qq * (coef) / 327.68f); + Qpro = (float) (Qq * (coef) / 327.68f); Jpro = 100.f * (Qpro * Qpro) / ((4.0f / c) * (4.0f / c) * (aw + 4.0f) * (aw + 4.0f)); - if(t1L) { //to workaround the problem if we modify curve1-lightnees after curve2 brightness(the cat that bites its own tail!) in fact it's another type of curve only for this case + if (t1L) { //to workaround the problem if we modify curve1-lightnees after curve2 brightness(the cat that bites its own tail!) in fact it's another type of curve only for this case coef = 2.f; //adapt Q to J approximation Qq = (float) Qpro * coef; Qold = Qq; - const Lightcurve& userColCurveJ1 = static_cast(customColCurve1); - userColCurveJ1.Apply(Qq); + const Lightcurve& userColCurveJ1 = static_cast (customColCurve1); + userColCurveJ1.Apply (Qq); Qq = 0.05f * (Qq - Qold) + Qold; //approximative adaptation - Qpro = (float)(Qq / coef); + Qpro = (float) (Qq / coef); Jpro = 100.f * (Qpro * Qpro) / ((4.0f / c) * (4.0f / c) * (aw + 4.0f) * (aw + 4.0f)); } - if(Jpro < 1.f) { + if (Jpro < 1.f) { Jpro = 1.f; } } @@ -2259,13 +2342,13 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float coef = 327.68f / parsat; float Cc = (float) Cpro * coef; float Ccold = Cc; - const Chromacurve& userColCurve = static_cast(customColCurve3); - userColCurve.Apply(Cc); + const Chromacurve& userColCurve = static_cast (customColCurve3); + userColCurve.Apply (Cc); float dred = 55.f; float protect_red = 30.0f; int sk = 1; float ko = 1.f / coef; - Color::skinredfloat(Jpro, hpro, Cc, Ccold, dred, protect_red, sk, rstprotection, ko, Cpro); + Color::skinredfloat (Jpro, hpro, Cc, Ccold, dred, protect_red, sk, rstprotection, ko, Cpro); /* if(Jpro < 1.f && Cpro > 12.f) { Cpro = 12.f; //reduce artifacts by "pseudo gamut control CIECAM" @@ -2282,32 +2365,32 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float coef = 327.68f / parsat; float Ss = (float) spro * coef; float Sold = Ss; - const Saturcurve& userColCurve = static_cast(customColCurve3); - userColCurve.Apply(Ss); + const Saturcurve& userColCurve = static_cast (customColCurve3); + userColCurve.Apply (Ss); Ss = 0.6f * (Ss - Sold) + Sold; //divide sensibility saturation float dred = 100.f; // in C mode float protect_red = 80.0f; // in C mode - dred = 100.0f * sqrtf((dred * coe) / Qpro); - protect_red = 100.0f * sqrtf((protect_red * coe) / Qpro); + dred = 100.0f * sqrtf ((dred * coe) / Qpro); + protect_red = 100.0f * sqrtf ((protect_red * coe) / Qpro); int sk = 0; float ko = 1.f / coef; - Color::skinredfloat(Jpro, hpro, Ss, Sold, dred, protect_red, sk, rstprotection, ko, spro); - Qpro = ( 4.0f / c ) * sqrtf( Jpro / 100.0f ) * ( aw + 4.0f ) ; + Color::skinredfloat (Jpro, hpro, Ss, Sold, dred, protect_red, sk, rstprotection, ko, spro); + Qpro = ( 4.0f / c ) * sqrtf ( Jpro / 100.0f ) * ( aw + 4.0f ) ; Cpro = (spro * spro * Qpro) / (10000.0f); } else if (curveMode3 == ColorAppearanceParams::TC_MODE_COLORF) { // float parsat = 0.8f; //0.68; float coef = 327.68f / parsat; float Mm = (float) Mpro * coef; float Mold = Mm; - const Colorfcurve& userColCurve = static_cast(customColCurve3); - userColCurve.Apply(Mm); + const Colorfcurve& userColCurve = static_cast (customColCurve3); + userColCurve.Apply (Mm); float dred = 100.f; //in C mode float protect_red = 80.0f; // in C mode dred *= coe; //in M mode protect_red *= coe; int sk = 0; float ko = 1.f / coef; - Color::skinredfloat(Jpro, hpro, Mm, Mold, dred, protect_red, sk, rstprotection, ko, Mpro); + Color::skinredfloat (Jpro, hpro, Mm, Mold, dred, protect_red, sk, rstprotection, ko, Mpro); /* if(Jpro < 1.f && Mpro > 12.f * coe) { Mpro = 12.f * coe; //reduce artifacts by "pseudo gamut control CIECAM" @@ -2334,28 +2417,28 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int h = hpro; s = spro; - if(params->colorappearance.tonecie || settings->autocielab) { //use pointer for tonemapping with CIECAM and also sharpening , defringe, contrast detail + if (params->colorappearance.tonecie || settings->autocielab) { //use pointer for tonemapping with CIECAM and also sharpening , defringe, contrast detail ncie->Q_p[i][j] = (float)Q + epsil; //epsil to avoid Q=0 ncie->M_p[i][j] = (float)M + epsil; ncie->J_p[i][j] = (float)J + epsil; ncie->h_p[i][j] = (float)h; ncie->C_p[i][j] = (float)C + epsil; - ncie->sh_p[i][j] = (float) 3276.8f * (sqrtf( J ) ) ; + ncie->sh_p[i][j] = (float) 3276.8f * (sqrtf ( J ) ) ; - if(epdEnabled) { - if(ncie->Q_p[i][j] < minQThr) { + if (epdEnabled) { + if (ncie->Q_p[i][j] < minQThr) { minQThr = ncie->Q_p[i][j]; //minima } - if(ncie->Q_p[i][j] > maxQThr) { + if (ncie->Q_p[i][j] > maxQThr) { maxQThr = ncie->Q_p[i][j]; //maxima } } } - if(!params->colorappearance.tonecie || !settings->autocielab || !epdEnabled) { + if (!params->colorappearance.tonecie || !settings->autocielab || !epdEnabled) { - if(ciedata) { //only with improccoordinator + if (ciedata) { //only with improccoordinator // Data for J Q M s and C histograms int posl, posc; float brli = 327.f; @@ -2364,7 +2447,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float colch; //update histogram - if(curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) { + if (curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) { brli = 70.0f; libr = Q; //40.0 to 100.0 approximative factor for Q - 327 for J } else { /*if(curveMode == ColorAppearanceParams::TC_MODE_LIGHT)*/ @@ -2372,26 +2455,26 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int libr = J; //327 for J } - posl = (int)(libr * brli); + posl = (int) (libr * brli); hist16JCAM[posl]++; if (curveMode3 == ColorAppearanceParams::TC_MODE_CHROMA) { - chsacol = 327.f; + chsacol = 400.f;//327 colch = C; //450.0 approximative factor for s 320 for M - } else if(curveMode3 == ColorAppearanceParams::TC_MODE_SATUR) { + } else if (curveMode3 == ColorAppearanceParams::TC_MODE_SATUR) { chsacol = 450.0f; colch = s; } else { /*if(curveMode3 == ColorAppearanceParams::TC_MODE_COLORF)*/ - chsacol = 327.0f; + chsacol = 400.0f;//327 colch = M; } - posc = (int)(colch * chsacol); + posc = (int) (colch * chsacol); hist16_CCAM[posc]++; } - if(LabPassOne) { + if (LabPassOne) { #ifdef __SSE2__ // write to line buffers Jbuffer[j] = J; @@ -2401,27 +2484,27 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float xx, yy, zz; //process normal==> viewing - Ciecam02::jch2xyz_ciecam02float( xx, yy, zz, - J, C, h, - xw2, yw2, zw2, - f2, c2, nc2, gamu, pow1n, nbbj, ncbj, flj, czj, dj, awj); + Ciecam02::jch2xyz_ciecam02float ( xx, yy, zz, + J, C, h, + xw2, yw2, zw2, + f2, c2, nc2, gamu, pow1n, nbbj, ncbj, flj, czj, dj, awj); float x, y, z; x = xx * 655.35f; y = yy * 655.35f; z = zz * 655.35f; float Ll, aa, bb; //convert xyz=>lab - Color::XYZ2Lab(x, y, z, Ll, aa, bb); + Color::XYZ2Lab (x, y, z, Ll, aa, bb); // gamut control in Lab mode; I must study how to do with cIECAM only - if(gamu == 1) { + if (gamu == 1) { float HH, Lprov1, Chprov1; Lprov1 = Ll / 327.68f; - Chprov1 = sqrtf(SQR(aa) + SQR(bb)) / 327.68f; - HH = xatan2f(bb, aa); + Chprov1 = sqrtf (SQR (aa) + SQR (bb)) / 327.68f; + HH = xatan2f (bb, aa); float2 sincosval; - if(Chprov1 == 0.0f) { + if (Chprov1 == 0.0f) { sincosval.y = 1.f; sincosval.x = 0.0f; } else { @@ -2434,10 +2517,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int bool neg = false; bool more_rgb = false; //gamut control : Lab values are in gamut - Color::gamutLchonly(sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f, neg, more_rgb); + Color::gamutLchonly (sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f, neg, more_rgb); #else //gamut control : Lab values are in gamut - Color::gamutLchonly(sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f); + Color::gamutLchonly (sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f); #endif lab->L[i][j] = Lprov1 * 327.68f; @@ -2461,32 +2544,31 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float *ybuffer = Mbuffer; float *zbuffer = sbuffer; - for(k = 0; k < bufferLength; k += 4) { - Ciecam02::jch2xyz_ciecam02float( x, y, z, - LVF(Jbuffer[k]), LVF(Cbuffer[k]), LVF(hbuffer[k]), - F2V(xw2), F2V(yw2), F2V(zw2), - F2V(f2), F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz)); - STVF(xbuffer[k], x * c655d35); - STVF(ybuffer[k], y * c655d35); - STVF(zbuffer[k], z * c655d35); + for (k = 0; k < bufferLength; k += 4) { + Ciecam02::jch2xyz_ciecam02float ( x, y, z, + LVF (Jbuffer[k]), LVF (Cbuffer[k]), LVF (hbuffer[k]), + F2V (xw2), F2V (yw2), F2V (zw2), + F2V (f2), F2V (nc2), F2V (pow1n), F2V (nbbj), F2V (ncbj), F2V (flj), F2V (dj), F2V (awj), F2V (reccmcz)); + STVF (xbuffer[k], x * c655d35); + STVF (ybuffer[k], y * c655d35); + STVF (zbuffer[k], z * c655d35); } // XYZ2Lab uses a lookup table. The function behind that lut is a cube root. // SSE can't beat the speed of that lut, so it doesn't make sense to use SSE - for(int j = 0; j < width; j++) { + for (int j = 0; j < width; j++) { float Ll, aa, bb; //convert xyz=>lab - Color::XYZ2Lab(xbuffer[j], ybuffer[j], zbuffer[j], Ll, aa, bb); + Color::XYZ2Lab (xbuffer[j], ybuffer[j], zbuffer[j], Ll, aa, bb); // gamut control in Lab mode; I must study how to do with cIECAM only - if(gamu == 1) { - float HH, Lprov1, Chprov1; + if (gamu == 1) { + float Lprov1, Chprov1; Lprov1 = Ll / 327.68f; - Chprov1 = sqrtf(SQR(aa) + SQR(bb)) / 327.68f; - HH = xatan2f(bb, aa); + Chprov1 = sqrtf (SQR (aa) + SQR (bb)) / 327.68f; float2 sincosval; - if(Chprov1 == 0.0f) { + if (Chprov1 == 0.0f) { sincosval.y = 1.f; sincosval.x = 0.0f; } else { @@ -2498,10 +2580,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int bool neg = false; bool more_rgb = false; //gamut control : Lab values are in gamut - Color::gamutLchonly(sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f, neg, more_rgb); + Color::gamutLchonly (sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f, neg, more_rgb); #else //gamut control : Lab values are in gamut - Color::gamutLchonly(sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f); + Color::gamutLchonly (sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f); #endif lab->L[i][j] = Lprov1 * 327.68f; lab->a[i][j] = 327.68f * Chprov1 * sincosval.y; @@ -2518,24 +2600,24 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int #pragma omp critical { - if(minQThr < minQ) { + if (minQThr < minQ) { minQ = minQThr; } - if(maxQThr > maxQ) { + if (maxQThr > maxQ) { maxQ = maxQThr; } } } // End of parallelization - if(!params->colorappearance.tonecie || !settings->autocielab) { //normal + if (!params->colorappearance.tonecie || !settings->autocielab) { //normal - if(ciedata) { + if (ciedata) { //update histogram J - hist16JCAM.compressTo(histLCAM); + hist16JCAM.compressTo (histLCAM); //update histogram C - hist16_CCAM.compressTo(histCCAM); + hist16_CCAM.compressTo (histCCAM); } } @@ -2543,14 +2625,14 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int if (settings->verbose) { t2e.set(); - printf("CIECAM02 performed in %d usec:\n", t2e.etime(t1e)); + printf ("CIECAM02 performed in %d usec:\n", t2e.etime (t1e)); // printf("minc=%f maxc=%f minj=%f maxj=%f\n",minc,maxc,minj,maxj); } #endif - if(settings->autocielab) { - if((params->colorappearance.tonecie && (epdEnabled)) || (params->sharpening.enabled && settings->autocielab && execsharp) + if (settings->autocielab) { + if ((params->colorappearance.tonecie && (epdEnabled)) || (params->sharpening.enabled && settings->autocielab && execsharp) || (params->dirpyrequalizer.enabled && settings->autocielab) || (params->defringe.enabled && settings->autocielab) || (params->sharpenMicro.enabled && settings->autocielab) || (params->impulseDenoise.enabled && settings->autocielab) || (params->colorappearance.badpixsl > 0 && settings->autocielab)) { @@ -2558,47 +2640,47 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int //all this treatments reduce artefacts, but can leed to slighty different results - if(params->defringe.enabled) - if(execsharp) { + if (params->defringe.enabled) + if (execsharp) { lab->deleteLab(); ImProcFunctions::defringecam (ncie);//defringe adapted to CIECAM lab->reallocLab(); } //if(params->dirpyrequalizer.enabled) if(execsharp) { - if(params->dirpyrequalizer.enabled) { - if(params->dirpyrequalizer.gamutlab /*&& execsharp*/) {//remove artifacts by gaussian blur - skin control - float b_l = static_cast(params->dirpyrequalizer.hueskin.value[0]) / 100.0f; - float t_l = static_cast(params->dirpyrequalizer.hueskin.value[1]) / 100.0f; - float b_r = static_cast(params->dirpyrequalizer.hueskin.value[2]) / 100.0f; - float t_r = static_cast(params->dirpyrequalizer.hueskin.value[3]) / 100.0f; + if (params->dirpyrequalizer.enabled) { + if (params->dirpyrequalizer.gamutlab /*&& execsharp*/) { //remove artifacts by gaussian blur - skin control + float b_l = static_cast (params->dirpyrequalizer.hueskin.value[0]) / 100.0f; + float t_l = static_cast (params->dirpyrequalizer.hueskin.value[1]) / 100.0f; + float b_r = static_cast (params->dirpyrequalizer.hueskin.value[2]) / 100.0f; + float t_r = static_cast (params->dirpyrequalizer.hueskin.value[3]) / 100.0f; float artifact = (float) settings->artifact_cbdl; - if(artifact > 6.f) { + if (artifact > 6.f) { artifact = 6.f; } - if(artifact < 0.f) { + if (artifact < 0.f) { artifact = 1.f; } int hotbad = 0; float chrom = 50.f; lab->deleteLab(); - ImProcFunctions::badpixcam (ncie, artifact, 5, 2 , b_l, t_l, t_r, b_r, params->dirpyrequalizer.skinprotect, chrom, hotbad); //enabled remove artifacts for cbDL + ImProcFunctions::badpixcam (ncie, artifact, 5, 2, b_l, t_l, t_r, b_r, params->dirpyrequalizer.skinprotect, chrom, hotbad); //enabled remove artifacts for cbDL lab->reallocLab(); } } //if(params->colorappearance.badpixsl > 0) { int mode=params->colorappearance.badpixsl; - if(params->colorappearance.badpixsl > 0) if(execsharp) { + if (params->colorappearance.badpixsl > 0) if (execsharp) { int mode = params->colorappearance.badpixsl; lab->deleteLab(); ImProcFunctions::badpixcam (ncie, 3.0, 10, mode, 0, 0, 0, 0, 0, 0, 1);//for bad pixels CIECAM lab->reallocLab(); } - if(params->impulseDenoise.enabled) if(execsharp) { + if (params->impulseDenoise.enabled) if (execsharp) { float **buffers[3]; buffers[0] = lab->L; buffers[1] = lab->a; @@ -2606,29 +2688,29 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int ImProcFunctions::impulsedenoisecam (ncie, buffers); //impulse adapted to CIECAM } - if (params->sharpenMicro.enabled)if(execsharp) { - ImProcFunctions::MLmicrocontrastcam(ncie); + if (params->sharpenMicro.enabled)if (execsharp) { + ImProcFunctions::MLmicrocontrastcam (ncie); } - if(params->sharpening.enabled) - if(execsharp) { + if (params->sharpening.enabled) + if (execsharp) { float **buffer = lab->L; // We can use the L-buffer from lab as buffer to save some memory ImProcFunctions::sharpeningcam (ncie, buffer); // sharpening adapted to CIECAM } //if(params->dirpyrequalizer.enabled) if(execsharp) { - if(params->dirpyrequalizer.enabled /*&& execsharp*/) { - float b_l = static_cast(params->dirpyrequalizer.hueskin.value[0]) / 100.0f; - float t_l = static_cast(params->dirpyrequalizer.hueskin.value[1]) / 100.0f; - float b_r = static_cast(params->dirpyrequalizer.hueskin.value[2]) / 100.0f; - float t_r = static_cast(params->dirpyrequalizer.hueskin.value[3]) / 100.0f; - int choice = 0; // I have not suppress this statement in case of !! always to 0 + if (params->dirpyrequalizer.enabled /*&& execsharp*/) { // if(params->dirpyrequalizer.algo=="FI") choice=0; // else if(params->dirpyrequalizer.algo=="LA") choice=1; - if(rtt == 1) { + if (rtt == 1) { + float b_l = static_cast (params->dirpyrequalizer.hueskin.value[0]) / 100.0f; + float t_l = static_cast (params->dirpyrequalizer.hueskin.value[1]) / 100.0f; + float b_r = static_cast (params->dirpyrequalizer.hueskin.value[2]) / 100.0f; + float t_r = static_cast (params->dirpyrequalizer.hueskin.value[3]) / 100.0f; + int choice = 0; // I have not suppress this statement in case of !! always to 0 lab->deleteLab(); - dirpyr_equalizercam(ncie, ncie->sh_p, ncie->sh_p, ncie->W, ncie->H, ncie->h_p, ncie->C_p, params->dirpyrequalizer.mult, params->dirpyrequalizer.threshold, params->dirpyrequalizer.skinprotect, true, params->dirpyrequalizer.gamutlab, b_l, t_l, t_r, b_r, choice, scalecd); //contrast by detail adapted to CIECAM + dirpyr_equalizercam (ncie, ncie->sh_p, ncie->sh_p, ncie->W, ncie->H, ncie->h_p, ncie->C_p, params->dirpyrequalizer.mult, params->dirpyrequalizer.threshold, params->dirpyrequalizer.skinprotect, true, params->dirpyrequalizer.gamutlab, b_l, t_l, t_r, b_r, choice, scale); //contrast by detail adapted to CIECAM lab->reallocLab(); } @@ -2641,7 +2723,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } const float Qredi = ( 4.0f / c_) * ( a_w + 4.0f ); - const float co_e = (pow_F(f_l, 0.25f)); + const float co_e = (pow_F (f_l, 0.25f)); #ifndef _DEBUG @@ -2654,8 +2736,8 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int for (int i = 0; i < height; i++) // update CieImages with new values after sharpening, defringe, contrast by detail level for (int j = 0; j < width; j++) { - float interm = fabsf(ncie->sh_p[i][j] / (32768.f)); - ncie->J_p[i][j] = 100.0f * SQR(interm); + float interm = fabsf (ncie->sh_p[i][j] / (32768.f)); + ncie->J_p[i][j] = 100.0f * SQR (interm); ncie->Q_p[i][j] = interm * Qredi; ncie->M_p[i][j] = ncie->C_p[i][j] * co_e; } @@ -2663,15 +2745,15 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } } - if((params->colorappearance.tonecie && (epdEnabled)) || (params->sharpening.enabled && settings->autocielab && execsharp) + if ((params->colorappearance.tonecie && (epdEnabled)) || (params->sharpening.enabled && settings->autocielab && execsharp) || (params->dirpyrequalizer.enabled && settings->autocielab) || (params->defringe.enabled && settings->autocielab) || (params->sharpenMicro.enabled && settings->autocielab) || (params->impulseDenoise.enabled && settings->autocielab) || (params->colorappearance.badpixsl > 0 && settings->autocielab)) { ciedata = (params->colorappearance.datacie && pW != 1); - if(epdEnabled && params->colorappearance.tonecie && algepd) { + if (epdEnabled && params->colorappearance.tonecie && algepd) { lab->deleteLab(); - ImProcFunctions::EPDToneMapCIE(ncie, a_w, c_, w_h, width, height, begh, endh, minQ, maxQ, Iterates, scale ); + ImProcFunctions::EPDToneMapCIE (ncie, a_w, c_, w_h, width, height, begh, endh, minQ, maxQ, Iterates, scale ); lab->reallocLab(); } @@ -2679,7 +2761,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int constexpr float eps = 0.0001f; - const float co_e = (pow_F(f_l, 0.25f)) + eps; + const float co_e = (pow_F (f_l, 0.25f)) + eps; #ifndef _DEBUG #pragma omp parallel @@ -2703,14 +2785,14 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int for (int j = 0; j < width; j++) { // if(epdEnabled) ncie->J_p[i][j]=(100.0f* ncie->Q_p[i][j]*ncie->Q_p[i][j])/(w_h*w_h); - if(epdEnabled) { - ncie->J_p[i][j] = (100.0f * ncie->Q_p[i][j] * ncie->Q_p[i][j]) / SQR((4.f / c) * (aw + 4.f)); + if (epdEnabled) { + ncie->J_p[i][j] = (100.0f * ncie->Q_p[i][j] * ncie->Q_p[i][j]) / SQR ((4.f / c) * (aw + 4.f)); } const float ncie_C_p = (ncie->M_p[i][j]) / co_e; //show histogram in CIECAM mode (Q,J, M,s,C) - if(ciedata) { + if (ciedata) { // Data for J Q M s and C histograms int posl, posc; float brli = 327.f; @@ -2718,7 +2800,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float libr; float colch; - if(curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) { + if (curveMode == ColorAppearanceParams::TC_MODE_BRIGHT) { brli = 70.0f; libr = ncie->Q_p[i][j]; //40.0 to 100.0 approximative factor for Q - 327 for J } else { /*if(curveMode == ColorAppearanceParams::TC_MODE_LIGHT)*/ @@ -2726,21 +2808,21 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int libr = ncie->J_p[i][j]; //327 for J } - posl = (int)(libr * brli); + posl = (int) (libr * brli); hist16JCAM[posl]++; if (curveMode3 == ColorAppearanceParams::TC_MODE_CHROMA) { - chsacol = 327.f; + chsacol = 400.f;//327.f; colch = ncie_C_p; - } else if(curveMode3 == ColorAppearanceParams::TC_MODE_SATUR) { + } else if (curveMode3 == ColorAppearanceParams::TC_MODE_SATUR) { chsacol = 450.0f; - colch = 100.f * sqrtf(ncie_C_p / ncie->Q_p[i][j]); + colch = 100.f * sqrtf (ncie_C_p / ncie->Q_p[i][j]); } else { /*if(curveMode3 == ColorAppearanceParams::TC_MODE_COLORF)*/ - chsacol = 327.0f; + chsacol = 400.f;//327.0f; colch = ncie->M_p[i][j]; } - posc = (int)(colch * chsacol); + posc = (int) (colch * chsacol); hist16_CCAM[posc]++; } @@ -2752,24 +2834,24 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int hbuffer[j] = ncie->h_p[i][j]; #else float xx, yy, zz; - Ciecam02::jch2xyz_ciecam02float( xx, yy, zz, - ncie->J_p[i][j], ncie_C_p, ncie->h_p[i][j], - xw2, yw2, zw2, - f2, c2, nc2, gamu, pow1n, nbbj, ncbj, flj, czj, dj, awj); + Ciecam02::jch2xyz_ciecam02float ( xx, yy, zz, + ncie->J_p[i][j], ncie_C_p, ncie->h_p[i][j], + xw2, yw2, zw2, + f2, c2, nc2, gamu, pow1n, nbbj, ncbj, flj, czj, dj, awj); float x = (float)xx * 655.35f; float y = (float)yy * 655.35f; float z = (float)zz * 655.35f; float Ll, aa, bb; //convert xyz=>lab - Color::XYZ2Lab(x, y, z, Ll, aa, bb); + Color::XYZ2Lab (x, y, z, Ll, aa, bb); - if(gamu == 1) { + if (gamu == 1) { float Lprov1, Chprov1; Lprov1 = Ll / 327.68f; - Chprov1 = sqrtf(SQR(aa) + SQR(bb)) / 327.68f; + Chprov1 = sqrtf (SQR (aa) + SQR (bb)) / 327.68f; float2 sincosval; - if(Chprov1 == 0.0f) { + if (Chprov1 == 0.0f) { sincosval.y = 1.f; sincosval.x = 0.0f; } else { @@ -2782,10 +2864,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int bool neg = false; bool more_rgb = false; //gamut control : Lab values are in gamut - Color::gamutLchonly(sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f, neg, more_rgb); + Color::gamutLchonly (sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f, neg, more_rgb); #else //gamut control : Lab values are in gamut - Color::gamutLchonly(sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f); + Color::gamutLchonly (sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f); #endif lab->L[i][j] = Lprov1 * 327.68f; @@ -2804,35 +2886,35 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int // process line buffers int k; vfloat x, y, z; - vfloat c655d35 = F2V(655.35f); + vfloat c655d35 = F2V (655.35f); - for(k = 0; k < bufferLength; k += 4) { - Ciecam02::jch2xyz_ciecam02float( x, y, z, - LVF(Jbuffer[k]), LVF(Cbuffer[k]), LVF(hbuffer[k]), - F2V(xw2), F2V(yw2), F2V(zw2), - F2V(f2), F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz)); + for (k = 0; k < bufferLength; k += 4) { + Ciecam02::jch2xyz_ciecam02float ( x, y, z, + LVF (Jbuffer[k]), LVF (Cbuffer[k]), LVF (hbuffer[k]), + F2V (xw2), F2V (yw2), F2V (zw2), + F2V (f2), F2V (nc2), F2V (pow1n), F2V (nbbj), F2V (ncbj), F2V (flj), F2V (dj), F2V (awj), F2V (reccmcz)); x *= c655d35; y *= c655d35; z *= c655d35; - STVF(xbuffer[k], x); - STVF(ybuffer[k], y); - STVF(zbuffer[k], z); + STVF (xbuffer[k], x); + STVF (ybuffer[k], y); + STVF (zbuffer[k], z); } // XYZ2Lab uses a lookup table. The function behind that lut is a cube root. // SSE can't beat the speed of that lut, so it doesn't make sense to use SSE - for(int j = 0; j < width; j++) { + for (int j = 0; j < width; j++) { float Ll, aa, bb; //convert xyz=>lab - Color::XYZ2Lab(xbuffer[j], ybuffer[j], zbuffer[j], Ll, aa, bb); + Color::XYZ2Lab (xbuffer[j], ybuffer[j], zbuffer[j], Ll, aa, bb); - if(gamu == 1) { + if (gamu == 1) { float Lprov1, Chprov1; Lprov1 = Ll / 327.68f; - Chprov1 = sqrtf(SQR(aa) + SQR(bb)) / 327.68f; + Chprov1 = sqrtf (SQR (aa) + SQR (bb)) / 327.68f; float2 sincosval; - if(Chprov1 == 0.0f) { + if (Chprov1 == 0.0f) { sincosval.y = 1.f; sincosval.x = 0.0f; } else { @@ -2844,10 +2926,10 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int bool neg = false; bool more_rgb = false; //gamut control : Lab values are in gamut - Color::gamutLchonly(sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f, neg, more_rgb); + Color::gamutLchonly (sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f, neg, more_rgb); #else //gamut control : Lab values are in gamut - Color::gamutLchonly(sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f); + Color::gamutLchonly (sincosval, Lprov1, Chprov1, wip, highlight, 0.15f, 0.96f); #endif lab->L[i][j] = Lprov1 * 327.68f; lab->a[i][j] = 327.68f * Chprov1 * sincosval.y; @@ -2866,13 +2948,13 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } //end parallelization //show CIECAM histograms - if(ciedata) { + if (ciedata) { //update histogram J and Q //update histogram J - hist16JCAM.compressTo(histLCAM); + hist16JCAM.compressTo (histLCAM); //update color histogram M,s,C - hist16_CCAM.compressTo(histCCAM); + hist16_CCAM.compressTo (histCCAM); } } } @@ -2883,8 +2965,8 @@ void ImProcFunctions::moyeqt (Imagefloat* working, float &moyS, float &eqty) { BENCHFUN - int tHh = working->height; - int tWw = working->width; + int tHh = working->getHeight(); + int tWw = working->getWidth(); double moy = 0.0; double sqrs = 0.0; @@ -2894,20 +2976,20 @@ void ImProcFunctions::moyeqt (Imagefloat* working, float &moyS, float &eqty) for (int i = 0; i < tHh; i++) { for (int j = 0; j < tWw; j++) { - float s = Color::rgb2s(CLIP(working->r(i, j)), CLIP(working->g(i, j)), CLIP(working->b(i, j))); + float s = Color::rgb2s (CLIP (working->r (i, j)), CLIP (working->g (i, j)), CLIP (working->b (i, j))); moy += s; - sqrs += SQR(s); + sqrs += SQR (s); } } moy /= (tHh * tWw); sqrs /= (tHh * tWw); - eqty = sqrt(sqrs - SQR(moy)); + eqty = sqrt (sqrs - SQR (moy)); moyS = moy; } static inline void -filmlike_clip_rgb_tone(float *r, float *g, float *b, const float L) +filmlike_clip_rgb_tone (float *r, float *g, float *b, const float L) { float r_ = *r > L ? L : *r; float b_ = *b > L ? L : *b; @@ -2918,18 +3000,18 @@ filmlike_clip_rgb_tone(float *r, float *g, float *b, const float L) } static void -filmlike_clip(float *r, float *g, float *b) +filmlike_clip (float *r, float *g, float *b) { // This is Adobe's hue-stable film-like curve with a diagonal, ie only used for clipping. Can probably be further optimized. const float L = 65535.0; if (*r >= *g) { if (*g > *b) { // Case 1: r >= g > b - filmlike_clip_rgb_tone(r, g, b, L); + filmlike_clip_rgb_tone (r, g, b, L); } else if (*b > *r) { // Case 2: b > r >= g - filmlike_clip_rgb_tone(b, r, g, L); + filmlike_clip_rgb_tone (b, r, g, L); } else if (*b > *g) { // Case 3: r >= b > g - filmlike_clip_rgb_tone(r, b, g, L); + filmlike_clip_rgb_tone (r, b, g, L); } else { // Case 4: r >= g == b *r = *r > L ? L : *r; *g = *g > L ? L : *g; @@ -2937,33 +3019,31 @@ filmlike_clip(float *r, float *g, float *b) } } else { if (*r >= *b) { // Case 5: g > r >= b - filmlike_clip_rgb_tone(g, r, b, L); + filmlike_clip_rgb_tone (g, r, b, L); } else if (*b > *g) { // Case 6: b > g > r - filmlike_clip_rgb_tone(b, g, r, L); + filmlike_clip_rgb_tone (b, g, r, L); } else { // Case 7: g >= b > r - filmlike_clip_rgb_tone(g, b, r, L); + filmlike_clip_rgb_tone (g, b, r, L); } } } void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ) { - rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, asIn, histToneCurve); + rgbProc (working, lab, pipetteBuffer, hltonecurve, shtonecurve, tonecurve, shmap, sat, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, params->toneCurve.expcomp, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, dcpProf, asIn, histToneCurve); } // Process RGB image and convert to LAB space void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clToningcurve, LUTf & cl2Toningcurve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ) { BENCHFUN Imagefloat *tmpImage = nullptr; - // NOTE: We're getting all 3 pointers here, but this function may not need them all, so one could optimize this Imagefloat* editImgFloat = nullptr; - LabImage* editLab = nullptr; PlanarWhateverData* editWhatever = nullptr; EditUniqueID editID = pipetteBuffer ? pipetteBuffer->getEditID() : EUID_None; @@ -2974,7 +3054,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer break; case (BT_LABIMAGE): - editLab = pipetteBuffer->getLabBuffer(); break; case (BT_SINGLEPLANE_FLOAT): @@ -2983,7 +3062,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } } - int h_th, s_th; + int h_th = 0, s_th = 0; if (shmap) { h_th = shmap->max_f - params->sh.htonalwidth * (shmap->max_f - shmap->avg) / 100; @@ -2994,25 +3073,25 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer bool processLCE = params->sh.enabled && shmap && params->sh.localcontrast > 0; double lceamount = params->sh.localcontrast / 200.0; - TMatrix wprof = iccStore->workingSpaceMatrix (params->icm.working); - TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params->icm.working); + TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params->icm.working); + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params->icm.working); float toxyz[3][3] = { { - static_cast( wprof[0][0] / Color::D50x), - static_cast( wprof[0][1] / Color::D50x), - static_cast( wprof[0][2] / Color::D50x) + static_cast ( wprof[0][0] / Color::D50x), + static_cast ( wprof[0][1] / Color::D50x), + static_cast ( wprof[0][2] / Color::D50x) }, { - static_cast( wprof[1][0]), - static_cast( wprof[1][1]), - static_cast( wprof[1][2]) + static_cast ( wprof[1][0]), + static_cast ( wprof[1][1]), + static_cast ( wprof[1][2]) }, { - static_cast( wprof[2][0] / Color::D50z), - static_cast( wprof[2][1] / Color::D50z), - static_cast( wprof[2][2] / Color::D50z) + static_cast ( wprof[2][0] / Color::D50z), + static_cast ( wprof[2][1] / Color::D50z), + static_cast ( wprof[2][2] / Color::D50z) } }; - float maxFactorToxyz = max(toxyz[1][0],toxyz[1][1],toxyz[1][2]); + float maxFactorToxyz = max (toxyz[1][0], toxyz[1][1], toxyz[1][2]); float equalR = maxFactorToxyz / toxyz[1][0]; float equalG = maxFactorToxyz / toxyz[1][1]; float equalB = maxFactorToxyz / toxyz[1][2]; @@ -3030,23 +3109,19 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer {wprof[2][0], wprof[2][1], wprof[2][2]} }; - // For tonecurve histogram - float lumimulf[3] = {static_cast(lumimul[0]), static_cast(lumimul[1]), static_cast(lumimul[2])}; - - bool mixchannels = (params->chmixer.red[0] != 100 || params->chmixer.red[1] != 0 || params->chmixer.red[2] != 0 || params->chmixer.green[0] != 0 || params->chmixer.green[1] != 100 || params->chmixer.green[2] != 0 || params->chmixer.blue[0] != 0 || params->chmixer.blue[1] != 0 || params->chmixer.blue[2] != 100); - FlatCurve* hCurve; - FlatCurve* sCurve; - FlatCurve* vCurve; - FlatCurve* bwlCurve; + FlatCurve* hCurve = nullptr; + FlatCurve* sCurve = nullptr; + FlatCurve* vCurve = nullptr; + FlatCurve* bwlCurve = nullptr; - FlatCurveType hCurveType = (FlatCurveType)params->hsvequalizer.hcurve.at(0); - FlatCurveType sCurveType = (FlatCurveType)params->hsvequalizer.scurve.at(0); - FlatCurveType vCurveType = (FlatCurveType)params->hsvequalizer.vcurve.at(0); - FlatCurveType bwlCurveType = (FlatCurveType)params->blackwhite.luminanceCurve.at(0); + FlatCurveType hCurveType = (FlatCurveType)params->hsvequalizer.hcurve.at (0); + FlatCurveType sCurveType = (FlatCurveType)params->hsvequalizer.scurve.at (0); + FlatCurveType vCurveType = (FlatCurveType)params->hsvequalizer.vcurve.at (0); + FlatCurveType bwlCurveType = (FlatCurveType)params->blackwhite.luminanceCurve.at (0); bool hCurveEnabled = hCurveType > FCT_Linear; bool sCurveEnabled = sCurveType > FCT_Linear; bool vCurveEnabled = vCurveType > FCT_Linear; @@ -3054,7 +3129,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer // TODO: We should create a 'skip' value like for CurveFactory::complexsgnCurve (rtengine/curves.cc) if (hCurveEnabled) { - hCurve = new FlatCurve(params->hsvequalizer.hcurve); + hCurve = new FlatCurve (params->hsvequalizer.hcurve); if (hCurve->isIdentity()) { delete hCurve; @@ -3064,7 +3139,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } if (sCurveEnabled) { - sCurve = new FlatCurve(params->hsvequalizer.scurve); + sCurve = new FlatCurve (params->hsvequalizer.scurve); if (sCurve->isIdentity()) { delete sCurve; @@ -3074,7 +3149,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } if (vCurveEnabled) { - vCurve = new FlatCurve(params->hsvequalizer.vcurve); + vCurve = new FlatCurve (params->hsvequalizer.vcurve); if (vCurve->isIdentity()) { delete vCurve; @@ -3084,7 +3159,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } if (bwlCurveEnabled) { - bwlCurve = new FlatCurve(params->blackwhite.luminanceCurve); + bwlCurve = new FlatCurve (params->blackwhite.luminanceCurve); if (bwlCurve->isIdentity()) { delete bwlCurve; @@ -3095,7 +3170,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer std::shared_ptr hald_clut; bool clutAndWorkingProfilesAreSame = false; - TMatrix xyz2clut, clut2xyz; + TMatrix xyz2clut = {}, clut2xyz = {}; #ifdef __SSE2__ vfloat v_work2xyz[3][3] ALIGNED16; vfloat v_xyz2clut[3][3] ALIGNED16; @@ -3104,23 +3179,23 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer #endif if ( params->filmSimulation.enabled && !params->filmSimulation.clutFilename.empty() ) { - hald_clut = CLUTStore::getInstance().getClut( params->filmSimulation.clutFilename ); + hald_clut = CLUTStore::getInstance().getClut ( params->filmSimulation.clutFilename ); if ( hald_clut ) { clutAndWorkingProfilesAreSame = hald_clut->getProfile() == params->icm.working; if ( !clutAndWorkingProfilesAreSame ) { - xyz2clut = iccStore->workingSpaceInverseMatrix( hald_clut->getProfile() ); - clut2xyz = iccStore->workingSpaceMatrix( hald_clut->getProfile() ); + xyz2clut = ICCStore::getInstance()->workingSpaceInverseMatrix ( hald_clut->getProfile() ); + clut2xyz = ICCStore::getInstance()->workingSpaceMatrix ( hald_clut->getProfile() ); #ifdef __SSE2__ for (int i = 0; i < 3; ++i) { for (int j = 0; j < 3; ++j) { - v_work2xyz[i][j] = F2V(wprof[i][j]); - v_xyz2clut[i][j] = F2V(xyz2clut[i][j]); - v_xyz2work[i][j] = F2V(wiprof[i][j]); - v_clut2xyz[i][j] = F2V(clut2xyz[i][j]); + v_work2xyz[i][j] = F2V (wprof[i][j]); + v_xyz2clut[i][j] = F2V (xyz2clut[i][j]); + v_xyz2work[i][j] = F2V (wiprof[i][j]); + v_clut2xyz[i][j] = F2V (clut2xyz[i][j]); } } @@ -3130,41 +3205,41 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } } - const float film_simulation_strength = static_cast(params->filmSimulation.strength) / 100.0f; + const float film_simulation_strength = static_cast (params->filmSimulation.strength) / 100.0f; const float exp_scale = pow (2.0, expcomp); - const float comp = (max(0.0, expcomp) + 1.0) * hlcompr / 100.0; - const float shoulder = ((65536.0 / max(1.0f, exp_scale)) * (hlcomprthresh / 200.0)) + 0.1; + const float comp = (max (0.0, expcomp) + 1.0) * hlcompr / 100.0; + const float shoulder = ((65536.0 / max (1.0f, exp_scale)) * (hlcomprthresh / 200.0)) + 0.1; const float hlrange = 65536.0 - shoulder; const bool isProPhoto = (params->icm.working == "ProPhoto"); // extracting datas from 'params' to avoid cache flush (to be confirmed) ToneCurveParams::eTCModeId curveMode = params->toneCurve.curveMode; ToneCurveParams::eTCModeId curveMode2 = params->toneCurve.curveMode2; bool highlight = params->toneCurve.hrenabled;//Get the value if "highlight reconstruction" is activated - bool hasToneCurve1 = bool(customToneCurve1); - bool hasToneCurve2 = bool(customToneCurve2); + bool hasToneCurve1 = bool (customToneCurve1); + bool hasToneCurve2 = bool (customToneCurve2); BlackWhiteParams::eTCModeId beforeCurveMode = params->blackwhite.beforeCurveMode; BlackWhiteParams::eTCModeId afterCurveMode = params->blackwhite.afterCurveMode; - bool hasToneCurvebw1 = bool(customToneCurvebw1); - bool hasToneCurvebw2 = bool(customToneCurvebw2); + bool hasToneCurvebw1 = bool (customToneCurvebw1); + bool hasToneCurvebw2 = bool (customToneCurvebw2); PerceptualToneCurveState ptc1ApplyState, ptc2ApplyState; if (hasToneCurve1 && curveMode == ToneCurveParams::TC_MODE_PERCEPTUAL) { - const PerceptualToneCurve& userToneCurve = static_cast(customToneCurve1); - userToneCurve.initApplyState(ptc1ApplyState, params->icm.working); + const PerceptualToneCurve& userToneCurve = static_cast (customToneCurve1); + userToneCurve.initApplyState (ptc1ApplyState, params->icm.working); } if (hasToneCurve2 && curveMode2 == ToneCurveParams::TC_MODE_PERCEPTUAL) { - const PerceptualToneCurve& userToneCurve = static_cast(customToneCurve2); - userToneCurve.initApplyState(ptc2ApplyState, params->icm.working); + const PerceptualToneCurve& userToneCurve = static_cast (customToneCurve2); + userToneCurve.initApplyState (ptc2ApplyState, params->icm.working); } - bool hasColorToning = params->colorToning.enabled && bool(ctOpacityCurve) && bool(ctColorCurve); + bool hasColorToning = params->colorToning.enabled && bool (ctOpacityCurve) && bool (ctColorCurve); // float satLimit = float(params->colorToning.satProtectionThreshold)/100.f*0.7f+0.3f; // float satLimitOpacity = 1.f-(float(params->colorToning.saturatedOpacity)/100.f); - float strProtect = (float(params->colorToning.strength) / 100.f); + float strProtect = (float (params->colorToning.strength) / 100.f); /* // Debug output - Color LUTf points @@ -3196,52 +3271,52 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } */ - float RedLow = (100.f + float(params->colorToning.redlow)) / 100.f; //printf("Rel=%f\n",RedLow); - float GreenLow = (100.f + float(params->colorToning.greenlow)) / 100.f; //printf("Gre=%f\n",GreenLow); - float BlueLow = (100.f + float(params->colorToning.bluelow)) / 100.f; //printf("Blu=%f\n",BlueLow); - float RedMed = (100.f + float(params->colorToning.redmed)) / 100.f; - float GreenMed = (100.f + float(params->colorToning.greenmed)) / 100.f; - float BlueMed = (100.f + float(params->colorToning.bluemed)) / 100.f; - float RedHigh = (100.f + float(params->colorToning.redhigh)) / 100.f; //printf("RedH=%f\n",RedHigh); - float GreenHigh = (100.f + float(params->colorToning.greenhigh)) / 100.f; - float BlueHigh = (100.f + float(params->colorToning.bluehigh)) / 100.f; - float SatLow = float(params->colorToning.shadowsColSat.value[0]) / 100.f; - float SatHigh = float(params->colorToning.hlColSat.value[0]) / 100.f; + float RedLow = (100.f + float (params->colorToning.redlow)) / 100.f; //printf("Rel=%f\n",RedLow); + float GreenLow = (100.f + float (params->colorToning.greenlow)) / 100.f; //printf("Gre=%f\n",GreenLow); + float BlueLow = (100.f + float (params->colorToning.bluelow)) / 100.f; //printf("Blu=%f\n",BlueLow); + float RedMed = (100.f + float (params->colorToning.redmed)) / 100.f; + float GreenMed = (100.f + float (params->colorToning.greenmed)) / 100.f; + float BlueMed = (100.f + float (params->colorToning.bluemed)) / 100.f; + float RedHigh = (100.f + float (params->colorToning.redhigh)) / 100.f; //printf("RedH=%f\n",RedHigh); + float GreenHigh = (100.f + float (params->colorToning.greenhigh)) / 100.f; + float BlueHigh = (100.f + float (params->colorToning.bluehigh)) / 100.f; + float SatLow = float (params->colorToning.shadowsColSat.value[0]) / 100.f; + float SatHigh = float (params->colorToning.hlColSat.value[0]) / 100.f; - float Balan = float(params->colorToning.balance); + float Balan = float (params->colorToning.balance); - float chMixRR = float(params->chmixer.red[0]); - float chMixRG = float(params->chmixer.red[1]); - float chMixRB = float(params->chmixer.red[2]); - float chMixGR = float(params->chmixer.green[0]); - float chMixGG = float(params->chmixer.green[1]); - float chMixGB = float(params->chmixer.green[2]); - float chMixBR = float(params->chmixer.blue[0]); - float chMixBG = float(params->chmixer.blue[1]); - float chMixBB = float(params->chmixer.blue[2]); + float chMixRR = float (params->chmixer.red[0]); + float chMixRG = float (params->chmixer.red[1]); + float chMixRB = float (params->chmixer.red[2]); + float chMixGR = float (params->chmixer.green[0]); + float chMixGG = float (params->chmixer.green[1]); + float chMixGB = float (params->chmixer.green[2]); + float chMixBR = float (params->chmixer.blue[0]); + float chMixBG = float (params->chmixer.blue[1]); + float chMixBB = float (params->chmixer.blue[2]); int shHighlights = params->sh.highlights; int shShadows = params->sh.shadows; bool blackwhite = params->blackwhite.enabled; bool complem = params->blackwhite.enabledcc; - float bwr = float(params->blackwhite.mixerRed); - float bwg = float(params->blackwhite.mixerGreen); - float bwb = float(params->blackwhite.mixerBlue); - float bwrgam = float(params->blackwhite.gammaRed); - float bwggam = float(params->blackwhite.gammaGreen); - float bwbgam = float(params->blackwhite.gammaBlue); - float mixerOrange = float(params->blackwhite.mixerOrange); - float mixerYellow = float(params->blackwhite.mixerYellow); - float mixerCyan = float(params->blackwhite.mixerCyan); - float mixerMagenta = float(params->blackwhite.mixerMagenta); - float mixerPurple = float(params->blackwhite.mixerPurple); + float bwr = float (params->blackwhite.mixerRed); + float bwg = float (params->blackwhite.mixerGreen); + float bwb = float (params->blackwhite.mixerBlue); + float bwrgam = float (params->blackwhite.gammaRed); + float bwggam = float (params->blackwhite.gammaGreen); + float bwbgam = float (params->blackwhite.gammaBlue); + float mixerOrange = float (params->blackwhite.mixerOrange); + float mixerYellow = float (params->blackwhite.mixerYellow); + float mixerCyan = float (params->blackwhite.mixerCyan); + float mixerMagenta = float (params->blackwhite.mixerMagenta); + float mixerPurple = float (params->blackwhite.mixerPurple); int algm = 0; if (params->blackwhite.method == "Desaturation") { algm = 0; - } else if(params->blackwhite.method == "LumEqualizer") { + } else if (params->blackwhite.method == "LumEqualizer") { algm = 1; - } else if(params->blackwhite.method == "ChannelMixer") { + } else if (params->blackwhite.method == "ChannelMixer") { algm = 2; } @@ -3250,20 +3325,17 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float gamvalr = 125.f; float gamvalg = 125.f; float gamvalb = 125.f; - double nr = 0; - double ng = 0; - double nb = 0; bool computeMixerAuto = params->blackwhite.autoc && (autor < -5000.f); - if(bwrgam < 0) { + if (bwrgam < 0) { gamvalr = 100.f; } - if(bwggam < 0) { + if (bwggam < 0) { gamvalg = 100.f; } - if(bwbgam < 0) { + if (bwbgam < 0) { gamvalb = 100.f; } @@ -3279,21 +3351,21 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer bool hasgammabw = gammabwr != 1.f || gammabwg != 1.f || gammabwb != 1.f; if (hasColorToning || blackwhite || (params->dirpyrequalizer.cbdlMethod == "bef" && params->dirpyrequalizer.enabled)) { - tmpImage = new Imagefloat(working->width, working->height); + tmpImage = new Imagefloat (working->getWidth(), working->getHeight()); } - int W = working->width; - int H = working->height; - // For tonecurve histogram int toneCurveHistSize = histToneCurve ? histToneCurve.getSize() : 0; - int histToneCurveCompression; + int histToneCurveCompression = 0; - if(toneCurveHistSize > 0) { + if (toneCurveHistSize > 0) { histToneCurve.clear(); - histToneCurveCompression = log2(65536 / toneCurveHistSize); + histToneCurveCompression = log2 (65536 / toneCurveHistSize); } + // For tonecurve histogram + const float lumimulf[3] = {static_cast (lumimul[0]), static_cast (lumimul[1]), static_cast (lumimul[2])}; + #define TS 112 @@ -3305,42 +3377,43 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer char *editIFloatBuffer = nullptr; char *editWhateverBuffer = nullptr; - buffer = (char *) malloc(3 * sizeof(float) * TS * TS + 20 * 64 + 63); + buffer = (char *) malloc (3 * sizeof (float) * TS * TS + 20 * 64 + 63); char *data; - data = (char*)( ( uintptr_t(buffer) + uintptr_t(63)) / 64 * 64); + data = (char*) ( ( uintptr_t (buffer) + uintptr_t (63)) / 64 * 64); - float *rtemp = (float(*))data; - float *gtemp = (float (*)) ((char*)rtemp + sizeof(float) * TS * TS + 4 * 64); - float *btemp = (float (*)) ((char*)gtemp + sizeof(float) * TS * TS + 8 * 64); + float *rtemp = (float (*))data; + float *gtemp = (float (*)) ((char*)rtemp + sizeof (float) * TS * TS + 4 * 64); + float *btemp = (float (*)) ((char*)gtemp + sizeof (float) * TS * TS + 8 * 64); int istart; int jstart; int tW; int tH; // Allocating buffer for the PipetteBuffer - float *editIFloatTmpR, *editIFloatTmpG, *editIFloatTmpB, *editWhateverTmp; + float *editIFloatTmpR = nullptr, *editIFloatTmpG = nullptr, *editIFloatTmpB = nullptr, *editWhateverTmp = nullptr; if (editImgFloat) { - editIFloatBuffer = (char *) malloc(3 * sizeof(float) * TS * TS + 20 * 64 + 63); - data = (char*)( ( uintptr_t(editIFloatBuffer) + uintptr_t(63)) / 64 * 64); + editIFloatBuffer = (char *) malloc (3 * sizeof (float) * TS * TS + 20 * 64 + 63); + data = (char*) ( ( uintptr_t (editIFloatBuffer) + uintptr_t (63)) / 64 * 64); - editIFloatTmpR = (float(*))data; - editIFloatTmpG = (float (*)) ((char*)editIFloatTmpR + sizeof(float) * TS * TS + 4 * 64); - editIFloatTmpB = (float (*)) ((char*)editIFloatTmpG + sizeof(float) * TS * TS + 8 * 64); + editIFloatTmpR = (float (*))data; + editIFloatTmpG = (float (*)) ((char*)editIFloatTmpR + sizeof (float) * TS * TS + 4 * 64); + editIFloatTmpB = (float (*)) ((char*)editIFloatTmpG + sizeof (float) * TS * TS + 8 * 64); } if (editWhatever) { - editWhateverBuffer = (char *) malloc(sizeof(float) * TS * TS + 20 * 64 + 63); - data = (char*)( ( uintptr_t(editWhateverBuffer) + uintptr_t(63)) / 64 * 64); + editWhateverBuffer = (char *) malloc (sizeof (float) * TS * TS + 20 * 64 + 63); + data = (char*) ( ( uintptr_t (editWhateverBuffer) + uintptr_t (63)) / 64 * 64); - editWhateverTmp = (float(*))data; + editWhateverTmp = (float (*))data; } float out_rgbx[4 * TS] ALIGNED16; // Line buffer for CLUT LUTu histToneCurveThr; - if(toneCurveHistSize > 0) { - histToneCurveThr(toneCurveHistSize); + + if (toneCurveHistSize > 0) { + histToneCurveThr (toneCurveHistSize); histToneCurveThr.clear(); } @@ -3348,19 +3421,19 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer #pragma omp for schedule(dynamic) collapse(2) #endif - for(int ii = 0; ii < working->height; ii += TS) - for(int jj = 0; jj < working->width; jj += TS) { + for (int ii = 0; ii < working->getHeight(); ii += TS) + for (int jj = 0; jj < working->getWidth(); jj += TS) { istart = ii; jstart = jj; - tH = min(ii + TS, working->height); - tW = min(jj + TS, working->width); + tH = min (ii + TS, working->getHeight()); + tW = min (jj + TS, working->getWidth()); for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - rtemp[ti * TS + tj] = working->r(i, j); - gtemp[ti * TS + tj] = working->g(i, j); - btemp[ti * TS + tj] = working->b(i, j); + rtemp[ti * TS + tj] = working->r (i, j); + gtemp[ti * TS + tj] = working->g (i, j); + btemp[ti * TS + tj] = working->b (i, j); } } @@ -3453,7 +3526,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } if (dcpProf) { - dcpProf->step2ApplyTile(rtemp, gtemp, btemp, tW - jstart, tH - istart, TS, asIn); + dcpProf->step2ApplyTile (rtemp, gtemp, btemp, tW - jstart, tH - istart, TS, asIn); } for (int i = istart, ti = 0; i < tH; i++, ti++) { @@ -3476,7 +3549,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } if (r > 65535 || g > 65535 || b > 65535) { - filmlike_clip(&r, &g, &b); + filmlike_clip (&r, &g, &b); } rtemp[ti * TS + tj] = r; @@ -3492,9 +3565,10 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer rtemp[ti * TS + tj] = tonecurve[ rtemp[ti * TS + tj] ]; gtemp[ti * TS + tj] = tonecurve[ gtemp[ti * TS + tj] ]; btemp[ti * TS + tj] = tonecurve[ btemp[ti * TS + tj] ]; - if(histToneCurveThr) { - int y = CLIP(lumimulf[0] * Color::gamma2curve[rtemp[ti * TS + tj]] + lumimulf[1] * Color::gamma2curve[gtemp[ti * TS + tj]] + lumimulf[2] * Color::gamma2curve[btemp[ti * TS + tj]]); - histToneCurveThr[y>>histToneCurveCompression]++; + + if (histToneCurveThr) { + int y = CLIP (lumimulf[0] * Color::gamma2curve[rtemp[ti * TS + tj]] + lumimulf[1] * Color::gamma2curve[gtemp[ti * TS + tj]] + lumimulf[2] * Color::gamma2curve[btemp[ti * TS + tj]]); + histToneCurveThr[y >> histToneCurveCompression]++; } } } @@ -3513,58 +3587,58 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer if (curveMode == ToneCurveParams::TC_MODE_STD) { // Standard for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - const StandardToneCurve& userToneCurve = static_cast(customToneCurve1); - userToneCurve.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + const StandardToneCurve& userToneCurve = static_cast (customToneCurve1); + userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (curveMode == ToneCurveParams::TC_MODE_FILMLIKE) { // Adobe like for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - const AdobeToneCurve& userToneCurve = static_cast(customToneCurve1); - userToneCurve.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + const AdobeToneCurve& userToneCurve = static_cast (customToneCurve1); + userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (curveMode == ToneCurveParams::TC_MODE_SATANDVALBLENDING) { // apply the curve on the saturation and value channels for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - const SatAndValueBlendingToneCurve& userToneCurve = static_cast(customToneCurve1); - rtemp[ti * TS + tj] = CLIP(rtemp[ti * TS + tj]); - gtemp[ti * TS + tj] = CLIP(gtemp[ti * TS + tj]); - btemp[ti * TS + tj] = CLIP(btemp[ti * TS + tj]); - userToneCurve.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + const SatAndValueBlendingToneCurve& userToneCurve = static_cast (customToneCurve1); + rtemp[ti * TS + tj] = CLIP (rtemp[ti * TS + tj]); + gtemp[ti * TS + tj] = CLIP (gtemp[ti * TS + tj]); + btemp[ti * TS + tj] = CLIP (btemp[ti * TS + tj]); + userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (curveMode == ToneCurveParams::TC_MODE_WEIGHTEDSTD) { // apply the curve to the rgb channels, weighted - const WeightedStdToneCurve& userToneCurve = static_cast(customToneCurve1); + const WeightedStdToneCurve& userToneCurve = static_cast (customToneCurve1); for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - rtemp[ti * TS + tj] = CLIP(rtemp[ti * TS + tj]); - gtemp[ti * TS + tj] = CLIP(gtemp[ti * TS + tj]); - btemp[ti * TS + tj] = CLIP(btemp[ti * TS + tj]); - userToneCurve.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + rtemp[ti * TS + tj] = CLIP (rtemp[ti * TS + tj]); + gtemp[ti * TS + tj] = CLIP (gtemp[ti * TS + tj]); + btemp[ti * TS + tj] = CLIP (btemp[ti * TS + tj]); + userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (curveMode == ToneCurveParams::TC_MODE_LUMINANCE) { // apply the curve to the luminance channel - const LuminanceToneCurve& userToneCurve = static_cast(customToneCurve1); + const LuminanceToneCurve& userToneCurve = static_cast (customToneCurve1); for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - rtemp[ti * TS + tj] = CLIP(rtemp[ti * TS + tj]); - gtemp[ti * TS + tj] = CLIP(gtemp[ti * TS + tj]); - btemp[ti * TS + tj] = CLIP(btemp[ti * TS + tj]); - userToneCurve.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + rtemp[ti * TS + tj] = CLIP (rtemp[ti * TS + tj]); + gtemp[ti * TS + tj] = CLIP (gtemp[ti * TS + tj]); + btemp[ti * TS + tj] = CLIP (btemp[ti * TS + tj]); + userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (curveMode == ToneCurveParams::TC_MODE_PERCEPTUAL) { // apply curve while keeping color appearance constant - const PerceptualToneCurve& userToneCurve = static_cast(customToneCurve1); + const PerceptualToneCurve& userToneCurve = static_cast (customToneCurve1); for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - rtemp[ti * TS + tj] = CLIP(rtemp[ti * TS + tj]); - gtemp[ti * TS + tj] = CLIP(gtemp[ti * TS + tj]); - btemp[ti * TS + tj] = CLIP(btemp[ti * TS + tj]); - userToneCurve.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], ptc1ApplyState); + rtemp[ti * TS + tj] = CLIP (rtemp[ti * TS + tj]); + gtemp[ti * TS + tj] = CLIP (gtemp[ti * TS + tj]); + btemp[ti * TS + tj] = CLIP (btemp[ti * TS + tj]); + userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], ptc1ApplyState); } } } @@ -3584,46 +3658,46 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer if (curveMode2 == ToneCurveParams::TC_MODE_STD) { // Standard for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - const StandardToneCurve& userToneCurve = static_cast(customToneCurve2); - userToneCurve.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + const StandardToneCurve& userToneCurve = static_cast (customToneCurve2); + userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (curveMode2 == ToneCurveParams::TC_MODE_FILMLIKE) { // Adobe like for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - const AdobeToneCurve& userToneCurve = static_cast(customToneCurve2); - userToneCurve.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + const AdobeToneCurve& userToneCurve = static_cast (customToneCurve2); + userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (curveMode2 == ToneCurveParams::TC_MODE_SATANDVALBLENDING) { // apply the curve on the saturation and value channels for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - const SatAndValueBlendingToneCurve& userToneCurve = static_cast(customToneCurve2); - userToneCurve.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + const SatAndValueBlendingToneCurve& userToneCurve = static_cast (customToneCurve2); + userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (curveMode2 == ToneCurveParams::TC_MODE_WEIGHTEDSTD) { // apply the curve to the rgb channels, weighted - const WeightedStdToneCurve& userToneCurve = static_cast(customToneCurve2); + const WeightedStdToneCurve& userToneCurve = static_cast (customToneCurve2); for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - userToneCurve.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (curveMode2 == ToneCurveParams::TC_MODE_LUMINANCE) { // apply the curve to the luminance channel - const LuminanceToneCurve& userToneCurve = static_cast(customToneCurve2); + const LuminanceToneCurve& userToneCurve = static_cast (customToneCurve2); for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - userToneCurve.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (curveMode2 == ToneCurveParams::TC_MODE_PERCEPTUAL) { // apply curve while keeping color appearance constant - const PerceptualToneCurve& userToneCurve = static_cast(customToneCurve2); + const PerceptualToneCurve& userToneCurve = static_cast (customToneCurve2); for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - userToneCurve.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], ptc2ApplyState); + userToneCurve.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], ptc2ApplyState); } } } @@ -3684,9 +3758,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float y = toxyz[1][0] * r + toxyz[1][1] * g + toxyz[1][2] * b; float z = toxyz[2][0] * r + toxyz[2][1] * g + toxyz[2][2] * b; - float fx = x < MAXVALF ? Color::cachef[x] : 327.68f * std::cbrt(x / MAXVALF); - float fy = y < MAXVALF ? Color::cachef[y] : 327.68f * std::cbrt(y / MAXVALF); - float fz = z < MAXVALF ? Color::cachef[z] : 327.68f * std::cbrt(z / MAXVALF); + float fx = x < MAXVALF ? Color::cachef[x] : 327.68f * std::cbrt (x / MAXVALF); + float fy = y < MAXVALF ? Color::cachef[y] : 327.68f * std::cbrt (y / MAXVALF); + float fz = z < MAXVALF ? Color::cachef[z] : 327.68f * std::cbrt (z / MAXVALF); float a_1 = 500.0f * (fx - fy); float b_1 = 200.0f * (fy - fz); @@ -3710,19 +3784,19 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer // Luminosity after // only Luminance in Lab float newy = toxyz[1][0] * r + toxyz[1][1] * g + toxyz[1][2] * b; - float newfy = newy < MAXVALF ? Color::cachef[newy] : 327.68f * std::cbrt(newy / MAXVALF); + float newfy = newy < MAXVALF ? Color::cachef[newy] : 327.68f * std::cbrt (newy / MAXVALF); float L_2 = 116.0f * newfy - 5242.88f; //gamut control - if(settings->rgbcurveslumamode_gamut) { + if (settings->rgbcurveslumamode_gamut) { float Lpro = L_2 / 327.68f; - float Chpro = sqrtf(SQR(a_1) + SQR(b_1)) / 327.68f; + float Chpro = sqrtf (SQR (a_1) + SQR (b_1)) / 327.68f; float HH = NAN; // we set HH to NAN, because then it will be calculated in Color::gamutLchonly only if needed // float HH = xatan2f(b_1, a_1); // According to mathematical laws we can get the sin and cos of HH by simple operations even if we don't calculate HH float2 sincosval; - if(Chpro == 0.0f) { + if (Chpro == 0.0f) { sincosval.y = 1.0f; sincosval.x = 0.0f; } else { @@ -3734,17 +3808,17 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer bool neg = false; bool more_rgb = false; //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, sincosval, Lpro, Chpro, rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], wip, highlight, 0.15f, 0.96f, neg, more_rgb); + Color::gamutLchonly (HH, sincosval, Lpro, Chpro, rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], wip, highlight, 0.15f, 0.96f, neg, more_rgb); #else //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, sincosval, Lpro, Chpro, rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], wip, highlight, 0.15f, 0.96f); + Color::gamutLchonly (HH, sincosval, Lpro, Chpro, rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], wip, highlight, 0.15f, 0.96f); #endif - //end of gamut control + //end of gamut control } else { float x_, y_, z_; //calculate RGB with L_2 and old value of a and b - Color::Lab2XYZ(L_2, a_1, b_1, x_, y_, z_) ; - Color::xyz2rgb(x_, y_, z_, rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], wip); + Color::Lab2XYZ (L_2, a_1, b_1, x_, y_, z_) ; + Color::xyz2rgb (x_, y_, z_, rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], wip); } } } @@ -3755,7 +3829,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { float h, s, v; - Color::rgb2hsv(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], h, s, v); + Color::rgb2hsv (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], h, s, v); editWhateverTmp[ti * TS + tj] = h; } } @@ -3770,10 +3844,10 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float g = gtemp[ti * TS + tj]; float b = btemp[ti * TS + tj]; float h, s, v; - Color::rgb2hsv(r, g, b, h, s, v); + Color::rgb2hsv (r, g, b, h, s, v); if (sat > 0) { - s = (1.f - satby100) * s + satby100 * (1.f - SQR(SQR(1.f - min(s, 1.0f)))); + s = (1.f - satby100) * s + satby100 * (1.f - SQR (SQR (1.f - min (s, 1.0f)))); if (s < 0.f) { s = 0.f; @@ -3784,7 +3858,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer //HSV equalizer if (hCurveEnabled) { - h = (hCurve->getVal(double(h)) - 0.5) * 2.f + h; + h = (hCurve->getVal (double (h)) - 0.5) * 2.f + h; if (h > 1.0f) { h -= 1.0f; @@ -3795,10 +3869,10 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer if (sCurveEnabled) { //shift saturation - float satparam = (sCurve->getVal(double(h)) - 0.5) * 2; + float satparam = (sCurve->getVal (double (h)) - 0.5) * 2; if (satparam > 0.00001f) { - s = (1.f - satparam) * s + satparam * (1.f - SQR(1.f - min(s, 1.0f))); + s = (1.f - satparam) * s + satparam * (1.f - SQR (1.f - min (s, 1.0f))); if (s < 0.f) { s = 0.f; @@ -3815,11 +3889,11 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } //shift value - float valparam = vCurve->getVal((double)h) - 0.5f; - valparam *= (1.f - SQR(SQR(1.f - min(s, 1.0f)))); + float valparam = vCurve->getVal ((double)h) - 0.5f; + valparam *= (1.f - SQR (SQR (1.f - min (s, 1.0f)))); if (valparam > 0.00001f) { - v = (1.f - valparam) * v + valparam * (1.f - SQR(1.f - min(v, 1.0f))); // SQR (SQR to increase action and avoid artefacts + v = (1.f - valparam) * v + valparam * (1.f - SQR (1.f - min (v, 1.0f))); // SQR (SQR to increase action and avoid artefacts if (v < 0) { v = 0; @@ -3832,7 +3906,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } - Color::hsv2rgb(h, s, v, rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + Color::hsv2rgb (h, s, v, rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } @@ -3843,12 +3917,12 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float r = rtemp[ti * TS + tj]; float g = gtemp[ti * TS + tj]; - if(r == 0.0f || g == 0.0f) { + if (r == 0.0f || g == 0.0f) { float b = btemp[ti * TS + tj]; float h, s, v; - Color::rgb2hsv(r, g, b, h, s, v); + Color::rgb2hsv (r, g, b, h, s, v); s *= 0.99f; - Color::hsv2rgb(h, s, v, rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + Color::hsv2rgb (h, s, v, rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } @@ -3860,7 +3934,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float reducac = 0.4f; int preser = 0; - if(params->colorToning.lumamode) { + if (params->colorToning.lumamode) { preser = 1; } @@ -3874,14 +3948,14 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer iplow = (float)ctColorCurve.low; iphigh = (float)ctColorCurve.high; //2 colours - ctColorCurve.getVal(iphigh, xh, yh, zh); - ctColorCurve.getVal(iplow, xl, yl, zl); + ctColorCurve.getVal (iphigh, xh, yh, zh); + ctColorCurve.getVal (iplow, xl, yl, zl); - Color::xyz2rgb(xh, yh, zh, rh, gh, bh, wip); - Color::xyz2rgb(xl, yl, zl, rl, gl, bl, wip); + Color::xyz2rgb (xh, yh, zh, rh, gh, bh, wip); + Color::xyz2rgb (xl, yl, zl, rl, gl, bl, wip); //reteave rgb value with s and l =1 - retreavergb(rl, gl, bl); - retreavergb(rh, gh, bh); + retreavergb (rl, gl, bl); + retreavergb (rh, gh, bh); //printf("rl=%f gl=%f bl=%f\n",rl,gl,bl); for (int i = istart, ti = 0; i < tH; i++, ti++) { @@ -3921,7 +3995,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int preser = 0; //bool execbal = params->colorToning.method=="Splitbal"; - if(params->colorToning.lumamode) { + if (params->colorToning.lumamode) { preser = 1; } @@ -3937,16 +4011,16 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float lumafter = 0.299f * ro + 0.587f * go + 0.114f * bo; float preserv = 1.f; - if(preser == 1) { + if (preser == 1) { preserv = lumbefore / lumafter; } ro *= preserv; go *= preserv; bo *= preserv; - ro = CLIP(ro); - go = CLIP(go); - bo = CLIP(bo); + ro = CLIP (ro); + go = CLIP (go); + bo = CLIP (bo); rtemp[ti * TS + tj] = ro; gtemp[ti * TS + tj] = go; btemp[ti * TS + tj] = bo; @@ -3960,7 +4034,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer else if (params->colorToning.method == "Lab" && opautili) { int algm = 0; bool twocol = true;//true=500 color false=2 color - int metchrom; + int metchrom = 0; if (params->colorToning.twocolor == "Std" ) { metchrom = 0; @@ -3972,13 +4046,13 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer metchrom = 3; } - if(metchrom == 3) { + if (metchrom == 3) { twocol = false; } - float iplow, iphigh; + float iplow = 0.f, iphigh = 0.f; - if(!twocol) { + if (!twocol) { iplow = (float)ctColorCurve.low; iphigh = (float)ctColorCurve.high; } @@ -4005,13 +4079,13 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float b = btemp[ti * TS + tj]; float ro, go, bo; labtoning (r, g, b, ro, go, bo, algm, metchrom, twoc, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, iplow, iphigh, wp, wip); - rtemp[ti * TS + tj] = CLIP(ro); //I used CLIP because there is a little bug in gamutLchonly that return 65536.ii intead of 65535 ==> crash - gtemp[ti * TS + tj] = CLIP(go); - btemp[ti * TS + tj] = CLIP(bo); + rtemp[ti * TS + tj] = CLIP (ro); //I used CLIP because there is a little bug in gamutLchonly that return 65536.ii intead of 65535 ==> crash + gtemp[ti * TS + tj] = CLIP (go); + btemp[ti * TS + tj] = CLIP (bo); } } } - } else if (params->colorToning.method.substr(0, 3) == "RGB" && opautili) { + } else if (params->colorToning.method.substr (0, 3) == "RGB" && opautili) { // color toning for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { @@ -4022,28 +4096,28 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer // Luminance = (0.299f*r + 0.587f*g + 0.114f*b) float h, s, l; - Color::rgb2hsl(r, g, b, h, s, l); + Color::rgb2hsl (r, g, b, h, s, l); - float l_ = Color::gamma_srgb(l * 65535.f) / 65535.f; + float l_ = Color::gamma_srgb (l * 65535.f) / 65535.f; // get the opacity and tweak it to preserve saturated colors float opacity; - if(ctOpacityCurve) { - opacity = (1.f - min(s / satLimit, 1.f) * (1.f - satLimitOpacity)) * ctOpacityCurve.lutOpacityCurve[l_ * 500.f]; + if (ctOpacityCurve) { + opacity = (1.f - min (s / satLimit, 1.f) * (1.f - satLimitOpacity)) * ctOpacityCurve.lutOpacityCurve[l_ * 500.f]; } - if(!ctOpacityCurve) { + if (!ctOpacityCurve) { opacity = 0.f; } float r2, g2, b2; - ctColorCurve.getVal(l_, r2, g2, b2); // get the color from the color curve + ctColorCurve.getVal (l_, r2, g2, b2); // get the color from the color curve float h2, s2, l2; - Color::rgb2hsl(r2, g2, b2, h2, s2, l2); // transform this new color to hsl + Color::rgb2hsl (r2, g2, b2, h2, s2, l2); // transform this new color to hsl - Color::hsl2rgb(h2, s + ((1.f - s) * (1.f - l) * 0.7f), l, r2, g2, b2); + Color::hsl2rgb (h2, s + ((1.f - s) * (1.f - l) * 0.7f), l, r2, g2, b2); rtemp[ti * TS + tj] = r + (r2 - r) * opacity; // merge the color to the old color, depending on the opacity gtemp[ti * TS + tj] = g + (g2 - g) * opacity; @@ -4067,53 +4141,53 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int j = jstart, tj = 0; j < tW; j++, tj++) { float X, Y, Z, L, aa, bb; //rgb=>lab - Color::rgbxyz(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], X, Y, Z, wp); + Color::rgbxyz (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], X, Y, Z, wp); //convert Lab - Color::XYZ2Lab(X, Y, Z, L, aa, bb); + Color::XYZ2Lab (X, Y, Z, L, aa, bb); //end rgb=>lab - float HH = xatan2f(bb, aa); // HH hue in -3.141 +3.141 + float HH = xatan2f (bb, aa); // HH hue in -3.141 +3.141 - editWhateverTmp[ti * TS + tj] = float(Color::huelab_to_huehsv2(HH)); + editWhateverTmp[ti * TS + tj] = float (Color::huelab_to_huehsv2 (HH)); } } } //black and white - if(blackwhite) { + if (blackwhite) { if (hasToneCurvebw1) { if (beforeCurveMode == BlackWhiteParams::TC_MODE_STD_BW) { // Standard for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - const StandardToneCurvebw& userToneCurvebw = static_cast(customToneCurvebw1); - userToneCurvebw.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + const StandardToneCurvebw& userToneCurvebw = static_cast (customToneCurvebw1); + userToneCurvebw.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (beforeCurveMode == BlackWhiteParams::TC_MODE_FILMLIKE_BW) { // Adobe like for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - const AdobeToneCurvebw& userToneCurvebw = static_cast(customToneCurvebw1); - userToneCurvebw.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + const AdobeToneCurvebw& userToneCurvebw = static_cast (customToneCurvebw1); + userToneCurvebw.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (beforeCurveMode == BlackWhiteParams::TC_MODE_SATANDVALBLENDING_BW) { // apply the curve on the saturation and value channels for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - const SatAndValueBlendingToneCurvebw& userToneCurvebw = static_cast(customToneCurvebw1); - rtemp[ti * TS + tj] = CLIP(rtemp[ti * TS + tj]); - gtemp[ti * TS + tj] = CLIP(gtemp[ti * TS + tj]); - btemp[ti * TS + tj] = CLIP(btemp[ti * TS + tj]); - userToneCurvebw.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + const SatAndValueBlendingToneCurvebw& userToneCurvebw = static_cast (customToneCurvebw1); + rtemp[ti * TS + tj] = CLIP (rtemp[ti * TS + tj]); + gtemp[ti * TS + tj] = CLIP (gtemp[ti * TS + tj]); + btemp[ti * TS + tj] = CLIP (btemp[ti * TS + tj]); + userToneCurvebw.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } else if (beforeCurveMode == BlackWhiteParams::TC_MODE_WEIGHTEDSTD_BW) { // apply the curve to the rgb channels, weighted for (int i = istart, ti = 0; i < tH; i++, ti++) { for (int j = jstart, tj = 0; j < tW; j++, tj++) { - const WeightedStdToneCurvebw& userToneCurvebw = static_cast(customToneCurvebw1); - rtemp[ti * TS + tj] = CLIP(rtemp[ti * TS + tj]); - gtemp[ti * TS + tj] = CLIP(gtemp[ti * TS + tj]); - btemp[ti * TS + tj] = CLIP(btemp[ti * TS + tj]); + const WeightedStdToneCurvebw& userToneCurvebw = static_cast (customToneCurvebw1); + rtemp[ti * TS + tj] = CLIP (rtemp[ti * TS + tj]); + gtemp[ti * TS + tj] = CLIP (gtemp[ti * TS + tj]); + btemp[ti * TS + tj] = CLIP (btemp[ti * TS + tj]); - userToneCurvebw.Apply(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); + userToneCurvebw.Apply (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj]); } } } @@ -4142,20 +4216,25 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer // -------------------------------------------------- #ifndef __SSE2__ + //gamma correction: pseudo TRC curve if (hasgammabw) { Color::trcGammaBW (r, g, b, gammabwr, gammabwg, gammabwb); } + #endif rtemp[ti * TS + tj] = r; gtemp[ti * TS + tj] = g; btemp[ti * TS + tj] = b; } + #ifdef __SSE2__ + if (hasgammabw) { //gamma correction: pseudo TRC curve Color::trcGammaBWRow (&rtemp[ti * TS], >emp[ti * TS], &btemp[ti * TS], tW - jstart, gammabwr, gammabwg, gammabwb); } + #endif } @@ -4164,15 +4243,15 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int j = jstart, tj = 0; j < tW; j++, tj++) { //rgb => xyz float X, Y, Z; - Color::rgbxyz(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], X, Y, Z, wp); + Color::rgbxyz (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], X, Y, Z, wp); //xyz => Lab float L, aa, bb; - Color::XYZ2Lab(X, Y, Z, L, aa, bb); - float CC = sqrtf(SQR(aa) + SQR(bb)) / 327.68f; //CC chromaticity in 0..180 or more - float HH = xatan2f(bb, aa); // HH hue in -3.141 +3.141 + Color::XYZ2Lab (X, Y, Z, L, aa, bb); + float CC = sqrtf (SQR (aa) + SQR (bb)) / 327.68f; //CC chromaticity in 0..180 or more + float HH = xatan2f (bb, aa); // HH hue in -3.141 +3.141 float2 sincosval; - if(CC == 0.0f) { + if (CC == 0.0f) { sincosval.y = 1.f; sincosval.x = 0.0f; } else { @@ -4182,17 +4261,18 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer if (bwlCurveEnabled) { L /= 32768.f; - double hr = Color::huelab_to_huehsv2(HH); - float valparam = float((bwlCurve->getVal(hr) - 0.5f) * 2.0f); //get l_r=f(H) + double hr = Color::huelab_to_huehsv2 (HH); + float valparam = float ((bwlCurve->getVal (hr) - 0.5f) * 2.0f); //get l_r=f(H) float kcc = (CC / 70.f); //take Chroma into account...70 "middle" of chromaticity (arbitrary and simple), one can imagine other algorithme //reduct action for low chroma and increase action for high chroma valparam *= kcc; - if(valparam > 0.f) { - L = (1.f - valparam) * L + valparam * (1.f - SQR(SQR(SQR(SQR(1.f - min(L, 1.0f)))))); // SQR (SQR((SQR) to increase action in low light + if (valparam > 0.f) { + L = (1.f - valparam) * L + valparam * (1.f - SQR (SQR (SQR (SQR (1.f - min (L, 1.0f)))))); // SQR (SQR((SQR) to increase action in low light } else { L *= (1.f + valparam); //for negative } + L *= 32768.f; } @@ -4202,29 +4282,34 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer bool neg = false; bool more_rgb = false; //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, sincosval, L, CC, RR, GG, BB, wip, highlight, 0.15f, 0.96f, neg, more_rgb); + Color::gamutLchonly (HH, sincosval, L, CC, RR, GG, BB, wip, highlight, 0.15f, 0.96f, neg, more_rgb); #else //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, sincosval, L, CC, RR, GG, BB, wip, highlight, 0.15f, 0.96f); + Color::gamutLchonly (HH, sincosval, L, CC, RR, GG, BB, wip, highlight, 0.15f, 0.96f); #endif L *= 327.68f; //convert l => rgb - Color::L2XYZ(L, X, Y, Z); + Color::L2XYZ (L, X, Y, Z); float newRed; // We use the red channel for bw - Color::xyz2r(X, Y, Z, newRed, wip); + Color::xyz2r (X, Y, Z, newRed, wip); rtemp[ti * TS + tj] = gtemp[ti * TS + tj] = btemp[ti * TS + tj] = newRed; #ifndef __SSE2__ + if (hasgammabw) { //gamma correction: pseudo TRC curve Color::trcGammaBW (rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], gammabwr, gammabwg, gammabwb); } + #endif } + #ifdef __SSE2__ + if (hasgammabw) { //gamma correction: pseudo TRC curve Color::trcGammaBWRow (&rtemp[ti * TS], >emp[ti * TS], &btemp[ti * TS], tW - jstart, gammabwr, gammabwg, gammabwb); } + #endif } } @@ -4243,19 +4328,19 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer #ifdef __SSE2__ for (; j < tW - 3; j += 4, tj += 4) { - vfloat sourceR = LVF(rtemp[ti * TS + tj]); - vfloat sourceG = LVF(gtemp[ti * TS + tj]); - vfloat sourceB = LVF(btemp[ti * TS + tj]); + vfloat sourceR = LVF (rtemp[ti * TS + tj]); + vfloat sourceG = LVF (gtemp[ti * TS + tj]); + vfloat sourceB = LVF (btemp[ti * TS + tj]); vfloat x; vfloat y; vfloat z; - Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_work2xyz); - Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2clut); + Color::rgbxyz (sourceR, sourceG, sourceB, x, y, z, v_work2xyz); + Color::xyz2rgb (x, y, z, sourceR, sourceG, sourceB, v_xyz2clut); - STVF(rtemp[ti * TS + tj], sourceR); - STVF(gtemp[ti * TS + tj], sourceG); - STVF(btemp[ti * TS + tj], sourceB); + STVF (rtemp[ti * TS + tj], sourceR); + STVF (gtemp[ti * TS + tj], sourceG); + STVF (btemp[ti * TS + tj], sourceB); } #endif @@ -4266,8 +4351,8 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float &sourceB = btemp[ti * TS + tj]; float x, y, z; - Color::rgbxyz( sourceR, sourceG, sourceB, x, y, z, wprof ); - Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, xyz2clut); + Color::rgbxyz ( sourceR, sourceG, sourceB, x, y, z, wprof ); + Color::xyz2rgb (x, y, z, sourceR, sourceG, sourceB, xyz2clut); } } @@ -4277,15 +4362,15 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float &sourceB = btemp[ti * TS + tj]; // Apply gamma sRGB (default RT) - sourceR = Color::gamma_srgbclipped(sourceR); - sourceG = Color::gamma_srgbclipped(sourceG); - sourceB = Color::gamma_srgbclipped(sourceB); + sourceR = Color::gamma_srgbclipped (sourceR); + sourceG = Color::gamma_srgbclipped (sourceG); + sourceB = Color::gamma_srgbclipped (sourceB); } const std::size_t line_offset = ti * TS; - hald_clut->getRGB( + hald_clut->getRGB ( film_simulation_strength, - std::min(TS, tW - jstart), + std::min (TS, tW - jstart), rtemp + line_offset, gtemp + line_offset, btemp + line_offset, @@ -4298,9 +4383,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float &sourceB = btemp[ti * TS + tj]; // Apply inverse gamma sRGB - sourceR = Color::igamma_srgb(out_rgbx[tj * 4 + 0]); - sourceG = Color::igamma_srgb(out_rgbx[tj * 4 + 1]); - sourceB = Color::igamma_srgb(out_rgbx[tj * 4 + 2]); + sourceR = Color::igamma_srgb (out_rgbx[tj * 4 + 0]); + sourceG = Color::igamma_srgb (out_rgbx[tj * 4 + 1]); + sourceB = Color::igamma_srgb (out_rgbx[tj * 4 + 2]); } if (!clutAndWorkingProfilesAreSame) { @@ -4311,19 +4396,19 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer #ifdef __SSE2__ for (; j < tW - 3; j += 4, tj += 4) { - vfloat sourceR = LVF(rtemp[ti * TS + tj]); - vfloat sourceG = LVF(gtemp[ti * TS + tj]); - vfloat sourceB = LVF(btemp[ti * TS + tj]); + vfloat sourceR = LVF (rtemp[ti * TS + tj]); + vfloat sourceG = LVF (gtemp[ti * TS + tj]); + vfloat sourceB = LVF (btemp[ti * TS + tj]); vfloat x; vfloat y; vfloat z; - Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, v_clut2xyz); - Color::xyz2rgb(x, y, z, sourceR, sourceG, sourceB, v_xyz2work); + Color::rgbxyz (sourceR, sourceG, sourceB, x, y, z, v_clut2xyz); + Color::xyz2rgb (x, y, z, sourceR, sourceG, sourceB, v_xyz2work); - STVF(rtemp[ti * TS + tj], sourceR); - STVF(gtemp[ti * TS + tj], sourceG); - STVF(btemp[ti * TS + tj], sourceB); + STVF (rtemp[ti * TS + tj], sourceR); + STVF (gtemp[ti * TS + tj], sourceG); + STVF (btemp[ti * TS + tj], sourceB); } #endif @@ -4334,8 +4419,8 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float &sourceB = btemp[ti * TS + tj]; float x, y, z; - Color::rgbxyz(sourceR, sourceG, sourceB, x, y, z, clut2xyz); - Color::xyz2rgb( x, y, z, sourceR, sourceG, sourceB, wiprof ); + Color::rgbxyz (sourceR, sourceG, sourceB, x, y, z, clut2xyz); + Color::xyz2rgb ( x, y, z, sourceR, sourceG, sourceB, wiprof ); } } } @@ -4349,11 +4434,11 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer // filling the pipette buffer by the content of the temp pipette buffers if (editImgFloat) { - editImgFloat->r(i, j) = editIFloatTmpR[ti * TS + tj]; - editImgFloat->g(i, j) = editIFloatTmpG[ti * TS + tj]; - editImgFloat->b(i, j) = editIFloatTmpB[ti * TS + tj]; + editImgFloat->r (i, j) = editIFloatTmpR[ti * TS + tj]; + editImgFloat->g (i, j) = editIFloatTmpG[ti * TS + tj]; + editImgFloat->b (i, j) = editIFloatTmpB[ti * TS + tj]; } else if (editWhatever) { - editWhatever->v(i, j) = editWhateverTmp[ti * TS + tj]; + editWhatever->v (i, j) = editWhateverTmp[ti * TS + tj]; } float r = rtemp[ti * TS + tj]; @@ -4366,9 +4451,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float fx, fy, fz; - fx = (x < 65535.0f ? Color::cachef[x] : 327.68f * std::cbrt(x / MAXVALF)); - fy = (y < 65535.0f ? Color::cachef[y] : 327.68f * std::cbrt(y / MAXVALF)); - fz = (z < 65535.0f ? Color::cachef[z] : 327.68f * std::cbrt(z / MAXVALF)); + fx = (x < 65535.0f ? Color::cachef[x] : 327.68f * std::cbrt (x / MAXVALF)); + fy = (y < 65535.0f ? Color::cachef[y] : 327.68f * std::cbrt (y / MAXVALF)); + fz = (z < 65535.0f ? Color::cachef[z] : 327.68f * std::cbrt (z / MAXVALF)); lab->L[i][j] = (116.0f * fy - 5242.88f); //5242.88=16.0*327.68; lab->a[i][j] = (500.0f * (fx - fy) ); @@ -4397,22 +4482,22 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int j = jstart, tj = 0; j < tW; j++, tj++) { // filling the pipette buffer by the content of the temp pipette buffers if (editImgFloat) { - editImgFloat->r(i, j) = editIFloatTmpR[ti * TS + tj]; - editImgFloat->g(i, j) = editIFloatTmpG[ti * TS + tj]; - editImgFloat->b(i, j) = editIFloatTmpB[ti * TS + tj]; + editImgFloat->r (i, j) = editIFloatTmpR[ti * TS + tj]; + editImgFloat->g (i, j) = editIFloatTmpG[ti * TS + tj]; + editImgFloat->b (i, j) = editIFloatTmpB[ti * TS + tj]; } else if (editWhatever) { - editWhatever->v(i, j) = editWhateverTmp[ti * TS + tj]; + editWhatever->v (i, j) = editWhateverTmp[ti * TS + tj]; } - tmpImage->r(i, j) = rtemp[ti * TS + tj]; - tmpImage->g(i, j) = gtemp[ti * TS + tj]; - tmpImage->b(i, j) = btemp[ti * TS + tj]; + tmpImage->r (i, j) = rtemp[ti * TS + tj]; + tmpImage->g (i, j) = gtemp[ti * TS + tj]; + tmpImage->b (i, j) = btemp[ti * TS + tj]; } } } } - free(buffer); + free (buffer); if (editIFloatBuffer) { free (editIFloatBuffer); @@ -4421,34 +4506,39 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer if (editWhateverBuffer) { free (editWhateverBuffer); } + #ifdef _OPENMP -#pragma omp critical -{ - if(toneCurveHistSize > 0) { - histToneCurve += histToneCurveThr; - } -} + #pragma omp critical + { + if (toneCurveHistSize > 0) { + histToneCurve += histToneCurveThr; + } + } #endif // _OPENMP } // starting a new tile processing with a 'reduction' clause for the auto mixer computing if (blackwhite) {//channel-mixer - int tW = working->width; - int tH = working->height; + int tW = working->getWidth(); + int tH = working->getHeight(); if (algm == 2) { //channel-mixer //end auto chmix if (computeMixerAuto) { // auto channel-mixer + double nr = 0; + double ng = 0; + double nb = 0; + #ifdef _OPENMP #pragma omp parallel for schedule(dynamic, 16) reduction(+:nr,ng,nb) #endif for (int i = 0; i < tH; i++) { for (int j = 0; j < tW; j++) { - nr += tmpImage->r(i, j); - ng += tmpImage->g(i, j); - nb += tmpImage->b(i, j); + nr += tmpImage->r (i, j); + ng += tmpImage->g (i, j); + nb += tmpImage->b (i, j); } } @@ -4457,9 +4547,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer double kng = srgb / ng; double knb = srgb / nb; double sk = knr + kng + knb; - autor = (float)(100.0 * knr / sk); - autog = (float)(100.0 * kng / sk); - autob = (float)(100.0 * knb / sk); + autor = (float) (100.0 * knr / sk); + autog = (float) (100.0 * kng / sk); + autob = (float) (100.0 * knb / sk); } @@ -4476,9 +4566,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer } float filcor; - Color::computeBWMixerConstants(params->blackwhite.setting, params->blackwhite.filter, params->blackwhite.algo, filcor, - bwr, bwg, bwb, mixerOrange, mixerYellow, mixerCyan, mixerPurple, mixerMagenta, - params->blackwhite.autoc, complem, kcorec, rrm, ggm, bbm); + Color::computeBWMixerConstants (params->blackwhite.setting, params->blackwhite.filter, params->blackwhite.algo, filcor, + bwr, bwg, bwb, mixerOrange, mixerYellow, mixerCyan, mixerPurple, mixerMagenta, + params->blackwhite.autoc, complem, kcorec, rrm, ggm, bbm); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic, 16) @@ -4488,20 +4578,25 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int j = 0; j < tW; j++) { //mix channel - tmpImage->r(i, j) = tmpImage->g(i, j) = tmpImage->b(i, j) = CLIP((bwr * tmpImage->r(i, j) + bwg * tmpImage->g(i, j) + bwb * tmpImage->b(i, j)) * kcorec); + tmpImage->r (i, j) = tmpImage->g (i, j) = tmpImage->b (i, j) = CLIP ((bwr * tmpImage->r (i, j) + bwg * tmpImage->g (i, j) + bwb * tmpImage->b (i, j)) * kcorec); #ifndef __SSE2__ + //gamma correction: pseudo TRC curve if (hasgammabw) { - Color::trcGammaBW (tmpImage->r(i, j), tmpImage->g(i, j), tmpImage->b(i, j), gammabwr, gammabwg, gammabwb); + Color::trcGammaBW (tmpImage->r (i, j), tmpImage->g (i, j), tmpImage->b (i, j), gammabwr, gammabwg, gammabwb); } + #endif } + #ifdef __SSE2__ + if (hasgammabw) { //gamma correction: pseudo TRC curve - Color::trcGammaBWRow (tmpImage->r(i), tmpImage->g(i), tmpImage->b(i), tW, gammabwr, gammabwg, gammabwb); + Color::trcGammaBWRow (tmpImage->r (i), tmpImage->g (i), tmpImage->b (i), tW, gammabwr, gammabwg, gammabwb); } + #endif } } @@ -4513,7 +4608,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int i = 0; i < tH; i++) { for (int j = 0; j < tW; j++) { - editWhatever->v(i, j) = Color::gamma2curve[tmpImage->r(i, j)] / 65535.f; // assuming that r=g=b + editWhatever->v (i, j) = Color::gamma2curve[tmpImage->r (i, j)] / 65535.f; // assuming that r=g=b } } } @@ -4527,8 +4622,8 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int i = 0; i < tH; i++) { for (int j = 0; j < tW; j++) { - const StandardToneCurvebw& userToneCurve = static_cast(customToneCurvebw2); - userToneCurve.Apply(tmpImage->r(i, j), tmpImage->g(i, j), tmpImage->b(i, j)); + const StandardToneCurvebw& userToneCurve = static_cast (customToneCurvebw2); + userToneCurve.Apply (tmpImage->r (i, j), tmpImage->g (i, j), tmpImage->b (i, j)); } } } else if (afterCurveMode == BlackWhiteParams::TC_MODE_WEIGHTEDSTD_BW) { // apply the curve to the rgb channels, weighted @@ -4538,13 +4633,13 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int i = 0; i < tH; i++) { //for ulterior usage if bw data modified for (int j = 0; j < tW; j++) { - const WeightedStdToneCurvebw& userToneCurve = static_cast(customToneCurvebw2); + const WeightedStdToneCurvebw& userToneCurve = static_cast (customToneCurvebw2); - tmpImage->r(i, j) = CLIP(tmpImage->r(i, j)); - tmpImage->g(i, j) = CLIP(tmpImage->g(i, j)); - tmpImage->b(i, j) = CLIP(tmpImage->b(i, j)); + tmpImage->r (i, j) = CLIP (tmpImage->r (i, j)); + tmpImage->g (i, j) = CLIP (tmpImage->g (i, j)); + tmpImage->b (i, j) = CLIP (tmpImage->b (i, j)); - userToneCurve.Apply(tmpImage->r(i, j), tmpImage->g(i, j), tmpImage->b(i, j)); + userToneCurve.Apply (tmpImage->r (i, j), tmpImage->g (i, j), tmpImage->b (i, j)); } } } @@ -4552,7 +4647,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer //colortoning with black and white if (hasColorToning) { - if(params->colorToning.method == "Splitco") { + if (params->colorToning.method == "Splitco") { /* #if 1 for (int i=istart,ti=0; icolorToning.lumamode) { + if (params->colorToning.lumamode) { preser = 1; } @@ -4582,32 +4677,32 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int i = 0; i < tH; i++) { for (int j = 0; j < tW; j++) { - float r = tmpImage->r(i, j); - float g = tmpImage->g(i, j); - float b = tmpImage->b(i, j); + float r = tmpImage->r (i, j); + float g = tmpImage->g (i, j); + float b = tmpImage->b (i, j); float lumbefore = 0.299f * r + 0.587f * g + 0.114f * b; - if(lumbefore < 65000.f && lumbefore > 500.f) { //reduct artifacts for highlights an extrem shadows + if (lumbefore < 65000.f && lumbefore > 500.f) { //reduct artifacts for highlights an extrem shadows float ro, go, bo; int mode = 1; toningsmh (r, g, b, ro, go, bo, RedLow, GreenLow, BlueLow, RedMed, GreenMed, BlueMed, RedHigh, GreenHigh, BlueHigh, reducac, mode, preser, strProtect); float lumafter = 0.299f * ro + 0.587f * go + 0.114f * bo; float preserv = 1.f; - if(preser == 1) { + if (preser == 1) { preserv = lumbefore / lumafter; } ro *= preserv; go *= preserv; bo *= preserv; - ro = CLIP(ro); - go = CLIP(go); - bo = CLIP(bo); - tmpImage->r(i, j) = ro; - tmpImage->g(i, j) = go; - tmpImage->b(i, j) = bo; + ro = CLIP (ro); + go = CLIP (go); + bo = CLIP (bo); + tmpImage->r (i, j) = ro; + tmpImage->g (i, j) = go; + tmpImage->b (i, j) = bo; } } } @@ -4620,7 +4715,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float reducac = 0.4f; int preser = 0; - if(params->colorToning.lumamode) { + if (params->colorToning.lumamode) { preser = 1; } @@ -4635,31 +4730,31 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer iphigh = (float)ctColorCurve.high; //2 colours - ctColorCurve.getVal(iphigh, xh, yh, zh); - ctColorCurve.getVal(iplow, xl, yl, zl); + ctColorCurve.getVal (iphigh, xh, yh, zh); + ctColorCurve.getVal (iplow, xl, yl, zl); - Color::xyz2rgb(xh, yh, zh, rh, gh, bh, wip); - Color::xyz2rgb(xl, yl, zl, rl, gl, bl, wip); + Color::xyz2rgb (xh, yh, zh, rh, gh, bh, wip); + Color::xyz2rgb (xl, yl, zl, rl, gl, bl, wip); //retrieve rgb value with s and l =1 - retreavergb(rl, gl, bl); - retreavergb(rh, gh, bh); + retreavergb (rl, gl, bl); + retreavergb (rh, gh, bh); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic, 5) #endif for (int i = 0; i < tH; i++) { for (int j = 0; j < tW; j++) { - float r = tmpImage->r(i, j); - float g = tmpImage->g(i, j); - float b = tmpImage->b(i, j); + float r = tmpImage->r (i, j); + float g = tmpImage->g (i, j); + float b = tmpImage->b (i, j); float ro, go, bo; int mode = 1; toning2col (r, g, b, ro, go, bo, iplow, iphigh, rl, gl, bl, rh, gh, bh, SatLow, SatHigh, balanS, balanH, reducac, mode, preser, strProtect); - tmpImage->r(i, j) = ro; - tmpImage->g(i, j) = go; - tmpImage->b(i, j) = bo; + tmpImage->r (i, j) = ro; + tmpImage->g (i, j) = go; + tmpImage->b (i, j) = bo; } } } @@ -4668,7 +4763,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer else if (params->colorToning.method == "Lab" && opautili) { int algm = 0; bool twocol = true; - int metchrom; + int metchrom = 0; if (params->colorToning.twocolor == "Std" ) { metchrom = 0; @@ -4680,13 +4775,13 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer metchrom = 3; } - if(metchrom == 3) { + if (metchrom == 3) { twocol = false; } - float iplow, iphigh; + float iplow = 0.f, iphigh = 0.f; - if(!twocol) { + if (!twocol) { iplow = (float)ctColorCurve.low; iphigh = (float)ctColorCurve.high; @@ -4694,7 +4789,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer int twoc = 0; //integer instead of bool to let more possible choice...other than 2 and 500. - if(!twocol) { + if (!twocol) { twoc = 0; // 2 colours } else { twoc = 1; // 500 colours @@ -4702,32 +4797,32 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer if (params->colorToning.method == "Lab") { algm = 1; - } else if(params->colorToning.method == "Lch") { + } else if (params->colorToning.method == "Lch") { algm = 2; //in case of } - if(algm <= 2) { + if (algm <= 2) { #ifdef _OPENMP #pragma omp parallel for schedule(dynamic, 5) #endif for (int i = 0; i < tH; i++) { for (int j = 0; j < tW; j++) { - float r = tmpImage->r(i, j); - float g = tmpImage->g(i, j); - float b = tmpImage->b(i, j); + float r = tmpImage->r (i, j); + float g = tmpImage->g (i, j); + float b = tmpImage->b (i, j); float ro, bo, go; labtoning (r, g, b, ro, go, bo, algm, metchrom, twoc, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, iplow, iphigh, wp, wip); - tmpImage->r(i, j) = CLIP(ro); - tmpImage->g(i, j) = CLIP(go); - tmpImage->b(i, j) = CLIP(bo); + tmpImage->r (i, j) = CLIP (ro); + tmpImage->g (i, j) = CLIP (go); + tmpImage->b (i, j) = CLIP (bo); } } } } - else if (params->colorToning.method.substr(0, 3) == "RGB" && opautili) { + else if (params->colorToning.method.substr (0, 3) == "RGB" && opautili) { // color toning #ifdef _OPENMP #pragma omp parallel for schedule(dynamic, 5) @@ -4735,31 +4830,31 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int i = 0; i < tH; i++) { for (int j = 0; j < tW; j++) { - float r = tmpImage->r(i, j); - float g = tmpImage->g(i, j); - float b = tmpImage->b(i, j); + float r = tmpImage->r (i, j); + float g = tmpImage->g (i, j); + float b = tmpImage->b (i, j); // Luminance = (0.299f*r + 0.587f*g + 0.114f*b) float h, s, l; - Color::rgb2hsl(r, g, b, h, s, l); + Color::rgb2hsl (r, g, b, h, s, l); - float l_ = Color::gamma_srgb(l * 65535.f) / 65535.f; + float l_ = Color::gamma_srgb (l * 65535.f) / 65535.f; // get the opacity and tweak it to preserve saturated colors float opacity = ctOpacityCurve.lutOpacityCurve[l_ * 500.f] / 4.f; float r2, g2, b2; - ctColorCurve.getVal(l_, r2, g2, b2); // get the color from the color curve + ctColorCurve.getVal (l_, r2, g2, b2); // get the color from the color curve float h2, s2, l2; - Color::rgb2hsl(r2, g2, b2, h2, s2, l2); // transform this new color to hsl + Color::rgb2hsl (r2, g2, b2, h2, s2, l2); // transform this new color to hsl - Color::hsl2rgb(h2, s2, l, r2, g2, b2); + Color::hsl2rgb (h2, s2, l, r2, g2, b2); - tmpImage->r(i, j) = r + (r2 - r) * opacity; - tmpImage->g(i, j) = g + (g2 - g) * opacity; - tmpImage->b(i, j) = b + (b2 - b) * opacity; + tmpImage->r (i, j) = r + (r2 - r) * opacity; + tmpImage->g (i, j) = g + (g2 - g) * opacity; + tmpImage->b (i, j) = b + (b2 - b) * opacity; } } } @@ -4794,9 +4889,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer for (int i = 0; i < tH; i++) { for (int j = 0; j < tW; j++) { - float r = tmpImage->r(i, j); - float g = tmpImage->g(i, j); - float b = tmpImage->b(i, j); + float r = tmpImage->r (i, j); + float g = tmpImage->g (i, j); + float b = tmpImage->b (i, j); float x = toxyz[0][0] * r + toxyz[0][1] * g + toxyz[0][2] * b; float y = toxyz[1][0] * r + toxyz[1][1] * g + toxyz[1][2] * b; @@ -4804,9 +4899,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer float fx, fy, fz; - fx = (x < MAXVALF ? Color::cachef[x] : 327.68f * std::cbrt(x / MAXVALF)); - fy = (y < MAXVALF ? Color::cachef[y] : 327.68f * std::cbrt(y / MAXVALF)); - fz = (z < MAXVALF ? Color::cachef[z] : 327.68f * std::cbrt(z / MAXVALF)); + fx = (x < MAXVALF ? Color::cachef[x] : 327.68f * std::cbrt (x / MAXVALF)); + fy = (y < MAXVALF ? Color::cachef[y] : 327.68f * std::cbrt (y / MAXVALF)); + fz = (z < MAXVALF ? Color::cachef[z] : 327.68f * std::cbrt (z / MAXVALF)); lab->L[i][j] = 116.0f * fy - 5242.88f; //5242.88=16.0*327.68; lab->a[i][j] = 500.0f * (fx - fy); @@ -4842,31 +4937,31 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer **/ void ImProcFunctions::retreavergb (float &r, float &g, float &b) { - float mini = min(r, g, b); - float maxi = max(r, g, b); + float mini = min (r, g, b); + float maxi = max (r, g, b); float kkm = 65535.f / maxi; - if(b == mini && r == maxi) { + if (b == mini && r == maxi) { r = 65535.f; g = kkm * (g - b); b = 0.f; - } else if(b == mini && g == maxi) { + } else if (b == mini && g == maxi) { g = 65535.f; r = kkm * (r - b); b = 0.f; - } else if(g == mini && r == maxi) { + } else if (g == mini && r == maxi) { r = 65535.f; b = kkm * (b - g); g = 0.f; - } else if(g == mini && b == maxi) { + } else if (g == mini && b == maxi) { b = 65535.f; r = kkm * (r - g); g = 0.f; - } else if(r == mini && b == maxi) { + } else if (r == mini && b == maxi) { b = 65535.f; g = kkm * (g - r); r = 0.f; - } else if(r == mini && g == maxi) { + } else if (r == mini && g == maxi) { g = 65535.f; b = kkm * (b - r); r = 0.f; @@ -4891,7 +4986,7 @@ void ImProcFunctions::secondeg_end (float reducac, float vinf, float &aa, float float a3 = 1.f - v0 * v0; float a4 = me * me - v0 * v0; aa = (1.f + (zrd - 1.f) * (1 - v0) / a2) / (a4 * (1.f - v0) / a2 - a3); - bb = -(1.f + a3 * aa) / (1.f - v0); + bb = - (1.f + a3 * aa) / (1.f - v0); cc = - (aa + bb); } @@ -4940,7 +5035,7 @@ void ImProcFunctions::toningsmh (float r, float g, float b, float &ro, float &go float GreenL = 1.f + (GreenLow - 1.f) * 0.4f; float BlueL = 1.f + (BlueLow - 1.f) * bmu; float h, s, v; - Color::rgb2hsv(r, g, b, h, s, v); + Color::rgb2hsv (r, g, b, h, s, v); float ksat = 1.f; float ksatlow = 1.f; // float s_0=0.55f; @@ -4957,10 +5052,10 @@ void ImProcFunctions::toningsmh (float r, float g, float b, float &ro, float &go float rlh = 2.2f; //1.1 float rlob = bmu; //for BW old mode - if(mode == 0) { //color - rlo *= pow_F(strProtect, 0.4f); //0.5 ==> 0.75 - rlh *= pow_F(strProtect, 0.4f); - rlm *= pow_F(strProtect, 0.4f); + if (mode == 0) { //color + rlo *= pow_F (strProtect, 0.4f); //0.5 ==> 0.75 + rlh *= pow_F (strProtect, 0.4f); + rlm *= pow_F (strProtect, 0.4f); } else { //bw coefficient to preserve same results as before for satlimtopacity = 0.5 (default) rlo = strProtect * 0.8f; //0.4 rlob = strProtect; //0.5 @@ -4968,90 +5063,90 @@ void ImProcFunctions::toningsmh (float r, float g, float b, float &ro, float &go rlh = strProtect * 2.4f; //1.2 } - if(mode == 0) { + if (mode == 0) { rlob = rlo; } - //second degree - float aa, bb, cc; - float v0 = 0.15f; //fixed value of reducac=0.3 //secondeg_end (reducac, v0, aa, bb, cc); - if(mode == 1) { + if (mode == 1) { reducac = 0.5f; //black and white mode - if(v > 0.15f) { + if (v > 0.15f) { kl = (-1.f / 0.85f) * v + (1.f) / 0.85f; //Low light ==> decrease action after v=0.15 } } else { //color + float v0 = 0.15f; + //second degree + float aa, bb, cc; secondeg_end (reducac, v0, aa, bb, cc); float aab, bbb; secondeg_begin (0.7f, v0, aab, bbb); - if(v > v0) { + if (v > v0) { kl = aa * v * v + bb * v + cc; //verified ==> exact } else if (mode == 0) { kl = aab * v * v + bbb * v; //ksatlow=ksat; } } - if(RedLow != 1.f) { + if (RedLow != 1.f) { RedL = 1.f + (RedLow - 1.f) * kl * ksat * rlo; //0.4 - if(RedLow >= 1.f) { + if (RedLow >= 1.f) { g -= 20000.f * (RedL - 1.f) * ksatlow; b -= 20000.f * (RedL - 1.f) * ksatlow; } else { r += 20000.f * (RedL - 1.f) * ksatlow; } - r = CLIP(r); - g = CLIP(g); - b = CLIP(b); + r = CLIP (r); + g = CLIP (g); + b = CLIP (b); } - if(GreenLow != 1.f) { + if (GreenLow != 1.f) { GreenL = 1.f + (GreenLow - 1.f) * kl * ksat * rlo; //0.4 - if(GreenLow >= 1.f) { + if (GreenLow >= 1.f) { r -= 20000.f * (GreenL - 1.f) * ksatlow; b -= 20000.f * (GreenL - 1.f) * ksatlow; } else { g += 20000.f * (GreenL - 1.f) * ksatlow; } - r = CLIP(r); - b = CLIP(b); - g = CLIP(g); + r = CLIP (r); + b = CLIP (b); + g = CLIP (g); } - if(BlueLow != 1.f) { + if (BlueLow != 1.f) { BlueL = 1.f + (BlueLow - 1.f) * kl * ksat * rlob; - if(BlueLow >= 1.f) { + if (BlueLow >= 1.f) { r -= 20000.f * (BlueL - 1.f) * ksatlow; g -= 20000.f * (BlueL - 1.f) * ksatlow; } else { b += 20000.f * (BlueL - 1.f) * ksatlow; } - r = CLIP(r); - g = CLIP(g); - b = CLIP(b); + r = CLIP (r); + g = CLIP (g); + b = CLIP (b); } // mid tones float km; float v0m = 0.5f; //max action - float v0mm = 0.5f; //max - if(v < v0m) { + if (v < v0m) { float aam, bbm; float vend = v0m; secondeg_begin (reducac, vend, aam, bbm); km = aam * v * v + bbm * v; //verification = good } else { + float v0mm = 0.5f; //max float aamm, bbmm, ccmm; secondeg_end (reducac, v0mm, aamm, bbmm, ccmm); km = aamm * v * v + bbmm * v + ccmm; //verification good @@ -5059,67 +5154,67 @@ void ImProcFunctions::toningsmh (float r, float g, float b, float &ro, float &go float RedM = 1.f + (RedMed - 1.f) * rlm; - if(RedMed != 1.f) { + if (RedMed != 1.f) { RedM = 1.f + (RedMed - 1.f) * km * rlm; - if(RedMed >= 1.f) { + if (RedMed >= 1.f) { r += 20000.f * (RedM - 1.f); g -= 10000.f * (RedM - 1.f); b -= 10000.f * (RedM - 1.f); - r = CLIP(r); - g = CLIP(g); - b = CLIP(b); + r = CLIP (r); + g = CLIP (g); + b = CLIP (b); } else { r += 10000.f * (RedM - 1.f); g -= 20000.f * (RedM - 1.f); b -= 20000.f * (RedM - 1.f); - r = CLIP(r); - g = CLIP(g); - b = CLIP(b); + r = CLIP (r); + g = CLIP (g); + b = CLIP (b); } } float GreenM = 1.f + (GreenMed - 1.f) * rlm; - if(GreenMed != 1.f) { + if (GreenMed != 1.f) { GreenM = 1.f + (GreenMed - 1.f) * km * rlm; - if(GreenMed >= 1.f) { + if (GreenMed >= 1.f) { r -= 10000.f * (GreenM - 1.f); g += 20000.f * (GreenM - 1.f); b -= 10000.f * (GreenM - 1.f); - r = CLIP(r); - g = CLIP(g); - b = CLIP(b); + r = CLIP (r); + g = CLIP (g); + b = CLIP (b); } else { r -= 20000.f * (GreenM - 1.f); g += 10000.f * (GreenM - 1.f); b -= 20000.f * (GreenM - 1.f); - r = CLIP(r); - g = CLIP(g); - b = CLIP(b); + r = CLIP (r); + g = CLIP (g); + b = CLIP (b); } } float BlueM = 1.f + (BlueMed - 1.f) * rlm; - if(BlueMed != 1.f) { + if (BlueMed != 1.f) { BlueM = 1.f + (BlueMed - 1.f) * km * rlm; - if(BlueMed >= 1.f) { + if (BlueMed >= 1.f) { r -= 10000.f * (BlueM - 1.f); g -= 10000.f * (BlueM - 1.f); b += 20000.f * (BlueM - 1.f); - r = CLIP(r); - g = CLIP(g); - b = CLIP(b); + r = CLIP (r); + g = CLIP (g); + b = CLIP (b); } else { r -= 20000.f * (BlueM - 1.f); g -= 20000.f * (BlueM - 1.f); b += 10000.f * (BlueM - 1.f); - r = CLIP(r); - g = CLIP(g); - b = CLIP(b); + r = CLIP (r); + g = CLIP (g); + b = CLIP (b); } } @@ -5132,7 +5227,7 @@ void ImProcFunctions::toningsmh (float r, float g, float b, float &ro, float &go // float hmu=1.5f; // if(mode==1) hmu=1.2f;//for BW old mode - if(v > v00) { + if (v > v00) { kh = (-1.f / (1.f - v00)) * v + (1.f) / (1.f - v00); //High tones } else { kh = aa0 * v * v + bb0 * v; //verification = good @@ -5142,49 +5237,49 @@ void ImProcFunctions::toningsmh (float r, float g, float b, float &ro, float &go float GreenH = 1.f + (GreenHigh - 1.f) * rlh; float BlueH = 1.f + (BlueHigh - 1.f) * rlh; //1.2 - if(RedHigh != 1.f) { + if (RedHigh != 1.f) { RedH = 1.f + (RedHigh - 1.f) * kh * rlh; //1.2 - if(RedHigh >= 1.f) { + if (RedHigh >= 1.f) { r += 20000.f * (RedH - 1.f); - r = CLIP(r); + r = CLIP (r); } else { g -= 20000.f * (RedH - 1.f); b -= 20000.f * (RedH - 1.f); } - g = CLIP(g); - b = CLIP(b); + g = CLIP (g); + b = CLIP (b); } - if(GreenHigh != 1.f) { + if (GreenHigh != 1.f) { GreenH = 1.f + (GreenHigh - 1.f) * kh * rlh; //1.2 - if(GreenHigh >= 1.f) { + if (GreenHigh >= 1.f) { g += 20000.f * (GreenH - 1.f); - g = CLIP(g); + g = CLIP (g); } else { r -= 20000.f * (GreenH - 1.f); b -= 20000.f * (GreenH - 1.f); } - r = CLIP(r); - b = CLIP(b); + r = CLIP (r); + b = CLIP (b); } - if(BlueHigh != 1.f) { + if (BlueHigh != 1.f) { BlueH = 1.f + (BlueHigh - 1.f) * kh * rlh; //1.2 - if(BlueHigh >= 1.f) { + if (BlueHigh >= 1.f) { b += 20000.f * (BlueH - 1.f); - b = CLIP(b); + b = CLIP (b); } else { r -= 20000.f * (BlueH - 1.f); g -= 20000.f * (BlueH - 1.f); } - r = CLIP(r); - g = CLIP(g); + r = CLIP (r); + g = CLIP (g); } ro = r; @@ -5208,13 +5303,11 @@ void ImProcFunctions::toning2col (float r, float g, float b, float &ro, float &g { float lumbefore = 0.299f * r + 0.587f * g + 0.114f * b; float h, s, l; - Color::rgb2hsl(r, g, b, h, s, l); + Color::rgb2hsl (r, g, b, h, s, l); float v; - Color::rgb2hsv(r, g, b, h, s, v); + Color::rgb2hsv (r, g, b, h, s, v); float ksat = 1.f; float ksatlow = 1.f; - float s_0 = 0.55f; - float s_1 = 0.85f; /* if(mode==0) {//color if(s < s_0) ksat=SQR((1.f/s_0)*s); @@ -5224,66 +5317,65 @@ void ImProcFunctions::toning2col (float r, float g, float b, float &ro, float &g float kl = 1.f; float rlo = 1.f; float rlh = 2.2f; - rlo *= pow_F(strProtect, 0.4f); //0.5 ==> 0.75 transfered value for more action - rlh *= pow_F(strProtect, 0.4f); + rlo *= pow_F (strProtect, 0.4f); //0.5 ==> 0.75 transfered value for more action + rlh *= pow_F (strProtect, 0.4f); //low tones //second degree float aa, bb, cc; //fixed value of reducac =0.4; secondeg_end (reducac, iplow, aa, bb, cc); - float aab, bbb, ccb; + float aab, bbb; secondeg_begin (0.7f, iplow, aab, bbb); - if(v > iplow) { + if (v > iplow) { kl = aa * v * v + bb * v + cc; } else if (mode == 0) { kl = aab * v * v + bbb * v; } - //rl gl bl - float RedL, GreenL, BlueL; - float krl = rl / (rl + gl + bl); - float kgl = gl / (rl + gl + bl); - float kbl = bl / (rl + gl + bl); - if(SatLow > 0.f) { - float kmgb; + if (SatLow > 0.f) { + //rl gl bl + float krl = rl / (rl + gl + bl); + float kgl = gl / (rl + gl + bl); + float kbl = bl / (rl + gl + bl); + float RedL, GreenL, BlueL; - if(g < 20000.f || b < 20000.f || r < 20000.f) { - kmgb = min(r, g, b); //I have tested ...0.85 compromise... - kl *= pow((kmgb / 20000.f), 0.85f); + if (g < 20000.f || b < 20000.f || r < 20000.f) { + float kmgb = min (r, g, b); //I have tested ...0.85 compromise... + kl *= pow ((kmgb / 20000.f), 0.85f); } RedL = 1.f + (SatLow * krl) * kl * ksat * rlo * balanS; //0.4 - if(krl > 0.f) { + if (krl > 0.f) { g -= 20000.f * (RedL - 1.f) * ksatlow; b -= 20000.f * (RedL - 1.f) * ksatlow; } - g = CLIP(g); - b = CLIP(b); + g = CLIP (g); + b = CLIP (b); GreenL = 1.f + (SatLow * kgl) * kl * ksat * rlo * balanS; //0.4 - if(kgl > 0.f) { + if (kgl > 0.f) { r -= 20000.f * (GreenL - 1.f) * ksatlow; b -= 20000.f * (GreenL - 1.f) * ksatlow; } - r = CLIP(r); - b = CLIP(b); + r = CLIP (r); + b = CLIP (b); BlueL = 1.f + (SatLow * kbl) * kl * ksat * rlo * balanS; //0.4 - if(kbl > 0.f) { + if (kbl > 0.f) { r -= 20000.f * (BlueL - 1.f) * ksatlow; g -= 20000.f * (BlueL - 1.f) * ksatlow; } - r = CLIP(r); - g = CLIP(g); + r = CLIP (r); + g = CLIP (g); } //high tones @@ -5292,16 +5384,15 @@ void ImProcFunctions::toning2col (float r, float g, float b, float &ro, float &g //fixed value of reducac ==0.4; secondeg_begin (reducac, iphigh, aa0, bb0); - if(v > iphigh) { + if (v > iphigh) { kh = (-1.f / (1.f - iphigh)) * v + (1.f) / (1.f - iphigh); //Low light ==> decrease action after iplow } else { kh = aa0 * v * v + bb0 * v; } - float kmgb; - if(g > 45535.f || b > 45535.f || r > 45535.f) { - kmgb = max(r, g, b); + if (g > 45535.f || b > 45535.f || r > 45535.f) { + float kmgb = max (r, g, b); float cora = 1.f / (45535.f - 65535.f); float corb = 1.f - cora * 45535.f; float cor = kmgb * cora + corb; @@ -5313,46 +5404,46 @@ void ImProcFunctions::toning2col (float r, float g, float b, float &ro, float &g kh*=cor;*/ } - float RedH, GreenH, BlueH; - float krh = rh / (rh + gh + bh); - float kgh = gh / (rh + gh + bh); - float kbh = bh / (rh + gh + bh); - if(SatHigh > 0.f) { + if (SatHigh > 0.f) { + float RedH, GreenH, BlueH; + float krh = rh / (rh + gh + bh); + float kgh = gh / (rh + gh + bh); + float kbh = bh / (rh + gh + bh); RedH = 1.f + (SatHigh * krh) * kh * rlh * balanH; //1.2 - if(krh > 0.f) { + if (krh > 0.f) { r += 20000.f * (RedH - 1.f); - r = CLIP(r); + r = CLIP (r); } - g = CLIP(g); - b = CLIP(b); + g = CLIP (g); + b = CLIP (b); GreenH = 1.f + (SatHigh * kgh) * kh * rlh * balanH; //1.2 - if(kgh > 0.f) { + if (kgh > 0.f) { g += 20000.f * (GreenH - 1.f); - g = CLIP(g); + g = CLIP (g); } - r = CLIP(r); - b = CLIP(b); + r = CLIP (r); + b = CLIP (b); BlueH = 1.f + (SatHigh * kbh) * kh * rlh * balanH; //1.2 - if(kbh > 0.f) { + if (kbh > 0.f) { b += 20000.f * (BlueH - 1.f); - b = CLIP(b); + b = CLIP (b); } - r = CLIP(r); - g = CLIP(g); + r = CLIP (r); + g = CLIP (g); } float lumafter = 0.299f * r + 0.587f * g + 0.114f * b; float preserv = 1.f; - if(preser == 1) { + if (preser == 1) { preserv = lumbefore / lumafter; } @@ -5363,9 +5454,9 @@ void ImProcFunctions::toning2col (float r, float g, float b, float &ro, float &g ro *= preserv; go *= preserv; bo *= preserv; - ro = CLIP(ro); - go = CLIP(go); - bo = CLIP(bo); + ro = CLIP (ro); + go = CLIP (go); + bo = CLIP (bo); } /** @@ -5384,21 +5475,21 @@ void ImProcFunctions::labtoning (float r, float g, float b, float &ro, float &go { float realL; float h, s, l; - Color::rgb2hsl(r, g, b, h, s, l); + Color::rgb2hsl (r, g, b, h, s, l); float x2, y2, z2; float xl, yl, zl; - if(twoc != 1) { + if (twoc != 1) { l = (Color::gammatab_13_2[ l * 65535.f]) / 65535.f; //to compensate L from Lab iphigh = (Color::gammatab_13_2[iphigh * 65535.f]) / 65535.f; iplow = (Color::gammatab_13_2[ iplow * 65535.f]) / 65535.f; } - if(twoc == 1) { - ctColorCurve.getVal(l, x2, y2, z2); + if (twoc == 1) { + ctColorCurve.getVal (l, x2, y2, z2); } else { - ctColorCurve.getVal(iphigh, x2, y2, z2); - ctColorCurve.getVal(iplow, xl, yl, zl); + ctColorCurve.getVal (iphigh, x2, y2, z2); + ctColorCurve.getVal (iplow, xl, yl, zl); } realL = l; @@ -5410,8 +5501,8 @@ void ImProcFunctions::labtoning (float r, float g, float b, float &ro, float &go // get the opacity and tweak it to preserve saturated colors //float l_ = Color::gamma_srgb(l*65535.f)/65535.f; float opacity; - opacity = (1.f - min(s / satLimit, 1.f) * (1.f - satLimitOpacity)) * ctOpacityCurve.lutOpacityCurve[l * 500.f]; - float opacity2 = (1.f - min(s / satLimit, 1.f) * (1.f - satLimitOpacity)); + opacity = (1.f - min (s / satLimit, 1.f) * (1.f - satLimitOpacity)) * ctOpacityCurve.lutOpacityCurve[l * 500.f]; + float opacity2 = (1.f - min (s / satLimit, 1.f) * (1.f - satLimitOpacity)); //float ro, go, bo; bool chr = true; @@ -5420,23 +5511,23 @@ void ImProcFunctions::labtoning (float r, float g, float b, float &ro, float &go float chromat, luma; if (clToningcurve[lm * 65535.f] / (lm * 65535.f) < 1.f) { - chromat = (clToningcurve[(lm) * 65535.f] / (lm * 65535.f)) - 1.f; //special effect + chromat = (clToningcurve[ (lm) * 65535.f] / (lm * 65535.f)) - 1.f; //special effect } else { - chromat = 1.f - SQR(SQR((lm * 65535.f) / clToningcurve[(lm) * 65535.f])); //apply C=f(L) acts on 'a' and 'b' + chromat = 1.f - SQR (SQR ((lm * 65535.f) / clToningcurve[ (lm) * 65535.f])); //apply C=f(L) acts on 'a' and 'b' } if (cl2Toningcurve[lm * 65535.f] / (lm * 65535.f) < 1.f) { - luma = (cl2Toningcurve[(lm) * 65535.f] / (lm * 65535.f)) - 1.f; //special effect + luma = (cl2Toningcurve[ (lm) * 65535.f] / (lm * 65535.f)) - 1.f; //special effect } else { - luma = 1.f - SQR(SQR((lm * 65535.f) / (cl2Toningcurve[(lm) * 65535.f]))); //apply C2=f(L) acts only on 'b' + luma = 1.f - SQR (SQR ((lm * 65535.f) / (cl2Toningcurve[ (lm) * 65535.f]))); //apply C2=f(L) acts only on 'b' } int todo = 1; if (algm == 1) { - Color::interpolateRGBColor(realL, iplow, iphigh, algm, opacity, twoc, metchrom, chr, lum, chromat, luma, r, g, b, xl, yl, zl, x2, y2, z2, todo, wp, wip, ro, go, bo); + Color::interpolateRGBColor (realL, iplow, iphigh, algm, opacity, twoc, metchrom, chr, lum, chromat, luma, r, g, b, xl, yl, zl, x2, y2, z2, todo, wp, wip, ro, go, bo); } else { - Color::interpolateRGBColor(realL, iplow, iphigh, algm, opacity2, twoc, metchrom, chr, lum, chromat, luma, r, g, b, xl, yl, zl, x2, y2, z2, todo, wp, wip, ro, go, bo); + Color::interpolateRGBColor (realL, iplow, iphigh, algm, opacity2, twoc, metchrom, chr, lum, chromat, luma, r, g, b, xl, yl, zl, x2, y2, z2, todo, wp, wip, ro, go, bo); } } @@ -5466,9 +5557,6 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu // lhskcurve.dump("lh_curve"); //init Flatcurve for C=f(H) - // NOTE: We're getting all 3 pointers here, but this function may not need them all, so one could optimize this - Imagefloat* editImgFloat = nullptr; - LabImage* editLab = nullptr; PlanarWhateverData* editWhatever = nullptr; EditUniqueID editID = EUID_None; bool editPipette = false; @@ -5477,18 +5565,16 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu editID = pipetteBuffer->getEditID(); if (editID != EUID_None) { - editPipette = true; switch (pipetteBuffer->getDataProvider()->getCurrSubscriber()->getPipetteBufferType()) { case (BT_IMAGEFLOAT): - editImgFloat = pipetteBuffer->getImgFloatBuffer(); break; case (BT_LABIMAGE): - editLab = pipetteBuffer->getLabBuffer(); break; case (BT_SINGLEPLANE_FLOAT): + editPipette = true; editWhatever = pipetteBuffer->getSinglePlaneBuffer(); break; } @@ -5499,7 +5585,7 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu bool chutili = false; if (params->labCurve.chromaticity > -100) { - chCurve = new FlatCurve(params->labCurve.chcurve); + chCurve = new FlatCurve (params->labCurve.chcurve); if (!chCurve || chCurve->isIdentity()) { if (chCurve) { @@ -5516,7 +5602,7 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu bool lhutili = false; if (params->labCurve.chromaticity > -100) { - lhCurve = new FlatCurve(params->labCurve.lhcurve); + lhCurve = new FlatCurve (params->labCurve.lhcurve); if (!lhCurve || lhCurve->isIdentity()) { if (lhCurve) { @@ -5533,7 +5619,7 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu bool hhutili = false; if (params->labCurve.chromaticity > -100) { - hhCurve = new FlatCurve(params->labCurve.hhcurve); + hhCurve = new FlatCurve (params->labCurve.hhcurve); if (!hhCurve || hhCurve->isIdentity()) { if (hhCurve) { @@ -5551,10 +5637,10 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu LUTu hist16Llad; //preparate for histograms CIECAM - if(pW != 1) { //only with improccoordinator - hist16Clad(65536); + if (pW != 1) { //only with improccoordinator + hist16Clad (65536); hist16Clad.clear(); - hist16Llad(65536); + hist16Llad (65536); hist16Llad.clear(); } @@ -5608,38 +5694,38 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu float protect_red, protect_redh; protect_red = protectRed;//default=60 chroma: one can put more or less if necessary...in 'option' 40...160 - if(protect_red < 20.0f) { + if (protect_red < 20.0f) { protect_red = 20.0; // avoid too low value } - if(protect_red > 180.0f) { + if (protect_red > 180.0f) { protect_red = 180.0; // avoid too high value } - protect_redh = float(protectRedH); //default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1.0 + protect_redh = float (protectRedH); //default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1.0 - if(protect_redh < 0.1f) { + if (protect_redh < 0.1f) { protect_redh = 0.1f; //avoid divide by 0 and negatives values } - if(protect_redh > 1.0f) { + if (protect_redh > 1.0f) { protect_redh = 1.0f; //avoid too big values } float protect_redhcur = protectRedH;//default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1 - if(protect_redhcur < 0.1f) { + if (protect_redhcur < 0.1f) { protect_redhcur = 0.1f; //avoid divide by 0 and negatives values:minimal protection for transition } - if(protect_redhcur > 3.5f) { + if (protect_redhcur > 3.5f) { protect_redhcur = 3.5f; //avoid too big values } //increase saturation after denoise : ...approximation float factnoise = 1.f; - if(params->dirpyrDenoise.enabled) { + if (params->dirpyrDenoise.enabled) { factnoise = (1.f + params->dirpyrDenoise.chroma / 500.f); //levels=5 // if(yyyy) factnoise=(1.f+params->dirpyrDenoise.chroma/100.f);//levels=7 } @@ -5650,15 +5736,15 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu const bool gamutLch = settings->gamutLch; const float amountchroma = (float) settings->amchroma; - TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params->icm.working); - double wip[3][3] = { + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params->icm.working); + const double wip[3][3] = { {wiprof[0][0], wiprof[0][1], wiprof[0][2]}, {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, {wiprof[2][0], wiprof[2][1], wiprof[2][2]} }; - TMatrix wprof = iccStore->workingSpaceMatrix (params->icm.working); - double wp[3][3] = { + TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params->icm.working); + const double wp[3][3] = { {wprof[0][0], wprof[0][1], wprof[0][2]}, {wprof[1][0], wprof[1][1], wprof[1][2]}, {wprof[2][0], wprof[2][1], wprof[2][2]} @@ -5680,28 +5766,28 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu if (avoidColorShift) // only if user activate Lab adjustments - if(autili || butili || ccutili || cclutili || chutili || lhutili || hhutili || clcutili || utili || chromaticity) { - Color::LabGamutMunsell(lold->L[i], lold->a[i], lold->b[i], W, /*corMunsell*/true, /*lumaMuns*/false, params->toneCurve.hrenabled, /*gamut*/true, wip, multiThread); + if (autili || butili || ccutili || cclutili || chutili || lhutili || hhutili || clcutili || utili || chromaticity) { + Color::LabGamutMunsell (lold->L[i], lold->a[i], lold->b[i], W, /*corMunsell*/true, /*lumaMuns*/false, params->toneCurve.hrenabled, /*gamut*/true, wip, multiThread); } #ifdef __SSE2__ // precalculate some values using SSE - if(bwToning || (!autili && !butili)) { - __m128 c327d68v = _mm_set1_ps(327.68f); + if (bwToning || (!autili && !butili)) { + __m128 c327d68v = _mm_set1_ps (327.68f); __m128 av, bv; int k; for (k = 0; k < W - 3; k += 4) { - av = LVFU(lold->a[i][k]); - bv = LVFU(lold->b[i][k]); - STVF(HHBuffer[k], xatan2f(bv, av)); - STVF(CCBuffer[k], _mm_sqrt_ps(SQRV(av) + SQRV(bv)) / c327d68v); + av = LVFU (lold->a[i][k]); + bv = LVFU (lold->b[i][k]); + STVF (HHBuffer[k], xatan2f (bv, av)); + STVF (CCBuffer[k], _mm_sqrt_ps (SQRV (av) + SQRV (bv)) / c327d68v); } - for(; k < W; k++) { - HHBuffer[k] = xatan2f(lold->b[i][k], lold->a[i][k]); - CCBuffer[k] = sqrt(SQR(lold->a[i][k]) + SQR(lold->b[i][k])) / 327.68f; + for (; k < W; k++) { + HHBuffer[k] = xatan2f (lold->b[i][k], lold->a[i][k]); + CCBuffer[k] = sqrt (SQR (lold->a[i][k]) + SQR (lold->b[i][k])) / 327.68f; } } @@ -5717,18 +5803,18 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu float memChprov; float2 sincosval; - if(bwToning) { // this values will be also set when bwToning is false some lines down + if (bwToning) { // this values will be also set when bwToning is false some lines down #ifdef __SSE2__ // use precalculated values from above HH = HHBuffer[j]; CC = CCBuffer[j]; #else - HH = xatan2f(lold->b[i][j], lold->a[i][j]); - CC = sqrt(SQR(lold->a[i][j]) + SQR(lold->b[i][j])) / 327.68f; + HH = xatan2f (lold->b[i][j], lold->a[i][j]); + CC = sqrt (SQR (lold->a[i][j]) + SQR (lold->b[i][j])) / 327.68f; #endif // According to mathematical laws we can get the sin and cos of HH by simple operations - if(CC == 0.0f) { + if (CC == 0.0f) { sincosval.y = 1.0f; sincosval.x = 0.0f; } else { @@ -5742,20 +5828,20 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu } if (editPipette && editID == EUID_Lab_LCurve) { - editWhatever->v(i, j) = LIM01(Lin / 32768.0f); // Lab L pipette + editWhatever->v (i, j) = LIM01 (Lin / 32768.0f); // Lab L pipette } lnew->L[i][j] = curve[Lin]; float Lprov1 = (lnew->L[i][j]) / 327.68f; - if(editPipette) { + if (editPipette) { if (editID == EUID_Lab_aCurve) { // Lab a pipette float chromapipa = lold->a[i][j] + (32768.f * 1.28f); - editWhatever->v(i, j) = LIM01((chromapipa) / (65536.f * 1.28f)); + editWhatever->v (i, j) = LIM01 ((chromapipa) / (65536.f * 1.28f)); } else if (editID == EUID_Lab_bCurve) { //Lab b pipette float chromapipb = lold->b[i][j] + (32768.f * 1.28f); - editWhatever->v(i, j) = LIM01((chromapipb) / (65536.f * 1.28f)); + editWhatever->v (i, j) = LIM01 ((chromapipb) / (65536.f * 1.28f)); } } @@ -5763,35 +5849,35 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu atmp = lold->a[i][j]; - if(autili) { + if (autili) { atmp = acurve[atmp + 32768.0f] - 32768.0f; // curves Lab a } btmp = lold->b[i][j]; - if(butili) { + if (butili) { btmp = bcurve[btmp + 32768.0f] - 32768.0f; // curves Lab b } - if(!bwToning) { //take into account modification of 'a' and 'b' + if (!bwToning) { //take into account modification of 'a' and 'b' #ifdef __SSE2__ - if(!autili && !butili) { + if (!autili && !butili) { // use precalculated values from above HH = HHBuffer[j]; CC = CCBuffer[j]; } else { - CC = sqrt(SQR(atmp) + SQR(btmp)) / 327.68f; - HH = xatan2f(btmp, atmp); + CC = sqrt (SQR (atmp) + SQR (btmp)) / 327.68f; + HH = xatan2f (btmp, atmp); } #else - CC = sqrt(SQR(atmp) + SQR(btmp)) / 327.68f; - HH = xatan2f(btmp, atmp); + CC = sqrt (SQR (atmp) + SQR (btmp)) / 327.68f; + HH = xatan2f (btmp, atmp); #endif // According to mathematical laws we can get the sin and cos of HH by simple operations //float2 sincosval; - if(CC == 0.f) { + if (CC == 0.f) { sincosval.y = 1.f; sincosval.x = 0.f; } else { @@ -5804,10 +5890,10 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu memChprov = Chprov; } // now new values of lold with 'a' and 'b' - if(editPipette) + if (editPipette) if (editID == EUID_Lab_LHCurve || editID == EUID_Lab_CHCurve || editID == EUID_Lab_HHCurve) {//H pipette - float valpar = Color::huelab_to_huehsv2(HH); - editWhatever->v(i, j) = valpar; + float valpar = Color::huelab_to_huehsv2 (HH); + editWhatever->v (i, j) = valpar; } if (lhutili) { // L=f(H) @@ -5815,8 +5901,7 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu float l_r;//Luminance Lab in 0..1 l_r = Lprov1 / 100.f; { - float khue = 1.9f; //in reserve in case of! - float valparam = float((lhCurve->getVal(Color::huelab_to_huehsv2(HH)) - 0.5f)); //get l_r=f(H) + float valparam = float ((lhCurve->getVal (Color::huelab_to_huehsv2 (HH)) - 0.5f)); //get l_r=f(H) float valparamneg; valparamneg = valparam; float kcc = (CC / amountchroma); //take Chroma into account...40 "middle low" of chromaticity (arbitrary and simple), one can imagine other algorithme @@ -5824,18 +5909,19 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu valparam *= 2.f * kcc; valparamneg *= kcc; //slightly different for negative - if(valparam > 0.f) { - l_r = (1.f - valparam) * l_r + valparam * (1.f - SQR(((SQR(1.f - min(l_r, 1.0f)))))); + if (valparam > 0.f) { + l_r = (1.f - valparam) * l_r + valparam * (1.f - SQR (((SQR (1.f - min (l_r, 1.0f)))))); } else //for negative { + float khue = 1.9f; //in reserve in case of! l_r *= (1.f + khue * valparamneg); } } Lprov1 = l_r * 100.f; - float Chprov2 = sqrt(SQR(atmp) + SQR(btmp)) / 327.68f; + float Chprov2 = sqrt (SQR (atmp) + SQR (btmp)) / 327.68f; //Gamut control especialy fot negative values slightly different of gamutlchonly bool inRGB; @@ -5848,14 +5934,14 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu float fx = (0.002f * aprov1) + fy; float fz = fy - (0.005f * bprov1); - float x_ = 65535.0f * Color::f2xyz(fx) * Color::D50x; - float z_ = 65535.0f * Color::f2xyz(fz) * Color::D50z; + float x_ = 65535.0f * Color::f2xyz (fx) * Color::D50x; + float z_ = 65535.0f * Color::f2xyz (fz) * Color::D50z; float y_ = (Lprov1 > Color::epskap) ? 65535.0 * fy * fy * fy : 65535.0 * Lprov1 / Color::kappa; float R, G, B; - Color::xyz2rgb(x_, y_, z_, R, G, B, wip); + Color::xyz2rgb (x_, y_, z_, R, G, B, wip); if (R < 0.0f || G < 0.0f || B < 0.0f) { - if(Lprov1 < 0.1f) { + if (Lprov1 < 0.1f) { Lprov1 = 0.1f; } @@ -5877,8 +5963,8 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu // calculate C=f(H) if (chutili) { - double hr = Color::huelab_to_huehsv2(HH); - float chparam = float((chCurve->getVal(hr) - 0.5f) * 2.0f); //get C=f(H) + double hr = Color::huelab_to_huehsv2 (HH); + float chparam = float ((chCurve->getVal (hr) - 0.5f) * 2.0f); //get C=f(H) float chromaChfactor = 1.0f + chparam; atmp *= chromaChfactor;//apply C=f(H) btmp *= chromaChfactor; @@ -5886,15 +5972,15 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu if (hhutili) { // H=f(H) //hue Lab in -PI +PI - float valparam = float((hhCurve->getVal(Color::huelab_to_huehsv2(HH)) - 0.5f) * 1.7f) + HH; //get H=f(H) 1.7 optimisation ! + float valparam = float ((hhCurve->getVal (Color::huelab_to_huehsv2 (HH)) - 0.5f) * 1.7f) + HH; //get H=f(H) 1.7 optimisation ! HH = valparam; - sincosval = xsincosf(HH); + sincosval = xsincosf (HH); } - if(!bwToning) { + if (!bwToning) { float factorskin, factorsat, factorskinext; - if(chromapro > 1.f) { + if (chromapro > 1.f) { float scale = scaleConst;//reduction in normal zone float scaleext = 1.f;//reduction in transition zone Color::scalered ( rstprotection, chromapro, 0.0, HH, protect_redh, scale, scaleext);//1.0 @@ -5913,11 +5999,11 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu if (Lprov1 < 25.f) { dred = 40.f; - } else if(Lprov1 < 30.f) { + } else if (Lprov1 < 30.f) { dred = 3.f * Lprov1 - 35.f; - } else if(Lprov1 < 70.f) { + } else if (Lprov1 < 70.f) { dred = 55.f; - } else if(Lprov1 < 75.f) { + } else if (Lprov1 < 75.f) { dred = -3.f * Lprov1 + 265.f; } else { dred = 40.f; @@ -5931,11 +6017,11 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu btmp *= factorsat; if (editPipette && editID == EUID_Lab_CLCurve) { - editWhatever->v(i, j) = LIM01(LL / 100.f); // Lab C=f(L) pipette + editWhatever->v (i, j) = LIM01 (LL / 100.f); // Lab C=f(L) pipette } if (clut) { // begin C=f(L) - float factorskin, factorsat, factor, factorskinext, interm; + float factorskin, factorsat, factor, factorskinext; float chromaCfactor = (clcurve[LL * 655.35f]) / (LL * 655.35f); //apply C=f(L) float curf = 0.7f; //empirical coeff because curve is more progressive float scale = 100.0f / 100.1f; //reduction in normal zone for curve C @@ -5944,32 +6030,32 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu float deltaHH;//HH value transition for C curve protect_redcur = curf * protectRed; //default=60 chroma: one can put more or less if necessary...in 'option' 40...160==> curf =because curve is more progressive - if(protect_redcur < 20.0f) { + if (protect_redcur < 20.0f) { protect_redcur = 20.0; // avoid too low value } - if(protect_redcur > 180.0f) { + if (protect_redcur > 180.0f) { protect_redcur = 180.0; // avoid too high value } - protect_redhcur = curf * float(protectRedH); //default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1.0 ==> curf =because curve is more progressive + protect_redhcur = curf * float (protectRedH); //default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1.0 ==> curf =because curve is more progressive - if(protect_redhcur < 0.1f) { + if (protect_redhcur < 0.1f) { protect_redhcur = 0.1f; //avoid divide by 0 and negatives values } - if(protect_redhcur > 1.0f) { + if (protect_redhcur > 1.0f) { protect_redhcur = 1.0f; //avoid too big values } deltaHH = protect_redhcur; //transition hue - if(chromaCfactor > 0.0) { + if (chromaCfactor > 0.0) { Color::scalered ( rstprotection, chromaCfactor, 0.0, HH, deltaHH, scale, scaleext); //1.0 } - if(chromaCfactor > 1.0) { - interm = (chromaCfactor - 1.0f) * 100.0f; + if (chromaCfactor > 1.0) { + float interm = (chromaCfactor - 1.0f) * 100.0f; factorskin = 1.0f + (interm * scale) / 100.0f; factorskinext = 1.0f + (interm * scaleext) / 100.0f; } else { @@ -5990,13 +6076,13 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu // I have placed C=f(C) after all C treatments to assure maximum amplitude of "C" if (editPipette && editID == EUID_Lab_CCurve) { - float chromapip = sqrt(SQR(atmp) + SQR(btmp) + 0.001f); - editWhatever->v(i, j) = LIM01((chromapip) / (48000.f)); + float chromapip = sqrt (SQR (atmp) + SQR (btmp) + 0.001f); + editWhatever->v (i, j) = LIM01 ((chromapip) / (48000.f)); }//Lab C=f(C) pipette if (ccut) { - float factorskin, factorsat, factor, factorskinext, interm; - float chroma = sqrt(SQR(atmp) + SQR(btmp) + 0.001f); + float factorskin, factorsat, factor, factorskinext; + float chroma = sqrt (SQR (atmp) + SQR (btmp) + 0.001f); float chromaCfactor = (satcurve[chroma * adjustr]) / (chroma * adjustr); //apply C=f(C) float curf = 0.7f; //empirical coeff because curve is more progressive float scale = 100.0f / 100.1f; //reduction in normal zone for curve CC @@ -6005,32 +6091,32 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu float deltaHH;//HH value transition for CC curve protect_redcur = curf * protectRed; //default=60 chroma: one can put more or less if necessary...in 'option' 40...160==> curf =because curve is more progressive - if(protect_redcur < 20.0f) { + if (protect_redcur < 20.0f) { protect_redcur = 20.0; // avoid too low value } - if(protect_redcur > 180.0f) { + if (protect_redcur > 180.0f) { protect_redcur = 180.0; // avoid too high value } - protect_redhcur = curf * float(protectRedH); //default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1.0 ==> curf =because curve is more progressive + protect_redhcur = curf * float (protectRedH); //default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1.0 ==> curf =because curve is more progressive - if(protect_redhcur < 0.1f) { + if (protect_redhcur < 0.1f) { protect_redhcur = 0.1f; //avoid divide by 0 and negatives values } - if(protect_redhcur > 1.0f) { + if (protect_redhcur > 1.0f) { protect_redhcur = 1.0f; //avoid too big values } deltaHH = protect_redhcur; //transition hue - if(chromaCfactor > 0.0) { + if (chromaCfactor > 0.0) { Color::scalered ( rstprotection, chromaCfactor, 0.0, HH, deltaHH, scale, scaleext); //1.0 } - if(chromaCfactor > 1.0) { - interm = (chromaCfactor - 1.0f) * 100.0f; + if (chromaCfactor > 1.0) { + float interm = (chromaCfactor - 1.0f) * 100.0f; factorskin = 1.0f + (interm * scale) / 100.0f; factorskinext = 1.0f + (interm * scaleext) / 100.0f; } else { @@ -6052,14 +6138,14 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu // end chroma C=f(C) //update histogram C - if(pW != 1) { //only with improccoordinator - int posp = (int)sqrt(atmp * atmp + btmp * btmp); + if (pW != 1) { //only with improccoordinator + int posp = (int)sqrt (atmp * atmp + btmp * btmp); hist16Clad[posp]++; } if (editPipette && editID == EUID_Lab_LCCurve) { - float chromapiplc = sqrt(SQR(atmp) + SQR(btmp) + 0.001f); - editWhatever->v(i, j) = LIM01((chromapiplc) / (48000.f)); + float chromapiplc = sqrt (SQR (atmp) + SQR (btmp) + 0.001f); + editWhatever->v (i, j) = LIM01 ((chromapiplc) / (48000.f)); }//Lab L=f(C) pipette @@ -6077,43 +6163,43 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu float zz = 0.0f; float yy = 0.0f; - if(Chprov1 < chrmin) { - yy = SQR(Chprov1 / chrmin) * xx; + if (Chprov1 < chrmin) { + yy = SQR (Chprov1 / chrmin) * xx; } else { yy = xx; //avoid artifact for low C } - if(!LCredsk) { + if (!LCredsk) { skbeg = -3.1415; skend = 3.14159; skdeltaHH = 0.001f; } - if(HH > skbeg && HH < skend ) { + if (HH > skbeg && HH < skend ) { zz = yy; - } else if(HH > skbeg - skdeltaHH && HH <= skbeg) { //transition + } else if (HH > skbeg - skdeltaHH && HH <= skbeg) { //transition aa = yy / skdeltaHH; bb = -aa * (skbeg - skdeltaHH); zz = aa * HH + bb; - } else if(HH >= skend && HH < skend + skdeltaHH) { //transition + } else if (HH >= skend && HH < skend + skdeltaHH) { //transition aa = -yy / skdeltaHH; bb = -aa * (skend + skdeltaHH); zz = aa * HH + bb; } - float chroma = sqrt(SQR(atmp) + SQR(btmp) + 0.001f); + float chroma = sqrt (SQR (atmp) + SQR (btmp) + 0.001f); float Lc = (lhskcurve[chroma * adjustr]) / (chroma * adjustr); //apply L=f(C) Lc = (Lc - 1.0f) * zz + 1.0f; //reduct action Lprov1 *= Lc; //adjust luminance } //update histo LC - if(pW != 1) { //only with improccoordinator + if (pW != 1) { //only with improccoordinator int posl = Lprov1 * 327.68f; hist16Llad[posl]++; } - Chprov1 = sqrt(SQR(atmp) + SQR(btmp)) / 327.68f; + Chprov1 = sqrt (SQR (atmp) + SQR (btmp)) / 327.68f; // labCurve.bwtoning option allows to decouple modulation of a & b curves by saturation // with bwtoning enabled the net effect of a & b curves is visible @@ -6124,17 +6210,17 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu if (avoidColorShift) { //gamutmap Lch ==> preserve Hue,but a little slower than gamutbdy for high values...and little faster for low values - if(gamutLch) { + if (gamutLch) { float R, G, B; #ifdef _DEBUG bool neg = false; bool more_rgb = false; //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f, neg, more_rgb); + Color::gamutLchonly (HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f, neg, more_rgb); #else //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f); + Color::gamutLchonly (HH, sincosval, Lprov1, Chprov1, R, G, B, wip, highlight, 0.15f, 0.96f); #endif lnew->L[i][j] = Lprov1 * 327.68f; // float2 sincosval = xsincosf(HH); @@ -6144,9 +6230,9 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu //use gamutbdy //Luv limiter float Y, u, v; - Color::Lab2Yuv(lnew->L[i][j], atmp, btmp, Y, u, v); + Color::Lab2Yuv (lnew->L[i][j], atmp, btmp, Y, u, v); //Yuv2Lab includes gamut restriction map - Color::Yuv2Lab(Y, u, v, lnew->L[i][j], lnew->a[i][j], lnew->b[i][j], wp); + Color::Yuv2Lab (Y, u, v, lnew->L[i][j], lnew->a[i][j], lnew->b[i][j], wp); } if (utili || autili || butili || ccut || clut || cclutili || chutili || lhutili || hhutili || clcutili || chromaticity) { @@ -6154,16 +6240,16 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu float correctlum = 0.f; Lprov1 = lnew->L[i][j] / 327.68f; - Chprov = sqrt(SQR(lnew->a[i][j]) + SQR(lnew->b[i][j])) / 327.68f; + Chprov = sqrt (SQR (lnew->a[i][j]) + SQR (lnew->b[i][j])) / 327.68f; #ifdef _DEBUG - Color::AllMunsellLch(/*lumaMuns*/true, Lprov1, LL, HH, Chprov, memChprov, correctionHue, correctlum, MunsDebugInfo); + Color::AllMunsellLch (/*lumaMuns*/true, Lprov1, LL, HH, Chprov, memChprov, correctionHue, correctlum, MunsDebugInfo); #else - Color::AllMunsellLch(/*lumaMuns*/true, Lprov1, LL, HH, Chprov, memChprov, correctionHue, correctlum); + Color::AllMunsellLch (/*lumaMuns*/true, Lprov1, LL, HH, Chprov, memChprov, correctionHue, correctlum); #endif - if(correctionHue != 0.f || correctlum != 0.f) { - if(fabs(correctionHue) < 0.015f) { + if (correctionHue != 0.f || correctlum != 0.f) { + if (fabs (correctionHue) < 0.015f) { HH += correctlum; // correct only if correct Munsell chroma very little. } @@ -6173,7 +6259,7 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu else if(fabs(correctionHue) < 0.1f) HH+=0.35f*correctlum; else if(fabs(correctionHue) < 0.015f) HH+=correctlum; // correct only if correct Munsell chroma very little. */ - sincosval = xsincosf(HH + correctionHue); + sincosval = xsincosf (HH + correctionHue); } lnew->a[i][j] = 327.68f * Chprov * sincosval.y; // apply Munsell @@ -6182,7 +6268,7 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu } else { // if(Lprov1 > maxlp) maxlp=Lprov1; // if(Lprov1 < minlp) minlp=Lprov1; - if(!bwToning) { + if (!bwToning) { lnew->L[i][j] = Lprov1 * 327.68f; // float2 sincosval = xsincosf(HH); lnew->a[i][j] = 327.68f * Chprov1 * sincosval.y; @@ -6197,20 +6283,20 @@ SSEFUNCTION void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBu } } // end of parallelization - if(pW != 1) { //only with improccoordinator + if (pW != 1) { //only with improccoordinator //update histogram C with data chromaticity and not with CC curve - hist16Clad.compressTo(histCCurve); + hist16Clad.compressTo (histCCurve); //update histogram L with data luminance - hist16Llad.compressTo(histLCurve); + hist16Llad.compressTo (histLCurve); } #ifdef _DEBUG if (settings->verbose) { t2e.set(); - printf("Color::AllMunsellLch (correction performed in %d usec):\n", t2e.etime(t1e)); - printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad dep=%u\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); - printf(" Munsell luminance : MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad dep=%u\n", MunsDebugInfo->maxdhuelum[0], MunsDebugInfo->maxdhuelum[1], MunsDebugInfo->maxdhuelum[2], MunsDebugInfo->maxdhuelum[3], MunsDebugInfo->depassLum); + printf ("Color::AllMunsellLch (correction performed in %d usec):\n", t2e.etime (t1e)); + printf (" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad dep=%u\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); + printf (" Munsell luminance : MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad dep=%u\n", MunsDebugInfo->maxdhuelum[0], MunsDebugInfo->maxdhuelum[1], MunsDebugInfo->maxdhuelum[2], MunsDebugInfo->maxdhuelum[3], MunsDebugInfo->depassLum); } delete MunsDebugInfo; @@ -6341,69 +6427,69 @@ void ImProcFunctions::defringe (LabImage* lab) if (params->defringe.enabled && lab->W >= 8 && lab->H >= 8) { - PF_correct_RT(lab, lab, params->defringe.radius, params->defringe.threshold); + PF_correct_RT (lab, lab, params->defringe.radius, params->defringe.threshold); } } void ImProcFunctions::defringecam (CieImage* ncie) { if (params->defringe.enabled && ncie->W >= 8 && ncie->H >= 8) { - PF_correct_RTcam(ncie, ncie, params->defringe.radius, params->defringe.threshold); + PF_correct_RTcam (ncie, ncie, params->defringe.radius, params->defringe.threshold); } } -void ImProcFunctions::badpixcam(CieImage* ncie, double rad, int thr, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom, int hotbad) +void ImProcFunctions::badpixcam (CieImage* ncie, double rad, int thr, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom, int hotbad) { - if(ncie->W >= 8 && ncie->H >= 8) { - Badpixelscam(ncie, ncie, rad, thr, mode, b_l, t_l, t_r, b_r, skinprot, chrom, hotbad); + if (ncie->W >= 8 && ncie->H >= 8) { + Badpixelscam (ncie, ncie, rad, thr, mode, b_l, t_l, t_r, b_r, skinprot, chrom, hotbad); } } -void ImProcFunctions::badpixlab(LabImage* lab, double rad, int thr, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom) +void ImProcFunctions::badpixlab (LabImage* lab, double rad, int thr, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom) { - if(lab->W >= 8 && lab->H >= 8) { - BadpixelsLab(lab, lab, rad, thr, mode, b_l, t_l, t_r, b_r, skinprot, chrom); + if (lab->W >= 8 && lab->H >= 8) { + BadpixelsLab (lab, lab, rad, thr, mode, b_l, t_l, t_r, b_r, skinprot, chrom); } } void ImProcFunctions::dirpyrequalizer (LabImage* lab, int scale) { if (params->dirpyrequalizer.enabled && lab->W >= 8 && lab->H >= 8) { - float b_l = static_cast(params->dirpyrequalizer.hueskin.value[0]) / 100.0f; - float t_l = static_cast(params->dirpyrequalizer.hueskin.value[1]) / 100.0f; - float b_r = static_cast(params->dirpyrequalizer.hueskin.value[2]) / 100.0f; - float t_r = static_cast(params->dirpyrequalizer.hueskin.value[3]) / 100.0f; + float b_l = static_cast (params->dirpyrequalizer.hueskin.value[0]) / 100.0f; + float t_l = static_cast (params->dirpyrequalizer.hueskin.value[1]) / 100.0f; + float b_r = static_cast (params->dirpyrequalizer.hueskin.value[2]) / 100.0f; + float t_r = static_cast (params->dirpyrequalizer.hueskin.value[3]) / 100.0f; int choice = 0; //I have not disabled this statement in case of ! always 0 // if (params->dirpyrequalizer.algo=="FI") choice=0; // else if(params->dirpyrequalizer.algo=="LA") choice=1; float artifact = (float) settings->artifact_cbdl; - if(artifact > 6.f) { + if (artifact > 6.f) { artifact = 6.f; } - if(artifact < 0.f) { + if (artifact < 0.f) { artifact = 1.f; } float chrom = 50.f; - if(params->dirpyrequalizer.gamutlab) { + if (params->dirpyrequalizer.gamutlab) { ImProcFunctions::badpixlab (lab, artifact, 5, 3, b_l, t_l, t_r, b_r, params->dirpyrequalizer.skinprotect, chrom); //for artifacts } //dirpyrLab_equalizer(lab, lab, params->dirpyrequalizer.mult); - dirpyr_equalizer(lab->L, lab->L, lab->W, lab->H, lab->a, lab->b, lab->a, lab->b, params->dirpyrequalizer.mult, params->dirpyrequalizer.threshold, params->dirpyrequalizer.skinprotect, params->dirpyrequalizer.gamutlab, b_l, t_l, t_r, b_r, choice, scale); + dirpyr_equalizer (lab->L, lab->L, lab->W, lab->H, lab->a, lab->b, lab->a, lab->b, params->dirpyrequalizer.mult, params->dirpyrequalizer.threshold, params->dirpyrequalizer.skinprotect, params->dirpyrequalizer.gamutlab, b_l, t_l, t_r, b_r, choice, scale); } } -void ImProcFunctions::EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates, int skip) +void ImProcFunctions::EPDToneMapCIE (CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates, int skip) { - if(!params->epd.enabled) { + if (!params->epd.enabled) { return; } - if(params->wavelet.enabled && params->wavelet.tmrs != 0) { + if (params->wavelet.enabled && params->wavelet.tmrs != 0) { return; } @@ -6412,19 +6498,18 @@ void ImProcFunctions::EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w float sca = params->epd.scale; float gamm = params->epd.gamma; float rew = params->epd.reweightingIterates; - unsigned int i, N = Wid * Hei; float Qpro = ( 4.0 / c_) * ( a_w + 4.0 ) ; //estimate Q max if J=100.0 float *Qpr = ncie->Q_p[0]; if (settings->verbose) { - printf("minQ=%f maxQ=%f Qpro=%f\n", minQ, maxQ, Qpro); + printf ("minQ=%f maxQ=%f Qpro=%f\n", minQ, maxQ, Qpro); } - if(maxQ > Qpro) { + if (maxQ > Qpro) { Qpro = maxQ; } - EdgePreservingDecomposition epd(Wid, Hei); + EdgePreservingDecomposition epd (Wid, Hei); #pragma omp parallel for @@ -6433,24 +6518,24 @@ void ImProcFunctions::EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w ncie->Q_p[i][j] = gamm * ncie->Q_p[i][j] / (Qpro); } - float Compression = expf(-stren); //This modification turns numbers symmetric around 0 into exponents. + float Compression = expf (-stren); //This modification turns numbers symmetric around 0 into exponents. float DetailBoost = stren; - if(stren < 0.0f) { + if (stren < 0.0f) { DetailBoost = 0.0f; //Go with effect of exponent only if uncompressing. } //Auto select number of iterates. Note that p->EdgeStopping = 0 makes a Gaussian blur. - if(Iterates == 0) { - Iterates = (unsigned int)(edgest * 15.0); + if (Iterates == 0) { + Iterates = (unsigned int) (edgest * 15.0); } //Jacques Desmis : always Iterates=5 for compatibility images between preview and output - epd.CompressDynamicRange(Qpr, (float)sca / skip, (float)edgest, Compression, DetailBoost, Iterates, rew, Qpr); + epd.CompressDynamicRange (Qpr, sca / (float)skip, edgest, Compression, DetailBoost, Iterates, rew); //Restore past range, also desaturate a bit per Mantiuk's Color correction for tone mapping. - float s = (1.0f + 38.7889f) * powf(Compression, 1.5856f) / (1.0f + 38.7889f * powf(Compression, 1.5856f)); + float s = (1.0f + 38.7889f) * powf (Compression, 1.5856f) / (1.0f + 38.7889f * powf (Compression, 1.5856f)); #ifndef _DEBUG #pragma omp parallel for schedule(dynamic,10) #endif @@ -6482,7 +6567,7 @@ void ImProcFunctions::EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w if(Iterates == 0) Iterates = (unsigned int)(edgest*15.0); - epd.CompressDynamicRange(Qpr2, (float)sca/skip, (float)edgest, Compression2, DetailBoost2, Iterates, rew, Qpr2); + epd.CompressDynamicRange(Qpr2, sca/(float)skip, edgest, Compression2, DetailBoost2, Iterates, rew, Qpr2); //Restore past range, also desaturate a bit per Mantiuk's Color correction for tone mapping. float s2 = (1.0f + 38.7889f)*powf(Compression, 1.5856f)/(1.0f + 38.7889f*powf(Compression, 1.5856f)); @@ -6503,18 +6588,18 @@ void ImProcFunctions::EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w //Map tones by way of edge preserving decomposition. Is this the right way to include source? //#include "EdgePreservingDecomposition.cc" -void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip) +void ImProcFunctions::EPDToneMap (LabImage *lab, unsigned int Iterates, int skip) { //Hasten access to the parameters. // EPDParams *p = (EPDParams *)(¶ms->epd); //Enabled? Leave now if not. // if(!p->enabled) return; - if(!params->epd.enabled) { + if (!params->epd.enabled) { return; } - if(params->wavelet.enabled && params->wavelet.tmrs != 0) { + if (params->wavelet.enabled && params->wavelet.tmrs != 0) { return; } @@ -6527,8 +6612,8 @@ void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip) float *L = lab->L[0]; float *a = lab->a[0]; float *b = lab->b[0]; - unsigned int i, N = lab->W * lab->H; - EdgePreservingDecomposition epd(lab->W, lab->H); + size_t N = lab->W * lab->H; + EdgePreservingDecomposition epd (lab->W, lab->H); //Due to the taking of logarithms, L must be nonnegative. Further, scale to 0 to 1 using nominal range of L, 0 to 15 bit. float minL = FLT_MAX; @@ -6539,35 +6624,35 @@ void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip) float lmaxL = 0.f; #pragma omp for - for(i = 0; i < N; i++) { - if(L[i] < lminL) { + for (size_t i = 0; i < N; i++) { + if (L[i] < lminL) { lminL = L[i]; } - if(L[i] > lmaxL) { + if (L[i] > lmaxL) { lmaxL = L[i]; } } #pragma omp critical + { + if (lminL < minL) { + minL = lminL; + } - if(lminL < minL) { - minL = lminL; + if (lmaxL > maxL) { + maxL = lmaxL; + } } - - if(lmaxL > maxL) { - maxL = lmaxL; - } - } - if(minL > 0.0f) { + if (minL > 0.0f) { minL = 0.0f; //Disable the shift if there are no negative numbers. I wish there were just no negative numbers to begin with. } #pragma omp parallel for - for(i = 0; i < N; i++) + for (size_t i = 0; i < N; ++i) //{L[i] = (L[i] - minL)/32767.0f; { L[i] = (L[i] - minL) / maxL; @@ -6575,16 +6660,16 @@ void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip) } //Some interpretations. - float Compression = expf(-stren); //This modification turns numbers symmetric around 0 into exponents. + float Compression = expf (-stren); //This modification turns numbers symmetric around 0 into exponents. float DetailBoost = stren; - if(stren < 0.0f) { + if (stren < 0.0f) { DetailBoost = 0.0f; //Go with effect of exponent only if uncompressing. } //Auto select number of iterates. Note that p->EdgeStopping = 0 makes a Gaussian blur. - if(Iterates == 0) { - Iterates = (unsigned int)(edgest * 15.0f); + if (Iterates == 0) { + Iterates = (unsigned int) (edgest * 15.0f); } /* Debuggery. Saves L for toying with outside of RT. @@ -6594,15 +6679,15 @@ void ImProcFunctions::EPDToneMap(LabImage *lab, unsigned int Iterates, int skip) fwrite(L, N, sizeof(float), f); fclose(f);*/ - epd.CompressDynamicRange(L, sca / float(skip), edgest, Compression, DetailBoost, Iterates, rew, L); + epd.CompressDynamicRange (L, sca / float (skip), edgest, Compression, DetailBoost, Iterates, rew); //Restore past range, also desaturate a bit per Mantiuk's Color correction for tone mapping. - float s = (1.0f + 38.7889f) * powf(Compression, 1.5856f) / (1.0f + 38.7889f * powf(Compression, 1.5856f)); + float s = (1.0f + 38.7889f) * powf (Compression, 1.5856f) / (1.0f + 38.7889f * powf (Compression, 1.5856f)); #ifdef _OPENMP #pragma omp parallel for // removed schedule(dynamic,10) #endif - for(int ii = 0; ii < N; ii++) { + for (size_t ii = 0; ii < N; ++ii) { a[ii] *= s; b[ii] *= s; L[ii] = L[ii] * maxL * (1.f / gamm) + minL; @@ -6623,7 +6708,7 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double float ave = 0.f, hidev = 0.f, lodev = 0.f; //find average luminance - histogram.getSumAndAverage(sum, ave); + histogram.getSumAndAverage (sum, ave); //find median of luminance int median = 0, count = histogram[0]; @@ -6650,18 +6735,18 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double int i = 0; - for (; i < min((int)ave, imax); i++) { + for (; i < min ((int)ave, imax); i++) { if (count < 8) { octile[count] += histogram[i]; if (octile[count] > sum / 8.f || (count == 7 && octile[count] > sum / 16.f)) { - octile[count] = xlog(1. + (float)i) / log(2.f); + octile[count] = xlog (1. + (float)i) / log (2.f); count++;// = min(count+1,7); } } //lodev += SQR(ave-i)*histogram[i]; - lodev += (xlog(ave + 1.f) - xlog((float)i + 1.)) * histogram[i]; + lodev += (xlog (ave + 1.f) - xlog ((float)i + 1.)) * histogram[i]; losum += histogram[i]; } @@ -6670,13 +6755,13 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double octile[count] += histogram[i]; if (octile[count] > sum / 8.f || (count == 7 && octile[count] > sum / 16.f)) { - octile[count] = xlog(1. + (float)i) / log(2.f); + octile[count] = xlog (1. + (float)i) / log (2.f); count++;// = min(count+1,7); } } //hidev += SQR(i-ave)*histogram[i]; - hidev += (xlog((float)i + 1.) - xlog(ave + 1.f)) * histogram[i]; + hidev += (xlog ((float)i + 1.) - xlog (ave + 1.f)) * histogram[i]; hisum += histogram[i]; } @@ -6691,15 +6776,15 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double return; } - lodev = (lodev / (log(2.f) * losum)); - hidev = (hidev / (log(2.f) * hisum)); +// lodev = (lodev / (log(2.f) * losum)); +// hidev = (hidev / (log(2.f) * hisum)); - if (octile[6] > log((float)imax + 1.f) / log2(2.f)) { //if very overxposed image + if (octile[6] > log1p ((float)imax) / log2 (2.f)) { //if very overxposed image octile[6] = 1.5f * octile[5] - 0.5f * octile[4]; overex = 2; } - if (octile[7] > log((float)imax + 1.f) / log2(2.f)) { //if overexposed + if (octile[7] > log1p ((float)imax) / log2 (2.f)) { //if overexposed octile[7] = 1.5f * octile[6] - 0.5f * octile[5]; overex = 1; } @@ -6712,7 +6797,7 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double oct7 = octile[7]; - for(int i = 1; i < 8; i++) { + for (int i = 1; i < 8; i++) { if (octile[i] == 0.0f) { octile[i] = octile[i - 1]; } @@ -6721,7 +6806,7 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double // compute weighted average separation of octiles // for future use in contrast setting for (int i = 1; i < 6; i++) { - ospread += (octile[i + 1] - octile[i]) / max(0.5f, (i > 2 ? (octile[i + 1] - octile[3]) : (octile[3] - octile[i]))); + ospread += (octile[i + 1] - octile[i]) / max (0.5f, (i > 2 ? (octile[i + 1] - octile[3]) : (octile[3] - octile[i]))); } ospread /= 5.f; @@ -6738,7 +6823,7 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double // compute clipping points based on the original histograms (linear, without exp comp.) - int clipped = 0; + unsigned int clipped = 0; int rawmax = (imax) - 1; while (histogram[rawmax] + clipped <= 0 && rawmax > 1) { @@ -6747,17 +6832,15 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double } //compute clipped white point - int clippable = (int)(sum * clip / 100.f ); - int somm = sum; + unsigned int clippable = (int) (sum * clip / 100.f ); clipped = 0; int whiteclip = (imax) - 1; - while (whiteclip > 1 && histogram[whiteclip] + clipped <= clippable) { + while (whiteclip > 1 && (histogram[whiteclip] + clipped) <= clippable) { clipped += histogram[whiteclip]; whiteclip--; } - int clipwh = clipped; //compute clipped black point clipped = 0; int shc = 0; @@ -6767,8 +6850,6 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double shc++; } - int clipbl = clipped; - //rescale to 65535 max rawmax <<= histcompr; whiteclip <<= histcompr; @@ -6776,34 +6857,33 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double median <<= histcompr; shc <<= histcompr; - //prevent division by 0 - if (lodev == 0.f) { - lodev = 1.f; - } +// //prevent division by 0 +// if (lodev == 0.f) { +// lodev = 1.f; +// } //compute exposure compensation as geometric mean of the amount that //sets the mean or median at middle gray, and the amount that sets the estimated top //of the histogram at or near clipping. - float expo = log(midgray * scale / (ave - shc + midgray * shc)); //float expcomp1 = (log(/*(median/ave)*//*(hidev/lodev)*/midgray*scale/(ave-shc+midgray*shc))+log((hidev/lodev)))/log(2.f); - float expcomp1 = (log(/*(median/ave)*//*(hidev/lodev)*/midgray * scale / (ave - shc + midgray * shc))) / log(2.f); + float expcomp1 = (log (/*(median/ave)*//*(hidev/lodev)*/midgray * scale / (ave - shc + midgray * shc))) / log (2.f); float expcomp2; - if(overex == 0) { // image is not overexposed - expcomp2 = 0.5f * ( (15.5f - histcompr - (2.f * oct7 - oct6)) + log(scale / rawmax) / log(2.f) ); + if (overex == 0) { // image is not overexposed + expcomp2 = 0.5f * ( (15.5f - histcompr - (2.f * oct7 - oct6)) + log (scale / rawmax) / log (2.f) ); } else { - expcomp2 = 0.5f * ( (15.5f - histcompr - (2.f * octile[7] - octile[6])) + log(scale / rawmax) / log(2.f) ); + expcomp2 = 0.5f * ( (15.5f - histcompr - (2.f * octile[7] - octile[6])) + log (scale / rawmax) / log (2.f) ); } - if(fabs(expcomp1) - fabs(expcomp2) > 1.f) { //for great expcomp - expcomp = (expcomp1 * fabs(expcomp2) + expcomp2 * fabs(expcomp1)) / (fabs(expcomp1) + fabs(expcomp2)); + if (fabs (expcomp1) - fabs (expcomp2) > 1.f) { //for great expcomp + expcomp = (expcomp1 * fabs (expcomp2) + expcomp2 * fabs (expcomp1)) / (fabs (expcomp1) + fabs (expcomp2)); } else { expcomp = 0.5 * (double)expcomp1 + 0.5 * (double) expcomp2; //for small expcomp } - float gain = exp((float)expcomp * log(2.f)); + float gain = exp ((float)expcomp * log (2.f)); - float corr = sqrt(gain * scale / rawmax); + float corr = sqrt (gain * scale / rawmax); black = (int) shc * corr; @@ -6812,12 +6892,12 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double //this is a series approximation of the actual formula for comp, //which is a transcendental equation float comp = (gain * ((float)whiteclip) / scale - 1.f) * 2.3f; // 2.3 instead of 2 to increase slightly comp - hlcompr = (int)(100.*comp / (max(0.0, expcomp) + 1.0)); - hlcompr = max(0, min(100, hlcompr)); + hlcompr = (int) (100.*comp / (max (0.0, expcomp) + 1.0)); + hlcompr = max (0, min (100, hlcompr)); //now find brightness if gain didn't bring ave to midgray using //the envelope of the actual 'control cage' brightness curve for simplicity - float midtmp = gain * sqrt(median * ave) / scale; + float midtmp = gain * sqrt (median * ave) / scale; if (midtmp < 0.1f) { bright = (midgray - midtmp) * 15.0 / (midtmp); @@ -6825,13 +6905,13 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double bright = (midgray - midtmp) * 15.0 / (0.10833 - 0.0833 * midtmp); } - bright = 0.25 */*(median/ave)*(hidev/lodev)*/max(0, bright); + bright = 0.25 */*(median/ave)*(hidev/lodev)*/max (0, bright); //compute contrast that spreads the average spacing of octiles contr = (int) 50.0f * (1.1f - ospread); - contr = max(0, min(100, contr)); + contr = max (0, min (100, contr)); //take gamma into account - double whiteclipg = (int)(CurveFactory::gamma2 (whiteclip * corr / 65536.0) * 65536.0); + double whiteclipg = (int) (CurveFactory::gamma2 (whiteclip * corr / 65536.0) * 65536.0); float gavg = 0.; @@ -6853,10 +6933,10 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double } } - whiteclipg = CurveFactory::igamma2 ((float)(whiteclipg / 65535.0)) * 65535.0; //need to inverse gamma transform to get correct exposure compensation parameter + whiteclipg = CurveFactory::igamma2 ((float) (whiteclipg / 65535.0)) * 65535.0; //need to inverse gamma transform to get correct exposure compensation parameter //corection with gamma - black = (int)((65535 * black) / whiteclipg); + black = (int) ((65535 * black) / whiteclipg); //expcomp = log(65535.0 / (whiteclipg)) / log(2.0); //diagnostics @@ -6912,7 +6992,7 @@ void ImProcFunctions::getAutoExp (const LUTu &histogram, int histcompr, double expcomp = 12.0; } - bright = max(-100, min(bright, 100)); + bright = max (-100, min (bright, 100)); } @@ -6932,7 +7012,7 @@ double ImProcFunctions::getAutoDistor (const Glib::ustring &fname, int thumb_si return 0.0; } - Thumbnail* raw = rtengine::Thumbnail::loadFromRaw (fname, ri, w_raw, h_raw, 1, 1.0, FALSE); + Thumbnail* raw = rtengine::Thumbnail::loadFromRaw (fname, ri, w_raw, h_raw, 1, 1.0, FALSE, 0); if (!raw) { delete thumb; @@ -6975,8 +7055,8 @@ double ImProcFunctions::getAutoDistor (const Glib::ustring &fname, int thumb_si double dist_amount; int dist_result = calcDistortion (thumbGray, rawGray, width, h_thumb, 1, dist_amount); - if(dist_result == -1) { // not enough features found, try increasing max. number of features by factor 4 - dist_result = calcDistortion (thumbGray, rawGray, width, h_thumb, 4, dist_amount); + if (dist_result == -1) { // not enough features found, try increasing max. number of features by factor 4 + calcDistortion (thumbGray, rawGray, width, h_thumb, 4, dist_amount); } delete thumbGray; @@ -6989,13 +7069,13 @@ double ImProcFunctions::getAutoDistor (const Glib::ustring &fname, int thumb_si } } -void ImProcFunctions::rgb2lab(const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace) +void ImProcFunctions::rgb2lab (const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace) { - TMatrix wprof = iccStore->workingSpaceMatrix( workingSpace ); + TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix ( workingSpace ); const float wp[3][3] = { - {static_cast(wprof[0][0]), static_cast(wprof[0][1]), static_cast(wprof[0][2])}, - {static_cast(wprof[1][0]), static_cast(wprof[1][1]), static_cast(wprof[1][2])}, - {static_cast(wprof[2][0]), static_cast(wprof[2][1]), static_cast(wprof[2][2])} + {static_cast (wprof[0][0]), static_cast (wprof[0][1]), static_cast (wprof[0][2])}, + {static_cast (wprof[1][0]), static_cast (wprof[1][1]), static_cast (wprof[1][2])}, + {static_cast (wprof[2][0]), static_cast (wprof[2][1]), static_cast (wprof[2][2])} }; const int W = src.getWidth(); @@ -7005,23 +7085,23 @@ void ImProcFunctions::rgb2lab(const Imagefloat &src, LabImage &dst, const Glib:: #pragma omp parallel for schedule(dynamic,16) #endif - for(int i = 0; i < H; i++) { - for(int j = 0; j < W; j++) { + for (int i = 0; i < H; i++) { + for (int j = 0; j < W; j++) { float X, Y, Z; - Color::rgbxyz(src.r(i, j), src.g(i, j), src.b(i, j), X, Y, Z, wp); + Color::rgbxyz (src.r (i, j), src.g (i, j), src.b (i, j), X, Y, Z, wp); //convert Lab - Color::XYZ2Lab(X, Y, Z, dst.L[i][j], dst.a[i][j], dst.b[i][j]); + Color::XYZ2Lab (X, Y, Z, dst.L[i][j], dst.a[i][j], dst.b[i][j]); } } } -SSEFUNCTION void ImProcFunctions::lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace) +SSEFUNCTION void ImProcFunctions::lab2rgb (const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace) { - TMatrix wiprof = iccStore->workingSpaceInverseMatrix( workingSpace ); + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix ( workingSpace ); const float wip[3][3] = { - {static_cast(wiprof[0][0]), static_cast(wiprof[0][1]), static_cast(wiprof[0][2])}, - {static_cast(wiprof[1][0]), static_cast(wiprof[1][1]), static_cast(wiprof[1][2])}, - {static_cast(wiprof[2][0]), static_cast(wiprof[2][1]), static_cast(wiprof[2][2])} + {static_cast (wiprof[0][0]), static_cast (wiprof[0][1]), static_cast (wiprof[0][2])}, + {static_cast (wiprof[1][0]), static_cast (wiprof[1][1]), static_cast (wiprof[1][2])}, + {static_cast (wiprof[2][0]), static_cast (wiprof[2][1]), static_cast (wiprof[2][2])} }; const int W = dst.getWidth(); @@ -7029,9 +7109,9 @@ SSEFUNCTION void ImProcFunctions::lab2rgb(const LabImage &src, Imagefloat &dst, #ifdef __SSE2__ vfloat wipv[3][3]; - for(int i = 0; i < 3; i++) { - for(int j = 0; j < 3; j++) { - wipv[i][j] = F2V(wiprof[i][j]); + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 3; j++) { + wipv[i][j] = F2V (wiprof[i][j]); } } @@ -7041,26 +7121,26 @@ SSEFUNCTION void ImProcFunctions::lab2rgb(const LabImage &src, Imagefloat &dst, #pragma omp parallel for schedule(dynamic,16) #endif - for(int i = 0; i < H; i++) { + for (int i = 0; i < H; i++) { int j = 0; #ifdef __SSE2__ - for(; j < W - 3; j += 4) { + for (; j < W - 3; j += 4) { vfloat X, Y, Z; vfloat R, G, B; - Color::Lab2XYZ(LVFU(src.L[i][j]), LVFU(src.a[i][j]), LVFU(src.b[i][j]), X, Y, Z); - Color::xyz2rgb(X, Y, Z, R, G, B, wipv); - STVFU(dst.r(i, j), R); - STVFU(dst.g(i, j), G); - STVFU(dst.b(i, j), B); + Color::Lab2XYZ (LVFU (src.L[i][j]), LVFU (src.a[i][j]), LVFU (src.b[i][j]), X, Y, Z); + Color::xyz2rgb (X, Y, Z, R, G, B, wipv); + STVFU (dst.r (i, j), R); + STVFU (dst.g (i, j), G); + STVFU (dst.b (i, j), B); } #endif - for(; j < W; j++) { + for (; j < W; j++) { float X, Y, Z; - Color::Lab2XYZ(src.L[i][j], src.a[i][j], src.b[i][j], X, Y, Z); - Color::xyz2rgb(X, Y, Z, dst.r(i, j), dst.g(i, j), dst.b(i, j), wip); + Color::Lab2XYZ (src.L[i][j], src.a[i][j], src.b[i][j], X, Y, Z); + Color::xyz2rgb (X, Y, Z, dst.r (i, j), dst.g (i, j), dst.b (i, j), wip); } } } diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index a99c59773..3ed585894 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -52,7 +52,7 @@ class ImProcFunctions double scale; bool multiThread; - void calcVignettingParams(int oW, int oH, const VignettingParams& vignetting, double &w2, double &h2, double& maxRadius, double &v, double &b, double &mul); + void calcVignettingParams (int oW, int oH, const VignettingParams& vignetting, double &w2, double &h2, double& maxRadius, double &v, double &b, double &mul); void transformPreview (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LCPMapper *pLCPMap); void transformLuminanceOnly (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int oW, int oH, int fW, int fH); @@ -89,15 +89,15 @@ class ImProcFunctions } double rd, gd, bd; - double yr[4], yg[4], yb[4]; + double yr[4] = {0.0}, yg[4] = {0.0}, yb[4] = {0.0}; for (int k = ys, kx = 0; k < ys + 4; k++, kx++) { rd = gd = bd = 0.0; for (int i = xs, ix = 0; i < xs + 4; i++, ix++) { - rd += src->r(k, i) * w[ix]; - gd += src->g(k, i) * w[ix]; - bd += src->b(k, i) * w[ix]; + rd += src->r (k, i) * w[ix]; + gd += src->g (k, i) * w[ix]; + bd += src->b (k, i) * w[ix]; } yr[kx] = rd; @@ -150,7 +150,7 @@ class ImProcFunctions } double rd; - double yr[4]; + double yr[4] = {0.0}; for (int k = ys, kx = 0; k < ys + 4; k++, kx++) { rd = 0.0; @@ -196,7 +196,7 @@ public: double lumimul[3]; ImProcFunctions (const ProcParams* iparams, bool imultiThread = true) - : monitorTransform(nullptr), lab2outputTransform(nullptr), output2monitorTransform(nullptr), params(iparams), scale(1), multiThread(imultiThread), lumimul{} {} + : monitorTransform (nullptr), lab2outputTransform (nullptr), output2monitorTransform (nullptr), params (iparams), scale (1), multiThread (imultiThread), lumimul{} {} ~ImProcFunctions (); void setScale (double iscale); @@ -205,12 +205,12 @@ public: bool needsPCVignetting (); void firstAnalysis (const Imagefloat* const working, const ProcParams ¶ms, LUTu & vhist16); - void updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck); + void updateColorProfiles (const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve); void labtoning (float r, float g, float b, float &ro, float &go, float &bo, int algm, int metchrom, int twoc, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clToningcurve, LUTf & cl2Toningcurve, float iplow, float iphigh, double wp[3][3], double wip[3][3] ); @@ -226,17 +226,17 @@ public: void luminanceCurve (LabImage* lold, LabImage* lnew, LUTf &curve); void ciecam_02float (CieImage* ncie, float adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, - LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, int scalecd, int rtt); + LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt); void ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, - LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, int scalecd, int rtt); + LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, double &yb, int rtt); void chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, LUTf &acurve, LUTf &bcurve, LUTf & satcurve, LUTf & satclcurve, LUTf &clcurve, LUTf &curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLurve); void vibrance (LabImage* lab);//Jacques' vibrance void colorCurve (LabImage* lold, LabImage* lnew); void sharpening (LabImage* lab, float** buffer, SharpeningParams &sharpenParam); void sharpeningcam (CieImage* ncie, float** buffer); void transform (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, - double focalLen, double focalLen35mm, float focusDist, int rawRotationDeg, bool fullImage); + double focalLen, double focalLen35mm, float focusDist, double fNumber, int rawRotationDeg, bool fullImage); float resizeScale (const ProcParams* params, int fw, int fh, int &imw, int &imh); void lab2monitorRgb (LabImage* lab, Image8* image); void resize (Image16* src, Image16* dst, float dScale); @@ -245,9 +245,9 @@ public: void deconvsharpening (float** luminance, float** buffer, int W, int H, const SharpeningParams &sharpenParam); void MLsharpen (LabImage* lab);// Manuel's clarity / sharpening - void MLmicrocontrast(float** luminance, int W, int H ); //Manuel's microcontrast - void MLmicrocontrast(LabImage* lab ); //Manuel's microcontrast - void MLmicrocontrastcam(CieImage* ncie ); //Manuel's microcontrast + void MLmicrocontrast (float** luminance, int W, int H ); //Manuel's microcontrast + void MLmicrocontrast (LabImage* lab ); //Manuel's microcontrast + void MLmicrocontrastcam (CieImage* ncie ); //Manuel's microcontrast void impulsedenoise (LabImage* lab);//Emil's impulse denoise void impulsedenoisecam (CieImage* ncie, float **buffers[3]); @@ -258,13 +258,13 @@ public: void dirpyrequalizer (LabImage* lab, int scale);//Emil's wavelet - void EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params& cp, int W_L, int H_L, float max0, float min0); - float *CompressDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Compressed); - void ContrastResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params &cp, int W_L, int H_L, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx); - float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = nullptr); + void EPDToneMapResid (float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params& cp, int W_L, int H_L, float max0, float min0); + float *CompressDR (float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Compressed); + void ContrastResid (float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params &cp, int W_L, int H_L, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx); + float *ContrastDR (float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = nullptr); - void EPDToneMap(LabImage *lab, unsigned int Iterates = 0, int skip = 1); - void EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1); + void EPDToneMap (LabImage *lab, unsigned int Iterates = 0, int skip = 1); + void EPDToneMapCIE (CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1); // pyramid denoise procparams::DirPyrDenoiseParams dnparams; @@ -274,58 +274,58 @@ public: 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 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, bool wavcontlutili, 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, LUTf &wavclCurve, bool wavcontlutili, int skip); - void WaveletcontAllL(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_L, - struct cont_params &cp, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, FlatCurve* ChCurve, bool Chutili); - void WaveletcontAllLfinal(wavelet_decomposition &WaveletCoeffs_L, struct 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, - struct cont_params &cp, const bool useChannelA); - void WaveletAandBAllAB(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, wavelet_decomposition &WaveletCoeffs_b, - struct cont_params &cp, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* hhcurve, bool hhutili); + void WaveletcontAllL (LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_L, + struct cont_params &cp, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, FlatCurve* ChCurve, bool Chutili); + void WaveletcontAllLfinal (wavelet_decomposition &WaveletCoeffs_L, struct 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, + struct cont_params &cp, const bool useChannelA); + void WaveletAandBAllAB (LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, wavelet_decomposition &WaveletCoeffs_b, + struct cont_params &cp, const WavOpacityCurveW & waOpacityCurveW, 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, int W_L, int H_L, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, 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, 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, int W_ab, int H_ab, const bool useChannelA); - void Evaluate2(wavelet_decomposition &WaveletCoeffs_L, - const struct cont_params& cp, int ind, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, float madL[8][3]); + void Evaluate2 (wavelet_decomposition &WaveletCoeffs_L, + const struct cont_params& cp, int ind, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, float madL[8][3]); void Eval2 (float ** WavCoeffs_L, int level, const struct cont_params& cp, int W_L, int H_L, int skip_L, int ind, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, float *madL); - 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 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 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 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 Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr); - void RGB_denoise(int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve , const NoiseCurve & noiseCCurve , float &chaut, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &nresi, float &highresi); - void RGB_denoise_infoGamCurve(const procparams::DirPyrDenoiseParams & dnparams, const bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope); - void RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); + void Median_Denoise ( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr); + void RGB_denoise (int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve, const NoiseCurve & noiseCCurve, float &chaut, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &nresi, float &highresi); + void RGB_denoise_infoGamCurve (const procparams::DirPyrDenoiseParams & dnparams, const bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope); + void RGB_denoise_info (Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); void RGBtile_denoise (float * fLblox, int hblproc, float noisevar_Ldetail, float * nbrwt, float * blurbuffer ); //for DCT void RGBoutput_tile_row (float *bloxrow_L, float ** Ldetail, float ** tilemask_out, int height, int width, int top ); - bool WaveletDenoiseAllL(wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge); - bool WaveletDenoiseAllAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); - void WaveletDenoiseAll_info(int levwav, wavelet_decomposition &WaveletCoeffs_a, - wavelet_decomposition &WaveletCoeffs_b, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float & minblueaut, int schoice, bool autoch, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, - float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); + bool WaveletDenoiseAllL (wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge); + bool WaveletDenoiseAllAB (wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); + void WaveletDenoiseAll_info (int levwav, wavelet_decomposition &WaveletCoeffs_a, + wavelet_decomposition &WaveletCoeffs_b, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float & minblueaut, int schoice, bool autoch, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, + float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); - bool WaveletDenoiseAll_BiShrinkL(wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3]); - bool WaveletDenoiseAll_BiShrinkAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float noisevar_ab, - const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); - void ShrinkAllL(wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge); - void ShrinkAllAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float **buffer, int level, int dir, - float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = nullptr, bool madCalculated = false); - void ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b, int level, - int W_ab, int H_ab, int skip_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, bool autoch, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, - float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); - void Noise_residualAB(wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb); + bool WaveletDenoiseAll_BiShrinkL (wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3]); + bool WaveletDenoiseAll_BiShrinkAB (wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float noisevar_ab, + const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); + void ShrinkAllL (wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge); + void ShrinkAllAB (wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float **buffer, int level, int dir, + float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = nullptr, bool madCalculated = false); + void ShrinkAll_info (float ** WavCoeffs_a, float ** WavCoeffs_b, int level, + int W_ab, int H_ab, int skip_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, bool autoch, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, + float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); + void Noise_residualAB (wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb); void calcautodn_info (float &chaut, float &delta, int Nb, int levaut, float maxmax, float lumema, float chromina, int mode, int lissage, float redyel, float skinc, float nsknc); - float MadMax(float * DataList, int &max, int datalen); - float Mad(float * DataList, const int datalen); - float MadRgb(float * DataList, const int datalen); + float MadMax (float * DataList, int &max, int datalen); + float Mad (float * DataList, const int datalen); + float MadRgb (float * DataList, const int datalen); // spot removal tool void removeSpots (Imagefloat* img, const std::vector &entries, const PreviewProps &pp); @@ -334,8 +334,8 @@ public: void dirpyr_equalizer (float ** src, float ** dst, int srcwidth, int srcheight, float ** l_a, float ** l_b, float ** dest_a, float ** dest_b, const double * mult, const double dirpyrThreshold, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scale);//Emil's directional pyramid wavelet void dirpyr_equalizercam (CieImage* ncie, float ** src, float ** dst, int srcwidth, int srcheight, float ** h_p, float ** C_p, const double * mult, const double dirpyrThreshold, const double skinprot, bool execdir, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scale);//Emil's directional pyramid wavelet void dirpyr_channel (float ** data_fine, float ** data_coarse, int width, int height, int level, int scale); - void idirpyr_eq_channel (float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float multi[5], const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice); - void idirpyr_eq_channelcam (float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float multi[5], const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, float b_l, float t_l, float t_r); + void idirpyr_eq_channel (float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float multi[6], const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice); + void idirpyr_eq_channelcam (float ** data_coarse, float ** data_fine, float ** buffer, int width, int height, int level, float multi[6], const double dirpyrThreshold, float ** l_a_h, float ** l_b_c, const double skinprot, float b_l, float t_l, float t_r); void defringe (LabImage* lab); void defringecam (CieImage* ncie); void badpixcam (CieImage* ncie, double rad, int thr, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom, int hotbad); @@ -343,11 +343,11 @@ public: void PF_correct_RT (LabImage * src, LabImage * dst, double radius, int thresh); void PF_correct_RTcam (CieImage * src, CieImage * dst, double radius, int thresh); - void Badpixelscam(CieImage * src, CieImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom, int hotbad); - void BadpixelsLab(LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); + void Badpixelscam (CieImage * src, CieImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom, int hotbad); + void BadpixelsLab (LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm); - Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga=nullptr); + Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga = nullptr); // CieImage *ciec; bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); @@ -355,8 +355,8 @@ public: static void getAutoExp (const LUTu & histogram, int histcompr, double defgain, double clip, double& expcomp, int& bright, int& contr, int& black, int& hlcompr, int& hlcomprthresh); static double getAutoDistor (const Glib::ustring& fname, int thumb_size); double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = nullptr); - void rgb2lab(const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace); - void lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace); + void rgb2lab (const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace); + void lab2rgb (const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace); }; } #endif diff --git a/rtengine/impulse_denoise.h b/rtengine/impulse_denoise.h index 9d3b73b79..a40577f39 100644 --- a/rtengine/impulse_denoise.h +++ b/rtengine/impulse_denoise.h @@ -82,7 +82,6 @@ SSEFUNCTION void ImProcFunctions::impulse_nr (LabImage* lab, double thresh) #ifdef __SSE2__ vfloat hfnbravev, hpfabsv; vfloat impthrDiv24v = F2V( impthrDiv24 ); - vfloat onev = F2V( 1.0f ); #endif #ifdef _OPENMP #pragma omp for diff --git a/rtengine/init.cc b/rtengine/init.cc index 27edd976b..2d157c762 100644 --- a/rtengine/init.cc +++ b/rtengine/init.cc @@ -16,6 +16,7 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ +#include "../rtgui/profilestorecombobox.h" #include "rtengine.h" #include "iccstore.h" #include "dcp.h" @@ -27,7 +28,7 @@ #include "dfmanager.h" #include "ffmanager.h" #include "rtthumbnail.h" -#include "../rtgui/profilestore.h" +#include "profilestore.h" #include "../rtgui/threadutils.h" namespace rtengine @@ -37,15 +38,14 @@ const Settings* settings; MyMutex* lcmsMutex = nullptr; -int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDir) +int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDir, bool loadAll) { settings = s; - iccStore->init (s->iccDirectory, baseDir + "/iccprofiles"); - iccStore->findDefaultMonitorProfile(); - DCPStore::getInstance()->init (baseDir + "/dcpprofiles"); + ProfileStore::getInstance()->init (loadAll); + ICCStore::getInstance()->init (s->iccDirectory, Glib::build_filename (baseDir, "iccprofiles"), loadAll); + DCPStore::getInstance()->init (Glib::build_filename (baseDir, "dcpprofiles"), loadAll); CameraConstantsStore::getInstance ()->init (baseDir, userSettingsDir); - profileStore.init (); ProcParams::init (); Color::init (); PerceptualToneCurve::init (); diff --git a/rtengine/iplab2rgb.cc b/rtengine/iplab2rgb.cc index 218dbf6fe..dac24411d 100644 --- a/rtengine/iplab2rgb.cc +++ b/rtengine/iplab2rgb.cc @@ -144,7 +144,6 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, Image8* image = new Image8 (cw, ch); Glib::ustring profile; - cmsHPROFILE oprof = iccStore->getProfile (profile); bool standard_gamma; @@ -159,6 +158,8 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, standard_gamma = false; } + cmsHPROFILE oprof = ICCStore::getInstance()->getProfile (profile); + if (oprof) { cmsHPROFILE oprofG = oprof; @@ -215,7 +216,7 @@ Image8* ImProcFunctions::lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, } } else { - const auto xyz_rgb = iccStore->workingSpaceInverseMatrix (profile); + const auto xyz_rgb = ICCStore::getInstance()->workingSpaceInverseMatrix (profile); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) @@ -285,11 +286,11 @@ Image16* ImProcFunctions::lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int cmsHPROFILE oprof = nullptr; if (ga) { lcmsMutex->lock (); - iccStore->getGammaArray(icm, *ga); - oprof = iccStore->createGammaProfile(icm, *ga); + ICCStore::getInstance()->getGammaArray(icm, *ga); + oprof = ICCStore::getInstance()->createGammaProfile(icm, *ga); lcmsMutex->unlock (); } else { - oprof = iccStore->getProfile (icm.output); + oprof = ICCStore::getInstance()->getProfile (icm.output); } if (oprof) { diff --git a/rtengine/ipresize.cc b/rtengine/ipresize.cc index 8bdc0a6cb..644e180c7 100644 --- a/rtengine/ipresize.cc +++ b/rtengine/ipresize.cc @@ -18,56 +18,60 @@ */ #include "improcfun.h" + +#include "alignedbuffer.h" +#include "opthelper.h" #include "rt_math.h" #include "sleef.c" -#include "opthelper.h" + //#define PROFILE #ifdef PROFILE # include #endif + namespace rtengine { -static inline float Lanc(float x, float a) +static inline float Lanc (float x, float a) { if (x * x < 1e-6f) { return 1.0f; } else if (x * x > a * a) { return 0.0f; } else { - x = static_cast(M_PI) * x; - return a * xsinf(x) * xsinf(x / a) / (x * x); + x = static_cast (rtengine::RT_PI) * x; + return a * xsinf (x) * xsinf (x / a) / (x * x); } } -void ImProcFunctions::Lanczos(const Image16* src, Image16* dst, float scale) +void ImProcFunctions::Lanczos (const Image16* src, Image16* dst, float scale) { const float delta = 1.0f / scale; const float a = 3.0f; - const float sc = min(scale, 1.0f); - const int support = static_cast(2.0f * a / sc) + 1; + const float sc = min (scale, 1.0f); + const int support = static_cast (2.0f * a / sc) + 1; #pragma omp parallel { // storage for precomputed parameters for horisontal interpolation - float * wwh = new float[support * dst->width]; - int * jj0 = new int[dst->width]; - int * jj1 = new int[dst->width]; + float * wwh = new float[support * dst->getWidth()]; + int * jj0 = new int[dst->getWidth()]; + int * jj1 = new int[dst->getWidth()]; // temporal storage for vertically-interpolated row of pixels - float * lr = new float[src->width]; - float * lg = new float[src->width]; - float * lb = new float[src->width]; + float * lr = new float[src->getWidth()]; + float * lg = new float[src->getWidth()]; + float * lb = new float[src->getWidth()]; // Phase 1: precompute coefficients for horisontal interpolation - for (int j = 0; j < dst->width; j++) { + for (int j = 0; j < dst->getWidth(); j++) { // x coord of the center of pixel on src image - float x0 = (static_cast(j) + 0.5f) * delta - 0.5f; + float x0 = (static_cast (j) + 0.5f) * delta - 0.5f; // weights for interpolation in horisontal direction float * w = wwh + j * support; @@ -75,14 +79,14 @@ void ImProcFunctions::Lanczos(const Image16* src, Image16* dst, float scale) // sum of weights used for normalization float ws = 0.0f; - jj0[j] = max(0, static_cast(floorf(x0 - a / sc)) + 1); - jj1[j] = min(src->width, static_cast(floorf(x0 + a / sc)) + 1); + jj0[j] = max (0, static_cast (floorf (x0 - a / sc)) + 1); + jj1[j] = min (src->getWidth(), static_cast (floorf (x0 + a / sc)) + 1); // calculate weights for (int jj = jj0[j]; jj < jj1[j]; jj++) { int k = jj - jj0[j]; - float z = sc * (x0 - static_cast(jj)); - w[k] = Lanc(z, a); + float z = sc * (x0 - static_cast (jj)); + w[k] = Lanc (z, a); ws += w[k]; } @@ -95,10 +99,10 @@ void ImProcFunctions::Lanczos(const Image16* src, Image16* dst, float scale) // Phase 2: do actual interpolation #pragma omp for - for (int i = 0; i < dst->height; i++) { + for (int i = 0; i < dst->getHeight(); i++) { // y coord of the center of pixel on src image - float y0 = (static_cast(i) + 0.5f) * delta - 0.5f; + float y0 = (static_cast (i) + 0.5f) * delta - 0.5f; // weights for interpolation in y direction float w[support]; @@ -106,14 +110,14 @@ void ImProcFunctions::Lanczos(const Image16* src, Image16* dst, float scale) // sum of weights used for normalization float ws = 0.0f; - int ii0 = max(0, static_cast(floorf(y0 - a / sc)) + 1); - int ii1 = min(src->height, static_cast(floorf(y0 + a / sc)) + 1); + int ii0 = max (0, static_cast (floorf (y0 - a / sc)) + 1); + int ii1 = min (src->getHeight(), static_cast (floorf (y0 + a / sc)) + 1); // calculate weights for vertical interpolation for (int ii = ii0; ii < ii1; ii++) { int k = ii - ii0; - float z = sc * (y0 - static_cast(ii)); - w[k] = Lanc(z, a); + float z = sc * (y0 - static_cast (ii)); + w[k] = Lanc (z, a); ws += w[k]; } @@ -123,16 +127,16 @@ void ImProcFunctions::Lanczos(const Image16* src, Image16* dst, float scale) } // Do vertical interpolation. Store results. - for (int j = 0; j < src->width; j++) { + for (int j = 0; j < src->getWidth(); j++) { float r = 0.0f, g = 0.0f, b = 0.0f; for (int ii = ii0; ii < ii1; ii++) { int k = ii - ii0; - r += w[k] * src->r(ii, j); - g += w[k] * src->g(ii, j); - b += w[k] * src->b(ii, j); + r += w[k] * src->r (ii, j); + g += w[k] * src->g (ii, j); + b += w[k] * src->b (ii, j); } lr[j] = r; @@ -141,7 +145,7 @@ void ImProcFunctions::Lanczos(const Image16* src, Image16* dst, float scale) } // Do horizontal interpolation - for(int j = 0; j < dst->width; j++) { + for (int j = 0; j < dst->getWidth(); j++) { float * wh = wwh + support * j; @@ -155,9 +159,9 @@ void ImProcFunctions::Lanczos(const Image16* src, Image16* dst, float scale) b += wh[k] * lb[jj]; } - dst->r(i, j) = CLIP(static_cast(r)); - dst->g(i, j) = CLIP(static_cast(g)); - dst->b(i, j) = CLIP(static_cast(b)); + dst->r (i, j) = CLIP (static_cast (r)); + dst->g (i, j) = CLIP (static_cast (g)); + dst->b (i, j) = CLIP (static_cast (b)); } } @@ -171,23 +175,23 @@ void ImProcFunctions::Lanczos(const Image16* src, Image16* dst, float scale) } -SSEFUNCTION void ImProcFunctions::Lanczos(const LabImage* src, LabImage* dst, float scale) +SSEFUNCTION void ImProcFunctions::Lanczos (const LabImage* src, LabImage* dst, float scale) { const float delta = 1.0f / scale; const float a = 3.0f; - const float sc = min(scale, 1.0f); - const int support = static_cast(2.0f * a / sc) + 1; + const float sc = min (scale, 1.0f); + const int support = static_cast (2.0f * a / sc) + 1; // storage for precomputed parameters for horizontal interpolation - float * wwh = new float[support * dst->W]; - int * jj0 = new int[dst->W]; - int * jj1 = new int[dst->W]; + float* const wwh = new float[support * dst->W]; + int* const jj0 = new int[dst->W]; + int* const jj1 = new int[dst->W]; // Phase 1: precompute coefficients for horizontal interpolation for (int j = 0; j < dst->W; j++) { // x coord of the center of pixel on src image - float x0 = (static_cast(j) + 0.5f) * delta - 0.5f; + float x0 = (static_cast (j) + 0.5f) * delta - 0.5f; // weights for interpolation in horizontal direction float * w = wwh + j * support; @@ -195,14 +199,14 @@ SSEFUNCTION void ImProcFunctions::Lanczos(const LabImage* src, LabImage* dst, fl // sum of weights used for normalization float ws = 0.0f; - jj0[j] = max(0, static_cast(floorf(x0 - a / sc)) + 1); - jj1[j] = min(src->W, static_cast(floorf(x0 + a / sc)) + 1); + jj0[j] = max (0, static_cast (floorf (x0 - a / sc)) + 1); + jj1[j] = min (src->W, static_cast (floorf (x0 + a / sc)) + 1); // calculate weights for (int jj = jj0[j]; jj < jj1[j]; jj++) { int k = jj - jj0[j]; - float z = sc * (x0 - static_cast(jj)); - w[k] = Lanc(z, a); + float z = sc * (x0 - static_cast (jj)); + w[k] = Lanc (z, a); ws += w[k]; } @@ -217,9 +221,12 @@ SSEFUNCTION void ImProcFunctions::Lanczos(const LabImage* src, LabImage* dst, fl #endif { // temporal storage for vertically-interpolated row of pixels - float * lL = new float[src->W]; - float * la = new float[src->W]; - float * lb = new float[src->W]; + AlignedBuffer aligned_buffer_ll(src->W); + AlignedBuffer aligned_buffer_la(src->W); + AlignedBuffer aligned_buffer_lb(src->W); + float* const lL = aligned_buffer_ll.data; + float* const la = aligned_buffer_la.data; + float* const lb = aligned_buffer_lb.data; // weights for interpolation in y direction float w[support] ALIGNED64; @@ -230,19 +237,19 @@ SSEFUNCTION void ImProcFunctions::Lanczos(const LabImage* src, LabImage* dst, fl for (int i = 0; i < dst->H; i++) { // y coord of the center of pixel on src image - float y0 = (static_cast(i) + 0.5f) * delta - 0.5f; + float y0 = (static_cast (i) + 0.5f) * delta - 0.5f; // sum of weights used for normalization float ws = 0.0f; - int ii0 = max(0, static_cast(floorf(y0 - a / sc)) + 1); - int ii1 = min(src->H, static_cast(floorf(y0 + a / sc)) + 1); + int ii0 = max (0, static_cast (floorf (y0 - a / sc)) + 1); + int ii1 = min (src->H, static_cast (floorf (y0 + a / sc)) + 1); // calculate weights for vertical interpolation for (int ii = ii0; ii < ii1; ii++) { int k = ii - ii0; - float z = sc * (y0 - static_cast(ii)); - w[k] = Lanc(z, a); + float z = sc * (y0 - static_cast (ii)); + w[k] = Lanc (z, a); ws += w[k]; } @@ -263,15 +270,15 @@ SSEFUNCTION void ImProcFunctions::Lanczos(const LabImage* src, LabImage* dst, fl for (int ii = ii0; ii < ii1; ii++) { int k = ii - ii0; - wkv = _mm_set1_ps(w[k]); - Lv += wkv * LVFU(src->L[ii][j]); - av += wkv * LVFU(src->a[ii][j]); - bv += wkv * LVFU(src->b[ii][j]); + wkv = _mm_set1_ps (w[k]); + Lv += wkv * LVFU (src->L[ii][j]); + av += wkv * LVFU (src->a[ii][j]); + bv += wkv * LVFU (src->b[ii][j]); } - STVF(lL[j], Lv); - STVF(la[j], av); - STVF(lb[j], bv); + STVF (lL[j], Lv); + STVF (la[j], av); + STVF (lb[j], bv); } #else @@ -295,7 +302,7 @@ SSEFUNCTION void ImProcFunctions::Lanczos(const LabImage* src, LabImage* dst, fl } // Do horizontal interpolation - for(int j = 0; j < dst->W; j++) { + for (int j = 0; j < dst->W; j++) { float * wh = wwh + support * j; @@ -314,10 +321,6 @@ SSEFUNCTION void ImProcFunctions::Lanczos(const LabImage* src, LabImage* dst, fl dst->b[i][j] = b; } } - - delete[] lL; - delete[] la; - delete[] lb; } delete[] jj0; delete[] jj1; @@ -348,35 +351,35 @@ float ImProcFunctions::resizeScale (const ProcParams* params, int fw, int fh, in refh = fh; } - switch(params->resize.dataspec) { - case (1): - // Width - dScale = (double)params->resize.width / (double)refw; - break; - - case (2): - // Height - dScale = (double)params->resize.height / (double)refh; - break; - - case (3): - - // FitBox - if ((double)refw / (double)refh > (double)params->resize.width / (double)params->resize.height) { + switch (params->resize.dataspec) { + case (1): + // Width dScale = (double)params->resize.width / (double)refw; - } else { + break; + + case (2): + // Height dScale = (double)params->resize.height / (double)refh; - } + break; - break; + case (3): - default: - // Scale - dScale = params->resize.scale; - break; + // FitBox + if ((double)refw / (double)refh > (double)params->resize.width / (double)params->resize.height) { + dScale = (double)params->resize.width / (double)refw; + } else { + dScale = (double)params->resize.height / (double)refh; + } + + break; + + default: + // Scale + dScale = params->resize.scale; + break; } - if (fabs(dScale - 1.0) <= 1e-5) { + if (fabs (dScale - 1.0) <= 1e-5) { return 1.0; } @@ -388,8 +391,8 @@ float ImProcFunctions::resizeScale (const ProcParams* params, int fw, int fh, in imh = refh; } - imw = (int)( (double)imw * dScale + 0.5 ); - imh = (int)( (double)imh * dScale + 0.5 ); + imw = (int) ( (double)imw * dScale + 0.5 ); + imh = (int) ( (double)imh * dScale + 0.5 ); return (float)dScale; } @@ -399,24 +402,24 @@ void ImProcFunctions::resize (Image16* src, Image16* dst, float dScale) time_t t1 = clock(); #endif - if(params->resize.method != "Nearest" ) { - Lanczos(src, dst, dScale); + if (params->resize.method != "Nearest" ) { + Lanczos (src, dst, dScale); } else { // Nearest neighbour algorithm #ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif - for (int i = 0; i < dst->height; i++) { + for (int i = 0; i < dst->getHeight(); i++) { int sy = i / dScale; - sy = LIM(sy, 0, src->height - 1); + sy = LIM (sy, 0, src->getHeight() - 1); - for (int j = 0; j < dst->width; j++) { + for (int j = 0; j < dst->getWidth(); j++) { int sx = j / dScale; - sx = LIM(sx, 0, src->width - 1); - dst->r(i, j) = src->r(sy, sx); - dst->g(i, j) = src->g(sy, sx); - dst->b(i, j) = src->b(sy, sx); + sx = LIM (sx, 0, src->getWidth() - 1); + dst->r (i, j) = src->r (sy, sx); + dst->g (i, j) = src->g (sy, sx); + dst->b (i, j) = src->b (sy, sx); } } } @@ -424,7 +427,7 @@ void ImProcFunctions::resize (Image16* src, Image16* dst, float dScale) #ifdef PROFILE time_t t2 = clock(); std::cout << "Resize: " << params->resize.method << ": " - << (float)(t2 - t1) / CLOCKS_PER_SEC << std::endl; + << (float) (t2 - t1) / CLOCKS_PER_SEC << std::endl; #endif } diff --git a/rtengine/ipretinex.cc b/rtengine/ipretinex.cc index 2dbdbafb1..e79ee52a3 100644 --- a/rtengine/ipretinex.cc +++ b/rtengine/ipretinex.cc @@ -136,7 +136,7 @@ namespace rtengine extern const Settings* settings; -void RawImageSource::MSR(float** luminance, float** originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) +void RawImageSource::MSR(float** luminance, float** originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, const RetinexParams &deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax) { if (deh.enabled) {//enabled @@ -144,8 +144,6 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e constexpr float eps = 2.f; bool useHsl = deh.retinexcolorspace == "HSLLOG"; bool useHslLin = deh.retinexcolorspace == "HSLLIN"; - float gain2 = (float) deh.gain / 100.f; //def =1 not use - gain2 = useHslLin ? gain2 * 0.5f : gain2; float offse = (float) deh.offs; //def = 0 not use int iter = deh.iter; int gradient = deh.scal; @@ -160,23 +158,15 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e limD *= useHslLin ? 10.f : 1.f; float ilimD = 1.f / limD; float hig = ((float) deh.highl) / 100.f; - float elogt; - float hl = deh.baselog; scal = deh.skal; - if(hl >= 2.71828f) { - elogt = 2.71828f + SQR(SQR(hl - 2.71828f)); - } else { - elogt = hl; - } - int H_L = height; int W_L = width; float *tran[H_L] ALIGNED16; float *tranBuffer = nullptr; - elogt = 2.71828f;//disabled baselog + constexpr float elogt = 2.71828f; bool lhutili = false; FlatCurve* shcurve = new FlatCurve(deh.lhcurve); //curve L=f(H) @@ -273,8 +263,9 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e } } - float varx; - float limdx, ilimdx; + float varx = vart; + float limdx = limD; + float ilimdx = ilimD; if(gradvart != 0) { if(gradvart == 1) { @@ -294,10 +285,6 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e limdx = limD * (0.4f * it + 0.6f); ilimdx = 1.f / limdx; } - } else { - varx = vart; - limdx = limD; - ilimdx = ilimD; } scal = round(sc); @@ -345,7 +332,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e src[i] = &srcBuffer[i * W_L]; } - int h_th, s_th; + int h_th = 0, s_th = 0; int shHighlights = deh.highlights; int shShadows = deh.shadows; @@ -664,7 +651,6 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e delta = 1.0f; } - // float cdfactor = gain2 * 32768.f / delta; float cdfactor = 32768.f / delta; maxCD = -9999999.f; minCD = 9999999.f; diff --git a/rtengine/ipsharpen.cc b/rtengine/ipsharpen.cc index c1a2f479e..388567f8a 100644 --- a/rtengine/ipsharpen.cc +++ b/rtengine/ipsharpen.cc @@ -23,6 +23,7 @@ #include "rt_math.h" #include "sleef.c" #include "opthelper.h" + using namespace std; namespace rtengine @@ -31,8 +32,6 @@ namespace rtengine #undef ABS #define ABS(a) ((a)<0?-(a):(a)) -#define CLIREF(x) LIM(x,-200000.0f,200000.0f) // avoid overflow : do not act directly on image[] or pix[] - extern const Settings* settings; SSEFUNCTION void ImProcFunctions::dcdamping (float** aI, float** aO, float damping, int W, int H) @@ -267,26 +266,26 @@ void ImProcFunctions::sharpenHaloCtrl (float** luminance, float** blurmap, float #endif for (int i = 2; i < H - 2; i++) { - float max1 = 0, max2 = 0, min1 = 0, min2 = 0, maxn, minn, np1, np2, np3, min_, max_, labL; + float max1 = 0, max2 = 0, min1 = 0, min2 = 0; for (int j = 2; j < W - 2; j++) { // compute 3 iterations, only forward - np1 = 2.f * (nL[i - 2][j] + nL[i - 2][j + 1] + nL[i - 2][j + 2] + nL[i - 1][j] + nL[i - 1][j + 1] + nL[i - 1][j + 2] + nL[i] [j] + nL[i] [j + 1] + nL[i] [j + 2]) / 27.f + nL[i - 1][j + 1] / 3.f; - np2 = 2.f * (nL[i - 1][j] + nL[i - 1][j + 1] + nL[i - 1][j + 2] + nL[i] [j] + nL[i] [j + 1] + nL[i] [j + 2] + nL[i + 1][j] + nL[i + 1][j + 1] + nL[i + 1][j + 2]) / 27.f + nL[i] [j + 1] / 3.f; - np3 = 2.f * (nL[i] [j] + nL[i] [j + 1] + nL[i] [j + 2] + nL[i + 1][j] + nL[i + 1][j + 1] + nL[i + 1][j + 2] + nL[i + 2][j] + nL[i + 2][j + 1] + nL[i + 2][j + 2]) / 27.f + nL[i + 1][j + 1] / 3.f; + float np1 = 2.f * (nL[i - 2][j] + nL[i - 2][j + 1] + nL[i - 2][j + 2] + nL[i - 1][j] + nL[i - 1][j + 1] + nL[i - 1][j + 2] + nL[i] [j] + nL[i] [j + 1] + nL[i] [j + 2]) / 27.f + nL[i - 1][j + 1] / 3.f; + float np2 = 2.f * (nL[i - 1][j] + nL[i - 1][j + 1] + nL[i - 1][j + 2] + nL[i] [j] + nL[i] [j + 1] + nL[i] [j + 2] + nL[i + 1][j] + nL[i + 1][j + 1] + nL[i + 1][j + 2]) / 27.f + nL[i] [j + 1] / 3.f; + float np3 = 2.f * (nL[i] [j] + nL[i] [j + 1] + nL[i] [j + 2] + nL[i + 1][j] + nL[i + 1][j + 1] + nL[i + 1][j + 2] + nL[i + 2][j] + nL[i + 2][j + 1] + nL[i + 2][j + 2]) / 27.f + nL[i + 1][j + 1] / 3.f; // Max/Min of all these deltas and the last two max/min - maxn = max(np1, np2, np3); - minn = min(np1, np2, np3); - max_ = max(max1, max2, maxn); - min_ = min(min1, min2, minn); + float maxn = max(np1, np2, np3); + float minn = min(np1, np2, np3); + float max_ = max(max1, max2, maxn); + float min_ = min(min1, min2, minn); // Shift the queue max1 = max2; max2 = maxn; min1 = min2; min2 = minn; - labL = luminance[i][j]; + float labL = luminance[i][j]; if (max_ < labL) { max_ = labL; @@ -414,7 +413,7 @@ void ImProcFunctions::MLsharpen (LabImage* lab) wD2 = eps2 + fabs(L[offset + width - 1] - L[offset - width + 1]) / s; s = wD1; wD1 /= wD2; - wD2 /= wD1; + wD2 /= s; // initial values int ii = offset / width; @@ -561,6 +560,7 @@ void ImProcFunctions::MLsharpen (LabImage* lab) //! MicroContrast is a sharpening method developed by Manuel Llorens and documented here: http://www.rawness.es/sharpening/?lang=en //!
The purpose is maximize clarity of the image without creating halo's. //!
Addition from JD : pyramid + pondered contrast with matrix 5x5 +//!
2017 Ingo Weyrich : reduced processing time //! \param luminance : Luminance channel of image void ImProcFunctions::MLmicrocontrast(float** luminance, int W, int H) { @@ -568,20 +568,12 @@ void ImProcFunctions::MLmicrocontrast(float** luminance, int W, int H) return; } - MyTime t1e, t2e; - t1e.set(); - - int k = params->sharpenMicro.matrix ? 1 : 2; + const int k = params->sharpenMicro.matrix ? 1 : 2; // k=2 matrix 5x5 k=1 matrix 3x3 - int offset, offset2, i, j, col, row, n; - float temp, temp2, temp3, temp4, tempL; - float *LM, v, s, contrast; - int signs[25]; - int width = W, height = H; - float uniform = params->sharpenMicro.uniformity;//between 0 to 100 - int unif; - unif = (int)(uniform / 10.0f); //put unif between 0 to 10 + const int width = W, height = H; + const float uniform = params->sharpenMicro.uniformity; //between 0 to 100 + const int unif = (int)(uniform / 10.0f); //put unif between 0 to 10 float amount = params->sharpenMicro.amount / 1500.0f; //amount 2000.0 quasi no artefacts ==> 1500 = maximum, after artefacts if (amount < 0.000001f) { @@ -594,127 +586,97 @@ void ImProcFunctions::MLmicrocontrast(float** luminance, int W, int H) if (settings->verbose) { printf ("Micro-contrast amount %f\n", amount); - } - - if (settings->verbose) { printf ("Micro-contrast uniformity %i\n", unif); } //modulation uniformity in function of luminance - float L98[11] = {0.001f, 0.0015f, 0.002f, 0.004f, 0.006f, 0.008f, 0.01f, 0.03f, 0.05f, 0.1f, 0.1f}; - float L95[11] = {0.0012f, 0.002f, 0.005f, 0.01f, 0.02f, 0.05f, 0.1f, 0.12f, 0.15f, 0.2f, 0.25f}; - float L92[11] = {0.01f, 0.015f, 0.02f, 0.06f, 0.10f, 0.13f, 0.17f, 0.25f, 0.3f, 0.32f, 0.35f}; - float L90[11] = {0.015f, 0.02f, 0.04f, 0.08f, 0.12f, 0.15f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f}; - float L87[11] = {0.025f, 0.03f, 0.05f, 0.1f, 0.15f, 0.25f, 0.3f, 0.4f, 0.5f, 0.63f, 0.75f}; - float L83[11] = {0.055f, 0.08f, 0.1f, 0.15f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.75f, 0.85f}; - float L80[11] = {0.15f, 0.2f, 0.25f, 0.3f, 0.35f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f}; - float L75[11] = {0.22f, 0.25f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.85f, 0.9f, 0.95f}; - float L70[11] = {0.35f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.97f, 1.0f, 1.0f, 1.0f, 1.0f}; - float L63[11] = {0.55f, 0.6f, 0.7f, 0.8f, 0.85f, 0.9f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}; - float L58[11] = {0.75f, 0.77f, 0.8f, 0.9f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}; + const float L98[11] = {0.001f, 0.0015f, 0.002f, 0.004f, 0.006f, 0.008f, 0.01f, 0.03f, 0.05f, 0.1f, 0.1f}; + const float L95[11] = {0.0012f, 0.002f, 0.005f, 0.01f, 0.02f, 0.05f, 0.1f, 0.12f, 0.15f, 0.2f, 0.25f}; + const float L92[11] = {0.01f, 0.015f, 0.02f, 0.06f, 0.10f, 0.13f, 0.17f, 0.25f, 0.3f, 0.32f, 0.35f}; + const float L90[11] = {0.015f, 0.02f, 0.04f, 0.08f, 0.12f, 0.15f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f}; + const float L87[11] = {0.025f, 0.03f, 0.05f, 0.1f, 0.15f, 0.25f, 0.3f, 0.4f, 0.5f, 0.63f, 0.75f}; + const float L83[11] = {0.055f, 0.08f, 0.1f, 0.15f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.75f, 0.85f}; + const float L80[11] = {0.15f, 0.2f, 0.25f, 0.3f, 0.35f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f}; + const float L75[11] = {0.22f, 0.25f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.85f, 0.9f, 0.95f}; + const float L70[11] = {0.35f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.97f, 1.0f, 1.0f, 1.0f, 1.0f}; + const float L63[11] = {0.55f, 0.6f, 0.7f, 0.8f, 0.85f, 0.9f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}; + const float L58[11] = {0.75f, 0.77f, 0.8f, 0.9f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f}; //default 5 //modulation contrast - float Cont0[11] = {0.05f, 0.1f, 0.2f, 0.25f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f}; - float Cont1[11] = {0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 0.95f, 1.0f}; - float Cont2[11] = {0.2f, 0.40f, 0.6f, 0.7f, 0.8f, 0.85f, 0.90f, 0.95f, 1.0f, 1.05f, 1.10f}; - float Cont3[11] = {0.5f, 0.6f, 0.7f, 0.8f, 0.85f, 0.9f, 1.0f, 1.0f, 1.05f, 1.10f, 1.20f}; - float Cont4[11] = {0.8f, 0.85f, 0.9f, 0.95f, 1.0f, 1.05f, 1.10f, 1.150f, 1.2f, 1.25f, 1.40f}; - float Cont5[11] = {1.0f, 1.1f, 1.2f, 1.25f, 1.3f, 1.4f, 1.45f, 1.50f, 1.6f, 1.65f, 1.80f}; + const float Cont0[11] = {0.05f, 0.1f, 0.2f, 0.25f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f}; + const float Cont1[11] = {0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 0.95f, 1.0f}; + const float Cont2[11] = {0.2f, 0.40f, 0.6f, 0.7f, 0.8f, 0.85f, 0.90f, 0.95f, 1.0f, 1.05f, 1.10f}; + const float Cont3[11] = {0.5f, 0.6f, 0.7f, 0.8f, 0.85f, 0.9f, 1.0f, 1.0f, 1.05f, 1.10f, 1.20f}; + const float Cont4[11] = {0.8f, 0.85f, 0.9f, 0.95f, 1.0f, 1.05f, 1.10f, 1.150f, 1.2f, 1.25f, 1.40f}; + const float Cont5[11] = {1.0f, 1.1f, 1.2f, 1.25f, 1.3f, 1.4f, 1.45f, 1.50f, 1.6f, 1.65f, 1.80f}; + + const float s = amount; + const float sqrt2 = sqrt(2.0); + const float sqrt1d25 = sqrt(1.25); + float *LM = new float[width * height]; //allocation for Luminance - float chmax = 8.0f; - LM = new float[width * height]; //allocation for Luminance #ifdef _OPENMP - #pragma omp parallel for private(offset, i,j) shared(LM) + #pragma omp parallel +#endif +{ + +#ifdef _OPENMP + #pragma omp for schedule(dynamic,16) #endif - for(j = 0; j < height; j++) - for(i = 0, offset = j * width + i; i < width; i++, offset++) { - LM[offset] = luminance[j][i] / 327.68f; // adjust to 0.100 and to RT variables + for(int j = 0; j < height; j++) + for(int i = 0, offset = j * width + i; i < width; i++, offset++) { + LM[offset] = luminance[j][i] / 327.68f; // adjust to [0;100] and to RT variables } #ifdef _OPENMP - #pragma omp parallel for private(j,i,offset,s,signs,v,n,row,col,offset2,contrast,temp,temp2,tempL,temp4) shared(luminance,LM,amount,chmax,unif,k,L98,L95,L92,L90,L87,L83,L80,L75,L70,L63,L58,Cont0,Cont1,Cont2,Cont3,Cont4,Cont5) + #pragma omp for schedule(dynamic,16) #endif - for(j = k; j < height - k; j++) - for(i = k, offset = j * width + i; i < width - k; i++, offset++) { - s = amount; - v = LM[offset]; - n = 0; + for(int j = k; j < height - k; j++) + for(int i = k, offset = j * width + i; i < width - k; i++, offset++) { + float v = LM[offset]; - for(row = j - k; row <= j + k; row++) - for(col = i - k, offset2 = row * width + col; col <= i + k; col++, offset2++) { - signs[n] = 0; + float contrast; + if (k == 1) { + contrast = sqrtf(SQR(LM[offset + 1] - LM[offset - 1]) + SQR(LM[offset + width] - LM[offset - width])) * 0.125f; //for 3x3 + } else /* if (k==2) */ contrast = sqrtf(SQR(LM[offset + 1] - LM[offset - 1]) + SQR(LM[offset + width] - LM[offset - width]) + + SQR(LM[offset + 2] - LM[offset - 2]) + SQR(LM[offset + 2 * width] - LM[offset - 2 * width])) * 0.0625f; //for 5x5 - if (v < LM[offset2]) { - signs[n] = -1; - } - - if (v > LM[offset2]) { - signs[n] = 1; - } - - n++; - } - - if (k == 1) { - contrast = sqrt(fabs(LM[offset + 1] - LM[offset - 1]) * fabs(LM[offset + 1] - LM[offset - 1]) + fabs(LM[offset + width] - LM[offset - width]) * fabs(LM[offset + width] - LM[offset - width])) / chmax; //for 3x3 - } else /* if (k==2) */ contrast = sqrt(fabs(LM[offset + 1] - LM[offset - 1]) * fabs(LM[offset + 1] - LM[offset - 1]) + fabs(LM[offset + width] - LM[offset - width]) * fabs(LM[offset + width] - LM[offset - width]) - + fabs(LM[offset + 2] - LM[offset - 2]) * fabs(LM[offset + 2] - LM[offset - 2]) + fabs(LM[offset + 2 * width] - LM[offset - 2 * width]) * fabs(LM[offset + 2 * width] - LM[offset - 2 * width])) / (2 * chmax); //for 5x5 - - if (contrast > 1.0f) { - contrast = 1.0f; - } + contrast = std::min(contrast, 1.f); //matrix 5x5 - temp = luminance[j][i] / 327.68f; //begin 3x3 - temp += CLIREF(v - LM[offset - width - 1]) * sqrtf(2.0f) * s; - temp += CLIREF(v - LM[offset - width]) * s; - temp += CLIREF(v - LM[offset - width + 1]) * sqrtf(2.0f) * s; - temp += CLIREF(v - LM[offset - 1]) * s; - temp += CLIREF(v - LM[offset + 1]) * s; - temp += CLIREF(v - LM[offset + width - 1]) * sqrtf(2.0f) * s; - temp += CLIREF(v - LM[offset + width]) * s; - temp += CLIREF(v - LM[offset + width + 1]) * sqrtf(2.0f) * s; //end 3x3 + float temp = v + 4.f *( v * (s + sqrt2 * s)); //begin 3x3 + float temp1 = sqrt2 * s *(LM[offset - width - 1] + LM[offset - width + 1] + LM[offset + width - 1] + LM[offset + width + 1]); + temp1 += s * (LM[offset - width] + LM[offset - 1] + LM[offset + 1] + LM[offset + width]); + + temp -= temp1; // add JD continue 5x5 if (k == 2) { - temp += 2.0f * CLIREF(v - LM[offset + 2 * width]) * s; - temp += 2.0f * CLIREF(v - LM[offset - 2 * width]) * s; - temp += 2.0f * CLIREF(v - LM[offset - 2 ]) * s; - temp += 2.0f * CLIREF(v - LM[offset + 2 ]) * s; + float temp2 = -(LM[offset + 2 * width] + LM[offset - 2 * width] + LM[offset - 2] + LM[offset + 2]); - temp += 2.0f * CLIREF(v - LM[offset + 2 * width - 1]) * s * sqrtf(1.25f); // 1.25 = 1*1 + 0.5*0.5 - temp += 2.0f * CLIREF(v - LM[offset + 2 * width - 2]) * s * sqrtf(2.00f); - temp += 2.0f * CLIREF(v - LM[offset + 2 * width + 1]) * s * sqrtf(1.25f); - temp += 2.0f * CLIREF(v - LM[offset + 2 * width + 2]) * s * sqrtf(2.00f); - temp += 2.0f * CLIREF(v - LM[offset + width + 2]) * s * sqrtf(1.25f); - temp += 2.0f * CLIREF(v - LM[offset + width - 2]) * s * sqrtf(1.25f); - temp += 2.0f * CLIREF(v - LM[offset - 2 * width - 1]) * s * sqrtf(1.25f); - temp += 2.0f * CLIREF(v - LM[offset - 2 * width - 2]) * s * sqrtf(2.00f); - temp += 2.0f * CLIREF(v - LM[offset - 2 * width + 1]) * s * sqrtf(1.25f); - temp += 2.0f * CLIREF(v - LM[offset - 2 * width + 2]) * s * sqrtf(2.00f); - temp += 2.0f * CLIREF(v - LM[offset - width + 2]) * s * sqrtf(1.25f); - temp += 2.0f * CLIREF(v - LM[offset - width - 2]) * s * sqrtf(1.25f); + temp2 -= sqrt1d25 * (LM[offset + 2 * width - 1] + LM[offset + 2 * width + 1] + LM[offset + width + 2] + LM[offset + width - 2] + + LM[offset - 2 * width - 1] + LM[offset - 2 * width + 1] + LM[offset - width + 2] + LM[offset - width - 2]); + + temp2 -= sqrt2 * (LM[offset + 2 * width - 2] + LM[offset + 2 * width + 2] + LM[offset - 2 * width - 2] + LM[offset - 2 * width + 2]); + temp2 += 18.601126159f * v ; // 18.601126159 = 4 + 4 * sqrt(2) + 8 * sqrt(1.25) + temp2 *= 2.f * s; + temp += temp2; } - if (temp < 0.0f) { - temp = 0.0f; - } + temp = std::max(temp, 0.f); - v = temp; - - n = 0; - - for(row = j - k; row <= j + k; row++) { - for(col = i - k, offset2 = row * width + col; col <= i + k; col++, offset2++) { - if (((v < LM[offset2]) && (signs[n] > 0)) || ((v > LM[offset2]) && (signs[n] < 0))) { - temp = v * 0.75f + LM[offset2] * 0.25f; // 0.75 0.25 + for(int row = j + k, n = SQR(2*k+1) - 1; row >= j - k; row--) { + for(int offset2 = row * width + i + k; offset2 >= row * width + i - k; offset2--) { + if((LM[offset2] - temp) * (v - LM[offset2]) > 0.f) { + temp = intp(0.75f, temp, LM[offset2]); + goto breakout; } - - n++; + n--; } } + breakout: if (LM[offset] > 95.0f || LM[offset] < 5.0f) { contrast *= Cont0[unif]; //+ JD : luminance pyramid to adjust contrast by evaluation of LM[offset] @@ -730,184 +692,114 @@ void ImProcFunctions::MLmicrocontrast(float** luminance, int W, int H) contrast *= Cont5[unif]; //(2.0f/k)*Cont5[unif]; } - if (contrast > 1.0f) { - contrast = 1.0f; - } + contrast = std::min(contrast, 1.f); - tempL = 327.68f * (temp * (1.0f - contrast) + LM[offset] * contrast); + float tempL = intp(contrast, LM[offset], temp); // JD: modulation of microcontrast in function of original Luminance and modulation of luminance - temp2 = tempL / (327.68f * LM[offset]); //for highlights - - if (temp2 > 1.0f) { - if (temp2 > 1.70f) { - temp2 = 1.70f; //limit action - } - - if (LM[offset] > 98.0f) { - luminance[j][i] = LM[offset] * 327.68f; + if (tempL > LM[offset]) { + float temp2 = tempL / LM[offset]; //for highlights + temp2 = std::min(temp2, 1.7f); //limit action + temp2 -= 1.f; + if (LM[offset] > 98.0f) { + temp = 0.f; } else if (LM[offset] > 95.0f) { - temp = (L95[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L95[unif]; } else if (LM[offset] > 92.0f) { - temp = (L92[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L92[unif]; } else if (LM[offset] > 90.0f) { - temp = (L90[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L90[unif]; } else if (LM[offset] > 87.0f) { - temp = (L87[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L87[unif]; } else if (LM[offset] > 83.0f) { - temp = (L83[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L83[unif]; } else if (LM[offset] > 80.0f) { - temp = (L80[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L80[unif]; } else if (LM[offset] > 75.0f) { - temp = (L75[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L75[unif]; } else if (LM[offset] > 70.0f) { - temp = (L70[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L70[unif]; } else if (LM[offset] > 63.0f) { - temp = (L63[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L63[unif]; } else if (LM[offset] > 58.0f) { - temp = (L58[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L58[unif]; } else if (LM[offset] > 42.0f) { - temp = (L58[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L58[unif]; } else if (LM[offset] > 37.0f) { - temp = (L63[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L63[unif]; } else if (LM[offset] > 30.0f) { - temp = (L70[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L70[unif]; } else if (LM[offset] > 25.0f) { - temp = (L75[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L75[unif]; } else if (LM[offset] > 20.0f) { - temp = (L80[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L80[unif]; } else if (LM[offset] > 17.0f) { - temp = (L83[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L83[unif]; } else if (LM[offset] > 13.0f) { - temp = (L87[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L87[unif]; } else if (LM[offset] > 10.0f) { - temp = (L90[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; + temp = L90[unif]; } else if (LM[offset] > 5.0f) { - temp = (L95[unif] * (temp2 - 1.f)) + 1.0f; - luminance[j][i] = temp * LM[offset] * 327.68f; - } else if (LM[offset] > 0.0f) { - luminance[j][i] = LM[offset] * 327.68f; + temp = L95[unif]; + } else { + temp = 0.f; + } + luminance[j][i] *= (temp * temp2 + 1.f); + } else { + + float temp4 = LM[offset] / tempL; // + + if (temp4 > 1.0f) { + temp4 = std::min(temp4, 1.7f); //limit action + temp4 -= 1.f; + if (LM[offset] < 2.0f) { + temp = L98[unif]; + } else if (LM[offset] < 5.0f) { + temp = L95[unif]; + } else if (LM[offset] < 8.0f) { + temp = L92[unif]; + } else if (LM[offset] < 10.0f) { + temp = L90[unif]; + } else if (LM[offset] < 13.0f) { + temp = L87[unif]; + } else if (LM[offset] < 17.0f) { + temp = L83[unif]; + } else if (LM[offset] < 20.0f) { + temp = L80[unif]; + } else if (LM[offset] < 25.0f) { + temp = L75[unif]; + } else if (LM[offset] < 30.0f) { + temp = L70[unif]; + } else if (LM[offset] < 37.0f) { + temp = L63[unif]; + } else if (LM[offset] < 42.0f) { + temp = L58[unif]; + } else if (LM[offset] < 58.0f) { + temp = L58[unif]; + } else if (LM[offset] < 63.0f) { + temp = L63[unif]; + } else if (LM[offset] < 70.0f) { + temp = L70[unif]; + } else if (LM[offset] < 75.0f) { + temp = L75[unif]; + } else if (LM[offset] < 80.0f) { + temp = L80[unif]; + } else if (LM[offset] < 83.0f) { + temp = L83[unif]; + } else if (LM[offset] < 87.0f) { + temp = L87[unif]; + } else if (LM[offset] < 90.0f) { + temp = L90[unif]; + } else if (LM[offset] < 95.0f) { + temp = L95[unif]; + } else { + temp = 0.f; + } + luminance[j][i] /= (temp * temp4 + 1.f); } } - - temp4 = (327.68f * LM[offset]) / tempL; // - - if (temp4 > 1.0f) { - if (temp4 > 1.7f) { - temp4 = 1.7f; //limit action - } - - if (LM[offset] < 2.0f) { - temp3 = temp4 - 1.0f; - temp = (L98[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 5.0f) { - temp3 = temp4 - 1.0f; - temp = (L95[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 8.0f) { - temp3 = temp4 - 1.0f; - temp = (L92[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 10.0f) { - temp3 = temp4 - 1.0f; - temp = (L90[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 13.0f) { - temp3 = temp4 - 1.0f; - temp = (L87[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 17.0f) { - temp3 = temp4 - 1.0f; - temp = (L83[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 20.0f) { - temp3 = temp4 - 1.0f; - temp = (L80[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 25.0f) { - temp3 = temp4 - 1.0f; - temp = (L75[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 30.0f) { - temp3 = temp4 - 1.0f; - temp = (L70[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 37.0f) { - temp3 = temp4 - 1.0f; - temp = (L63[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 42.0f) { - temp3 = temp4 - 1.0f; - temp = (L58[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 58.0f) { - temp3 = temp4 - 1.0f; - temp = (L58[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 63.0f) { - temp3 = temp4 - 1.0f; - temp = (L63[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 70.0f) { - temp3 = temp4 - 1.0f; - temp = (L70[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 75.0f) { - temp3 = temp4 - 1.0f; - temp = (L75[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 80.0f) { - temp3 = temp4 - 1.0f; - temp = (L80[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 83.0f) { - temp3 = temp4 - 1.0f; - temp = (L83[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 87.0f) { - temp3 = temp4 - 1.0f; - temp = (L87[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 90.0f) { - temp3 = temp4 - 1.0f; - temp = (L90[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 95.0f) { - temp3 = temp4 - 1.0f; - temp = (L95[unif] * temp3) + 1.0f; - luminance[j][i] = (LM[offset] * 327.68f) / temp; - } else if (LM[offset] < 100.0f) { - luminance[j][i] = LM[offset] * 327.68f; - } - } - } - +} delete [] LM; - t2e.set(); - - if (settings->verbose) { - printf("Micro-contrast %d usec\n", t2e.etime(t1e)); - } - } void ImProcFunctions::MLmicrocontrast(LabImage* lab) @@ -934,7 +826,7 @@ void ImProcFunctions::sharpeningcam (CieImage* ncie, float** b2) // Rest is UNSHARP MASK int W = ncie->W, H = ncie->H; - float** b3; + float** b3 = nullptr; if (params->sharpening.edgesonly) { b3 = new float*[H]; diff --git a/rtengine/iptcpairs.h b/rtengine/iptcpairs.h index 363a4f6ab..e0b34180f 100644 --- a/rtengine/iptcpairs.h +++ b/rtengine/iptcpairs.h @@ -32,8 +32,8 @@ const IptcPair strTags[] = { {IPTC_TAG_HEADLINE, 256, "Headline"}, {IPTC_TAG_SPECIAL_INSTRUCTIONS, 256, "Instructions"}, {IPTC_TAG_CATEGORY, 3, "Category"}, - {IPTC_TAG_BYLINE, 32, "Author"}, - {IPTC_TAG_BYLINE_TITLE, 32, "AuthorsPosition"}, + {IPTC_TAG_BYLINE, 32, "Creator"}, + {IPTC_TAG_BYLINE_TITLE, 32, "CreatorJobTitle"}, {IPTC_TAG_CREDIT, 32, "Credit"}, {IPTC_TAG_SOURCE, 32, "Source"}, {IPTC_TAG_COPYRIGHT_NOTICE, 128, "Copyright"}, diff --git a/rtengine/iptransform.cc b/rtengine/iptransform.cc index 1c0a09929..ee14c80c2 100644 --- a/rtengine/iptransform.cc +++ b/rtengine/iptransform.cc @@ -25,22 +25,23 @@ #include "rt_math.h" #include "sleef.c" + using namespace std; namespace { -float pow3(float x) +float pow3 (float x) { return x * x * x; } -float pow4(float x) +float pow4 (float x) { return (x * x) * (x * x); } -float pown(float x, int n) +float pown (float x, int n) { switch (n) { @@ -51,38 +52,52 @@ float pown(float x, int n) return x * x; case 4: - return pow4(x); + return pow4 (x); case 6: - return (x * x) * pow4(x); + return (x * x) * pow4 (x); case 8: - return pow4(x) * pow4(x); + return pow4 (x) * pow4 (x); default: - return pow_F(x, n); + return pow_F (x, n); } } -float normn(float a, float b, int n) +float normn (float a, float b, int n) { switch (n) { case 2: - return sqrtf(a * a + b * b); + return sqrtf (a * a + b * b); case 4: - return sqrtf(sqrtf(pow4(a) + pow4(b))); + return sqrtf (sqrtf (pow4 (a) + pow4 (b))); case 6: - return sqrtf(xcbrtf(pow3(a) * pow3(a) + pow3(b) * pow3(b))); + return sqrtf (xcbrtf (pow3 (a) * pow3 (a) + pow3 (b) * pow3 (b))); case 8: - return sqrtf(sqrtf(sqrtf(pow4(a) * pow4(a) + pow4(b) * pow4(b)))); + return sqrtf (sqrtf (sqrtf (pow4 (a) * pow4 (a) + pow4 (b) * pow4 (b)))); default: - return pow_F(pown(a, n) + pown(b, n), 1.f / n); + return pow_F (pown (a, n) + pown (b, n), 1.f / n); } } + + +void correct_distortion(const rtengine::LCPMapper *lcp, double &x, double &y, + int cx, int cy, double scale) +{ + assert (lcp); + + x += cx; + y += cy; + lcp->correctDistortion(x, y, scale); + x -= (cx * scale); + y -= (cy * scale); +} + } namespace rtengine @@ -90,7 +105,6 @@ namespace rtengine #undef CLIPTOC #define CLIPTOC(a,b,c,d) ((a)>=(b)?((a)<=(c)?(a):(d=true,(c))):(d=true,(b))) -#define RT_PI 3.141592653589 bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, std::vector &red, std::vector &green, std::vector &blue, double ascaleDef, const LCPMapper *pLCPMap) @@ -115,26 +129,26 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, double oW = W, oH = H; double w2 = (double) oW / 2.0 - 0.5; double h2 = (double) oH / 2.0 - 0.5; - double maxRadius = sqrt( (double)( oW * oW + oH * oH ) ) / 2; + double maxRadius = sqrt ( (double) ( oW * oW + oH * oH ) ) / 2; // auxiliary variables for distortion correction bool needsDist = needsDistortion(); // for performance double distAmount = params->distortion.amount; // auxiliary variables for rotation - double cost = cos(params->rotate.degree * RT_PI / 180.0); - double sint = sin(params->rotate.degree * RT_PI / 180.0); + double cost = cos (params->rotate.degree * rtengine::RT_PI / 180.0); + double sint = sin (params->rotate.degree * rtengine::RT_PI / 180.0); // auxiliary variables for vertical perspective correction double vpdeg = params->perspective.vertical / 100.0 * 45.0; - double vpalpha = (90.0 - vpdeg) / 180.0 * RT_PI; - double vpteta = fabs(vpalpha - RT_PI / 2) < 3e-4 ? 0.0 : acos ((vpdeg > 0 ? 1.0 : -1.0) * sqrt((-oW * oW * tan(vpalpha) * tan(vpalpha) + (vpdeg > 0 ? 1.0 : -1.0) * oW * tan(vpalpha) * sqrt(16 * maxRadius * maxRadius + oW * oW * tan(vpalpha) * tan(vpalpha))) / (maxRadius * maxRadius * 8))); + double vpalpha = (90.0 - vpdeg) / 180.0 * rtengine::RT_PI; + double vpteta = fabs (vpalpha - rtengine::RT_PI / 2) < 3e-4 ? 0.0 : acos ((vpdeg > 0 ? 1.0 : -1.0) * sqrt ((-oW * oW * tan (vpalpha) * tan (vpalpha) + (vpdeg > 0 ? 1.0 : -1.0) * oW * tan (vpalpha) * sqrt (16 * maxRadius * maxRadius + oW * oW * tan (vpalpha) * tan (vpalpha))) / (maxRadius * maxRadius * 8))); double vpcospt = (vpdeg >= 0 ? 1.0 : -1.0) * cos (vpteta), vptanpt = tan (vpteta); // auxiliary variables for horizontal perspective correction double hpdeg = params->perspective.horizontal / 100.0 * 45.0; - double hpalpha = (90.0 - hpdeg) / 180.0 * RT_PI; - double hpteta = fabs(hpalpha - RT_PI / 2) < 3e-4 ? 0.0 : acos ((hpdeg > 0 ? 1.0 : -1.0) * sqrt((-oH * oH * tan(hpalpha) * tan(hpalpha) + (hpdeg > 0 ? 1.0 : -1.0) * oH * tan(hpalpha) * sqrt(16 * maxRadius * maxRadius + oH * oH * tan(hpalpha) * tan(hpalpha))) / (maxRadius * maxRadius * 8))); + double hpalpha = (90.0 - hpdeg) / 180.0 * rtengine::RT_PI; + double hpteta = fabs (hpalpha - rtengine::RT_PI / 2) < 3e-4 ? 0.0 : acos ((hpdeg > 0 ? 1.0 : -1.0) * sqrt ((-oH * oH * tan (hpalpha) * tan (hpalpha) + (hpdeg > 0 ? 1.0 : -1.0) * oH * tan (hpalpha) * sqrt (16 * maxRadius * maxRadius + oH * oH * tan (hpalpha) * tan (hpalpha))) / (maxRadius * maxRadius * 8))); double hpcospt = (hpdeg >= 0 ? 1.0 : -1.0) * cos (hpteta), hptanpt = tan (hpteta); double ascale = ascaleDef > 0 ? ascaleDef : (params->commonTrans.autofill ? getTransformAutoFill (oW, oH, pLCPMap) : 1.0); @@ -143,11 +157,14 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, double x_d = src[i].x, y_d = src[i].y; if (pLCPMap && params->lensProf.useDist) { - pLCPMap->correctDistortion(x_d, y_d); // must be first transform + correct_distortion (pLCPMap, x_d, y_d, 0, 0, ascale); + } else { + x_d *= ascale; + y_d *= ascale; } - y_d = ascale * (y_d - h2); - x_d = ascale * (x_d - w2); + x_d += ascale * (0 - w2); // centering x coord & scale + y_d += ascale * (0 - h2); // centering y coord & scale if (needsPerspective()) { // horizontal perspective transformation @@ -167,25 +184,25 @@ bool ImProcFunctions::transCoord (int W, int H, const std::vector &src, double s = 1; if (needsDist) { - double r = sqrt(Dx * Dx + Dy * Dy) / maxRadius; // sqrt is slow + double r = sqrt (Dx * Dx + Dy * Dy) / maxRadius; // sqrt is slow s = 1.0 - distAmount + distAmount * r ; } // LCP CA is not reflected in preview (and very small), so don't add it here - red.push_back (Coord2D(Dx * (s + params->cacorrection.red) + w2, Dy * (s + params->cacorrection.red) + h2)); - green.push_back (Coord2D(Dx * s + w2, Dy * s + h2)); - blue.push_back (Coord2D(Dx * (s + params->cacorrection.blue) + w2, Dy * (s + params->cacorrection.blue) + h2)); + red.push_back (Coord2D (Dx * (s + params->cacorrection.red) + w2, Dy * (s + params->cacorrection.red) + h2)); + green.push_back (Coord2D (Dx * s + w2, Dy * s + h2)); + blue.push_back (Coord2D (Dx * (s + params->cacorrection.blue) + w2, Dy * (s + params->cacorrection.blue) + h2)); } // Clip all points and track if they were any corrections for (size_t i = 0; i < src.size(); i++) { - red[i].x = CLIPTOC(red[i].x, 0, W - 1, clipped); - red[i].y = CLIPTOC(red[i].y, 0, H - 1, clipped); - green[i].x = CLIPTOC(green[i].x, 0, W - 1, clipped); - green[i].y = CLIPTOC(green[i].y, 0, H - 1, clipped); - blue[i].x = CLIPTOC(blue[i].x, 0, W - 1, clipped); - blue[i].y = CLIPTOC(blue[i].y, 0, H - 1, clipped); + red[i].x = CLIPTOC (red[i].x, 0, W - 1, clipped); + red[i].y = CLIPTOC (red[i].y, 0, H - 1, clipped); + green[i].x = CLIPTOC (green[i].x, 0, W - 1, clipped); + green[i].y = CLIPTOC (green[i].y, 0, H - 1, clipped); + blue[i].x = CLIPTOC (blue[i].x, 0, W - 1, clipped); + blue[i].y = CLIPTOC (blue[i].y, 0, H - 1, clipped); } return clipped; @@ -252,7 +269,7 @@ bool ImProcFunctions::transCoord (int W, int H, int x, int y, int w, int h, int& x1d = transCorners[i].x; } - int x1v = (int)(x1d); + int x1v = (int) (x1d); double y1d = transCorners[0].y; @@ -261,7 +278,7 @@ bool ImProcFunctions::transCoord (int W, int H, int x, int y, int w, int h, int& y1d = transCorners[i].y; } - int y1v = (int)(y1d); + int y1v = (int) (y1d); double x2d = transCorners[0].x; @@ -270,7 +287,7 @@ bool ImProcFunctions::transCoord (int W, int H, int x, int y, int w, int h, int& x2d = transCorners[i].x; } - int x2v = (int)ceil(x2d); + int x2v = (int)ceil (x2d); double y2d = transCorners[0].y; @@ -279,7 +296,7 @@ bool ImProcFunctions::transCoord (int W, int H, int x, int y, int w, int h, int& y2d = transCorners[i].y; } - int y2v = (int)ceil(y2d); + int y2v = (int)ceil (y2d); xv = x1v; yv = y1v; @@ -290,19 +307,23 @@ bool ImProcFunctions::transCoord (int W, int H, int x, int y, int w, int h, int& } void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, - double focalLen, double focalLen35mm, float focusDist, int rawRotationDeg, bool fullImage) + double focalLen, double focalLen35mm, float focusDist, double fNumber, int rawRotationDeg, bool fullImage) { LCPMapper *pLCPMap = nullptr; if (needsLCP()) { // don't check focal length to allow distortion correction for lenses without chip - LCPProfile *pLCPProf = lcpStore->getProfile(params->lensProf.lcpFile); + LCPProfile *pLCPProf = lcpStore->getProfile (params->lensProf.lcpFile); - if (pLCPProf) pLCPMap = new LCPMapper(pLCPProf, focalLen, focalLen35mm, focusDist, 0, false, params->lensProf.useDist, - original->width, original->height, params->coarse, rawRotationDeg); + if (pLCPProf) { + pLCPMap = new LCPMapper (pLCPProf, focalLen, focalLen35mm, + focusDist, fNumber, false, + params->lensProf.useDist, + oW, oH, params->coarse, rawRotationDeg); + } } - if (!(needsCA() || needsDistortion() || needsRotation() || needsPerspective() || needsLCP()) && (needsVignetting() || needsPCVignetting() || needsGradient())) { + if (! (needsCA() || needsDistortion() || needsRotation() || needsPerspective() || needsLCP()) && (needsVignetting() || needsPCVignetting() || needsGradient())) { transformLuminanceOnly (original, transformed, cx, cy, oW, oH, fW, fH); } else if (!needsCA() && scale != 1) { transformPreview (original, transformed, cx, cy, sx, sy, oW, oH, fW, fH, pLCPMap); @@ -316,7 +337,7 @@ void ImProcFunctions::transform (Imagefloat* original, Imagefloat* transformed, } // helper function -void ImProcFunctions::calcVignettingParams(int oW, int oH, const VignettingParams& vignetting, double &w2, double &h2, double& maxRadius, double &v, double &b, double &mul) +void ImProcFunctions::calcVignettingParams (int oW, int oH, const VignettingParams& vignetting, double &w2, double &h2, double& maxRadius, double &v, double &b, double &mul) { // vignette center is a point with coordinates between -1 and +1 double x = vignetting.centerX / 100.0; @@ -327,12 +348,12 @@ void ImProcFunctions::calcVignettingParams(int oW, int oH, const VignettingParam h2 = (double) oH / 2.0 - 0.5 + y * oH; // max vignette radius in pixels - maxRadius = sqrt( (double)( oW * oW + oH * oH ) ) / 2.; + maxRadius = sqrt ( (double) ( oW * oW + oH * oH ) ) / 2.; // vignette variables with applied strength - v = 1.0 + vignetting.strength * fabs(vignetting.amount) * 3.0 / 400.0; + v = 1.0 + vignetting.strength * fabs (vignetting.amount) * 3.0 / 400.0; b = 1.0 + vignetting.radius * 7.0 / 100.0; - mul = (1.0 - v) / tanh(b); + mul = (1.0 - v) / tanh (b); } struct grad_params { @@ -343,7 +364,7 @@ struct grad_params { float top_edge_0; int h; }; -static void calcGradientParams(int oW, int oH, const GradientParams& gradient, struct grad_params& gp) +static void calcGradientParams (int oW, int oH, const GradientParams& gradient, struct grad_params& gp) { int w = oW; int h = oH; @@ -351,45 +372,44 @@ static void calcGradientParams(int oW, int oH, const GradientParams& gradient, s double gradient_span = gradient.feather / 100.0; double gradient_center_x = gradient.centerX / 200.0 + 0.5; double gradient_center_y = gradient.centerY / 200.0 + 0.5; - double gradient_angle = gradient.degree / 180.0 * M_PI; + double gradient_angle = gradient.degree / 180.0 * rtengine::RT_PI; //fprintf(stderr, "%f %f %f %f %f %d %d\n", gradient_stops, gradient_span, gradient_center_x, gradient_center_y, gradient_angle, w, h); - // make 0.0 <= gradient_angle < 2 * M_PI - gradient_angle = fmod(gradient_angle, 2 * M_PI); + // make 0.0 <= gradient_angle < 2 * rtengine::RT_PI + gradient_angle = fmod (gradient_angle, 2 * rtengine::RT_PI); if (gradient_angle < 0.0) { - gradient_angle += 2.0 * M_PI; + gradient_angle += 2.0 * rtengine::RT_PI; } gp.bright_top = false; gp.transpose = false; gp.angle_is_zero = false; gp.h = h; - double cosgrad = cos(gradient_angle); + double cosgrad = cos (gradient_angle); - if (fabs(cosgrad) < 0.707) { + if (fabs (cosgrad) < 0.707) { // we transpose to avoid division by zero at 90 degrees // (actually we could transpose only for 90 degrees, but this way we avoid // division with extremely small numbers gp.transpose = true; - gradient_angle += 0.5 * M_PI; - cosgrad = cos(gradient_angle); + gradient_angle += 0.5 * rtengine::RT_PI; double gxc = gradient_center_x; gradient_center_x = 1.0 - gradient_center_y; gradient_center_y = gxc; } - gradient_angle = fmod(gradient_angle, 2 * M_PI); + gradient_angle = fmod (gradient_angle, 2 * rtengine::RT_PI); - if (gradient_angle > 0.5 * M_PI && gradient_angle < M_PI) { - gradient_angle += M_PI; + if (gradient_angle > 0.5 * rtengine::RT_PI && gradient_angle < rtengine::RT_PI) { + gradient_angle += rtengine::RT_PI; gp.bright_top = true; - } else if (gradient_angle >= M_PI && gradient_angle < 1.5 * M_PI) { - gradient_angle -= M_PI; + } else if (gradient_angle >= rtengine::RT_PI && gradient_angle < 1.5 * rtengine::RT_PI) { + gradient_angle -= rtengine::RT_PI; gp.bright_top = true; } - if (fabs(gradient_angle) < 0.001 || fabs(gradient_angle - 2 * M_PI) < 0.001) { + if (fabs (gradient_angle) < 0.001 || fabs (gradient_angle - 2 * rtengine::RT_PI) < 0.001) { gradient_angle = 0; gp.angle_is_zero = true; } @@ -404,7 +424,7 @@ static void calcGradientParams(int oW, int oH, const GradientParams& gradient, s h = tmp; } - gp.scale = 1.0 / pow(2, gradient_stops); + gp.scale = 1.0 / pow (2, gradient_stops); if (gp.bright_top) { gp.topmul = 1.0; @@ -414,10 +434,10 @@ static void calcGradientParams(int oW, int oH, const GradientParams& gradient, s gp.botmul = 1.0; } - gp.ta = tan(gradient_angle); + gp.ta = tan (gradient_angle); gp.xc = w * gradient_center_x; gp.yc = h * gradient_center_y; - gp.ys = sqrt((float)h * h + (float)w * w) * (gradient_span / cos(gradient_angle)); + gp.ys = sqrt ((float)h * h + (float)w * w) * (gradient_span / cos (gradient_angle)); gp.ys_inv = 1.0 / gp.ys; gp.top_edge_0 = gp.yc - gp.ys / 2.0; @@ -427,29 +447,28 @@ static void calcGradientParams(int oW, int oH, const GradientParams& gradient, s } } -static float calcGradientFactor(const struct grad_params& gp, int x, int y) +static float calcGradientFactor (const struct grad_params& gp, int x, int y) { if (gp.angle_is_zero) { int gy = gp.transpose ? x : y; - int gx = gp.transpose ? y : x; if (gy < gp.top_edge_0) { return gp.topmul; } else if (gy >= gp.top_edge_0 + gp.ys) { return gp.botmul; } else { - float val = ((float)(gy - gp.top_edge_0) * gp.ys_inv); + float val = ((float) (gy - gp.top_edge_0) * gp.ys_inv); if (gp.bright_top) { val = 1.f - val; } - val *= M_PIf_2; + val *= rtengine::RT_PI_F_2; if (gp.scale < 1.f) { - val = pow3(xsinf(val)); + val = pow3 (xsinf (val)); } else { - val = 1.f - pow3(xcosf(val)); + val = 1.f - pow3 (xcosf (val)); } return gp.scale + val * (1.0 - gp.scale); @@ -464,16 +483,16 @@ static float calcGradientFactor(const struct grad_params& gp, int x, int y) } else if (gy >= top_edge + gp.ys) { return gp.botmul; } else { - float val = ((float)(gy - top_edge) * gp.ys_inv); + float val = ((float) (gy - top_edge) * gp.ys_inv); val = gp.bright_top ? 1.f - val : val; - val *= M_PIf_2; + val *= rtengine::RT_PI_F_2; if (gp.scale < 1.f) { - val = pow3(xsinf(val)); + val = pow3 (xsinf (val)); } else { - val = 1.f - pow3(xcosf(val)); + val = 1.f - pow3 (xcosf (val)); } return gp.scale + val * (1.0 - gp.scale); @@ -491,7 +510,7 @@ struct pcv_params { float scale; float fadeout_mul; }; -static void calcPCVignetteParams(int fW, int fH, int oW, int oH, const PCVignetteParams& pcvignette, const CropParams &crop, struct pcv_params& pcv) +static void calcPCVignetteParams (int fW, int fH, int oW, int oH, const PCVignetteParams& pcvignette, const CropParams &crop, struct pcv_params& pcv) { // ellipse formula: (x/a)^2 + (y/b)^2 = 1 @@ -512,49 +531,49 @@ static void calcPCVignetteParams(int fW, int fH, int oW, int oH, const PCVignett pcv.h = oH; } - pcv.fadeout_mul = 1.0 / (0.05 * sqrtf(oW * oW + oH * oH)); + pcv.fadeout_mul = 1.0 / (0.05 * sqrtf (oW * oW + oH * oH)); float short_side = (pcv.w < pcv.h) ? pcv.w : pcv.h; float long_side = (pcv.w > pcv.h) ? pcv.w : pcv.h; pcv.sep = 2; pcv.sepmix = 0; - pcv.oe_a = sqrt(2.0) * long_side * 0.5; + pcv.oe_a = sqrt (2.0) * long_side * 0.5; pcv.oe_b = pcv.oe_a * short_side / long_side; - pcv.ie_mul = (1.0 / sqrt(2.0)) * (1.0 - pcv.feather); + pcv.ie_mul = (1.0 / sqrt (2.0)) * (1.0 - pcv.feather); pcv.is_super_ellipse_mode = false; pcv.is_portrait = (pcv.w < pcv.h); if (roundness < 0.5) { // make super-ellipse of higher and higher degree pcv.is_super_ellipse_mode = true; - float sepf = 2 + 4 * powf(1.0 - 2 * roundness, 1.3); // gamma 1.3 used to balance the effect in the 0.0...0.5 roundness range + float sepf = 2 + 4 * powf (1.0 - 2 * roundness, 1.3); // gamma 1.3 used to balance the effect in the 0.0...0.5 roundness range pcv.sep = ((int)sepf) & ~0x1; pcv.sepmix = (sepf - pcv.sep) * 0.5; // 0.0 to 1.0 - pcv.oe1_a = powf(2.0, 1.0 / pcv.sep) * long_side * 0.5; + pcv.oe1_a = powf (2.0, 1.0 / pcv.sep) * long_side * 0.5; pcv.oe1_b = pcv.oe1_a * short_side / long_side; - pcv.ie1_mul = (1.0 / powf(2.0, 1.0 / pcv.sep)) * (1.0 - pcv.feather); - pcv.oe2_a = powf(2.0, 1.0 / (pcv.sep + 2)) * long_side * 0.5; + pcv.ie1_mul = (1.0 / powf (2.0, 1.0 / pcv.sep)) * (1.0 - pcv.feather); + pcv.oe2_a = powf (2.0, 1.0 / (pcv.sep + 2)) * long_side * 0.5; pcv.oe2_b = pcv.oe2_a * short_side / long_side; - pcv.ie2_mul = (1.0 / powf(2.0, 1.0 / (pcv.sep + 2))) * (1.0 - pcv.feather); + pcv.ie2_mul = (1.0 / powf (2.0, 1.0 / (pcv.sep + 2))) * (1.0 - pcv.feather); } if (roundness > 0.5) { // scale from fitted ellipse towards circle - float rad = sqrtf(pcv.w * pcv.w + pcv.h * pcv.h) / 2.0; + float rad = sqrtf (pcv.w * pcv.w + pcv.h * pcv.h) / 2.0; float diff_a = rad - pcv.oe_a; float diff_b = rad - pcv.oe_b; pcv.oe_a = pcv.oe_a + diff_a * 2 * (roundness - 0.5); pcv.oe_b = pcv.oe_b + diff_b * 2 * (roundness - 0.5); } - pcv.scale = powf(2, -pcvignette.strength); + pcv.scale = powf (2, -pcvignette.strength); if (pcvignette.strength >= 6.0) { pcv.scale = 0.0; } } -static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) +static float calcPCVignetteFactor (const struct pcv_params& pcv, int x, int y) { float fo = 1.f; @@ -576,25 +595,25 @@ static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) dist_y = 0; } - fo = sqrtf(dist_x * dist_x + dist_y * dist_y) * pcv.fadeout_mul; + fo = sqrtf (dist_x * dist_x + dist_y * dist_y) * pcv.fadeout_mul; if (fo >= 1.f) { return 1.f; } } - float a = fabs((x - pcv.x1) - pcv.w * 0.5f); - float b = fabs((y - pcv.y1) - pcv.h * 0.5f); + float a = fabs ((x - pcv.x1) - pcv.w * 0.5f); + float b = fabs ((y - pcv.y1) - pcv.h * 0.5f); - if(pcv.is_portrait) { - std::swap(a, b); + if (pcv.is_portrait) { + std::swap (a, b); } - float dist = normn(a, b, 2); + float dist = normn (a, b, 2); float dist_oe, dist_ie; float2 sincosval; - if(dist == 0.0f) { + if (dist == 0.0f) { sincosval.y = 1.0f; // cos sincosval.x = 0.0f; // sin } else { @@ -603,14 +622,14 @@ static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) } if (pcv.is_super_ellipse_mode) { - float dist_oe1 = pcv.oe1_a * pcv.oe1_b / normn(pcv.oe1_b * sincosval.y, pcv.oe1_a * sincosval.x, pcv.sep); - float dist_oe2 = pcv.oe2_a * pcv.oe2_b / normn(pcv.oe2_b * sincosval.y, pcv.oe2_a * sincosval.x, pcv.sep + 2); + float dist_oe1 = pcv.oe1_a * pcv.oe1_b / normn (pcv.oe1_b * sincosval.y, pcv.oe1_a * sincosval.x, pcv.sep); + float dist_oe2 = pcv.oe2_a * pcv.oe2_b / normn (pcv.oe2_b * sincosval.y, pcv.oe2_a * sincosval.x, pcv.sep + 2); float dist_ie1 = pcv.ie1_mul * dist_oe1; float dist_ie2 = pcv.ie2_mul * dist_oe2; dist_oe = dist_oe1 * (1.f - pcv.sepmix) + dist_oe2 * pcv.sepmix; dist_ie = dist_ie1 * (1.f - pcv.sepmix) + dist_ie2 * pcv.sepmix; } else { - dist_oe = pcv.oe_a * pcv.oe_b / sqrtf(SQR(pcv.oe_b * sincosval.y) + SQR(pcv.oe_a * sincosval.x)); + dist_oe = pcv.oe_a * pcv.oe_b / sqrtf (SQR (pcv.oe_b * sincosval.y) + SQR (pcv.oe_a * sincosval.x)); dist_ie = pcv.ie_mul * dist_oe; } @@ -623,12 +642,12 @@ static float calcPCVignetteFactor(const struct pcv_params& pcv, int x, int y) if (dist >= dist_oe) { val = pcv.scale; } else { - val = M_PIf_2 * (dist - dist_ie) / (dist_oe - dist_ie); + val = rtengine::RT_PI_F_2 * (dist - dist_ie) / (dist_oe - dist_ie); if (pcv.scale < 1.f) { - val = pow4(xcosf(val)); + val = pow4 (xcosf (val)); } else { - val = 1 - pow4(xsinf(val)); + val = 1 - pow4 (xsinf (val)); } val = pcv.scale + val * (1.f - pcv.scale); @@ -651,53 +670,53 @@ void ImProcFunctions::transformLuminanceOnly (Imagefloat* original, Imagefloat* double vig_w2, vig_h2, maxRadius, v, b, mul; if (applyVignetting) { - calcVignettingParams(oW, oH, params->vignetting, vig_w2, vig_h2, maxRadius, v, b, mul); + calcVignettingParams (oW, oH, params->vignetting, vig_w2, vig_h2, maxRadius, v, b, mul); } struct grad_params gp; if (applyGradient) { - calcGradientParams(oW, oH, params->gradient, gp); + calcGradientParams (oW, oH, params->gradient, gp); } struct pcv_params pcv; if (applyPCVignetting) { - //fprintf(stderr, "%d %d | %d %d | %d %d | %d %d [%d %d]\n", fW, fH, oW, oH, transformed->width, transformed->height, cx, cy, params->crop.w, params->crop.h); - calcPCVignetteParams(fW, fH, oW, oH, params->pcvignette, params->crop, pcv); + //fprintf(stderr, "%d %d | %d %d | %d %d | %d %d [%d %d]\n", fW, fH, oW, oH, transformed->getWidth(), transformed->getHeight(), cx, cy, params->crop.w, params->crop.h); + calcPCVignetteParams (fW, fH, oW, oH, params->pcvignette, params->crop, pcv); } bool darkening = (params->vignetting.amount <= 0.0); #pragma omp parallel for schedule(dynamic,16) if (multiThread) - for (int y = 0; y < transformed->height; y++) { - double vig_y_d = (double) (y + cy) - vig_h2 ; + for (int y = 0; y < transformed->getHeight(); y++) { + double vig_y_d = applyVignetting ? (double) (y + cy) - vig_h2 : 0.0; - for (int x = 0; x < transformed->width; x++) { + for (int x = 0; x < transformed->getWidth(); x++) { double factor = 1.0; if (applyVignetting) { double vig_x_d = (double) (x + cx) - vig_w2 ; - double r = sqrt(vig_x_d * vig_x_d + vig_y_d * vig_y_d); + double r = sqrt (vig_x_d * vig_x_d + vig_y_d * vig_y_d); - if(darkening) { - factor /= std::max(v + mul * tanh (b * (maxRadius - r) / maxRadius), 0.001); + if (darkening) { + factor /= std::max (v + mul * tanh (b * (maxRadius - r) / maxRadius), 0.001); } else { factor = v + mul * tanh (b * (maxRadius - r) / maxRadius); } } if (applyGradient) { - factor *= calcGradientFactor(gp, cx + x, cy + y); + factor *= calcGradientFactor (gp, cx + x, cy + y); } if (applyPCVignetting) { - factor *= calcPCVignetteFactor(pcv, cx + x, cy + y); + factor *= calcPCVignetteFactor (pcv, cx + x, cy + y); } - transformed->r(y, x) = original->r(y, x) * factor; - transformed->g(y, x) = original->g(y, x) * factor; - transformed->b(y, x) = original->b(y, x) * factor; + transformed->r (y, x) = original->r (y, x) * factor; + transformed->g (y, x) = original->g (y, x) * factor; + transformed->b (y, x) = original->b (y, x) * factor; } } } @@ -706,23 +725,22 @@ void ImProcFunctions::transformLuminanceOnly (Imagefloat* original, Imagefloat* void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LCPMapper *pLCPMap, bool fullImage) { - double w2 = (double) oW / 2.0 - 0.5; double h2 = (double) oH / 2.0 - 0.5; double vig_w2, vig_h2, maxRadius, v, b, mul; - calcVignettingParams(oW, oH, params->vignetting, vig_w2, vig_h2, maxRadius, v, b, mul); + calcVignettingParams (oW, oH, params->vignetting, vig_w2, vig_h2, maxRadius, v, b, mul); struct grad_params gp; if (needsGradient()) { - calcGradientParams(oW, oH, params->gradient, gp); + calcGradientParams (oW, oH, params->gradient, gp); } struct pcv_params pcv; if (needsPCVignetting()) { - calcPCVignetteParams(fW, fH, oW, oH, params->pcvignette, params->crop, pcv); + calcPCVignetteParams (fW, fH, oW, oH, params->pcvignette, params->crop, pcv); } float** chOrig[3]; @@ -746,28 +764,28 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr double distAmount = params->distortion.amount; // auxiliary variables for rotation - double cost = cos(params->rotate.degree * RT_PI / 180.0); - double sint = sin(params->rotate.degree * RT_PI / 180.0); + double cost = cos (params->rotate.degree * rtengine::RT_PI / 180.0); + double sint = sin (params->rotate.degree * rtengine::RT_PI / 180.0); // auxiliary variables for vertical perspective correction double vpdeg = params->perspective.vertical / 100.0 * 45.0; - double vpalpha = (90.0 - vpdeg) / 180.0 * RT_PI; - double vpteta = fabs(vpalpha - RT_PI / 2) < 3e-4 ? 0.0 : acos ((vpdeg > 0 ? 1.0 : -1.0) * sqrt((-SQR(oW * tan(vpalpha)) + (vpdeg > 0 ? 1.0 : -1.0) * - oW * tan(vpalpha) * sqrt(SQR(4 * maxRadius) + SQR(oW * tan(vpalpha)))) / (SQR(maxRadius) * 8))); + double vpalpha = (90.0 - vpdeg) / 180.0 * rtengine::RT_PI; + double vpteta = fabs (vpalpha - rtengine::RT_PI / 2) < 3e-4 ? 0.0 : acos ((vpdeg > 0 ? 1.0 : -1.0) * sqrt ((-SQR (oW * tan (vpalpha)) + (vpdeg > 0 ? 1.0 : -1.0) * + oW * tan (vpalpha) * sqrt (SQR (4 * maxRadius) + SQR (oW * tan (vpalpha)))) / (SQR (maxRadius) * 8))); double vpcospt = (vpdeg >= 0 ? 1.0 : -1.0) * cos (vpteta), vptanpt = tan (vpteta); // auxiliary variables for horizontal perspective correction double hpdeg = params->perspective.horizontal / 100.0 * 45.0; - double hpalpha = (90.0 - hpdeg) / 180.0 * RT_PI; - double hpteta = fabs(hpalpha - RT_PI / 2) < 3e-4 ? 0.0 : acos ((hpdeg > 0 ? 1.0 : -1.0) * sqrt((-SQR(oH * tan(hpalpha)) + (hpdeg > 0 ? 1.0 : -1.0) * - oH * tan(hpalpha) * sqrt(SQR(4 * maxRadius) + SQR(oH * tan(hpalpha)))) / (SQR(maxRadius) * 8))); + double hpalpha = (90.0 - hpdeg) / 180.0 * rtengine::RT_PI; + double hpteta = fabs (hpalpha - rtengine::RT_PI / 2) < 3e-4 ? 0.0 : acos ((hpdeg > 0 ? 1.0 : -1.0) * sqrt ((-SQR (oH * tan (hpalpha)) + (hpdeg > 0 ? 1.0 : -1.0) * + oH * tan (hpalpha) * sqrt (SQR (4 * maxRadius) + SQR (oH * tan (hpalpha)))) / (SQR (maxRadius) * 8))); double hpcospt = (hpdeg >= 0 ? 1.0 : -1.0) * cos (hpteta), hptanpt = tan (hpteta); - double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, fullImage ? pLCPMap : nullptr) : 1.0; + double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, true /*fullImage*/ ? pLCPMap : nullptr) : 1.0; // smaller crop images are a problem, so only when processing fully bool enableLCPCA = pLCPMap && params->lensProf.useCA && fullImage && pLCPMap->enableCA; - bool enableLCPDist = pLCPMap && params->lensProf.useDist && fullImage; + bool enableLCPDist = pLCPMap && params->lensProf.useDist; // && fullImage; if (enableLCPCA) { enableLCPDist = false; @@ -779,18 +797,21 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr bool darkening = (params->vignetting.amount <= 0.0); #pragma omp parallel for if (multiThread) - for (int y = 0; y < transformed->height; y++) { - for (int x = 0; x < transformed->width; x++) { + for (int y = 0; y < transformed->getHeight(); y++) { + for (int x = 0; x < transformed->getWidth(); x++) { double x_d = x, y_d = y; if (enableLCPDist) { - pLCPMap->correctDistortion(x_d, y_d); // must be first transform + correct_distortion(pLCPMap, x_d, y_d, cx, cy, ascale); // must be first transform + } else { + x_d *= ascale; + y_d *= ascale; } - x_d = ascale * (x_d + cx - w2); // centering x coord & scale - y_d = ascale * (y_d + cy - h2); // centering y coord & scale + x_d += ascale * (cx - w2); // centering x coord & scale + y_d += ascale * (cy - h2); // centering y coord & scale - double vig_x_d, vig_y_d; + double vig_x_d = 0., vig_y_d = 0.; if (needsVignetting()) { vig_x_d = ascale * (x + cx - vig_w2); // centering x coord & scale @@ -815,16 +836,16 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr double s = 1; if (needsDist) { - double r = sqrt(Dxc * Dxc + Dyc * Dyc) / maxRadius; // sqrt is slow + double r = sqrt (Dxc * Dxc + Dyc * Dyc) / maxRadius; // sqrt is slow s = 1.0 - distAmount + distAmount * r ; } - double r2; + double r2 = 0.; if (needsVignetting()) { double vig_Dx = vig_x_d * cost - vig_y_d * sint; double vig_Dy = vig_x_d * sint + vig_y_d * cost; - r2 = sqrt(vig_Dx * vig_Dx + vig_Dy * vig_Dy); + r2 = sqrt (vig_Dx * vig_Dx + vig_Dy * vig_Dy); } for (int c = 0; c < (enableCA ? 3 : 1); c++) { @@ -837,7 +858,7 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr // LCP CA if (enableLCPCA) { - pLCPMap->correctCA(Dx, Dy, c); + pLCPMap->correctCA (Dx, Dy, c); } // Extract integer and fractions of source screen coordinates @@ -849,47 +870,47 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr yc -= sy; // Convert only valid pixels - if (yc >= 0 && yc < original->height && xc >= 0 && xc < original->width) { + if (yc >= 0 && yc < original->getHeight() && xc >= 0 && xc < original->getWidth()) { // multiplier for vignetting correction double vignmul = 1.0; if (needsVignetting()) { - if(darkening) { - vignmul /= std::max(v + mul * tanh (b * (maxRadius - s * r2) / maxRadius), 0.001); + if (darkening) { + vignmul /= std::max (v + mul * tanh (b * (maxRadius - s * r2) / maxRadius), 0.001); } else { vignmul *= (v + mul * tanh (b * (maxRadius - s * r2) / maxRadius)); } } if (needsGradient()) { - vignmul *= calcGradientFactor(gp, cx + x, cy + y); + vignmul *= calcGradientFactor (gp, cx + x, cy + y); } if (needsPCVignetting()) { - vignmul *= calcPCVignetteFactor(pcv, cx + x, cy + y); + vignmul *= calcPCVignetteFactor (pcv, cx + x, cy + y); } - if (yc > 0 && yc < original->height - 2 && xc > 0 && xc < original->width - 2) { + if (yc > 0 && yc < original->getHeight() - 2 && xc > 0 && xc < original->getWidth() - 2) { // all interpolation pixels inside image if (enableCA) { - interpolateTransformChannelsCubic (chOrig[c], xc - 1, yc - 1, Dx, Dy, &(chTrans[c][y][x]), vignmul); + interpolateTransformChannelsCubic (chOrig[c], xc - 1, yc - 1, Dx, Dy, & (chTrans[c][y][x]), vignmul); } else { - interpolateTransformCubic (original, xc - 1, yc - 1, Dx, Dy, &(transformed->r(y, x)), &(transformed->g(y, x)), &(transformed->b(y, x)), vignmul); + interpolateTransformCubic (original, xc - 1, yc - 1, Dx, Dy, & (transformed->r (y, x)), & (transformed->g (y, x)), & (transformed->b (y, x)), vignmul); } } else { // edge pixels - int y1 = LIM(yc, 0, original->height - 1); - int y2 = LIM(yc + 1, 0, original->height - 1); - int x1 = LIM(xc, 0, original->width - 1); - int x2 = LIM(xc + 1, 0, original->width - 1); + int y1 = LIM (yc, 0, original->getHeight() - 1); + int y2 = LIM (yc + 1, 0, original->getHeight() - 1); + int x1 = LIM (xc, 0, original->getWidth() - 1); + int x2 = LIM (xc + 1, 0, original->getWidth() - 1); if (enableCA) { chTrans[c][y][x] = vignmul * (chOrig[c][y1][x1] * (1.0 - Dx) * (1.0 - Dy) + chOrig[c][y1][x2] * Dx * (1.0 - Dy) + chOrig[c][y2][x1] * (1.0 - Dx) * Dy + chOrig[c][y2][x2] * Dx * Dy); } else { - transformed->r(y, x) = vignmul * (original->r(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->r(y1, x2) * Dx * (1.0 - Dy) + original->r(y2, x1) * (1.0 - Dx) * Dy + original->r(y2, x2) * Dx * Dy); - transformed->g(y, x) = vignmul * (original->g(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->g(y1, x2) * Dx * (1.0 - Dy) + original->g(y2, x1) * (1.0 - Dx) * Dy + original->g(y2, x2) * Dx * Dy); - transformed->b(y, x) = vignmul * (original->b(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->b(y1, x2) * Dx * (1.0 - Dy) + original->b(y2, x1) * (1.0 - Dx) * Dy + original->b(y2, x2) * Dx * Dy); + transformed->r (y, x) = vignmul * (original->r (y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->r (y1, x2) * Dx * (1.0 - Dy) + original->r (y2, x1) * (1.0 - Dx) * Dy + original->r (y2, x2) * Dx * Dy); + transformed->g (y, x) = vignmul * (original->g (y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->g (y1, x2) * Dx * (1.0 - Dy) + original->g (y2, x1) * (1.0 - Dx) * Dy + original->g (y2, x2) * Dx * Dy); + transformed->b (y, x) = vignmul * (original->b (y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->b (y1, x2) * Dx * (1.0 - Dy) + original->b (y2, x1) * (1.0 - Dx) * Dy + original->b (y2, x2) * Dx * Dy); } } } else { @@ -897,9 +918,9 @@ void ImProcFunctions::transformHighQuality (Imagefloat* original, Imagefloat* tr // not valid (source pixel x,y not inside source image, etc.) chTrans[c][y][x] = 0; } else { - transformed->r(y, x) = 0; - transformed->g(y, x) = 0; - transformed->b(y, x) = 0; + transformed->r (y, x) = 0; + transformed->g (y, x) = 0; + transformed->b (y, x) = 0; } } } @@ -915,18 +936,18 @@ void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transf double h2 = (double) oH / 2.0 - 0.5; double vig_w2, vig_h2, maxRadius, v, b, mul; - calcVignettingParams(oW, oH, params->vignetting, vig_w2, vig_h2, maxRadius, v, b, mul); + calcVignettingParams (oW, oH, params->vignetting, vig_w2, vig_h2, maxRadius, v, b, mul); struct grad_params gp; if (needsGradient()) { - calcGradientParams(oW, oH, params->gradient, gp); + calcGradientParams (oW, oH, params->gradient, gp); } struct pcv_params pcv; if (needsPCVignetting()) { - calcPCVignetteParams(fW, fH, oW, oH, params->pcvignette, params->crop, pcv); + calcPCVignetteParams (fW, fH, oW, oH, params->pcvignette, params->crop, pcv); } // auxiliary variables for distortion correction @@ -934,19 +955,19 @@ void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transf double distAmount = params->distortion.amount; // auxiliary variables for rotation - double cost = cos(params->rotate.degree * RT_PI / 180.0); - double sint = sin(params->rotate.degree * RT_PI / 180.0); + double cost = cos (params->rotate.degree * rtengine::RT_PI / 180.0); + double sint = sin (params->rotate.degree * rtengine::RT_PI / 180.0); // auxiliary variables for vertical perspective correction double vpdeg = params->perspective.vertical / 100.0 * 45.0; - double vpalpha = (90 - vpdeg) / 180.0 * RT_PI; - double vpteta = fabs(vpalpha - RT_PI / 2) < 3e-4 ? 0.0 : acos ((vpdeg > 0 ? 1.0 : -1.0) * sqrt((-oW * oW * tan(vpalpha) * tan(vpalpha) + (vpdeg > 0 ? 1.0 : -1.0) * oW * tan(vpalpha) * sqrt(16 * maxRadius * maxRadius + oW * oW * tan(vpalpha) * tan(vpalpha))) / (maxRadius * maxRadius * 8))); + double vpalpha = (90 - vpdeg) / 180.0 * rtengine::RT_PI; + double vpteta = fabs (vpalpha - rtengine::RT_PI / 2) < 3e-4 ? 0.0 : acos ((vpdeg > 0 ? 1.0 : -1.0) * sqrt ((-oW * oW * tan (vpalpha) * tan (vpalpha) + (vpdeg > 0 ? 1.0 : -1.0) * oW * tan (vpalpha) * sqrt (16 * maxRadius * maxRadius + oW * oW * tan (vpalpha) * tan (vpalpha))) / (maxRadius * maxRadius * 8))); double vpcospt = (vpdeg >= 0 ? 1.0 : -1.0) * cos (vpteta), vptanpt = tan (vpteta); // auxiliary variables for horizontal perspective correction double hpdeg = params->perspective.horizontal / 100.0 * 45.0; - double hpalpha = (90 - hpdeg) / 180.0 * RT_PI; - double hpteta = fabs(hpalpha - RT_PI / 2) < 3e-4 ? 0.0 : acos ((hpdeg > 0 ? 1.0 : -1.0) * sqrt((-oH * oH * tan(hpalpha) * tan(hpalpha) + (hpdeg > 0 ? 1.0 : -1.0) * oH * tan(hpalpha) * sqrt(16 * maxRadius * maxRadius + oH * oH * tan(hpalpha) * tan(hpalpha))) / (maxRadius * maxRadius * 8))); + double hpalpha = (90 - hpdeg) / 180.0 * rtengine::RT_PI; + double hpteta = fabs (hpalpha - rtengine::RT_PI / 2) < 3e-4 ? 0.0 : acos ((hpdeg > 0 ? 1.0 : -1.0) * sqrt ((-oH * oH * tan (hpalpha) * tan (hpalpha) + (hpdeg > 0 ? 1.0 : -1.0) * oH * tan (hpalpha) * sqrt (16 * maxRadius * maxRadius + oH * oH * tan (hpalpha) * tan (hpalpha))) / (maxRadius * maxRadius * 8))); double hpcospt = (hpdeg >= 0 ? 1.0 : -1.0) * cos (hpteta), hptanpt = tan (hpteta); double ascale = params->commonTrans.autofill ? getTransformAutoFill (oW, oH, pLCPMap) : 1.0; @@ -956,18 +977,21 @@ void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transf // main cycle #pragma omp parallel for if (multiThread) - for (int y = 0; y < transformed->height; y++) { - for (int x = 0; x < transformed->width; x++) { + for (int y = 0; y < transformed->getHeight(); y++) { + for (int x = 0; x < transformed->getWidth(); x++) { double x_d = x, y_d = y; if (pLCPMap && params->lensProf.useDist) { - pLCPMap->correctDistortion(x_d, y_d); // must be first transform + correct_distortion(pLCPMap, x_d, y_d, cx, cy, ascale); // must be first transform + } else { + x_d *= ascale; + y_d *= ascale; } - y_d = ascale * (y_d + cy - h2); // centering y coord & scale - x_d = ascale * (x_d + cx - w2); // centering x coord & scale + x_d += ascale * (cx - w2); // centering x coord & scale + y_d += ascale * (cy - h2); // centering y coord & scale - double vig_x_d, vig_y_d; + double vig_x_d = 0., vig_y_d = 0.; if (needsVignetting()) { vig_x_d = ascale * (x + cx - vig_w2); // centering x coord & scale @@ -992,18 +1016,18 @@ void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transf double s = 1; if (needsDist) { - double r = sqrt(Dx * Dx + Dy * Dy) / maxRadius; // sqrt is slow + double r = sqrt (Dx * Dx + Dy * Dy) / maxRadius; // sqrt is slow s = 1.0 - distAmount + distAmount * r ; Dx *= s; Dy *= s; } - double r2; + double r2 = 0.; if (needsVignetting()) { double vig_Dx = vig_x_d * cost - vig_y_d * sint; double vig_Dy = vig_x_d * sint + vig_y_d * cost; - r2 = sqrt(vig_Dx * vig_Dx + vig_Dy * vig_Dy); + r2 = sqrt (vig_Dx * vig_Dx + vig_Dy * vig_Dy); } // de-center @@ -1019,47 +1043,47 @@ void ImProcFunctions::transformPreview (Imagefloat* original, Imagefloat* transf yc -= sy; // Convert only valid pixels - if (yc >= 0 && yc < original->height && xc >= 0 && xc < original->width) { + if (yc >= 0 && yc < original->getHeight() && xc >= 0 && xc < original->getWidth()) { // multiplier for vignetting correction double vignmul = 1.0; if (needsVignetting()) { - if(darkening) { - vignmul /= std::max(v + mul * tanh (b * (maxRadius - s * r2) / maxRadius), 0.001); + if (darkening) { + vignmul /= std::max (v + mul * tanh (b * (maxRadius - s * r2) / maxRadius), 0.001); } else { vignmul = v + mul * tanh (b * (maxRadius - s * r2) / maxRadius); } } if (needsGradient()) { - vignmul *= calcGradientFactor(gp, cx + x, cy + y); + vignmul *= calcGradientFactor (gp, cx + x, cy + y); } if (needsPCVignetting()) { - vignmul *= calcPCVignetteFactor(pcv, cx + x, cy + y); + vignmul *= calcPCVignetteFactor (pcv, cx + x, cy + y); } - if (yc < original->height - 1 && xc < original->width - 1) { + if (yc < original->getHeight() - 1 && xc < original->getWidth() - 1) { // all interpolation pixels inside image - transformed->r(y, x) = vignmul * (original->r(yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->r(yc, xc + 1) * Dx * (1.0 - Dy) + original->r(yc + 1, xc) * (1.0 - Dx) * Dy + original->r(yc + 1, xc + 1) * Dx * Dy); - transformed->g(y, x) = vignmul * (original->g(yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->g(yc, xc + 1) * Dx * (1.0 - Dy) + original->g(yc + 1, xc) * (1.0 - Dx) * Dy + original->g(yc + 1, xc + 1) * Dx * Dy); - transformed->b(y, x) = vignmul * (original->b(yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->b(yc, xc + 1) * Dx * (1.0 - Dy) + original->b(yc + 1, xc) * (1.0 - Dx) * Dy + original->b(yc + 1, xc + 1) * Dx * Dy); + transformed->r (y, x) = vignmul * (original->r (yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->r (yc, xc + 1) * Dx * (1.0 - Dy) + original->r (yc + 1, xc) * (1.0 - Dx) * Dy + original->r (yc + 1, xc + 1) * Dx * Dy); + transformed->g (y, x) = vignmul * (original->g (yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->g (yc, xc + 1) * Dx * (1.0 - Dy) + original->g (yc + 1, xc) * (1.0 - Dx) * Dy + original->g (yc + 1, xc + 1) * Dx * Dy); + transformed->b (y, x) = vignmul * (original->b (yc, xc) * (1.0 - Dx) * (1.0 - Dy) + original->b (yc, xc + 1) * Dx * (1.0 - Dy) + original->b (yc + 1, xc) * (1.0 - Dx) * Dy + original->b (yc + 1, xc + 1) * Dx * Dy); } else { // edge pixels - int y1 = LIM(yc, 0, original->height - 1); - int y2 = LIM(yc + 1, 0, original->height - 1); - int x1 = LIM(xc, 0, original->width - 1); - int x2 = LIM(xc + 1, 0, original->width - 1); - transformed->r(y, x) = vignmul * (original->r(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->r(y1, x2) * Dx * (1.0 - Dy) + original->r(y2, x1) * (1.0 - Dx) * Dy + original->r(y2, x2) * Dx * Dy); - transformed->g(y, x) = vignmul * (original->g(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->g(y1, x2) * Dx * (1.0 - Dy) + original->g(y2, x1) * (1.0 - Dx) * Dy + original->g(y2, x2) * Dx * Dy); - transformed->b(y, x) = vignmul * (original->b(y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->b(y1, x2) * Dx * (1.0 - Dy) + original->b(y2, x1) * (1.0 - Dx) * Dy + original->b(y2, x2) * Dx * Dy); + int y1 = LIM (yc, 0, original->getHeight() - 1); + int y2 = LIM (yc + 1, 0, original->getHeight() - 1); + int x1 = LIM (xc, 0, original->getWidth() - 1); + int x2 = LIM (xc + 1, 0, original->getWidth() - 1); + transformed->r (y, x) = vignmul * (original->r (y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->r (y1, x2) * Dx * (1.0 - Dy) + original->r (y2, x1) * (1.0 - Dx) * Dy + original->r (y2, x2) * Dx * Dy); + transformed->g (y, x) = vignmul * (original->g (y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->g (y1, x2) * Dx * (1.0 - Dy) + original->g (y2, x1) * (1.0 - Dx) * Dy + original->g (y2, x2) * Dx * Dy); + transformed->b (y, x) = vignmul * (original->b (y1, x1) * (1.0 - Dx) * (1.0 - Dy) + original->b (y1, x2) * Dx * (1.0 - Dy) + original->b (y2, x1) * (1.0 - Dx) * Dy + original->b (y2, x2) * Dx * Dy); } } else { // not valid (source pixel x,y not inside source image, etc.) - transformed->r(y, x) = 0; - transformed->g(y, x) = 0; - transformed->b(y, x) = 0; + transformed->r (y, x) = 0; + transformed->g (y, x) = 0; + transformed->b (y, x) = 0; } } } @@ -1111,12 +1135,12 @@ bool ImProcFunctions::needsPerspective () bool ImProcFunctions::needsGradient () { - return params->gradient.enabled && fabs(params->gradient.strength) > 1e-15; + return params->gradient.enabled && fabs (params->gradient.strength) > 1e-15; } bool ImProcFunctions::needsPCVignetting () { - return params->pcvignette.enabled && fabs(params->pcvignette.strength) > 1e-15; + return params->pcvignette.enabled && fabs (params->pcvignette.strength) > 1e-15; } bool ImProcFunctions::needsVignetting () diff --git a/rtengine/ipvibrance.cc b/rtengine/ipvibrance.cc index 60994175b..68efd1aea 100644 --- a/rtengine/ipvibrance.cc +++ b/rtengine/ipvibrance.cc @@ -33,6 +33,7 @@ #include #endif + using namespace std; namespace rtengine @@ -44,7 +45,7 @@ using namespace procparams; extern const Settings* settings; -void fillCurveArrayVib(DiagonalCurve* diagCurve, LUTf &outCurve) +void fillCurveArrayVib (DiagonalCurve* diagCurve, LUTf &outCurve) { if (diagCurve) { @@ -56,7 +57,7 @@ void fillCurveArrayVib(DiagonalCurve* diagCurve, LUTf &outCurve) // change to [0,1] range // apply custom/parametric/NURBS curve, if any // and store result in a temporary array - outCurve[i] = 65535.f * diagCurve->getVal( double(i) / 65535.0 ); + outCurve[i] = 65535.f * diagCurve->getVal ( double (i) / 65535.0 ); } } else { outCurve.makeIdentity(); @@ -77,8 +78,7 @@ void ImProcFunctions::vibrance (LabImage* lab) // int skip=1; //scale==1 ? 1 : 16; bool skinCurveIsSet = false; - DiagonalCurve* dcurve = nullptr; - dcurve = new DiagonalCurve (params->vibrance.skintonescurve, CURVES_MIN_POLY_POINTS); + DiagonalCurve* dcurve = new DiagonalCurve (params->vibrance.skintonescurve, CURVES_MIN_POLY_POINTS); if (dcurve) { if (!dcurve->isIdentity()) { @@ -111,8 +111,8 @@ void ImProcFunctions::vibrance (LabImage* lab) // I use diagonal because I think it's better LUTf skin_curve (65536, 0); - if(skinCurveIsSet) { - fillCurveArrayVib(dcurve, skin_curve); + if (skinCurveIsSet) { + fillCurveArrayVib (dcurve, skin_curve); } if (dcurve) { @@ -123,10 +123,10 @@ void ImProcFunctions::vibrance (LabImage* lab) // skin_curve.dump("skin_curve"); - const float chromaPastel = float(params->vibrance.pastels) / 100.0f; - const float chromaSatur = float(params->vibrance.saturated) / 100.0f; + const float chromaPastel = float (params->vibrance.pastels) / 100.0f; + const float chromaSatur = float (params->vibrance.saturated) / 100.0f; const float p00 = 0.07f; - const float limitpastelsatur = (static_cast(params->vibrance.psthreshold.value[ThresholdSelector::TS_TOPLEFT]) / 100.0f) * (1.0f - p00) + p00; + const float limitpastelsatur = (static_cast (params->vibrance.psthreshold.value[ThresholdSelector::TS_TOPLEFT]) / 100.0f) * (1.0f - p00) + p00; const float maxdp = (limitpastelsatur - p00) / 4.0f; const float maxds = (1.0 - limitpastelsatur) / 4.0f; const float p0 = p00 + maxdp; @@ -135,10 +135,10 @@ void ImProcFunctions::vibrance (LabImage* lab) const float s0 = limitpastelsatur + maxds; const float s1 = limitpastelsatur + 2.0f * maxds; const float s2 = limitpastelsatur + 3.0f * maxds; - const float transitionweighting = static_cast(params->vibrance.psthreshold.value[ThresholdSelector::TS_BOTTOMLEFT]) / 100.0f; + const float transitionweighting = static_cast (params->vibrance.psthreshold.value[ThresholdSelector::TS_BOTTOMLEFT]) / 100.0f; float chromamean = 0.0f; - if(chromaPastel != chromaSatur) { + if (chromaPastel != chromaSatur) { //if sliders pastels and saturated are different: transition with a double linear interpolation: between p2 and limitpastelsatur, and between limitpastelsatur and s0 //modify the "mean" point in function of double threshold => differential transition chromamean = maxdp * (chromaSatur - chromaPastel) / (s0 - p2) + chromaPastel; @@ -170,7 +170,7 @@ void ImProcFunctions::vibrance (LabImage* lab) const bool protectskins = params->vibrance.protectskins; const bool avoidcolorshift = params->vibrance.avoidcolorshift; - TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params->icm.working); + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params->icm.working); //inverse matrix user select const double wip[3][3] = { {wiprof[0][0], wiprof[0][1], wiprof[0][2]}, @@ -208,8 +208,8 @@ void ImProcFunctions::vibrance (LabImage* lab) if (settings->verbose) { #endif - printf("vibrance: p0=%1.2f p1=%1.2f p2=%1.2f s0=%1.2f s1=%1.2f s2=%1.2f\n", p0, p1, p2, s0, s1, s2); - printf(" pastel=%f satur=%f limit= %1.2f chromamean=%0.5f\n", 1.0f + chromaPastel, 1.0f + chromaSatur, limitpastelsatur, chromamean); + printf ("vibrance: p0=%1.2f p1=%1.2f p2=%1.2f s0=%1.2f s1=%1.2f s2=%1.2f\n", p0, p1, p2, s0, s1, s2); + printf (" pastel=%f satur=%f limit= %1.2f chromamean=%0.5f\n", 1.0f + chromaPastel, 1.0f + chromaSatur, limitpastelsatur, chromamean); } #pragma omp for schedule(dynamic, 16) @@ -217,12 +217,12 @@ void ImProcFunctions::vibrance (LabImage* lab) for (int i = 0; i < height; i++) for (int j = 0; j < width; j++) { float LL = lab->L[i][j] / 327.68f; - float CC = sqrt(SQR(lab->a[i][j]) + SQR(lab->b[i][j])) / 327.68f; - float HH = xatan2f(lab->b[i][j], lab->a[i][j]); + float CC = sqrt (SQR (lab->a[i][j]) + SQR (lab->b[i][j])) / 327.68f; + float HH = xatan2f (lab->b[i][j], lab->a[i][j]); float satredu = 1.0f; //reduct sat in function of skin - if(protectskins) { + if (protectskins) { Color::SkinSat (LL, HH, CC, satredu);// for skin colors } @@ -234,7 +234,7 @@ void ImProcFunctions::vibrance (LabImage* lab) float R, G, B; float2 sincosval; - if(CC == 0.0f) { + if (CC == 0.0f) { sincosval.y = 1.f; sincosval.x = 0.0f; } else { @@ -246,26 +246,26 @@ void ImProcFunctions::vibrance (LabImage* lab) bool neg = false; bool more_rgb = false; //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, sincosval, Lprov, Chprov, R, G, B, wip, highlight, 0.15f, 0.98f, neg, more_rgb); + Color::gamutLchonly (HH, sincosval, Lprov, Chprov, R, G, B, wip, highlight, 0.15f, 0.98f, neg, more_rgb); - if(neg) { + if (neg) { negat++; } - if(more_rgb) { + if (more_rgb) { moreRGB++; } #else //gamut control : Lab values are in gamut - Color::gamutLchonly(HH, sincosval, Lprov, Chprov, R, G, B, wip, highlight, 0.15f, 0.98f); + Color::gamutLchonly (HH, sincosval, Lprov, Chprov, R, G, B, wip, highlight, 0.15f, 0.98f); #endif - if(Chprov > 6.0f) { - const float saturation = SAT(R, G, B); + if (Chprov > 6.0f) { + const float saturation = SAT (R, G, B); - if(saturation > 0.0f) { - if(satredu != 1.0f) { + if (saturation > 0.0f) { + if (satredu != 1.0f) { // for skin, no differentiation sathue [0] = sathue [1] = sathue [2] = sathue [3] = sathue[4] = 1.0f; sathue2[0] = sathue2[1] = sathue2[2] = sathue2[3] = 1.0f; @@ -274,7 +274,7 @@ void ImProcFunctions::vibrance (LabImage* lab) //I try to take into account: Munsell response (human vision) and Gamut..(less response for red): preferably using Prophoto or WideGamut //blue: -1.80 -3.14 green = 2.1 3.14 green-yellow=1.4 2.1 red:0 1.4 blue-purple:-0.7 -1.4 purple: 0 -0.7 //these values allow a better and differential response - if(LL < 20.0f) {//more for blue-purple, blue and red modulate + if (LL < 20.0f) { //more for blue-purple, blue and red modulate if (/*HH> -3.1415f &&*/ HH < -1.5f ) { sathue[0] = 1.3f; //blue sathue[1] = 1.2f; @@ -285,7 +285,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[1] = 1.1f ; sathue2[2] = 1.05f; sathue2[3] = 1.0f; - } else if(/*HH>=-1.5f &&*/ HH < -0.7f ) { + } else if (/*HH>=-1.5f &&*/ HH < -0.7f ) { sathue[0] = 1.6f; //blue purple 1.2 1.1 sathue[1] = 1.4f; sathue[2] = 1.3f; @@ -295,7 +295,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[1] = 1.15f; sathue2[2] = 1.1f ; sathue2[3] = 1.0f; - } else if(/*HH>=-0.7f &&*/ HH < 0.0f ) { + } else if (/*HH>=-0.7f &&*/ HH < 0.0f ) { sathue[0] = 1.2f; //purple sathue[1] = 1.0f; sathue[2] = 1.0f; @@ -307,7 +307,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[3] = 1.0f; } // else if( HH>= 0.0f && HH<= 1.4f ) {sathue[0]=1.1f;sathue[1]=1.1f;sathue[2]=1.1f;sathue[3]=1.0f ;sathue[4]=0.4f;sathue2[0]=1.0f ;sathue2[1]=1.0f ;sathue2[2]=1.0f ;sathue2[3]=1.0f;}//red 0.8 0.7 - else if(/*HH>= 0.0f &&*/ HH <= 1.4f ) { + else if (/*HH>= 0.0f &&*/ HH <= 1.4f ) { sathue[0] = 1.3f; //red 0.8 0.7 sathue[1] = 1.2f; sathue[2] = 1.1f; @@ -317,7 +317,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[1] = 1.0f ; sathue2[2] = 1.0f ; sathue2[3] = 1.0f; - } else if(/*HH> 1.4f &&*/ HH <= 2.1f ) { + } else if (/*HH> 1.4f &&*/ HH <= 2.1f ) { sathue[0] = 1.0f; //green yellow 1.2 1.1 sathue[1] = 1.0f; sathue[2] = 1.0f; @@ -349,7 +349,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[1] = 1.1f ; sathue2[2] = 1.05f; sathue2[3] = 1.0f; - } else if(/*HH>=-1.5f &&*/ HH < -0.7f ) { + } else if (/*HH>=-1.5f &&*/ HH < -0.7f ) { sathue[0] = 1.3f; //blue purple 1.2 1.1 sathue[1] = 1.2f; sathue[2] = 1.1f; @@ -359,7 +359,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[1] = 1.05f; sathue2[2] = 1.0f ; sathue2[3] = 1.0f; - } else if(/*HH>=-0.7f &&*/ HH < 0.0f ) { + } else if (/*HH>=-0.7f &&*/ HH < 0.0f ) { sathue[0] = 1.2f; //purple sathue[1] = 1.0f; sathue[2] = 1.0f; @@ -371,7 +371,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[3] = 1.0f; } // else if( HH>= 0.0f && HH<= 1.4f ) {sathue[0]=0.8f;sathue[1]=0.8f;sathue[2]=0.8f;sathue[3]=0.8f ;sathue[4]=0.4f;sathue2[0]=0.8f ;sathue2[1]=0.8f ;sathue2[2]=0.8f ;sathue2[3]=0.8f;}//red 0.8 0.7 - else if(/*HH>= 0.0f &&*/ HH <= 1.4f ) { + else if (/*HH>= 0.0f &&*/ HH <= 1.4f ) { sathue[0] = 1.1f; //red 0.8 0.7 sathue[1] = 1.0f; sathue[2] = 0.9f; @@ -381,7 +381,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[1] = 0.8f ; sathue2[2] = 0.8f ; sathue2[3] = 0.8f; - } else if(/*HH> 1.4f &&*/ HH <= 2.1f ) { + } else if (/*HH> 1.4f &&*/ HH <= 2.1f ) { sathue[0] = 1.1f; //green yellow 1.2 1.1 sathue[1] = 1.1f; sathue[2] = 1.1f; @@ -414,7 +414,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[1] = 1.1f ; sathue2[2] = 1.05f; sathue2[3] = 1.0f; - } else if(/*HH>=-1.5f &&*/ HH < -0.7f ) { + } else if (/*HH>=-1.5f &&*/ HH < -0.7f ) { sathue[0] = 1.3f; //blue purple 1.2 1.1 sathue[1] = 1.2f; sathue[2] = 1.15f; @@ -424,7 +424,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[1] = 1.05f; sathue2[2] = 1.0f ; sathue2[3] = 1.0f; - } else if(/*HH>=-0.7f &&*/ HH < 0.0f ) { + } else if (/*HH>=-0.7f &&*/ HH < 0.0f ) { sathue[0] = 1.2f; //purple sathue[1] = 1.0f; sathue[2] = 1.0f ; @@ -436,7 +436,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[3] = 1.0f; } // else if( HH>= 0.0f && HH<= 1.4f ) {sathue[0]=0.8f;sathue[1]=0.8f;sathue[2]=0.8f ;sathue[3]=0.8f ;sathue[4]=0.3f;sathue2[0]=0.8f ;sathue2[1]=0.8f ;sathue2[2]=0.8f ;sathue2[3]=0.8f;}//red 0.8 0.7 - else if(/*HH>= 0.0f &&*/ HH <= 1.4f ) { + else if (/*HH>= 0.0f &&*/ HH <= 1.4f ) { sathue[0] = 1.1f; //red 0.8 0.7 sathue[1] = 1.0f; sathue[2] = 0.9f ; @@ -446,7 +446,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[1] = 0.8f ; sathue2[2] = 0.8f ; sathue2[3] = 0.8f; - } else if(/*HH> 1.4f &&*/ HH <= 2.1f ) { + } else if (/*HH> 1.4f &&*/ HH <= 2.1f ) { sathue[0] = 1.3f; //green yellow 1.2 1.1 sathue[1] = 1.2f; sathue[2] = 1.1f ; @@ -478,7 +478,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[1] = 0.8f ; sathue2[2] = 0.8f ; sathue2[3] = 0.8f; - } else if(/*HH>=-1.5f &&*/ HH < -0.7f ) { + } else if (/*HH>=-1.5f &&*/ HH < -0.7f ) { sathue[0] = 1.0f; //blue purple 1.2 1.1 sathue[1] = 1.0f; sathue[2] = 0.9f; @@ -488,7 +488,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[1] = 0.8f ; sathue2[2] = 0.8f ; sathue2[3] = 0.8f; - } else if(/*HH>=-0.7f &&*/ HH < 0.0f ) { + } else if (/*HH>=-0.7f &&*/ HH < 0.0f ) { sathue[0] = 1.2f; //purple sathue[1] = 1.0f; sathue[2] = 1.0f; @@ -500,7 +500,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[3] = 0.8f; } // else if( HH>= 0.0f && HH<= 1.4f ) {sathue[0]=0.8f;sathue[1]=0.8f;sathue[2]=0.8f;sathue[3]=0.8f;sathue[4]=0.2f;sathue2[0]=0.8f;sathue2[1]=0.8f ;sathue2[2]=0.8f ;sathue2[3]=0.8f;}//red 0.8 0.7 - else if(/*HH>= 0.0f &&*/ HH <= 1.4f ) { + else if (/*HH>= 0.0f &&*/ HH <= 1.4f ) { sathue[0] = 1.1f; //red 0.8 0.7 sathue[1] = 1.0f; sathue[2] = 0.9f; @@ -510,7 +510,7 @@ void ImProcFunctions::vibrance (LabImage* lab) sathue2[1] = 0.8f ; sathue2[2] = 0.8f ; sathue2[3] = 0.8f; - } else if(/*HH> 1.4f &&*/ HH <= 2.1f ) { + } else if (/*HH> 1.4f &&*/ HH <= 2.1f ) { sathue[0] = 1.6f; //green yellow 1.2 1.1 sathue[1] = 1.5f; sathue[2] = 1.4f; @@ -534,7 +534,7 @@ void ImProcFunctions::vibrance (LabImage* lab) } } - float chmodpastel, chmodsat; + float chmodpastel = 0.f, chmodsat = 0.f; // variables to improve transitions float pa, pb;// transition = pa*saturation + pb float chl00 = chromaPastel * satredu * sathue[4]; @@ -585,16 +585,16 @@ void ImProcFunctions::vibrance (LabImage* lab) chmodsat = pa * saturation + pb; } - if(chromaPastel != chromaSatur) { + if (chromaPastel != chromaSatur) { // Pastels - if(saturation > p2 && saturation < limitpastelsatur) { + if (saturation > p2 && saturation < limitpastelsatur) { float newchromaPastel = chromaPastel_a * saturation + chromaPastel_b; chmodpastel = newchromaPastel * satredu * sathue[3]; } // Saturated - if(saturation < s0 && saturation >= limitpastelsatur) { + if (saturation < s0 && saturation >= limitpastelsatur) { float newchromaSatur = chromaSatur_a * saturation + chromaSatur_b; chmodsat = newchromaSatur * satredu * sathue2[0]; } @@ -603,25 +603,25 @@ void ImProcFunctions::vibrance (LabImage* lab) if (saturation <= limitpastelsatur) { if (chmodpastel > 2.0f ) { chmodpastel = 2.0f; //avoid too big values - } else if(chmodpastel < -0.93f) { + } else if (chmodpastel < -0.93f) { chmodpastel = -0.93f; //avoid negative values } Chprov *= (1.0f + chmodpastel); - if(Chprov < 6.0f) { + if (Chprov < 6.0f) { Chprov = 6.0f; } } else { //if (saturation > limitpastelsatur) if (chmodsat > 1.8f ) { chmodsat = 1.8f; //saturated - } else if(chmodsat < -0.93f) { + } else if (chmodsat < -0.93f) { chmodsat = -0.93f; } Chprov *= 1.0f + chmodsat; - if(Chprov < 6.0f) { + if (Chprov < 6.0f) { Chprov = 6.0f; } } @@ -631,15 +631,15 @@ void ImProcFunctions::vibrance (LabImage* lab) bool hhModified = false; // Vibrance's Skin curve - if(skinCurveIsSet) { + if (skinCurveIsSet) { if (HH > skbeg && HH < skend) { - if(Chprov < 60.0f) {//skin hue : todo ==> transition + if (Chprov < 60.0f) { //skin hue : todo ==> transition float HHsk = ask * HH + bsk; float Hn = (skin_curve[HHsk] - bsk) / ask; float Hc = (Hn * xx + HH * (1.0f - xx)); HH = Hc; hhModified = true; - } else if(Chprov < (60.0f + dchr)) { //transition chroma + } else if (Chprov < (60.0f + dchr)) { //transition chroma float HHsk = ask * HH + bsk; float Hn = (skin_curve[HHsk] - bsk) / ask; float Hc = (Hn * xx + HH * (1.0f - xx)); @@ -650,7 +650,7 @@ void ImProcFunctions::vibrance (LabImage* lab) } } //transition hue - else if(HH > (skbeg - dhue) && HH <= skbeg && Chprov < (60.0f + dchr * 0.5f)) { + else if (HH > (skbeg - dhue) && HH <= skbeg && Chprov < (60.0f + dchr * 0.5f)) { float HHsk = ask * skbeg + bsk; float Hn = (skin_curve[HHsk] - bsk) / ask; float Hcc = (Hn * xx + skbeg * (1.0f - xx)); @@ -658,7 +658,7 @@ void ImProcFunctions::vibrance (LabImage* lab) float bdh = Hcc - adh * skbeg; HH = adh * HH + bdh; hhModified = true; - } else if(HH >= skend && HH < (skend + dhue) && Chprov < (60.0f + dchr * 0.5f)) { + } else if (HH >= skend && HH < (skend + dhue) && Chprov < (60.0f + dchr * 0.5f)) { float HHsk = ask * skend + bsk; float Hn = (skin_curve[HHsk] - bsk) / ask; float Hcc = (Hn * xx + skend * (1.0f - xx)); @@ -671,8 +671,8 @@ void ImProcFunctions::vibrance (LabImage* lab) //Munsell correction // float2 sincosval; - if(!avoidcolorshift && hhModified) { - sincosval = xsincosf(HH); + if (!avoidcolorshift && hhModified) { + sincosval = xsincosf (HH); } float aprovn, bprovn; @@ -681,18 +681,18 @@ void ImProcFunctions::vibrance (LabImage* lab) do { inGamut = true; - if(avoidcolorshift) { + if (avoidcolorshift) { float correctionHue = 0.0f; float correctlum = 0.0f; #ifdef _DEBUG - Color::AllMunsellLch(/*lumaMuns*/false, Lprov, Lprov, HH, Chprov, CC, correctionHue, correctlum, MunsDebugInfo); + Color::AllMunsellLch (/*lumaMuns*/false, Lprov, Lprov, HH, Chprov, CC, correctionHue, correctlum, MunsDebugInfo); #else - Color::AllMunsellLch(/*lumaMuns*/false, Lprov, Lprov, HH, Chprov, CC, correctionHue, correctlum); + Color::AllMunsellLch (/*lumaMuns*/false, Lprov, Lprov, HH, Chprov, CC, correctionHue, correctlum); #endif - if(correctionHue != 0.f || hhModified) { - sincosval = xsincosf(HH + correctionHue); + if (correctionHue != 0.f || hhModified) { + sincosval = xsincosf (HH + correctionHue); hhModified = false; } } @@ -703,14 +703,14 @@ void ImProcFunctions::vibrance (LabImage* lab) float fyy = (0.00862069f * Lprov ) + 0.137932f; float fxx = (0.002f * aprovn) + fyy; float fzz = fyy - (0.005f * bprovn); - float xx_ = 65535.f * Color::f2xyz(fxx) * Color::D50x; + float xx_ = 65535.f * Color::f2xyz (fxx) * Color::D50x; // float yy_ = 65535.0f * Color::f2xyz(fyy); - float zz_ = 65535.f * Color::f2xyz(fzz) * Color::D50z; + float zz_ = 65535.f * Color::f2xyz (fzz) * Color::D50z; float yy_ = 65535.f * ((Lprov > Color::epskap) ? fyy * fyy*fyy : Lprov / Color::kappa); - Color::xyz2rgb(xx_, yy_, zz_, R, G, B, wip); + Color::xyz2rgb (xx_, yy_, zz_, R, G, B, wip); - if(R < 0.0f || G < 0.0f || B < 0.0f) { + if (R < 0.0f || G < 0.0f || B < 0.0f) { #ifdef _DEBUG negsat++; #endif @@ -719,7 +719,7 @@ void ImProcFunctions::vibrance (LabImage* lab) } // if "highlight reconstruction" enabled don't control Gamut for highlights - if((!highlight) && (R > 65535.0f || G > 65535.0f || B > 65535.0f)) { + if ((!highlight) && (R > 65535.0f || G > 65535.0f || B > 65535.0f)) { #ifdef _DEBUG moresat++; #endif @@ -740,11 +740,11 @@ void ImProcFunctions::vibrance (LabImage* lab) t2e.set(); if (settings->verbose) { - printf("Vibrance (performed in %d usec):\n", t2e.etime(t1e)); - printf(" Gamut: G1negat=%iiter G165535=%iiter G2negsat=%iiter G265535=%iiter\n", negat, moreRGB, negsat, moresat); + printf ("Vibrance (performed in %d usec):\n", t2e.etime (t1e)); + printf (" Gamut: G1negat=%iiter G165535=%iiter G2negsat=%iiter G265535=%iiter\n", negat, moreRGB, negsat, moresat); if (MunsDebugInfo) { - printf(" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%u\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); + printf (" Munsell chrominance: MaxBP=%1.2frad MaxRY=%1.2frad MaxGY=%1.2frad MaxRP=%1.2frad depass=%u\n", MunsDebugInfo->maxdhue[0], MunsDebugInfo->maxdhue[1], MunsDebugInfo->maxdhue[2], MunsDebugInfo->maxdhue[3], MunsDebugInfo->depass); } } diff --git a/rtengine/ipwavelet.cc b/rtengine/ipwavelet.cc index ee8f10ad1..a5c9b6d7a 100644 --- a/rtengine/ipwavelet.cc +++ b/rtengine/ipwavelet.cc @@ -148,8 +148,8 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int // init variables to display Munsell corrections MunsellDebugInfo* MunsDebugInfo = new MunsellDebugInfo(); #endif - TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params->icm.working); - double wip[3][3] = { + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params->icm.working); + const double wip[3][3] = { {wiprof[0][0], wiprof[0][1], wiprof[0][2]}, {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, {wiprof[2][0], wiprof[2][1], wiprof[2][2]} @@ -250,7 +250,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int cp.edgampl = (float) params->wavelet.edgeampli; } - int N = imheight * imwidth; + //int N = imheight * imwidth; int maxmul = params->wavelet.thres; cp.maxilev = maxmul; static const float scales[10] = {1.f, 2.f, 4.f, 8.f, 16.f, 32.f, 64.f, 128.f, 256.f, 512.f}; @@ -537,7 +537,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int // begin tile processing of image //output buffer - int realtile; + int realtile = 0; if(params->wavelet.Tilesmethod == "big") { realtile = 22; @@ -699,7 +699,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int int width = tileright - tileleft; int height = tilebottom - tiletop; LabImage * labco; - float **Lold; + float **Lold = nullptr; float *LoldBuffer = nullptr; if(numtiles == 1) { // untiled processing => we can use output buffer for labco @@ -923,9 +923,8 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int ind = 1; //Flat curve for Contrast=f(H) in levels - FlatCurve* ChCurve = nullptr;//curve C=f(H) + FlatCurve* ChCurve = new FlatCurve(params->wavelet.Chcurve); //curve C=f(H) bool Chutili = false; - ChCurve = new FlatCurve(params->wavelet.Chcurve); if (!ChCurve || ChCurve->isIdentity()) { if (ChCurve) { @@ -953,9 +952,8 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } //Flat curve for H=f(H) in residual image - FlatCurve* hhCurve = nullptr;//curve H=f(H) + FlatCurve* hhCurve = new FlatCurve(params->wavelet.hhcurve); //curve H=f(H) bool hhutili = false; - hhCurve = new FlatCurve(params->wavelet.hhcurve); if (!hhCurve || hhCurve->isIdentity()) { if (hhCurve) { @@ -1058,7 +1056,7 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int } for (int i = 0; i < overlap; i++) { - float mask = SQR(sin((M_PI * i) / (2 * overlap))); + float mask = SQR(sin((rtengine::RT_PI * i) / (2 * overlap))); if (tiletop > 0) { Vmask[i] = mask; @@ -1253,17 +1251,22 @@ SSEFUNCTION void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int delete [] meanN; delete [] sigma; delete [] sigmaN; - + delete [] MaxP; + delete [] MaxN; } #ifdef _RT_NESTED_OPENMP omp_set_nested(oldNested); #endif - if(numtiles > 1) { + if(numtiles != 1) { dst->CopyFrom(dsttmp); delete dsttmp; } +#ifdef _DEBUG + delete MunsDebugInfo; +#endif + } #undef TS @@ -1653,7 +1656,7 @@ void ImProcFunctions::EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterat } - epd2.CompressDynamicRange(WavCoeffs_L0, (float)sca / skip, edgest, Compression, DetailBoost, Iterates, rew, WavCoeffs_L0); + epd2.CompressDynamicRange(WavCoeffs_L0, (float)sca / skip, edgest, Compression, DetailBoost, Iterates, rew); //Restore past range, also desaturate a bit per Mantiuk's Color correction for tone mapping. #ifdef _RT_NESTED_OPENMP @@ -2597,7 +2600,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit float bedstr = 1.f - 10.f * aedstr; if(cp.val > 0 && cp.edgeena) { - float * koe; + float * koe = nullptr; float maxkoe = 0.f; if(!lipschitz) { @@ -2766,7 +2769,7 @@ void ImProcFunctions::ContAllL (float *koeLi[12], float *maxkoeLi, bool lipschit float asig = 0.166f / sigma[level]; float bsig = 0.5f - asig * mean[level]; float amean = 0.5f / mean[level]; - float absciss; + float absciss = 0.f; float kinterm; float kmul; int borderL = 1; @@ -3399,14 +3402,18 @@ void ImProcFunctions::ContAllAB (LabImage * labco, int maxlvl, float ** varhue, } bool useOpacity; - float mulOpacity; + float mulOpacity = 0.f; if(useChannelA) { useOpacity = cp.opaRG; - mulOpacity = cp.mulopaRG[level]; + if(level < 9) { + mulOpacity = cp.mulopaRG[level]; + } } else { useOpacity = cp.opaBY; - mulOpacity = cp.mulopaBY[level]; + if(level < 9) { + mulOpacity = cp.mulopaBY[level]; + } } if((useOpacity && level < 9 && mulOpacity != 0.f) && cp.toningena) { //toning diff --git a/rtengine/klt/trackFeatures.cc b/rtengine/klt/trackFeatures.cc index 5930e2fcb..474d0f5f5 100644 --- a/rtengine/klt/trackFeatures.cc +++ b/rtengine/klt/trackFeatures.cc @@ -640,31 +640,31 @@ static void _am_getGradientWinAffine( } -/********************************************************************* - * _computeAffineMappedImage - * used only for DEBUG output - * -*/ - -static void _am_computeAffineMappedImage( - _KLT_FloatImage img, /* images */ - float x, float y, /* center of window */ - float Axx, float Ayx , float Axy, float Ayy, /* affine mapping */ - int width, int height, /* size of window */ - _FloatWindow imgdiff) /* output */ -{ - int hw = width/2, hh = height/2; - int i, j; - float mi, mj; - - /* Compute values */ - for (j = -hh ; j <= hh ; j++) - for (i = -hw ; i <= hw ; i++) { - mi = Axx * i + Axy * j; - mj = Ayx * i + Ayy * j; - *imgdiff++ = _interpolate(x+mi, y+mj, img); - } -} +///********************************************************************* +// * _computeAffineMappedImage +// * used only for DEBUG output +// * +//*/ +// +//static void _am_computeAffineMappedImage( +// _KLT_FloatImage img, /* images */ +// float x, float y, /* center of window */ +// float Axx, float Ayx , float Axy, float Ayy, /* affine mapping */ +// int width, int height, /* size of window */ +// _FloatWindow imgdiff) /* output */ +//{ +// int hw = width/2, hh = height/2; +// int i, j; +// float mi, mj; +// +// /* Compute values */ +// for (j = -hh ; j <= hh ; j++) +// for (i = -hw ; i <= hw ; i++) { +// mi = Axx * i + Axy * j; +// mj = Ayx * i + Ayy * j; +// *imgdiff++ = _interpolate(x+mi, y+mj, img); +// } +//} /********************************************************************* @@ -986,7 +986,7 @@ static int _am_trackFeatureAffine( _FloatWindow imgdiff, gradx, grady; - float gxx, gxy, gyy, ex, ey, dx, dy; + float gxx, gxy, gyy, ex, ey, dx = 0.f, dy = 0.f; int iteration = 0; int status = 0; int hw = width/2; @@ -1253,7 +1253,7 @@ void KLTTrackFeatures( pyramid2, pyramid2_gradx, pyramid2_grady; float subsampling = (float) tc->subsampling; float xloc, yloc, xlocout, ylocout; - int val; + int val = 0; int indx, r; KLT_BOOL floatimg1_created = FALSE; int i; diff --git a/rtengine/lcp.cc b/rtengine/lcp.cc index ce1a6c67e..c09d2d9be 100644 --- a/rtengine/lcp.cc +++ b/rtengine/lcp.cc @@ -16,103 +16,114 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ + +#include #include #include "lcp.h" -#include "iccmatrices.h" -#include "iccstore.h" -#include "rawimagesource.h" -#include "improcfun.h" -#include "rt_math.h" +#include #ifdef WIN32 #include -// for GCC32 -#ifndef _WIN32_IE -#define _WIN32_IE 0x0600 -#endif #include #endif +#include "settings.h" using namespace std; using namespace rtengine; -using namespace rtexif; -LCPModelCommon::LCPModelCommon() +namespace rtengine { + +extern const Settings* settings; + +} + +LCPModelCommon::LCPModelCommon() : + foc_len_x(-1.0f), + foc_len_y(-1.0f), + img_center_x(0.5f), + img_center_y(0.5f), + param{{}}, + scale_factor(1.0f), + mean_error(0.0), + bad_error(false), + x0(0.0f), + y0(0.0f), + fx(0.0f), + fy(0.0f), + rfx(0.0f), + rfy(0.0f), + vign_param{{}} { - focLenX = focLenY = -1; - imgXCenter = imgYCenter = 0.5; - x0 = y0 = fx = fy = meanErr = 0; - badErr = false; - - for (int i = 0; i < 5; i++) { - param[i] = 0; - } - - scaleFac = 1; } bool LCPModelCommon::empty() const { - return param[0] == 0 && param[1] == 0 && param[2] == 0; + return param[0] == 0.0f && param[1] == 0.0f && param[2] == 0.0f; } void LCPModelCommon::print() const { - printf("focLen %g/%g; imgCenter %g/%g; scale %g; err %g\n", focLenX, focLenY, imgXCenter, imgYCenter, scaleFac, meanErr); + printf("focLen %g/%g; imgCenter %g/%g; scale %g; err %g\n", foc_len_x, foc_len_y, img_center_x, img_center_y, scale_factor, mean_error); printf("xy0 %g/%g fxy %g/%g\n", x0, y0, fx, fy); printf("param: %g/%g/%g/%g/%g\n", param[0], param[1], param[2], param[3], param[4]); } -// weightened merge two parameters +// weighted merge two parameters void LCPModelCommon::merge(const LCPModelCommon& a, const LCPModelCommon& b, float facA) { - float facB = 1 - facA; + const float facB = 1.0f - facA; - focLenX = facA * a.focLenX + facB * b.focLenX; - focLenY = facA * a.focLenY + facB * b.focLenY; - imgXCenter = facA * a.imgXCenter + facB * b.imgXCenter; - imgYCenter = facA * a.imgYCenter + facB * b.imgYCenter; - scaleFac = facA * a.scaleFac + facB * b.scaleFac; - meanErr = facA * a.meanErr + facB * b.meanErr; + foc_len_x = facA * a.foc_len_x + facB * b.foc_len_x; + foc_len_y = facA * a.foc_len_y + facB * b.foc_len_y; + img_center_x = facA * a.img_center_x + facB * b.img_center_x; + img_center_y = facA * a.img_center_y + facB * b.img_center_y; + scale_factor = facA * a.scale_factor + facB * b.scale_factor; + mean_error = facA * a.mean_error + facB * b.mean_error; for (int i = 0; i < 5; i++) { param[i] = facA * a.param[i] + facB * b.param[i]; } + + const float param0Sqr = param[0] * param[0]; + + vign_param[0] = -param[0]; + vign_param[1] = param0Sqr - param[1]; + vign_param[2] = param0Sqr * param[0] - 2.0f * param[0] * param[1] + param[2]; + vign_param[3] = param0Sqr * param0Sqr + param[1] * param[1] + 2.0f * param[0] * param[2] - 3.0f * param0Sqr * param[1]; + } void LCPModelCommon::prepareParams(int fullWidth, int fullHeight, float focalLength, float focalLength35mm, float sensorFormatFactor, bool swapXY, bool mirrorX, bool mirrorY) { // Mention that the Adobe technical paper has a bug here, the DMAX is handled differently for focLen and imgCenter - int Dmax = fullWidth; - - if (fullHeight > fullWidth) { - Dmax = fullHeight; - } + const int Dmax = std::max(fullWidth, fullHeight); // correct focLens - if (focLenX < 0) { // they may not be given + if (foc_len_x < 0.0f) { // they may not be given // and 35mm may not be given either - if (focalLength35mm < 1) { + if (focalLength35mm < 1.0f) { focalLength35mm = focalLength * sensorFormatFactor; } - focLenX = focLenY = focalLength / ( 35 * focalLength / focalLength35mm); // focLen must be calculated in pixels + foc_len_x = foc_len_y = focalLength / (35.0f * focalLength / focalLength35mm); // focLen must be calculated in pixels } if (swapXY) { - x0 = (mirrorX ? 1. - imgYCenter : imgYCenter) * fullWidth; - y0 = (mirrorY ? 1. - imgXCenter : imgXCenter) * fullHeight; - fx = focLenY * Dmax; - fy = focLenX * Dmax; + x0 = (mirrorX ? 1.0f - img_center_y : img_center_y) * fullWidth; + y0 = (mirrorY ? 1.0f - img_center_x : img_center_x) * fullHeight; + fx = foc_len_y * Dmax; + fy = foc_len_x * Dmax; } else { - x0 = (mirrorX ? 1. - imgXCenter : imgXCenter) * fullWidth; - y0 = (mirrorY ? 1. - imgYCenter : imgYCenter) * fullHeight; - fx = focLenX * Dmax; - fy = focLenY * Dmax; + x0 = (mirrorX ? 1.0f - img_center_x : img_center_x) * fullWidth; + y0 = (mirrorY ? 1.0f - img_center_y : img_center_y) * fullHeight; + fx = foc_len_x * Dmax; + fy = foc_len_y * Dmax; } + rfx = 1.0f / fx; + rfy = 1.0f / fy; //printf("FW %i /X0 %g FH %i /Y0 %g %g\n",fullWidth,x0,fullHeight,y0, imgYCenter); } @@ -125,9 +136,9 @@ LCPPersModel::LCPPersModel() // mode: 0=distortion, 1=vignette, 2=CA bool LCPPersModel::hasModeData(int mode) const { - return (mode == 0 && !vignette.empty() && !vignette.badErr) || (mode == 1 && !base.empty() && !base.badErr) + return (mode == 0 && !vignette.empty() && !vignette.bad_error) || (mode == 1 && !base.empty() && !base.bad_error) || (mode == 2 && !chromRG.empty() && !chromG.empty() && !chromBG.empty() && - !chromRG.badErr && !chromG.badErr && !chromBG.badErr); + !chromRG.bad_error && !chromG.bad_error && !chromBG.bad_error); } void LCPPersModel::print() const @@ -161,7 +172,7 @@ void LCPPersModel::print() const // if !vignette then geometric and CA LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm, float focusDist, float aperture, bool vignette, bool useCADistP, - int fullWidth, int fullHeight, const CoarseTransformParams& coarse, int rawRotationDeg) + int fullWidth, int fullHeight, const CoarseTransformParams& coarse, int rawRotationDeg) :useCADist(false), swapXY(false), isFisheye(false), enableCA(false) { if (pProf == nullptr) { return; @@ -180,7 +191,9 @@ LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm swapXY = (rot == 90 || rot == 270); bool mirrorX = (rot == 90 || rot == 180); bool mirrorY = (rot == 180 || rot == 270); - //printf("Vign: %i, fullWidth: %i/%i, focLen %g SwapXY: %i / MirX/Y %i / %i on rot:%i from %i\n",vignette, fullWidth, fullHeight, focalLength, swapXY, mirrorX, mirrorY, rot, rawRotationDeg); + if (settings->verbose) { + printf("Vign: %i, fullWidth: %i/%i, focLen %g SwapXY: %i / MirX/Y %i / %i on rot:%i from %i\n",vignette, fullWidth, fullHeight, focalLength, swapXY, mirrorX, mirrorY, rot, rawRotationDeg); + } pProf->calcParams(vignette ? 0 : 1, focalLength, focusDist, aperture, &mc, nullptr, nullptr); mc.prepareParams(fullWidth, fullHeight, focalLength, focalLength35mm, pProf->sensorFormatFactor, swapXY, mirrorX, mirrorY); @@ -194,24 +207,52 @@ LCPMapper::LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm } enableCA = !vignette && focusDist > 0; + isFisheye = pProf->isFisheye; } -void LCPMapper::correctDistortion(double& x, double& y) const +void LCPMapper::correctDistortion(double& x, double& y, double scale) const { - double xd = (x - mc.x0) / mc.fx, yd = (y - mc.y0) / mc.fy; + if (isFisheye) { + double u = x * scale; + double v = y * scale; + double u0 = mc.x0 * scale; + double v0 = mc.y0 * scale; + double du = (u - u0); + double dv = (v - v0); + double fx = mc.fx; + double fy = mc.fy; + double k1 = mc.param[0]; + double k2 = mc.param[1]; + double r = sqrt(du * du + dv * dv); + double f = sqrt(fx*fy / (scale * scale)); + double th = atan2(r, f); + double th2 = th * th; + double cfact = (((k2 * th2 + k1) * th2 + 1) * th) / r; + double ud = cfact * fx * du + u0; + double vd = cfact * fy * dv + v0; - const float* aDist = mc.param; - double rsqr = xd * xd + yd * yd; - double xfac = aDist[swapXY ? 3 : 4], yfac = aDist[swapXY ? 4 : 3]; + x = ud; + y = vd; + } else { + x *= scale; + y *= scale; + double x0 = mc.x0 * scale; + double y0 = mc.y0 * scale; + double xd = (x - x0) / mc.fx, yd = (y - y0) / mc.fy; - double commonFac = (((aDist[2] * rsqr + aDist[1]) * rsqr + aDist[0]) * rsqr + 1.) - + 2. * (yfac * yd + xfac * xd); + const LCPModelCommon::Param aDist = mc.param; + double rsqr = xd * xd + yd * yd; + double xfac = aDist[swapXY ? 3 : 4], yfac = aDist[swapXY ? 4 : 3]; - double xnew = xd * commonFac + xfac * rsqr; - double ynew = yd * commonFac + yfac * rsqr; + double commonFac = (((aDist[2] * rsqr + aDist[1]) * rsqr + aDist[0]) * rsqr + 1.) + + 2. * (yfac * yd + xfac * xd); - x = xnew * mc.fx + mc.x0; - y = ynew * mc.fy + mc.y0; + double xnew = xd * commonFac + xfac * rsqr; + double ynew = yd * commonFac + yfac * rsqr; + + x = xnew * mc.fx + x0; + y = ynew * mc.fy + y0; + } } void LCPMapper::correctCA(double& x, double& y, int channel) const @@ -228,7 +269,7 @@ void LCPMapper::correctCA(double& x, double& y, int channel) const // Green contains main distortion, just like base if (useCADist) { - const float* aDist = chrom[1].param; + const LCPModelCommon::Param aDist = chrom[1].param; double rsqr = xd * xd + yd * yd; double xfac = aDist[swapXY ? 3 : 4], yfac = aDist[swapXY ? 4 : 3]; @@ -252,32 +293,79 @@ void LCPMapper::correctCA(double& x, double& y, int channel) const yd = ygreen; rsqr = xd * xd + yd * yd; - const float* aCA = chrom[channel].param; + const LCPModelCommon::Param aCA = chrom[channel].param; double xfac = aCA[swapXY ? 3 : 4], yfac = aCA[swapXY ? 4 : 3]; double commonSum = 1. + rsqr * (aCA[0] + rsqr * (aCA[1] + aCA[2] * rsqr)) + 2. * (yfac * yd + xfac * xd); - x = (chrom[channel].scaleFac * ( xd * commonSum + xfac * rsqr )) * chrom[channel].fx + chrom[channel].x0; - y = (chrom[channel].scaleFac * ( yd * commonSum + yfac * rsqr )) * chrom[channel].fy + chrom[channel].y0; + x = (chrom[channel].scale_factor * ( xd * commonSum + xfac * rsqr )) * chrom[channel].fx + chrom[channel].x0; + y = (chrom[channel].scale_factor * ( yd * commonSum + yfac * rsqr )) * chrom[channel].fy + chrom[channel].y0; } } -float LCPMapper::calcVignetteFac(int x, int y) const +SSEFUNCTION void LCPMapper::processVignetteLine(int width, int y, float *line) const { // No need for swapXY, since vignette is in RAW and always before rotation - double xd = ((double)x - mc.x0) / mc.fx, yd = ((double)y - mc.y0) / mc.fy; + float yd = ((float)y - mc.y0) * mc.rfy; + yd *= yd; + int x = 0; +#ifdef __SSE2__ + const vfloat fourv = F2V(4.f); + const vfloat zerov = F2V(0.f); + const vfloat ydv = F2V(yd); + const vfloat p0 = F2V(mc.vign_param[0]); + const vfloat p1 = F2V(mc.vign_param[1]); + const vfloat p2 = F2V(mc.vign_param[2]); + const vfloat p3 = F2V(mc.vign_param[3]); + const vfloat x0v = F2V(mc.x0); + const vfloat rfxv = F2V(mc.rfx); - const float* aVig = mc.param; - double rsqr = xd * xd + yd * yd; - double param0Sqr = aVig[0] * aVig[0]; - - return 1. + rsqr * (-aVig[0] + rsqr * ((param0Sqr - aVig[1]) - - (param0Sqr * aVig[0] - 2.*aVig[0] * aVig[1] + aVig[2]) * rsqr - + (param0Sqr * param0Sqr + aVig[1] * aVig[1] - + 2.*aVig[0] * aVig[2] - 3.*param0Sqr * aVig[1]) * rsqr * rsqr)); + vfloat xv = _mm_setr_ps(0.f, 1.f, 2.f, 3.f); + for (; x < width-3; x+=4) { + vfloat xdv = (xv - x0v) * rfxv; + vfloat rsqr = xdv * xdv + ydv; + vfloat vignFactorv = rsqr * (p0 + rsqr * (p1 - p2 * rsqr + p3 * rsqr * rsqr)); + vfloat valv = LVFU(line[x]); + valv += valv * vselfzero(vmaskf_gt(valv, zerov), vignFactorv); + STVFU(line[x], valv); + xv += fourv; + } +#endif // __SSE2__ + for (; x < width; x++) { + if (line[x] > 0) { + float xd = ((float)x - mc.x0) * mc.rfx; + const LCPModelCommon::VignParam vignParam = mc.vign_param; + float rsqr = xd * xd + yd; + line[x] += line[x] * rsqr * (vignParam[0] + rsqr * ((vignParam[1]) - (vignParam[2]) * rsqr + (vignParam[3]) * rsqr * rsqr)); + } + } } +SSEFUNCTION void LCPMapper::processVignetteLine3Channels(int width, int y, float *line) const +{ + // No need for swapXY, since vignette is in RAW and always before rotation + float yd = ((float)y - mc.y0) * mc.rfy; + yd *= yd; + const LCPModelCommon::VignParam vignParam = mc.vign_param; + for (int x = 0; x < width; x++) { + float xd = ((float)x - mc.x0) * mc.rfx; + float rsqr = xd * xd + yd; + float vignetteFactor = rsqr * (vignParam[0] + rsqr * ((vignParam[1]) - (vignParam[2]) * rsqr + (vignParam[3]) * rsqr * rsqr)); + for(int c = 0;c < 3; ++c) { + if (line[3*x+c] > 0) { + line[3*x+c] += line[3*x+c] * vignetteFactor; + } + } + } +} + + LCPProfile::LCPProfile(const Glib::ustring &fname) { + for (int i = 0; i < MaxPersModelCount; i++) { + aPersModel[i] = nullptr; + } + pCurPersModel = nullptr; + const int BufferSize = 8192; char buf[BufferSize]; @@ -295,36 +383,49 @@ LCPProfile::LCPProfile(const Glib::ustring &fname) isFisheye = inCamProfiles = firstLIDone = inPerspect = inAlternateLensID = inAlternateLensNames = false; sensorFormatFactor = 1; - for (int i = 0; i < MaxPersModelCount; i++) { - aPersModel[i] = nullptr; - } - persModelCount = 0; *inInvalidTag = 0; FILE *pFile = g_fopen(fname.c_str (), "rb"); - bool done; + if(pFile) { + bool done; - do { - int bytesRead = (int)fread(buf, 1, BufferSize, pFile); - done = feof(pFile); + do { + int bytesRead = (int)fread(buf, 1, BufferSize, pFile); + done = feof(pFile); - if (XML_Parse(parser, buf, bytesRead, done) == XML_STATUS_ERROR) { - throw "Invalid XML in LCP file"; - } - } while (!done); + if (XML_Parse(parser, buf, bytesRead, done) == XML_STATUS_ERROR) { + throw "Invalid XML in LCP file"; + } + } while (!done); - fclose(pFile); + fclose(pFile); + } XML_ParserFree(parser); - //printf("Parsing %s\n", fname.c_str()); + if (settings->verbose) { + printf("Parsing %s\n", fname.c_str()); + } // Two phase filter: first filter out the very rough ones, that distord the average a lot // force it, even if there are few frames (community profiles) - filterBadFrames(2.0, 0); +// filterBadFrames(2.0, 0); // from the non-distorded, filter again on new average basis, but only if there are enough frames left - filterBadFrames(1.5, 100); +// filterBadFrames(1.5, 100); +} + + +LCPProfile::~LCPProfile() +{ + if (pCurPersModel) { + delete pCurPersModel; + } + for (int i = 0; i < MaxPersModelCount; i++) { + if (aPersModel[i]) { + delete aPersModel[i]; + } + } } // from all frames not marked as bad already, take average and filter out frames with higher deviation than this if there are enough values @@ -336,17 +437,17 @@ int LCPProfile::filterBadFrames(double maxAvgDevFac, int minFramesLeft) for (int pm = 0; pm < MaxPersModelCount && aPersModel[pm]; pm++) { if (aPersModel[pm]->hasModeData(0)) { - errVignette += aPersModel[pm]->vignette.meanErr; + errVignette += aPersModel[pm]->vignette.mean_error; vignetteCount++; } if (aPersModel[pm]->hasModeData(1)) { - errBase += aPersModel[pm]->base.meanErr; + errBase += aPersModel[pm]->base.mean_error; baseCount++; } if (aPersModel[pm]->hasModeData(2)) { - errChrom += std::max(std::max(aPersModel[pm]->chromRG.meanErr, aPersModel[pm]->chromG.meanErr), aPersModel[pm]->chromBG.meanErr); + errChrom += rtengine::max(aPersModel[pm]->chromRG.mean_error, aPersModel[pm]->chromG.mean_error, aPersModel[pm]->chromBG.mean_error); chromCount++; } } @@ -369,25 +470,27 @@ int LCPProfile::filterBadFrames(double maxAvgDevFac, int minFramesLeft) // Now mark all the bad ones as bad, and hasModeData will return false; for (int pm = 0; pm < MaxPersModelCount && aPersModel[pm]; pm++) { - if (aPersModel[pm]->hasModeData(0) && aPersModel[pm]->vignette.meanErr > maxAvgDevFac * errVignette) { - aPersModel[pm]->vignette.badErr = true; + if (aPersModel[pm]->hasModeData(0) && aPersModel[pm]->vignette.mean_error > maxAvgDevFac * errVignette) { + aPersModel[pm]->vignette.bad_error = true; filtered++; } - if (aPersModel[pm]->hasModeData(1) && aPersModel[pm]->base.meanErr > maxAvgDevFac * errBase) { - aPersModel[pm]->base.badErr = true; + if (aPersModel[pm]->hasModeData(1) && aPersModel[pm]->base.mean_error > maxAvgDevFac * errBase) { + aPersModel[pm]->base.bad_error = true; filtered++; } if (aPersModel[pm]->hasModeData(2) && - (aPersModel[pm]->chromRG.meanErr > maxAvgDevFac * errChrom || aPersModel[pm]->chromG.meanErr > maxAvgDevFac * errChrom - || aPersModel[pm]->chromBG.meanErr > maxAvgDevFac * errChrom)) { - aPersModel[pm]->chromRG.badErr = aPersModel[pm]->chromG.badErr = aPersModel[pm]->chromBG.badErr = true; + (aPersModel[pm]->chromRG.mean_error > maxAvgDevFac * errChrom || aPersModel[pm]->chromG.mean_error > maxAvgDevFac * errChrom + || aPersModel[pm]->chromBG.mean_error > maxAvgDevFac * errChrom)) { + aPersModel[pm]->chromRG.bad_error = aPersModel[pm]->chromG.bad_error = aPersModel[pm]->chromBG.bad_error = true; filtered++; } } - //printf("Filtered %.1f%% frames for maxAvgDevFac %g leaving %i\n", filtered*100./(baseCount+chromCount+vignetteCount), maxAvgDevFac, baseCount+chromCount+vignetteCount-filtered); + if (settings->verbose) { + printf("Filtered %.1f%% frames for maxAvgDevFac %g leaving %i\n", filtered*100./(baseCount+chromCount+vignetteCount), maxAvgDevFac, baseCount+chromCount+vignetteCount-filtered); + } } return filtered; @@ -435,55 +538,66 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float float focDist = aPersModel[pm]->focDist; float focDistLog = log(focDist) + euler; double meanErr; - if (aPersModel[pm]->hasModeData(mode)) { - if (mode == 0) { - meanErr = aPersModel[pm]->vignette.meanErr; + double lowMeanErr, highMeanErr; + switch (mode) { + case 0: + meanErr = aPersModel[pm]->vignette.mean_error; + lowMeanErr = pLow->vignette.mean_error; + highMeanErr = pHigh->vignette.mean_error; + break; + case 1: + meanErr = aPersModel[pm]->base.mean_error; + lowMeanErr = pLow->base.mean_error; + highMeanErr = pHigh->base.mean_error; + break; + default: //case 2: + meanErr = aPersModel[pm]->chromG.mean_error; + lowMeanErr = pLow->chromG.mean_error; + highMeanErr = pHigh->chromG.mean_error; + break; + } - // by aperture (vignette), and max out focus distance - // tests showed doing this by log(aperture) is not as advisable + if (aperture > 0 && mode != 2) { if (aPersModel[pm]->focLen == bestFocLenLow && ( - (aper == aperture && pLow->vignette.meanErr > meanErr) - || (aper >= aperture && aper < pLow->aperture && pLow->aperture > aperture) + (aper == aperture && lowMeanErr > meanErr) + || (aper >= aperture && aper < pLow->aperture && pLow->aperture > aperture) || (aper <= aperture && (pLow->aperture > aperture || fabs(aperture - aper) < fabs(aperture - pLow->aperture))))) { pLow = aPersModel[pm]; } if (aPersModel[pm]->focLen == bestFocLenHigh && ( - (aper == aperture && pHigh->vignette.meanErr > meanErr) - || (aper <= aperture && aper > pHigh->aperture && pHigh->aperture < aperture) - || (aper >= aperture && (pHigh->aperture < aperture || fabs(aperture - aper) < fabs(aperture - pHigh->aperture))))) { + (aper == aperture && highMeanErr > meanErr) + || (aper <= aperture && aper > pHigh->aperture && pHigh->aperture < aperture) + || (aper >= aperture && (pHigh->aperture < aperture || fabs(aperture - aper) < fabs(aperture - pHigh->aperture))))) { + pHigh = aPersModel[pm]; + } + } else if (focusDist > 0 && mode != 0) { + // by focus distance + if (aPersModel[pm]->focLen == bestFocLenLow && ( + (focDist == focusDist && lowMeanErr > meanErr) + || (focDist >= focusDist && focDist < pLow->focDist && pLow->focDist > focusDist) + || (focDist <= focusDist && (pLow->focDist > focusDist || fabs(focusDistLog - focDistLog) < fabs(focusDistLog - (log(pLow->focDist) + euler)))))) { + pLow = aPersModel[pm]; + } + + if (aPersModel[pm]->focLen == bestFocLenHigh && ( + (focDist == focusDist && highMeanErr > meanErr) + || (focDist <= focusDist && focDist > pHigh->focDist && pHigh->focDist < focusDist) + || (focDist >= focusDist && (pHigh->focDist < focusDist || fabs(focusDistLog - focDistLog) < fabs(focusDistLog - (log(pHigh->focDist) + euler)))))) { pHigh = aPersModel[pm]; } } else { - meanErr = (mode == 1 ? aPersModel[pm]->base.meanErr : aPersModel[pm]->chromG.meanErr); + // no focus distance available, just error + if (aPersModel[pm]->focLen == bestFocLenLow && lowMeanErr > meanErr) { + pLow = aPersModel[pm]; + } - if (focusDist > 0) { - // by focus distance - if (aPersModel[pm]->focLen == bestFocLenLow && ( - (focDist == focusDist && (mode == 1 ? pLow->base.meanErr : pLow->chromG.meanErr) > meanErr) - || (focDist >= focusDist && focDist < pLow->focDist && pLow->focDist > focusDist) - || (focDist <= focusDist && (pLow->focDist > focusDist || fabs(focusDistLog - focDistLog) < fabs(focusDistLog - (log(pLow->focDist) + euler)))))) { - pLow = aPersModel[pm]; - } - - if (aPersModel[pm]->focLen == bestFocLenHigh && ( - (focDist == focusDist && (mode == 1 ? pHigh->base.meanErr : pHigh->chromG.meanErr) > meanErr) - || (focDist <= focusDist && focDist > pHigh->focDist && pHigh->focDist < focusDist) - || (focDist >= focusDist && (pHigh->focDist < focusDist || fabs(focusDistLog - focDistLog) < fabs(focusDistLog - (log(pHigh->focDist) + euler)))))) { - pHigh = aPersModel[pm]; - } - } else { - // no focus distance available, just error - if (aPersModel[pm]->focLen == bestFocLenLow && (mode == 1 ? pLow->base.meanErr : pLow->chromG.meanErr) > meanErr) { - pLow = aPersModel[pm]; - } - - if (aPersModel[pm]->focLen == bestFocLenHigh && (mode == 1 ? pHigh->base.meanErr : pHigh->chromG.meanErr) > meanErr) { - pHigh = aPersModel[pm]; - } + if (aPersModel[pm]->focLen == bestFocLenHigh && highMeanErr > meanErr) { + pHigh = aPersModel[pm]; } } + } } } @@ -527,9 +641,13 @@ void LCPProfile::calcParams(int mode, float focalLength, float focusDist, float break; } - //printf("LCP mode=%i, dist: %g found frames: Fno %g-%g; FocLen %g-%g; Dist %g-%g with weight %g\n", mode, focusDist, pLow->aperture, pHigh->aperture, pLow->focLen, pHigh->focLen, pLow->focDist, pHigh->focDist, facLow); + if (settings->verbose) { + printf("LCP mode=%i, dist: %g found frames: Fno %g-%g; FocLen %g-%g; Dist %g-%g with weight %g\n", mode, focusDist, pLow->aperture, pHigh->aperture, pLow->focLen, pHigh->focLen, pLow->focDist, pHigh->focDist, facLow); + } } else { - printf("Error: LCP file contained no %s parameters\n", mode == 0 ? "vignette" : mode == 1 ? "distortion" : "CA" ); + if (settings->verbose) { + printf("Error: LCP file contained no %s parameters\n", mode == 0 ? "vignette" : mode == 1 ? "distortion" : "CA" ); + } } } @@ -631,8 +749,10 @@ void XMLCALL LCPProfile::XmlStartHandler(void *pLCPProfile, const char *el, cons nameStart++; } - strcpy(pProf->lastTag, nameStart); - XmlTextHandler(pLCPProfile, attr[i + 1], strlen(attr[i + 1])); + strncpy(pProf->lastTag, nameStart, 255); + + pProf->handle_text(attr[i+1]); + //XmlTextHandler(pLCPProfile, attr[i + 1], strlen(attr[i + 1])); } } } @@ -645,25 +765,34 @@ void XMLCALL LCPProfile::XmlTextHandler(void *pLCPProfile, const XML_Char *s, in return; } + for (int i = 0; i < len; ++i) { + pProf->textbuf << s[i]; + } +} + + +void LCPProfile::handle_text(std::string text) +{ // Check if it contains non-whitespaces (there are several calls to this for one tag unfortunately) bool onlyWhiteSpace = true; - int i = 0; - - while (i < len && onlyWhiteSpace) { - onlyWhiteSpace = isspace(s[i]); - i++; + for (size_t i = 0; i < text.size(); ++i) { + if (!isspace(text[i])) { + onlyWhiteSpace = false; + break; + } } if (onlyWhiteSpace) { return; } + LCPProfile *pProf = this; + // convert to null terminated - char raw[len + 1]; - memcpy(raw, s, len); - raw[len] = 0; char* tag = pProf->lastTag; + const char* raw = text.c_str(); + // Common data section if (!pProf->firstLIDone) { // Generic tags are the same for all @@ -686,15 +815,12 @@ void XMLCALL LCPProfile::XmlTextHandler(void *pLCPProfile, const XML_Char *s, in // WARNING: called by different threads, that may run on different local settings, // so don't use system params if (atof("1,2345") == 1.2345) { - char* p = raw; - - while (*p) { - if (*p == '.') { - *p = ','; + for (size_t i = 0; i < text.size(); ++i) { + if (text[i] == '.') { + text[i] = ','; } - - p++; } + raw = text.c_str(); } if (!pProf->firstLIDone) { @@ -715,17 +841,17 @@ void XMLCALL LCPProfile::XmlTextHandler(void *pLCPProfile, const XML_Char *s, in // Section depended if (!strcmp("FocalLengthX", tag)) { - pProf->pCurCommon->focLenX = atof(raw); + pProf->pCurCommon->foc_len_x = atof(raw); } else if (!strcmp("FocalLengthY", tag)) { - pProf->pCurCommon->focLenY = atof(raw); + pProf->pCurCommon->foc_len_y = atof(raw); } else if (!strcmp("ImageXCenter", tag)) { - pProf->pCurCommon->imgXCenter = atof(raw); + pProf->pCurCommon->img_center_x = atof(raw); } else if (!strcmp("ImageYCenter", tag)) { - pProf->pCurCommon->imgYCenter = atof(raw); + pProf->pCurCommon->img_center_y = atof(raw); } else if (!strcmp("ScaleFactor", tag)) { - pProf->pCurCommon->scaleFac = atof(raw); + pProf->pCurCommon->scale_factor = atof(raw); } else if (!strcmp("ResidualMeanError", tag)) { - pProf->pCurCommon->meanErr = atof(raw); + pProf->pCurCommon->mean_error = atof(raw); } else if (!strcmp("RadialDistortParam1", tag) || !strcmp("VignetteModelParam1", tag)) { pProf->pCurCommon->param[0] = atof(raw); } else if (!strcmp("RadialDistortParam2", tag) || !strcmp("VignetteModelParam2", tag)) { @@ -743,6 +869,9 @@ void XMLCALL LCPProfile::XmlEndHandler(void *pLCPProfile, const char *el) { LCPProfile *pProf = static_cast(pLCPProfile); + pProf->handle_text(pProf->textbuf.str()); + pProf->textbuf.str(""); + // We ignore everything in dirty tag till it's gone if (*pProf->inInvalidTag) { if (strstr(el, pProf->inInvalidTag)) { @@ -784,6 +913,15 @@ LCPStore* LCPStore::getInstance() return &instance_; } + +LCPStore::~LCPStore() +{ + for (auto &p : profileCache) { + delete p.second; + } +} + + LCPProfile* LCPStore::getProfile (Glib::ustring filename) { if (filename.length() == 0 || !isValidLCPFileName(filename)) { @@ -800,7 +938,9 @@ LCPProfile* LCPStore::getProfile (Glib::ustring filename) // Add profile (if exists) profileCache[filename] = new LCPProfile(filename); - //profileCache[filename]->print(); + if (settings->verbose) { + profileCache[filename]->print(); + } return profileCache[filename]; } @@ -820,7 +960,6 @@ Glib::ustring LCPStore::getDefaultCommonDirectory() const #ifdef WIN32 WCHAR pathW[MAX_PATH] = {0}; - char pathA[MAX_PATH]; if (SHGetSpecialFolderPathW(NULL, pathW, CSIDL_COMMON_APPDATA, false)) { char pathA[MAX_PATH]; diff --git a/rtengine/lcp.h b/rtengine/lcp.h index 908bacf56..f7164117f 100644 --- a/rtengine/lcp.h +++ b/rtengine/lcp.h @@ -17,36 +17,53 @@ * along with RawTherapee. If not, see . */ -#ifndef _LCP_ -#define _LCP_ +#pragma once + +#include +#include +#include +#include + +#include +#include #include "imagefloat.h" -#include "../rtgui/threadutils.h" -#include -#include -#include -#include -#include +#include "opthelper.h" namespace rtengine { + // Perspective model common data, also used for Vignette and Fisheye -class LCPModelCommon +class LCPModelCommon final { public: - float focLenX, focLenY, imgXCenter, imgYCenter; - float param[5]; // k1..k5, resp. alpha1..5 - float scaleFac; // alpha0 - double meanErr; - bool badErr; - - double x0, y0, fx, fy; // prepared params - LCPModelCommon(); bool empty() const; // is it empty void print() const; // printf all values void merge(const LCPModelCommon& a, const LCPModelCommon& b, float facA); void prepareParams(int fullWidth, int fullHeight, float focalLength, float focalLength35mm, float sensorFormatFactor, bool swapXY, bool mirrorX, bool mirrorY); + +//private: + using Param = std::array; + using VignParam = std::array; + + float foc_len_x; + float foc_len_y; + float img_center_x; + float img_center_y; + Param param; // k1..k5, resp. alpha1..5 + float scale_factor; // alpha0 + double mean_error; + bool bad_error; + + // prepared params + float x0; + float y0; + float fx; + float fy; + float rfx; + float rfy; + VignParam vign_param; }; class LCPPersModel @@ -78,6 +95,9 @@ class LCPProfile int filterBadFrames(double maxAvgDevFac, int minFramesLeft); + void handle_text(std::string text); + std::ostringstream textbuf; + public: // Common data Glib::ustring profileName, lensPrettyName, cameraPrettyName, lens, camera; // lens/camera(=model) can be auto-matched with DNG @@ -90,6 +110,7 @@ public: LCPPersModel* aPersModel[MaxPersModelCount]; // Do NOT use std::list or something, it's buggy in GCC! explicit LCPProfile(const Glib::ustring &fname); + ~LCPProfile(); void calcParams(int mode, float focalLength, float focusDist, float aperture, LCPModelCommon *pCorr1, LCPModelCommon *pCorr2, LCPModelCommon *pCorr3) const; // Interpolates between the persModels frames @@ -104,6 +125,7 @@ class LCPStore std::map profileCache; public: + ~LCPStore(); Glib::ustring getDefaultCommonDirectory() const; bool isValidLCPFileName(Glib::ustring filename) const; LCPProfile* getProfile(Glib::ustring filename); @@ -122,6 +144,7 @@ class LCPMapper bool swapXY; LCPModelCommon mc; LCPModelCommon chrom[3]; // in order RedGreen/Green/BlueGreen + bool isFisheye; public: bool enableCA; // is the mapper capable if CA correction? @@ -130,9 +153,10 @@ public: LCPMapper(LCPProfile* pProf, float focalLength, float focalLength35mm, float focusDist, float aperture, bool vignette, bool useCADistP, int fullWidth, int fullHeight, const CoarseTransformParams& coarse, int rawRotationDeg); - void correctDistortion(double& x, double& y) const; // MUST be the first stage - void correctCA(double& x, double& y, int channel) const; - float calcVignetteFac (int x, int y) const; // MUST be in RAW + void correctDistortion(double& x, double& y, double scale) const; // MUST be the first stage + void correctCA(double& x, double& y, int channel) const; + void processVignetteLine(int width, int y, float *line) const; + void processVignetteLine3Channels(int width, int y, float *line) const; }; + } -#endif diff --git a/rtengine/median.h b/rtengine/median.h index 971452bc3..30adbacb3 100644 --- a/rtengine/median.h +++ b/rtengine/median.h @@ -64,6 +64,15 @@ inline vfloat median(std::array array) } #endif + +template +inline T median(std::array array) +{ + float val1 = std::max(std::min(array[0], array[1]), std::min(array[2], array[3])); + float val2 = std::min(std::max(array[0], array[1]), std::max(array[2], array[3])); + return (val1 + val2) / 2.f; +} + template inline T median(std::array array) { diff --git a/rtengine/myfile.cc b/rtengine/myfile.cc index 11a5b495b..903fd8354 100644 --- a/rtengine/myfile.cc +++ b/rtengine/myfile.cc @@ -19,9 +19,6 @@ #include "myfile.h" #include #include -#ifdef BZIP_SUPPORT -#include -#endif // get mmap() sorted out #ifdef MYFILE_MMAP @@ -116,85 +113,6 @@ IMFILE* fopen (const char* fname) mf->data = (char*)data; mf->eof = false; -#ifdef BZIP_SUPPORT - { - bool bzip = false; - Glib::ustring bname = Glib::path_get_basename(fname); - size_t lastdot = bname.find_last_of ('.'); - - if (lastdot != bname.npos) { - bzip = bname.substr (lastdot).casefold() == Glib::ustring(".bz2").casefold(); - } - - if (bzip) { - int ret; - - // initialize bzip stream structure - bz_stream stream; - stream.bzalloc = nullptr; - stream.bzfree = nullptr; - stream.opaque = nullptr; - ret = BZ2_bzDecompressInit(&stream, 0, 0); - - if (ret != BZ_OK) { - printf("bzip initialization failed with error %d\n", ret); - } else { - // allocate initial buffer for decompressed data - unsigned int buffer_out_count = 0; // bytes of decompressed data - unsigned int buffer_size = 10 * 1024 * 1024; // 10 MB, extended dynamically if needed - char* buffer = nullptr; - - stream.next_in = mf->data; // input data address - stream.avail_in = mf->size; - - while (ret == BZ_OK) { - buffer = static_cast( realloc(buffer, buffer_size)); // allocate/resize buffer - - if (!buffer) { - free(buffer); - } - - stream.next_out = buffer + buffer_out_count; // output data adress - stream.avail_out = buffer_size - buffer_out_count; - - ret = BZ2_bzDecompress(&stream); - - buffer_size *= 2; // increase buffer size for next iteration - buffer_out_count = stream.total_out_lo32; - - if (stream.total_out_hi32 > 0) { - printf("bzip decompressed data byte count high byte is nonzero: %d\n", stream.total_out_hi32); - } - } - - if (ret == BZ_STREAM_END) { - //delete [] mf->data; - // close memory mapping, setting fd -1 will ensure deletion of mf->data upon fclose() - mf->fd = -1; - munmap((void*)mf->data, mf->size); - close(mf->fd); - - char* realData = new char [buffer_out_count]; - memcpy(realData, buffer, buffer_out_count); - - mf->data = realData; - mf->size = buffer_out_count; - } else { - printf("bzip decompression failed with error %d\n", ret); - } - - // cleanup - free(buffer); - ret = BZ2_bzDecompressEnd(&stream); - - if (ret != BZ_OK) { - printf("bzip cleanup failed with error %d\n", ret); - } - } - } - } -#endif // BZIP_SUPPORT - return mf; } @@ -247,79 +165,6 @@ IMFILE* gfopen (const char* fname) mf->pos = 0; mf->eof = false; -#ifdef BZIP_SUPPORT - { - bool bzip = false; - Glib::ustring bname = Glib::path_get_basename(fname); - size_t lastdot = bname.find_last_of ('.'); - - if (lastdot != bname.npos) { - bzip = bname.substr (lastdot).casefold() == Glib::ustring(".bz2").casefold(); - } - - if (bzip) { - int ret; - - // initialize bzip stream structure - bz_stream stream; - stream.bzalloc = 0; - stream.bzfree = 0; - stream.opaque = 0; - ret = BZ2_bzDecompressInit(&stream, 0, 0); - - if (ret != BZ_OK) { - printf("bzip initialization failed with error %d\n", ret); - } else { - // allocate initial buffer for decompressed data - unsigned int buffer_out_count = 0; // bytes of decompressed data - unsigned int buffer_size = 10 * 1024 * 1024; // 10 MB, extended dynamically if needed - char* buffer = 0; - - stream.next_in = mf->data; // input data address - stream.avail_in = mf->size; - - while (ret == BZ_OK) { - buffer = static_cast( realloc(buffer, buffer_size)); // allocate/resize buffer - - if (!buffer) { - free(buffer); - } - - stream.next_out = buffer + buffer_out_count; // output data adress - stream.avail_out = buffer_size - buffer_out_count; - - ret = BZ2_bzDecompress(&stream); - - buffer_size *= 2; // increase buffer size for next iteration - buffer_out_count = stream.total_out_lo32; - - if (stream.total_out_hi32 > 0) { - printf("bzip decompressed data byte count high byte is nonzero: %d\n", stream.total_out_hi32); - } - } - - if (ret == BZ_STREAM_END) { - delete [] mf->data; - char* realData = new char [buffer_out_count]; - memcpy(realData, buffer, buffer_out_count); - - mf->data = realData; - mf->size = buffer_out_count; - } else { - printf("bzip decompression failed with error %d\n", ret); - } - - // cleanup - free(buffer); - ret = BZ2_bzDecompressEnd(&stream); - - if (ret != BZ_OK) { - printf("bzip cleanup failed with error %d\n", ret); - } - } - } - } -#endif // BZIP_SUPPORT return mf; } #endif //MYFILE_MMAP @@ -361,10 +206,10 @@ int fscanf (IMFILE* f, const char* s ...) // of file data and vsscanf() won't tell us how many characters that // were parsed. However, only dcraw.cc code use it and only for "%f" and // "%d", so we make a dummy fscanf here just to support dcraw case. - char buf[50], *endptr = nullptr; + char buf[51], *endptr = nullptr; int copy_sz = f->size - f->pos; - if (copy_sz > sizeof(buf)) { + if (copy_sz >= static_cast(sizeof(buf))) { copy_sz = sizeof(buf) - 1; } diff --git a/rtengine/myfile.h b/rtengine/myfile.h index 771dd7b84..e4609c697 100644 --- a/rtengine/myfile.h +++ b/rtengine/myfile.h @@ -68,7 +68,10 @@ inline void fseek (IMFILE* f, int p, int how) } else if (how == SEEK_CUR) { f->pos += p; } else if (how == SEEK_END) { - f->pos = f->size + p; + if(p <= 0 && -p <= f->size) { + f->pos = f->size + p; + } + return; } if (f->pos < 0 || f->pos > f->size) { diff --git a/rtengine/opthelper.h b/rtengine/opthelper.h index bee97f6b2..5e9b97931 100644 --- a/rtengine/opthelper.h +++ b/rtengine/opthelper.h @@ -55,7 +55,7 @@ #define RESTRICT __restrict__ #define LIKELY(x) __builtin_expect (!!(x), 1) #define UNLIKELY(x) __builtin_expect (!!(x), 0) - #if ((__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ > 4) && (!defined(WIN32) || defined( __x86_64__ )) + #if (!defined(WIN32) || defined( __x86_64__ )) #define ALIGNED64 __attribute__ ((aligned (64))) #define ALIGNED16 __attribute__ ((aligned (16))) #else // there is a bug in gcc 4.7.x when using openmp and aligned memory and -O3, also needed for WIN32 builds @@ -69,7 +69,7 @@ #define ALIGNED64 #define ALIGNED16 #endif - #if !defined(__clang__) && defined _OPENMP + #if defined _OPENMP #define _RT_NESTED_OPENMP #endif #endif diff --git a/rtengine/pipettebuffer.cc b/rtengine/pipettebuffer.cc index 6f6d9dcef..8981b6480 100644 --- a/rtengine/pipettebuffer.cc +++ b/rtengine/pipettebuffer.cc @@ -28,12 +28,6 @@ PipetteBuffer::PipetteBuffer(::EditDataProvider *dataProvider) : PipetteBuffer::~PipetteBuffer() { flush(); -#ifndef NDEBUG - imgFloatBuffer = (Imagefloat*)(0xbaadf00d); -#endif -#ifndef NDEBUG - LabBuffer = (LabImage*)(0xbaadf00d); -#endif } void PipetteBuffer::createBuffer(int width, int height) diff --git a/rtengine/pixelshift.cc b/rtengine/pixelshift.cc new file mode 100644 index 000000000..5a7e88f1c --- /dev/null +++ b/rtengine/pixelshift.cc @@ -0,0 +1,938 @@ +//////////////////////////////////////////////////////////////// +// +// Algorithm for Pentax Pixel Shift raw files with motion detection +// +// Copyright (C) 2016 - 2017 Ingo Weyrich +// +// +// pixelshift.cc is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +//////////////////////////////////////////////////////////////// + +#include +#include "rawimagesource.h" +#include "../rtgui/multilangmgr.h" +#include "procparams.h" +#include "gauss.h" +#include "median.h" + +namespace +{ + +float greenDiff(float a, float b, float stddevFactor, float eperIso, float nreadIso, float prnu) +{ + // calculate the difference between two green samples + float gDiff = a - b; + gDiff *= eperIso; + gDiff *= gDiff; + float avg = (a + b) * 0.5f; + avg *= eperIso; + prnu *= avg; + float stddev = stddevFactor * (avg + nreadIso + prnu * prnu); + return gDiff - stddev; +} + +float nonGreenDiffCross(float right, float left, float top, float bottom, float centre, float clippedVal, float stddevFactor, float eperIso, float nreadIso, float prnu) +{ + if(rtengine::max(right, left, top, bottom, centre) > clippedVal) { + return 0.f; + } + + // check non green cross + float hDiff = (right + left) * 0.5f - centre; + hDiff *= eperIso; + hDiff *= hDiff; + float vDiff = (top + bottom) * 0.5f - centre; + vDiff *= eperIso; + vDiff *= vDiff; + float avg = ((right + left) + (top + bottom)) * 0.25f; + avg *= eperIso; + prnu *= avg; + float stddev = stddevFactor * (avg + nreadIso + prnu * prnu); + return std::min(hDiff, vDiff) - stddev; +} + +void paintMotionMask(int index, bool showMotion, bool showOnlyMask, float *maskDest, float *nonMaskDest0, float *nonMaskDest1) +{ + if(showMotion) { + if(!showOnlyMask) { + // if showMotion is enabled colourize the pixel + maskDest[index] = 13500.f; + nonMaskDest1[index] = nonMaskDest0[index] = 0.f; + } else { + maskDest[index] = nonMaskDest0[index] = nonMaskDest1[index] = 65535.f; + } + } +} + +void invertMask(int xStart, int xEnd, int yStart, int yEnd, const array2D &maskIn, array2D &maskOut) +{ +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for(int i = yStart; i < yEnd; ++i) { +#ifdef _OPENMP + #pragma omp simd +#endif + + for(int j = xStart; j < xEnd; ++j) { + maskOut[i][j] = ~maskIn[i][j]; + } + } +} + +void xorMasks(int xStart, int xEnd, int yStart, int yEnd, const array2D &maskIn, array2D &maskOut) +{ +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for(int i = yStart; i < yEnd; ++i) { +#ifdef _OPENMP + #pragma omp simd +#endif + + for(int j = xStart; j < xEnd; ++j) { + maskOut[i][j] ^= maskIn[i][j]; + } + } +} + +void floodFill4Impl(int y, int x, int xStart, int xEnd, int yStart, int yEnd, array2D &mask, std::stack, std::vector>> &coordStack) +{ + coordStack.emplace(x, y); + + while(!coordStack.empty()) { + auto coord = coordStack.top(); + coordStack.pop(); + auto x = coord.first, y = coord.second; + + if(mask[y][x] == 255) { + auto yUp = y - 1, yDown = y + 1; + bool lastXUp = false, lastXDown = false, firstXUp = false, firstXDown = false; + mask[y][x] = 0; + + if(yUp >= yStart && mask[yUp][x] == 255) { + coordStack.emplace(x, yUp); + firstXUp = lastXUp = true; + } + + if(yDown < yEnd && mask[yDown][x] == 255) { + coordStack.emplace(x, yDown); + firstXDown = lastXDown = true; + } + + auto xr = x + 1; + + while(xr < xEnd && mask[y][xr] == 255) { + mask[y][xr] = 0; + + if(yUp >= yStart && mask[yUp][xr] == 255) { + if(!lastXUp) { + coordStack.emplace(xr, yUp); + lastXUp = true; + } + } else { + lastXUp = false; + } + + if(yDown < yEnd && mask[yDown][xr] == 255) { + if(!lastXDown) { + coordStack.emplace(xr, yDown); + lastXDown = true; + } + } else { + lastXDown = false; + } + + xr++; + } + + auto xl = x - 1; + lastXUp = firstXUp; + lastXDown = firstXDown; + + while(xl >= xStart && mask[y][xl] == 255) { + mask[y][xl] = 0; + + if(yUp >= yStart && mask[yUp][xl] == 255) { + if(!lastXUp) { + coordStack.emplace(xl, yUp); + lastXUp = true; + } + } else { + lastXUp = false; + } + + if(yDown < yEnd && mask[yDown][xl] == 255) { + if(!lastXDown) { + coordStack.emplace(xl, yDown); + lastXDown = true; + } + } else { + lastXDown = false; + } + + xl--; + } + + mask[y][x] = 0; + } + } +} + +void floodFill4(int xStart, int xEnd, int yStart, int yEnd, array2D &mask) +{ +#ifdef _OPENMP + #pragma omp parallel +#endif + { + std::stack, std::vector>> coordStack; + +#ifdef _OPENMP + #pragma omp for schedule(dynamic,128) nowait +#endif + + for(uint16_t i = yStart; i < yEnd; i++) + { + floodFill4Impl(i, xStart, xStart, xEnd, yStart, yEnd, mask, coordStack); + } + +#ifdef _OPENMP + #pragma omp for schedule(dynamic,128) nowait +#endif + + for(int16_t i = yEnd - 1; i >= 0 ; i--) + { + floodFill4Impl(i, xEnd - 1, xStart, xEnd, yStart, yEnd, mask, coordStack); + } + +#ifdef _OPENMP + #pragma omp sections nowait +#endif + { +#ifdef _OPENMP + #pragma omp section +#endif + { + uint16_t i = yStart; + + for(uint16_t j = xStart; j < xEnd; j++) + { + floodFill4Impl(i, j, xStart, xEnd, yStart, yEnd, mask, coordStack); + } + } +#ifdef _OPENMP + #pragma omp section +#endif + { + uint16_t i = yStart; + + for(uint16_t j = xEnd - 1; j >= xStart; j--) + { + floodFill4Impl(i, j, xStart, xEnd, yStart, yEnd, mask, coordStack); + } + } +#ifdef _OPENMP + #pragma omp section +#endif + { + uint16_t i = yEnd; + + for(uint16_t j = xStart; j < xEnd; j++) + { + floodFill4Impl(i, j, xStart, xEnd, yStart, yEnd, mask, coordStack); + } + } +#ifdef _OPENMP + #pragma omp section +#endif + { + uint16_t i = yEnd; + + for(uint16_t j = xEnd - 1; j >= xStart; j--) + { + floodFill4Impl(i, j, xStart, xEnd, yStart, yEnd, mask, coordStack); + } + } + } + } +} + +void calcFrameBrightnessFactor(unsigned int frame, uint32_t datalen, LUT *histo[4], float brightnessFactor[4]) +{ + float medians[4]; + + for(int i = 0; i < 4; ++i) { + //find median of histogram + uint32_t median = 0, count = 0; + + while(count < datalen / 2) { + count += (*histo[i])[median]; + ++median; + } + + const float weight = (count - datalen / 2.f) / (*histo[i])[median - 1]; + medians[i] = rtengine::intp(weight, (float)(median - 2), (float)(median - 1)); + } + + for(int i = 0; i < 4; ++i) { + brightnessFactor[i] = medians[frame] / medians[i]; + } + +} + + +} + +using namespace std; +using namespace rtengine; +void RawImageSource::pixelshift(int winx, int winy, int winw, int winh, const RAWParams::BayerSensor &bayerParamsIn, unsigned int frame, const std::string &model, float rawWpCorrection) +{ + + if(numFrames != 4) { // fallback for non pixelshift files + amaze_demosaic_RT(winx, winy, winw, winh, rawData, red, green, blue); + return; + } + + RAWParams::BayerSensor bayerParams = bayerParamsIn; + + bayerParams.pixelShiftAutomatic = true; + + if(bayerParams.pixelShiftMotionCorrectionMethod == RAWParams::BayerSensor::Automatic) { + bool pixelShiftEqualBright = bayerParams.pixelShiftEqualBright; + bayerParams.setPixelShiftDefaults(); + bayerParams.pixelShiftEqualBright = pixelShiftEqualBright; + } else if(bayerParams.pixelShiftMotionCorrectionMethod == RAWParams::BayerSensor::Off) { + bayerParams.pixelShiftAutomatic = false; + bayerParams.pixelShiftShowMotion = false; + } + + const bool showMotion = bayerParams.pixelShiftShowMotion; + const bool showOnlyMask = bayerParams.pixelShiftShowMotionMaskOnly && showMotion; + + if(bayerParams.pixelShiftAutomatic) { + if(!showOnlyMask) { + if(bayerParams.pixelShiftMedian) { // We need the amaze demosaiced frames for motion correction + if(bayerParams.pixelShiftLmmse) { + lmmse_interpolate_omp(winw, winh, *(rawDataFrames[0]), red, green, blue, bayerParams.lmmse_iterations); + } else { + amaze_demosaic_RT(winx, winy, winw, winh, *(rawDataFrames[0]), red, green, blue); + } + + multi_array2D redTmp(winw, winh); + multi_array2D greenTmp(winw, winh); + multi_array2D blueTmp(winw, winh); + + for(int i = 0; i < 3; i++) { + if(bayerParams.pixelShiftLmmse) { + lmmse_interpolate_omp(winw, winh, *(rawDataFrames[i + 1]), redTmp[i], greenTmp[i], blueTmp[i], bayerParams.lmmse_iterations); + } else { + amaze_demosaic_RT(winx, winy, winw, winh, *(rawDataFrames[i + 1]), redTmp[i], greenTmp[i], blueTmp[i]); + } + } + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for(int i = winy + border; i < winh - border; i++) { + for(int j = winx + border; j < winw - border; j++) { + red[i][j] = median(red[i][j], redTmp[0][i + 1][j], redTmp[1][i + 1][j + 1], redTmp[2][i][j + 1]); + } + + for(int j = winx + border; j < winw - border; j++) { + green[i][j] = median(green[i][j], greenTmp[0][i + 1][j], greenTmp[1][i + 1][j + 1], greenTmp[2][i][j + 1]); + } + + for(int j = winx + border; j < winw - border; j++) { + blue[i][j] = median(blue[i][j], blueTmp[0][i + 1][j], blueTmp[1][i + 1][j + 1], blueTmp[2][i][j + 1]); + } + } + } else { + if(bayerParams.pixelShiftLmmse) { + lmmse_interpolate_omp(winw, winh, rawData, red, green, blue, bayerParams.lmmse_iterations); + } else { + amaze_demosaic_RT(winx, winy, winw, winh, rawData, red, green, blue); + } + } + } + } + + const bool adaptive = bayerParams.pixelShiftAutomatic; + constexpr float stddevFactorGreen = 25.f; + constexpr float stddevFactorRed = 25.f; + constexpr float stddevFactorBlue = 25.f; + constexpr float prnu = 0.01f; + constexpr float redBlueWeight = 0.7f + 1.f; + float eperIso = bayerParams.pixelShiftEperIso; + const bool checkNonGreenCross = bayerParams.pixelShiftNonGreenCross; + const bool checkGreen = bayerParams.pixelShiftGreen; + constexpr float greenWeight = 2.f; + const bool blurMap = bayerParams.pixelShiftBlur; + const float sigma = bayerParams.pixelShiftSigma; + constexpr float threshold = 3.f + 9.f; + const bool holeFill = bayerParams.pixelShiftHoleFill; + const bool equalBrightness = bayerParams.pixelShiftEqualBright; + const bool equalChannel = bayerParams.pixelShiftEqualBrightChannel; + const bool smoothTransitions = blurMap && bayerParams.pixelShiftSmoothFactor > 0. && !showOnlyMask; + const float smoothFactor = 1.0 - bayerParams.pixelShiftSmoothFactor; + + static const float nReadK3II[] = { 3.4f, // ISO 100 + 3.1f, // ISO 125 + 2.5f, // ISO 160 + 2.5f, // ISO 200 + 2.5f, // ISO 250 + 2.5f, // ISO 320 + 2.3f, // ISO 400 + 2.5f, // ISO 500 + 2.3f, // ISO 640 + 2.3f, // ISO 800 + 2.4f, // ISO 1000 + 2.3f, // ISO 1250 + 1.75f, // ISO 1600 + 1.75f, // ISO 2000 + 1.75f, // ISO 2500 + 1.75f, // ISO 3200 + 1.75f, // ISO 4000 + 1.75f, // ISO 5000 + 1.75f, // ISO 6400 + 1.75f, // ISO 8000 + 1.75f, // ISO 10000 + 1.5f, // ISO 12800 + 1.5f, // ISO 16000 + 1.5f, // ISO 20000 + 1.5f, // ISO 25600 + 1.5f, // ISO 32000 + 1.5f, // ISO 40000 + 1.5f // ISO 51200 + }; + + static const float ePerIsoK3II = 0.35f; + + static const float nReadK1[] = { 3.45f, // ISO 100 + 3.15f, // ISO 125 + 3.45f, // ISO 160 + 3.0f, // ISO 200 + 3.0f, // ISO 250 + 3.0f, // ISO 320 + 2.7f, // ISO 400 + 2.7f, // ISO 500 + 2.7f, // ISO 640 + 2.5f, // ISO 800 + 2.5f, // ISO 1000 + 2.5f, // ISO 1250 + 2.4f, // ISO 1600 + 2.4f, // ISO 2000 + 2.4f, // ISO 2500 + 2.4f, // ISO 3200 + 2.4f, // ISO 4000 + 2.4f, // ISO 5000 + 2.4f, // ISO 6400 + 2.4f, // ISO 8000 + 2.4f, // ISO 10000 + 2.4f, // ISO 12800 + 2.4f, // ISO 16000 + 2.4f, // ISO 20000 + 2.4f, // ISO 25600 + 2.4f, // ISO 32000 + 2.4f, // ISO 40000 + 2.4f, // ISO 51200 + 2.4f, // ISO 64000 + 2.4f, // ISO 80000 + 2.4f, // ISO 102400 + 2.4f, // ISO 128000 + 2.4f, // ISO 160000 + 2.4f // ISO 204800 + }; + + static const float ePerIsoK1 = 0.75f; + + // currently nReadK70 is used for K-70 and KP + static const float nReadK70[] = { 4.0f, // ISO 100 + 4.0f, // ISO 125 + 4.0f, // ISO 160 + 4.0f, // ISO 200 + 4.0f, // ISO 250 + 4.0f, // ISO 320 + 4.0f, // ISO 400 + 4.0f, // ISO 500 + 4.0f, // ISO 640 + 3.0f, // ISO 800 + 3.0f, // ISO 1000 + 3.0f, // ISO 1250 + 3.0f, // ISO 1600 + 3.0f, // ISO 2000 + 3.0f, // ISO 2500 + 3.0f, // ISO 3200 + 3.0f, // ISO 4000 + 3.0f, // ISO 5000 + 3.0f, // ISO 6400 + 3.0f, // ISO 8000 + 3.0f, // ISO 10000 + 3.0f, // ISO 12800 + 3.0f, // ISO 16000 + 3.0f, // ISO 20000 + 3.0f, // ISO 25600 + 3.0f, // ISO 32000 + 3.0f, // ISO 40000 + 3.0f, // ISO 51200 + 3.0f, // ISO 64000 + 3.0f, // ISO 80000 + 3.0f, // ISO 102400 + 3.0f, // ISO 128000 + 3.0f, // ISO 160000 + 3.0f, // ISO 204800 + 3.0f, // ISO 256000 + 3.0f, // ISO 320000 + 3.0f, // ISO 409600 + 3.0f, // ISO 512000 + 3.0f, // ISO 640000 + 3.0f // ISO 819200 + }; + + static const float ePerIsoK70 = 0.5f; + + if(plistener) { + plistener->setProgressStr(Glib::ustring::compose(M("TP_RAW_DMETHOD_PROGRESSBAR"), RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::pixelshift])); + plistener->setProgress(0.0); + } + + if(adaptive && blurMap && smoothFactor == 0.f && !showMotion) { + if(plistener) { + plistener->setProgress(1.0); + } + + return; + } + + const float scaleGreen = 1.f / scale_mul[1]; + + float nRead; + float eperIsoModel; + + int nReadIndex = static_cast(round(log2(idata->getISOSpeed() / 100.f) * 3.f)); + + if(model.find("K-3") != string::npos) { + nRead = nReadK3II[nReadIndex]; + eperIsoModel = ePerIsoK3II; + } else if(model.find("K-1") != string::npos) { + nRead = nReadK1[nReadIndex]; + eperIsoModel = ePerIsoK1; + } else { // as long as we don't have values for Pentax KP, we use the values from K-70 + nRead = nReadK70[nReadIndex]; + eperIsoModel = ePerIsoK70; + } + + eperIsoModel *= pow(2.f, eperIso); + + eperIso = eperIsoModel * (100.f / (rawWpCorrection * idata->getISOSpeed())); + + const float eperIsoRed = (eperIso / scale_mul[0]) * (65535.f / (c_white[0] - c_black[0])); + const float eperIsoGreen = (eperIso * scaleGreen) * (65535.f / (c_white[1] - c_black[1])); + const float eperIsoBlue = (eperIso / scale_mul[2]) * (65535.f / (c_white[2] - c_black[2])); + + const float clippedRed = 65535.f / scale_mul[0]; + const float clippedBlue = 65535.f / scale_mul[2]; + + nRead *= nRead; + + // calculate average green brightness for each frame + float greenBrightness[4] = {1.f, 1.f, 1.f, 1.f}; + float redBrightness[4] = {1.f, 1.f, 1.f, 1.f}; + float blueBrightness[4] = {1.f, 1.f, 1.f, 1.f}; + + if(equalBrightness) { + if(rawDirty) { + LUT *histogreen[4]; + LUT *histored[4]; + LUT *histoblue[4]; + + for(int i = 0; i < 4; ++i) { + histogreen[i] = new LUT(65536); + histogreen[i]->clear(); + histored[i] = new LUT(65536); + histored[i]->clear(); + histoblue[i] = new LUT(65536); + histoblue[i]->clear(); + } + +#ifdef _OPENMP + #pragma omp parallel +#endif + { + LUT *histogreenThr[4]; + LUT *historedThr[4]; + LUT *histoblueThr[4]; + + for(int i = 0; i < 4; ++i) { + histogreenThr[i] = new LUT(65536); + histogreenThr[i]->clear(); + historedThr[i] = new LUT(65536); + historedThr[i]->clear(); + histoblueThr[i] = new LUT(65536); + histoblueThr[i]->clear(); + } + +#ifdef _OPENMP + #pragma omp for schedule(dynamic,16) nowait +#endif + + for(int i = winy + 1; i < winh - 1; ++i) { + int j = winx + 1; + int c = FC(i, j); + + bool bluerow = (c + FC(i, j + 1)) == 3; + + for(int j = winx + 1, offset = FC(i, j) & 1; j < winw - 1; ++j, offset ^= 1) { + (*histogreenThr[1 - offset])[(*rawDataFrames[1 - offset])[i - offset + 1][j]]++; + (*histogreenThr[3 - offset])[(*rawDataFrames[3 - offset])[i + offset][j + 1]]++; + + if(bluerow) { + (*historedThr[2 - offset])[(*rawDataFrames[2 - offset])[i + 1][j - offset + 1]]++; + (*histoblueThr[(offset << 1) + offset])[(*rawDataFrames[(offset << 1) + offset])[i][j + offset]]++; + } else { + (*historedThr[(offset << 1) + offset])[(*rawDataFrames[(offset << 1) + offset])[i][j + offset]]++; + (*histoblueThr[2 - offset])[(*rawDataFrames[2 - offset])[i + 1][j - offset + 1]]++; + } + } + } + +#ifdef _OPENMP + #pragma omp critical +#endif + { + for(int i = 0; i < 4; ++i) { + (*histogreen[i]) += (*histogreenThr[i]); + delete histogreenThr[i]; + (*histored[i]) += (*historedThr[i]); + delete historedThr[i]; + (*histoblue[i]) += (*histoblueThr[i]); + delete histoblueThr[i]; + } + } + } + + calcFrameBrightnessFactor(frame, (winh - 2) * (winw - 2) / 4, histored, redBrightness); + calcFrameBrightnessFactor(frame, (winh - 2) * (winw - 2) / 4, histoblue, blueBrightness); + calcFrameBrightnessFactor(frame, (winh - 2) * (winw - 2) / 2, histogreen, greenBrightness); + + for(int i = 0; i < 4; ++i) { + psRedBrightness[i] = redBrightness[i]; + psGreenBrightness[i] = greenBrightness[i]; + psBlueBrightness[i] = blueBrightness[i]; + } + rawDirty = false; + + for(int i = 0; i < 4; ++i) { + delete histored[i]; + delete histoblue[i]; + delete histogreen[i]; + } + if(plistener) { + plistener->setProgress(0.15); + } + + } else { + for(int i = 0; i < 4; ++i) { + redBrightness[i] = psRedBrightness[i]; + greenBrightness[i] = psGreenBrightness[i]; + blueBrightness[i] = psBlueBrightness[i]; + } + } + if(!equalChannel) { + for(int i = 0; i < 4; ++i) { + redBrightness[i] = blueBrightness[i] = greenBrightness[i]; + } + } + } + + + if(adaptive) { + // fill channels psRed and psBlue + array2D psRed(winw + 32, winh); // increase width to avoid cache conflicts + array2D psBlue(winw + 32, winh); + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for(int i = winy + 1; i < winh - 1; ++i) { + float *nonGreenDest0 = psRed[i]; + float *nonGreenDest1 = psBlue[i]; + float ngbright[2][4] = {{redBrightness[0], redBrightness[1], redBrightness[2], redBrightness[3]}, + {blueBrightness[0], blueBrightness[1], blueBrightness[2], blueBrightness[3]} + }; + int ng = 0; + int j = winx + 1; + int c = FC(i, j); + + if((c + FC(i, j + 1)) == 3) { + // row with blue pixels => swap destination pointers for non green pixels + std::swap(nonGreenDest0, nonGreenDest1); + ng ^= 1; + } + + // offset to keep the code short. It changes its value between 0 and 1 for each iteration of the loop + unsigned int offset = c & 1; + + for(; j < winw - 1; ++j) { + // store the non green values from the 4 frames into 2 temporary planes + nonGreenDest0[j] = (*rawDataFrames[(offset << 1) + offset])[i][j + offset] * ngbright[ng][(offset << 1) + offset]; + nonGreenDest1[j] = (*rawDataFrames[2 - offset])[i + 1][j - offset + 1] * ngbright[ng ^ 1][2 - offset]; + offset ^= 1; // 0 => 1 or 1 => 0 + } + } + + if(plistener) { + plistener->setProgress(0.3); + } + + // now that the temporary planes are filled for easy access we do the motion detection + array2D psMask(winw, winh); + + int offsX = 0, offsY = 0; + + if(!bayerParams.pixelShiftMedian) { + // We have to adjust the offsets for the selected subframe we use for areas with motion + switch(frame) { + case 0: + offsX = offsY = 0; + break; + + case 1: + offsX = 0; + offsY = 1; + break; + + case 2: + offsX = offsY = 1; + break; + + case 3: + offsX = 1; + offsY = 0; + } + } + + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for(int i = winy + border - offsY; i < winh - (border + offsY); ++i) { + // offset to keep the code short. It changes its value between 0 and 1 for each iteration of the loop + unsigned int offset = FC(i, winx + border - offsX) & 1; + + for(int j = winx + border - offsX; j < winw - (border + offsX); ++j, offset ^= 1) { + psMask[i][j] = 1.f; + + if(checkGreen) { + if(greenDiff((*rawDataFrames[1 - offset])[i - offset + 1][j] * greenBrightness[1 - offset], (*rawDataFrames[3 - offset])[i + offset][j + 1] * greenBrightness[3 - offset], stddevFactorGreen, eperIsoGreen, nRead, prnu) > 0.f) { + psMask[i][j] = greenWeight; + // do not set the motion pixel values. They have already been set by demosaicer + continue; + } + } + + if(checkNonGreenCross) { + // check red cross + float redTop = psRed[i - 1][ j ]; + float redLeft = psRed[ i ][j - 1]; + float redCentre = psRed[ i ][ j ]; + float redRight = psRed[ i ][j + 1]; + float redBottom = psRed[i + 1][ j ]; + float redDiff = nonGreenDiffCross(redRight, redLeft, redTop, redBottom, redCentre, clippedRed, stddevFactorRed, eperIsoRed, nRead, prnu); + + if(redDiff > 0.f) { + psMask[i][j] = redBlueWeight; + continue; + } + + // check blue cross + float blueTop = psBlue[i - 1][ j ]; + float blueLeft = psBlue[ i ][j - 1]; + float blueCentre = psBlue[ i ][ j ]; + float blueRight = psBlue[ i ][j + 1]; + float blueBottom = psBlue[i + 1][ j ]; + float blueDiff = nonGreenDiffCross(blueRight, blueLeft, blueTop, blueBottom, blueCentre, clippedBlue, stddevFactorBlue, eperIsoBlue, nRead, prnu); + + if(blueDiff > 0.f) { + psMask[i][j] = redBlueWeight; + continue; + } + } + } + } + + if(plistener) { + plistener->setProgress(0.45); + } + + if(blurMap) { +#ifdef _OPENMP + #pragma omp parallel +#endif + { + gaussianBlur(psMask, psMask, winw, winh, sigma); + } + if(plistener) { + plistener->setProgress(0.6); + } + + } + + array2D mask(winw, winh, ARRAY2D_CLEAR_DATA); + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for(int i = winy + border - offsY; i < winh - (border + offsY); ++i) { + int j = winx + border - offsX; + float v3sum[3] = {0.f}; + + for(int v = -1; v <= 1; v++) { + for(int h = -1; h < 1; h++) { + v3sum[1 + h] += psMask[i + v][j + h]; + } + } + + float blocksum = v3sum[0] + v3sum[1]; + + for(int voffset = 2; j < winw - (border + offsX); ++j, ++voffset) { + float colSum = psMask[i - 1][j + 1] + psMask[i][j + 1] + psMask[i + 1][j + 1]; + voffset = voffset == 3 ? 0 : voffset; // faster than voffset %= 3; + blocksum -= v3sum[voffset]; + blocksum += colSum; + v3sum[voffset] = colSum; + + if(blocksum >= threshold) { + mask[i][j] = 255; + } + } + } + + if(plistener) { + plistener->setProgress(0.75); + } + + if(holeFill) { + array2D maskInv(winw, winh); + invertMask(winx + border - offsX, winw - (border + offsX), winy + border - offsY, winh - (border + offsY), mask, maskInv); + floodFill4(winx + border - offsX, winw - (border + offsX), winy + border - offsY, winh - (border + offsY), maskInv); + xorMasks(winx + border - offsX, winw - (border + offsX), winy + border - offsY, winh - (border + offsY), maskInv, mask); + } + + if(plistener) { + plistener->setProgress(0.9); + } + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for(int i = winy + border - offsY; i < winh - (border + offsY); ++i) { +#ifdef __SSE2__ + + // pow() is expensive => precalculate blend factor using SSE + if(smoothTransitions) { // + vfloat onev = F2V(1.f); + vfloat smoothv = F2V(smoothFactor); + int j = winx + border - offsX; + + for(; j < winw - (border + offsX) - 3; j += 4) { + vfloat blendv = vmaxf(LVFU(psMask[i][j]), onev) - onev; + blendv = pow_F(blendv, smoothv); + blendv = vself(vmaskf_eq(smoothv, ZEROV), onev, blendv); + STVFU(psMask[i][j], blendv); + } + + for(; j < winw - (border + offsX); ++j) { + psMask[i][j] = smoothFactor == 0.f ? 1.f : pow_F(std::max(psMask[i][j] - 1.f, 0.f), smoothFactor); + } + } + +#endif + float *greenDest = green[i + offsY]; + float *redDest = red[i + offsY]; + float *blueDest = blue[i + offsY]; + + // offset to keep the code short. It changes its value between 0 and 1 for each iteration of the loop + unsigned int offset = FC(i, winx + border - offsX) & 1; + + for(int j = winx + border - offsX; j < winw - (border + offsX); ++j, offset ^= 1) { + if(mask[i][j] == 255) { + paintMotionMask(j + offsX, showMotion, showOnlyMask, greenDest, redDest, blueDest); + } else if(showOnlyMask) { // we want only motion mask => paint areas without motion in pure black + redDest[j + offsX] = greenDest[j + offsX] = blueDest[j + offsX] = 0.f; + } else { + if(smoothTransitions) { +#ifdef __SSE2__ + // use precalculated blend factor + const float blend = psMask[i][j]; +#else + const float blend = smoothFactor == 0.f ? 1.f : pow_F(std::max(psMask[i][j] - 1.f, 0.f), smoothFactor); +#endif + redDest[j + offsX] = intp(blend, redDest[j + offsX], psRed[i][j] ); + greenDest[j + offsX] = intp(blend, greenDest[j + offsX], ((*rawDataFrames[1 - offset])[i - offset + 1][j] * greenBrightness[1 - offset] + (*rawDataFrames[3 - offset])[i + offset][j + 1] * greenBrightness[3 - offset]) * 0.5f); + blueDest[j + offsX] = intp(blend, blueDest[j + offsX], psBlue[i][j]); + } else { + redDest[j + offsX] = psRed[i][j]; + greenDest[j + offsX] = ((*rawDataFrames[1 - offset])[i - offset + 1][j] * greenBrightness[1 - offset] + (*rawDataFrames[3 - offset])[i + offset][j + 1] * greenBrightness[3 - offset]) * 0.5f; + blueDest[j + offsX] = psBlue[i][j]; + } + } + } + } + } else { + // motion detection off => combine the 4 raw frames + float ngbright[2][4] = {{redBrightness[0], redBrightness[1], redBrightness[2], redBrightness[3]}, + {blueBrightness[0], blueBrightness[1], blueBrightness[2], blueBrightness[3]} + }; +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for(int i = winy + 1; i < winh - 1; ++i) { + float *nonGreenDest0 = red[i]; + float *nonGreenDest1 = blue[i]; + int ng = 0; + int j = winx + 1; + int c = FC(i, j); + + if((c + FC(i, j + 1)) == 3) { + // row with blue pixels => swap destination pointers for non green pixels + std::swap(nonGreenDest0, nonGreenDest1); + ng ^= 1; + } + + // offset to keep the code short. It changes its value between 0 and 1 for each iteration of the loop + unsigned int offset = c & 1; + + for(; j < winw - 1; ++j) { + // set red, green and blue values + green[i][j] = ((*rawDataFrames[1 - offset])[i - offset + 1][j] * greenBrightness[1 - offset] + (*rawDataFrames[3 - offset])[i + offset][j + 1] * greenBrightness[3 - offset]) * 0.5f; + nonGreenDest0[j] = (*rawDataFrames[(offset << 1) + offset])[i][j + offset] * ngbright[ng][(offset << 1) + offset]; + nonGreenDest1[j] = (*rawDataFrames[2 - offset])[i + 1][j - offset + 1] * ngbright[ng ^ 1][2 - offset]; + offset ^= 1; // 0 => 1 or 1 => 0 + } + } + } + + if(plistener) { + plistener->setProgress(1.0); + } +} diff --git a/rtengine/previewimage.cc b/rtengine/previewimage.cc index 891186d8a..aba43ace5 100644 --- a/rtengine/previewimage.cc +++ b/rtengine/previewimage.cc @@ -71,30 +71,22 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext int w, h; double scale = 1.; - if (tpp) { - tpp->getDimensions(w, h, scale); - } + tpp->getDimensions(w, h, scale); previewImage = Cairo::ImageSurface::create(Cairo::FORMAT_RGB24, w, h); previewImage->flush(); - #pragma omp parallel - { - const unsigned char *src; - unsigned char *dst; - #pragma omp for schedule(static,10) + #pragma omp parallel for + for (unsigned int i = 0; i < (unsigned int)(h); ++i) { + const unsigned char *src = data + i * w * 3; + unsigned char *dst = previewImage->get_data() + i * w * 4; - for (unsigned int i = 0; i < (unsigned int)(h); ++i) { - src = data + i * w * 3; - dst = previewImage->get_data() + i * w * 4; + for (unsigned int j = 0; j < (unsigned int)(w); ++j) { + unsigned char r = *(src++); + unsigned char g = *(src++); + unsigned char b = *(src++); - for (unsigned int j = 0; j < (unsigned int)(w); ++j) { - unsigned char r = *(src++); - unsigned char g = *(src++); - unsigned char b = *(src++); - - poke255_uc(dst, r, g, b); - } + poke255_uc(dst, r, g, b); } } previewImage->mark_dirty(); @@ -107,7 +99,6 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext int error = rawImage.load(fname, true); if (!error) { - rtengine::Image8 *output = nullptr; const unsigned char *data = nullptr; int fw, fh; @@ -122,55 +113,44 @@ PreviewImage::PreviewImage (const Glib::ustring &fname, const Glib::ustring &ext params.raw.xtranssensor.method = RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::fast]; rawImage.preprocess(params.raw, params.lensProf, params.coarse); rawImage.demosaic(params.raw); - Imagefloat* image = new rtengine::Imagefloat (fw, fh); - rawImage.getImage (wb, TR_NONE, image, pp, params.toneCurve, params.icm, params.raw); - output = new Image8(fw, fh); - rawImage.convertColorSpace(image, params.icm, wb); + Imagefloat image(fw, fh); + rawImage.getImage (wb, TR_NONE, &image, pp, params.toneCurve, params.icm, params.raw); + rtengine::Image8 output(fw, fh); + rawImage.convertColorSpace(&image, params.icm, wb); #pragma omp parallel for schedule(dynamic, 10) for (int i = 0; i < fh; ++i) for (int j = 0; j < fw; ++j) { - image->r(i, j) = Color::gamma2curve[image->r(i, j)]; - image->g(i, j) = Color::gamma2curve[image->g(i, j)]; - image->b(i, j) = Color::gamma2curve[image->b(i, j)]; + image.r(i, j) = Color::gamma2curve[image.r(i, j)]; + image.g(i, j) = Color::gamma2curve[image.g(i, j)]; + image.b(i, j) = Color::gamma2curve[image.b(i, j)]; } - image->resizeImgTo(fw, fh, TI_Nearest, output); - data = output->getData(); + image.resizeImgTo(fw, fh, TI_Nearest, &output); + data = output.getData(); if (data) { int w, h; - double scale = 1.; - w = output->getWidth(); - h = output->getHeight(); + w = output.getWidth(); + h = output.getHeight(); previewImage = Cairo::ImageSurface::create(Cairo::FORMAT_RGB24, w, h); previewImage->flush(); - #pragma omp parallel - { - const unsigned char *src; - unsigned char *dst; - #pragma omp for schedule(static,10) + #pragma omp parallel for + for (unsigned int i = 0; i < (unsigned int)(h); i++) { + const unsigned char *src = data + i * w * 3; + unsigned char *dst = previewImage->get_data() + i * w * 4; - for (unsigned int i = 0; i < (unsigned int)(h); i++) { - src = data + i * w * 3; - dst = previewImage->get_data() + i * w * 4; + for (unsigned int j = 0; j < (unsigned int)(w); j++) { + unsigned char r = *(src++); + unsigned char g = *(src++); + unsigned char b = *(src++); - for (unsigned int j = 0; j < (unsigned int)(w); j++) { - unsigned char r = *(src++); - unsigned char g = *(src++); - unsigned char b = *(src++); - - poke255_uc(dst, r, g, b); - } + poke255_uc(dst, r, g, b); } } - if (output) { - delete output; - } - previewImage->mark_dirty(); } } diff --git a/rtengine/processingjob.cc b/rtengine/processingjob.cc index 612edc2a2..a377e3963 100644 --- a/rtengine/processingjob.cc +++ b/rtengine/processingjob.cc @@ -21,16 +21,16 @@ namespace rtengine { -ProcessingJob* ProcessingJob::create (const Glib::ustring& fname, bool isRaw, const procparams::ProcParams& pparams) +ProcessingJob* ProcessingJob::create (const Glib::ustring& fname, bool isRaw, const procparams::ProcParams& pparams, bool fast) { - return new ProcessingJobImpl (fname, isRaw, pparams); + return new ProcessingJobImpl (fname, isRaw, pparams, fast); } -ProcessingJob* ProcessingJob::create (InitialImage* initialImage, const procparams::ProcParams& pparams) +ProcessingJob* ProcessingJob::create (InitialImage* initialImage, const procparams::ProcParams& pparams, bool fast) { - return new ProcessingJobImpl (initialImage, pparams); + return new ProcessingJobImpl (initialImage, pparams, fast); } void ProcessingJob::destroy (ProcessingJob* job) diff --git a/rtengine/processingjob.h b/rtengine/processingjob.h index 2de426a31..c7f49192e 100644 --- a/rtengine/processingjob.h +++ b/rtengine/processingjob.h @@ -32,12 +32,13 @@ public: bool isRaw; InitialImage* initialImage; procparams::ProcParams pparams; + bool fast; - ProcessingJobImpl (const Glib::ustring& fn, bool iR, const procparams::ProcParams& pp) - : fname(fn), isRaw(iR), initialImage(nullptr), pparams(pp) {} + ProcessingJobImpl (const Glib::ustring& fn, bool iR, const procparams::ProcParams& pp, bool ff) + : fname(fn), isRaw(iR), initialImage(nullptr), pparams(pp), fast(ff) {} - ProcessingJobImpl (InitialImage* iImage, const procparams::ProcParams& pp) - : fname(""), isRaw(true), initialImage(iImage), pparams(pp) + ProcessingJobImpl (InitialImage* iImage, const procparams::ProcParams& pp, bool ff) + : fname(""), isRaw(true), initialImage(iImage), pparams(pp), fast(ff) { iImage->increaseRef(); } @@ -48,6 +49,8 @@ public: initialImage->decreaseRef(); } } + + bool fastPipeline() const { return fast; } }; } diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 4e586449f..8f1e3dc76 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -73,7 +73,7 @@ enum ProcEvent { EvLDNRadius = 43, // obsolete EvLDNEdgeTolerance = 44, // obsolete EvCDNEnabled = 45, // obsolete - EvBlendCMSMatrix = 46, + EvBlendCMSMatrix = 46, // obsolete EvDCPToneCurve = 47, EvDCPIlluminant = 48, EvSHEnabled = 49, @@ -451,7 +451,7 @@ enum ProcEvent { EvLgam = 421, EvLslope = 422, EvLhighl = 423, - EvLbaselog = 424, + EvSpotEnabled = 424, EvRetinexlhcurve = 425, EvOIntent = 426, EvMonitorTransform = 427, @@ -470,7 +470,48 @@ enum ProcEvent { EvRetinexgaintransmission = 440, EvLskal = 441, EvOBPCompens = 442, - EvSpotEnabled = 443, + EvWBtempBias = 443, + EvRawImageNum = 444, + EvPixelShiftMotion = 445, + EvPixelShiftMotionCorrection = 446, + EvPixelShiftStddevFactorGreen = 447, + EvPixelShiftEperIso = 448, + EvPixelShiftNreadIso = 449, + EvPixelShiftPrnu = 450, + EvPixelshiftShowMotion = 451, + EvPixelshiftShowMotionMaskOnly = 452, + EvPixelShiftAutomatic = 453, + EvPixelShiftNonGreenHorizontal = 454, + EvPixelShiftNonGreenVertical = 455, + EvPixelShiftNonGreenCross = 456, + EvPixelShiftStddevFactorRed = 457, + EvPixelShiftStddevFactorBlue = 458, + EvPixelShiftGreenAmaze = 459, + EvPixelShiftNonGreenAmaze = 460, + EvPixelShiftGreen = 461, + EvPixelShiftRedBlueWeight = 462, + EvPixelShiftBlur = 463, + EvPixelShiftSigma = 464, + EvPixelShiftSum = 465, + EvPixelShiftExp0 = 466, + EvPixelShiftHoleFill = 467, + EvPixelShiftMedian = 468, + EvPixelShiftMedian3 = 469, + EvPixelShiftMotionMethod = 470, + EvPixelShiftSmooth = 471, + EvPixelShiftLmmse = 472, + EvPixelShiftEqualBright = 473, + EvPixelShiftEqualBrightChannel = 474, + EvCATtempout = 475, + EvCATgreenout = 476, + EvCATybout = 477, + EvCATDegreeout = 478, + EvCATAutoDegreeout = 479, + EvCATtempsc = 480, + EvCATgreensc = 481, + EvCATybscen = 482, + EvCATAutoyb = 483, + NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 193619282..953715331 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -26,11 +26,23 @@ #include "../rtgui/paramsedited.h" #include "../rtgui/options.h" #include -#define APPVERSION VERSION +#define APPVERSION RTVERSION using namespace std; extern Options options; +namespace +{ + +void avoidEmptyCurve (std::vector &curve) +{ + if (curve.empty()) { + curve.push_back (FCT_Linear); + } +} + +} + namespace rtengine { namespace procparams @@ -40,20 +52,20 @@ const int br = (int) options.rtSettings.bot_right; const int tl = (int) options.rtSettings.top_left; const int bl = (int) options.rtSettings.bot_left; -const char *RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::numMethods] = {"amaze", "igv", "lmmse", "eahd", "hphd", "vng4", "dcb", "ahd", "fast", "mono", "none" }; +const char *RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::numMethods] = {"amaze", "igv", "lmmse", "eahd", "hphd", "vng4", "dcb", "ahd", "fast", "mono", "none", "pixelshift" }; const char *RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::numMethods] = {"3-pass (best)", "1-pass (medium)", "fast", "mono", "none" }; const char *RAWParams::ff_BlurTypestring[RAWParams::numFlatFileBlurTypes] = {/*"Parametric",*/ "Area Flatfield", "Vertical Flatfield", "Horizontal Flatfield", "V+H Flatfield"}; std::vector WBParams::wbEntries; const short SpotParams::minRadius = 5; -const short SpotParams::maxRadius = 35; +const short SpotParams::maxRadius = 100; -bool ToneCurveParams::HLReconstructionNecessary(LUTu &histRedRaw, LUTu &histGreenRaw, LUTu &histBlueRaw) +bool ToneCurveParams::HLReconstructionNecessary (LUTu &histRedRaw, LUTu &histGreenRaw, LUTu &histBlueRaw) { if (options.rtSettings.verbose) - printf("histRedRaw[ 0]=%07d, histGreenRaw[ 0]=%07d, histBlueRaw[ 0]=%07d\nhistRedRaw[255]=%07d, histGreenRaw[255]=%07d, histBlueRaw[255]=%07d\n", - histRedRaw[0], histGreenRaw[0], histBlueRaw[0], histRedRaw[255], histGreenRaw[255], histBlueRaw[255]); + printf ("histRedRaw[ 0]=%07d, histGreenRaw[ 0]=%07d, histBlueRaw[ 0]=%07d\nhistRedRaw[255]=%07d, histGreenRaw[255]=%07d, histBlueRaw[255]=%07d\n", + histRedRaw[0], histGreenRaw[0], histBlueRaw[0], histRedRaw[255], histGreenRaw[255], histBlueRaw[255]); return histRedRaw[255] > 50 || histGreenRaw[255] > 50 || histBlueRaw[255] > 50 || histRedRaw[0] > 50 || histGreenRaw[0] > 50 || histBlueRaw[0] > 50; } @@ -61,40 +73,40 @@ bool ToneCurveParams::HLReconstructionNecessary(LUTu &histRedRaw, LUTu &histGree void WBParams::init() { // Creation of the different methods and its associated temperature value - wbEntries.push_back(new WBEntry("Camera" , WBT_CAMERA, M("TP_WBALANCE_CAMERA"), 0, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Auto" , WBT_AUTO, M("TP_WBALANCE_AUTO"), 0, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Daylight" , WBT_DAYLIGHT, M("TP_WBALANCE_DAYLIGHT"), 5300, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Cloudy" , WBT_CLOUDY, M("TP_WBALANCE_CLOUDY"), 6200, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Shade" , WBT_SHADE, M("TP_WBALANCE_SHADE"), 7600, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Water 1" , WBT_WATER, M("TP_WBALANCE_WATER1"), 35000, 0.3f, 1.1f)); - wbEntries.push_back(new WBEntry("Water 2" , WBT_WATER, M("TP_WBALANCE_WATER2"), 48000, 0.63f, 1.38f)); - wbEntries.push_back(new WBEntry("Tungsten" , WBT_TUNGSTEN, M("TP_WBALANCE_TUNGSTEN"), 2856, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Fluo F1" , WBT_FLUORESCENT, M("TP_WBALANCE_FLUO1"), 6430, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Fluo F2" , WBT_FLUORESCENT, M("TP_WBALANCE_FLUO2"), 4230, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Fluo F3" , WBT_FLUORESCENT, M("TP_WBALANCE_FLUO3"), 3450, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Fluo F4" , WBT_FLUORESCENT, M("TP_WBALANCE_FLUO4"), 2940, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Fluo F5" , WBT_FLUORESCENT, M("TP_WBALANCE_FLUO5"), 6350, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Fluo F6" , WBT_FLUORESCENT, M("TP_WBALANCE_FLUO6"), 4150, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Fluo F7" , WBT_FLUORESCENT, M("TP_WBALANCE_FLUO7"), 6500, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Fluo F8" , WBT_FLUORESCENT, M("TP_WBALANCE_FLUO8"), 5020, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Fluo F9" , WBT_FLUORESCENT, M("TP_WBALANCE_FLUO9"), 4330, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Fluo F10" , WBT_FLUORESCENT, M("TP_WBALANCE_FLUO10"), 5300, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Fluo F11" , WBT_FLUORESCENT, M("TP_WBALANCE_FLUO11"), 4000, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Fluo F12" , WBT_FLUORESCENT, M("TP_WBALANCE_FLUO12"), 3000, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("HMI Lamp" , WBT_LAMP, M("TP_WBALANCE_HMI"), 4800, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("GTI Lamp" , WBT_LAMP, M("TP_WBALANCE_GTI"), 5000, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("JudgeIII Lamp" , WBT_LAMP, M("TP_WBALANCE_JUDGEIII"), 5100, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Solux Lamp 3500K" , WBT_LAMP, M("TP_WBALANCE_SOLUX35"), 3480, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Solux Lamp 4100K" , WBT_LAMP, M("TP_WBALANCE_SOLUX41"), 3930, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Solux Lamp 4700K" , WBT_LAMP, M("TP_WBALANCE_SOLUX47"), 4700, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("NG Solux Lamp 4700K" , WBT_LAMP, M("TP_WBALANCE_SOLUX47_NG"), 4480, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("LED LSI Lumelex 2040", WBT_LED, M("TP_WBALANCE_LED_LSI"), 2970, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("LED CRS SP12 WWMR16" , WBT_LED, M("TP_WBALANCE_LED_CRS"), 3050, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Flash 5500K" , WBT_FLASH, M("TP_WBALANCE_FLASH55"), 5500, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Flash 6000K" , WBT_FLASH, M("TP_WBALANCE_FLASH60"), 6000, 1.f, 1.f)); - wbEntries.push_back(new WBEntry("Flash 6500K" , WBT_FLASH, M("TP_WBALANCE_FLASH65"), 6500, 1.f, 1.f)); + wbEntries.push_back (new WBEntry ("Camera", WBT_CAMERA, M ("TP_WBALANCE_CAMERA"), 0, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Auto", WBT_AUTO, M ("TP_WBALANCE_AUTO"), 0, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Daylight", WBT_DAYLIGHT, M ("TP_WBALANCE_DAYLIGHT"), 5300, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Cloudy", WBT_CLOUDY, M ("TP_WBALANCE_CLOUDY"), 6200, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Shade", WBT_SHADE, M ("TP_WBALANCE_SHADE"), 7600, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Water 1", WBT_WATER, M ("TP_WBALANCE_WATER1"), 35000, 0.3f, 1.1f, 0.f)); + wbEntries.push_back (new WBEntry ("Water 2", WBT_WATER, M ("TP_WBALANCE_WATER2"), 48000, 0.63f, 1.38f, 0.f)); + wbEntries.push_back (new WBEntry ("Tungsten", WBT_TUNGSTEN, M ("TP_WBALANCE_TUNGSTEN"), 2856, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F1", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO1"), 6430, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F2", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO2"), 4230, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F3", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO3"), 3450, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F4", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO4"), 2940, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F5", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO5"), 6350, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F6", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO6"), 4150, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F7", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO7"), 6500, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F8", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO8"), 5020, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F9", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO9"), 4330, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F10", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO10"), 5300, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F11", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO11"), 4000, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Fluo F12", WBT_FLUORESCENT, M ("TP_WBALANCE_FLUO12"), 3000, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("HMI Lamp", WBT_LAMP, M ("TP_WBALANCE_HMI"), 4800, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("GTI Lamp", WBT_LAMP, M ("TP_WBALANCE_GTI"), 5000, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("JudgeIII Lamp", WBT_LAMP, M ("TP_WBALANCE_JUDGEIII"), 5100, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Solux Lamp 3500K", WBT_LAMP, M ("TP_WBALANCE_SOLUX35"), 3480, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Solux Lamp 4100K", WBT_LAMP, M ("TP_WBALANCE_SOLUX41"), 3930, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Solux Lamp 4700K", WBT_LAMP, M ("TP_WBALANCE_SOLUX47"), 4700, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("NG Solux Lamp 4700K", WBT_LAMP, M ("TP_WBALANCE_SOLUX47_NG"), 4480, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("LED LSI Lumelex 2040", WBT_LED, M ("TP_WBALANCE_LED_LSI"), 2970, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("LED CRS SP12 WWMR16", WBT_LED, M ("TP_WBALANCE_LED_CRS"), 3050, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Flash 5500K", WBT_FLASH, M ("TP_WBALANCE_FLASH55"), 5500, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Flash 6000K", WBT_FLASH, M ("TP_WBALANCE_FLASH60"), 6000, 1.f, 1.f, 0.f)); + wbEntries.push_back (new WBEntry ("Flash 6500K", WBT_FLASH, M ("TP_WBALANCE_FLASH65"), 6500, 1.f, 1.f, 0.f)); // Should remain the last one - wbEntries.push_back(new WBEntry("Custom" , WBT_CUSTOM, M("TP_WBALANCE_CUSTOM"), 0, 1.f, 1.f)); + wbEntries.push_back (new WBEntry ("Custom", WBT_CUSTOM, M ("TP_WBALANCE_CUSTOM"), 0, 1.f, 1.f, 0.f)); } void WBParams::cleanup() @@ -105,15 +117,15 @@ void WBParams::cleanup() } // Maps crop to resized width (e.g. smaller previews) -void CropParams::mapToResized(int resizedWidth, int resizedHeight, int scale, int &x1, int &x2, int &y1, int &y2) const +void CropParams::mapToResized (int resizedWidth, int resizedHeight, int scale, int &x1, int &x2, int &y1, int &y2) const { x1 = 0, x2 = resizedWidth, y1 = 0, y2 = resizedHeight; if (enabled) { - x1 = min(resizedWidth - 1, max(0, x / scale)); - y1 = min(resizedHeight - 1, max(0, y / scale)); - x2 = min(resizedWidth, max(0, (x + w) / scale)); - y2 = min(resizedHeight, max(0, (y + h) / scale)); + x1 = min (resizedWidth - 1, max (0, x / scale)); + y1 = min (resizedHeight - 1, max (0, y / scale)); + x2 = min (resizedWidth, max (0, (x + w) / scale)); + y2 = min (resizedHeight, max (0, (y + h) / scale)); } } @@ -122,7 +134,7 @@ RetinexParams::RetinexParams () setDefaults (); } -void RetinexParams::getDefaulttransmissionCurve(std::vector &curve) +void RetinexParams::getDefaulttransmissionCurve (std::vector &curve) { double v[12] = { 0.00, 0.50, 0.35, 0.35, 0.60, 0.75, 0.35, 0.35, @@ -130,27 +142,27 @@ void RetinexParams::getDefaulttransmissionCurve(std::vector &curve) }; - curve.resize(13); - curve.at(0 ) = double(FCT_MinMaxCPoints); + curve.resize (13); + curve.at (0 ) = double (FCT_MinMaxCPoints); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } -void RetinexParams::getDefaultgaintransmissionCurve(std::vector &curve) +void RetinexParams::getDefaultgaintransmissionCurve (std::vector &curve) { - double v[16] = { 0.00, 0.1, 0.35, 0.00, + double v[16] = { 0.00, 0.1, 0.35, 0.00, 0.25, 0.25, 0.35, 0.35, 0.70, 0.25, 0.35, 0.35, - 1.00, 0.1, 0.00, 0.00 + 1.00, 0.1, 0.00, 0.00 }; - curve.resize(17); - curve.at(0 ) = double(FCT_MinMaxCPoints); + curve.resize (17); + curve.at (0 ) = double (FCT_MinMaxCPoints); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } @@ -158,26 +170,24 @@ void RetinexParams::getDefaultgaintransmissionCurve(std::vector &curve) void RetinexParams::setDefaults() { enabled = false; - str = 20; - scal = 3; + str = 20; + scal = 3; iter = 1; grad = 1; grads = 1; - gam = 1.30; - slope = 3.; - neigh = 80; - gain = 50; - offs = 0; - vart = 200; + gam = 1.30; + slope = 3.; + neigh = 80; + offs = 0; + vart = 200; limd = 8; highl = 4; - highlights = 0; - htonalwidth = 80; - shadows = 0; - stonalwidth = 80; - radius = 40; + highlights = 0; + htonalwidth = 80; + shadows = 0; + stonalwidth = 80; + radius = 40; - baselog = 2.71828; skal = 3; retinexMethod = "high"; mapMethod = "none"; @@ -186,88 +196,88 @@ void RetinexParams::setDefaults() gammaretinex = "none"; medianmap = false; cdcurve.clear(); - cdcurve.push_back(DCT_Linear); + cdcurve.push_back (DCT_Linear); cdHcurve.clear(); - cdHcurve.push_back(DCT_Linear); + cdHcurve.push_back (DCT_Linear); lhcurve.clear(); - lhcurve.push_back(DCT_Linear); + lhcurve.push_back (DCT_Linear); mapcurve.clear(); - mapcurve.push_back(DCT_Linear); - getDefaultgaintransmissionCurve(gaintransmissionCurve); + mapcurve.push_back (DCT_Linear); + getDefaultgaintransmissionCurve (gaintransmissionCurve); - getDefaulttransmissionCurve(transmissionCurve); + getDefaulttransmissionCurve (transmissionCurve); } -void RetinexParams::getCurves(RetinextransmissionCurve &transmissionCurveLUT, RetinexgaintransmissionCurve &gaintransmissionCurveLUT) const +void RetinexParams::getCurves (RetinextransmissionCurve &transmissionCurveLUT, RetinexgaintransmissionCurve &gaintransmissionCurveLUT) const { - transmissionCurveLUT.Set(this->transmissionCurve); - gaintransmissionCurveLUT.Set(this->gaintransmissionCurve); + transmissionCurveLUT.Set (this->transmissionCurve); + gaintransmissionCurveLUT.Set (this->gaintransmissionCurve); } -ColorToningParams::ColorToningParams () : hlColSat(60, 80, false), shadowsColSat(80, 208, false) +ColorToningParams::ColorToningParams () : hlColSat (60, 80, false), shadowsColSat (80, 208, false) { setDefaults(); } -void ColorToningParams::getDefaultColorCurve(std::vector &curve) +void ColorToningParams::getDefaultColorCurve (std::vector &curve) { double v[8] = { 0.050, 0.62, 0.25, 0.25, 0.585, 0.11, 0.25, 0.25 }; - curve.resize(9); - curve.at(0) = double(FCT_MinMaxCPoints); + curve.resize (9); + curve.at (0) = double (FCT_MinMaxCPoints); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } -void ColorToningParams::getDefaultOpacityCurve(std::vector &curve) +void ColorToningParams::getDefaultOpacityCurve (std::vector &curve) { double v[16] = { 0.00, 0.3, 0.35, 0.00, 0.25, 0.8, 0.35, 0.35, 0.70, 0.8, 0.35, 0.35, 1.00, 0.3, 0.00, 0.00 }; - curve.resize(17); - curve.at(0 ) = double(FCT_MinMaxCPoints); + curve.resize (17); + curve.at (0 ) = double (FCT_MinMaxCPoints); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } -void ColorToningParams::getDefaultCLCurve(std::vector &curve) +void ColorToningParams::getDefaultCLCurve (std::vector &curve) { double v[6] = { 0.00, 0.00, 0.35, 0.65, 1.00, 1.00 }; - curve.resize(7); - curve.at(0) = double(DCT_NURBS); + curve.resize (7); + curve.at (0) = double (DCT_NURBS); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } -void ColorToningParams::getDefaultCL2Curve(std::vector &curve) +void ColorToningParams::getDefaultCL2Curve (std::vector &curve) { double v[6] = { 0.00, 0.00, 0.35, 0.65, 1.00, 1.00 }; - curve.resize(7); - curve.at(0) = double(DCT_NURBS); + curve.resize (7); + curve.at (0) = double (DCT_NURBS); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } @@ -277,13 +287,13 @@ void ColorToningParams::setDefaults() autosat = true; method = "Lab"; - getDefaultColorCurve(colorCurve); - getDefaultOpacityCurve(opacityCurve); - getDefaultCLCurve(clcurve); - getDefaultCL2Curve(cl2curve); + getDefaultColorCurve (colorCurve); + getDefaultOpacityCurve (opacityCurve); + getDefaultCLCurve (clcurve); + getDefaultCL2Curve (cl2curve); - hlColSat.setValues(60, 80); - shadowsColSat.setValues(80, 208); + hlColSat.setValues (60, 80); + shadowsColSat.setValues (80, 208); balance = 0; satProtectionThreshold = 30; saturatedOpacity = 80; @@ -303,37 +313,37 @@ void ColorToningParams::setDefaults() bluehigh = 0.0; } -void ColorToningParams::mixerToCurve(std::vector &colorCurve, std::vector &opacityCurve) const +void ColorToningParams::mixerToCurve (std::vector &colorCurve, std::vector &opacityCurve) const { // check if non null first if (!redlow && !greenlow && !bluelow && !redmed && !greenmed && !bluemed && !redhigh && !greenhigh && !bluehigh) { - colorCurve.resize(1); - colorCurve.at(0) = FCT_Linear; - opacityCurve.resize(1); - opacityCurve.at(0) = FCT_Linear; + colorCurve.resize (1); + colorCurve.at (0) = FCT_Linear; + opacityCurve.resize (1); + opacityCurve.at (0) = FCT_Linear; return; } - float low[3]; // RGB color for shadows - float med[3]; // RGB color for mid-tones + float low[3]; // RGB color for shadows + float med[3]; // RGB color for mid-tones float high[3]; // RGB color for highlights - float lowSat = 0.f; - float medSat = 0.f; + float lowSat = 0.f; + float medSat = 0.f; float highSat = 0.f; float minTmp, maxTmp; - // Fill the shadow mixer values of the Color TOning tool - low[0] = float(redlow ) / 100.f; // [-1. ; +1.] - low[1] = float(greenlow) / 100.f; // [-1. ; +1.] - low[2] = float(bluelow ) / 100.f; // [-1. ; +1.] - minTmp = min(low[0], low[1], low[2]); - maxTmp = max(low[0], low[1], low[2]); +// Fill the shadow mixer values of the Color TOning tool + low[0] = float (redlow ) / 100.f; // [-1. ; +1.] + low[1] = float (greenlow) / 100.f; // [-1. ; +1.] + low[2] = float (bluelow ) / 100.f; // [-1. ; +1.] + minTmp = min (low[0], low[1], low[2]); + maxTmp = max (low[0], low[1], low[2]); if (maxTmp - minTmp > 0.005f) { float v[3]; lowSat = (maxTmp - minTmp) / 2.f; - if (low[0] == minTmp) { + if (low[0] == minTmp) { v[0] = 0.f; } else if (low[1] == minTmp) { v[1] = 0.f; @@ -341,7 +351,7 @@ void ColorToningParams::mixerToCurve(std::vector &colorCurve, std::vecto v[2] = 0.f; } - if (low[0] == maxTmp) { + if (low[0] == maxTmp) { v[0] = 1.f; } else if (low[1] == maxTmp) { v[1] = 1.f; @@ -349,7 +359,7 @@ void ColorToningParams::mixerToCurve(std::vector &colorCurve, std::vecto v[2] = 1.f; } - if (low[0] != minTmp && low[0] != maxTmp) { + if (low[0] != minTmp && low[0] != maxTmp) { v[0] = (low[0] - minTmp) / (maxTmp - minTmp); } else if (low[1] != minTmp && low[1] != maxTmp) { v[1] = (low[1] - minTmp) / (maxTmp - minTmp); @@ -364,18 +374,18 @@ void ColorToningParams::mixerToCurve(std::vector &colorCurve, std::vecto low[0] = low[1] = low[2] = 1.f; } - // Fill the mid-tones mixer values of the Color TOning tool - med[0] = float(redmed ) / 100.f; // [-1. ; +1.] - med[1] = float(greenmed) / 100.f; // [-1. ; +1.] - med[2] = float(bluemed ) / 100.f; // [-1. ; +1.] - minTmp = min(med[0], med[1], med[2]); - maxTmp = max(med[0], med[1], med[2]); +// Fill the mid-tones mixer values of the Color TOning tool + med[0] = float (redmed ) / 100.f; // [-1. ; +1.] + med[1] = float (greenmed) / 100.f; // [-1. ; +1.] + med[2] = float (bluemed ) / 100.f; // [-1. ; +1.] + minTmp = min (med[0], med[1], med[2]); + maxTmp = max (med[0], med[1], med[2]); if (maxTmp - minTmp > 0.005f) { float v[3]; medSat = (maxTmp - minTmp) / 2.f; - if (med[0] == minTmp) { + if (med[0] == minTmp) { v[0] = 0.f; } else if (med[1] == minTmp) { v[1] = 0.f; @@ -383,7 +393,7 @@ void ColorToningParams::mixerToCurve(std::vector &colorCurve, std::vecto v[2] = 0.f; } - if (med[0] == maxTmp) { + if (med[0] == maxTmp) { v[0] = 1.f; } else if (med[1] == maxTmp) { v[1] = 1.f; @@ -391,7 +401,7 @@ void ColorToningParams::mixerToCurve(std::vector &colorCurve, std::vecto v[2] = 1.f; } - if (med[0] != minTmp && med[0] != maxTmp) { + if (med[0] != minTmp && med[0] != maxTmp) { v[0] = (med[0] - minTmp) / (maxTmp - minTmp); } else if (med[1] != minTmp && med[1] != maxTmp) { v[1] = (med[1] - minTmp) / (maxTmp - minTmp); @@ -407,17 +417,17 @@ void ColorToningParams::mixerToCurve(std::vector &colorCurve, std::vecto } // Fill the highlight mixer values of the Color TOning tool - high[0] = float(redhigh ) / 100.f; // [-1. ; +1.] - high[1] = float(greenhigh) / 100.f; // [-1. ; +1.] - high[2] = float(bluehigh ) / 100.f; // [-1. ; +1.] - minTmp = min(high[0], high[1], high[2]); - maxTmp = max(high[0], high[1], high[2]); + high[0] = float (redhigh ) / 100.f; // [-1. ; +1.] + high[1] = float (greenhigh) / 100.f; // [-1. ; +1.] + high[2] = float (bluehigh ) / 100.f; // [-1. ; +1.] + minTmp = min (high[0], high[1], high[2]); + maxTmp = max (high[0], high[1], high[2]); if (maxTmp - minTmp > 0.005f) { float v[3]; highSat = (maxTmp - minTmp) / 2.f; - if (high[0] == minTmp) { + if (high[0] == minTmp) { v[0] = 0.f; } else if (high[1] == minTmp) { v[1] = 0.f; @@ -425,7 +435,7 @@ void ColorToningParams::mixerToCurve(std::vector &colorCurve, std::vecto v[2] = 0.f; } - if (high[0] == maxTmp) { + if (high[0] == maxTmp) { v[0] = 1.f; } else if (high[1] == maxTmp) { v[1] = 1.f; @@ -433,7 +443,7 @@ void ColorToningParams::mixerToCurve(std::vector &colorCurve, std::vecto v[2] = 1.f; } - if (high[0] != minTmp && high[0] != maxTmp) { + if (high[0] != minTmp && high[0] != maxTmp) { v[0] = (high[0] - minTmp) / (maxTmp - minTmp); } else if (high[1] != minTmp && high[1] != maxTmp) { v[1] = (high[1] - minTmp) / (maxTmp - minTmp); @@ -457,100 +467,100 @@ void ColorToningParams::mixerToCurve(std::vector &colorCurve, std::vecto - colorCurve.resize( medSat != 0.f ? 13 : 9 ); - colorCurve.at(0) = FCT_MinMaxCPoints; - opacityCurve.resize(13); - opacityCurve.at(0) = FCT_MinMaxCPoints; + colorCurve.resize ( medSat != 0.f ? 13 : 9 ); + colorCurve.at (0) = FCT_MinMaxCPoints; + opacityCurve.resize (13); + opacityCurve.at (0) = FCT_MinMaxCPoints; float h, s, l; int idx = 1; if (lowSat == 0.f) { if (medSat != 0.f) { - Color::rgb2hsl(med[0], med[1], med[2], h, s, l); + Color::rgb2hsl (med[0], med[1], med[2], h, s, l); } else { // highSat can't be null if the 2 other ones are! - Color::rgb2hsl(high[0], high[1], high[2], h, s, l); + Color::rgb2hsl (high[0], high[1], high[2], h, s, l); } } else { - Color::rgb2hsl(low[0], low[1], low[2], h, s, l); + Color::rgb2hsl (low[0], low[1], low[2], h, s, l); } - colorCurve.at(idx++) = xPosLow; - colorCurve.at(idx++) = h; - colorCurve.at(idx++) = 0.35; - colorCurve.at(idx++) = 0.35; + colorCurve.at (idx++) = xPosLow; + colorCurve.at (idx++) = h; + colorCurve.at (idx++) = 0.35; + colorCurve.at (idx++) = 0.35; if (medSat != 0.f) { - Color::rgb2hsl(med[0], med[1], med[2], h, s, l); - colorCurve.at(idx++) = xPosMed; - colorCurve.at(idx++) = h; - colorCurve.at(idx++) = 0.35; - colorCurve.at(idx++) = 0.35; + Color::rgb2hsl (med[0], med[1], med[2], h, s, l); + colorCurve.at (idx++) = xPosMed; + colorCurve.at (idx++) = h; + colorCurve.at (idx++) = 0.35; + colorCurve.at (idx++) = 0.35; } if (highSat == 0.f) { if (medSat != 0.f) { - Color::rgb2hsl(med[0], med[1], med[2], h, s, l); + Color::rgb2hsl (med[0], med[1], med[2], h, s, l); } else { // lowSat can't be null if the 2 other ones are! - Color::rgb2hsl(low[0], low[1], low[2], h, s, l); + Color::rgb2hsl (low[0], low[1], low[2], h, s, l); } } else { - Color::rgb2hsl(high[0], high[1], high[2], h, s, l); + Color::rgb2hsl (high[0], high[1], high[2], h, s, l); } - colorCurve.at(idx++) = xPosHigh; - colorCurve.at(idx++) = h; - colorCurve.at(idx++) = 0.35; - colorCurve.at(idx) = 0.35; + colorCurve.at (idx++) = xPosHigh; + colorCurve.at (idx++) = h; + colorCurve.at (idx++) = 0.35; + colorCurve.at (idx) = 0.35; - opacityCurve.at(1) = xPosLow; - opacityCurve.at(2) = double(lowSat); - opacityCurve.at(3) = 0.35; - opacityCurve.at(4) = 0.35; - opacityCurve.at(5) = xPosMed; - opacityCurve.at(6) = double(medSat); - opacityCurve.at(7) = 0.35; - opacityCurve.at(8) = 0.35; - opacityCurve.at(9) = xPosHigh; - opacityCurve.at(10) = double(highSat); - opacityCurve.at(11) = 0.35; - opacityCurve.at(12) = 0.35; + opacityCurve.at (1) = xPosLow; + opacityCurve.at (2) = double (lowSat); + opacityCurve.at (3) = 0.35; + opacityCurve.at (4) = 0.35; + opacityCurve.at (5) = xPosMed; + opacityCurve.at (6) = double (medSat); + opacityCurve.at (7) = 0.35; + opacityCurve.at (8) = 0.35; + opacityCurve.at (9) = xPosHigh; + opacityCurve.at (10) = double (highSat); + opacityCurve.at (11) = 0.35; + opacityCurve.at (12) = 0.35; } -void ColorToningParams::slidersToCurve(std::vector &colorCurve, std::vector &opacityCurve) const +void ColorToningParams::slidersToCurve (std::vector &colorCurve, std::vector &opacityCurve) const { if (hlColSat.value[0] == 0 && shadowsColSat.value[0] == 0) { // if both opacity are null, set both curves to Linear - colorCurve.resize(1); - colorCurve.at(0) = FCT_Linear; - opacityCurve.resize(1); - opacityCurve.at(0) = FCT_Linear; + colorCurve.resize (1); + colorCurve.at (0) = FCT_Linear; + opacityCurve.resize (1); + opacityCurve.at (0) = FCT_Linear; return; } - colorCurve.resize(9); - colorCurve.at(0) = FCT_MinMaxCPoints; - colorCurve.at(1) = 0.26 + 0.12 * double(balance) / 100.; - colorCurve.at(2) = double(shadowsColSat.value[1]) / 360.; - colorCurve.at(3) = 0.35; - colorCurve.at(4) = 0.35; - colorCurve.at(5) = 0.64 + 0.12 * double(balance) / 100.; - colorCurve.at(6) = double(hlColSat.value[1]) / 360.; - colorCurve.at(7) = 0.35; - colorCurve.at(8) = 0.35; + colorCurve.resize (9); + colorCurve.at (0) = FCT_MinMaxCPoints; + colorCurve.at (1) = 0.26 + 0.12 * double (balance) / 100.; + colorCurve.at (2) = double (shadowsColSat.value[1]) / 360.; + colorCurve.at (3) = 0.35; + colorCurve.at (4) = 0.35; + colorCurve.at (5) = 0.64 + 0.12 * double (balance) / 100.; + colorCurve.at (6) = double (hlColSat.value[1]) / 360.; + colorCurve.at (7) = 0.35; + colorCurve.at (8) = 0.35; - opacityCurve.resize(9); - opacityCurve.at(0) = FCT_MinMaxCPoints; - opacityCurve.at(1) = colorCurve.at(1); - opacityCurve.at(2) = double(shadowsColSat.value[0]) / 100.; - opacityCurve.at(3) = 0.35; - opacityCurve.at(4) = 0.35; - opacityCurve.at(5) = colorCurve.at(5); - opacityCurve.at(6) = double(hlColSat.value[0]) / 100.; - opacityCurve.at(7) = 0.35; - opacityCurve.at(8) = 0.35; + opacityCurve.resize (9); + opacityCurve.at (0) = FCT_MinMaxCPoints; + opacityCurve.at (1) = colorCurve.at (1); + opacityCurve.at (2) = double (shadowsColSat.value[0]) / 100.; + opacityCurve.at (3) = 0.35; + opacityCurve.at (4) = 0.35; + opacityCurve.at (5) = colorCurve.at (5); + opacityCurve.at (6) = double (hlColSat.value[0]) / 100.; + opacityCurve.at (7) = 0.35; + opacityCurve.at (8) = 0.35; } -void ColorToningParams::getCurves(ColorGradientCurve &colorCurveLUT, OpacityCurve &opacityCurveLUT, const double xyz_rgb[3][3], const double rgb_xyz[3][3], bool &opautili) const +void ColorToningParams::getCurves (ColorGradientCurve &colorCurveLUT, OpacityCurve &opacityCurveLUT, const double xyz_rgb[3][3], const double rgb_xyz[3][3], bool &opautili) const { float satur = 0.8f; float lumin = 0.5f; //middle of luminance for optimization of gamut - no real importance...as we work in XYZ and gamut control @@ -559,87 +569,127 @@ void ColorToningParams::getCurves(ColorGradientCurve &colorCurveLUT, OpacityCurv std::vector cCurve, oCurve; if (method == "RGBSliders" || method == "Splitlr") { - slidersToCurve(cCurve, oCurve); + slidersToCurve (cCurve, oCurve); } else if (method == "Splitco") { - mixerToCurve(cCurve, oCurve); + mixerToCurve (cCurve, oCurve); } else { cCurve = this->colorCurve; oCurve = this->opacityCurve; } - if(method == "Lab") { - if(twocolor == "Separ") { + if (method == "Lab") { + if (twocolor == "Separ") { satur = 0.9f; } - if(twocolor == "All" || twocolor == "Two") { + if (twocolor == "All" || twocolor == "Two") { satur = 0.9f; } - colorCurveLUT.SetXYZ(cCurve, xyz_rgb, rgb_xyz, satur, lumin); - opacityCurveLUT.Set(oCurve, opautili); - } else if(method == "Splitlr" || method == "Splitco") { - colorCurveLUT.SetXYZ(cCurve, xyz_rgb, rgb_xyz, satur, lumin); - opacityCurveLUT.Set(oCurve, opautili); - } else if(method.substr(0, 3) == "RGB") { - colorCurveLUT.SetRGB(cCurve, xyz_rgb, rgb_xyz); - opacityCurveLUT.Set(oCurve, opautili); + colorCurveLUT.SetXYZ (cCurve, xyz_rgb, rgb_xyz, satur, lumin); + opacityCurveLUT.Set (oCurve, opautili); + } else if (method == "Splitlr" || method == "Splitco") { + colorCurveLUT.SetXYZ (cCurve, xyz_rgb, rgb_xyz, satur, lumin); + opacityCurveLUT.Set (oCurve, opautili); + } else if (method.substr (0, 3) == "RGB") { + colorCurveLUT.SetRGB (cCurve, xyz_rgb, rgb_xyz); + opacityCurveLUT.Set (oCurve, opautili); } } + +SharpeningParams::SharpeningParams() : + enabled (false), + radius (0.5), + amount (200), + threshold (20, 80, 2000, 1200, false), + edgesonly (false), + edges_radius (1.9), + edges_tolerance (1800), + halocontrol (false), + halocontrol_amount (85), + deconvamount (75), + deconvradius (0.75), + deconviter (30), + deconvdamping (20) +{}; + + +VibranceParams::VibranceParams() : + enabled (false), + pastels (0), + saturated (0), + psthreshold (0, 75, false), + protectskins (false), + avoidcolorshift (true), + pastsattog (true) +{}; + + //WaveletParams::WaveletParams (): hueskin(-5, 25, 170, 120, false), hueskin2(-260, -250, -130, -140, false), hllev(50, 75, 100, 98, false), bllev(0, 2, 50, 25, false), pastlev(0, 2, 30, 20, false), satlev(30, 45, 130, 100, false), edgcont(0, 20, 100, 75, false){ -WaveletParams::WaveletParams (): hueskin(-5, 25, 170, 120, false), hueskin2(-260, -250, -130, -140, false), hllev(50, 75, 100, 98, false), bllev(0, 2, 50, 25, false), - pastlev(0, 2, 30, 20, false), satlev(30, 45, 130, 100, false), edgcont(bl, tl, br, tr, false), /* edgcont(0, 10, 75, 40, false),*/level0noise(0, 0, false), level1noise(0, 0, false), level2noise(0, 0, false), level3noise(0, 0, false) +WaveletParams::WaveletParams() : + hueskin ( -5, 25, 170, 120, false), + hueskin2 (-260, -250, -130, -140, false), + hllev ( 50, 75, 100, 98, false), + bllev ( 0, 2, 50, 25, false), + pastlev ( 0, 2, 30, 20, false), + satlev ( 30, 45, 130, 100, false), + edgcont ( bl, tl, br, tr, false), + /*edgcont ( 0, 10, 75, 40, false),*/ + level0noise (0, 0, false), + level1noise (0, 0, false), + level2noise (0, 0, false), + level3noise (0, 0, false) { setDefaults (); } -void WaveletParams::getDefaultOpacityCurveRG(std::vector &curve) +void WaveletParams::getDefaultOpacityCurveRG (std::vector &curve) { - double v[8] = { 0.0, 0.50, 0.35, 0.35, + double v[8] = { 0.0, 0.50, 0.35, 0.35, 1.00, 0.50, 0.35, 0.35 }; - curve.resize(9); - curve.at(0) = double(FCT_MinMaxCPoints); + curve.resize (9); + curve.at (0) = double (FCT_MinMaxCPoints); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } -void WaveletParams::getDefaultOpacityCurveBY(std::vector &curve) +void WaveletParams::getDefaultOpacityCurveBY (std::vector &curve) { - double v[8] = { 0.0, 0.50, 0.35, 0.35, + double v[8] = { 0.0, 0.50, 0.35, 0.35, 1.00, 0.50, 0.35, 0.35 }; - curve.resize(9); - curve.at(0 ) = double(FCT_MinMaxCPoints); + curve.resize (9); + curve.at (0 ) = double (FCT_MinMaxCPoints); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } -void WaveletParams::getDefaultOpacityCurveW(std::vector &curve) +void WaveletParams::getDefaultOpacityCurveW (std::vector &curve) { double v[16] = { 0.00, 0.35, 0.35, 0.00, 0.35, 0.75, 0.35, 0.35, 0.60, 0.75, 0.35, 0.35, 1.00, 0.35, 0.00, 0.00 }; - curve.resize(17); - curve.at(0) = double(FCT_MinMaxCPoints); + curve.resize (17); + curve.at (0) = double (FCT_MinMaxCPoints); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } -void WaveletParams::getDefaultOpacityCurveWL(std::vector &curve) +void WaveletParams::getDefaultOpacityCurveWL (std::vector &curve) { - double v[8] = { 0.0, 0.50, 0.35, 0.35, + double v[8] = { 0.0, 0.50, 0.35, 0.35, 1.00, 0.50, 0.35, 0.35 }; @@ -647,47 +697,48 @@ void WaveletParams::getDefaultOpacityCurveWL(std::vector &curve) 0.42, 0.53, 0.35, 0.35, 1.00, 0.15, 0.00, 0.00 }; */ - curve.resize(9); - curve.at(0) = double(FCT_MinMaxCPoints); + curve.resize (9); + curve.at (0) = double (FCT_MinMaxCPoints); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } -void WaveletParams::getDefaultCCWCurve(std::vector &curve) +void WaveletParams::getDefaultCCWCurve (std::vector &curve) { - double v[12] = { 0.0, 0.25, 0.35, 0.35, - 0.50, 0.75, 0.35, 0.35, 0.90, 0.0, 0.35, 0.35 + double v[12] = { 0.0, 0.25, 0.35, 0.35, + 0.50, 0.75, 0.35, 0.35, + 0.90, 0.0, 0.35, 0.35 }; - curve.resize(13); - curve.at(0 ) = double(FCT_MinMaxCPoints); + curve.resize (13); + curve.at (0 ) = double (FCT_MinMaxCPoints); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } -void WaveletParams::getCurves(WavCurve &cCurve, WavOpacityCurveRG &opacityCurveLUTRG, WavOpacityCurveBY &opacityCurveLUTBY, WavOpacityCurveW &opacityCurveLUTW, WavOpacityCurveWL &opacityCurveLUTWL) const +void WaveletParams::getCurves (WavCurve &cCurve, WavOpacityCurveRG &opacityCurveLUTRG, WavOpacityCurveBY &opacityCurveLUTBY, WavOpacityCurveW &opacityCurveLUTW, WavOpacityCurveWL &opacityCurveLUTWL) const { - cCurve.Set(this->ccwcurve); - opacityCurveLUTRG.Set(this->opacityCurveRG); - opacityCurveLUTBY.Set(this->opacityCurveBY); - opacityCurveLUTW.Set(this->opacityCurveW); - opacityCurveLUTWL.Set(this->opacityCurveWL); + cCurve.Set (this->ccwcurve); + opacityCurveLUTRG.Set (this->opacityCurveRG); + opacityCurveLUTBY.Set (this->opacityCurveBY); + opacityCurveLUTW.Set (this->opacityCurveW); + opacityCurveLUTWL.Set (this->opacityCurveWL); } void WaveletParams::setDefaults() { - getDefaultCCWCurve(ccwcurve); - getDefaultOpacityCurveRG(opacityCurveRG); - getDefaultOpacityCurveBY(opacityCurveBY); - getDefaultOpacityCurveW(opacityCurveW); - getDefaultOpacityCurveWL(opacityCurveWL); + getDefaultCCWCurve (ccwcurve); + getDefaultOpacityCurveRG (opacityCurveRG); + getDefaultOpacityCurveBY (opacityCurveBY); + getDefaultOpacityCurveW (opacityCurveW); + getDefaultOpacityCurveWL (opacityCurveWL); enabled = false; median = false; medianlev = false; @@ -701,40 +752,40 @@ void WaveletParams::setDefaults() balance = 0; iter = 0; wavclCurve.clear (); - wavclCurve.push_back(DCT_Linear); + wavclCurve.push_back (DCT_Linear); - Lmethod = "4_"; - CHmethod = "without"; - CHSLmethod = "SL"; - EDmethod = "CU"; - NPmethod = "none"; - BAmethod = "none"; - TMmethod = "cont"; - HSmethod = "with"; - CLmethod = "all"; - Backmethod = "grey"; - Dirmethod = "all"; - Tilesmethod = "full"; - daubcoeffmethod = "4_"; - rescon = 0; - resconH = 0; - reschro = 0; - tmrs = 0; - gamma = 1; - sky = 0.; - sup = 0; - thres = 7; - chroma = 5; - chro = 0; - contrast = 0; - edgrad = 15; - edgval = 0; - edgthresh = 10; - thr = 35; - thrH = 65; + Lmethod = "4_"; + CHmethod = "without"; + CHSLmethod = "SL"; + EDmethod = "CU"; + NPmethod = "none"; + BAmethod = "none"; + TMmethod = "cont"; + HSmethod = "with"; + CLmethod = "all"; + Backmethod = "grey"; + Dirmethod = "all"; + Tilesmethod = "full"; + daubcoeffmethod = "4_"; + rescon = 0; + resconH = 0; + reschro = 0; + tmrs = 0; + gamma = 1; + sky = 0.; + sup = 0; + thres = 7; + chroma = 5; + chro = 0; + contrast = 0; + edgrad = 15; + edgval = 0; + edgthresh = 10; + thr = 35; + thrH = 65; skinprotect = 0.; - hueskin.setValues(-5, 25, 170, 120); - hueskin2.setValues(-260, -250, -130, -140); + hueskin.setValues ( -5, 25, 170, 120); + hueskin2.setValues (-260, -250, -130, -140); threshold = 5; threshold2 = 4; edgedetect = 90; @@ -742,20 +793,20 @@ void WaveletParams::setDefaults() edgedetectthr2 = 0; edgesensi = 60; edgeampli = 10; - hllev.setValues(50, 75, 100, 98); - bllev.setValues(0, 2, 50, 25); - pastlev.setValues(0, 2, 30, 20); - satlev.setValues(30, 45, 130, 100); -// edgcont.setValues(bl, tl, br, tr); - edgcont.setValues(0, 10, 75, 40); - level0noise.setValues(0, 0); - level1noise.setValues(0, 0); - level2noise.setValues(0, 0); - level3noise.setValues(0, 0); + hllev.setValues (50, 75, 100, 98); + bllev.setValues ( 0, 2, 50, 25); + pastlev.setValues ( 0, 2, 30, 20); + satlev.setValues (30, 45, 130, 100); + //edgcont.setValues (bl, tl, br, tr); + edgcont.setValues ( 0, 10, 75, 40); + level0noise.setValues (0, 0); + level1noise.setValues (0, 0); + level2noise.setValues (0, 0); + level3noise.setValues (0, 0); hhcurve.clear (); - hhcurve.push_back(FCT_Linear); + hhcurve.push_back (FCT_Linear); Chcurve.clear (); - Chcurve.push_back(FCT_Linear); + Chcurve.push_back (FCT_Linear); expcontrast = false; expchroma = false; expedge = false; @@ -764,14 +815,17 @@ void WaveletParams::setDefaults() exptoning = false; expnoise = false; - for(int i = 0; i < 9; i ++) { + for (int i = 0; i < 9; i ++) { c[i] = 0; } - for(int i = 0; i < 9; i ++) { + for (int i = 0; i < 9; i ++) { ch[i] = 0; } + greenlow = greenmed = greenhigh = 0.0; + bluelow = bluemed = bluehigh = 0.0; + } @@ -780,20 +834,20 @@ DirPyrDenoiseParams::DirPyrDenoiseParams () setDefaults (); } -void DirPyrDenoiseParams::getDefaultNoisCurve(std::vector &curve) +void DirPyrDenoiseParams::getDefaultNoisCurve (std::vector &curve) { double v[8] = { 0.05, 0.15, 0.35, 0.35, 0.55, 0.04, 0.35, 0.35 }; - curve.resize(9); - curve.at(0 ) = double(FCT_MinMaxCPoints); + curve.resize (9); + curve.at (0 ) = double (FCT_MinMaxCPoints); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } -void DirPyrDenoiseParams::getDefaultCCCurve(std::vector &curve) +void DirPyrDenoiseParams::getDefaultCCCurve (std::vector &curve) { // double v[8]= { 0.15, 0.00,0.35,0.35, // 0.60, 0.05,0.35,0.35}; @@ -801,11 +855,11 @@ void DirPyrDenoiseParams::getDefaultCCCurve(std::vector &curve) 0.35, 0.05, 0.35, 0.35 }; - curve.resize(9); - curve.at(0 ) = double(FCT_MinMaxCPoints); + curve.resize (9); + curve.at (0 ) = double (FCT_MinMaxCPoints); for (size_t i = 1; i < curve.size(); ++i) { - curve.at(i) = v[i - 1]; + curve.at (i) = v[i - 1]; } } @@ -813,13 +867,13 @@ void DirPyrDenoiseParams::getDefaultCCCurve(std::vector &curve) void DirPyrDenoiseParams::setDefaults() { - getDefaultNoisCurve(lcurve); - getDefaultCCCurve(cccurve); + getDefaultNoisCurve (lcurve); + getDefaultCCCurve (cccurve); enabled = false; enhance = false; median = false; - autochroma = false; + perform = false; luma = 0; passes = 1; dmethod = "Lab"; @@ -835,34 +889,35 @@ void DirPyrDenoiseParams::setDefaults() redchro = 0; bluechro = 0; gamma = 1.7; + perform = false; } -void DirPyrDenoiseParams::getCurves(NoiseCurve &lCurve, NoiseCurve &cCurve) const +void DirPyrDenoiseParams::getCurves (NoiseCurve &lCurve, NoiseCurve &cCurve) const { - lCurve.Set(this->lcurve); - cCurve.Set(this->cccurve); + lCurve.Set (this->lcurve); + cCurve.Set (this->cccurve); } void ToneCurveParams::setDefaults() { - autoexp = false; - clip = 0.02; - expcomp = 0; - brightness = 0; - contrast = 0; - saturation = 0; - black = 0; - hlcompr = 0; + autoexp = false; + clip = 0.02; + expcomp = 0; + brightness = 0; + contrast = 0; + saturation = 0; + black = 0; + hlcompr = 0; hlcomprthresh = 33; - shcompr = 50; + shcompr = 50; curve.clear (); - curve.push_back(DCT_Linear); + curve.push_back (DCT_Linear); curve2.clear (); - curve2.push_back(DCT_Linear); - curveMode = ToneCurveParams::TC_MODE_STD; - curveMode2 = ToneCurveParams::TC_MODE_STD; + curve2.push_back (DCT_Linear); + curveMode = ToneCurveParams::TC_MODE_STD; + curveMode2 = ToneCurveParams::TC_MODE_STD; hrenabled = false; - method = "Blend"; + method = "Blend"; } void LensProfParams::setDefaults() @@ -882,16 +937,49 @@ void CoarseTransformParams::setDefaults() void SpotParams::setDefaults() { enabled = false; - entries.clear(); + entries.clear (); +} + +void RAWParams::BayerSensor::setPixelShiftDefaults() +{ + pixelShiftMotion = 0; + pixelShiftMotionCorrection = RAWParams::BayerSensor::Grid3x3New; + pixelShiftMotionCorrectionMethod = RAWParams::BayerSensor::Automatic; + pixelShiftStddevFactorGreen = 5.0; + pixelShiftStddevFactorRed = 5.0; + pixelShiftStddevFactorBlue = 5.0; + pixelShiftEperIso = 0.0; + pixelShiftNreadIso = 0.0; + pixelShiftPrnu = 1.0; + pixelShiftSigma = 1.0; + pixelShiftSum = 3.0; + pixelShiftRedBlueWeight = 0.7; + pixelShiftAutomatic = true; + pixelShiftNonGreenHorizontal = false; + pixelShiftNonGreenVertical = false; + pixelShiftHoleFill = true; + pixelShiftMedian = false; + pixelShiftMedian3 = false; + pixelShiftGreen = true; + pixelShiftBlur = true; + pixelShiftSmoothFactor = 0.7; + pixelShiftExp0 = false; + pixelShiftLmmse = false; + pixelShiftEqualBright = false; + pixelShiftEqualBrightChannel = false; + pixelShiftNonGreenCross = true; + pixelShiftNonGreenCross2 = false; + pixelShiftNonGreenAmaze = false; } void RAWParams::setDefaults() { bayersensor.method = RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::amaze]; + bayersensor.imageNum = 0; bayersensor.ccSteps = 0; bayersensor.dcb_iterations = 2; bayersensor.dcb_enhance = true; - //bayersensor.all_enhance = false; +//bayersensor.all_enhance = false; bayersensor.lmmse_iterations = 2; bayersensor.black0 = 0.0; bayersensor.black1 = 0.0; @@ -917,27 +1005,29 @@ void RAWParams::setDefaults() ff_clipControl = 0; cared = 0; cablue = 0; - caautostrength = 2; ca_autocorrect = false; hotPixelFilter = false; deadPixelFilter = false; hotdeadpix_thresh = 100; + bayersensor.setPixelShiftDefaults(); + bayersensor.pixelShiftShowMotion = false; + bayersensor.pixelShiftShowMotionMaskOnly = false; + } void ColorManagementParams::setDefaults() { - input = "(cameraICC)"; - blendCMSMatrix = false; + input = "(cameraICC)"; toneCurve = false; applyLookTable = false; applyBaselineExposureOffset = true; applyHueSatMap = true; dcpIlluminant = 0; working = "ProPhoto"; - output = "RT_sRGB"; - outputIntent = RI_RELATIVE; + output = "RT_sRGB"; + outputIntent = RI_RELATIVE; outputBPC = true; - gamma = "default"; + gamma = "default"; gampos = 2.22; slpos = 4.5; freegamma = false; @@ -978,104 +1068,110 @@ void ProcParams::setDefaults () toneCurve.setDefaults(); - labCurve.brightness = 0; - labCurve.contrast = 0; - labCurve.chromaticity = 0; + labCurve.brightness = 0; + labCurve.contrast = 0; + labCurve.chromaticity = 0; labCurve.avoidcolorshift = false; labCurve.lcredsk = true; - labCurve.rstprotection = 0; + labCurve.rstprotection = 0; labCurve.lcurve.clear (); - labCurve.lcurve.push_back(DCT_Linear); + labCurve.lcurve.push_back (DCT_Linear); labCurve.acurve.clear (); - labCurve.acurve.push_back(DCT_Linear); + labCurve.acurve.push_back (DCT_Linear); labCurve.bcurve.clear (); - labCurve.bcurve.push_back(DCT_Linear); + labCurve.bcurve.push_back (DCT_Linear); labCurve.cccurve.clear (); - labCurve.cccurve.push_back(DCT_Linear); + labCurve.cccurve.push_back (DCT_Linear); labCurve.chcurve.clear (); - labCurve.chcurve.push_back(FCT_Linear); + labCurve.chcurve.push_back (FCT_Linear); labCurve.lhcurve.clear (); - labCurve.lhcurve.push_back(FCT_Linear); + labCurve.lhcurve.push_back (FCT_Linear); labCurve.hhcurve.clear (); - labCurve.hhcurve.push_back(FCT_Linear); + labCurve.hhcurve.push_back (FCT_Linear); labCurve.lccurve.clear (); - labCurve.lccurve.push_back(DCT_Linear); + labCurve.lccurve.push_back (DCT_Linear); labCurve.clcurve.clear (); - labCurve.clcurve.push_back(DCT_Linear); + labCurve.clcurve.push_back (DCT_Linear); - rgbCurves.lumamode = false; + rgbCurves.lumamode = false; rgbCurves.rcurve.clear (); - rgbCurves.rcurve.push_back(DCT_Linear); + rgbCurves.rcurve.push_back (DCT_Linear); rgbCurves.gcurve.clear (); - rgbCurves.gcurve.push_back(DCT_Linear); + rgbCurves.gcurve.push_back (DCT_Linear); rgbCurves.bcurve.clear (); - rgbCurves.bcurve.push_back(DCT_Linear); + rgbCurves.bcurve.push_back (DCT_Linear); colorToning.setDefaults(); - sharpenEdge.enabled = false; - sharpenEdge.passes = 2; - sharpenEdge.amount = 50.0; - sharpenEdge.threechannels = false; + sharpenEdge.enabled = false; + sharpenEdge.passes = 2; + sharpenEdge.amount = 50.0; + sharpenEdge.threechannels = false; - sharpenMicro.enabled = false; - sharpenMicro.amount = 20.0; - sharpenMicro.uniformity = 50.0; - sharpenMicro.matrix = false; + sharpenMicro.enabled = false; + sharpenMicro.amount = 20.0; + sharpenMicro.uniformity = 50.0; + sharpenMicro.matrix = false; - sharpening.enabled = false; - sharpening.radius = 0.5; - sharpening.amount = 200; - sharpening.threshold.setValues(20, 80, 2000, 1200); - sharpening.edgesonly = false; - sharpening.edges_radius = 1.9; - sharpening.edges_tolerance = 1800; - sharpening.halocontrol = false; + sharpening.enabled = false; + sharpening.radius = 0.5; + sharpening.amount = 200; + sharpening.threshold.setValues (20, 80, 2000, 1200); + sharpening.edgesonly = false; + sharpening.edges_radius = 1.9; + sharpening.edges_tolerance = 1800; + sharpening.halocontrol = false; sharpening.halocontrol_amount = 85; - sharpening.method = "usm"; - sharpening.deconvradius = 0.75; - sharpening.deconviter = 30; - sharpening.deconvdamping = 20; - sharpening.deconvamount = 75; + sharpening.method = "usm"; + sharpening.deconvradius = 0.75; + sharpening.deconviter = 30; + sharpening.deconvdamping = 20; + sharpening.deconvamount = 75; - prsharpening.enabled = false; - prsharpening.radius = 0.5; - prsharpening.amount = 200; - prsharpening.threshold.setValues(20, 80, 2000, 1200); - prsharpening.edgesonly = false; - prsharpening.edges_radius = 1.9; - prsharpening.edges_tolerance = 1800; - prsharpening.halocontrol = false; + prsharpening.enabled = false; + prsharpening.radius = 0.5; + prsharpening.amount = 200; + prsharpening.threshold.setValues (20, 80, 2000, 1200); + prsharpening.edgesonly = false; + prsharpening.edges_radius = 1.9; + prsharpening.edges_tolerance = 1800; + prsharpening.halocontrol = false; prsharpening.halocontrol_amount = 85; - prsharpening.method = "rld"; - prsharpening.deconvradius = 0.45; - prsharpening.deconviter = 100; - prsharpening.deconvdamping = 0; - prsharpening.deconvamount = 100; + prsharpening.method = "rld"; + prsharpening.deconvradius = 0.45; + prsharpening.deconviter = 100; + prsharpening.deconvdamping = 0; + prsharpening.deconvamount = 100; - vibrance.enabled = false; - vibrance.pastels = 0; - vibrance.saturated = 0; - vibrance.psthreshold.setValues(0, 75); - vibrance.protectskins = false; - vibrance.avoidcolorshift = true; - vibrance.pastsattog = true; + vibrance.enabled = false; + vibrance.pastels = 0; + vibrance.saturated = 0; + vibrance.psthreshold.setValues (0, 75); + vibrance.protectskins = false; + vibrance.avoidcolorshift = true; + vibrance.pastsattog = true; vibrance.skintonescurve.clear (); - vibrance.skintonescurve.push_back(DCT_Linear); + vibrance.skintonescurve.push_back (DCT_Linear); wb.method = "Camera"; wb.temperature = 6504; wb.green = 1.0; wb.equal = 1.0; + wb.tempBias = 0.0; colorappearance.enabled = false; colorappearance.degree = 90; colorappearance.autodegree = true; + colorappearance.degreeout = 90; + colorappearance.autodegreeout = true; colorappearance.surround = "Average"; + colorappearance.surrsrc = "Average"; colorappearance.adaplum = 16; colorappearance.badpixsl = 0; colorappearance.adapscen = 2000.0; colorappearance.autoadapscen = true; + colorappearance.ybscen = 18; + colorappearance.autoybscen = true; colorappearance.algo = "No"; colorappearance.wbmodel = "RawT"; colorappearance.jlight = 0.0; @@ -1084,57 +1180,62 @@ void ProcParams::setDefaults () colorappearance.schroma = 0.0; colorappearance.mchroma = 0.0; colorappearance.rstprotection = 0.0; - colorappearance.contrast = 0.0; - colorappearance.qcontrast = 0.0; - colorappearance.colorh = 0.0; - colorappearance.surrsource = false; - colorappearance.gamut = true; -// colorappearance.badpix = false; - colorappearance.datacie = false; - colorappearance.tonecie = false; -// colorappearance.sharpcie = false; + colorappearance.contrast = 0.0; + colorappearance.qcontrast = 0.0; + colorappearance.colorh = 0.0; + colorappearance.surrsource = false; + colorappearance.gamut = true; +// colorappearance.badpix = false; + colorappearance.datacie = false; + colorappearance.tonecie = false; +// colorappearance.sharpcie = false; colorappearance.curve.clear (); - colorappearance.curve.push_back(DCT_Linear); + colorappearance.curve.push_back (DCT_Linear); colorappearance.curve2.clear (); - colorappearance.curve2.push_back(DCT_Linear); - colorappearance.curveMode = ColorAppearanceParams::TC_MODE_LIGHT; - colorappearance.curveMode2 = ColorAppearanceParams::TC_MODE_LIGHT; + colorappearance.curve2.push_back (DCT_Linear); + colorappearance.curveMode = ColorAppearanceParams::TC_MODE_LIGHT; + colorappearance.curveMode2 = ColorAppearanceParams::TC_MODE_LIGHT; colorappearance.curve3.clear (); - colorappearance.curve3.push_back(DCT_Linear); + colorappearance.curve3.push_back (DCT_Linear); colorappearance.curveMode3 = ColorAppearanceParams::TC_MODE_CHROMA; + colorappearance.tempout = 5000; + colorappearance.greenout = 1.0; + colorappearance.ybout = 18; + colorappearance.tempsc = 5000; + colorappearance.greensc = 1.0; - impulseDenoise.enabled = false; - impulseDenoise.thresh = 50; + impulseDenoise.enabled = false; + impulseDenoise.thresh = 50; - defringe.enabled = false; - defringe.radius = 2.0; - defringe.threshold = 13; + defringe.enabled = false; + defringe.radius = 2.0; + defringe.threshold = 13; defringe.huecurve.resize (25); - defringe.huecurve.at(0) = FCT_MinMaxCPoints; - defringe.huecurve.at(1) = 0.166666667; - defringe.huecurve.at(2) = 0.; - defringe.huecurve.at(3) = 0.35; - defringe.huecurve.at(4) = 0.35; - defringe.huecurve.at(5) = 0.347; - defringe.huecurve.at(6) = 0.; - defringe.huecurve.at(7) = 0.35; - defringe.huecurve.at(8) = 0.35; - defringe.huecurve.at(9) = 0.513667426; - defringe.huecurve.at(10) = 0; - defringe.huecurve.at(11) = 0.35; - defringe.huecurve.at(12) = 0.35; - defringe.huecurve.at(13) = 0.668944571; - defringe.huecurve.at(14) = 0.; - defringe.huecurve.at(15) = 0.35; - defringe.huecurve.at(16) = 0.35; - defringe.huecurve.at(17) = 0.8287775246; - defringe.huecurve.at(18) = 0.97835991; - defringe.huecurve.at(19) = 0.35; - defringe.huecurve.at(20) = 0.35; - defringe.huecurve.at(21) = 0.9908883827; - defringe.huecurve.at(22) = 0.; - defringe.huecurve.at(23) = 0.35; - defringe.huecurve.at(24) = 0.35; + defringe.huecurve.at (0) = FCT_MinMaxCPoints; + defringe.huecurve.at (1) = 0.166666667; + defringe.huecurve.at (2) = 0.; + defringe.huecurve.at (3) = 0.35; + defringe.huecurve.at (4) = 0.35; + defringe.huecurve.at (5) = 0.347; + defringe.huecurve.at (6) = 0.; + defringe.huecurve.at (7) = 0.35; + defringe.huecurve.at (8) = 0.35; + defringe.huecurve.at (9) = 0.513667426; + defringe.huecurve.at (10) = 0; + defringe.huecurve.at (11) = 0.35; + defringe.huecurve.at (12) = 0.35; + defringe.huecurve.at (13) = 0.668944571; + defringe.huecurve.at (14) = 0.; + defringe.huecurve.at (15) = 0.35; + defringe.huecurve.at (16) = 0.35; + defringe.huecurve.at (17) = 0.8287775246; + defringe.huecurve.at (18) = 0.97835991; + defringe.huecurve.at (19) = 0.35; + defringe.huecurve.at (20) = 0.35; + defringe.huecurve.at (21) = 0.9908883827; + defringe.huecurve.at (22) = 0.; + defringe.huecurve.at (23) = 0.35; + defringe.huecurve.at (24) = 0.35; dirpyrDenoise.setDefaults(); @@ -1142,38 +1243,38 @@ void ProcParams::setDefaults () epd.strength = 0.5; epd.gamma = 1.0; epd.edgeStopping = 1.4; - epd.scale = 0.3; + epd.scale = 1.0; epd.reweightingIterates = 0; - sh.enabled = false; - sh.hq = false; - sh.highlights = 0; - sh.htonalwidth = 80; - sh.shadows = 0; - sh.stonalwidth = 80; + sh.enabled = false; + sh.hq = false; + sh.highlights = 0; + sh.htonalwidth = 80; + sh.shadows = 0; + sh.stonalwidth = 80; sh.localcontrast = 0; - sh.radius = 40; + sh.radius = 40; - crop.enabled = false; - crop.x = -1; - crop.y = -1; - crop.w = 15000; - crop.h = 15000; - crop.fixratio = true; - crop.ratio = "3:2"; + crop.enabled = false; + crop.x = -1; + crop.y = -1; + crop.w = 15000; + crop.h = 15000; + crop.fixratio = true; + crop.ratio = "3:2"; crop.orientation = "As Image"; - crop.guide = "Frame"; + crop.guide = "Frame"; coarse.setDefaults(); commonTrans.autofill = true; - rotate.degree = 0; + rotate.degree = 0; - distortion.amount = 0; + distortion.amount = 0; perspective.horizontal = 0; - perspective.vertical = 0; + perspective.vertical = 0; gradient.enabled = false; gradient.degree = 0; @@ -1187,7 +1288,7 @@ void ProcParams::setDefaults () pcvignette.feather = 50; pcvignette.roundness = 50; - cacorrection.red = 0; + cacorrection.red = 0; cacorrection.blue = 0; @@ -1199,29 +1300,29 @@ void ProcParams::setDefaults () lensProf.setDefaults(); - chmixer.red[0] = 100; - chmixer.red[1] = 0; - chmixer.red[2] = 0; + chmixer.red[0] = 100; + chmixer.red[1] = 0; + chmixer.red[2] = 0; chmixer.green[0] = 0; chmixer.green[1] = 100; chmixer.green[2] = 0; - chmixer.blue[0] = 0; - chmixer.blue[1] = 0; - chmixer.blue[2] = 100; + chmixer.blue[0] = 0; + chmixer.blue[1] = 0; + chmixer.blue[2] = 100; - blackwhite.autoc = false; - blackwhite.enabledcc = true; - blackwhite.enabled = false; - blackwhite.mixerRed = 33; - blackwhite.mixerGreen = 33; - blackwhite.mixerBlue = 33; + blackwhite.autoc = false; + blackwhite.enabledcc = true; + blackwhite.enabled = false; + blackwhite.mixerRed = 33; + blackwhite.mixerGreen = 33; + blackwhite.mixerBlue = 33; blackwhite.mixerOrange = 33; blackwhite.mixerYellow = 33; - blackwhite.mixerCyan = 33; - blackwhite.mixerMagenta = 33; + blackwhite.mixerCyan = 33; + blackwhite.mixerMagenta = 33; blackwhite.mixerPurple = 33; - blackwhite.gammaRed = 0; - blackwhite.gammaGreen = 0; + blackwhite.gammaRed = 0; + blackwhite.gammaGreen = 0; blackwhite.gammaBlue = 0; blackwhite.luminanceCurve.clear (); blackwhite.luminanceCurve.push_back (FCT_Linear); @@ -1229,15 +1330,15 @@ void ProcParams::setDefaults () blackwhite.filter = "None"; blackwhite.setting = "NormalContrast"; blackwhite.beforeCurve.clear (); - blackwhite.beforeCurve.push_back(DCT_Linear); - blackwhite.beforeCurveMode = BlackWhiteParams::TC_MODE_STD_BW; + blackwhite.beforeCurve.push_back (DCT_Linear); + blackwhite.beforeCurveMode = BlackWhiteParams::TC_MODE_STD_BW; blackwhite.afterCurve.clear (); - blackwhite.afterCurve.push_back(DCT_Linear); - blackwhite.afterCurveMode = BlackWhiteParams::TC_MODE_STD_BW; - blackwhite.algo = "SP"; + blackwhite.afterCurve.push_back (DCT_Linear); + blackwhite.afterCurveMode = BlackWhiteParams::TC_MODE_STD_BW; + blackwhite.algo = "SP"; resize.enabled = false; - resize.scale = 1.0; + resize.scale = 1.0; resize.appliesTo = "Cropped area"; resize.method = "Lanczos"; resize.dataspec = 3; @@ -1251,14 +1352,14 @@ void ProcParams::setDefaults () dirpyrequalizer.cbdlMethod = "bef"; - for(int i = 0; i < 6; i ++) { + for (int i = 0; i < 6; i ++) { dirpyrequalizer.mult[i] = 1.0; } dirpyrequalizer.threshold = 0.2; dirpyrequalizer.skinprotect = 0.; - dirpyrequalizer.hueskin.setValues(-5, 25, 170, 120); //default (b_l 0, t_l 30, b_r 170, t_r 120); -// dirpyrequalizer.algo = "FI"; + dirpyrequalizer.hueskin.setValues (-5, 25, 170, 120); //default (b_l 0, t_l 30, b_r 170, t_r 120); +// dirpyrequalizer.algo = "FI"; hsvequalizer.hcurve.clear (); hsvequalizer.hcurve.push_back (FCT_Linear); @@ -1281,54 +1382,54 @@ void ProcParams::setDefaults () ppVersion = PPVERSION; } -static Glib::ustring expandRelativePath(const Glib::ustring &procparams_fname, const Glib::ustring &prefix, Glib::ustring embedded_fname) +static Glib::ustring expandRelativePath (const Glib::ustring &procparams_fname, const Glib::ustring &prefix, Glib::ustring embedded_fname) { - if (embedded_fname == "" || !Glib::path_is_absolute(procparams_fname)) { + if (embedded_fname == "" || !Glib::path_is_absolute (procparams_fname)) { return embedded_fname; } if (prefix != "") { - if (embedded_fname.length() < prefix.length() || embedded_fname.substr(0, prefix.length()) != prefix) { + if (embedded_fname.length() < prefix.length() || embedded_fname.substr (0, prefix.length()) != prefix) { return embedded_fname; } - embedded_fname = embedded_fname.substr(prefix.length()); + embedded_fname = embedded_fname.substr (prefix.length()); } - if (Glib::path_is_absolute(embedded_fname)) { + if (Glib::path_is_absolute (embedded_fname)) { return prefix + embedded_fname; } - Glib::ustring absPath = prefix + Glib::path_get_dirname(procparams_fname) + G_DIR_SEPARATOR_S + embedded_fname; + Glib::ustring absPath = prefix + Glib::path_get_dirname (procparams_fname) + G_DIR_SEPARATOR_S + embedded_fname; return absPath; } -static Glib::ustring relativePathIfInside(const Glib::ustring &procparams_fname, bool fnameAbsolute, Glib::ustring embedded_fname) +static Glib::ustring relativePathIfInside (const Glib::ustring &procparams_fname, bool fnameAbsolute, Glib::ustring embedded_fname) { - if (fnameAbsolute || embedded_fname == "" || !Glib::path_is_absolute(procparams_fname)) { + if (fnameAbsolute || embedded_fname == "" || !Glib::path_is_absolute (procparams_fname)) { return embedded_fname; } Glib::ustring prefix = ""; - if (embedded_fname.length() > 5 && embedded_fname.substr(0, 5) == "file:") { - embedded_fname = embedded_fname.substr(5); + if (embedded_fname.length() > 5 && embedded_fname.substr (0, 5) == "file:") { + embedded_fname = embedded_fname.substr (5); prefix = "file:"; } - if (!Glib::path_is_absolute(embedded_fname)) { + if (!Glib::path_is_absolute (embedded_fname)) { return prefix + embedded_fname; } - Glib::ustring dir1 = Glib::path_get_dirname(procparams_fname) + G_DIR_SEPARATOR_S; - Glib::ustring dir2 = Glib::path_get_dirname(embedded_fname) + G_DIR_SEPARATOR_S; + Glib::ustring dir1 = Glib::path_get_dirname (procparams_fname) + G_DIR_SEPARATOR_S; + Glib::ustring dir2 = Glib::path_get_dirname (embedded_fname) + G_DIR_SEPARATOR_S; - if (dir2.substr(0, dir1.length()) != dir1) { + if (dir2.substr (0, dir1.length()) != dir1) { // it's in a different directory, ie not inside return prefix + embedded_fname; } - return prefix + embedded_fname.substr(dir1.length()); + return prefix + embedded_fname.substr (dir1.length()); } int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, bool fnameAbsolute, ParamsEdited* pedited) @@ -1344,11 +1445,11 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b Glib::KeyFile keyFile; - keyFile.set_string ("Version", "AppVersion", APPVERSION); - keyFile.set_integer ("Version", "Version", PPVERSION); + keyFile.set_string ("Version", "AppVersion", APPVERSION); + keyFile.set_integer ("Version", "Version", PPVERSION); if (!pedited || pedited->general.rank) { - keyFile.set_integer ("General", "Rank", rank); + keyFile.set_integer ("General", "Rank", rank); } if (!pedited || pedited->general.colorlabel) { @@ -1356,36 +1457,36 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->general.intrash) { - keyFile.set_boolean ("General", "InTrash", inTrash); + keyFile.set_boolean ("General", "InTrash", inTrash); } - // save tone curve +// save tone curve if (!pedited || pedited->toneCurve.autoexp) { - keyFile.set_boolean ("Exposure", "Auto", toneCurve.autoexp); + keyFile.set_boolean ("Exposure", "Auto", toneCurve.autoexp); } if (!pedited || pedited->toneCurve.clip) { - keyFile.set_double ("Exposure", "Clip", toneCurve.clip); + keyFile.set_double ("Exposure", "Clip", toneCurve.clip); } if (!pedited || pedited->toneCurve.expcomp) { - keyFile.set_double ("Exposure", "Compensation", toneCurve.expcomp); + keyFile.set_double ("Exposure", "Compensation", toneCurve.expcomp); } if (!pedited || pedited->toneCurve.brightness) { - keyFile.set_integer ("Exposure", "Brightness", toneCurve.brightness); + keyFile.set_integer ("Exposure", "Brightness", toneCurve.brightness); } if (!pedited || pedited->toneCurve.contrast) { - keyFile.set_integer ("Exposure", "Contrast", toneCurve.contrast); + keyFile.set_integer ("Exposure", "Contrast", toneCurve.contrast); } if (!pedited || pedited->toneCurve.saturation) { - keyFile.set_integer ("Exposure", "Saturation", toneCurve.saturation); + keyFile.set_integer ("Exposure", "Saturation", toneCurve.saturation); } if (!pedited || pedited->toneCurve.black) { - keyFile.set_integer ("Exposure", "Black", toneCurve.black); + keyFile.set_integer ("Exposure", "Black", toneCurve.black); } if (!pedited || pedited->toneCurve.hlcompr) { @@ -1397,124 +1498,124 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->toneCurve.shcompr) { - keyFile.set_integer ("Exposure", "ShadowCompr", toneCurve.shcompr); + keyFile.set_integer ("Exposure", "ShadowCompr", toneCurve.shcompr); } - // save highlight recovery settings +// save highlight recovery settings if (!pedited || pedited->toneCurve.hrenabled) { - keyFile.set_boolean ("HLRecovery", "Enabled", toneCurve.hrenabled); + keyFile.set_boolean ("HLRecovery", "Enabled", toneCurve.hrenabled); } if (!pedited || pedited->toneCurve.method) { - keyFile.set_string ("HLRecovery", "Method", toneCurve.method); + keyFile.set_string ("HLRecovery", "Method", toneCurve.method); } - if (!pedited || pedited->toneCurve.curveMode) { + if (!pedited || pedited->toneCurve.curveMode) { Glib::ustring method; switch (toneCurve.curveMode) { - case (ToneCurveParams::TC_MODE_STD): - method = "Standard"; - break; + case (ToneCurveParams::TC_MODE_STD): + method = "Standard"; + break; - case (ToneCurveParams::TC_MODE_FILMLIKE): - method = "FilmLike"; - break; + case (ToneCurveParams::TC_MODE_FILMLIKE): + method = "FilmLike"; + break; - case (ToneCurveParams::TC_MODE_SATANDVALBLENDING): - method = "SatAndValueBlending"; - break; + case (ToneCurveParams::TC_MODE_SATANDVALBLENDING): + method = "SatAndValueBlending"; + break; - case (ToneCurveParams::TC_MODE_WEIGHTEDSTD): - method = "WeightedStd"; - break; + case (ToneCurveParams::TC_MODE_WEIGHTEDSTD): + method = "WeightedStd"; + break; - case (ToneCurveParams::TC_MODE_LUMINANCE): - method = "Luminance"; - break; + case (ToneCurveParams::TC_MODE_LUMINANCE): + method = "Luminance"; + break; - case (ToneCurveParams::TC_MODE_PERCEPTUAL): - method = "Perceptual"; - break; + case (ToneCurveParams::TC_MODE_PERCEPTUAL): + method = "Perceptual"; + break; } - keyFile.set_string ("Exposure", "CurveMode", method); + keyFile.set_string ("Exposure", "CurveMode", method); } - if (!pedited || pedited->toneCurve.curveMode2) { + if (!pedited || pedited->toneCurve.curveMode2) { Glib::ustring method; switch (toneCurve.curveMode2) { - case (ToneCurveParams::TC_MODE_STD): - method = "Standard"; - break; + case (ToneCurveParams::TC_MODE_STD): + method = "Standard"; + break; - case (ToneCurveParams::TC_MODE_FILMLIKE): - method = "FilmLike"; - break; + case (ToneCurveParams::TC_MODE_FILMLIKE): + method = "FilmLike"; + break; - case (ToneCurveParams::TC_MODE_SATANDVALBLENDING): - method = "SatAndValueBlending"; - break; + case (ToneCurveParams::TC_MODE_SATANDVALBLENDING): + method = "SatAndValueBlending"; + break; - case (ToneCurveParams::TC_MODE_WEIGHTEDSTD): - method = "WeightedStd"; - break; + case (ToneCurveParams::TC_MODE_WEIGHTEDSTD): + method = "WeightedStd"; + break; - case (ToneCurveParams::TC_MODE_LUMINANCE): - method = "Luminance"; - break; + case (ToneCurveParams::TC_MODE_LUMINANCE): + method = "Luminance"; + break; - case (ToneCurveParams::TC_MODE_PERCEPTUAL): - method = "Perceptual"; - break; + case (ToneCurveParams::TC_MODE_PERCEPTUAL): + method = "Perceptual"; + break; } - keyFile.set_string ("Exposure", "CurveMode2", method); + keyFile.set_string ("Exposure", "CurveMode2", method); } if (!pedited || pedited->toneCurve.curve) { Glib::ArrayHandle tcurve = toneCurve.curve; - keyFile.set_double_list("Exposure", "Curve", tcurve); + keyFile.set_double_list ("Exposure", "Curve", tcurve); } if (!pedited || pedited->toneCurve.curve2) { Glib::ArrayHandle tcurve = toneCurve.curve2; - keyFile.set_double_list("Exposure", "Curve2", tcurve); + keyFile.set_double_list ("Exposure", "Curve2", tcurve); } - //save retinex +//save retinex if (!pedited || pedited->retinex.enabled) { keyFile.set_boolean ("Retinex", "Enabled", retinex.enabled); } if (!pedited || pedited->retinex.str) { - keyFile.set_integer ("Retinex", "Str", retinex.str); + keyFile.set_integer ("Retinex", "Str", retinex.str); } if (!pedited || pedited->retinex.scal) { - keyFile.set_integer ("Retinex", "Scal", retinex.scal); + keyFile.set_integer ("Retinex", "Scal", retinex.scal); } if (!pedited || pedited->retinex.iter) { - keyFile.set_integer ("Retinex", "Iter", retinex.iter); + keyFile.set_integer ("Retinex", "Iter", retinex.iter); } if (!pedited || pedited->retinex.grad) { - keyFile.set_integer ("Retinex", "Grad", retinex.grad); + keyFile.set_integer ("Retinex", "Grad", retinex.grad); } if (!pedited || pedited->retinex.grads) { - keyFile.set_integer ("Retinex", "Grads", retinex.grads); + keyFile.set_integer ("Retinex", "Grads", retinex.grads); } if (!pedited || pedited->retinex.gam) { - keyFile.set_double ("Retinex", "Gam", retinex.gam); + keyFile.set_double ("Retinex", "Gam", retinex.gam); } if (!pedited || pedited->retinex.slope) { - keyFile.set_double ("Retinex", "Slope", retinex.slope); + keyFile.set_double ("Retinex", "Slope", retinex.slope); } if (!pedited || pedited->retinex.medianmap) { @@ -1524,79 +1625,71 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b if (!pedited || pedited->retinex.neigh) { - keyFile.set_integer ("Retinex", "Neigh", retinex.neigh); - } - - if (!pedited || pedited->retinex.gain) { - keyFile.set_integer ("Retinex", "Gain", retinex.gain); + keyFile.set_integer ("Retinex", "Neigh", retinex.neigh); } if (!pedited || pedited->retinex.offs) { - keyFile.set_integer ("Retinex", "Offs", retinex.offs); + keyFile.set_integer ("Retinex", "Offs", retinex.offs); } if (!pedited || pedited->retinex.vart) { - keyFile.set_integer ("Retinex", "Vart", retinex.vart); + keyFile.set_integer ("Retinex", "Vart", retinex.vart); } if (!pedited || pedited->retinex.limd) { - keyFile.set_integer ("Retinex", "Limd", retinex.limd); + keyFile.set_integer ("Retinex", "Limd", retinex.limd); } if (!pedited || pedited->retinex.highl) { - keyFile.set_integer ("Retinex", "highl", retinex.highl); - } - - if (!pedited || pedited->retinex.baselog) { - keyFile.set_double ("Retinex", "baselog", retinex.baselog); + keyFile.set_integer ("Retinex", "highl", retinex.highl); } if (!pedited || pedited->retinex.skal) { - keyFile.set_integer ("Retinex", "skal", retinex.skal); + keyFile.set_integer ("Retinex", "skal", retinex.skal); } if (!pedited || pedited->retinex.retinexMethod) { - keyFile.set_string ("Retinex", "RetinexMethod", retinex.retinexMethod); + keyFile.set_string ("Retinex", "RetinexMethod", retinex.retinexMethod); } if (!pedited || pedited->retinex.mapMethod) { - keyFile.set_string ("Retinex", "mapMethod", retinex.mapMethod); + keyFile.set_string ("Retinex", "mapMethod", retinex.mapMethod); } if (!pedited || pedited->retinex.viewMethod) { - keyFile.set_string ("Retinex", "viewMethod", retinex.viewMethod); + keyFile.set_string ("Retinex", "viewMethod", retinex.viewMethod); } if (!pedited || pedited->retinex.retinexcolorspace) { - keyFile.set_string ("Retinex", "Retinexcolorspace", retinex.retinexcolorspace); + keyFile.set_string ("Retinex", "Retinexcolorspace", retinex.retinexcolorspace); } if (!pedited || pedited->retinex.gammaretinex) { - keyFile.set_string ("Retinex", "Gammaretinex", retinex.gammaretinex); + keyFile.set_string ("Retinex", "Gammaretinex", retinex.gammaretinex); } - if (!pedited || pedited->retinex.cdcurve) { + if (!pedited || pedited->retinex.cdcurve) { Glib::ArrayHandle cdcurve = retinex.cdcurve; - keyFile.set_double_list("Retinex", "CDCurve", cdcurve); + keyFile.set_double_list ("Retinex", "CDCurve", cdcurve); } - if (!pedited || pedited->retinex.mapcurve) { + if (!pedited || pedited->retinex.mapcurve) { Glib::ArrayHandle mapcurve = retinex.mapcurve; - keyFile.set_double_list("Retinex", "MAPCurve", mapcurve); + keyFile.set_double_list ("Retinex", "MAPCurve", mapcurve); } - if (!pedited || pedited->retinex.cdHcurve) { + if (!pedited || pedited->retinex.cdHcurve) { Glib::ArrayHandle cdHcurve = retinex.cdHcurve; - keyFile.set_double_list("Retinex", "CDHCurve", cdHcurve); + keyFile.set_double_list ("Retinex", "CDHCurve", cdHcurve); } - if (!pedited || pedited->retinex.lhcurve) { + if (!pedited || pedited->retinex.lhcurve) { Glib::ArrayHandle lhcurve = retinex.lhcurve; - keyFile.set_double_list("Retinex", "LHCurve", lhcurve); + keyFile.set_double_list ("Retinex", "LHCurve", lhcurve); } if (!pedited || pedited->retinex.highlights) { - keyFile.set_integer ("Retinex", "Highlights", retinex.highlights); + keyFile.set_integer ("Retinex", "Highlights", retinex.highlights); } if (!pedited || pedited->retinex.htonalwidth) { @@ -1604,54 +1697,54 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->retinex.shadows) { - keyFile.set_integer ("Retinex", "Shadows", retinex.shadows); + keyFile.set_integer ("Retinex", "Shadows", retinex.shadows); } if (!pedited || pedited->retinex.stonalwidth) { - keyFile.set_integer ("Retinex", "ShadowTonalWidth", retinex.stonalwidth); + keyFile.set_integer ("Retinex", "ShadowTonalWidth", retinex.stonalwidth); } if (!pedited || pedited->retinex.radius) { - keyFile.set_integer ("Retinex", "Radius", retinex.radius); + keyFile.set_integer ("Retinex", "Radius", retinex.radius); } - if (!pedited || pedited->retinex.transmissionCurve) { + if (!pedited || pedited->retinex.transmissionCurve) { Glib::ArrayHandle transmissionCurve = retinex.transmissionCurve; - keyFile.set_double_list("Retinex", "TransmissionCurve", transmissionCurve); + keyFile.set_double_list ("Retinex", "TransmissionCurve", transmissionCurve); } - if (!pedited || pedited->retinex.gaintransmissionCurve) { + if (!pedited || pedited->retinex.gaintransmissionCurve) { Glib::ArrayHandle gaintransmissionCurve = retinex.gaintransmissionCurve; - keyFile.set_double_list("Retinex", "GainTransmissionCurve", gaintransmissionCurve); + keyFile.set_double_list ("Retinex", "GainTransmissionCurve", gaintransmissionCurve); } - // save channel mixer +// save channel mixer if (!pedited || pedited->chmixer.red[0] || pedited->chmixer.red[1] || pedited->chmixer.red[2]) { Glib::ArrayHandle rmix (chmixer.red, 3, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Channel Mixer", "Red", rmix); + keyFile.set_integer_list ("Channel Mixer", "Red", rmix); } if (!pedited || pedited->chmixer.green[0] || pedited->chmixer.green[1] || pedited->chmixer.green[2]) { Glib::ArrayHandle gmix (chmixer.green, 3, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Channel Mixer", "Green", gmix); + keyFile.set_integer_list ("Channel Mixer", "Green", gmix); } if (!pedited || pedited->chmixer.blue[0] || pedited->chmixer.blue[1] || pedited->chmixer.blue[2]) { Glib::ArrayHandle bmix (chmixer.blue, 3, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Channel Mixer", "Blue", bmix); + keyFile.set_integer_list ("Channel Mixer", "Blue", bmix); } - //save Black & White +//save Black & White if (!pedited || pedited->blackwhite.enabled) { - keyFile.set_boolean ("Black & White", "Enabled", blackwhite.enabled); + keyFile.set_boolean ("Black & White", "Enabled", blackwhite.enabled); } if (!pedited || pedited->blackwhite.method) { - keyFile.set_string ("Black & White", "Method", blackwhite.method ); + keyFile.set_string ("Black & White", "Method", blackwhite.method ); } if (!pedited || pedited->blackwhite.autoc) { - keyFile.set_boolean ("Black & White", "Auto", blackwhite.autoc); + keyFile.set_boolean ("Black & White", "Auto", blackwhite.autoc); } if (!pedited || pedited->blackwhite.enabledcc) { @@ -1659,267 +1752,267 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->blackwhite.setting) { - keyFile.set_string ("Black & White", "Setting", blackwhite.setting ); + keyFile.set_string ("Black & White", "Setting", blackwhite.setting ); } if (!pedited || pedited->blackwhite.filter) { - keyFile.set_string ("Black & White", "Filter", blackwhite.filter ); + keyFile.set_string ("Black & White", "Filter", blackwhite.filter ); } if (!pedited || pedited->blackwhite.mixerRed) { - keyFile.set_integer ("Black & White", "MixerRed", blackwhite.mixerRed); + keyFile.set_integer ("Black & White", "MixerRed", blackwhite.mixerRed); } if (!pedited || pedited->blackwhite.mixerOrange) { - keyFile.set_integer ("Black & White", "MixerOrange", blackwhite.mixerOrange); + keyFile.set_integer ("Black & White", "MixerOrange", blackwhite.mixerOrange); } if (!pedited || pedited->blackwhite.mixerYellow) { - keyFile.set_integer ("Black & White", "MixerYellow", blackwhite.mixerYellow); + keyFile.set_integer ("Black & White", "MixerYellow", blackwhite.mixerYellow); } if (!pedited || pedited->blackwhite.mixerGreen) { - keyFile.set_integer ("Black & White", "MixerGreen", blackwhite.mixerGreen); + keyFile.set_integer ("Black & White", "MixerGreen", blackwhite.mixerGreen); } if (!pedited || pedited->blackwhite.mixerCyan) { - keyFile.set_integer ("Black & White", "MixerCyan", blackwhite.mixerCyan); + keyFile.set_integer ("Black & White", "MixerCyan", blackwhite.mixerCyan); } if (!pedited || pedited->blackwhite.mixerBlue) { - keyFile.set_integer ("Black & White", "MixerBlue", blackwhite.mixerBlue); + keyFile.set_integer ("Black & White", "MixerBlue", blackwhite.mixerBlue); } if (!pedited || pedited->blackwhite.mixerMagenta) { - keyFile.set_integer ("Black & White", "MixerMagenta", blackwhite.mixerMagenta); + keyFile.set_integer ("Black & White", "MixerMagenta", blackwhite.mixerMagenta); } if (!pedited || pedited->blackwhite.mixerPurple) { - keyFile.set_integer ("Black & White", "MixerPurple", blackwhite.mixerPurple); + keyFile.set_integer ("Black & White", "MixerPurple", blackwhite.mixerPurple); } if (!pedited || pedited->blackwhite.gammaRed) { - keyFile.set_integer ("Black & White", "GammaRed", blackwhite.gammaRed); + keyFile.set_integer ("Black & White", "GammaRed", blackwhite.gammaRed); } if (!pedited || pedited->blackwhite.gammaGreen) { - keyFile.set_integer ("Black & White", "GammaGreen", blackwhite.gammaGreen); + keyFile.set_integer ("Black & White", "GammaGreen", blackwhite.gammaGreen); } if (!pedited || pedited->blackwhite.gammaBlue) { - keyFile.set_integer ("Black & White", "GammaBlue", blackwhite.gammaBlue); + keyFile.set_integer ("Black & White", "GammaBlue", blackwhite.gammaBlue); } if (!pedited || pedited->blackwhite.algo) { - keyFile.set_string ("Black & White", "Algorithm", blackwhite.algo); + keyFile.set_string ("Black & White", "Algorithm", blackwhite.algo); } if (!pedited || pedited->blackwhite.luminanceCurve) { Glib::ArrayHandle luminanceCurve = blackwhite.luminanceCurve; - keyFile.set_double_list("Black & White", "LuminanceCurve", luminanceCurve); + keyFile.set_double_list ("Black & White", "LuminanceCurve", luminanceCurve); } if (!pedited || pedited->blackwhite.beforeCurveMode) { Glib::ustring mode; switch (blackwhite.beforeCurveMode) { - case (BlackWhiteParams::TC_MODE_STD_BW): - mode = "Standard"; - break; + case (BlackWhiteParams::TC_MODE_STD_BW): + mode = "Standard"; + break; - case (BlackWhiteParams::TC_MODE_FILMLIKE_BW): - mode = "FilmLike"; - break; + case (BlackWhiteParams::TC_MODE_FILMLIKE_BW): + mode = "FilmLike"; + break; - case (BlackWhiteParams::TC_MODE_SATANDVALBLENDING_BW): - mode = "SatAndValueBlending"; - break; + case (BlackWhiteParams::TC_MODE_SATANDVALBLENDING_BW): + mode = "SatAndValueBlending"; + break; - case (BlackWhiteParams::TC_MODE_WEIGHTEDSTD_BW): - mode = "WeightedStd"; - break; + case (BlackWhiteParams::TC_MODE_WEIGHTEDSTD_BW): + mode = "WeightedStd"; + break; } - keyFile.set_string ("Black & White", "BeforeCurveMode", mode); + keyFile.set_string ("Black & White", "BeforeCurveMode", mode); } if (!pedited || pedited->blackwhite.afterCurveMode) { Glib::ustring mode; switch (blackwhite.afterCurveMode) { - case (BlackWhiteParams::TC_MODE_STD_BW): - mode = "Standard"; - break; + case (BlackWhiteParams::TC_MODE_STD_BW): + mode = "Standard"; + break; - case (BlackWhiteParams::TC_MODE_WEIGHTEDSTD_BW): - mode = "WeightedStd"; - break; + case (BlackWhiteParams::TC_MODE_WEIGHTEDSTD_BW): + mode = "WeightedStd"; + break; - default: - break; + default: + break; } - keyFile.set_string ("Black & White", "AfterCurveMode", mode); + keyFile.set_string ("Black & White", "AfterCurveMode", mode); } if (!pedited || pedited->blackwhite.beforeCurve) { Glib::ArrayHandle tcurvebw = blackwhite.beforeCurve; - keyFile.set_double_list("Black & White", "BeforeCurve", tcurvebw); + keyFile.set_double_list ("Black & White", "BeforeCurve", tcurvebw); } if (!pedited || pedited->blackwhite.afterCurve) { Glib::ArrayHandle tcurvebw = blackwhite.afterCurve; - keyFile.set_double_list("Black & White", "AfterCurve", tcurvebw); + keyFile.set_double_list ("Black & White", "AfterCurve", tcurvebw); } - // save luma curve +// save luma curve if (!pedited || pedited->labCurve.brightness) { - keyFile.set_integer ("Luminance Curve", "Brightness", labCurve.brightness); + keyFile.set_integer ("Luminance Curve", "Brightness", labCurve.brightness); } if (!pedited || pedited->labCurve.contrast) { - keyFile.set_integer ("Luminance Curve", "Contrast", labCurve.contrast); + keyFile.set_integer ("Luminance Curve", "Contrast", labCurve.contrast); } if (!pedited || pedited->labCurve.chromaticity) { - keyFile.set_integer ("Luminance Curve", "Chromaticity", labCurve.chromaticity); + keyFile.set_integer ("Luminance Curve", "Chromaticity", labCurve.chromaticity); } if (!pedited || pedited->labCurve.avoidcolorshift) { - keyFile.set_boolean ("Luminance Curve", "AvoidColorShift", labCurve.avoidcolorshift); + keyFile.set_boolean ("Luminance Curve", "AvoidColorShift", labCurve.avoidcolorshift); } if (!pedited || pedited->labCurve.rstprotection) { - keyFile.set_double ("Luminance Curve", "RedAndSkinTonesProtection", labCurve.rstprotection); + keyFile.set_double ("Luminance Curve", "RedAndSkinTonesProtection", labCurve.rstprotection); } if (!pedited || pedited->labCurve.lcredsk) { - keyFile.set_boolean ("Luminance Curve", "LCredsk", labCurve.lcredsk); + keyFile.set_boolean ("Luminance Curve", "LCredsk", labCurve.lcredsk); } - if (!pedited || pedited->labCurve.lcurve) { + if (!pedited || pedited->labCurve.lcurve) { Glib::ArrayHandle lcurve = labCurve.lcurve; - keyFile.set_double_list("Luminance Curve", "LCurve", lcurve); + keyFile.set_double_list ("Luminance Curve", "LCurve", lcurve); } - if (!pedited || pedited->labCurve.acurve) { + if (!pedited || pedited->labCurve.acurve) { Glib::ArrayHandle acurve = labCurve.acurve; - keyFile.set_double_list("Luminance Curve", "aCurve", acurve); + keyFile.set_double_list ("Luminance Curve", "aCurve", acurve); } - if (!pedited || pedited->labCurve.bcurve) { + if (!pedited || pedited->labCurve.bcurve) { Glib::ArrayHandle bcurve = labCurve.bcurve; - keyFile.set_double_list("Luminance Curve", "bCurve", bcurve); + keyFile.set_double_list ("Luminance Curve", "bCurve", bcurve); } - if (!pedited || pedited->labCurve.cccurve) { + if (!pedited || pedited->labCurve.cccurve) { Glib::ArrayHandle cccurve = labCurve.cccurve; - keyFile.set_double_list("Luminance Curve", "ccCurve", cccurve); + keyFile.set_double_list ("Luminance Curve", "ccCurve", cccurve); } - if (!pedited || pedited->labCurve.chcurve) { + if (!pedited || pedited->labCurve.chcurve) { Glib::ArrayHandle chcurve = labCurve.chcurve; - keyFile.set_double_list("Luminance Curve", "chCurve", chcurve); + keyFile.set_double_list ("Luminance Curve", "chCurve", chcurve); } - if (!pedited || pedited->labCurve.lhcurve) { + if (!pedited || pedited->labCurve.lhcurve) { Glib::ArrayHandle lhcurve = labCurve.lhcurve; - keyFile.set_double_list("Luminance Curve", "lhCurve", lhcurve); + keyFile.set_double_list ("Luminance Curve", "lhCurve", lhcurve); } - if (!pedited || pedited->labCurve.hhcurve) { + if (!pedited || pedited->labCurve.hhcurve) { Glib::ArrayHandle hhcurve = labCurve.hhcurve; - keyFile.set_double_list("Luminance Curve", "hhCurve", hhcurve); + keyFile.set_double_list ("Luminance Curve", "hhCurve", hhcurve); } - if (!pedited || pedited->labCurve.lccurve) { + if (!pedited || pedited->labCurve.lccurve) { Glib::ArrayHandle lccurve = labCurve.lccurve; - keyFile.set_double_list("Luminance Curve", "LcCurve", lccurve); + keyFile.set_double_list ("Luminance Curve", "LcCurve", lccurve); } - if (!pedited || pedited->labCurve.clcurve) { + if (!pedited || pedited->labCurve.clcurve) { Glib::ArrayHandle clcurve = labCurve.clcurve; - keyFile.set_double_list("Luminance Curve", "ClCurve", clcurve); + keyFile.set_double_list ("Luminance Curve", "ClCurve", clcurve); } - // save sharpening +// save sharpening if (!pedited || pedited->sharpening.enabled) { - keyFile.set_boolean ("Sharpening", "Enabled", sharpening.enabled); + keyFile.set_boolean ("Sharpening", "Enabled", sharpening.enabled); } if (!pedited || pedited->sharpening.method) { - keyFile.set_string ("Sharpening", "Method", sharpening.method); + keyFile.set_string ("Sharpening", "Method", sharpening.method); } if (!pedited || pedited->sharpening.radius) { - keyFile.set_double ("Sharpening", "Radius", sharpening.radius); + keyFile.set_double ("Sharpening", "Radius", sharpening.radius); } if (!pedited || pedited->sharpening.amount) { - keyFile.set_integer ("Sharpening", "Amount", sharpening.amount); + keyFile.set_integer ("Sharpening", "Amount", sharpening.amount); } if (!pedited || pedited->sharpening.threshold) { Glib::ArrayHandle thresh (sharpening.threshold.value, 4, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Sharpening", "Threshold", thresh); + keyFile.set_integer_list ("Sharpening", "Threshold", thresh); } if (!pedited || pedited->sharpening.edgesonly) { - keyFile.set_boolean ("Sharpening", "OnlyEdges", sharpening.edgesonly); + keyFile.set_boolean ("Sharpening", "OnlyEdges", sharpening.edgesonly); } if (!pedited || pedited->sharpening.edges_radius) { - keyFile.set_double ("Sharpening", "EdgedetectionRadius", sharpening.edges_radius); + keyFile.set_double ("Sharpening", "EdgedetectionRadius", sharpening.edges_radius); } if (!pedited || pedited->sharpening.edges_tolerance) { - keyFile.set_integer ("Sharpening", "EdgeTolerance", sharpening.edges_tolerance); + keyFile.set_integer ("Sharpening", "EdgeTolerance", sharpening.edges_tolerance); } if (!pedited || pedited->sharpening.halocontrol) { - keyFile.set_boolean ("Sharpening", "HalocontrolEnabled", sharpening.halocontrol); + keyFile.set_boolean ("Sharpening", "HalocontrolEnabled", sharpening.halocontrol); } if (!pedited || pedited->sharpening.halocontrol_amount) { - keyFile.set_integer ("Sharpening", "HalocontrolAmount", sharpening.halocontrol_amount); + keyFile.set_integer ("Sharpening", "HalocontrolAmount", sharpening.halocontrol_amount); } if (!pedited || pedited->sharpening.deconvradius) { - keyFile.set_double ("Sharpening", "DeconvRadius", sharpening.deconvradius); + keyFile.set_double ("Sharpening", "DeconvRadius", sharpening.deconvradius); } if (!pedited || pedited->sharpening.deconvamount) { - keyFile.set_integer ("Sharpening", "DeconvAmount", sharpening.deconvamount); + keyFile.set_integer ("Sharpening", "DeconvAmount", sharpening.deconvamount); } if (!pedited || pedited->sharpening.deconvdamping) { - keyFile.set_integer ("Sharpening", "DeconvDamping", sharpening.deconvdamping); + keyFile.set_integer ("Sharpening", "DeconvDamping", sharpening.deconvdamping); } if (!pedited || pedited->sharpening.deconviter) { - keyFile.set_integer ("Sharpening", "DeconvIterations", sharpening.deconviter); + keyFile.set_integer ("Sharpening", "DeconvIterations", sharpening.deconviter); } - // save vibrance +// save vibrance if (!pedited || pedited->vibrance.enabled) { - keyFile.set_boolean ("Vibrance", "Enabled", vibrance.enabled); + keyFile.set_boolean ("Vibrance", "Enabled", vibrance.enabled); } if (!pedited || pedited->vibrance.pastels) { - keyFile.set_integer ("Vibrance", "Pastels", vibrance.pastels); + keyFile.set_integer ("Vibrance", "Pastels", vibrance.pastels); } if (!pedited || pedited->vibrance.saturated) { - keyFile.set_integer ("Vibrance", "Saturated", vibrance.saturated); + keyFile.set_integer ("Vibrance", "Saturated", vibrance.saturated); } if (!pedited || pedited->vibrance.psthreshold) { Glib::ArrayHandle thresh (vibrance.psthreshold.value, 2, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Vibrance", "PSThreshold", thresh); + keyFile.set_integer_list ("Vibrance", "PSThreshold", thresh); } if (!pedited || pedited->vibrance.protectskins) { - keyFile.set_boolean ("Vibrance", "ProtectSkins", vibrance.protectskins); + keyFile.set_boolean ("Vibrance", "ProtectSkins", vibrance.protectskins); } if (!pedited || pedited->vibrance.avoidcolorshift) { @@ -1927,46 +2020,46 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->vibrance.pastsattog) { - keyFile.set_boolean ("Vibrance", "PastSatTog", vibrance.pastsattog); + keyFile.set_boolean ("Vibrance", "PastSatTog", vibrance.pastsattog); } - if (!pedited || pedited->vibrance.skintonescurve) { + if (!pedited || pedited->vibrance.skintonescurve) { Glib::ArrayHandle skintonescurve = vibrance.skintonescurve; - keyFile.set_double_list("Vibrance", "SkinTonesCurve", skintonescurve); + keyFile.set_double_list ("Vibrance", "SkinTonesCurve", skintonescurve); } - //save edge sharpening +//save edge sharpening if (!pedited || pedited->sharpenEdge.enabled) { - keyFile.set_boolean ("SharpenEdge", "Enabled", sharpenEdge.enabled); + keyFile.set_boolean ("SharpenEdge", "Enabled", sharpenEdge.enabled); } if (!pedited || pedited->sharpenEdge.passes) { - keyFile.set_integer ("SharpenEdge", "Passes", sharpenEdge.passes); + keyFile.set_integer ("SharpenEdge", "Passes", sharpenEdge.passes); } if (!pedited || pedited->sharpenEdge.amount) { - keyFile.set_double ("SharpenEdge", "Strength", sharpenEdge.amount); + keyFile.set_double ("SharpenEdge", "Strength", sharpenEdge.amount); } if (!pedited || pedited->sharpenEdge.threechannels) { keyFile.set_boolean ("SharpenEdge", "ThreeChannels", sharpenEdge.threechannels); } - //save micro-contrast sharpening +//save micro-contrast sharpening if (!pedited || pedited->sharpenMicro.enabled) { - keyFile.set_boolean ("SharpenMicro", "Enabled", sharpenMicro.enabled); + keyFile.set_boolean ("SharpenMicro", "Enabled", sharpenMicro.enabled); } if (!pedited || pedited->sharpenMicro.matrix) { - keyFile.set_boolean ("SharpenMicro", "Matrix", sharpenMicro.matrix); + keyFile.set_boolean ("SharpenMicro", "Matrix", sharpenMicro.matrix); } if (!pedited || pedited->sharpenMicro.amount) { - keyFile.set_double ("SharpenMicro", "Strength", sharpenMicro.amount); + keyFile.set_double ("SharpenMicro", "Strength", sharpenMicro.amount); } if (!pedited || pedited->sharpenMicro.uniformity) { - keyFile.set_double ("SharpenMicro", "Uniformity", sharpenMicro.uniformity); + keyFile.set_double ("SharpenMicro", "Uniformity", sharpenMicro.uniformity); } /* @@ -1979,7 +2072,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b // save wb if (!pedited || pedited->wb.method) { - keyFile.set_string ("White Balance", "Setting", wb.method); + keyFile.set_string ("White Balance", "Setting", wb.method); } if (!pedited || pedited->wb.temperature) { @@ -1987,212 +2080,256 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->wb.green) { - keyFile.set_double ("White Balance", "Green", wb.green); + keyFile.set_double ("White Balance", "Green", wb.green); } if (!pedited || pedited->wb.equal) { - keyFile.set_double ("White Balance", "Equal", wb.equal); + keyFile.set_double ("White Balance", "Equal", wb.equal); + } + + if (!pedited || pedited->wb.tempBias) { + keyFile.set_double ("White Balance", "TemperatureBias", wb.tempBias); } /* - // save colorShift - if (!pedited || pedited->colorShift.a) keyFile.set_double ("Color Shift", "ChannelA", colorShift.a); - if (!pedited || pedited->colorShift.b) keyFile.set_double ("Color Shift", "ChannelB", colorShift.b); + // save colorShift + if (!pedited || pedited->colorShift.a) keyFile.set_double ("Color Shift", "ChannelA", colorShift.a); + if (!pedited || pedited->colorShift.b) keyFile.set_double ("Color Shift", "ChannelB", colorShift.b); */ - // save colorappearance +// save colorappearance if (!pedited || pedited->colorappearance.enabled) { - keyFile.set_boolean ("Color appearance", "Enabled", colorappearance.enabled); + keyFile.set_boolean ("Color appearance", "Enabled", colorappearance.enabled); } if (!pedited || pedited->colorappearance.degree) { - keyFile.set_integer ("Color appearance", "Degree", colorappearance.degree); + keyFile.set_integer ("Color appearance", "Degree", colorappearance.degree); } if (!pedited || pedited->colorappearance.autodegree) { - keyFile.set_boolean ("Color appearance", "AutoDegree", colorappearance.autodegree); + keyFile.set_boolean ("Color appearance", "AutoDegree", colorappearance.autodegree); + } + + if (!pedited || pedited->colorappearance.degreeout) { + keyFile.set_integer ("Color appearance", "Degreeout", colorappearance.degreeout); + } + + if (!pedited || pedited->colorappearance.autodegreeout) { + keyFile.set_boolean ("Color appearance", "AutoDegreeout", colorappearance.autodegreeout); } if (!pedited || pedited->colorappearance.surround) { - keyFile.set_string ("Color appearance", "Surround", colorappearance.surround); + keyFile.set_string ("Color appearance", "Surround", colorappearance.surround); } -// if (!pedited || pedited->colorappearance.backgrd) keyFile.set_integer ("Color appearance", "Background", colorappearance.backgrd); + if (!pedited || pedited->colorappearance.surrsrc) { + keyFile.set_string ("Color appearance", "Surrsrc", colorappearance.surrsrc); + } + +// if (!pedited || pedited->colorappearance.backgrd) keyFile.set_integer ("Color appearance", "Background", colorappearance.backgrd); if (!pedited || pedited->colorappearance.adaplum) { - keyFile.set_double ("Color appearance", "AdaptLum", colorappearance.adaplum); + keyFile.set_double ("Color appearance", "AdaptLum", colorappearance.adaplum); } if (!pedited || pedited->colorappearance.badpixsl) { - keyFile.set_integer ("Color appearance", "Badpixsl", colorappearance.badpixsl); + keyFile.set_integer ("Color appearance", "Badpixsl", colorappearance.badpixsl); } if (!pedited || pedited->colorappearance.wbmodel) { - keyFile.set_string ("Color appearance", "Model", colorappearance.wbmodel); + keyFile.set_string ("Color appearance", "Model", colorappearance.wbmodel); } if (!pedited || pedited->colorappearance.algo) { - keyFile.set_string ("Color appearance", "Algorithm", colorappearance.algo); + keyFile.set_string ("Color appearance", "Algorithm", colorappearance.algo); } if (!pedited || pedited->colorappearance.jlight) { - keyFile.set_double ("Color appearance", "J-Light", colorappearance.jlight); + keyFile.set_double ("Color appearance", "J-Light", colorappearance.jlight); } if (!pedited || pedited->colorappearance.qbright) { - keyFile.set_double ("Color appearance", "Q-Bright", colorappearance.qbright); + keyFile.set_double ("Color appearance", "Q-Bright", colorappearance.qbright); } if (!pedited || pedited->colorappearance.chroma) { - keyFile.set_double ("Color appearance", "C-Chroma", colorappearance.chroma); + keyFile.set_double ("Color appearance", "C-Chroma", colorappearance.chroma); } if (!pedited || pedited->colorappearance.schroma) { - keyFile.set_double ("Color appearance", "S-Chroma", colorappearance.schroma); + keyFile.set_double ("Color appearance", "S-Chroma", colorappearance.schroma); } if (!pedited || pedited->colorappearance.mchroma) { - keyFile.set_double ("Color appearance", "M-Chroma", colorappearance.mchroma); + keyFile.set_double ("Color appearance", "M-Chroma", colorappearance.mchroma); } if (!pedited || pedited->colorappearance.contrast) { - keyFile.set_double ("Color appearance", "J-Contrast", colorappearance.contrast); + keyFile.set_double ("Color appearance", "J-Contrast", colorappearance.contrast); } if (!pedited || pedited->colorappearance.qcontrast) { - keyFile.set_double ("Color appearance", "Q-Contrast", colorappearance.qcontrast); + keyFile.set_double ("Color appearance", "Q-Contrast", colorappearance.qcontrast); } if (!pedited || pedited->colorappearance.colorh) { - keyFile.set_double ("Color appearance", "H-Hue", colorappearance.colorh); + keyFile.set_double ("Color appearance", "H-Hue", colorappearance.colorh); } if (!pedited || pedited->colorappearance.rstprotection) { - keyFile.set_double ("Color appearance", "RSTProtection", colorappearance.rstprotection); + keyFile.set_double ("Color appearance", "RSTProtection", colorappearance.rstprotection); } if (!pedited || pedited->colorappearance.adapscen) { - keyFile.set_double ("Color appearance", "AdaptScene", colorappearance.adapscen); + keyFile.set_double ("Color appearance", "AdaptScene", colorappearance.adapscen); } if (!pedited || pedited->colorappearance.autoadapscen) { - keyFile.set_boolean ("Color appearance", "AutoAdapscen", colorappearance.autoadapscen); + keyFile.set_boolean ("Color appearance", "AutoAdapscen", colorappearance.autoadapscen); + } + + if (!pedited || pedited->colorappearance.ybscen) { + keyFile.set_integer ("Color appearance", "YbScene", colorappearance.ybscen); + } + + if (!pedited || pedited->colorappearance.autoybscen) { + keyFile.set_boolean ("Color appearance", "Autoybscen", colorappearance.autoybscen); } if (!pedited || pedited->colorappearance.surrsource) { - keyFile.set_boolean ("Color appearance", "SurrSource", colorappearance.surrsource); + keyFile.set_boolean ("Color appearance", "SurrSource", colorappearance.surrsource); } if (!pedited || pedited->colorappearance.gamut) { - keyFile.set_boolean ("Color appearance", "Gamut", colorappearance.gamut); + keyFile.set_boolean ("Color appearance", "Gamut", colorappearance.gamut); } -// if (!pedited || pedited->colorappearance.badpix) keyFile.set_boolean ("Color appearance", "Badpix", colorappearance.badpix); + if (!pedited || pedited->colorappearance.tempout) { + keyFile.set_integer ("Color appearance", "Tempout", colorappearance.tempout); + } + + if (!pedited || pedited->colorappearance.greenout) { + keyFile.set_double ("Color appearance", "Greenout", colorappearance.greenout); + } + + if (!pedited || pedited->colorappearance.tempsc) { + keyFile.set_integer ("Color appearance", "Tempsc", colorappearance.tempsc); + } + + if (!pedited || pedited->colorappearance.greensc) { + keyFile.set_double ("Color appearance", "Greensc", colorappearance.greensc); + } + + if (!pedited || pedited->colorappearance.ybout) { + keyFile.set_integer ("Color appearance", "Ybout", colorappearance.ybout); + } + +// if (!pedited || pedited->colorappearance.badpix) keyFile.set_boolean ("Color appearance", "Badpix", colorappearance.badpix); if (!pedited || pedited->colorappearance.datacie) { - keyFile.set_boolean ("Color appearance", "Datacie", colorappearance.datacie); + keyFile.set_boolean ("Color appearance", "Datacie", colorappearance.datacie); } if (!pedited || pedited->colorappearance.tonecie) { - keyFile.set_boolean ("Color appearance", "Tonecie", colorappearance.tonecie); + keyFile.set_boolean ("Color appearance", "Tonecie", colorappearance.tonecie); } -// if (!pedited || pedited->colorappearance.sharpcie) keyFile.set_boolean ("Color appearance", "Sharpcie", colorappearance.sharpcie); - if (!pedited || pedited->colorappearance.curveMode) { +// if (!pedited || pedited->colorappearance.sharpcie) keyFile.set_boolean ("Color appearance", "Sharpcie", colorappearance.sharpcie); + if (!pedited || pedited->colorappearance.curveMode) { Glib::ustring method; switch (colorappearance.curveMode) { - case (ColorAppearanceParams::TC_MODE_LIGHT): - method = "Lightness"; - break; + case (ColorAppearanceParams::TC_MODE_LIGHT): + method = "Lightness"; + break; - case (ColorAppearanceParams::TC_MODE_BRIGHT): - method = "Brightness"; - break; + case (ColorAppearanceParams::TC_MODE_BRIGHT): + method = "Brightness"; + break; } - keyFile.set_string ("Color appearance", "CurveMode", method); + keyFile.set_string ("Color appearance", "CurveMode", method); } - if (!pedited || pedited->colorappearance.curveMode2) { + if (!pedited || pedited->colorappearance.curveMode2) { Glib::ustring method; switch (colorappearance.curveMode2) { - case (ColorAppearanceParams::TC_MODE_LIGHT): - method = "Lightness"; - break; + case (ColorAppearanceParams::TC_MODE_LIGHT): + method = "Lightness"; + break; - case (ColorAppearanceParams::TC_MODE_BRIGHT): - method = "Brightness"; - break; + case (ColorAppearanceParams::TC_MODE_BRIGHT): + method = "Brightness"; + break; } - keyFile.set_string ("Color appearance", "CurveMode2", method); + keyFile.set_string ("Color appearance", "CurveMode2", method); } - if (!pedited || pedited->colorappearance.curveMode3) { + if (!pedited || pedited->colorappearance.curveMode3) { Glib::ustring method; switch (colorappearance.curveMode3) { - case (ColorAppearanceParams::TC_MODE_CHROMA): - method = "Chroma"; - break; + case (ColorAppearanceParams::TC_MODE_CHROMA): + method = "Chroma"; + break; - case (ColorAppearanceParams::TC_MODE_SATUR): - method = "Saturation"; - break; + case (ColorAppearanceParams::TC_MODE_SATUR): + method = "Saturation"; + break; - case (ColorAppearanceParams::TC_MODE_COLORF): - method = "Colorfullness"; - break; + case (ColorAppearanceParams::TC_MODE_COLORF): + method = "Colorfullness"; + break; } - keyFile.set_string ("Color appearance", "CurveMode3", method); + keyFile.set_string ("Color appearance", "CurveMode3", method); } if (!pedited || pedited->colorappearance.curve) { Glib::ArrayHandle tcurve = colorappearance.curve; - keyFile.set_double_list("Color appearance", "Curve", tcurve); + keyFile.set_double_list ("Color appearance", "Curve", tcurve); } if (!pedited || pedited->colorappearance.curve2) { Glib::ArrayHandle tcurve = colorappearance.curve2; - keyFile.set_double_list("Color appearance", "Curve2", tcurve); + keyFile.set_double_list ("Color appearance", "Curve2", tcurve); } if (!pedited || pedited->colorappearance.curve3) { Glib::ArrayHandle tcurve = colorappearance.curve3; - keyFile.set_double_list("Color appearance", "Curve3", tcurve); + keyFile.set_double_list ("Color appearance", "Curve3", tcurve); } - // save impulseDenoise +// save impulseDenoise if (!pedited || pedited->impulseDenoise.enabled) { - keyFile.set_boolean ("Impulse Denoising", "Enabled", impulseDenoise.enabled); + keyFile.set_boolean ("Impulse Denoising", "Enabled", impulseDenoise.enabled); } if (!pedited || pedited->impulseDenoise.thresh) { keyFile.set_integer ("Impulse Denoising", "Threshold", impulseDenoise.thresh); } - // save defringe +// save defringe if (!pedited || pedited->defringe.enabled) { - keyFile.set_boolean ("Defringing", "Enabled", defringe.enabled); + keyFile.set_boolean ("Defringing", "Enabled", defringe.enabled); } if (!pedited || pedited->defringe.radius) { - keyFile.set_double ("Defringing", "Radius", defringe.radius); + keyFile.set_double ("Defringing", "Radius", defringe.radius); } if (!pedited || pedited->defringe.threshold) { keyFile.set_integer ("Defringing", "Threshold", defringe.threshold); } - if (!pedited || pedited->defringe.huecurve) { + if (!pedited || pedited->defringe.huecurve) { Glib::ArrayHandle huecurve = defringe.huecurve; - keyFile.set_double_list("Defringing", "HueCurve", huecurve); + keyFile.set_double_list ("Defringing", "HueCurve", huecurve); } - // save dirpyrDenoise +// save dirpyrDenoise if (!pedited || pedited->dirpyrDenoise.enabled) { keyFile.set_boolean ("Directional Pyramid Denoising", "Enabled", dirpyrDenoise.enabled); } @@ -2205,13 +2342,9 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_boolean ("Directional Pyramid Denoising", "Median", dirpyrDenoise.median); } - if (!pedited || pedited->dirpyrDenoise.autochroma) { - keyFile.set_boolean ("Directional Pyramid Denoising", "Auto", dirpyrDenoise.autochroma); - } - -// if (!pedited || pedited->dirpyrDenoise.perform) keyFile.set_boolean ("Directional Pyramid Denoising", "Perform", dirpyrDenoise.perform); +// if (!pedited || pedited->dirpyrDenoise.perform) keyFile.set_boolean ("Directional Pyramid Denoising", "Perform", dirpyrDenoise.perform); if (!pedited || pedited->dirpyrDenoise.luma) { - keyFile.set_double ("Directional Pyramid Denoising", "Luma", dirpyrDenoise.luma); + keyFile.set_double ("Directional Pyramid Denoising", "Luma", dirpyrDenoise.luma); } if (!pedited || pedited->dirpyrDenoise.Ldetail) { @@ -2219,95 +2352,95 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->dirpyrDenoise.chroma) { - keyFile.set_double ("Directional Pyramid Denoising", "Chroma", dirpyrDenoise.chroma); + keyFile.set_double ("Directional Pyramid Denoising", "Chroma", dirpyrDenoise.chroma); } if (!pedited || pedited->dirpyrDenoise.dmethod) { - keyFile.set_string ("Directional Pyramid Denoising", "Method", dirpyrDenoise.dmethod); + keyFile.set_string ("Directional Pyramid Denoising", "Method", dirpyrDenoise.dmethod); } if (!pedited || pedited->dirpyrDenoise.Lmethod) { - keyFile.set_string ("Directional Pyramid Denoising", "LMethod", dirpyrDenoise.Lmethod); + keyFile.set_string ("Directional Pyramid Denoising", "LMethod", dirpyrDenoise.Lmethod); } - // never save 'auto chroma preview mode' to pp3 +// never save 'auto chroma preview mode' to pp3 if (!pedited || pedited->dirpyrDenoise.Cmethod) { - if(dirpyrDenoise.Cmethod == "PRE") { + if (dirpyrDenoise.Cmethod == "PRE") { dirpyrDenoise.Cmethod = "MAN"; } - keyFile.set_string ("Directional Pyramid Denoising", "CMethod", dirpyrDenoise.Cmethod); + keyFile.set_string ("Directional Pyramid Denoising", "CMethod", dirpyrDenoise.Cmethod); } if (!pedited || pedited->dirpyrDenoise.C2method) { - if(dirpyrDenoise.C2method == "PREV") { + if (dirpyrDenoise.C2method == "PREV") { dirpyrDenoise.C2method = "MANU"; } - keyFile.set_string ("Directional Pyramid Denoising", "C2Method", dirpyrDenoise.C2method); + keyFile.set_string ("Directional Pyramid Denoising", "C2Method", dirpyrDenoise.C2method); } if (!pedited || pedited->dirpyrDenoise.smethod) { - keyFile.set_string ("Directional Pyramid Denoising", "SMethod", dirpyrDenoise.smethod); + keyFile.set_string ("Directional Pyramid Denoising", "SMethod", dirpyrDenoise.smethod); } if (!pedited || pedited->dirpyrDenoise.medmethod) { - keyFile.set_string ("Directional Pyramid Denoising", "MedMethod", dirpyrDenoise.medmethod); + keyFile.set_string ("Directional Pyramid Denoising", "MedMethod", dirpyrDenoise.medmethod); } if (!pedited || pedited->dirpyrDenoise.rgbmethod) { - keyFile.set_string ("Directional Pyramid Denoising", "RGBMethod", dirpyrDenoise.rgbmethod); + keyFile.set_string ("Directional Pyramid Denoising", "RGBMethod", dirpyrDenoise.rgbmethod); } if (!pedited || pedited->dirpyrDenoise.methodmed) { - keyFile.set_string ("Directional Pyramid Denoising", "MethodMed", dirpyrDenoise.methodmed); + keyFile.set_string ("Directional Pyramid Denoising", "MethodMed", dirpyrDenoise.methodmed); } if (!pedited || pedited->dirpyrDenoise.redchro) { - keyFile.set_double ("Directional Pyramid Denoising", "Redchro", dirpyrDenoise.redchro); + keyFile.set_double ("Directional Pyramid Denoising", "Redchro", dirpyrDenoise.redchro); } if (!pedited || pedited->dirpyrDenoise.bluechro) { - keyFile.set_double ("Directional Pyramid Denoising", "Bluechro", dirpyrDenoise.bluechro); + keyFile.set_double ("Directional Pyramid Denoising", "Bluechro", dirpyrDenoise.bluechro); } if (!pedited || pedited->dirpyrDenoise.gamma) { - keyFile.set_double ("Directional Pyramid Denoising", "Gamma", dirpyrDenoise.gamma); + keyFile.set_double ("Directional Pyramid Denoising", "Gamma", dirpyrDenoise.gamma); } if (!pedited || pedited->dirpyrDenoise.passes) { - keyFile.set_integer ("Directional Pyramid Denoising", "Passes", dirpyrDenoise.passes); + keyFile.set_integer ("Directional Pyramid Denoising", "Passes", dirpyrDenoise.passes); } - if (!pedited || pedited->dirpyrDenoise.lcurve) { + if (!pedited || pedited->dirpyrDenoise.lcurve) { Glib::ArrayHandle lcurve = dirpyrDenoise.lcurve; - keyFile.set_double_list("Directional Pyramid Denoising", "LCurve", lcurve); + keyFile.set_double_list ("Directional Pyramid Denoising", "LCurve", lcurve); } - if (!pedited || pedited->dirpyrDenoise.cccurve) { + if (!pedited || pedited->dirpyrDenoise.cccurve) { Glib::ArrayHandle cccurve = dirpyrDenoise.cccurve; - keyFile.set_double_list("Directional Pyramid Denoising", "CCCurve", cccurve); + keyFile.set_double_list ("Directional Pyramid Denoising", "CCCurve", cccurve); } - //Save epd. +// save epd. if (!pedited || pedited->epd.enabled) { keyFile.set_boolean ("EPD", "Enabled", epd.enabled); } if (!pedited || pedited->epd.strength) { - keyFile.set_double ("EPD", "Strength", epd.strength); + keyFile.set_double ("EPD", "Strength", epd.strength); } if (!pedited || pedited->epd.gamma) { - keyFile.set_double ("EPD", "Gamma", epd.gamma); + keyFile.set_double ("EPD", "Gamma", epd.gamma); } if (!pedited || pedited->epd.edgeStopping) { - keyFile.set_double ("EPD", "EdgeStopping", epd.edgeStopping); + keyFile.set_double ("EPD", "EdgeStopping", epd.edgeStopping); } if (!pedited || pedited->epd.scale) { - keyFile.set_double ("EPD", "Scale", epd.scale); + keyFile.set_double ("EPD", "Scale", epd.scale); } if (!pedited || pedited->epd.reweightingIterates) { @@ -2315,29 +2448,29 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } /* - // save lumaDenoise - if (!pedited || pedited->lumaDenoise.enabled) keyFile.set_boolean ("Luminance Denoising", "Enabled", lumaDenoise.enabled); - if (!pedited || pedited->lumaDenoise.radius) keyFile.set_double ("Luminance Denoising", "Radius", lumaDenoise.radius); - if (!pedited || pedited->lumaDenoise.edgetolerance) keyFile.set_integer ("Luminance Denoising", "EdgeTolerance", lumaDenoise.edgetolerance); + // save lumaDenoise + if (!pedited || pedited->lumaDenoise.enabled) keyFile.set_boolean ("Luminance Denoising", "Enabled", lumaDenoise.enabled); + if (!pedited || pedited->lumaDenoise.radius) keyFile.set_double ("Luminance Denoising", "Radius", lumaDenoise.radius); + if (!pedited || pedited->lumaDenoise.edgetolerance) keyFile.set_integer ("Luminance Denoising", "EdgeTolerance", lumaDenoise.edgetolerance); */ /* - // save colorDenoise - //if (!pedited || pedited->colorDenoise.enabled) keyFile.set_boolean ("Chrominance Denoising", "Enabled", colorDenoise.enabled); - if (!pedited || pedited->colorDenoise.amount) keyFile.set_integer ("Chrominance Denoising", "Amount", colorDenoise.amount); + // save colorDenoise + //if (!pedited || pedited->colorDenoise.enabled) keyFile.set_boolean ("Chrominance Denoising", "Enabled", colorDenoise.enabled); + if (!pedited || pedited->colorDenoise.amount) keyFile.set_integer ("Chrominance Denoising", "Amount", colorDenoise.amount); */ - // save sh +// save sh if (!pedited || pedited->sh.enabled) { - keyFile.set_boolean ("Shadows & Highlights", "Enabled", sh.enabled); + keyFile.set_boolean ("Shadows & Highlights", "Enabled", sh.enabled); } if (!pedited || pedited->sh.hq) { - keyFile.set_boolean ("Shadows & Highlights", "HighQuality", sh.hq); + keyFile.set_boolean ("Shadows & Highlights", "HighQuality", sh.hq); } if (!pedited || pedited->sh.highlights) { - keyFile.set_integer ("Shadows & Highlights", "Highlights", sh.highlights); + keyFile.set_integer ("Shadows & Highlights", "Highlights", sh.highlights); } if (!pedited || pedited->sh.htonalwidth) { @@ -2345,61 +2478,61 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->sh.shadows) { - keyFile.set_integer ("Shadows & Highlights", "Shadows", sh.shadows); + keyFile.set_integer ("Shadows & Highlights", "Shadows", sh.shadows); } if (!pedited || pedited->sh.stonalwidth) { - keyFile.set_integer ("Shadows & Highlights", "ShadowTonalWidth", sh.stonalwidth); + keyFile.set_integer ("Shadows & Highlights", "ShadowTonalWidth", sh.stonalwidth); } if (!pedited || pedited->sh.localcontrast) { - keyFile.set_integer ("Shadows & Highlights", "LocalContrast", sh.localcontrast); + keyFile.set_integer ("Shadows & Highlights", "LocalContrast", sh.localcontrast); } if (!pedited || pedited->sh.radius) { - keyFile.set_integer ("Shadows & Highlights", "Radius", sh.radius); + keyFile.set_integer ("Shadows & Highlights", "Radius", sh.radius); } - // save crop +// save crop if (!pedited || pedited->crop.enabled) { - keyFile.set_boolean ("Crop", "Enabled", crop.enabled); + keyFile.set_boolean ("Crop", "Enabled", crop.enabled); } if (!pedited || pedited->crop.x) { - keyFile.set_integer ("Crop", "X", crop.x); + keyFile.set_integer ("Crop", "X", crop.x); } if (!pedited || pedited->crop.y) { - keyFile.set_integer ("Crop", "Y", crop.y); + keyFile.set_integer ("Crop", "Y", crop.y); } if (!pedited || pedited->crop.w) { - keyFile.set_integer ("Crop", "W", crop.w); + keyFile.set_integer ("Crop", "W", crop.w); } if (!pedited || pedited->crop.h) { - keyFile.set_integer ("Crop", "H", crop.h); + keyFile.set_integer ("Crop", "H", crop.h); } if (!pedited || pedited->crop.fixratio) { - keyFile.set_boolean ("Crop", "FixedRatio", crop.fixratio); + keyFile.set_boolean ("Crop", "FixedRatio", crop.fixratio); } if (!pedited || pedited->crop.ratio) { - keyFile.set_string ("Crop", "Ratio", crop.ratio); + keyFile.set_string ("Crop", "Ratio", crop.ratio); } if (!pedited || pedited->crop.orientation) { - keyFile.set_string ("Crop", "Orientation", crop.orientation); + keyFile.set_string ("Crop", "Orientation", crop.orientation); } if (!pedited || pedited->crop.guide) { - keyFile.set_string ("Crop", "Guide", crop.guide); + keyFile.set_string ("Crop", "Guide", crop.guide); } - // save coarse +// save coarse if (!pedited || pedited->coarse.rotate) { - keyFile.set_integer ("Coarse Transformation", "Rotate", coarse.rotate); + keyFile.set_integer ("Coarse Transformation", "Rotate", coarse.rotate); } if (!pedited || pedited->coarse.hflip) { @@ -2407,57 +2540,57 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->coarse.vflip) { - keyFile.set_boolean ("Coarse Transformation", "VerticalFlip", coarse.vflip); + keyFile.set_boolean ("Coarse Transformation", "VerticalFlip", coarse.vflip); } - // save commonTrans +// save commonTrans if (!pedited || pedited->commonTrans.autofill) { keyFile.set_boolean ("Common Properties for Transformations", "AutoFill", commonTrans.autofill); } - // save rotate +// save rotate if (!pedited || pedited->rotate.degree) { - keyFile.set_double ("Rotation", "Degree", rotate.degree); + keyFile.set_double ("Rotation", "Degree", rotate.degree); } - // save distortion +// save distortion if (!pedited || pedited->distortion.amount) { - keyFile.set_double ("Distortion", "Amount", distortion.amount); + keyFile.set_double ("Distortion", "Amount", distortion.amount); } - // lens profile +// lens profile if (!pedited || pedited->lensProf.lcpFile) { - keyFile.set_string ("LensProfile", "LCPFile", relativePathIfInside(fname, fnameAbsolute, lensProf.lcpFile)); + keyFile.set_string ("LensProfile", "LCPFile", relativePathIfInside (fname, fnameAbsolute, lensProf.lcpFile)); } if (!pedited || pedited->lensProf.useDist) { - keyFile.set_boolean ("LensProfile", "UseDistortion", lensProf.useDist); + keyFile.set_boolean ("LensProfile", "UseDistortion", lensProf.useDist); } if (!pedited || pedited->lensProf.useVign) { - keyFile.set_boolean ("LensProfile", "UseVignette", lensProf.useVign); + keyFile.set_boolean ("LensProfile", "UseVignette", lensProf.useVign); } if (!pedited || pedited->lensProf.useCA) { - keyFile.set_boolean ("LensProfile", "UseCA", lensProf.useCA); + keyFile.set_boolean ("LensProfile", "UseCA", lensProf.useCA); } - // save perspective correction +// save perspective correction if (!pedited || pedited->perspective.horizontal) { - keyFile.set_double ("Perspective", "Horizontal", perspective.horizontal); + keyFile.set_double ("Perspective", "Horizontal", perspective.horizontal); } if (!pedited || pedited->perspective.vertical) { - keyFile.set_double ("Perspective", "Vertical", perspective.vertical); + keyFile.set_double ("Perspective", "Vertical", perspective.vertical); } - // save gradient +// save gradient if (!pedited || pedited->gradient.enabled) { keyFile.set_boolean ("Gradient", "Enabled", gradient.enabled); } if (!pedited || pedited->gradient.degree) { - keyFile.set_double ("Gradient", "Degree", gradient.degree); + keyFile.set_double ("Gradient", "Degree", gradient.degree); } if (!pedited || pedited->gradient.feather) { @@ -2465,7 +2598,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->gradient.strength) { - keyFile.set_double ("Gradient", "Strength", gradient.strength); + keyFile.set_double ("Gradient", "Strength", gradient.strength); } if (!pedited || pedited->gradient.centerX) { @@ -2476,13 +2609,13 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_integer ("Gradient", "CenterY", gradient.centerY); } - // save post-crop vignette +// save post-crop vignette if (!pedited || pedited->pcvignette.enabled) { keyFile.set_boolean ("PCVignette", "Enabled", pcvignette.enabled); } if (!pedited || pedited->pcvignette.strength) { - keyFile.set_double ("PCVignette", "Strength", pcvignette.strength); + keyFile.set_double ("PCVignette", "Strength", pcvignette.strength); } if (!pedited || pedited->pcvignette.feather) { @@ -2493,16 +2626,16 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_integer ("PCVignette", "Roundness", pcvignette.roundness); } - // save C/A correction +// save C/A correction if (!pedited || pedited->cacorrection.red) { - keyFile.set_double ("CACorrection", "Red", cacorrection.red); + keyFile.set_double ("CACorrection", "Red", cacorrection.red); } if (!pedited || pedited->cacorrection.blue) { - keyFile.set_double ("CACorrection", "Blue", cacorrection.blue); + keyFile.set_double ("CACorrection", "Blue", cacorrection.blue); } - // save vignetting correction +// save vignetting correction if (!pedited || pedited->vignetting.amount) { keyFile.set_integer ("Vignetting Correction", "Amount", vignetting.amount); } @@ -2527,25 +2660,25 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b if (!pedited || pedited->resize.enabled) { keyFile.set_boolean ("Resize", "Enabled", resize.enabled); } - // save resizing settings + if (!pedited || pedited->resize.scale) { - keyFile.set_double ("Resize", "Scale", resize.scale); + keyFile.set_double ("Resize", "Scale", resize.scale); } if (!pedited || pedited->resize.appliesTo) { - keyFile.set_string ("Resize", "AppliesTo", resize.appliesTo); + keyFile.set_string ("Resize", "AppliesTo", resize.appliesTo); } if (!pedited || pedited->resize.method) { - keyFile.set_string ("Resize", "Method", resize.method); + keyFile.set_string ("Resize", "Method", resize.method); } if (!pedited || pedited->resize.dataspec) { - keyFile.set_integer ("Resize", "DataSpecified", resize.dataspec); + keyFile.set_integer ("Resize", "DataSpecified", resize.dataspec); } if (!pedited || pedited->resize.width) { - keyFile.set_integer ("Resize", "Width", resize.width); + keyFile.set_integer ("Resize", "Width", resize.width); } if (!pedited || pedited->resize.height) { @@ -2553,170 +2686,165 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->prsharpening.enabled) { - keyFile.set_boolean ("PostResizeSharpening", "Enabled", prsharpening.enabled); + keyFile.set_boolean ("PostResizeSharpening", "Enabled", prsharpening.enabled); } - // save spot removal settings - if (!pedited || pedited->spot.enabled) { - keyFile.set_boolean ("Spot removal", "Enabled", spot.enabled); - } - - if (!pedited || pedited->spot.entries) { - std::vector vEntries; - - for (size_t i = 0; i < spot.entries.size(); ++i) { - vEntries.push_back(double(spot.entries.at(i).sourcePos.x)); - vEntries.push_back(double(spot.entries.at(i).sourcePos.y)); - vEntries.push_back(double(spot.entries.at(i).targetPos.x)); - vEntries.push_back(double(spot.entries.at(i).targetPos.y)); - vEntries.push_back(double(spot.entries.at(i).radius)); - vEntries.push_back(double(spot.entries.at(i).feather)); - vEntries.push_back(double(spot.entries.at(i).opacity)); + if (!pedited || pedited->spot.enabled) { + keyFile.set_boolean ("Spot removal", "Enabled", spot.enabled); } - Glib::ArrayHandle entries = vEntries; - keyFile.set_double_list("Spot removal", "Entries", entries); - } + if (!pedited || pedited->spot.entries) { + std::vector vEntries; + + for (size_t i = 0; i < spot.entries.size (); ++i) { + vEntries.push_back (double (spot.entries.at (i).sourcePos.x)); + vEntries.push_back (double (spot.entries.at (i).sourcePos.y)); + vEntries.push_back (double (spot.entries.at (i).targetPos.x)); + vEntries.push_back (double (spot.entries.at (i).targetPos.y)); + vEntries.push_back (double (spot.entries.at (i).radius)); + vEntries.push_back (double (spot.entries.at (i).feather)); + vEntries.push_back (double (spot.entries.at (i).opacity)); + } + + Glib::ArrayHandle entries = vEntries; + keyFile.set_double_list ("Spot removal", "Entries", entries); + } if (!pedited || pedited->prsharpening.method) { - keyFile.set_string ("PostResizeSharpening", "Method", prsharpening.method); + keyFile.set_string ("PostResizeSharpening", "Method", prsharpening.method); } if (!pedited || pedited->prsharpening.radius) { - keyFile.set_double ("PostResizeSharpening", "Radius", prsharpening.radius); + keyFile.set_double ("PostResizeSharpening", "Radius", prsharpening.radius); } if (!pedited || pedited->prsharpening.amount) { - keyFile.set_integer ("PostResizeSharpening", "Amount", prsharpening.amount); + keyFile.set_integer ("PostResizeSharpening", "Amount", prsharpening.amount); } if (!pedited || pedited->prsharpening.threshold) { Glib::ArrayHandle thresh (prsharpening.threshold.value, 4, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("PostResizeSharpening", "Threshold", thresh); + keyFile.set_integer_list ("PostResizeSharpening", "Threshold", thresh); } if (!pedited || pedited->prsharpening.edgesonly) { - keyFile.set_boolean ("PostResizeSharpening", "OnlyEdges", prsharpening.edgesonly); + keyFile.set_boolean ("PostResizeSharpening", "OnlyEdges", prsharpening.edgesonly); } if (!pedited || pedited->prsharpening.edges_radius) { - keyFile.set_double ("PostResizeSharpening", "EdgedetectionRadius", prsharpening.edges_radius); + keyFile.set_double ("PostResizeSharpening", "EdgedetectionRadius", prsharpening.edges_radius); } if (!pedited || pedited->prsharpening.edges_tolerance) { - keyFile.set_integer ("PostResizeSharpening", "EdgeTolerance", prsharpening.edges_tolerance); + keyFile.set_integer ("PostResizeSharpening", "EdgeTolerance", prsharpening.edges_tolerance); } if (!pedited || pedited->prsharpening.halocontrol) { - keyFile.set_boolean ("PostResizeSharpening", "HalocontrolEnabled", prsharpening.halocontrol); + keyFile.set_boolean ("PostResizeSharpening", "HalocontrolEnabled", prsharpening.halocontrol); } if (!pedited || pedited->prsharpening.halocontrol_amount) { - keyFile.set_integer ("PostResizeSharpening", "HalocontrolAmount", prsharpening.halocontrol_amount); + keyFile.set_integer ("PostResizeSharpening", "HalocontrolAmount", prsharpening.halocontrol_amount); } if (!pedited || pedited->prsharpening.deconvradius) { - keyFile.set_double ("PostResizeSharpening", "DeconvRadius", prsharpening.deconvradius); + keyFile.set_double ("PostResizeSharpening", "DeconvRadius", prsharpening.deconvradius); } if (!pedited || pedited->prsharpening.deconvamount) { - keyFile.set_integer ("PostResizeSharpening", "DeconvAmount", prsharpening.deconvamount); + keyFile.set_integer ("PostResizeSharpening", "DeconvAmount", prsharpening.deconvamount); } if (!pedited || pedited->prsharpening.deconvdamping) { - keyFile.set_integer ("PostResizeSharpening", "DeconvDamping", prsharpening.deconvdamping); + keyFile.set_integer ("PostResizeSharpening", "DeconvDamping", prsharpening.deconvdamping); } if (!pedited || pedited->prsharpening.deconviter) { - keyFile.set_integer ("PostResizeSharpening", "DeconvIterations", prsharpening.deconviter); + keyFile.set_integer ("PostResizeSharpening", "DeconvIterations", prsharpening.deconviter); } - // save color management settings +// save color management settings if (!pedited || pedited->icm.input) { - keyFile.set_string ("Color Management", "InputProfile", relativePathIfInside(fname, fnameAbsolute, icm.input)); + keyFile.set_string ("Color Management", "InputProfile", relativePathIfInside (fname, fnameAbsolute, icm.input)); } if (!pedited || pedited->icm.toneCurve) { - keyFile.set_boolean ("Color Management", "ToneCurve", icm.toneCurve); + keyFile.set_boolean ("Color Management", "ToneCurve", icm.toneCurve); } if (!pedited || pedited->icm.applyLookTable) { - keyFile.set_boolean ("Color Management", "ApplyLookTable", icm.applyLookTable); + keyFile.set_boolean ("Color Management", "ApplyLookTable", icm.applyLookTable); } if (!pedited || pedited->icm.applyBaselineExposureOffset) { - keyFile.set_boolean ("Color Management", "ApplyBaselineExposureOffset", icm.applyBaselineExposureOffset); + keyFile.set_boolean ("Color Management", "ApplyBaselineExposureOffset", icm.applyBaselineExposureOffset); } if (!pedited || pedited->icm.applyHueSatMap) { - keyFile.set_boolean ("Color Management", "ApplyHueSatMap", icm.applyHueSatMap); - } - - if (!pedited || pedited->icm.blendCMSMatrix) { - keyFile.set_boolean ("Color Management", "BlendCMSMatrix", icm.blendCMSMatrix); + keyFile.set_boolean ("Color Management", "ApplyHueSatMap", icm.applyHueSatMap); } if (!pedited || pedited->icm.dcpIlluminant) { - keyFile.set_integer ("Color Management", "DCPIlluminant", icm.dcpIlluminant); + keyFile.set_integer ("Color Management", "DCPIlluminant", icm.dcpIlluminant); } if (!pedited || pedited->icm.working) { - keyFile.set_string ("Color Management", "WorkingProfile", icm.working); + keyFile.set_string ("Color Management", "WorkingProfile", icm.working); } if (!pedited || pedited->icm.output) { - keyFile.set_string ("Color Management", "OutputProfile", icm.output); + keyFile.set_string ("Color Management", "OutputProfile", icm.output); } if (!pedited || pedited->icm.outputIntent) { Glib::ustring intent; switch (icm.outputIntent) { - default: - case RI_PERCEPTUAL: - intent = "Perceptual"; - break; + default: + case RI_PERCEPTUAL: + intent = "Perceptual"; + break; - case RI_RELATIVE: - intent = "Relative"; - break; + case RI_RELATIVE: + intent = "Relative"; + break; - case RI_SATURATION: - intent = "Saturation"; - break; + case RI_SATURATION: + intent = "Saturation"; + break; - case RI_ABSOLUTE: - intent = "Absolute"; - break; + case RI_ABSOLUTE: + intent = "Absolute"; + break; } - keyFile.set_string ("Color Management", "OutputProfileIntent", intent); + keyFile.set_string ("Color Management", "OutputProfileIntent", intent); } if (!pedited || pedited->icm.outputBPC) { - keyFile.set_boolean ("Color Management", "OutputBPC", icm.outputBPC); + keyFile.set_boolean ("Color Management", "OutputBPC", icm.outputBPC); } if (!pedited || pedited->icm.gamma) { - keyFile.set_string ("Color Management", "Gammafree", icm.gamma); + keyFile.set_string ("Color Management", "Gammafree", icm.gamma); } if (!pedited || pedited->icm.freegamma) { - keyFile.set_boolean ("Color Management", "Freegamma", icm.freegamma); + keyFile.set_boolean ("Color Management", "Freegamma", icm.freegamma); } if (!pedited || pedited->icm.gampos) { - keyFile.set_double ("Color Management", "GammaValue", icm.gampos); + keyFile.set_double ("Color Management", "GammaValue", icm.gampos); } if (!pedited || pedited->icm.slpos) { - keyFile.set_double ("Color Management", "GammaSlope", icm.slpos); + keyFile.set_double ("Color Management", "GammaSlope", icm.slpos); } - // save wavelet parameters +// save wavelet parameters if (!pedited || pedited->wavelet.enabled) { keyFile.set_boolean ("Wavelet", "Enabled", wavelet.enabled); } @@ -2734,31 +2862,31 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->wavelet.thres) { - keyFile.set_integer ("Wavelet", "MaxLev", wavelet.thres); + keyFile.set_integer ("Wavelet", "MaxLev", wavelet.thres); } if (!pedited || pedited->wavelet.Tilesmethod) { - keyFile.set_string ("Wavelet", "TilesMethod", wavelet.Tilesmethod); + keyFile.set_string ("Wavelet", "TilesMethod", wavelet.Tilesmethod); } if (!pedited || pedited->wavelet.daubcoeffmethod) { - keyFile.set_string ("Wavelet", "DaubMethod", wavelet.daubcoeffmethod); + keyFile.set_string ("Wavelet", "DaubMethod", wavelet.daubcoeffmethod); } if (!pedited || pedited->wavelet.CLmethod) { - keyFile.set_string ("Wavelet", "ChoiceLevMethod", wavelet.CLmethod); + keyFile.set_string ("Wavelet", "ChoiceLevMethod", wavelet.CLmethod); } if (!pedited || pedited->wavelet.Backmethod) { - keyFile.set_string ("Wavelet", "BackMethod", wavelet.Backmethod); + keyFile.set_string ("Wavelet", "BackMethod", wavelet.Backmethod); } if (!pedited || pedited->wavelet.Lmethod) { - keyFile.set_string ("Wavelet", "LevMethod", wavelet.Lmethod); + keyFile.set_string ("Wavelet", "LevMethod", wavelet.Lmethod); } if (!pedited || pedited->wavelet.Dirmethod) { - keyFile.set_string ("Wavelet", "DirMethod", wavelet.Dirmethod); + keyFile.set_string ("Wavelet", "DirMethod", wavelet.Dirmethod); } if (!pedited || pedited->wavelet.greenhigh) { @@ -2813,180 +2941,180 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_boolean ("Wavelet", "Expnoise", wavelet.expnoise); } - for(int i = 0; i < 9; i++) { + for (int i = 0; i < 9; i++) { std::stringstream ss; ss << "Contrast" << (i + 1); if (!pedited || pedited->wavelet.c[i]) { - keyFile.set_integer("Wavelet", ss.str(), wavelet.c[i]); + keyFile.set_integer ("Wavelet", ss.str(), wavelet.c[i]); } } - for(int i = 0; i < 9; i++) { + for (int i = 0; i < 9; i++) { std::stringstream ss; ss << "Chroma" << (i + 1); if (!pedited || pedited->wavelet.ch[i]) { - keyFile.set_integer("Wavelet", ss.str(), wavelet.ch[i]); + keyFile.set_integer ("Wavelet", ss.str(), wavelet.ch[i]); } } if (!pedited || pedited->wavelet.sup) { - keyFile.set_integer ("Wavelet", "ContExtra", wavelet.sup); + keyFile.set_integer ("Wavelet", "ContExtra", wavelet.sup); } if (!pedited || pedited->wavelet.HSmethod) { - keyFile.set_string ("Wavelet", "HSMethod", wavelet.HSmethod); + keyFile.set_string ("Wavelet", "HSMethod", wavelet.HSmethod); } if (!pedited || pedited->wavelet.hllev) { Glib::ArrayHandle thresh (wavelet.hllev.value, 4, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Wavelet", "HLRange", thresh); + keyFile.set_integer_list ("Wavelet", "HLRange", thresh); } if (!pedited || pedited->wavelet.bllev) { Glib::ArrayHandle thresh (wavelet.bllev.value, 4, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Wavelet", "SHRange", thresh); + keyFile.set_integer_list ("Wavelet", "SHRange", thresh); } if (!pedited || pedited->wavelet.edgcont) { Glib::ArrayHandle thresh (wavelet.edgcont.value, 4, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Wavelet", "Edgcont", thresh); + keyFile.set_integer_list ("Wavelet", "Edgcont", thresh); } if (!pedited || pedited->wavelet.level0noise) { Glib::ArrayHandle thresh (wavelet.level0noise.value, 2, Glib::OWNERSHIP_NONE); - keyFile.set_double_list("Wavelet", "Level0noise", thresh); + keyFile.set_double_list ("Wavelet", "Level0noise", thresh); } if (!pedited || pedited->wavelet.level1noise) { Glib::ArrayHandle thresh (wavelet.level1noise.value, 2, Glib::OWNERSHIP_NONE); - keyFile.set_double_list("Wavelet", "Level1noise", thresh); + keyFile.set_double_list ("Wavelet", "Level1noise", thresh); } if (!pedited || pedited->wavelet.level2noise) { Glib::ArrayHandle thresh (wavelet.level2noise.value, 2, Glib::OWNERSHIP_NONE); - keyFile.set_double_list("Wavelet", "Level2noise", thresh); + keyFile.set_double_list ("Wavelet", "Level2noise", thresh); } if (!pedited || pedited->wavelet.level3noise) { Glib::ArrayHandle thresh (wavelet.level3noise.value, 2, Glib::OWNERSHIP_NONE); - keyFile.set_double_list("Wavelet", "Level3noise", thresh); + keyFile.set_double_list ("Wavelet", "Level3noise", thresh); } if (!pedited || pedited->wavelet.threshold) { - keyFile.set_integer ("Wavelet", "ThresholdHighlight", wavelet.threshold); + keyFile.set_integer ("Wavelet", "ThresholdHighlight", wavelet.threshold); } if (!pedited || pedited->wavelet.threshold2) { - keyFile.set_integer ("Wavelet", "ThresholdShadow", wavelet.threshold2); + keyFile.set_integer ("Wavelet", "ThresholdShadow", wavelet.threshold2); } if (!pedited || pedited->wavelet.edgedetect) { - keyFile.set_integer ("Wavelet", "Edgedetect", wavelet.edgedetect); + keyFile.set_integer ("Wavelet", "Edgedetect", wavelet.edgedetect); } if (!pedited || pedited->wavelet.edgedetectthr) { - keyFile.set_integer ("Wavelet", "Edgedetectthr", wavelet.edgedetectthr); + keyFile.set_integer ("Wavelet", "Edgedetectthr", wavelet.edgedetectthr); } if (!pedited || pedited->wavelet.edgedetectthr2) { - keyFile.set_integer ("Wavelet", "EdgedetectthrHi", wavelet.edgedetectthr2); + keyFile.set_integer ("Wavelet", "EdgedetectthrHi", wavelet.edgedetectthr2); } if (!pedited || pedited->wavelet.edgesensi) { - keyFile.set_integer ("Wavelet", "Edgesensi", wavelet.edgesensi); + keyFile.set_integer ("Wavelet", "Edgesensi", wavelet.edgesensi); } if (!pedited || pedited->wavelet.edgeampli) { - keyFile.set_integer ("Wavelet", "Edgeampli", wavelet.edgeampli); + keyFile.set_integer ("Wavelet", "Edgeampli", wavelet.edgeampli); } if (!pedited || pedited->wavelet.chroma) { - keyFile.set_integer ("Wavelet", "ThresholdChroma", wavelet.chroma); + keyFile.set_integer ("Wavelet", "ThresholdChroma", wavelet.chroma); } if (!pedited || pedited->wavelet.CHmethod) { - keyFile.set_string ("Wavelet", "CHromaMethod", wavelet.CHmethod); + keyFile.set_string ("Wavelet", "CHromaMethod", wavelet.CHmethod); } if (!pedited || pedited->wavelet.Medgreinf) { - keyFile.set_string ("Wavelet", "Medgreinf", wavelet.Medgreinf); + keyFile.set_string ("Wavelet", "Medgreinf", wavelet.Medgreinf); } if (!pedited || pedited->wavelet.CHSLmethod) { - keyFile.set_string ("Wavelet", "CHSLromaMethod", wavelet.CHSLmethod); + keyFile.set_string ("Wavelet", "CHSLromaMethod", wavelet.CHSLmethod); } if (!pedited || pedited->wavelet.EDmethod) { - keyFile.set_string ("Wavelet", "EDMethod", wavelet.EDmethod); + keyFile.set_string ("Wavelet", "EDMethod", wavelet.EDmethod); } if (!pedited || pedited->wavelet.NPmethod) { - keyFile.set_string ("Wavelet", "NPMethod", wavelet.NPmethod); + keyFile.set_string ("Wavelet", "NPMethod", wavelet.NPmethod); } if (!pedited || pedited->wavelet.BAmethod) { - keyFile.set_string ("Wavelet", "BAMethod", wavelet.BAmethod); + keyFile.set_string ("Wavelet", "BAMethod", wavelet.BAmethod); } if (!pedited || pedited->wavelet.TMmethod) { - keyFile.set_string ("Wavelet", "TMMethod", wavelet.TMmethod); + keyFile.set_string ("Wavelet", "TMMethod", wavelet.TMmethod); } if (!pedited || pedited->wavelet.chro) { - keyFile.set_integer ("Wavelet", "ChromaLink", wavelet.chro); + keyFile.set_integer ("Wavelet", "ChromaLink", wavelet.chro); } - if (!pedited || pedited->wavelet.ccwcurve) { + if (!pedited || pedited->wavelet.ccwcurve) { Glib::ArrayHandle ccwcurve = wavelet.ccwcurve; - keyFile.set_double_list("Wavelet", "ContrastCurve", ccwcurve); + keyFile.set_double_list ("Wavelet", "ContrastCurve", ccwcurve); } if (!pedited || pedited->wavelet.pastlev) { Glib::ArrayHandle thresh (wavelet.pastlev.value, 4, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Wavelet", "Pastlev", thresh); + keyFile.set_integer_list ("Wavelet", "Pastlev", thresh); } if (!pedited || pedited->wavelet.satlev) { Glib::ArrayHandle thresh (wavelet.satlev.value, 4, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Wavelet", "Satlev", thresh); + keyFile.set_integer_list ("Wavelet", "Satlev", thresh); } if (!pedited || pedited->wavelet.opacityCurveRG) { Glib::ArrayHandle curve = wavelet.opacityCurveRG; - keyFile.set_double_list("Wavelet", "OpacityCurveRG", curve); + keyFile.set_double_list ("Wavelet", "OpacityCurveRG", curve); } if (!pedited || pedited->wavelet.opacityCurveBY) { Glib::ArrayHandle curve = wavelet.opacityCurveBY; - keyFile.set_double_list("Wavelet", "OpacityCurveBY", curve); + keyFile.set_double_list ("Wavelet", "OpacityCurveBY", curve); } if (!pedited || pedited->wavelet.opacityCurveW) { Glib::ArrayHandle curve = wavelet.opacityCurveW; - keyFile.set_double_list("Wavelet", "OpacityCurveW", curve); + keyFile.set_double_list ("Wavelet", "OpacityCurveW", curve); } if (!pedited || pedited->wavelet.opacityCurveWL) { Glib::ArrayHandle curve = wavelet.opacityCurveWL; - keyFile.set_double_list("Wavelet", "OpacityCurveWL", curve); + keyFile.set_double_list ("Wavelet", "OpacityCurveWL", curve); } if (!pedited || pedited->wavelet.hhcurve) { Glib::ArrayHandle curve = wavelet.hhcurve; - keyFile.set_double_list("Wavelet", "HHcurve", curve); + keyFile.set_double_list ("Wavelet", "HHcurve", curve); } if (!pedited || pedited->wavelet.Chcurve) { Glib::ArrayHandle curve = wavelet.Chcurve; - keyFile.set_double_list("Wavelet", "CHcurve", curve); + keyFile.set_double_list ("Wavelet", "CHcurve", curve); } - if (!pedited || pedited->wavelet.wavclCurve) { + if (!pedited || pedited->wavelet.wavclCurve) { Glib::ArrayHandle wavclCurve = wavelet.wavclCurve; - keyFile.set_double_list("Wavelet", "WavclCurve", wavclCurve); + keyFile.set_double_list ("Wavelet", "WavclCurve", wavclCurve); } @@ -3010,30 +3138,30 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_boolean ("Wavelet", "Lipst", wavelet.lipst); } -// if (!pedited || pedited->wavelet.edgreinf) keyFile.set_boolean ("Wavelet", "Edgreinf", wavelet.edgreinf); +// if (!pedited || pedited->wavelet.edgreinf) keyFile.set_boolean ("Wavelet", "Edgreinf", wavelet.edgreinf); if (!pedited || pedited->wavelet.skinprotect) { keyFile.set_double ("Wavelet", "Skinprotect", wavelet.skinprotect); } if (!pedited || pedited->wavelet.hueskin) { Glib::ArrayHandle thresh (wavelet.hueskin.value, 4, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Wavelet", "Hueskin", thresh); + keyFile.set_integer_list ("Wavelet", "Hueskin", thresh); } if (!pedited || pedited->wavelet.edgrad) { - keyFile.set_integer ("Wavelet", "Edgrad", wavelet.edgrad); + keyFile.set_integer ("Wavelet", "Edgrad", wavelet.edgrad); } if (!pedited || pedited->wavelet.edgval) { - keyFile.set_integer ("Wavelet", "Edgval", wavelet.edgval); + keyFile.set_integer ("Wavelet", "Edgval", wavelet.edgval); } if (!pedited || pedited->wavelet.edgthresh) { - keyFile.set_integer ("Wavelet", "ThrEdg", wavelet.edgthresh); + keyFile.set_integer ("Wavelet", "ThrEdg", wavelet.edgthresh); } -// if (!pedited || pedited->wavelet.strength) keyFile.set_integer ("Wavelet", "Strength", wavelet.strength); - // if (!pedited || pedited->wavelet.balance) keyFile.set_integer ("Wavelet", "Balance", wavelet.balance); +// if (!pedited || pedited->wavelet.strength) keyFile.set_integer ("Wavelet", "Strength", wavelet.strength); +// if (!pedited || pedited->wavelet.balance) keyFile.set_integer ("Wavelet", "Balance", wavelet.balance); if (!pedited || pedited->wavelet.avoid) { keyFile.set_boolean ("Wavelet", "AvoidColorShift", wavelet.avoid); @@ -3044,48 +3172,48 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->wavelet.rescon) { - keyFile.set_integer ("Wavelet", "ResidualcontShadow", wavelet.rescon); + keyFile.set_integer ("Wavelet", "ResidualcontShadow", wavelet.rescon); } if (!pedited || pedited->wavelet.resconH) { - keyFile.set_integer ("Wavelet", "ResidualcontHighlight", wavelet.resconH); + keyFile.set_integer ("Wavelet", "ResidualcontHighlight", wavelet.resconH); } if (!pedited || pedited->wavelet.thr) { - keyFile.set_integer ("Wavelet", "ThresholdResidShadow", wavelet.thr); + keyFile.set_integer ("Wavelet", "ThresholdResidShadow", wavelet.thr); } if (!pedited || pedited->wavelet.thrH) { - keyFile.set_integer ("Wavelet", "ThresholdResidHighLight", wavelet.thrH); + keyFile.set_integer ("Wavelet", "ThresholdResidHighLight", wavelet.thrH); } if (!pedited || pedited->wavelet.reschro) { - keyFile.set_integer ("Wavelet", "Residualchroma", wavelet.reschro); + keyFile.set_integer ("Wavelet", "Residualchroma", wavelet.reschro); } if (!pedited || pedited->wavelet.tmrs) { - keyFile.set_double ("Wavelet", "ResidualTM", wavelet.tmrs); + keyFile.set_double ("Wavelet", "ResidualTM", wavelet.tmrs); } if (!pedited || pedited->wavelet.gamma) { - keyFile.set_double ("Wavelet", "Residualgamma", wavelet.gamma); + keyFile.set_double ("Wavelet", "Residualgamma", wavelet.gamma); } if (!pedited || pedited->wavelet.sky) { - keyFile.set_double ("Wavelet", "HueRangeResidual", wavelet.sky); + keyFile.set_double ("Wavelet", "HueRangeResidual", wavelet.sky); } if (!pedited || pedited->wavelet.hueskin2) { Glib::ArrayHandle thresh (wavelet.hueskin2.value, 4, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Wavelet", "HueRange", thresh); + keyFile.set_integer_list ("Wavelet", "HueRange", thresh); } if (!pedited || pedited->wavelet.contrast) { - keyFile.set_integer ("Wavelet", "Contrast", wavelet.contrast); + keyFile.set_integer ("Wavelet", "Contrast", wavelet.contrast); } - // save directional pyramid wavelet parameters +// save directional pyramid wavelet parameters if (!pedited || pedited->dirpyrequalizer.enabled) { keyFile.set_boolean ("Directional Pyramid Equalizer", "Enabled", dirpyrequalizer.enabled); } @@ -3095,15 +3223,15 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->dirpyrequalizer.cbdlMethod) { - keyFile.set_string ("Directional Pyramid Equalizer", "cbdlMethod", dirpyrequalizer.cbdlMethod); + keyFile.set_string ("Directional Pyramid Equalizer", "cbdlMethod", dirpyrequalizer.cbdlMethod); } - for(int i = 0; i < 6; i++) { + for (int i = 0; i < 6; i++) { std::stringstream ss; ss << "Mult" << i; if (!pedited || pedited->dirpyrequalizer.mult[i]) { - keyFile.set_double("Directional Pyramid Equalizer", ss.str(), dirpyrequalizer.mult[i]); + keyFile.set_double ("Directional Pyramid Equalizer", ss.str(), dirpyrequalizer.mult[i]); } } @@ -3115,31 +3243,31 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_double ("Directional Pyramid Equalizer", "Skinprotect", dirpyrequalizer.skinprotect); } - // if (!pedited || pedited->dirpyrequalizer.algo) keyFile.set_string ("Directional Pyramid Equalizer", "Algorithm", dirpyrequalizer.algo); +// if (!pedited || pedited->dirpyrequalizer.algo) keyFile.set_string ("Directional Pyramid Equalizer", "Algorithm", dirpyrequalizer.algo); if (!pedited || pedited->dirpyrequalizer.hueskin) { Glib::ArrayHandle thresh (dirpyrequalizer.hueskin.value, 4, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("Directional Pyramid Equalizer", "Hueskin", thresh); + keyFile.set_integer_list ("Directional Pyramid Equalizer", "Hueskin", thresh); } - // save hsv wavelet parameters +// save hsv wavelet parameters if (!pedited || pedited->hsvequalizer.hcurve) { Glib::ArrayHandle hcurve = hsvequalizer.hcurve; - keyFile.set_double_list("HSV Equalizer", "HCurve", hcurve); + keyFile.set_double_list ("HSV Equalizer", "HCurve", hcurve); } if (!pedited || pedited->hsvequalizer.scurve) { Glib::ArrayHandle scurve = hsvequalizer.scurve; - keyFile.set_double_list("HSV Equalizer", "SCurve", scurve); + keyFile.set_double_list ("HSV Equalizer", "SCurve", scurve); } if (!pedited || pedited->hsvequalizer.vcurve) { Glib::ArrayHandle vcurve = hsvequalizer.vcurve; - keyFile.set_double_list("HSV Equalizer", "VCurve", vcurve); + keyFile.set_double_list ("HSV Equalizer", "VCurve", vcurve); } - //save film simulation parameters +//save film simulation parameters if ( !pedited || pedited->filmSimulation.enabled ) { - keyFile.set_boolean( "Film Simulation", "Enabled", filmSimulation.enabled ); + keyFile.set_boolean ( "Film Simulation", "Enabled", filmSimulation.enabled ); } if ( !pedited || pedited->filmSimulation.clutFilename ) { @@ -3147,36 +3275,36 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if ( !pedited || pedited->filmSimulation.strength ) { - keyFile.set_integer( "Film Simulation", "Strength", filmSimulation.strength ); + keyFile.set_integer ( "Film Simulation", "Strength", filmSimulation.strength ); } if (!pedited || pedited->rgbCurves.lumamode) { - keyFile.set_boolean ("RGB Curves", "LumaMode", rgbCurves.lumamode); + keyFile.set_boolean ("RGB Curves", "LumaMode", rgbCurves.lumamode); } if (!pedited || pedited->rgbCurves.rcurve) { Glib::ArrayHandle RGBrcurve = rgbCurves.rcurve; - keyFile.set_double_list("RGB Curves", "rCurve", RGBrcurve); + keyFile.set_double_list ("RGB Curves", "rCurve", RGBrcurve); } if (!pedited || pedited->rgbCurves.gcurve) { Glib::ArrayHandle RGBgcurve = rgbCurves.gcurve; - keyFile.set_double_list("RGB Curves", "gCurve", RGBgcurve); + keyFile.set_double_list ("RGB Curves", "gCurve", RGBgcurve); } if (!pedited || pedited->rgbCurves.bcurve) { Glib::ArrayHandle RGBbcurve = rgbCurves.bcurve; - keyFile.set_double_list("RGB Curves", "bCurve", RGBbcurve); + keyFile.set_double_list ("RGB Curves", "bCurve", RGBbcurve); } - // save Color Toning +// save Color Toning if (!pedited || pedited->colorToning.enabled) { keyFile.set_boolean ("ColorToning", "Enabled", colorToning.enabled); } if (!pedited || pedited->colorToning.method) { - keyFile.set_string ("ColorToning", "Method", colorToning.method); + keyFile.set_string ("ColorToning", "Method", colorToning.method); } if (!pedited || pedited->colorToning.lumamode) { @@ -3184,23 +3312,23 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->colorToning.twocolor) { - keyFile.set_string ("ColorToning", "Twocolor", colorToning.twocolor); + keyFile.set_string ("ColorToning", "Twocolor", colorToning.twocolor); } if (!pedited || pedited->colorToning.redlow) { - keyFile.set_double ("ColorToning", "Redlow", colorToning.redlow); + keyFile.set_double ("ColorToning", "Redlow", colorToning.redlow); } if (!pedited || pedited->colorToning.greenlow) { - keyFile.set_double ("ColorToning", "Greenlow", colorToning.greenlow); + keyFile.set_double ("ColorToning", "Greenlow", colorToning.greenlow); } if (!pedited || pedited->colorToning.bluelow) { - keyFile.set_double ("ColorToning", "Bluelow", colorToning.bluelow); + keyFile.set_double ("ColorToning", "Bluelow", colorToning.bluelow); } if (!pedited || pedited->colorToning.satlow) { - keyFile.set_double ("ColorToning", "Satlow", colorToning.satlow); + keyFile.set_double ("ColorToning", "Satlow", colorToning.satlow); } if (!pedited || pedited->colorToning.balance) { @@ -3208,31 +3336,31 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->colorToning.sathigh) { - keyFile.set_double ("ColorToning", "Sathigh", colorToning.sathigh); + keyFile.set_double ("ColorToning", "Sathigh", colorToning.sathigh); } if (!pedited || pedited->colorToning.redmed) { - keyFile.set_double ("ColorToning", "Redmed", colorToning.redmed); + keyFile.set_double ("ColorToning", "Redmed", colorToning.redmed); } if (!pedited || pedited->colorToning.greenmed) { - keyFile.set_double ("ColorToning", "Greenmed", colorToning.greenmed); + keyFile.set_double ("ColorToning", "Greenmed", colorToning.greenmed); } if (!pedited || pedited->colorToning.bluemed) { - keyFile.set_double ("ColorToning", "Bluemed", colorToning.bluemed); + keyFile.set_double ("ColorToning", "Bluemed", colorToning.bluemed); } if (!pedited || pedited->colorToning.redhigh) { - keyFile.set_double ("ColorToning", "Redhigh", colorToning.redhigh); + keyFile.set_double ("ColorToning", "Redhigh", colorToning.redhigh); } if (!pedited || pedited->colorToning.greenhigh) { - keyFile.set_double ("ColorToning", "Greenhigh", colorToning.greenhigh); + keyFile.set_double ("ColorToning", "Greenhigh", colorToning.greenhigh); } if (!pedited || pedited->colorToning.bluehigh) { - keyFile.set_double ("ColorToning", "Bluehigh", colorToning.bluehigh); + keyFile.set_double ("ColorToning", "Bluehigh", colorToning.bluehigh); } if (!pedited || pedited->colorToning.autosat) { @@ -3241,12 +3369,12 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b if (!pedited || pedited->colorToning.opacityCurve) { Glib::ArrayHandle curve = colorToning.opacityCurve; - keyFile.set_double_list("ColorToning", "OpacityCurve", curve); + keyFile.set_double_list ("ColorToning", "OpacityCurve", curve); } if (!pedited || pedited->colorToning.colorCurve) { Glib::ArrayHandle curve = colorToning.colorCurve; - keyFile.set_double_list("ColorToning", "ColorCurve", curve); + keyFile.set_double_list ("ColorToning", "ColorCurve", curve); } if (!pedited || pedited->colorToning.satprotectionthreshold) { @@ -3263,27 +3391,27 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b if (!pedited || pedited->colorToning.hlColSat) { Glib::ArrayHandle thresh (colorToning.hlColSat.value, 2, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("ColorToning", "HighlightsColorSaturation", thresh); + keyFile.set_integer_list ("ColorToning", "HighlightsColorSaturation", thresh); } if (!pedited || pedited->colorToning.shadowsColSat) { Glib::ArrayHandle thresh (colorToning.shadowsColSat.value, 2, Glib::OWNERSHIP_NONE); - keyFile.set_integer_list("ColorToning", "ShadowsColorSaturation", thresh); + keyFile.set_integer_list ("ColorToning", "ShadowsColorSaturation", thresh); } - if (!pedited || pedited->colorToning.clcurve) { + if (!pedited || pedited->colorToning.clcurve) { Glib::ArrayHandle clcurve = colorToning.clcurve; - keyFile.set_double_list("ColorToning", "ClCurve", clcurve); + keyFile.set_double_list ("ColorToning", "ClCurve", clcurve); } - if (!pedited || pedited->colorToning.cl2curve) { + if (!pedited || pedited->colorToning.cl2curve) { Glib::ArrayHandle cl2curve = colorToning.cl2curve; - keyFile.set_double_list("ColorToning", "Cl2Curve", cl2curve); + keyFile.set_double_list ("ColorToning", "Cl2Curve", cl2curve); } - // save raw parameters +// save raw parameters if (!pedited || pedited->raw.darkFrame) { - keyFile.set_string ("RAW", "DarkFrame", relativePathIfInside(fname, fnameAbsolute, raw.dark_frame) ); + keyFile.set_string ("RAW", "DarkFrame", relativePathIfInside (fname, fnameAbsolute, raw.dark_frame) ); } if (!pedited || pedited->raw.dfAuto) { @@ -3291,7 +3419,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->raw.ff_file) { - keyFile.set_string ("RAW", "FlatFieldFile", relativePathIfInside(fname, fnameAbsolute, raw.ff_file) ); + keyFile.set_string ("RAW", "FlatFieldFile", relativePathIfInside (fname, fnameAbsolute, raw.ff_file) ); } if (!pedited || pedited->raw.ff_AutoSelect) { @@ -3303,7 +3431,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->raw.ff_BlurType) { - keyFile.set_string ("RAW", "FlatFieldBlurType", raw.ff_BlurType ); + keyFile.set_string ("RAW", "FlatFieldBlurType", raw.ff_BlurType ); } if (!pedited || pedited->raw.ff_AutoClipControl) { @@ -3318,16 +3446,12 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_boolean ("RAW", "CA", raw.ca_autocorrect ); } - if (!pedited || pedited->raw.caAutoStrength) { - keyFile.set_double ("RAW", "CAAutoStrength", raw.caautostrength ); - } - if (!pedited || pedited->raw.caRed) { - keyFile.set_double ("RAW", "CARed", raw.cared ); + keyFile.set_double ("RAW", "CARed", raw.cared ); } if (!pedited || pedited->raw.caBlue) { - keyFile.set_double ("RAW", "CABlue", raw.cablue ); + keyFile.set_double ("RAW", "CABlue", raw.cablue ); } if (!pedited || pedited->raw.hotPixelFilter) { @@ -3343,7 +3467,11 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->raw.bayersensor.method) { - keyFile.set_string ("RAW Bayer", "Method", raw.bayersensor.method ); + keyFile.set_string ("RAW Bayer", "Method", raw.bayersensor.method ); + } + + if (!pedited || pedited->raw.bayersensor.imageNum) { + keyFile.set_integer ("RAW Bayer", "ImageNum", raw.bayersensor.imageNum + 1 ); } if (!pedited || pedited->raw.bayersensor.ccSteps) { @@ -3351,19 +3479,19 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->raw.bayersensor.exBlack0) { - keyFile.set_double ("RAW Bayer", "PreBlack0", raw.bayersensor.black0 ); + keyFile.set_double ("RAW Bayer", "PreBlack0", raw.bayersensor.black0 ); } if (!pedited || pedited->raw.bayersensor.exBlack1) { - keyFile.set_double ("RAW Bayer", "PreBlack1", raw.bayersensor.black1 ); + keyFile.set_double ("RAW Bayer", "PreBlack1", raw.bayersensor.black1 ); } if (!pedited || pedited->raw.bayersensor.exBlack2) { - keyFile.set_double ("RAW Bayer", "PreBlack2", raw.bayersensor.black2 ); + keyFile.set_double ("RAW Bayer", "PreBlack2", raw.bayersensor.black2 ); } if (!pedited || pedited->raw.bayersensor.exBlack3) { - keyFile.set_double ("RAW Bayer", "PreBlack3", raw.bayersensor.black3 ); + keyFile.set_double ("RAW Bayer", "PreBlack3", raw.bayersensor.black3 ); } if (!pedited || pedited->raw.bayersensor.exTwoGreen) { @@ -3390,10 +3518,128 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_integer ("RAW Bayer", "LMMSEIterations", raw.bayersensor.lmmse_iterations ); } - //if (!pedited || pedited->raw.bayersensor.allEnhance) keyFile.set_boolean ("RAW Bayer", "ALLEnhance", raw.bayersensor.all_enhance ); + if (!pedited || pedited->raw.bayersensor.pixelShiftMotion) { + keyFile.set_integer ("RAW Bayer", "PixelShiftMotion", raw.bayersensor.pixelShiftMotion ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftMotionCorrection) { + keyFile.set_integer ("RAW Bayer", "PixelShiftMotionCorrection", raw.bayersensor.pixelShiftMotionCorrection ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftMotionCorrectionMethod) { + keyFile.set_integer ("RAW Bayer", "PixelShiftMotionCorrectionMethod", raw.bayersensor.pixelShiftMotionCorrectionMethod ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftStddevFactorGreen) { + keyFile.set_double ("RAW Bayer", "pixelShiftStddevFactorGreen", raw.bayersensor.pixelShiftStddevFactorGreen ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftStddevFactorRed) { + keyFile.set_double ("RAW Bayer", "pixelShiftStddevFactorRed", raw.bayersensor.pixelShiftStddevFactorRed ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftStddevFactorBlue) { + keyFile.set_double ("RAW Bayer", "pixelShiftStddevFactorBlue", raw.bayersensor.pixelShiftStddevFactorBlue ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftEperIso) { + keyFile.set_double ("RAW Bayer", "PixelShiftEperIso", raw.bayersensor.pixelShiftEperIso ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftNreadIso) { + keyFile.set_double ("RAW Bayer", "PixelShiftNreadIso", raw.bayersensor.pixelShiftNreadIso ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftPrnu) { + keyFile.set_double ("RAW Bayer", "PixelShiftPrnu", raw.bayersensor.pixelShiftPrnu ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftSigma) { + keyFile.set_double ("RAW Bayer", "PixelShiftSigma", raw.bayersensor.pixelShiftSigma ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftSum) { + keyFile.set_double ("RAW Bayer", "PixelShiftSum", raw.bayersensor.pixelShiftSum ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftRedBlueWeight) { + keyFile.set_double ("RAW Bayer", "PixelShiftRedBlueWeight", raw.bayersensor.pixelShiftRedBlueWeight ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftShowMotion) { + keyFile.set_boolean ("RAW Bayer", "PixelShiftShowMotion", raw.bayersensor.pixelShiftShowMotion ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftShowMotionMaskOnly) { + keyFile.set_boolean ("RAW Bayer", "PixelShiftShowMotionMaskOnly", raw.bayersensor.pixelShiftShowMotionMaskOnly ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftAutomatic) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftAutomatic", raw.bayersensor.pixelShiftAutomatic ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftNonGreenHorizontal) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenHorizontal", raw.bayersensor.pixelShiftNonGreenHorizontal ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftNonGreenVertical) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenVertical", raw.bayersensor.pixelShiftNonGreenVertical ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftHoleFill) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftHoleFill", raw.bayersensor.pixelShiftHoleFill ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftMedian) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftMedian", raw.bayersensor.pixelShiftMedian ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftMedian3) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftMedian3", raw.bayersensor.pixelShiftMedian3 ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftGreen) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftGreen", raw.bayersensor.pixelShiftGreen ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftBlur) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftBlur", raw.bayersensor.pixelShiftBlur ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftSmooth) { + keyFile.set_double ("RAW Bayer", "pixelShiftSmoothFactor", raw.bayersensor.pixelShiftSmoothFactor ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftExp0) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftExp0", raw.bayersensor.pixelShiftExp0 ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftLmmse) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftLmmse", raw.bayersensor.pixelShiftLmmse ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftEqualBright) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftEqualBright", raw.bayersensor.pixelShiftEqualBright ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftEqualBrightChannel) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftEqualBrightChannel", raw.bayersensor.pixelShiftEqualBrightChannel ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftNonGreenCross) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenCross", raw.bayersensor.pixelShiftNonGreenCross ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftNonGreenCross2) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenCross2", raw.bayersensor.pixelShiftNonGreenCross2 ); + } + + if (!pedited || pedited->raw.bayersensor.pixelShiftNonGreenAmaze) { + keyFile.set_boolean ("RAW Bayer", "pixelShiftNonGreenAmaze", raw.bayersensor.pixelShiftNonGreenAmaze ); + } if (!pedited || pedited->raw.xtranssensor.method) { - keyFile.set_string ("RAW X-Trans", "Method", raw.xtranssensor.method ); + keyFile.set_string ("RAW X-Trans", "Method", raw.xtranssensor.method ); } if (!pedited || pedited->raw.xtranssensor.ccSteps) { @@ -3401,35 +3647,35 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b } if (!pedited || pedited->raw.xtranssensor.exBlackRed) { - keyFile.set_double ("RAW X-Trans", "PreBlackRed", raw.xtranssensor.blackred ); + keyFile.set_double ("RAW X-Trans", "PreBlackRed", raw.xtranssensor.blackred ); } if (!pedited || pedited->raw.xtranssensor.exBlackGreen) { - keyFile.set_double ("RAW X-Trans", "PreBlackGreen", raw.xtranssensor.blackgreen ); + keyFile.set_double ("RAW X-Trans", "PreBlackGreen", raw.xtranssensor.blackgreen ); } if (!pedited || pedited->raw.xtranssensor.exBlackBlue) { - keyFile.set_double ("RAW X-Trans", "PreBlackBlue", raw.xtranssensor.blackblue ); + keyFile.set_double ("RAW X-Trans", "PreBlackBlue", raw.xtranssensor.blackblue ); } - // save raw exposition +// save raw exposition if (!pedited || pedited->raw.exPos) { - keyFile.set_double ("RAW", "PreExposure", raw.expos ); + keyFile.set_double ("RAW", "PreExposure", raw.expos ); } if (!pedited || pedited->raw.exPreser) { - keyFile.set_double ("RAW", "PrePreserv", raw.preser ); + keyFile.set_double ("RAW", "PrePreserv", raw.preser ); } - // save exif change list +// save exif change list if (!pedited || pedited->exif) { for (ExifPairs::const_iterator i = exif.begin(); i != exif.end(); ++i) { keyFile.set_string ("Exif", i->first, i->second); } } - // save iptc change list +// save iptc change list if (!pedited || pedited->iptc) { for (IPTCPairs::const_iterator i = iptc.begin(); i != iptc.end(); ++i) { Glib::ArrayHandle values = i->second; @@ -3439,7 +3685,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b sPParams = keyFile.to_data(); - } catch(Glib::KeyFileError&) {} + } catch (Glib::KeyFileError&) {} if (sPParams.empty ()) { return 1; @@ -3480,7 +3726,7 @@ int ProcParams::write (const Glib::ustring &fname, const Glib::ustring &content) int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) { - setlocale(LC_NUMERIC, "C"); // to set decimal point to "." + setlocale (LC_NUMERIC, "C"); // to set decimal point to "." if (fname.empty()) { return 1; @@ -3491,7 +3737,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) try { if (pedited) { - pedited->set(false); + pedited->set (false); } FILE* f = g_fopen (fname.c_str (), "rt"); @@ -3522,24 +3768,24 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) if (keyFile.has_group ("Version")) { if (keyFile.has_key ("Version", "AppVersion")) { - appVersion = keyFile.get_string ("Version", "AppVersion"); + appVersion = keyFile.get_string ("Version", "AppVersion"); } if (keyFile.has_key ("Version", "Version")) { - ppVersion = keyFile.get_integer ("Version", "Version"); + ppVersion = keyFile.get_integer ("Version", "Version"); } } if (keyFile.has_group ("General")) { - if (keyFile.has_key ("General", "Rank")) { - rank = keyFile.get_integer ("General", "Rank"); + if (keyFile.has_key ("General", "Rank")) { + rank = keyFile.get_integer ("General", "Rank"); if (pedited) { pedited->general.rank = true; } } - if (keyFile.has_key ("General", "ColorLabel")) { + if (keyFile.has_key ("General", "ColorLabel")) { colorlabel = keyFile.get_integer ("General", "ColorLabel"); if (pedited) { @@ -3547,8 +3793,8 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("General", "InTrash")) { - inTrash = keyFile.get_boolean ("General", "InTrash"); + if (keyFile.has_key ("General", "InTrash")) { + inTrash = keyFile.get_boolean ("General", "InTrash"); if (pedited) { pedited->general.intrash = true; @@ -3558,57 +3804,57 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) if (keyFile.has_group ("Exposure")) { if (ppVersion < PPVERSION_AEXP) { - toneCurve.autoexp = false; // prevent execution of autoexp when opening file created with earlier verions of autoexp algorithm - } else if (keyFile.has_key ("Exposure", "Auto")) { - toneCurve.autoexp = keyFile.get_boolean ("Exposure", "Auto"); + toneCurve.autoexp = false; // prevent execution of autoexp when opening file created with earlier verions of autoexp algorithm + } else if (keyFile.has_key ("Exposure", "Auto")) { + toneCurve.autoexp = keyFile.get_boolean ("Exposure", "Auto"); if (pedited) { pedited->toneCurve.autoexp = true; } } - if (keyFile.has_key ("Exposure", "Clip")) { - toneCurve.clip = keyFile.get_double ("Exposure", "Clip"); + if (keyFile.has_key ("Exposure", "Clip")) { + toneCurve.clip = keyFile.get_double ("Exposure", "Clip"); if (pedited) { pedited->toneCurve.clip = true; } } - if (keyFile.has_key ("Exposure", "Compensation")) { - toneCurve.expcomp = keyFile.get_double ("Exposure", "Compensation"); + if (keyFile.has_key ("Exposure", "Compensation")) { + toneCurve.expcomp = keyFile.get_double ("Exposure", "Compensation"); if (pedited) { pedited->toneCurve.expcomp = true; } } - if (keyFile.has_key ("Exposure", "Brightness")) { - toneCurve.brightness = keyFile.get_integer ("Exposure", "Brightness"); + if (keyFile.has_key ("Exposure", "Brightness")) { + toneCurve.brightness = keyFile.get_integer ("Exposure", "Brightness"); if (pedited) { pedited->toneCurve.brightness = true; } } - if (keyFile.has_key ("Exposure", "Contrast")) { - toneCurve.contrast = keyFile.get_integer ("Exposure", "Contrast"); + if (keyFile.has_key ("Exposure", "Contrast")) { + toneCurve.contrast = keyFile.get_integer ("Exposure", "Contrast"); if (pedited) { pedited->toneCurve.contrast = true; } } - if (keyFile.has_key ("Exposure", "Saturation")) { - toneCurve.saturation = keyFile.get_integer ("Exposure", "Saturation"); + if (keyFile.has_key ("Exposure", "Saturation")) { + toneCurve.saturation = keyFile.get_integer ("Exposure", "Saturation"); if (pedited) { pedited->toneCurve.saturation = true; } } - if (keyFile.has_key ("Exposure", "Black")) { - toneCurve.black = keyFile.get_integer ("Exposure", "Black"); + if (keyFile.has_key ("Exposure", "Black")) { + toneCurve.black = keyFile.get_integer ("Exposure", "Black"); if (pedited) { pedited->toneCurve.black = true; @@ -3616,7 +3862,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("Exposure", "HighlightCompr")) { - toneCurve.hlcompr = keyFile.get_integer ("Exposure", "HighlightCompr"); + toneCurve.hlcompr = keyFile.get_integer ("Exposure", "HighlightCompr"); if (pedited) { pedited->toneCurve.hlcompr = true; @@ -3631,23 +3877,23 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Exposure", "ShadowCompr")) { - toneCurve.shcompr = keyFile.get_integer ("Exposure", "ShadowCompr"); + if (keyFile.has_key ("Exposure", "ShadowCompr")) { + toneCurve.shcompr = keyFile.get_integer ("Exposure", "ShadowCompr"); if (pedited) { pedited->toneCurve.shcompr = true; } } - // load highlight recovery settings +// load highlight recovery settings if (toneCurve.shcompr > 100) { - toneCurve.shcompr = 100; // older pp3 files can have values above 100. + toneCurve.shcompr = 100; // older pp3 files can have values above 100. } - if (keyFile.has_key ("Exposure", "CurveMode")) { + if (keyFile.has_key ("Exposure", "CurveMode")) { Glib::ustring sMode = keyFile.get_string ("Exposure", "CurveMode"); - if (sMode == "Standard") { + if (sMode == "Standard") { toneCurve.curveMode = ToneCurveParams::TC_MODE_STD; } else if (sMode == "FilmLike") { toneCurve.curveMode = ToneCurveParams::TC_MODE_FILMLIKE; @@ -3666,10 +3912,10 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Exposure", "CurveMode2")) { + if (keyFile.has_key ("Exposure", "CurveMode2")) { Glib::ustring sMode = keyFile.get_string ("Exposure", "CurveMode2"); - if (sMode == "Standard") { + if (sMode == "Standard") { toneCurve.curveMode2 = ToneCurveParams::TC_MODE_STD; } else if (sMode == "FilmLike") { toneCurve.curveMode2 = ToneCurveParams::TC_MODE_FILMLIKE; @@ -3689,16 +3935,18 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (ppVersion > 200) { - if (keyFile.has_key ("Exposure", "Curve")) { - toneCurve.curve = keyFile.get_double_list ("Exposure", "Curve"); + if (keyFile.has_key ("Exposure", "Curve")) { + toneCurve.curve = keyFile.get_double_list ("Exposure", "Curve"); + avoidEmptyCurve (toneCurve.curve); if (pedited) { pedited->toneCurve.curve = true; } } - if (keyFile.has_key ("Exposure", "Curve2")) { - toneCurve.curve2 = keyFile.get_double_list ("Exposure", "Curve2"); + if (keyFile.has_key ("Exposure", "Curve2")) { + toneCurve.curve2 = keyFile.get_double_list ("Exposure", "Curve2"); + avoidEmptyCurve (toneCurve.curve2); if (pedited) { pedited->toneCurve.curve2 = true; @@ -3708,16 +3956,16 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_group ("HLRecovery")) { - if (keyFile.has_key ("HLRecovery", "Enabled")) { - toneCurve.hrenabled = keyFile.get_boolean ("HLRecovery", "Enabled"); + if (keyFile.has_key ("HLRecovery", "Enabled")) { + toneCurve.hrenabled = keyFile.get_boolean ("HLRecovery", "Enabled"); if (pedited) { pedited->toneCurve.hrenabled = true; } } - if (keyFile.has_key ("HLRecovery", "Method")) { - toneCurve.method = keyFile.get_string ("HLRecovery", "Method"); + if (keyFile.has_key ("HLRecovery", "Method")) { + toneCurve.method = keyFile.get_string ("HLRecovery", "Method"); if (pedited) { pedited->toneCurve.method = true; @@ -3728,41 +3976,44 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) // load channel mixer curve if (keyFile.has_group ("Channel Mixer")) { if (keyFile.has_key ("Channel Mixer", "Red") && keyFile.has_key ("Channel Mixer", "Green") && keyFile.has_key ("Channel Mixer", "Blue")) { - if (pedited) { - pedited->chmixer.red[0] = pedited->chmixer.red[1] = pedited->chmixer.red[2] = true; - pedited->chmixer.green[0] = pedited->chmixer.green[1] = pedited->chmixer.green[2] = true; - pedited->chmixer.blue[0] = pedited->chmixer.blue[1] = pedited->chmixer.blue[2] = true; + const std::vector rmix = keyFile.get_integer_list ("Channel Mixer", "Red"); + const std::vector gmix = keyFile.get_integer_list ("Channel Mixer", "Green"); + const std::vector bmix = keyFile.get_integer_list ("Channel Mixer", "Blue"); + + if (rmix.size() == 3 && gmix.size() == 3 && bmix.size() == 3) { + memcpy (chmixer.red, rmix.data(), 3 * sizeof (int)); + memcpy (chmixer.green, gmix.data(), 3 * sizeof (int)); + memcpy (chmixer.blue, bmix.data(), 3 * sizeof (int)); } - Glib::ArrayHandle rmix = keyFile.get_integer_list ("Channel Mixer", "Red"); - Glib::ArrayHandle gmix = keyFile.get_integer_list ("Channel Mixer", "Green"); - Glib::ArrayHandle bmix = keyFile.get_integer_list ("Channel Mixer", "Blue"); - memcpy (chmixer.red, rmix.data(), 3 * sizeof(int)); - memcpy (chmixer.green, gmix.data(), 3 * sizeof(int)); - memcpy (chmixer.blue, bmix.data(), 3 * sizeof(int)); + if (pedited) { + pedited->chmixer.red[0] = pedited->chmixer.red[1] = pedited->chmixer.red[2] = true; + pedited->chmixer.green[0] = pedited->chmixer.green[1] = pedited->chmixer.green[2] = true; + pedited->chmixer.blue[0] = pedited->chmixer.blue[1] = pedited->chmixer.blue[2] = true; + } } } - // load black & white +// load black & white if (keyFile.has_group ("Black & White")) { - if (keyFile.has_key ("Black & White", "Enabled")) { - blackwhite.enabled = keyFile.get_boolean ("Black & White", "Enabled"); + if (keyFile.has_key ("Black & White", "Enabled")) { + blackwhite.enabled = keyFile.get_boolean ("Black & White", "Enabled"); if (pedited) { pedited->blackwhite.enabled = true; } } - if (keyFile.has_key ("Black & White", "Method")) { - blackwhite.method = keyFile.get_string ("Black & White", "Method"); + if (keyFile.has_key ("Black & White", "Method")) { + blackwhite.method = keyFile.get_string ("Black & White", "Method"); if (pedited) { pedited->blackwhite.method = true; } } - if (keyFile.has_key ("Black & White", "Auto")) { - blackwhite.autoc = keyFile.get_boolean ("Black & White", "Auto"); + if (keyFile.has_key ("Black & White", "Auto")) { + blackwhite.autoc = keyFile.get_boolean ("Black & White", "Auto"); if (pedited) { pedited->blackwhite.autoc = true; @@ -3770,62 +4021,62 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("Black & White", "ComplementaryColors")) { - blackwhite.enabledcc = keyFile.get_boolean ("Black & White", "ComplementaryColors"); + blackwhite.enabledcc = keyFile.get_boolean ("Black & White", "ComplementaryColors"); if (pedited) { pedited->blackwhite.enabledcc = true; } } - if (keyFile.has_key ("Black & White", "MixerRed")) { - blackwhite.mixerRed = keyFile.get_integer ("Black & White", "MixerRed"); + if (keyFile.has_key ("Black & White", "MixerRed")) { + blackwhite.mixerRed = keyFile.get_integer ("Black & White", "MixerRed"); if (pedited) { pedited->blackwhite.mixerRed = true; } } - if (keyFile.has_key ("Black & White", "MixerOrange")) { - blackwhite.mixerOrange = keyFile.get_integer ("Black & White", "MixerOrange"); + if (keyFile.has_key ("Black & White", "MixerOrange")) { + blackwhite.mixerOrange = keyFile.get_integer ("Black & White", "MixerOrange"); if (pedited) { pedited->blackwhite.mixerOrange = true; } } - if (keyFile.has_key ("Black & White", "MixerYellow")) { - blackwhite.mixerYellow = keyFile.get_integer ("Black & White", "MixerYellow"); + if (keyFile.has_key ("Black & White", "MixerYellow")) { + blackwhite.mixerYellow = keyFile.get_integer ("Black & White", "MixerYellow"); if (pedited) { pedited->blackwhite.mixerYellow = true; } } - if (keyFile.has_key ("Black & White", "MixerGreen")) { - blackwhite.mixerGreen = keyFile.get_integer ("Black & White", "MixerGreen"); + if (keyFile.has_key ("Black & White", "MixerGreen")) { + blackwhite.mixerGreen = keyFile.get_integer ("Black & White", "MixerGreen"); if (pedited) { pedited->blackwhite.mixerGreen = true; } } - if (keyFile.has_key ("Black & White", "MixerCyan")) { - blackwhite.mixerCyan = keyFile.get_integer ("Black & White", "MixerCyan"); + if (keyFile.has_key ("Black & White", "MixerCyan")) { + blackwhite.mixerCyan = keyFile.get_integer ("Black & White", "MixerCyan"); if (pedited) { pedited->blackwhite.mixerCyan = true; } } - if (keyFile.has_key ("Black & White", "MixerBlue")) { - blackwhite.mixerBlue = keyFile.get_integer ("Black & White", "MixerBlue"); + if (keyFile.has_key ("Black & White", "MixerBlue")) { + blackwhite.mixerBlue = keyFile.get_integer ("Black & White", "MixerBlue"); if (pedited) { pedited->blackwhite.mixerBlue = true; } } - if (keyFile.has_key ("Black & White", "MixerMagenta")) { + if (keyFile.has_key ("Black & White", "MixerMagenta")) { blackwhite.mixerMagenta = keyFile.get_integer ("Black & White", "MixerMagenta"); if (pedited) { @@ -3833,72 +4084,74 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Black & White", "MixerPurple")) { - blackwhite.mixerPurple = keyFile.get_integer ("Black & White", "MixerPurple"); + if (keyFile.has_key ("Black & White", "MixerPurple")) { + blackwhite.mixerPurple = keyFile.get_integer ("Black & White", "MixerPurple"); if (pedited) { pedited->blackwhite.mixerPurple = true; } } - if (keyFile.has_key ("Black & White", "GammaRed")) { - blackwhite.gammaRed = keyFile.get_integer ("Black & White", "GammaRed"); + if (keyFile.has_key ("Black & White", "GammaRed")) { + blackwhite.gammaRed = keyFile.get_integer ("Black & White", "GammaRed"); if (pedited) { pedited->blackwhite.gammaRed = true; } } - if (keyFile.has_key ("Black & White", "GammaGreen")) { - blackwhite.gammaGreen = keyFile.get_integer ("Black & White", "GammaGreen"); + if (keyFile.has_key ("Black & White", "GammaGreen")) { + blackwhite.gammaGreen = keyFile.get_integer ("Black & White", "GammaGreen"); if (pedited) { pedited->blackwhite.gammaGreen = true; } } - if (keyFile.has_key ("Black & White", "GammaBlue")) { - blackwhite.gammaBlue = keyFile.get_integer ("Black & White", "GammaBlue"); + if (keyFile.has_key ("Black & White", "GammaBlue")) { + blackwhite.gammaBlue = keyFile.get_integer ("Black & White", "GammaBlue"); if (pedited) { pedited->blackwhite.gammaBlue = true; } } - if (keyFile.has_key ("Black & White", "Filter")) { - blackwhite.filter = keyFile.get_string ("Black & White", "Filter"); + if (keyFile.has_key ("Black & White", "Filter")) { + blackwhite.filter = keyFile.get_string ("Black & White", "Filter"); if (pedited) { pedited->blackwhite.filter = true; } } - if (keyFile.has_key ("Black & White", "Setting")) { - blackwhite.setting = keyFile.get_string ("Black & White", "Setting"); + if (keyFile.has_key ("Black & White", "Setting")) { + blackwhite.setting = keyFile.get_string ("Black & White", "Setting"); if (pedited) { pedited->blackwhite.setting = true; } } - if (keyFile.has_key ("Black & White", "LuminanceCurve")) { + if (keyFile.has_key ("Black & White", "LuminanceCurve")) { blackwhite.luminanceCurve = keyFile.get_double_list ("Black & White", "LuminanceCurve"); + avoidEmptyCurve (blackwhite.luminanceCurve); if (pedited) { pedited->blackwhite.luminanceCurve = true; } } - if (keyFile.has_key ("Black & White", "BeforeCurve")) { - blackwhite.beforeCurve = keyFile.get_double_list ("Black & White", "BeforeCurve"); + if (keyFile.has_key ("Black & White", "BeforeCurve")) { + blackwhite.beforeCurve = keyFile.get_double_list ("Black & White", "BeforeCurve"); + avoidEmptyCurve (blackwhite.beforeCurve); if (pedited) { pedited->blackwhite.beforeCurve = true; } } - if (keyFile.has_key ("Black & White", "Algorithm")) { - blackwhite.algo = keyFile.get_string ("Black & White", "Algorithm"); + if (keyFile.has_key ("Black & White", "Algorithm")) { + blackwhite.algo = keyFile.get_string ("Black & White", "Algorithm"); if (pedited) { pedited->blackwhite.algo = true; @@ -3908,7 +4161,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) if (keyFile.has_key ("Black & White", "BeforeCurveMode")) { Glib::ustring sMode = keyFile.get_string ("Black & White", "BeforeCurveMode"); - if (sMode == "Standard") { + if (sMode == "Standard") { blackwhite.beforeCurveMode = BlackWhiteParams::TC_MODE_STD_BW; } else if (sMode == "FilmLike") { blackwhite.beforeCurveMode = BlackWhiteParams::TC_MODE_FILMLIKE_BW; @@ -3923,18 +4176,19 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Black & White", "AfterCurve")) { - blackwhite.afterCurve = keyFile.get_double_list ("Black & White", "AfterCurve"); + if (keyFile.has_key ("Black & White", "AfterCurve")) { + blackwhite.afterCurve = keyFile.get_double_list ("Black & White", "AfterCurve"); + avoidEmptyCurve (blackwhite.afterCurve); if (pedited) { pedited->blackwhite.afterCurve = true; } } - if (keyFile.has_key ("Black & White", "AfterCurveMode")) { + if (keyFile.has_key ("Black & White", "AfterCurveMode")) { Glib::ustring sMode2 = keyFile.get_string ("Black & White", "AfterCurveMode"); - if (sMode2 == "Standard") { + if (sMode2 == "Standard") { blackwhite.afterCurveMode = BlackWhiteParams::TC_MODE_STD_BW; } else if (sMode2 == "WeightedStd") { blackwhite.afterCurveMode = BlackWhiteParams::TC_MODE_WEIGHTEDSTD_BW; @@ -3946,10 +4200,10 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - //load retinex +//load retinex if (keyFile.has_group ("Retinex")) { - if (keyFile.has_key ("Retinex", "Median")) { + if (keyFile.has_key ("Retinex", "Median")) { retinex.medianmap = keyFile.get_boolean ("Retinex", "Median"); if (pedited) { @@ -3957,24 +4211,24 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Retinex", "RetinexMethod")) { - retinex.retinexMethod = keyFile.get_string ("Retinex", "RetinexMethod"); + if (keyFile.has_key ("Retinex", "RetinexMethod")) { + retinex.retinexMethod = keyFile.get_string ("Retinex", "RetinexMethod"); if (pedited) { pedited->retinex.retinexMethod = true; } } - if (keyFile.has_key ("Retinex", "mapMethod")) { - retinex.mapMethod = keyFile.get_string ("Retinex", "mapMethod"); + if (keyFile.has_key ("Retinex", "mapMethod")) { + retinex.mapMethod = keyFile.get_string ("Retinex", "mapMethod"); if (pedited) { pedited->retinex.mapMethod = true; } } - if (keyFile.has_key ("Retinex", "viewMethod")) { - retinex.viewMethod = keyFile.get_string ("Retinex", "viewMethod"); + if (keyFile.has_key ("Retinex", "viewMethod")) { + retinex.viewMethod = keyFile.get_string ("Retinex", "viewMethod"); if (pedited) { pedited->retinex.viewMethod = true; @@ -3982,23 +4236,23 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } - if (keyFile.has_key ("Retinex", "Retinexcolorspace")) { - retinex.retinexcolorspace = keyFile.get_string ("Retinex", "Retinexcolorspace"); + if (keyFile.has_key ("Retinex", "Retinexcolorspace")) { + retinex.retinexcolorspace = keyFile.get_string ("Retinex", "Retinexcolorspace"); if (pedited) { pedited->retinex.retinexcolorspace = true; } } - if (keyFile.has_key ("Retinex", "Gammaretinex")) { - retinex.gammaretinex = keyFile.get_string ("Retinex", "Gammaretinex"); + if (keyFile.has_key ("Retinex", "Gammaretinex")) { + retinex.gammaretinex = keyFile.get_string ("Retinex", "Gammaretinex"); if (pedited) { pedited->retinex.gammaretinex = true; } } - if (keyFile.has_key ("Retinex", "Enabled")) { + if (keyFile.has_key ("Retinex", "Enabled")) { retinex.enabled = keyFile.get_boolean ("Retinex", "Enabled"); if (pedited) { @@ -4006,184 +4260,172 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Retinex", "Neigh")) { - retinex.neigh = keyFile.get_integer ("Retinex", "Neigh"); + if (keyFile.has_key ("Retinex", "Neigh")) { + retinex.neigh = keyFile.get_integer ("Retinex", "Neigh"); if (pedited) { pedited->retinex.neigh = true; } } - if (keyFile.has_key ("Retinex", "Str")) { - retinex.str = keyFile.get_integer ("Retinex", "Str"); + if (keyFile.has_key ("Retinex", "Str")) { + retinex.str = keyFile.get_integer ("Retinex", "Str"); if (pedited) { pedited->retinex.str = true; } } - if (keyFile.has_key ("Retinex", "Scal")) { - retinex.scal = keyFile.get_integer ("Retinex", "Scal"); + if (keyFile.has_key ("Retinex", "Scal")) { + retinex.scal = keyFile.get_integer ("Retinex", "Scal"); if (pedited) { pedited->retinex.scal = true; } } - if (keyFile.has_key ("Retinex", "Iter")) { - retinex.iter = keyFile.get_integer ("Retinex", "Iter"); + if (keyFile.has_key ("Retinex", "Iter")) { + retinex.iter = keyFile.get_integer ("Retinex", "Iter"); if (pedited) { pedited->retinex.iter = true; } } - if (keyFile.has_key ("Retinex", "Grad")) { - retinex.grad = keyFile.get_integer ("Retinex", "Grad"); + if (keyFile.has_key ("Retinex", "Grad")) { + retinex.grad = keyFile.get_integer ("Retinex", "Grad"); if (pedited) { pedited->retinex.grad = true; } } - if (keyFile.has_key ("Retinex", "Grads")) { - retinex.grads = keyFile.get_integer ("Retinex", "Grads"); + if (keyFile.has_key ("Retinex", "Grads")) { + retinex.grads = keyFile.get_integer ("Retinex", "Grads"); if (pedited) { pedited->retinex.grads = true; } } - if (keyFile.has_key ("Retinex", "Gam")) { - retinex.gam = keyFile.get_double ("Retinex", "Gam"); + if (keyFile.has_key ("Retinex", "Gam")) { + retinex.gam = keyFile.get_double ("Retinex", "Gam"); if (pedited) { pedited->retinex.gam = true; } } - if (keyFile.has_key ("Retinex", "Slope")) { - retinex.slope = keyFile.get_double ("Retinex", "Slope"); + if (keyFile.has_key ("Retinex", "Slope")) { + retinex.slope = keyFile.get_double ("Retinex", "Slope"); if (pedited) { pedited->retinex.slope = true; } } - if (keyFile.has_key ("Retinex", "Gain")) { - retinex.gain = keyFile.get_integer ("Retinex", "Gain"); - - if (pedited) { - pedited->retinex.gain = true; - } - } - - if (keyFile.has_key ("Retinex", "Offs")) { - retinex.offs = keyFile.get_integer ("Retinex", "Offs"); + if (keyFile.has_key ("Retinex", "Offs")) { + retinex.offs = keyFile.get_integer ("Retinex", "Offs"); if (pedited) { pedited->retinex.offs = true; } } - if (keyFile.has_key ("Retinex", "Vart")) { - retinex.vart = keyFile.get_integer ("Retinex", "Vart"); + if (keyFile.has_key ("Retinex", "Vart")) { + retinex.vart = keyFile.get_integer ("Retinex", "Vart"); if (pedited) { pedited->retinex.vart = true; } } - if (keyFile.has_key ("Retinex", "Limd")) { - retinex.limd = keyFile.get_integer ("Retinex", "Limd"); + if (keyFile.has_key ("Retinex", "Limd")) { + retinex.limd = keyFile.get_integer ("Retinex", "Limd"); if (pedited) { pedited->retinex.limd = true; } } - if (keyFile.has_key ("Retinex", "highl")) { - retinex.highl = keyFile.get_integer ("Retinex", "highl"); + if (keyFile.has_key ("Retinex", "highl")) { + retinex.highl = keyFile.get_integer ("Retinex", "highl"); if (pedited) { pedited->retinex.highl = true; } } - if (keyFile.has_key ("Retinex", "baselog")) { - retinex.baselog = keyFile.get_double ("Retinex", "baselog"); - - if (pedited) { - pedited->retinex.baselog = true; - } - } - - if (keyFile.has_key ("Retinex", "skal")) { - retinex.skal = keyFile.get_integer ("Retinex", "skal"); + if (keyFile.has_key ("Retinex", "skal")) { + retinex.skal = keyFile.get_integer ("Retinex", "skal"); if (pedited) { pedited->retinex.skal = true; } } - if (keyFile.has_key ("Retinex", "CDCurve")) { - retinex.cdcurve = keyFile.get_double_list ("Retinex", "CDCurve"); + if (keyFile.has_key ("Retinex", "CDCurve")) { + retinex.cdcurve = keyFile.get_double_list ("Retinex", "CDCurve"); + avoidEmptyCurve (retinex.cdcurve); if (pedited) { pedited->retinex.cdcurve = true; } } - if (keyFile.has_key ("Retinex", "MAPCurve")) { - retinex.mapcurve = keyFile.get_double_list ("Retinex", "MAPCurve"); + if (keyFile.has_key ("Retinex", "MAPCurve")) { + retinex.mapcurve = keyFile.get_double_list ("Retinex", "MAPCurve"); + avoidEmptyCurve (retinex.mapcurve); if (pedited) { pedited->retinex.mapcurve = true; } } - if (keyFile.has_key ("Retinex", "CDHCurve")) { - retinex.cdHcurve = keyFile.get_double_list ("Retinex", "CDHCurve"); + if (keyFile.has_key ("Retinex", "CDHCurve")) { + retinex.cdHcurve = keyFile.get_double_list ("Retinex", "CDHCurve"); + avoidEmptyCurve (retinex.cdHcurve); if (pedited) { pedited->retinex.cdHcurve = true; } } - if (keyFile.has_key ("Retinex", "LHCurve")) { - retinex.lhcurve = keyFile.get_double_list ("Retinex", "LHCurve"); + if (keyFile.has_key ("Retinex", "LHCurve")) { + retinex.lhcurve = keyFile.get_double_list ("Retinex", "LHCurve"); + avoidEmptyCurve (retinex.lhcurve); if (pedited) { pedited->retinex.lhcurve = true; } } - if (keyFile.has_key ("Retinex", "Highlights")) { - retinex.highlights = keyFile.get_integer ("Retinex", "Highlights"); + if (keyFile.has_key ("Retinex", "Highlights")) { + retinex.highlights = keyFile.get_integer ("Retinex", "Highlights"); if (pedited) { pedited->retinex.highlights = true; } } - if (keyFile.has_key ("Retinex", "HighlightTonalWidth")) { - retinex.htonalwidth = keyFile.get_integer ("Retinex", "HighlightTonalWidth"); + if (keyFile.has_key ("Retinex", "HighlightTonalWidth")) { + retinex.htonalwidth = keyFile.get_integer ("Retinex", "HighlightTonalWidth"); if (pedited) { pedited->retinex.htonalwidth = true; } } - if (keyFile.has_key ("Retinex", "Shadows")) { - retinex.shadows = keyFile.get_integer ("Retinex", "Shadows"); + if (keyFile.has_key ("Retinex", "Shadows")) { + retinex.shadows = keyFile.get_integer ("Retinex", "Shadows"); if (pedited) { pedited->retinex.shadows = true; } } - if (keyFile.has_key ("Retinex", "ShadowTonalWidth")) { - retinex.stonalwidth = keyFile.get_integer ("Retinex", "ShadowTonalWidth"); + if (keyFile.has_key ("Retinex", "ShadowTonalWidth")) { + retinex.stonalwidth = keyFile.get_integer ("Retinex", "ShadowTonalWidth"); if (pedited) { pedited->retinex.stonalwidth = true; @@ -4191,8 +4433,8 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } - if (keyFile.has_key ("Retinex", "Radius")) { - retinex.radius = keyFile.get_integer ("Retinex", "Radius"); + if (keyFile.has_key ("Retinex", "Radius")) { + retinex.radius = keyFile.get_integer ("Retinex", "Radius"); if (pedited) { pedited->retinex.radius = true; @@ -4200,8 +4442,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } - if (keyFile.has_key ("Retinex", "TransmissionCurve")) { - retinex.transmissionCurve = keyFile.get_double_list ("Retinex", "TransmissionCurve"); + if (keyFile.has_key ("Retinex", "TransmissionCurve")) { + retinex.transmissionCurve = keyFile.get_double_list ("Retinex", "TransmissionCurve"); + avoidEmptyCurve (retinex.transmissionCurve); if (pedited) { pedited->retinex.transmissionCurve = true; @@ -4209,8 +4452,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } - if (keyFile.has_key ("Retinex", "GainTransmissionCurve")) { - retinex.gaintransmissionCurve = keyFile.get_double_list ("Retinex", "GainTransmissionCurve"); + if (keyFile.has_key ("Retinex", "GainTransmissionCurve")) { + retinex.gaintransmissionCurve = keyFile.get_double_list ("Retinex", "GainTransmissionCurve"); + avoidEmptyCurve (retinex.gaintransmissionCurve); if (pedited) { pedited->retinex.gaintransmissionCurve = true; @@ -4220,18 +4464,18 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } - // load luma curve +// load luma curve if (keyFile.has_group ("Luminance Curve")) { - if (keyFile.has_key ("Luminance Curve", "Brightness")) { - labCurve.brightness = keyFile.get_integer ("Luminance Curve", "Brightness"); + if (keyFile.has_key ("Luminance Curve", "Brightness")) { + labCurve.brightness = keyFile.get_integer ("Luminance Curve", "Brightness"); if (pedited) { pedited->labCurve.brightness = true; } } - if (keyFile.has_key ("Luminance Curve", "Contrast")) { - labCurve.contrast = keyFile.get_integer ("Luminance Curve", "Contrast"); + if (keyFile.has_key ("Luminance Curve", "Contrast")) { + labCurve.contrast = keyFile.get_integer ("Luminance Curve", "Contrast"); if (pedited) { pedited->labCurve.contrast = true; @@ -4239,18 +4483,18 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (ppVersion < 303) { - // transform Saturation into Chromaticity - // if Saturation == 0, should we set BWToning on? - if (keyFile.has_key ("Luminance Curve", "Saturation")) { - labCurve.chromaticity = keyFile.get_integer ("Luminance Curve", "Saturation"); +// transform Saturation into Chromaticity +// if Saturation == 0, should we set BWToning on? + if (keyFile.has_key ("Luminance Curve", "Saturation")) { + labCurve.chromaticity = keyFile.get_integer ("Luminance Curve", "Saturation"); if (pedited) { pedited->labCurve.chromaticity = true; } } - // transform AvoidColorClipping into AvoidColorShift - if (keyFile.has_key ("Luminance Curve", "AvoidColorClipping")) { +// transform AvoidColorClipping into AvoidColorShift + if (keyFile.has_key ("Luminance Curve", "AvoidColorClipping")) { labCurve.avoidcolorshift = keyFile.get_boolean ("Luminance Curve", "AvoidColorClipping"); if (pedited) { @@ -4258,10 +4502,10 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } } else { - if (keyFile.has_key ("Luminance Curve", "Chromaticity")) { - labCurve.chromaticity = keyFile.get_integer ("Luminance Curve", "Chromaticity"); + if (keyFile.has_key ("Luminance Curve", "Chromaticity")) { + labCurve.chromaticity = keyFile.get_integer ("Luminance Curve", "Chromaticity"); - if (ppVersion >= 303 && ppVersion < 314 && labCurve.chromaticity == -100) { + if (ppVersion >= 303 && ppVersion < 314 && labCurve.chromaticity == -100) { blackwhite.enabled = true; } @@ -4270,7 +4514,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Luminance Curve", "AvoidColorShift")) { + if (keyFile.has_key ("Luminance Curve", "AvoidColorShift")) { labCurve.avoidcolorshift = keyFile.get_boolean ("Luminance Curve", "AvoidColorShift"); if (pedited) { @@ -4279,7 +4523,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("Luminance Curve", "RedAndSkinTonesProtection")) { - labCurve.rstprotection = keyFile.get_double ("Luminance Curve", "RedAndSkinTonesProtection"); + labCurve.rstprotection = keyFile.get_double ("Luminance Curve", "RedAndSkinTonesProtection"); if (pedited) { pedited->labCurve.rstprotection = true; @@ -4287,8 +4531,8 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Luminance Curve", "LCredsk")) { - labCurve.lcredsk = keyFile.get_boolean ("Luminance Curve", "LCredsk"); + if (keyFile.has_key ("Luminance Curve", "LCredsk")) { + labCurve.lcredsk = keyFile.get_boolean ("Luminance Curve", "LCredsk"); if (pedited) { pedited->labCurve.lcredsk = true; @@ -4297,10 +4541,10 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) if (ppVersion < 314) - // Backward compatibility: If BWtoning is true, Chromaticity has to be set to -100, which will produce the same effect - // and will enable the b&w toning mode ('a' & 'b' curves) +// Backward compatibility: If BWtoning is true, Chromaticity has to be set to -100, which will produce the same effect +// and will enable the b&w toning mode ('a' & 'b' curves) if (keyFile.has_key ("Luminance Curve", "BWtoning")) { - if ( keyFile.get_boolean ("Luminance Curve", "BWtoning")) { + if ( keyFile.get_boolean ("Luminance Curve", "BWtoning")) { labCurve.chromaticity = -100; if (pedited) { @@ -4309,72 +4553,81 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Luminance Curve", "LCurve")) { - labCurve.lcurve = keyFile.get_double_list ("Luminance Curve", "LCurve"); + if (keyFile.has_key ("Luminance Curve", "LCurve")) { + labCurve.lcurve = keyFile.get_double_list ("Luminance Curve", "LCurve"); + avoidEmptyCurve (labCurve.lcurve); if (pedited) { pedited->labCurve.lcurve = true; } } - if (keyFile.has_key ("Luminance Curve", "aCurve")) { - labCurve.acurve = keyFile.get_double_list ("Luminance Curve", "aCurve"); + if (keyFile.has_key ("Luminance Curve", "aCurve")) { + labCurve.acurve = keyFile.get_double_list ("Luminance Curve", "aCurve"); + avoidEmptyCurve (labCurve.acurve); if (pedited) { pedited->labCurve.acurve = true; } } - if (keyFile.has_key ("Luminance Curve", "bCurve")) { - labCurve.bcurve = keyFile.get_double_list ("Luminance Curve", "bCurve"); + if (keyFile.has_key ("Luminance Curve", "bCurve")) { + labCurve.bcurve = keyFile.get_double_list ("Luminance Curve", "bCurve"); + avoidEmptyCurve (labCurve.bcurve); if (pedited) { pedited->labCurve.bcurve = true; } } - if (keyFile.has_key ("Luminance Curve", "ccCurve")) { - labCurve.cccurve = keyFile.get_double_list ("Luminance Curve", "ccCurve"); + if (keyFile.has_key ("Luminance Curve", "ccCurve")) { + labCurve.cccurve = keyFile.get_double_list ("Luminance Curve", "ccCurve"); + avoidEmptyCurve (labCurve.cccurve); if (pedited) { pedited->labCurve.cccurve = true; } } - if (keyFile.has_key ("Luminance Curve", "chCurve")) { - labCurve.chcurve = keyFile.get_double_list ("Luminance Curve", "chCurve"); + if (keyFile.has_key ("Luminance Curve", "chCurve")) { + labCurve.chcurve = keyFile.get_double_list ("Luminance Curve", "chCurve"); + avoidEmptyCurve (labCurve.chcurve); if (pedited) { pedited->labCurve.chcurve = true; } } - if (keyFile.has_key ("Luminance Curve", "lhCurve")) { - labCurve.lhcurve = keyFile.get_double_list ("Luminance Curve", "lhCurve"); + if (keyFile.has_key ("Luminance Curve", "lhCurve")) { + labCurve.lhcurve = keyFile.get_double_list ("Luminance Curve", "lhCurve"); + avoidEmptyCurve (labCurve.lhcurve); if (pedited) { pedited->labCurve.lhcurve = true; } } - if (keyFile.has_key ("Luminance Curve", "hhCurve")) { - labCurve.hhcurve = keyFile.get_double_list ("Luminance Curve", "hhCurve"); + if (keyFile.has_key ("Luminance Curve", "hhCurve")) { + labCurve.hhcurve = keyFile.get_double_list ("Luminance Curve", "hhCurve"); + avoidEmptyCurve (labCurve.hhcurve); if (pedited) { pedited->labCurve.hhcurve = true; } } - if (keyFile.has_key ("Luminance Curve", "LcCurve")) { - labCurve.lccurve = keyFile.get_double_list ("Luminance Curve", "LcCurve"); + if (keyFile.has_key ("Luminance Curve", "LcCurve")) { + labCurve.lccurve = keyFile.get_double_list ("Luminance Curve", "LcCurve"); + avoidEmptyCurve (labCurve.lccurve); if (pedited) { pedited->labCurve.lccurve = true; } } - if (keyFile.has_key ("Luminance Curve", "ClCurve")) { - labCurve.clcurve = keyFile.get_double_list ("Luminance Curve", "ClCurve"); + if (keyFile.has_key ("Luminance Curve", "ClCurve")) { + labCurve.clcurve = keyFile.get_double_list ("Luminance Curve", "ClCurve"); + avoidEmptyCurve (labCurve.clcurve); if (pedited) { pedited->labCurve.clcurve = true; @@ -4383,39 +4636,42 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } - // load sharpening +// load sharpening if (keyFile.has_group ("Sharpening")) { - if (keyFile.has_key ("Sharpening", "Enabled")) { - sharpening.enabled = keyFile.get_boolean ("Sharpening", "Enabled"); + if (keyFile.has_key ("Sharpening", "Enabled")) { + sharpening.enabled = keyFile.get_boolean ("Sharpening", "Enabled"); if (pedited) { pedited->sharpening.enabled = true; } } - if (keyFile.has_key ("Sharpening", "Radius")) { - sharpening.radius = keyFile.get_double ("Sharpening", "Radius"); + if (keyFile.has_key ("Sharpening", "Radius")) { + sharpening.radius = keyFile.get_double ("Sharpening", "Radius"); if (pedited) { pedited->sharpening.radius = true; } } - if (keyFile.has_key ("Sharpening", "Amount")) { - sharpening.amount = keyFile.get_integer ("Sharpening", "Amount"); + if (keyFile.has_key ("Sharpening", "Amount")) { + sharpening.amount = keyFile.get_integer ("Sharpening", "Amount"); if (pedited) { pedited->sharpening.amount = true; } } - if (keyFile.has_key ("Sharpening", "Threshold")) { + if (keyFile.has_key ("Sharpening", "Threshold")) { if (ppVersion < 302) { - int thresh = min(keyFile.get_integer ("Sharpening", "Threshold"), 2000); - sharpening.threshold.setValues(thresh, thresh, 2000, 2000); // TODO: 2000 is the maximum value and is taken of rtgui/sharpening.cc ; should be changed by the tool modularization + int thresh = min (keyFile.get_integer ("Sharpening", "Threshold"), 2000); + sharpening.threshold.setValues (thresh, thresh, 2000, 2000); // TODO: 2000 is the maximum value and is taken of rtgui/sharpening.cc ; should be changed by the tool modularization } else { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("Sharpening", "Threshold"); - sharpening.threshold.setValues(thresh.data()[0], thresh.data()[1], min(thresh.data()[2], 2000), min(thresh.data()[3], 2000)); + const std::vector thresh = keyFile.get_integer_list ("Sharpening", "Threshold"); + + if (thresh.size() >= 4) { + sharpening.threshold.setValues (thresh[0], thresh[1], min (thresh[2], 2000), min (thresh[3], 2000)); + } } if (pedited) { @@ -4423,39 +4679,39 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Sharpening", "OnlyEdges")) { - sharpening.edgesonly = keyFile.get_boolean ("Sharpening", "OnlyEdges"); + if (keyFile.has_key ("Sharpening", "OnlyEdges")) { + sharpening.edgesonly = keyFile.get_boolean ("Sharpening", "OnlyEdges"); if (pedited) { pedited->sharpening.edgesonly = true; } } - if (keyFile.has_key ("Sharpening", "EdgedetectionRadius")) { - sharpening.edges_radius = keyFile.get_double ("Sharpening", "EdgedetectionRadius"); + if (keyFile.has_key ("Sharpening", "EdgedetectionRadius")) { + sharpening.edges_radius = keyFile.get_double ("Sharpening", "EdgedetectionRadius"); if (pedited) { pedited->sharpening.edges_radius = true; } } - if (keyFile.has_key ("Sharpening", "EdgeTolerance")) { - sharpening.edges_tolerance = keyFile.get_integer ("Sharpening", "EdgeTolerance"); + if (keyFile.has_key ("Sharpening", "EdgeTolerance")) { + sharpening.edges_tolerance = keyFile.get_integer ("Sharpening", "EdgeTolerance"); if (pedited) { pedited->sharpening.edges_tolerance = true; } } - if (keyFile.has_key ("Sharpening", "HalocontrolEnabled")) { - sharpening.halocontrol = keyFile.get_boolean ("Sharpening", "HalocontrolEnabled"); + if (keyFile.has_key ("Sharpening", "HalocontrolEnabled")) { + sharpening.halocontrol = keyFile.get_boolean ("Sharpening", "HalocontrolEnabled"); if (pedited) { pedited->sharpening.halocontrol = true; } } - if (keyFile.has_key ("Sharpening", "HalocontrolAmount")) { + if (keyFile.has_key ("Sharpening", "HalocontrolAmount")) { sharpening.halocontrol_amount = keyFile.get_integer ("Sharpening", "HalocontrolAmount"); if (pedited) { @@ -4463,40 +4719,40 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Sharpening", "Method")) { - sharpening.method = keyFile.get_string ("Sharpening", "Method"); + if (keyFile.has_key ("Sharpening", "Method")) { + sharpening.method = keyFile.get_string ("Sharpening", "Method"); if (pedited) { pedited->sharpening.method = true; } } - if (keyFile.has_key ("Sharpening", "DeconvRadius")) { - sharpening.deconvradius = keyFile.get_double ("Sharpening", "DeconvRadius"); + if (keyFile.has_key ("Sharpening", "DeconvRadius")) { + sharpening.deconvradius = keyFile.get_double ("Sharpening", "DeconvRadius"); if (pedited) { pedited->sharpening.deconvradius = true; } } - if (keyFile.has_key ("Sharpening", "DeconvAmount")) { - sharpening.deconvamount = keyFile.get_integer ("Sharpening", "DeconvAmount"); + if (keyFile.has_key ("Sharpening", "DeconvAmount")) { + sharpening.deconvamount = keyFile.get_integer ("Sharpening", "DeconvAmount"); if (pedited) { pedited->sharpening.deconvamount = true; } } - if (keyFile.has_key ("Sharpening", "DeconvDamping")) { - sharpening.deconvdamping = keyFile.get_integer ("Sharpening", "DeconvDamping"); + if (keyFile.has_key ("Sharpening", "DeconvDamping")) { + sharpening.deconvdamping = keyFile.get_integer ("Sharpening", "DeconvDamping"); if (pedited) { pedited->sharpening.deconvdamping = true; } } - if (keyFile.has_key ("Sharpening", "DeconvIterations")) { - sharpening.deconviter = keyFile.get_integer ("Sharpening", "DeconvIterations"); + if (keyFile.has_key ("Sharpening", "DeconvIterations")) { + sharpening.deconviter = keyFile.get_integer ("Sharpening", "DeconvIterations"); if (pedited) { pedited->sharpening.deconviter = true; @@ -4504,34 +4760,34 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load edge sharpening +// load edge sharpening if (keyFile.has_group ("SharpenEdge")) { - if (keyFile.has_key ("SharpenEdge", "Enabled")) { - sharpenEdge.enabled = keyFile.get_boolean ("SharpenEdge", "Enabled"); + if (keyFile.has_key ("SharpenEdge", "Enabled")) { + sharpenEdge.enabled = keyFile.get_boolean ("SharpenEdge", "Enabled"); if (pedited) { pedited->sharpenEdge.enabled = true; } } - if (keyFile.has_key ("SharpenEdge", "Passes")) { - sharpenEdge.passes = keyFile.get_integer ("SharpenEdge", "Passes"); + if (keyFile.has_key ("SharpenEdge", "Passes")) { + sharpenEdge.passes = keyFile.get_integer ("SharpenEdge", "Passes"); if (pedited) { pedited->sharpenEdge.passes = true; } } - if (keyFile.has_key ("SharpenEdge", "Strength")) { - sharpenEdge.amount = keyFile.get_double ("SharpenEdge", "Strength"); + if (keyFile.has_key ("SharpenEdge", "Strength")) { + sharpenEdge.amount = keyFile.get_double ("SharpenEdge", "Strength"); if (pedited) { pedited->sharpenEdge.amount = true; } } - if (keyFile.has_key ("SharpenEdge", "ThreeChannels")) { - sharpenEdge.threechannels = keyFile.get_boolean ("SharpenEdge", "ThreeChannels"); + if (keyFile.has_key ("SharpenEdge", "ThreeChannels")) { + sharpenEdge.threechannels = keyFile.get_boolean ("SharpenEdge", "ThreeChannels"); if (pedited) { pedited->sharpenEdge.threechannels = true; @@ -4539,34 +4795,34 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load micro-contrast sharpening +// load micro-contrast sharpening if (keyFile.has_group ("SharpenMicro")) { - if (keyFile.has_key ("SharpenMicro", "Enabled")) { - sharpenMicro.enabled = keyFile.get_boolean ("SharpenMicro", "Enabled"); + if (keyFile.has_key ("SharpenMicro", "Enabled")) { + sharpenMicro.enabled = keyFile.get_boolean ("SharpenMicro", "Enabled"); if (pedited) { pedited->sharpenMicro.enabled = true; } } - if (keyFile.has_key ("SharpenMicro", "Matrix")) { - sharpenMicro.matrix = keyFile.get_boolean ("SharpenMicro", "Matrix"); + if (keyFile.has_key ("SharpenMicro", "Matrix")) { + sharpenMicro.matrix = keyFile.get_boolean ("SharpenMicro", "Matrix"); if (pedited) { pedited->sharpenMicro.matrix = true; } } - if (keyFile.has_key ("SharpenMicro", "Strength")) { - sharpenMicro.amount = keyFile.get_double ("SharpenMicro", "Strength"); + if (keyFile.has_key ("SharpenMicro", "Strength")) { + sharpenMicro.amount = keyFile.get_double ("SharpenMicro", "Strength"); if (pedited) { pedited->sharpenMicro.amount = true; } } - if (keyFile.has_key ("SharpenMicro", "Uniformity")) { - sharpenMicro.uniformity = keyFile.get_double ("SharpenMicro", "Uniformity"); + if (keyFile.has_key ("SharpenMicro", "Uniformity")) { + sharpenMicro.uniformity = keyFile.get_double ("SharpenMicro", "Uniformity"); if (pedited) { pedited->sharpenMicro.uniformity = true; @@ -4574,39 +4830,42 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load vibrance +// load vibrance if (keyFile.has_group ("Vibrance")) { - if (keyFile.has_key ("Vibrance", "Enabled")) { - vibrance.enabled = keyFile.get_boolean ("Vibrance", "Enabled"); + if (keyFile.has_key ("Vibrance", "Enabled")) { + vibrance.enabled = keyFile.get_boolean ("Vibrance", "Enabled"); if (pedited) { pedited->vibrance.enabled = true; } } - if (keyFile.has_key ("Vibrance", "Pastels")) { - vibrance.pastels = keyFile.get_integer ("Vibrance", "Pastels"); + if (keyFile.has_key ("Vibrance", "Pastels")) { + vibrance.pastels = keyFile.get_integer ("Vibrance", "Pastels"); if (pedited) { pedited->vibrance.pastels = true; } } - if (keyFile.has_key ("Vibrance", "Saturated")) { - vibrance.saturated = keyFile.get_integer ("Vibrance", "Saturated"); + if (keyFile.has_key ("Vibrance", "Saturated")) { + vibrance.saturated = keyFile.get_integer ("Vibrance", "Saturated"); if (pedited) { pedited->vibrance.saturated = true; } } - if (keyFile.has_key ("Vibrance", "PSThreshold")) { + if (keyFile.has_key ("Vibrance", "PSThreshold")) { if (ppVersion < 302) { int thresh = keyFile.get_integer ("Vibrance", "PSThreshold"); - vibrance.psthreshold.setValues(thresh, thresh); + vibrance.psthreshold.setValues (thresh, thresh); } else { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("Vibrance", "PSThreshold"); - vibrance.psthreshold.setValues(thresh.data()[0], thresh.data()[1]); + const std::vector thresh = keyFile.get_integer_list ("Vibrance", "PSThreshold"); + + if (thresh.size() >= 2 ) { + vibrance.psthreshold.setValues (thresh[0], thresh[1]); + } } if (pedited) { @@ -4614,32 +4873,33 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Vibrance", "ProtectSkins")) { - vibrance.protectskins = keyFile.get_boolean ("Vibrance", "ProtectSkins"); + if (keyFile.has_key ("Vibrance", "ProtectSkins")) { + vibrance.protectskins = keyFile.get_boolean ("Vibrance", "ProtectSkins"); if (pedited) { pedited->vibrance.protectskins = true; } } - if (keyFile.has_key ("Vibrance", "AvoidColorShift")) { - vibrance.avoidcolorshift = keyFile.get_boolean ("Vibrance", "AvoidColorShift"); + if (keyFile.has_key ("Vibrance", "AvoidColorShift")) { + vibrance.avoidcolorshift = keyFile.get_boolean ("Vibrance", "AvoidColorShift"); if (pedited) { pedited->vibrance.avoidcolorshift = true; } } - if (keyFile.has_key ("Vibrance", "PastSatTog")) { - vibrance.pastsattog = keyFile.get_boolean ("Vibrance", "PastSatTog"); + if (keyFile.has_key ("Vibrance", "PastSatTog")) { + vibrance.pastsattog = keyFile.get_boolean ("Vibrance", "PastSatTog"); if (pedited) { pedited->vibrance.pastsattog = true; } } - if (keyFile.has_key ("Vibrance", "SkinTonesCurve")) { - vibrance.skintonescurve = keyFile.get_double_list ("Vibrance", "SkinTonesCurve"); + if (keyFile.has_key ("Vibrance", "SkinTonesCurve")) { + vibrance.skintonescurve = keyFile.get_double_list ("Vibrance", "SkinTonesCurve"); + avoidEmptyCurve (vibrance.skintonescurve); if (pedited) { pedited->vibrance.skintonescurve = true; @@ -4664,8 +4924,8 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) // load wb if (keyFile.has_group ("White Balance")) { - if (keyFile.has_key ("White Balance", "Setting")) { - wb.method = keyFile.get_string ("White Balance", "Setting"); + if (keyFile.has_key ("White Balance", "Setting")) { + wb.method = keyFile.get_string ("White Balance", "Setting"); if (pedited) { pedited->wb.method = true; @@ -4673,28 +4933,36 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("White Balance", "Temperature")) { - wb.temperature = keyFile.get_integer ("White Balance", "Temperature"); + wb.temperature = keyFile.get_integer ("White Balance", "Temperature"); if (pedited) { pedited->wb.temperature = true; } } - if (keyFile.has_key ("White Balance", "Green")) { - wb.green = keyFile.get_double ("White Balance", "Green"); + if (keyFile.has_key ("White Balance", "Green")) { + wb.green = keyFile.get_double ("White Balance", "Green"); if (pedited) { pedited->wb.green = true; } } - if (keyFile.has_key ("White Balance", "Equal")) { - wb.equal = keyFile.get_double ("White Balance", "Equal"); + if (keyFile.has_key ("White Balance", "Equal")) { + wb.equal = keyFile.get_double ("White Balance", "Equal"); if (pedited) { pedited->wb.equal = true; } } + + if (keyFile.has_key ("White Balance", "TemperatureBias")) { + wb.tempBias = keyFile.get_double ("White Balance", "TemperatureBias"); + + if (pedited) { + pedited->wb.tempBias = true; + } + } } // load colorShift @@ -4705,23 +4973,23 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) // load defringe if (keyFile.has_group ("Defringing")) { - if (keyFile.has_key ("Defringing", "Enabled")) { - defringe.enabled = keyFile.get_boolean ("Defringing", "Enabled"); + if (keyFile.has_key ("Defringing", "Enabled")) { + defringe.enabled = keyFile.get_boolean ("Defringing", "Enabled"); if (pedited) { pedited->defringe.enabled = true; } } - if (keyFile.has_key ("Defringing", "Radius")) { - defringe.radius = keyFile.get_double ("Defringing", "Radius"); + if (keyFile.has_key ("Defringing", "Radius")) { + defringe.radius = keyFile.get_double ("Defringing", "Radius"); if (pedited) { pedited->defringe.radius = true; } } - if (keyFile.has_key ("Defringing", "Threshold")) { + if (keyFile.has_key ("Defringing", "Threshold")) { defringe.threshold = (float)keyFile.get_integer ("Defringing", "Threshold"); if (pedited) { @@ -4730,11 +4998,12 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (ppVersion < 310) { - defringe.threshold = sqrt(defringe.threshold * 33.f / 5.f); + defringe.threshold = sqrt (defringe.threshold * 33.f / 5.f); } - if (keyFile.has_key ("Defringing", "HueCurve")) { - defringe.huecurve = keyFile.get_double_list ("Defringing", "HueCurve"); + if (keyFile.has_key ("Defringing", "HueCurve")) { + defringe.huecurve = keyFile.get_double_list ("Defringing", "HueCurve"); + avoidEmptyCurve (defringe.huecurve); if (pedited) { pedited->defringe.huecurve = true; @@ -4742,107 +5011,131 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load colorappearance +// load colorappearance if (keyFile.has_group ("Color appearance")) { - if (keyFile.has_key ("Color appearance", "Enabled")) { - colorappearance.enabled = keyFile.get_boolean ("Color appearance", "Enabled"); + if (keyFile.has_key ("Color appearance", "Enabled")) { + colorappearance.enabled = keyFile.get_boolean ("Color appearance", "Enabled"); if (pedited) { pedited->colorappearance.enabled = true; } } - if (keyFile.has_key ("Color appearance", "Degree")) { - colorappearance.degree = keyFile.get_integer ("Color appearance", "Degree"); + if (keyFile.has_key ("Color appearance", "Degree")) { + colorappearance.degree = keyFile.get_integer ("Color appearance", "Degree"); if (pedited) { pedited->colorappearance.degree = true; } } - if (keyFile.has_key ("Color appearance", "AutoDegree")) { - colorappearance.autodegree = keyFile.get_boolean ("Color appearance", "AutoDegree"); + if (keyFile.has_key ("Color appearance", "AutoDegree")) { + colorappearance.autodegree = keyFile.get_boolean ("Color appearance", "AutoDegree"); if (pedited) { pedited->colorappearance.autodegree = true; } } - if (keyFile.has_key ("Color appearance", "Surround")) { - colorappearance.surround = keyFile.get_string ("Color appearance", "Surround"); + if (keyFile.has_key ("Color appearance", "Degreeout")) { + colorappearance.degreeout = keyFile.get_integer ("Color appearance", "Degreeout"); + + if (pedited) { + pedited->colorappearance.degreeout = true; + } + } + + if (keyFile.has_key ("Color appearance", "AutoDegreeout")) { + colorappearance.autodegreeout = keyFile.get_boolean ("Color appearance", "AutoDegreeout"); + + if (pedited) { + pedited->colorappearance.autodegreeout = true; + } + } + + if (keyFile.has_key ("Color appearance", "Surround")) { + colorappearance.surround = keyFile.get_string ("Color appearance", "Surround"); if (pedited) { pedited->colorappearance.surround = true; } } -// if (keyFile.has_key ("Color appearance", "Background")) {colorappearance.backgrd = keyFile.get_integer ("Color appearance", "Background"); if (pedited) pedited->colorappearance.backgrd = true; } - if (keyFile.has_key ("Color appearance", "AdaptLum")) { - colorappearance.adaplum = keyFile.get_double ("Color appearance", "AdaptLum"); + if (keyFile.has_key ("Color appearance", "Surrsrc")) { + colorappearance.surrsrc = keyFile.get_string ("Color appearance", "Surrsrc"); + + if (pedited) { + pedited->colorappearance.surrsrc = true; + } + } + +// if (keyFile.has_key ("Color appearance", "Background")) {colorappearance.backgrd = keyFile.get_integer ("Color appearance", "Background"); if (pedited) pedited->colorappearance.backgrd = true; } + if (keyFile.has_key ("Color appearance", "AdaptLum")) { + colorappearance.adaplum = keyFile.get_double ("Color appearance", "AdaptLum"); if (pedited) { pedited->colorappearance.adaplum = true; } } - if (keyFile.has_key ("Color appearance", "Badpixsl")) { - colorappearance.badpixsl = keyFile.get_integer ("Color appearance", "Badpixsl"); + if (keyFile.has_key ("Color appearance", "Badpixsl")) { + colorappearance.badpixsl = keyFile.get_integer ("Color appearance", "Badpixsl"); if (pedited) { pedited->colorappearance.badpixsl = true; } } - if (keyFile.has_key ("Color appearance", "Model")) { - colorappearance.wbmodel = keyFile.get_string ("Color appearance", "Model"); + if (keyFile.has_key ("Color appearance", "Model")) { + colorappearance.wbmodel = keyFile.get_string ("Color appearance", "Model"); if (pedited) { pedited->colorappearance.wbmodel = true; } } - if (keyFile.has_key ("Color appearance", "Algorithm")) { - colorappearance.algo = keyFile.get_string ("Color appearance", "Algorithm"); + if (keyFile.has_key ("Color appearance", "Algorithm")) { + colorappearance.algo = keyFile.get_string ("Color appearance", "Algorithm"); if (pedited) { pedited->colorappearance.algo = true; } } - if (keyFile.has_key ("Color appearance", "J-Light")) { - colorappearance.jlight = keyFile.get_double ("Color appearance", "J-Light"); + if (keyFile.has_key ("Color appearance", "J-Light")) { + colorappearance.jlight = keyFile.get_double ("Color appearance", "J-Light"); if (pedited) { pedited->colorappearance.jlight = true; } } - if (keyFile.has_key ("Color appearance", "Q-Bright")) { - colorappearance.qbright = keyFile.get_double ("Color appearance", "Q-Bright"); + if (keyFile.has_key ("Color appearance", "Q-Bright")) { + colorappearance.qbright = keyFile.get_double ("Color appearance", "Q-Bright"); if (pedited) { pedited->colorappearance.qbright = true; } } - if (keyFile.has_key ("Color appearance", "C-Chroma")) { - colorappearance.chroma = keyFile.get_double ("Color appearance", "C-Chroma"); + if (keyFile.has_key ("Color appearance", "C-Chroma")) { + colorappearance.chroma = keyFile.get_double ("Color appearance", "C-Chroma"); if (pedited) { pedited->colorappearance.chroma = true; } } - if (keyFile.has_key ("Color appearance", "S-Chroma")) { - colorappearance.schroma = keyFile.get_double ("Color appearance", "S-Chroma"); + if (keyFile.has_key ("Color appearance", "S-Chroma")) { + colorappearance.schroma = keyFile.get_double ("Color appearance", "S-Chroma"); if (pedited) { pedited->colorappearance.schroma = true; } } - if (keyFile.has_key ("Color appearance", "M-Chroma")) { - colorappearance.mchroma = keyFile.get_double ("Color appearance", "M-Chroma"); + if (keyFile.has_key ("Color appearance", "M-Chroma")) { + colorappearance.mchroma = keyFile.get_double ("Color appearance", "M-Chroma"); if (pedited) { pedited->colorappearance.mchroma = true; @@ -4850,91 +5143,147 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("Color appearance", "RSTProtection")) { - colorappearance.rstprotection = keyFile.get_double ("Color appearance", "RSTProtection"); + colorappearance.rstprotection = keyFile.get_double ("Color appearance", "RSTProtection"); if (pedited) { pedited->colorappearance.rstprotection = true; } } - if (keyFile.has_key ("Color appearance", "J-Contrast")) { - colorappearance.contrast = keyFile.get_double ("Color appearance", "J-Contrast"); + if (keyFile.has_key ("Color appearance", "J-Contrast")) { + colorappearance.contrast = keyFile.get_double ("Color appearance", "J-Contrast"); if (pedited) { pedited->colorappearance.contrast = true; } } - if (keyFile.has_key ("Color appearance", "Q-Contrast")) { - colorappearance.qcontrast = keyFile.get_double ("Color appearance", "Q-Contrast"); + if (keyFile.has_key ("Color appearance", "Q-Contrast")) { + colorappearance.qcontrast = keyFile.get_double ("Color appearance", "Q-Contrast"); if (pedited) { pedited->colorappearance.qcontrast = true; } } - if (keyFile.has_key ("Color appearance", "H-Hue")) { - colorappearance.colorh = keyFile.get_double ("Color appearance", "H-Hue"); + if (keyFile.has_key ("Color appearance", "H-Hue")) { + colorappearance.colorh = keyFile.get_double ("Color appearance", "H-Hue"); if (pedited) { pedited->colorappearance.colorh = true; } } - if (keyFile.has_key ("Color appearance", "AdaptScene")) { - colorappearance.adapscen = keyFile.get_double ("Color appearance", "AdaptScene"); + if (keyFile.has_key ("Color appearance", "AdaptScene")) { + colorappearance.adapscen = keyFile.get_double ("Color appearance", "AdaptScene"); if (pedited) { pedited->colorappearance.adapscen = true; } } - if (keyFile.has_key ("Color appearance", "AutoAdapscen")) { - colorappearance.autoadapscen = keyFile.get_boolean ("Color appearance", "AutoAdapscen"); + if (keyFile.has_key ("Color appearance", "AutoAdapscen")) { + colorappearance.autoadapscen = keyFile.get_boolean ("Color appearance", "AutoAdapscen"); if (pedited) { pedited->colorappearance.autoadapscen = true; } } - if (keyFile.has_key ("Color appearance", "SurrSource")) { - colorappearance.surrsource = keyFile.get_boolean ("Color appearance", "SurrSource"); + if (keyFile.has_key ("Color appearance", "YbScene")) { + colorappearance.ybscen = keyFile.get_integer ("Color appearance", "YbScene"); + + if (pedited) { + pedited->colorappearance.ybscen = true; + } + } + + if (keyFile.has_key ("Color appearance", "Autoybscen")) { + colorappearance.autoybscen = keyFile.get_boolean ("Color appearance", "Autoybscen"); + + if (pedited) { + pedited->colorappearance.autoybscen = true; + } + } + + if (keyFile.has_key ("Color appearance", "SurrSource")) { + colorappearance.surrsource = keyFile.get_boolean ("Color appearance", "SurrSource"); if (pedited) { pedited->colorappearance.surrsource = true; } } - if (keyFile.has_key ("Color appearance", "Gamut")) { - colorappearance.gamut = keyFile.get_boolean ("Color appearance", "Gamut"); + if (keyFile.has_key ("Color appearance", "Gamut")) { + colorappearance.gamut = keyFile.get_boolean ("Color appearance", "Gamut"); if (pedited) { pedited->colorappearance.gamut = true; } } -// if (keyFile.has_key ("Color appearance", "Badpix")) {colorappearance.badpix = keyFile.get_boolean ("Color appearance", "Badpix"); if (pedited) pedited->colorappearance.badpix = true; } - if (keyFile.has_key ("Color appearance", "Datacie")) { - colorappearance.datacie = keyFile.get_boolean ("Color appearance", "Datacie"); + if (keyFile.has_key ("Color appearance", "Tempout")) { + colorappearance.tempout = keyFile.get_integer ("Color appearance", "Tempout"); + + if (pedited) { + pedited->colorappearance.tempout = true; + } + } + + if (keyFile.has_key ("Color appearance", "Greenout")) { + colorappearance.greenout = keyFile.get_double ("Color appearance", "Greenout"); + + if (pedited) { + pedited->colorappearance.greenout = true; + } + } + + if (keyFile.has_key ("Color appearance", "Tempsc")) { + colorappearance.tempsc = keyFile.get_integer ("Color appearance", "Tempsc"); + + if (pedited) { + pedited->colorappearance.tempsc = true; + } + } + + if (keyFile.has_key ("Color appearance", "Greensc")) { + colorappearance.greensc = keyFile.get_double ("Color appearance", "Greensc"); + + if (pedited) { + pedited->colorappearance.greensc = true; + } + } + + if (keyFile.has_key ("Color appearance", "Ybout")) { + colorappearance.ybout = keyFile.get_integer ("Color appearance", "Ybout"); + + if (pedited) { + pedited->colorappearance.ybout = true; + } + } + +// if (keyFile.has_key ("Color appearance", "Badpix")) {colorappearance.badpix = keyFile.get_boolean ("Color appearance", "Badpix"); if (pedited) pedited->colorappearance.badpix = true; } + if (keyFile.has_key ("Color appearance", "Datacie")) { + colorappearance.datacie = keyFile.get_boolean ("Color appearance", "Datacie"); if (pedited) { pedited->colorappearance.datacie = true; } } - if (keyFile.has_key ("Color appearance", "Tonecie")) { - colorappearance.tonecie = keyFile.get_boolean ("Color appearance", "Tonecie"); + if (keyFile.has_key ("Color appearance", "Tonecie")) { + colorappearance.tonecie = keyFile.get_boolean ("Color appearance", "Tonecie"); if (pedited) { pedited->colorappearance.tonecie = true; } } -// if (keyFile.has_key ("Color appearance", "Sharpcie")) {colorappearance.sharpcie = keyFile.get_boolean ("Color appearance", "Sharpcie"); if (pedited) pedited->colorappearance.sharpcie = true; } - if (keyFile.has_key ("Color appearance", "CurveMode")) { +// if (keyFile.has_key ("Color appearance", "Sharpcie")) {colorappearance.sharpcie = keyFile.get_boolean ("Color appearance", "Sharpcie"); if (pedited) pedited->colorappearance.sharpcie = true; } + if (keyFile.has_key ("Color appearance", "CurveMode")) { Glib::ustring sMode = keyFile.get_string ("Color appearance", "CurveMode"); - if (sMode == "Lightness") { + if (sMode == "Lightness") { colorappearance.curveMode = ColorAppearanceParams::TC_MODE_LIGHT; } else if (sMode == "Brightness") { colorappearance.curveMode = ColorAppearanceParams::TC_MODE_BRIGHT; @@ -4945,10 +5294,10 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Color appearance", "CurveMode2")) { + if (keyFile.has_key ("Color appearance", "CurveMode2")) { Glib::ustring sMode = keyFile.get_string ("Color appearance", "CurveMode2"); - if (sMode == "Lightness") { + if (sMode == "Lightness") { colorappearance.curveMode2 = ColorAppearanceParams::TC_MODE_LIGHT; } else if (sMode == "Brightness") { colorappearance.curveMode2 = ColorAppearanceParams::TC_MODE_BRIGHT; @@ -4959,10 +5308,10 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Color appearance", "CurveMode3")) { + if (keyFile.has_key ("Color appearance", "CurveMode3")) { Glib::ustring sMode = keyFile.get_string ("Color appearance", "CurveMode3"); - if (sMode == "Chroma") { + if (sMode == "Chroma") { colorappearance.curveMode3 = ColorAppearanceParams::TC_MODE_CHROMA; } else if (sMode == "Saturation") { colorappearance.curveMode3 = ColorAppearanceParams::TC_MODE_SATUR; @@ -4976,24 +5325,27 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (ppVersion > 200) { - if (keyFile.has_key ("Color appearance", "Curve")) { - colorappearance.curve = keyFile.get_double_list ("Color appearance", "Curve"); + if (keyFile.has_key ("Color appearance", "Curve")) { + colorappearance.curve = keyFile.get_double_list ("Color appearance", "Curve"); + avoidEmptyCurve (colorappearance.curve); if (pedited) { pedited->colorappearance.curve = true; } } - if (keyFile.has_key ("Color appearance", "Curve2")) { - colorappearance.curve2 = keyFile.get_double_list ("Color appearance", "Curve2"); + if (keyFile.has_key ("Color appearance", "Curve2")) { + colorappearance.curve2 = keyFile.get_double_list ("Color appearance", "Curve2"); + avoidEmptyCurve (colorappearance.curve2); if (pedited) { pedited->colorappearance.curve2 = true; } } - if (keyFile.has_key ("Color appearance", "Curve3")) { - colorappearance.curve3 = keyFile.get_double_list ("Color appearance", "Curve3"); + if (keyFile.has_key ("Color appearance", "Curve3")) { + colorappearance.curve3 = keyFile.get_double_list ("Color appearance", "Curve3"); + avoidEmptyCurve (colorappearance.curve3); if (pedited) { pedited->colorappearance.curve3 = true; @@ -5003,9 +5355,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } - // load impulseDenoise +// load impulseDenoise if (keyFile.has_group ("Impulse Denoising")) { - if (keyFile.has_key ("Impulse Denoising", "Enabled")) { + if (keyFile.has_key ("Impulse Denoising", "Enabled")) { impulseDenoise.enabled = keyFile.get_boolean ("Impulse Denoising", "Enabled"); if (pedited) { @@ -5014,7 +5366,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("Impulse Denoising", "Threshold")) { - impulseDenoise.thresh = keyFile.get_integer ("Impulse Denoising", "Threshold"); + impulseDenoise.thresh = keyFile.get_integer ("Impulse Denoising", "Threshold"); if (pedited) { pedited->impulseDenoise.thresh = true; @@ -5022,9 +5374,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load dirpyrDenoise +// load dirpyrDenoise if (keyFile.has_group ("Directional Pyramid Denoising")) {//TODO: No longer an accurate description for FT denoise - if (keyFile.has_key ("Directional Pyramid Denoising", "Enabled")) { + if (keyFile.has_key ("Directional Pyramid Denoising", "Enabled")) { dirpyrDenoise.enabled = keyFile.get_boolean ("Directional Pyramid Denoising", "Enabled"); if (pedited) { @@ -5032,7 +5384,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Directional Pyramid Denoising", "Enhance")) { + if (keyFile.has_key ("Directional Pyramid Denoising", "Enhance")) { dirpyrDenoise.enhance = keyFile.get_boolean ("Directional Pyramid Denoising", "Enhance"); if (pedited) { @@ -5040,7 +5392,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Directional Pyramid Denoising", "Median")) { + if (keyFile.has_key ("Directional Pyramid Denoising", "Median")) { dirpyrDenoise.median = keyFile.get_boolean ("Directional Pyramid Denoising", "Median"); if (pedited) { @@ -5048,24 +5400,16 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Directional Pyramid Denoising", "Auto")) { - dirpyrDenoise.autochroma = keyFile.get_boolean ("Directional Pyramid Denoising", "Auto"); - - if (pedited) { - pedited->dirpyrDenoise.autochroma = true; - } - } - -// if (keyFile.has_key ("Directional Pyramid Denoising", "Perform")) { dirpyrDenoise.perform = keyFile.get_boolean ("Directional Pyramid Denoising", "Perform"); if (pedited) pedited->dirpyrDenoise.perform = true; } - if (keyFile.has_key ("Directional Pyramid Denoising", "Luma")) { - dirpyrDenoise.luma = keyFile.get_double ("Directional Pyramid Denoising", "Luma"); +// if (keyFile.has_key ("Directional Pyramid Denoising", "Perform")) { dirpyrDenoise.perform = keyFile.get_boolean ("Directional Pyramid Denoising", "Perform"); if (pedited) pedited->dirpyrDenoise.perform = true; } + if (keyFile.has_key ("Directional Pyramid Denoising", "Luma")) { + dirpyrDenoise.luma = keyFile.get_double ("Directional Pyramid Denoising", "Luma"); if (pedited) { pedited->dirpyrDenoise.luma = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "Ldetail")) { + if (keyFile.has_key ("Directional Pyramid Denoising", "Ldetail")) { dirpyrDenoise.Ldetail = keyFile.get_double ("Directional Pyramid Denoising", "Ldetail"); if (pedited) { @@ -5073,129 +5417,131 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Directional Pyramid Denoising", "Chroma")) { - dirpyrDenoise.chroma = keyFile.get_double ("Directional Pyramid Denoising", "Chroma"); + if (keyFile.has_key ("Directional Pyramid Denoising", "Chroma")) { + dirpyrDenoise.chroma = keyFile.get_double ("Directional Pyramid Denoising", "Chroma"); if (pedited) { pedited->dirpyrDenoise.chroma = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "Method")) { - dirpyrDenoise.dmethod = keyFile.get_string ("Directional Pyramid Denoising", "Method"); + if (keyFile.has_key ("Directional Pyramid Denoising", "Method")) { + dirpyrDenoise.dmethod = keyFile.get_string ("Directional Pyramid Denoising", "Method"); if (pedited) { pedited->dirpyrDenoise.dmethod = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "LMethod")) { - dirpyrDenoise.Lmethod = keyFile.get_string ("Directional Pyramid Denoising", "LMethod"); + if (keyFile.has_key ("Directional Pyramid Denoising", "LMethod")) { + dirpyrDenoise.Lmethod = keyFile.get_string ("Directional Pyramid Denoising", "LMethod"); if (pedited) { pedited->dirpyrDenoise.Lmethod = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "CMethod")) { - dirpyrDenoise.Cmethod = keyFile.get_string ("Directional Pyramid Denoising", "CMethod"); + if (keyFile.has_key ("Directional Pyramid Denoising", "CMethod")) { + dirpyrDenoise.Cmethod = keyFile.get_string ("Directional Pyramid Denoising", "CMethod"); if (pedited) { pedited->dirpyrDenoise.Cmethod = true; } } - // never load 'auto chroma preview mode' from pp3 - if(dirpyrDenoise.Cmethod == "PRE") { +// never load 'auto chroma preview mode' from pp3 + if (dirpyrDenoise.Cmethod == "PRE") { dirpyrDenoise.Cmethod = "MAN"; } - if (keyFile.has_key ("Directional Pyramid Denoising", "C2Method")) { - dirpyrDenoise.C2method = keyFile.get_string ("Directional Pyramid Denoising", "C2Method"); + if (keyFile.has_key ("Directional Pyramid Denoising", "C2Method")) { + dirpyrDenoise.C2method = keyFile.get_string ("Directional Pyramid Denoising", "C2Method"); if (pedited) { pedited->dirpyrDenoise.C2method = true; } } - if(dirpyrDenoise.C2method == "PREV") { + if (dirpyrDenoise.C2method == "PREV") { dirpyrDenoise.C2method = "MANU"; } - if (keyFile.has_key ("Directional Pyramid Denoising", "SMethod")) { - dirpyrDenoise.smethod = keyFile.get_string ("Directional Pyramid Denoising", "SMethod"); + if (keyFile.has_key ("Directional Pyramid Denoising", "SMethod")) { + dirpyrDenoise.smethod = keyFile.get_string ("Directional Pyramid Denoising", "SMethod"); if (pedited) { pedited->dirpyrDenoise.smethod = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "MedMethod")) { - dirpyrDenoise.medmethod = keyFile.get_string ("Directional Pyramid Denoising", "MedMethod"); + if (keyFile.has_key ("Directional Pyramid Denoising", "MedMethod")) { + dirpyrDenoise.medmethod = keyFile.get_string ("Directional Pyramid Denoising", "MedMethod"); if (pedited) { pedited->dirpyrDenoise.medmethod = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "MethodMed")) { - dirpyrDenoise.methodmed = keyFile.get_string ("Directional Pyramid Denoising", "MethodMed"); + if (keyFile.has_key ("Directional Pyramid Denoising", "MethodMed")) { + dirpyrDenoise.methodmed = keyFile.get_string ("Directional Pyramid Denoising", "MethodMed"); if (pedited) { pedited->dirpyrDenoise.methodmed = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "RGBMethod")) { - dirpyrDenoise.rgbmethod = keyFile.get_string ("Directional Pyramid Denoising", "RGBMethod"); + if (keyFile.has_key ("Directional Pyramid Denoising", "RGBMethod")) { + dirpyrDenoise.rgbmethod = keyFile.get_string ("Directional Pyramid Denoising", "RGBMethod"); if (pedited) { pedited->dirpyrDenoise.rgbmethod = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "LCurve")) { - dirpyrDenoise.lcurve = keyFile.get_double_list ("Directional Pyramid Denoising", "LCurve"); + if (keyFile.has_key ("Directional Pyramid Denoising", "LCurve")) { + dirpyrDenoise.lcurve = keyFile.get_double_list ("Directional Pyramid Denoising", "LCurve"); + avoidEmptyCurve (dirpyrDenoise.lcurve); if (pedited) { pedited->dirpyrDenoise.lcurve = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "CCCurve")) { - dirpyrDenoise.cccurve = keyFile.get_double_list ("Directional Pyramid Denoising", "CCCurve"); + if (keyFile.has_key ("Directional Pyramid Denoising", "CCCurve")) { + dirpyrDenoise.cccurve = keyFile.get_double_list ("Directional Pyramid Denoising", "CCCurve"); + avoidEmptyCurve (dirpyrDenoise.cccurve); if (pedited) { pedited->dirpyrDenoise.cccurve = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "Redchro")) { - dirpyrDenoise.redchro = keyFile.get_double ("Directional Pyramid Denoising", "Redchro"); + if (keyFile.has_key ("Directional Pyramid Denoising", "Redchro")) { + dirpyrDenoise.redchro = keyFile.get_double ("Directional Pyramid Denoising", "Redchro"); if (pedited) { pedited->dirpyrDenoise.redchro = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "Bluechro")) { - dirpyrDenoise.bluechro = keyFile.get_double ("Directional Pyramid Denoising", "Bluechro"); + if (keyFile.has_key ("Directional Pyramid Denoising", "Bluechro")) { + dirpyrDenoise.bluechro = keyFile.get_double ("Directional Pyramid Denoising", "Bluechro"); if (pedited) { pedited->dirpyrDenoise.bluechro = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "Gamma")) { - dirpyrDenoise.gamma = keyFile.get_double ("Directional Pyramid Denoising", "Gamma"); + if (keyFile.has_key ("Directional Pyramid Denoising", "Gamma")) { + dirpyrDenoise.gamma = keyFile.get_double ("Directional Pyramid Denoising", "Gamma"); if (pedited) { pedited->dirpyrDenoise.gamma = true; } } - if (keyFile.has_key ("Directional Pyramid Denoising", "Passes")) { - dirpyrDenoise.passes = keyFile.get_integer ("Directional Pyramid Denoising", "Passes"); + if (keyFile.has_key ("Directional Pyramid Denoising", "Passes")) { + dirpyrDenoise.passes = keyFile.get_integer ("Directional Pyramid Denoising", "Passes"); if (pedited) { pedited->dirpyrDenoise.passes = true; @@ -5203,9 +5549,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - //Load EPD. +//Load EPD. if (keyFile.has_group ("EPD")) { - if(keyFile.has_key("EPD", "Enabled")) { + if (keyFile.has_key ("EPD", "Enabled")) { epd.enabled = keyFile.get_boolean ("EPD", "Enabled"); if (pedited) { @@ -5213,7 +5559,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if(keyFile.has_key("EPD", "Strength")) { + if (keyFile.has_key ("EPD", "Strength")) { epd.strength = keyFile.get_double ("EPD", "Strength"); if (pedited) { @@ -5221,7 +5567,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if(keyFile.has_key("EPD", "Gamma")) { + if (keyFile.has_key ("EPD", "Gamma")) { epd.gamma = keyFile.get_double ("EPD", "Gamma"); if (pedited) { @@ -5229,7 +5575,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if(keyFile.has_key("EPD", "EdgeStopping")) { + if (keyFile.has_key ("EPD", "EdgeStopping")) { epd.edgeStopping = keyFile.get_double ("EPD", "EdgeStopping"); if (pedited) { @@ -5237,7 +5583,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if(keyFile.has_key("EPD", "Scale")) { + if (keyFile.has_key ("EPD", "Scale")) { epd.scale = keyFile.get_double ("EPD", "Scale"); if (pedited) { @@ -5245,7 +5591,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if(keyFile.has_key("EPD", "ReweightingIterates")) { + if (keyFile.has_key ("EPD", "ReweightingIterates")) { epd.reweightingIterates = keyFile.get_integer ("EPD", "ReweightingIterates"); if (pedited) { @@ -5271,55 +5617,55 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) // load sh if (keyFile.has_group ("Shadows & Highlights")) { - if (keyFile.has_key ("Shadows & Highlights", "Enabled")) { - sh.enabled = keyFile.get_boolean ("Shadows & Highlights", "Enabled"); + if (keyFile.has_key ("Shadows & Highlights", "Enabled")) { + sh.enabled = keyFile.get_boolean ("Shadows & Highlights", "Enabled"); if (pedited) { pedited->sh.enabled = true; } } - if (keyFile.has_key ("Shadows & Highlights", "HighQuality")) { - sh.hq = keyFile.get_boolean ("Shadows & Highlights", "HighQuality"); + if (keyFile.has_key ("Shadows & Highlights", "HighQuality")) { + sh.hq = keyFile.get_boolean ("Shadows & Highlights", "HighQuality"); if (pedited) { pedited->sh.hq = true; } } - if (keyFile.has_key ("Shadows & Highlights", "Highlights")) { - sh.highlights = keyFile.get_integer ("Shadows & Highlights", "Highlights"); + if (keyFile.has_key ("Shadows & Highlights", "Highlights")) { + sh.highlights = keyFile.get_integer ("Shadows & Highlights", "Highlights"); if (pedited) { pedited->sh.highlights = true; } } - if (keyFile.has_key ("Shadows & Highlights", "HighlightTonalWidth")) { - sh.htonalwidth = keyFile.get_integer ("Shadows & Highlights", "HighlightTonalWidth"); + if (keyFile.has_key ("Shadows & Highlights", "HighlightTonalWidth")) { + sh.htonalwidth = keyFile.get_integer ("Shadows & Highlights", "HighlightTonalWidth"); if (pedited) { pedited->sh.htonalwidth = true; } } - if (keyFile.has_key ("Shadows & Highlights", "Shadows")) { - sh.shadows = keyFile.get_integer ("Shadows & Highlights", "Shadows"); + if (keyFile.has_key ("Shadows & Highlights", "Shadows")) { + sh.shadows = keyFile.get_integer ("Shadows & Highlights", "Shadows"); if (pedited) { pedited->sh.shadows = true; } } - if (keyFile.has_key ("Shadows & Highlights", "ShadowTonalWidth")) { - sh.stonalwidth = keyFile.get_integer ("Shadows & Highlights", "ShadowTonalWidth"); + if (keyFile.has_key ("Shadows & Highlights", "ShadowTonalWidth")) { + sh.stonalwidth = keyFile.get_integer ("Shadows & Highlights", "ShadowTonalWidth"); if (pedited) { pedited->sh.stonalwidth = true; } } - if (keyFile.has_key ("Shadows & Highlights", "LocalContrast")) { + if (keyFile.has_key ("Shadows & Highlights", "LocalContrast")) { sh.localcontrast = keyFile.get_integer ("Shadows & Highlights", "LocalContrast"); if (pedited) { @@ -5327,8 +5673,8 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Shadows & Highlights", "Radius")) { - sh.radius = keyFile.get_integer ("Shadows & Highlights", "Radius"); + if (keyFile.has_key ("Shadows & Highlights", "Radius")) { + sh.radius = keyFile.get_integer ("Shadows & Highlights", "Radius"); if (pedited) { pedited->sh.radius = true; @@ -5336,42 +5682,42 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load crop +// load crop if (keyFile.has_group ("Crop")) { - if (keyFile.has_key ("Crop", "Enabled")) { - crop.enabled = keyFile.get_boolean ("Crop", "Enabled"); + if (keyFile.has_key ("Crop", "Enabled")) { + crop.enabled = keyFile.get_boolean ("Crop", "Enabled"); if (pedited) { pedited->crop.enabled = true; } } - if (keyFile.has_key ("Crop", "X")) { - crop.x = keyFile.get_integer ("Crop", "X"); + if (keyFile.has_key ("Crop", "X")) { + crop.x = keyFile.get_integer ("Crop", "X"); if (pedited) { pedited->crop.x = true; } } - if (keyFile.has_key ("Crop", "Y")) { - crop.y = keyFile.get_integer ("Crop", "Y"); + if (keyFile.has_key ("Crop", "Y")) { + crop.y = keyFile.get_integer ("Crop", "Y"); if (pedited) { pedited->crop.y = true; } } - if (keyFile.has_key ("Crop", "W")) { - crop.w = keyFile.get_integer ("Crop", "W"); + if (keyFile.has_key ("Crop", "W")) { + crop.w = std::max (keyFile.get_integer ("Crop", "W"), 1); if (pedited) { pedited->crop.w = true; } } - if (keyFile.has_key ("Crop", "H")) { - crop.h = keyFile.get_integer ("Crop", "H"); + if (keyFile.has_key ("Crop", "H")) { + crop.h = std::max (keyFile.get_integer ("Crop", "H"), 1); if (pedited) { pedited->crop.h = true; @@ -5379,7 +5725,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("Crop", "FixedRatio")) { - crop.fixratio = keyFile.get_boolean ("Crop", "FixedRatio"); + crop.fixratio = keyFile.get_boolean ("Crop", "FixedRatio"); if (pedited) { pedited->crop.fixratio = true; @@ -5387,13 +5733,13 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("Crop", "Ratio")) { - crop.ratio = keyFile.get_string ("Crop", "Ratio"); + crop.ratio = keyFile.get_string ("Crop", "Ratio"); if (pedited) { pedited->crop.ratio = true; } - //backwards compatibility for crop.ratio +//backwards compatibility for crop.ratio if (crop.ratio == "DIN") { crop.ratio = "1.414 - DIN EN ISO 216"; } @@ -5407,16 +5753,16 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Crop", "Orientation")) { - crop.orientation = keyFile.get_string ("Crop", "Orientation"); + if (keyFile.has_key ("Crop", "Orientation")) { + crop.orientation = keyFile.get_string ("Crop", "Orientation"); if (pedited) { pedited->crop.orientation = true; } } - if (keyFile.has_key ("Crop", "Guide")) { - crop.guide = keyFile.get_string ("Crop", "Guide"); + if (keyFile.has_key ("Crop", "Guide")) { + crop.guide = keyFile.get_string ("Crop", "Guide"); if (pedited) { pedited->crop.guide = true; @@ -5424,9 +5770,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load coarse +// load coarse if (keyFile.has_group ("Coarse Transformation")) { - if (keyFile.has_key ("Coarse Transformation", "Rotate")) { + if (keyFile.has_key ("Coarse Transformation", "Rotate")) { coarse.rotate = keyFile.get_integer ("Coarse Transformation", "Rotate"); if (pedited) { @@ -5434,16 +5780,16 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Coarse Transformation", "HorizontalFlip")) { - coarse.hflip = keyFile.get_boolean ("Coarse Transformation", "HorizontalFlip"); + if (keyFile.has_key ("Coarse Transformation", "HorizontalFlip")) { + coarse.hflip = keyFile.get_boolean ("Coarse Transformation", "HorizontalFlip"); if (pedited) { pedited->coarse.hflip = true; } } - if (keyFile.has_key ("Coarse Transformation", "VerticalFlip")) { - coarse.vflip = keyFile.get_boolean ("Coarse Transformation", "VerticalFlip"); + if (keyFile.has_key ("Coarse Transformation", "VerticalFlip")) { + coarse.vflip = keyFile.get_boolean ("Coarse Transformation", "VerticalFlip"); if (pedited) { pedited->coarse.vflip = true; @@ -5451,9 +5797,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load rotate +// load rotate if (keyFile.has_group ("Rotation")) { - if (keyFile.has_key ("Rotation", "Degree")) { + if (keyFile.has_key ("Rotation", "Degree")) { rotate.degree = keyFile.get_double ("Rotation", "Degree"); if (pedited) { @@ -5462,9 +5808,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load commonTrans +// load commonTrans if (keyFile.has_group ("Common Properties for Transformations")) { - if (keyFile.has_key ("Common Properties for Transformations", "AutoFill")) { + if (keyFile.has_key ("Common Properties for Transformations", "AutoFill")) { commonTrans.autofill = keyFile.get_boolean ("Common Properties for Transformations", "AutoFill"); if (pedited) { @@ -5473,10 +5819,10 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load distortion +// load distortion if (keyFile.has_group ("Distortion")) { - if (keyFile.has_key ("Distortion", "Amount")) { - distortion.amount = keyFile.get_double ("Distortion", "Amount"); + if (keyFile.has_key ("Distortion", "Amount")) { + distortion.amount = keyFile.get_double ("Distortion", "Amount"); if (pedited) { pedited->distortion.amount = true; @@ -5484,10 +5830,10 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // lens profile +// lens profile if (keyFile.has_group ("LensProfile")) { if (keyFile.has_key ("LensProfile", "LCPFile")) { - lensProf.lcpFile = expandRelativePath(fname, "", keyFile.get_string ("LensProfile", "LCPFile")); + lensProf.lcpFile = expandRelativePath (fname, "", keyFile.get_string ("LensProfile", "LCPFile")); if (pedited) { pedited->lensProf.lcpFile = true; @@ -5519,9 +5865,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load perspective correction +// load perspective correction if (keyFile.has_group ("Perspective")) { - if (keyFile.has_key ("Perspective", "Horizontal")) { + if (keyFile.has_key ("Perspective", "Horizontal")) { perspective.horizontal = keyFile.get_double ("Perspective", "Horizontal"); if (pedited) { @@ -5529,8 +5875,8 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Perspective", "Vertical")) { - perspective.vertical = keyFile.get_double ("Perspective", "Vertical"); + if (keyFile.has_key ("Perspective", "Vertical")) { + perspective.vertical = keyFile.get_double ("Perspective", "Vertical"); if (pedited) { pedited->perspective.vertical = true; @@ -5538,26 +5884,26 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load gradient +// load gradient if (keyFile.has_group ("Gradient")) { - if (keyFile.has_key ("Gradient", "Enabled")) { - gradient.enabled = keyFile.get_boolean ("Gradient", "Enabled"); + if (keyFile.has_key ("Gradient", "Enabled")) { + gradient.enabled = keyFile.get_boolean ("Gradient", "Enabled"); if (pedited) { pedited->gradient.enabled = true; } } - if (keyFile.has_key ("Gradient", "Degree")) { - gradient.degree = keyFile.get_double ("Gradient", "Degree"); + if (keyFile.has_key ("Gradient", "Degree")) { + gradient.degree = keyFile.get_double ("Gradient", "Degree"); if (pedited) { pedited->gradient.degree = true; } } - if (keyFile.has_key ("Gradient", "Feather")) { - gradient.feather = keyFile.get_integer ("Gradient", "Feather"); + if (keyFile.has_key ("Gradient", "Feather")) { + gradient.feather = keyFile.get_integer ("Gradient", "Feather"); if (pedited) { pedited->gradient.feather = true; @@ -5565,23 +5911,23 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("Gradient", "Strength")) { - gradient.strength = keyFile.get_double ("Gradient", "Strength"); + gradient.strength = keyFile.get_double ("Gradient", "Strength"); if (pedited) { pedited->gradient.strength = true; } } - if (keyFile.has_key ("Gradient", "CenterX")) { - gradient.centerX = keyFile.get_integer ("Gradient", "CenterX"); + if (keyFile.has_key ("Gradient", "CenterX")) { + gradient.centerX = keyFile.get_integer ("Gradient", "CenterX"); if (pedited) { pedited->gradient.centerX = true; } } - if (keyFile.has_key ("Gradient", "CenterY")) { - gradient.centerY = keyFile.get_integer ("Gradient", "CenterY"); + if (keyFile.has_key ("Gradient", "CenterY")) { + gradient.centerY = keyFile.get_integer ("Gradient", "CenterY"); if (pedited) { pedited->gradient.centerY = true; @@ -5590,8 +5936,8 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_group ("PCVignette")) { - if (keyFile.has_key ("PCVignette", "Enabled")) { - pcvignette.enabled = keyFile.get_boolean ("PCVignette", "Enabled"); + if (keyFile.has_key ("PCVignette", "Enabled")) { + pcvignette.enabled = keyFile.get_boolean ("PCVignette", "Enabled"); if (pedited) { pedited->pcvignette.enabled = true; @@ -5599,23 +5945,23 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("PCVignette", "Strength")) { - pcvignette.strength = keyFile.get_double ("PCVignette", "Strength"); + pcvignette.strength = keyFile.get_double ("PCVignette", "Strength"); if (pedited) { pedited->pcvignette.strength = true; } } - if (keyFile.has_key ("PCVignette", "Feather")) { - pcvignette.feather = keyFile.get_integer ("PCVignette", "Feather"); + if (keyFile.has_key ("PCVignette", "Feather")) { + pcvignette.feather = keyFile.get_integer ("PCVignette", "Feather"); if (pedited) { pedited->pcvignette.feather = true; } } - if (keyFile.has_key ("PCVignette", "Roundness")) { - pcvignette.roundness = keyFile.get_integer ("PCVignette", "Roundness"); + if (keyFile.has_key ("PCVignette", "Roundness")) { + pcvignette.roundness = keyFile.get_integer ("PCVignette", "Roundness"); if (pedited) { pedited->pcvignette.roundness = true; @@ -5625,8 +5971,8 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) // load c/a correction if (keyFile.has_group ("CACorrection")) { - if (keyFile.has_key ("CACorrection", "Red")) { - cacorrection.red = keyFile.get_double ("CACorrection", "Red"); + if (keyFile.has_key ("CACorrection", "Red")) { + cacorrection.red = keyFile.get_double ("CACorrection", "Red"); if (pedited) { pedited->cacorrection.red = true; @@ -5642,9 +5988,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load vignetting correction +// load vignetting correction if (keyFile.has_group ("Vignetting Correction")) { - if (keyFile.has_key ("Vignetting Correction", "Amount")) { + if (keyFile.has_key ("Vignetting Correction", "Amount")) { vignetting.amount = keyFile.get_integer ("Vignetting Correction", "Amount"); if (pedited) { @@ -5652,7 +5998,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Vignetting Correction", "Radius")) { + if (keyFile.has_key ("Vignetting Correction", "Radius")) { vignetting.radius = keyFile.get_integer ("Vignetting Correction", "Radius"); if (pedited) { @@ -5668,7 +6014,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Vignetting Correction", "CenterX")) { + if (keyFile.has_key ("Vignetting Correction", "CenterX")) { vignetting.centerX = keyFile.get_integer ("Vignetting Correction", "CenterX"); if (pedited) { @@ -5676,7 +6022,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Vignetting Correction", "CenterY")) { + if (keyFile.has_key ("Vignetting Correction", "CenterY")) { vignetting.centerY = keyFile.get_integer ("Vignetting Correction", "CenterY"); if (pedited) { @@ -5685,25 +6031,25 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load resize settings +// load resize settings if (keyFile.has_group ("Resize")) { - if (keyFile.has_key ("Resize", "Enabled")) { - resize.enabled = keyFile.get_boolean ("Resize", "Enabled"); + if (keyFile.has_key ("Resize", "Enabled")) { + resize.enabled = keyFile.get_boolean ("Resize", "Enabled"); if (pedited) { pedited->resize.enabled = true; } } - if (keyFile.has_key ("Resize", "Scale")) { - resize.scale = keyFile.get_double ("Resize", "Scale"); + if (keyFile.has_key ("Resize", "Scale")) { + resize.scale = keyFile.get_double ("Resize", "Scale"); if (pedited) { pedited->resize.scale = true; } } - if (keyFile.has_key ("Resize", "AppliesTo")) { + if (keyFile.has_key ("Resize", "AppliesTo")) { resize.appliesTo = keyFile.get_string ("Resize", "AppliesTo"); if (pedited) { @@ -5711,8 +6057,8 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Resize", "Method")) { - resize.method = keyFile.get_string ("Resize", "Method"); + if (keyFile.has_key ("Resize", "Method")) { + resize.method = keyFile.get_string ("Resize", "Method"); if (pedited) { pedited->resize.method = true; @@ -5720,23 +6066,23 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("Resize", "DataSpecified")) { - resize.dataspec = keyFile.get_integer ("Resize", "DataSpecified"); + resize.dataspec = keyFile.get_integer ("Resize", "DataSpecified"); if (pedited) { pedited->resize.dataspec = true; } } - if (keyFile.has_key ("Resize", "Width")) { - resize.width = keyFile.get_integer ("Resize", "Width"); + if (keyFile.has_key ("Resize", "Width")) { + resize.width = keyFile.get_integer ("Resize", "Width"); if (pedited) { pedited->resize.width = true; } } - if (keyFile.has_key ("Resize", "Height")) { - resize.height = keyFile.get_integer ("Resize", "Height"); + if (keyFile.has_key ("Resize", "Height")) { + resize.height = keyFile.get_integer ("Resize", "Height"); if (pedited) { pedited->resize.height = true; @@ -5774,39 +6120,42 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load post resize sharpening + // load post resize sharpening if (keyFile.has_group ("PostResizeSharpening")) { - if (keyFile.has_key ("PostResizeSharpening", "Enabled")) { - prsharpening.enabled = keyFile.get_boolean ("PostResizeSharpening", "Enabled"); + if (keyFile.has_key ("PostResizeSharpening", "Enabled")) { + prsharpening.enabled = keyFile.get_boolean ("PostResizeSharpening", "Enabled"); if (pedited) { pedited->prsharpening.enabled = true; } } - if (keyFile.has_key ("PostResizeSharpening", "Radius")) { - prsharpening.radius = keyFile.get_double ("PostResizeSharpening", "Radius"); + if (keyFile.has_key ("PostResizeSharpening", "Radius")) { + prsharpening.radius = keyFile.get_double ("PostResizeSharpening", "Radius"); if (pedited) { pedited->prsharpening.radius = true; } } - if (keyFile.has_key ("PostResizeSharpening", "Amount")) { - prsharpening.amount = keyFile.get_integer ("PostResizeSharpening", "Amount"); + if (keyFile.has_key ("PostResizeSharpening", "Amount")) { + prsharpening.amount = keyFile.get_integer ("PostResizeSharpening", "Amount"); if (pedited) { pedited->prsharpening.amount = true; } } - if (keyFile.has_key ("PostResizeSharpening", "Threshold")) { + if (keyFile.has_key ("PostResizeSharpening", "Threshold")) { if (ppVersion < 302) { - int thresh = min(keyFile.get_integer ("PostResizeSharpening", "Threshold"), 2000); - prsharpening.threshold.setValues(thresh, thresh, 2000, 2000); // TODO: 2000 is the maximum value and is taken of rtgui/sharpening.cc ; should be changed by the tool modularization + int thresh = min (keyFile.get_integer ("PostResizeSharpening", "Threshold"), 2000); + prsharpening.threshold.setValues (thresh, thresh, 2000, 2000); // TODO: 2000 is the maximum value and is taken of rtgui/sharpening.cc ; should be changed by the tool modularization } else { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("PostResizeSharpening", "Threshold"); - prsharpening.threshold.setValues(thresh.data()[0], thresh.data()[1], min(thresh.data()[2], 2000), min(thresh.data()[3], 2000)); + const std::vector thresh = keyFile.get_integer_list ("PostResizeSharpening", "Threshold"); + + if (thresh.size() >= 4) { + prsharpening.threshold.setValues (thresh[0], thresh[1], min (thresh[2], 2000), min (thresh[3], 2000)); + } } if (pedited) { @@ -5814,39 +6163,39 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("PostResizeSharpening", "OnlyEdges")) { - prsharpening.edgesonly = keyFile.get_boolean ("PostResizeSharpening", "OnlyEdges"); + if (keyFile.has_key ("PostResizeSharpening", "OnlyEdges")) { + prsharpening.edgesonly = keyFile.get_boolean ("PostResizeSharpening", "OnlyEdges"); if (pedited) { pedited->prsharpening.edgesonly = true; } } - if (keyFile.has_key ("PostResizeSharpening", "EdgedetectionRadius")) { - prsharpening.edges_radius = keyFile.get_double ("PostResizeSharpening", "EdgedetectionRadius"); + if (keyFile.has_key ("PostResizeSharpening", "EdgedetectionRadius")) { + prsharpening.edges_radius = keyFile.get_double ("PostResizeSharpening", "EdgedetectionRadius"); if (pedited) { pedited->prsharpening.edges_radius = true; } } - if (keyFile.has_key ("PostResizeSharpening", "EdgeTolerance")) { - prsharpening.edges_tolerance = keyFile.get_integer ("PostResizeSharpening", "EdgeTolerance"); + if (keyFile.has_key ("PostResizeSharpening", "EdgeTolerance")) { + prsharpening.edges_tolerance = keyFile.get_integer ("PostResizeSharpening", "EdgeTolerance"); if (pedited) { pedited->prsharpening.edges_tolerance = true; } } - if (keyFile.has_key ("PostResizeSharpening", "HalocontrolEnabled")) { - prsharpening.halocontrol = keyFile.get_boolean ("PostResizeSharpening", "HalocontrolEnabled"); + if (keyFile.has_key ("PostResizeSharpening", "HalocontrolEnabled")) { + prsharpening.halocontrol = keyFile.get_boolean ("PostResizeSharpening", "HalocontrolEnabled"); if (pedited) { pedited->prsharpening.halocontrol = true; } } - if (keyFile.has_key ("PostResizeSharpening", "HalocontrolAmount")) { + if (keyFile.has_key ("PostResizeSharpening", "HalocontrolAmount")) { prsharpening.halocontrol_amount = keyFile.get_integer ("PostResizeSharpening", "HalocontrolAmount"); if (pedited) { @@ -5854,40 +6203,40 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("PostResizeSharpening", "Method")) { - prsharpening.method = keyFile.get_string ("PostResizeSharpening", "Method"); + if (keyFile.has_key ("PostResizeSharpening", "Method")) { + prsharpening.method = keyFile.get_string ("PostResizeSharpening", "Method"); if (pedited) { pedited->prsharpening.method = true; } } - if (keyFile.has_key ("PostResizeSharpening", "DeconvRadius")) { - prsharpening.deconvradius = keyFile.get_double ("PostResizeSharpening", "DeconvRadius"); + if (keyFile.has_key ("PostResizeSharpening", "DeconvRadius")) { + prsharpening.deconvradius = keyFile.get_double ("PostResizeSharpening", "DeconvRadius"); if (pedited) { pedited->prsharpening.deconvradius = true; } } - if (keyFile.has_key ("PostResizeSharpening", "DeconvAmount")) { - prsharpening.deconvamount = keyFile.get_integer ("PostResizeSharpening", "DeconvAmount"); + if (keyFile.has_key ("PostResizeSharpening", "DeconvAmount")) { + prsharpening.deconvamount = keyFile.get_integer ("PostResizeSharpening", "DeconvAmount"); if (pedited) { pedited->prsharpening.deconvamount = true; } } - if (keyFile.has_key ("PostResizeSharpening", "DeconvDamping")) { - prsharpening.deconvdamping = keyFile.get_integer ("PostResizeSharpening", "DeconvDamping"); + if (keyFile.has_key ("PostResizeSharpening", "DeconvDamping")) { + prsharpening.deconvdamping = keyFile.get_integer ("PostResizeSharpening", "DeconvDamping"); if (pedited) { pedited->prsharpening.deconvdamping = true; } } - if (keyFile.has_key ("PostResizeSharpening", "DeconvIterations")) { - prsharpening.deconviter = keyFile.get_integer ("PostResizeSharpening", "DeconvIterations"); + if (keyFile.has_key ("PostResizeSharpening", "DeconvIterations")) { + prsharpening.deconviter = keyFile.get_integer ("PostResizeSharpening", "DeconvIterations"); if (pedited) { pedited->prsharpening.deconviter = true; @@ -5895,58 +6244,50 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load color management settings +// load color management settings if (keyFile.has_group ("Color Management")) { - if (keyFile.has_key ("Color Management", "InputProfile")) { - icm.input = expandRelativePath(fname, "file:", keyFile.get_string ("Color Management", "InputProfile")); + if (keyFile.has_key ("Color Management", "InputProfile")) { + icm.input = expandRelativePath (fname, "file:", keyFile.get_string ("Color Management", "InputProfile")); if (pedited) { pedited->icm.input = true; } } - if (keyFile.has_key ("Color Management", "ToneCurve")) { - icm.toneCurve = keyFile.get_boolean ("Color Management", "ToneCurve"); + if (keyFile.has_key ("Color Management", "ToneCurve")) { + icm.toneCurve = keyFile.get_boolean ("Color Management", "ToneCurve"); if (pedited) { pedited->icm.toneCurve = true; } } - if (keyFile.has_key ("Color Management", "ApplyLookTable")) { - icm.applyLookTable = keyFile.get_boolean ("Color Management", "ApplyLookTable"); + if (keyFile.has_key ("Color Management", "ApplyLookTable")) { + icm.applyLookTable = keyFile.get_boolean ("Color Management", "ApplyLookTable"); if (pedited) { pedited->icm.applyLookTable = true; } } - if (keyFile.has_key ("Color Management", "ApplyBaselineExposureOffset")) { - icm.applyBaselineExposureOffset = keyFile.get_boolean ("Color Management", "ApplyBaselineExposureOffset"); + if (keyFile.has_key ("Color Management", "ApplyBaselineExposureOffset")) { + icm.applyBaselineExposureOffset = keyFile.get_boolean ("Color Management", "ApplyBaselineExposureOffset"); if (pedited) { pedited->icm.applyBaselineExposureOffset = true; } } - if (keyFile.has_key ("Color Management", "ApplyHueSatMap")) { - icm.applyHueSatMap = keyFile.get_boolean ("Color Management", "ApplyHueSatMap"); + if (keyFile.has_key ("Color Management", "ApplyHueSatMap")) { + icm.applyHueSatMap = keyFile.get_boolean ("Color Management", "ApplyHueSatMap"); if (pedited) { pedited->icm.applyHueSatMap = true; } } - if (keyFile.has_key ("Color Management", "BlendCMSMatrix")) { - icm.blendCMSMatrix = keyFile.get_boolean ("Color Management", "BlendCMSMatrix"); - - if (pedited) { - pedited->icm.blendCMSMatrix = true; - } - } - - if (keyFile.has_key ("Color Management", "DCPIlluminant")) { - icm.dcpIlluminant = keyFile.get_integer ("Color Management", "DCPIlluminant"); + if (keyFile.has_key ("Color Management", "DCPIlluminant")) { + icm.dcpIlluminant = keyFile.get_integer ("Color Management", "DCPIlluminant"); if (pedited) { pedited->icm.dcpIlluminant = true; @@ -5954,22 +6295,22 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("Color Management", "WorkingProfile")) { - icm.working = keyFile.get_string ("Color Management", "WorkingProfile"); + icm.working = keyFile.get_string ("Color Management", "WorkingProfile"); if (pedited) { pedited->icm.working = true; } } - if (keyFile.has_key ("Color Management", "OutputProfile")) { - icm.output = keyFile.get_string ("Color Management", "OutputProfile"); + if (keyFile.has_key ("Color Management", "OutputProfile")) { + icm.output = keyFile.get_string ("Color Management", "OutputProfile"); if (pedited) { pedited->icm.output = true; } } - if (keyFile.has_key ("Color Management", "OutputProfileIntent")) { + if (keyFile.has_key ("Color Management", "OutputProfileIntent")) { Glib::ustring intent = keyFile.get_string ("Color Management", "OutputProfileIntent"); if (intent == "Perceptual") { @@ -5987,40 +6328,40 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Color Management", "OutputBPC")) { - icm.outputBPC = keyFile.get_boolean ("Color Management", "OutputBPC"); + if (keyFile.has_key ("Color Management", "OutputBPC")) { + icm.outputBPC = keyFile.get_boolean ("Color Management", "OutputBPC"); if (pedited) { pedited->icm.outputBPC = true; } } - if (keyFile.has_key ("Color Management", "Gammafree")) { - icm.gamma = keyFile.get_string ("Color Management", "Gammafree"); + if (keyFile.has_key ("Color Management", "Gammafree")) { + icm.gamma = keyFile.get_string ("Color Management", "Gammafree"); if (pedited) { pedited->icm.gamfree = true; } } - if (keyFile.has_key ("Color Management", "Freegamma")) { - icm.freegamma = keyFile.get_boolean ("Color Management", "Freegamma"); + if (keyFile.has_key ("Color Management", "Freegamma")) { + icm.freegamma = keyFile.get_boolean ("Color Management", "Freegamma"); if (pedited) { pedited->icm.freegamma = true; } } - if (keyFile.has_key ("Color Management", "GammaValue")) { - icm.gampos = keyFile.get_double ("Color Management", "GammaValue"); + if (keyFile.has_key ("Color Management", "GammaValue")) { + icm.gampos = keyFile.get_double ("Color Management", "GammaValue"); if (pedited) { pedited->icm.gampos = true; } } - if (keyFile.has_key ("Color Management", "GammaSlope")) { - icm.slpos = keyFile.get_double ("Color Management", "GammaSlope"); + if (keyFile.has_key ("Color Management", "GammaSlope")) { + icm.slpos = keyFile.get_double ("Color Management", "GammaSlope"); if (pedited) { pedited->icm.slpos = true; @@ -6029,9 +6370,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } - // load wavelet wavelet parameters +// load wavelet wavelet parameters if (keyFile.has_group ("Wavelet")) { - if (keyFile.has_key ("Wavelet", "Enabled")) { + if (keyFile.has_key ("Wavelet", "Enabled")) { wavelet.enabled = keyFile.get_boolean ("Wavelet", "Enabled"); if (pedited) { @@ -6039,7 +6380,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Wavelet", "Strength")) { + if (keyFile.has_key ("Wavelet", "Strength")) { wavelet.strength = keyFile.get_integer ("Wavelet", "Strength"); if (pedited) { @@ -6047,7 +6388,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Wavelet", "Balance")) { + if (keyFile.has_key ("Wavelet", "Balance")) { wavelet.balance = keyFile.get_integer ("Wavelet", "Balance"); if (pedited) { @@ -6055,7 +6396,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Wavelet", "Iter")) { + if (keyFile.has_key ("Wavelet", "Iter")) { wavelet.iter = keyFile.get_integer ("Wavelet", "Iter"); if (pedited) { @@ -6095,7 +6436,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Wavelet", "CBgreenhigh")) { + if (keyFile.has_key ("Wavelet", "CBgreenhigh")) { wavelet.greenhigh = keyFile.get_integer ("Wavelet", "CBgreenhigh"); if (pedited) { @@ -6103,7 +6444,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Wavelet", "CBgreenmed")) { + if (keyFile.has_key ("Wavelet", "CBgreenmed")) { wavelet.greenmed = keyFile.get_integer ("Wavelet", "CBgreenmed"); if (pedited) { @@ -6111,7 +6452,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Wavelet", "CBgreenlow")) { + if (keyFile.has_key ("Wavelet", "CBgreenlow")) { wavelet.greenlow = keyFile.get_integer ("Wavelet", "CBgreenlow"); if (pedited) { @@ -6119,7 +6460,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Wavelet", "CBbluehigh")) { + if (keyFile.has_key ("Wavelet", "CBbluehigh")) { wavelet.bluehigh = keyFile.get_integer ("Wavelet", "CBbluehigh"); if (pedited) { @@ -6127,7 +6468,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Wavelet", "CBbluemed")) { + if (keyFile.has_key ("Wavelet", "CBbluemed")) { wavelet.bluemed = keyFile.get_integer ("Wavelet", "CBbluemed"); if (pedited) { @@ -6135,7 +6476,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Wavelet", "CBbluelow")) { + if (keyFile.has_key ("Wavelet", "CBbluelow")) { wavelet.bluelow = keyFile.get_integer ("Wavelet", "CBbluelow"); if (pedited) { @@ -6143,7 +6484,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } -// if (keyFile.has_key ("Wavelet", "Edgreinf")) {wavelet.edgreinf = keyFile.get_boolean ("Wavelet", "Edgreinf");if (pedited) pedited->wavelet.edgreinf = true;} +// if (keyFile.has_key ("Wavelet", "Edgreinf")) {wavelet.edgreinf = keyFile.get_boolean ("Wavelet", "Edgreinf");if (pedited) pedited->wavelet.edgreinf = true;} if (keyFile.has_key ("Wavelet", "Lipst")) { wavelet.lipst = keyFile.get_boolean ("Wavelet", "Lipst"); @@ -6168,296 +6509,296 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Wavelet", "LevMethod")) { - wavelet.Lmethod = keyFile.get_string ("Wavelet", "LevMethod"); + if (keyFile.has_key ("Wavelet", "LevMethod")) { + wavelet.Lmethod = keyFile.get_string ("Wavelet", "LevMethod"); if (pedited) { pedited->wavelet.Lmethod = true; } } - if (keyFile.has_key ("Wavelet", "ChoiceLevMethod")) { - wavelet.CLmethod = keyFile.get_string ("Wavelet", "ChoiceLevMethod"); + if (keyFile.has_key ("Wavelet", "ChoiceLevMethod")) { + wavelet.CLmethod = keyFile.get_string ("Wavelet", "ChoiceLevMethod"); if (pedited) { pedited->wavelet.CLmethod = true; } } - if (keyFile.has_key ("Wavelet", "BackMethod")) { - wavelet.Backmethod = keyFile.get_string ("Wavelet", "BackMethod"); + if (keyFile.has_key ("Wavelet", "BackMethod")) { + wavelet.Backmethod = keyFile.get_string ("Wavelet", "BackMethod"); if (pedited) { pedited->wavelet.Backmethod = true; } } - if (keyFile.has_key ("Wavelet", "TilesMethod")) { - wavelet.Tilesmethod = keyFile.get_string ("Wavelet", "TilesMethod"); + if (keyFile.has_key ("Wavelet", "TilesMethod")) { + wavelet.Tilesmethod = keyFile.get_string ("Wavelet", "TilesMethod"); if (pedited) { pedited->wavelet.Tilesmethod = true; } } - if (keyFile.has_key ("Wavelet", "DaubMethod")) { - wavelet.daubcoeffmethod = keyFile.get_string ("Wavelet", "DaubMethod"); + if (keyFile.has_key ("Wavelet", "DaubMethod")) { + wavelet.daubcoeffmethod = keyFile.get_string ("Wavelet", "DaubMethod"); if (pedited) { pedited->wavelet.daubcoeffmethod = true; } } - if (keyFile.has_key ("Wavelet", "CHromaMethod")) { - wavelet.CHmethod = keyFile.get_string ("Wavelet", "CHromaMethod"); + if (keyFile.has_key ("Wavelet", "CHromaMethod")) { + wavelet.CHmethod = keyFile.get_string ("Wavelet", "CHromaMethod"); if (pedited) { pedited->wavelet.CHmethod = true; } } - if (keyFile.has_key ("Wavelet", "Medgreinf")) { - wavelet.Medgreinf = keyFile.get_string ("Wavelet", "Medgreinf"); + if (keyFile.has_key ("Wavelet", "Medgreinf")) { + wavelet.Medgreinf = keyFile.get_string ("Wavelet", "Medgreinf"); if (pedited) { pedited->wavelet.Medgreinf = true; } } - if (keyFile.has_key ("Wavelet", "CHSLromaMethod")) { - wavelet.CHSLmethod = keyFile.get_string ("Wavelet", "CHSLromaMethod"); + if (keyFile.has_key ("Wavelet", "CHSLromaMethod")) { + wavelet.CHSLmethod = keyFile.get_string ("Wavelet", "CHSLromaMethod"); if (pedited) { pedited->wavelet.CHSLmethod = true; } } - if (keyFile.has_key ("Wavelet", "EDMethod")) { - wavelet.EDmethod = keyFile.get_string ("Wavelet", "EDMethod"); + if (keyFile.has_key ("Wavelet", "EDMethod")) { + wavelet.EDmethod = keyFile.get_string ("Wavelet", "EDMethod"); if (pedited) { pedited->wavelet.EDmethod = true; } } - if (keyFile.has_key ("Wavelet", "NPMethod")) { - wavelet.NPmethod = keyFile.get_string ("Wavelet", "NPMethod"); + if (keyFile.has_key ("Wavelet", "NPMethod")) { + wavelet.NPmethod = keyFile.get_string ("Wavelet", "NPMethod"); if (pedited) { pedited->wavelet.NPmethod = true; } } - if (keyFile.has_key ("Wavelet", "BAMethod")) { - wavelet.BAmethod = keyFile.get_string ("Wavelet", "BAMethod"); + if (keyFile.has_key ("Wavelet", "BAMethod")) { + wavelet.BAmethod = keyFile.get_string ("Wavelet", "BAMethod"); if (pedited) { pedited->wavelet.BAmethod = true; } } - if (keyFile.has_key ("Wavelet", "TMMethod")) { - wavelet.TMmethod = keyFile.get_string ("Wavelet", "TMMethod"); + if (keyFile.has_key ("Wavelet", "TMMethod")) { + wavelet.TMmethod = keyFile.get_string ("Wavelet", "TMMethod"); if (pedited) { pedited->wavelet.TMmethod = true; } } - if (keyFile.has_key ("Wavelet", "HSMethod")) { - wavelet.HSmethod = keyFile.get_string ("Wavelet", "HSMethod"); + if (keyFile.has_key ("Wavelet", "HSMethod")) { + wavelet.HSmethod = keyFile.get_string ("Wavelet", "HSMethod"); if (pedited) { pedited->wavelet.HSmethod = true; } } - if (keyFile.has_key ("Wavelet", "DirMethod")) { - wavelet.Dirmethod = keyFile.get_string ("Wavelet", "DirMethod"); + if (keyFile.has_key ("Wavelet", "DirMethod")) { + wavelet.Dirmethod = keyFile.get_string ("Wavelet", "DirMethod"); if (pedited) { pedited->wavelet.Dirmethod = true; } } - if (keyFile.has_key ("Wavelet", "ResidualcontShadow")) { - wavelet.rescon = keyFile.get_integer ("Wavelet", "ResidualcontShadow"); + if (keyFile.has_key ("Wavelet", "ResidualcontShadow")) { + wavelet.rescon = keyFile.get_integer ("Wavelet", "ResidualcontShadow"); if (pedited) { pedited->wavelet.rescon = true; } } - if (keyFile.has_key ("Wavelet", "ResidualcontHighlight")) { - wavelet.resconH = keyFile.get_integer ("Wavelet", "ResidualcontHighlight"); + if (keyFile.has_key ("Wavelet", "ResidualcontHighlight")) { + wavelet.resconH = keyFile.get_integer ("Wavelet", "ResidualcontHighlight"); if (pedited) { pedited->wavelet.resconH = true; } } - if (keyFile.has_key ("Wavelet", "Residualchroma")) { - wavelet.reschro = keyFile.get_integer ("Wavelet", "Residualchroma"); + if (keyFile.has_key ("Wavelet", "Residualchroma")) { + wavelet.reschro = keyFile.get_integer ("Wavelet", "Residualchroma"); if (pedited) { pedited->wavelet.reschro = true; } } - if (keyFile.has_key ("Wavelet", "ResidualTM")) { - wavelet.tmrs = keyFile.get_double ("Wavelet", "ResidualTM"); + if (keyFile.has_key ("Wavelet", "ResidualTM")) { + wavelet.tmrs = keyFile.get_double ("Wavelet", "ResidualTM"); if (pedited) { pedited->wavelet.tmrs = true; } } - if (keyFile.has_key ("Wavelet", "Residualgamma")) { - wavelet.gamma = keyFile.get_double ("Wavelet", "Residualgamma"); + if (keyFile.has_key ("Wavelet", "Residualgamma")) { + wavelet.gamma = keyFile.get_double ("Wavelet", "Residualgamma"); if (pedited) { pedited->wavelet.gamma = true; } } - if (keyFile.has_key ("Wavelet", "ContExtra")) { - wavelet.sup = keyFile.get_integer ("Wavelet", "ContExtra"); + if (keyFile.has_key ("Wavelet", "ContExtra")) { + wavelet.sup = keyFile.get_integer ("Wavelet", "ContExtra"); if (pedited) { pedited->wavelet.sup = true; } } - if (keyFile.has_key ("Wavelet", "HueRangeResidual")) { - wavelet.sky = keyFile.get_double ("Wavelet", "HueRangeResidual"); + if (keyFile.has_key ("Wavelet", "HueRangeResidual")) { + wavelet.sky = keyFile.get_double ("Wavelet", "HueRangeResidual"); if (pedited) { pedited->wavelet.sky = true; } } - if (keyFile.has_key ("Wavelet", "MaxLev")) { - wavelet.thres = keyFile.get_integer ("Wavelet", "MaxLev"); + if (keyFile.has_key ("Wavelet", "MaxLev")) { + wavelet.thres = keyFile.get_integer ("Wavelet", "MaxLev"); if (pedited) { pedited->wavelet.thres = true; } } - if (keyFile.has_key ("Wavelet", "ThresholdHighLight")) { - wavelet.threshold = keyFile.get_integer ("Wavelet", "ThresholdHighLight"); + if (keyFile.has_key ("Wavelet", "ThresholdHighLight")) { + wavelet.threshold = keyFile.get_integer ("Wavelet", "ThresholdHighLight"); if (pedited) { pedited->wavelet.threshold = true; } } - if (keyFile.has_key ("Wavelet", "ThresholdShadow")) { - wavelet.threshold2 = keyFile.get_integer ("Wavelet", "ThresholdShadow"); + if (keyFile.has_key ("Wavelet", "ThresholdShadow")) { + wavelet.threshold2 = keyFile.get_integer ("Wavelet", "ThresholdShadow"); if (pedited) { pedited->wavelet.threshold2 = true; } } - if (keyFile.has_key ("Wavelet", "Edgedetect")) { - wavelet.edgedetect = keyFile.get_integer ("Wavelet", "Edgedetect"); + if (keyFile.has_key ("Wavelet", "Edgedetect")) { + wavelet.edgedetect = keyFile.get_integer ("Wavelet", "Edgedetect"); if (pedited) { pedited->wavelet.edgedetect = true; } } - if (keyFile.has_key ("Wavelet", "Edgedetectthr")) { - wavelet.edgedetectthr = keyFile.get_integer ("Wavelet", "Edgedetectthr"); + if (keyFile.has_key ("Wavelet", "Edgedetectthr")) { + wavelet.edgedetectthr = keyFile.get_integer ("Wavelet", "Edgedetectthr"); if (pedited) { pedited->wavelet.edgedetectthr = true; } } - if (keyFile.has_key ("Wavelet", "EdgedetectthrHi")) { - wavelet.edgedetectthr2 = keyFile.get_integer ("Wavelet", "EdgedetectthrHi"); + if (keyFile.has_key ("Wavelet", "EdgedetectthrHi")) { + wavelet.edgedetectthr2 = keyFile.get_integer ("Wavelet", "EdgedetectthrHi"); if (pedited) { pedited->wavelet.edgedetectthr2 = true; } } - if (keyFile.has_key ("Wavelet", "Edgesensi")) { - wavelet.edgesensi = keyFile.get_integer ("Wavelet", "Edgesensi"); + if (keyFile.has_key ("Wavelet", "Edgesensi")) { + wavelet.edgesensi = keyFile.get_integer ("Wavelet", "Edgesensi"); if (pedited) { pedited->wavelet.edgesensi = true; } } - if (keyFile.has_key ("Wavelet", "Edgeampli")) { - wavelet.edgeampli = keyFile.get_integer ("Wavelet", "Edgeampli"); + if (keyFile.has_key ("Wavelet", "Edgeampli")) { + wavelet.edgeampli = keyFile.get_integer ("Wavelet", "Edgeampli"); if (pedited) { pedited->wavelet.edgeampli = true; } } - if (keyFile.has_key ("Wavelet", "ThresholdChroma")) { - wavelet.chroma = keyFile.get_integer ("Wavelet", "ThresholdChroma"); + if (keyFile.has_key ("Wavelet", "ThresholdChroma")) { + wavelet.chroma = keyFile.get_integer ("Wavelet", "ThresholdChroma"); if (pedited) { pedited->wavelet.chroma = true; } } - if (keyFile.has_key ("Wavelet", "ChromaLink")) { - wavelet.chro = keyFile.get_integer ("Wavelet", "ChromaLink"); + if (keyFile.has_key ("Wavelet", "ChromaLink")) { + wavelet.chro = keyFile.get_integer ("Wavelet", "ChromaLink"); if (pedited) { pedited->wavelet.chro = true; } } - if (keyFile.has_key ("Wavelet", "Contrast")) { - wavelet.contrast = keyFile.get_integer ("Wavelet", "Contrast"); + if (keyFile.has_key ("Wavelet", "Contrast")) { + wavelet.contrast = keyFile.get_integer ("Wavelet", "Contrast"); if (pedited) { pedited->wavelet.contrast = true; } } - if (keyFile.has_key ("Wavelet", "Edgrad")) { - wavelet.edgrad = keyFile.get_integer ("Wavelet", "Edgrad"); + if (keyFile.has_key ("Wavelet", "Edgrad")) { + wavelet.edgrad = keyFile.get_integer ("Wavelet", "Edgrad"); if (pedited) { pedited->wavelet.edgrad = true; } } - if (keyFile.has_key ("Wavelet", "Edgval")) { - wavelet.edgval = keyFile.get_integer ("Wavelet", "Edgval"); + if (keyFile.has_key ("Wavelet", "Edgval")) { + wavelet.edgval = keyFile.get_integer ("Wavelet", "Edgval"); if (pedited) { pedited->wavelet.edgval = true; } } - if (keyFile.has_key ("Wavelet", "ThrEdg")) { - wavelet.edgthresh = keyFile.get_integer ("Wavelet", "ThrEdg"); + if (keyFile.has_key ("Wavelet", "ThrEdg")) { + wavelet.edgthresh = keyFile.get_integer ("Wavelet", "ThrEdg"); if (pedited) { pedited->wavelet.edgthresh = true; } } - if (keyFile.has_key ("Wavelet", "ThresholdResidShadow")) { - wavelet.thr = keyFile.get_integer ("Wavelet", "ThresholdResidShadow"); + if (keyFile.has_key ("Wavelet", "ThresholdResidShadow")) { + wavelet.thr = keyFile.get_integer ("Wavelet", "ThresholdResidShadow"); if (pedited) { pedited->wavelet.thr = true; } } - if (keyFile.has_key ("Wavelet", "ThresholdResidHighLight")) { - wavelet.thrH = keyFile.get_integer ("Wavelet", "ThresholdResidHighLight"); + if (keyFile.has_key ("Wavelet", "ThresholdResidHighLight")) { + wavelet.thrH = keyFile.get_integer ("Wavelet", "ThresholdResidHighLight"); if (pedited) { pedited->wavelet.thrH = true; @@ -6466,143 +6807,178 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) if (keyFile.has_key ("Wavelet", "ContrastCurve")) { wavelet.ccwcurve = keyFile.get_double_list ("Wavelet", "ContrastCurve"); + avoidEmptyCurve (wavelet.ccwcurve); if (pedited) { pedited->wavelet.ccwcurve = true; } } - if (keyFile.has_key ("Wavelet", "OpacityCurveRG")) { + if (keyFile.has_key ("Wavelet", "OpacityCurveRG")) { wavelet.opacityCurveRG = keyFile.get_double_list ("Wavelet", "OpacityCurveRG"); + avoidEmptyCurve (wavelet.opacityCurveRG); if (pedited) { pedited->wavelet.opacityCurveRG = true; } } - if (keyFile.has_key ("Wavelet", "OpacityCurveBY")) { + if (keyFile.has_key ("Wavelet", "OpacityCurveBY")) { wavelet.opacityCurveBY = keyFile.get_double_list ("Wavelet", "OpacityCurveBY"); + avoidEmptyCurve (wavelet.opacityCurveBY); if (pedited) { pedited->wavelet.opacityCurveBY = true; } } - if (keyFile.has_key ("Wavelet", "OpacityCurveW")) { + if (keyFile.has_key ("Wavelet", "OpacityCurveW")) { wavelet.opacityCurveW = keyFile.get_double_list ("Wavelet", "OpacityCurveW"); + avoidEmptyCurve (wavelet.opacityCurveW); if (pedited) { pedited->wavelet.opacityCurveW = true; } } - if (keyFile.has_key ("Wavelet", "OpacityCurveWL")) { + if (keyFile.has_key ("Wavelet", "OpacityCurveWL")) { wavelet.opacityCurveWL = keyFile.get_double_list ("Wavelet", "OpacityCurveWL"); + avoidEmptyCurve (wavelet.opacityCurveWL); if (pedited) { pedited->wavelet.opacityCurveWL = true; } } - if (keyFile.has_key ("Wavelet", "HHcurve")) { + if (keyFile.has_key ("Wavelet", "HHcurve")) { wavelet.hhcurve = keyFile.get_double_list ("Wavelet", "HHcurve"); + avoidEmptyCurve (wavelet.hhcurve); if (pedited) { pedited->wavelet.hhcurve = true; } } - if (keyFile.has_key ("Wavelet", "CHcurve")) { + if (keyFile.has_key ("Wavelet", "CHcurve")) { wavelet.Chcurve = keyFile.get_double_list ("Wavelet", "CHcurve"); + avoidEmptyCurve (wavelet.Chcurve); if (pedited) { pedited->wavelet.Chcurve = true; } } - if (keyFile.has_key ("Wavelet", "WavclCurve")) { + if (keyFile.has_key ("Wavelet", "WavclCurve")) { wavelet.wavclCurve = keyFile.get_double_list ("Wavelet", "WavclCurve"); + avoidEmptyCurve (wavelet.wavclCurve); if (pedited) { pedited->wavelet.wavclCurve = true; } } - if (keyFile.has_key ("Wavelet", "Hueskin")) { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("Wavelet", "Hueskin"); - wavelet.hueskin.setValues(thresh.data()[0], thresh.data()[1], min(thresh.data()[2], 300), min(thresh.data()[3], 300)); + if (keyFile.has_key ("Wavelet", "Hueskin")) { + const std::vector thresh = keyFile.get_integer_list ("Wavelet", "Hueskin"); + + if (thresh.size() >= 4) { + wavelet.hueskin.setValues (thresh[0], thresh[1], min (thresh[2], 300), min (thresh[3], 300)); + } if (pedited) { pedited->wavelet.hueskin = true; } } - if (keyFile.has_key ("Wavelet", "HueRange")) { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("Wavelet", "HueRange"); - wavelet.hueskin2.setValues(thresh.data()[0], thresh.data()[1], min(thresh.data()[2], 300), min(thresh.data()[3], 300)); + if (keyFile.has_key ("Wavelet", "HueRange")) { + const std::vector thresh = keyFile.get_integer_list ("Wavelet", "HueRange"); + + if (thresh.size() >= 4) { + wavelet.hueskin2.setValues (thresh[0], thresh[1], min (thresh[2], 300), min (thresh[3], 300)); + } if (pedited) { pedited->wavelet.hueskin2 = true; } } - if (keyFile.has_key ("Wavelet", "HLRange")) { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("Wavelet", "HLRange"); - wavelet.hllev.setValues(thresh.data()[0], thresh.data()[1], min(thresh.data()[2], 300), min(thresh.data()[3], 300)); + if (keyFile.has_key ("Wavelet", "HLRange")) { + const std::vector thresh = keyFile.get_integer_list ("Wavelet", "HLRange"); + + if (thresh.size() >= 4) { + wavelet.hllev.setValues (thresh[0], thresh[1], min (thresh[2], 300), min (thresh[3], 300)); + } if (pedited) { pedited->wavelet.hllev = true; } } - if (keyFile.has_key ("Wavelet", "SHRange")) { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("Wavelet", "SHRange"); - wavelet.bllev.setValues(thresh.data()[0], thresh.data()[1], min(thresh.data()[2], 300), min(thresh.data()[3], 300)); + if (keyFile.has_key ("Wavelet", "SHRange")) { + const std::vector thresh = keyFile.get_integer_list ("Wavelet", "SHRange"); + + if (thresh.size() >= 4) { + wavelet.bllev.setValues (thresh[0], thresh[1], min (thresh[2], 300), min (thresh[3], 300)); + } if (pedited) { pedited->wavelet.bllev = true; } } - if (keyFile.has_key ("Wavelet", "Edgcont")) { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("Wavelet", "Edgcont"); - wavelet.edgcont.setValues(thresh.data()[0], thresh.data()[1], min(thresh.data()[2], 300), min(thresh.data()[3], 300)); + if (keyFile.has_key ("Wavelet", "Edgcont")) { + const std::vector thresh = keyFile.get_integer_list ("Wavelet", "Edgcont"); + + if (thresh.size() >= 4) { + wavelet.edgcont.setValues (thresh[0], thresh[1], min (thresh[2], 300), min (thresh[3], 300)); + } if (pedited) { pedited->wavelet.edgcont = true; } } - if (keyFile.has_key ("Wavelet", "Level0noise")) { - Glib::ArrayHandle thresh = keyFile.get_double_list ("Wavelet", "Level0noise"); - wavelet.level0noise.setValues(thresh.data()[0], thresh.data()[1]); + if (keyFile.has_key ("Wavelet", "Level0noise")) { + const std::vector thresh = keyFile.get_double_list ("Wavelet", "Level0noise"); + + if (thresh.size() >= 2) { + wavelet.level0noise.setValues (thresh[0], thresh[1]); + } if (pedited) { pedited->wavelet.level0noise = true; } } - if (keyFile.has_key ("Wavelet", "Level1noise")) { - Glib::ArrayHandle thresh = keyFile.get_double_list ("Wavelet", "Level1noise"); - wavelet.level1noise.setValues(thresh.data()[0], thresh.data()[1]); + if (keyFile.has_key ("Wavelet", "Level1noise")) { + const std::vector thresh = keyFile.get_double_list ("Wavelet", "Level1noise"); + + if (thresh.size() >= 2) { + wavelet.level1noise.setValues (thresh[0], thresh[1]); + } if (pedited) { pedited->wavelet.level1noise = true; } } - if (keyFile.has_key ("Wavelet", "Level2noise")) { - Glib::ArrayHandle thresh = keyFile.get_double_list ("Wavelet", "Level2noise"); - wavelet.level2noise.setValues(thresh.data()[0], thresh.data()[1]); + if (keyFile.has_key ("Wavelet", "Level2noise")) { + const std::vector thresh = keyFile.get_double_list ("Wavelet", "Level2noise"); + + if (thresh.size() >= 2) { + wavelet.level2noise.setValues (thresh[0], thresh[1]); + } if (pedited) { pedited->wavelet.level2noise = true; } } - if (keyFile.has_key ("Wavelet", "Level3noise")) { - Glib::ArrayHandle thresh = keyFile.get_double_list ("Wavelet", "Level3noise"); - wavelet.level3noise.setValues(thresh.data()[0], thresh.data()[1]); + if (keyFile.has_key ("Wavelet", "Level3noise")) { + const std::vector thresh = keyFile.get_double_list ("Wavelet", "Level3noise"); + + if (thresh.size() >= 2) { + wavelet.level3noise.setValues (thresh[0], thresh[1]); + } if (pedited) { pedited->wavelet.level3noise = true; @@ -6610,18 +6986,24 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } - if (keyFile.has_key ("Wavelet", "Pastlev")) { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("Wavelet", "Pastlev"); - wavelet.pastlev.setValues(thresh.data()[0], thresh.data()[1], min(thresh.data()[2], 300), min(thresh.data()[3], 300)); + if (keyFile.has_key ("Wavelet", "Pastlev")) { + const std::vector thresh = keyFile.get_integer_list ("Wavelet", "Pastlev"); + + if (thresh.size() >= 4) { + wavelet.pastlev.setValues (thresh[0], thresh[1], min (thresh[2], 300), min (thresh[3], 300)); + } if (pedited) { pedited->wavelet.pastlev = true; } } - if (keyFile.has_key ("Wavelet", "Satlev")) { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("Wavelet", "Satlev"); - wavelet.satlev.setValues(thresh.data()[0], thresh.data()[1], min(thresh.data()[2], 300), min(thresh.data()[3], 300)); + if (keyFile.has_key ("Wavelet", "Satlev")) { + const std::vector thresh = keyFile.get_integer_list ("Wavelet", "Satlev"); + + if (thresh.size() >= 4) { + wavelet.satlev.setValues (thresh[0], thresh[1], min (thresh[2], 300), min (thresh[3], 300)); + } if (pedited) { pedited->wavelet.satlev = true; @@ -6629,7 +7011,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } - if(keyFile.has_key ("Wavelet", "Skinprotect")) { + if (keyFile.has_key ("Wavelet", "Skinprotect")) { wavelet.skinprotect = keyFile.get_double ("Wavelet", "Skinprotect"); if (pedited) { @@ -6653,28 +7035,28 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - for(int i = 0; i < 9; i ++) { + for (int i = 0; i < 9; i ++) { std::stringstream ss; ss << "Contrast" << (i + 1); - if(keyFile.has_key ("Wavelet", ss.str())) { + if (keyFile.has_key ("Wavelet", ss.str())) { wavelet.c[i] = keyFile.get_integer ("Wavelet", ss.str()); if (pedited) { - pedited->wavelet.c[i] = true; + pedited->wavelet.c[i] = true; } } } - for(int i = 0; i < 9; i ++) { + for (int i = 0; i < 9; i ++) { std::stringstream ss; ss << "Chroma" << (i + 1); - if(keyFile.has_key ("Wavelet", ss.str())) { + if (keyFile.has_key ("Wavelet", ss.str())) { wavelet.ch[i] = keyFile.get_integer ("Wavelet", ss.str()); if (pedited) { - pedited->wavelet.ch[i] = true; + pedited->wavelet.ch[i] = true; } } } @@ -6722,9 +7104,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } - // load directional pyramid equalizer parameters +// load directional pyramid equalizer parameters if (keyFile.has_group ("Directional Pyramid Equalizer")) { - if (keyFile.has_key ("Directional Pyramid Equalizer", "Enabled")) { + if (keyFile.has_key ("Directional Pyramid Equalizer", "Enabled")) { dirpyrequalizer.enabled = keyFile.get_boolean ("Directional Pyramid Equalizer", "Enabled"); if (pedited) { @@ -6732,7 +7114,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("Directional Pyramid Equalizer", "Gamutlab")) { + if (keyFile.has_key ("Directional Pyramid Equalizer", "Gamutlab")) { dirpyrequalizer.gamutlab = keyFile.get_boolean ("Directional Pyramid Equalizer", "Gamutlab"); if (pedited) { @@ -6741,8 +7123,8 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } - if (keyFile.has_key ("Directional Pyramid Equalizer", "cbdlMethod")) { - dirpyrequalizer.cbdlMethod = keyFile.get_string ("Directional Pyramid Equalizer", "cbdlMethod"); + if (keyFile.has_key ("Directional Pyramid Equalizer", "cbdlMethod")) { + dirpyrequalizer.cbdlMethod = keyFile.get_string ("Directional Pyramid Equalizer", "cbdlMethod"); if (pedited) { pedited->dirpyrequalizer.cbdlMethod = true; @@ -6750,10 +7132,13 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } -// if (keyFile.has_key ("Directional Pyramid Equalizer", "Algorithm")) { dirpyrequalizer.algo = keyFile.get_string ("Directional Pyramid Equalizer", "Algorithm"); if (pedited) pedited->dirpyrequalizer.algo = true; } - if (keyFile.has_key ("Directional Pyramid Equalizer", "Hueskin")) { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("Directional Pyramid Equalizer", "Hueskin"); - dirpyrequalizer.hueskin.setValues(thresh.data()[0], thresh.data()[1], min(thresh.data()[2], 300), min(thresh.data()[3], 300)); +// if (keyFile.has_key ("Directional Pyramid Equalizer", "Algorithm")) { dirpyrequalizer.algo = keyFile.get_string ("Directional Pyramid Equalizer", "Algorithm"); if (pedited) pedited->dirpyrequalizer.algo = true; } + if (keyFile.has_key ("Directional Pyramid Equalizer", "Hueskin")) { + const std::vector thresh = keyFile.get_integer_list ("Directional Pyramid Equalizer", "Hueskin"); + + if (thresh.size() >= 4) { + dirpyrequalizer.hueskin.setValues (thresh[0], thresh[1], min (thresh[2], 300), min (thresh[3], 300)); + } if (pedited) { pedited->dirpyrequalizer.hueskin = true; @@ -6761,22 +7146,22 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (ppVersion < 316) { - for(int i = 0; i < 5; i ++) { + for (int i = 0; i < 5; i ++) { std::stringstream ss; ss << "Mult" << i; - if(keyFile.has_key ("Directional Pyramid Equalizer", ss.str())) { - if(i == 4) { + if (keyFile.has_key ("Directional Pyramid Equalizer", ss.str())) { + if (i == 4) { dirpyrequalizer.threshold = keyFile.get_double ("Directional Pyramid Equalizer", ss.str()); if (pedited) { pedited->dirpyrequalizer.threshold = true; } - } else { - dirpyrequalizer.mult[i] = keyFile.get_double ("Directional Pyramid Equalizer", ss.str()); + } else { + dirpyrequalizer.mult[i] = keyFile.get_double ("Directional Pyramid Equalizer", ss.str()); if (pedited) { - pedited->dirpyrequalizer.mult[i] = true; + pedited->dirpyrequalizer.mult[i] = true; } } } @@ -6784,21 +7169,21 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) dirpyrequalizer.mult[4] = 1.0; } else { - // 5 level wavelet + dedicated threshold parameter - for(int i = 0; i < 6; i ++) { +// 5 level wavelet + dedicated threshold parameter + for (int i = 0; i < 6; i ++) { std::stringstream ss; ss << "Mult" << i; - if(keyFile.has_key ("Directional Pyramid Equalizer", ss.str())) { - dirpyrequalizer.mult[i] = keyFile.get_double ("Directional Pyramid Equalizer", ss.str()); + if (keyFile.has_key ("Directional Pyramid Equalizer", ss.str())) { + dirpyrequalizer.mult[i] = keyFile.get_double ("Directional Pyramid Equalizer", ss.str()); if (pedited) { - pedited->dirpyrequalizer.mult[i] = true; + pedited->dirpyrequalizer.mult[i] = true; } } } - if(keyFile.has_key ("Directional Pyramid Equalizer", "Threshold")) { + if (keyFile.has_key ("Directional Pyramid Equalizer", "Threshold")) { dirpyrequalizer.threshold = keyFile.get_double ("Directional Pyramid Equalizer", "Threshold"); if (pedited) { @@ -6806,7 +7191,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if(keyFile.has_key ("Directional Pyramid Equalizer", "Skinprotect")) { + if (keyFile.has_key ("Directional Pyramid Equalizer", "Skinprotect")) { dirpyrequalizer.skinprotect = keyFile.get_double ("Directional Pyramid Equalizer", "Skinprotect"); if (pedited) { @@ -6816,29 +7201,29 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load CLUT parameters - if ( keyFile.has_group( "Film Simulation" ) ) { - if ( keyFile.has_key( "Film Simulation", "Enabled" ) ) { - filmSimulation.enabled = keyFile.get_boolean( "Film Simulation", "Enabled" ); +// load CLUT parameters + if ( keyFile.has_group ( "Film Simulation" ) ) { + if ( keyFile.has_key ( "Film Simulation", "Enabled" ) ) { + filmSimulation.enabled = keyFile.get_boolean ( "Film Simulation", "Enabled" ); if ( pedited ) { pedited->filmSimulation.enabled = true; } } - if ( keyFile.has_key( "Film Simulation", "ClutFilename" ) ) { - filmSimulation.clutFilename = keyFile.get_string( "Film Simulation", "ClutFilename" ); + if ( keyFile.has_key ( "Film Simulation", "ClutFilename" ) ) { + filmSimulation.clutFilename = keyFile.get_string ( "Film Simulation", "ClutFilename" ); if ( pedited ) { pedited->filmSimulation.clutFilename = true; } } - if ( keyFile.has_key( "Film Simulation", "Strength" ) ) { + if ( keyFile.has_key ( "Film Simulation", "Strength" ) ) { if (ppVersion < 321) { - filmSimulation.strength = int(keyFile.get_double( "Film Simulation", "Strength" ) * 100 + 0.1); + filmSimulation.strength = int (keyFile.get_double ( "Film Simulation", "Strength" ) * 100 + 0.1); } else { - filmSimulation.strength = keyFile.get_integer( "Film Simulation", "Strength" ); + filmSimulation.strength = keyFile.get_integer ( "Film Simulation", "Strength" ); } if ( pedited ) { @@ -6847,11 +7232,12 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load HSV wavelet parameters +// load HSV wavelet parameters if (keyFile.has_group ("HSV Equalizer")) { if (ppVersion >= 300) { if (keyFile.has_key ("HSV Equalizer", "HCurve")) { hsvequalizer.hcurve = keyFile.get_double_list ("HSV Equalizer", "HCurve"); + avoidEmptyCurve (hsvequalizer.hcurve); if (pedited) { pedited->hsvequalizer.hcurve = true; @@ -6860,6 +7246,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) if (keyFile.has_key ("HSV Equalizer", "SCurve")) { hsvequalizer.scurve = keyFile.get_double_list ("HSV Equalizer", "SCurve"); + avoidEmptyCurve (hsvequalizer.scurve); if (pedited) { pedited->hsvequalizer.scurve = true; @@ -6868,6 +7255,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) if (keyFile.has_key ("HSV Equalizer", "VCurve")) { hsvequalizer.vcurve = keyFile.get_double_list ("HSV Equalizer", "VCurve"); + avoidEmptyCurve (hsvequalizer.vcurve); if (pedited) { pedited->hsvequalizer.vcurve = true; @@ -6876,9 +7264,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load RGB curves +// load RGB curves if (keyFile.has_group ("RGB Curves")) { - if (keyFile.has_key ("RGB Curves", "LumaMode")) { + if (keyFile.has_key ("RGB Curves", "LumaMode")) { rgbCurves.lumamode = keyFile.get_boolean ("RGB Curves", "LumaMode"); if (pedited) { @@ -6888,6 +7276,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) if (keyFile.has_key ("RGB Curves", "rCurve")) { rgbCurves.rcurve = keyFile.get_double_list ("RGB Curves", "rCurve"); + avoidEmptyCurve (rgbCurves.rcurve); if (pedited) { pedited->rgbCurves.rcurve = true; @@ -6896,6 +7285,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) if (keyFile.has_key ("RGB Curves", "gCurve")) { rgbCurves.gcurve = keyFile.get_double_list ("RGB Curves", "gCurve"); + avoidEmptyCurve (rgbCurves.gcurve); if (pedited) { pedited->rgbCurves.gcurve = true; @@ -6903,7 +7293,8 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("RGB Curves", "bCurve")) { - rgbCurves.bcurve = keyFile.get_double_list ("RGB Curves", "bCurve"); + rgbCurves.bcurve = keyFile.get_double_list ("RGB Curves", "bCurve"); + avoidEmptyCurve (rgbCurves.bcurve); if (pedited) { pedited->rgbCurves.bcurve = true; @@ -6911,9 +7302,9 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load Color Toning +// load Color Toning if (keyFile.has_group ("ColorToning")) { - if (keyFile.has_key ("ColorToning", "Enabled")) { + if (keyFile.has_key ("ColorToning", "Enabled")) { colorToning.enabled = keyFile.get_boolean ("ColorToning", "Enabled"); if (pedited) { @@ -6921,7 +7312,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Method")) { + if (keyFile.has_key ("ColorToning", "Method")) { colorToning.method = keyFile.get_string ("ColorToning", "Method"); if (pedited) { @@ -6929,7 +7320,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Lumamode")) { + if (keyFile.has_key ("ColorToning", "Lumamode")) { colorToning.lumamode = keyFile.get_boolean ("ColorToning", "Lumamode"); if (pedited) { @@ -6937,7 +7328,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Twocolor")) { + if (keyFile.has_key ("ColorToning", "Twocolor")) { colorToning.twocolor = keyFile.get_string ("ColorToning", "Twocolor"); if (pedited) { @@ -6945,23 +7336,25 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "OpacityCurve")) { + if (keyFile.has_key ("ColorToning", "OpacityCurve")) { colorToning.opacityCurve = keyFile.get_double_list ("ColorToning", "OpacityCurve"); + avoidEmptyCurve (colorToning.opacityCurve); if (pedited) { pedited->colorToning.opacityCurve = true; } } - if (keyFile.has_key ("ColorToning", "ColorCurve")) { + if (keyFile.has_key ("ColorToning", "ColorCurve")) { colorToning.colorCurve = keyFile.get_double_list ("ColorToning", "ColorCurve"); + avoidEmptyCurve (colorToning.colorCurve); if (pedited) { pedited->colorToning.colorCurve = true; } } - if (keyFile.has_key ("ColorToning", "Autosat")) { + if (keyFile.has_key ("ColorToning", "Autosat")) { colorToning.autosat = keyFile.get_boolean ("ColorToning", "Autosat"); if (pedited) { @@ -6969,7 +7362,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "SatProtectionThreshold")) { + if (keyFile.has_key ("ColorToning", "SatProtectionThreshold")) { colorToning.satProtectionThreshold = keyFile.get_integer ("ColorToning", "SatProtectionThreshold"); if (pedited) { @@ -6977,7 +7370,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "SaturatedOpacity")) { + if (keyFile.has_key ("ColorToning", "SaturatedOpacity")) { colorToning.saturatedOpacity = keyFile.get_integer ("ColorToning", "SaturatedOpacity"); if (pedited) { @@ -6985,7 +7378,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Strength")) { + if (keyFile.has_key ("ColorToning", "Strength")) { colorToning.strength = keyFile.get_integer ("ColorToning", "Strength"); if (pedited) { @@ -6994,8 +7387,11 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("ColorToning", "HighlightsColorSaturation")) { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("ColorToning", "HighlightsColorSaturation"); - colorToning.hlColSat.setValues(thresh.data()[0], thresh.data()[1]); + const std::vector thresh = keyFile.get_integer_list ("ColorToning", "HighlightsColorSaturation"); + + if (thresh.size() >= 2) { + colorToning.hlColSat.setValues (thresh[0], thresh[1]); + } if (pedited) { pedited->colorToning.hlColSat = true; @@ -7003,31 +7399,36 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("ColorToning", "ShadowsColorSaturation")) { - Glib::ArrayHandle thresh = keyFile.get_integer_list ("ColorToning", "ShadowsColorSaturation"); - colorToning.shadowsColSat.setValues(thresh.data()[0], thresh.data()[1]); + const std::vector thresh = keyFile.get_integer_list ("ColorToning", "ShadowsColorSaturation"); + + if (thresh.size() >= 2) { + colorToning.shadowsColSat.setValues (thresh[0], thresh[1]); + } if (pedited) { pedited->colorToning.shadowsColSat = true; } } - if (keyFile.has_key ("ColorToning", "ClCurve")) { + if (keyFile.has_key ("ColorToning", "ClCurve")) { colorToning.clcurve = keyFile.get_double_list ("ColorToning", "ClCurve"); + avoidEmptyCurve (colorToning.clcurve); if (pedited) { pedited->colorToning.clcurve = true; } } - if (keyFile.has_key ("ColorToning", "Cl2Curve")) { + if (keyFile.has_key ("ColorToning", "Cl2Curve")) { colorToning.cl2curve = keyFile.get_double_list ("ColorToning", "Cl2Curve"); + avoidEmptyCurve (colorToning.cl2curve); if (pedited) { pedited->colorToning.cl2curve = true; } } - if (keyFile.has_key ("ColorToning", "Redlow")) { + if (keyFile.has_key ("ColorToning", "Redlow")) { colorToning.redlow = keyFile.get_double ("ColorToning", "Redlow"); if (pedited) { @@ -7035,7 +7436,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Greenlow")) { + if (keyFile.has_key ("ColorToning", "Greenlow")) { colorToning.greenlow = keyFile.get_double ("ColorToning", "Greenlow"); if (pedited) { @@ -7043,7 +7444,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Bluelow")) { + if (keyFile.has_key ("ColorToning", "Bluelow")) { colorToning.bluelow = keyFile.get_double ("ColorToning", "Bluelow"); if (pedited) { @@ -7051,7 +7452,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Satlow")) { + if (keyFile.has_key ("ColorToning", "Satlow")) { colorToning.satlow = keyFile.get_double ("ColorToning", "Satlow"); if (pedited) { @@ -7059,7 +7460,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Balance")) { + if (keyFile.has_key ("ColorToning", "Balance")) { colorToning.balance = keyFile.get_integer ("ColorToning", "Balance"); if (pedited) { @@ -7067,7 +7468,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Sathigh")) { + if (keyFile.has_key ("ColorToning", "Sathigh")) { colorToning.sathigh = keyFile.get_double ("ColorToning", "Sathigh"); if (pedited) { @@ -7075,7 +7476,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Redmed")) { + if (keyFile.has_key ("ColorToning", "Redmed")) { colorToning.redmed = keyFile.get_double ("ColorToning", "Redmed"); if (pedited) { @@ -7083,7 +7484,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Greenmed")) { + if (keyFile.has_key ("ColorToning", "Greenmed")) { colorToning.greenmed = keyFile.get_double ("ColorToning", "Greenmed"); if (pedited) { @@ -7091,7 +7492,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Bluemed")) { + if (keyFile.has_key ("ColorToning", "Bluemed")) { colorToning.bluemed = keyFile.get_double ("ColorToning", "Bluemed"); if (pedited) { @@ -7099,7 +7500,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Redhigh")) { + if (keyFile.has_key ("ColorToning", "Redhigh")) { colorToning.redhigh = keyFile.get_double ("ColorToning", "Redhigh"); if (pedited) { @@ -7107,7 +7508,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Greenhigh")) { + if (keyFile.has_key ("ColorToning", "Greenhigh")) { colorToning.greenhigh = keyFile.get_double ("ColorToning", "Greenhigh"); if (pedited) { @@ -7115,7 +7516,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("ColorToning", "Bluehigh")) { + if (keyFile.has_key ("ColorToning", "Bluehigh")) { colorToning.bluehigh = keyFile.get_double ("ColorToning", "Bluehigh"); if (pedited) { @@ -7124,17 +7525,17 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // load raw settings +// load raw settings if (keyFile.has_group ("RAW")) { - if (keyFile.has_key ("RAW", "DarkFrame")) { - raw.dark_frame = expandRelativePath(fname, "", keyFile.get_string ("RAW", "DarkFrame" )); + if (keyFile.has_key ("RAW", "DarkFrame")) { + raw.dark_frame = expandRelativePath (fname, "", keyFile.get_string ("RAW", "DarkFrame" )); if (pedited) { pedited->raw.darkFrame = true; } } - if (keyFile.has_key ("RAW", "DarkFrameAuto")) { + if (keyFile.has_key ("RAW", "DarkFrameAuto")) { raw.df_autoselect = keyFile.get_boolean ("RAW", "DarkFrameAuto" ); if (pedited) { @@ -7142,32 +7543,32 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("RAW", "FlatFieldFile")) { - raw.ff_file = expandRelativePath(fname, "", keyFile.get_string ("RAW", "FlatFieldFile" )); + if (keyFile.has_key ("RAW", "FlatFieldFile")) { + raw.ff_file = expandRelativePath (fname, "", keyFile.get_string ("RAW", "FlatFieldFile" )); if (pedited) { pedited->raw.ff_file = true; } } - if (keyFile.has_key ("RAW", "FlatFieldAutoSelect")) { - raw.ff_AutoSelect = keyFile.get_boolean ("RAW", "FlatFieldAutoSelect" ); + if (keyFile.has_key ("RAW", "FlatFieldAutoSelect")) { + raw.ff_AutoSelect = keyFile.get_boolean ("RAW", "FlatFieldAutoSelect" ); if (pedited) { pedited->raw.ff_AutoSelect = true; } } - if (keyFile.has_key ("RAW", "FlatFieldBlurRadius")) { - raw.ff_BlurRadius = keyFile.get_integer ("RAW", "FlatFieldBlurRadius" ); + if (keyFile.has_key ("RAW", "FlatFieldBlurRadius")) { + raw.ff_BlurRadius = keyFile.get_integer ("RAW", "FlatFieldBlurRadius" ); if (pedited) { pedited->raw.ff_BlurRadius = true; } } - if (keyFile.has_key ("RAW", "FlatFieldBlurType")) { - raw.ff_BlurType = keyFile.get_string ("RAW", "FlatFieldBlurType" ); + if (keyFile.has_key ("RAW", "FlatFieldBlurType")) { + raw.ff_BlurType = keyFile.get_string ("RAW", "FlatFieldBlurType" ); if (pedited) { pedited->raw.ff_BlurType = true; @@ -7175,22 +7576,22 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (keyFile.has_key ("RAW", "FlatFieldAutoClipControl")) { - raw.ff_AutoClipControl = keyFile.get_boolean ("RAW", "FlatFieldAutoClipControl" ); + raw.ff_AutoClipControl = keyFile.get_boolean ("RAW", "FlatFieldAutoClipControl" ); if (pedited) { pedited->raw.ff_AutoClipControl = true; } } - if (keyFile.has_key ("RAW", "FlatFieldClipControl")) { - raw.ff_clipControl = keyFile.get_boolean ("RAW", "FlatFieldClipControl" ); + if (keyFile.has_key ("RAW", "FlatFieldClipControl")) { + raw.ff_clipControl = keyFile.get_boolean ("RAW", "FlatFieldClipControl" ); if (pedited) { pedited->raw.ff_clipControl = true; } } - if (keyFile.has_key ("RAW", "CA")) { + if (keyFile.has_key ("RAW", "CA")) { raw.ca_autocorrect = keyFile.get_boolean ("RAW", "CA" ); if (pedited) { @@ -7198,15 +7599,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("RAW", "CAAutoStrength")) { - raw.caautostrength = keyFile.get_double ("RAW", "CAAutoStrength" ); - - if (pedited) { - pedited->raw.caAutoStrength = true; - } - } - - if (keyFile.has_key ("RAW", "CARed")) { + if (keyFile.has_key ("RAW", "CARed")) { raw.cared = keyFile.get_double ("RAW", "CARed" ); if (pedited) { @@ -7214,7 +7607,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("RAW", "CABlue")) { + if (keyFile.has_key ("RAW", "CABlue")) { raw.cablue = keyFile.get_double ("RAW", "CABlue" ); if (pedited) { @@ -7222,8 +7615,8 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - // for compatibility to elder pp3 versions - if (keyFile.has_key ("RAW", "HotDeadPixels")) { +// for compatibility to elder pp3 versions + if (keyFile.has_key ("RAW", "HotDeadPixels")) { raw.deadPixelFilter = raw.hotPixelFilter = keyFile.get_boolean ("RAW", "HotDeadPixels" ); if (pedited) { @@ -7231,7 +7624,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("RAW", "HotPixelFilter")) { + if (keyFile.has_key ("RAW", "HotPixelFilter")) { raw.hotPixelFilter = keyFile.get_boolean ("RAW", "HotPixelFilter" ); if (pedited) { @@ -7239,7 +7632,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("RAW", "DeadPixelFilter")) { + if (keyFile.has_key ("RAW", "DeadPixelFilter")) { raw.deadPixelFilter = keyFile.get_boolean ("RAW", "DeadPixelFilter" ); if (pedited) { @@ -7247,7 +7640,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("RAW", "HotDeadPixelThresh")) { + if (keyFile.has_key ("RAW", "HotDeadPixelThresh")) { raw.hotdeadpix_thresh = keyFile.get_integer ("RAW", "HotDeadPixelThresh" ); if (pedited) { @@ -7255,16 +7648,16 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("RAW", "PreExposure")) { - raw.expos = keyFile.get_double("RAW", "PreExposure"); + if (keyFile.has_key ("RAW", "PreExposure")) { + raw.expos = keyFile.get_double ("RAW", "PreExposure"); if (pedited) { pedited->raw.exPos = true; } } - if (keyFile.has_key ("RAW", "PrePreserv")) { - raw.preser = keyFile.get_double("RAW", "PrePreserv"); + if (keyFile.has_key ("RAW", "PrePreserv")) { + raw.preser = keyFile.get_double ("RAW", "PrePreserv"); if (pedited) { pedited->raw.exPreser = true; @@ -7272,7 +7665,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } if (ppVersion < 320) { - if (keyFile.has_key ("RAW", "Method")) { + if (keyFile.has_key ("RAW", "Method")) { raw.bayersensor.method = keyFile.get_string ("RAW", "Method"); if (pedited) { @@ -7280,15 +7673,15 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("RAW", "CcSteps")) { - raw.bayersensor.ccSteps = keyFile.get_integer ("RAW", "CcSteps"); + if (keyFile.has_key ("RAW", "CcSteps")) { + raw.bayersensor.ccSteps = keyFile.get_integer ("RAW", "CcSteps"); if (pedited) { pedited->raw.bayersensor.ccSteps = true; } } - if (keyFile.has_key ("RAW", "LineDenoise")) { + if (keyFile.has_key ("RAW", "LineDenoise")) { raw.bayersensor.linenoise = keyFile.get_integer ("RAW", "LineDenoise" ); if (pedited) { @@ -7304,77 +7697,77 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("RAW", "DCBIterations")) { - raw.bayersensor.dcb_iterations = keyFile.get_integer("RAW", "DCBIterations"); + if (keyFile.has_key ("RAW", "DCBIterations")) { + raw.bayersensor.dcb_iterations = keyFile.get_integer ("RAW", "DCBIterations"); if (pedited) { pedited->raw.bayersensor.dcbIterations = true; } } - if (keyFile.has_key ("RAW", "DCBEnhance")) { - raw.bayersensor.dcb_enhance = keyFile.get_boolean("RAW", "DCBEnhance"); + if (keyFile.has_key ("RAW", "DCBEnhance")) { + raw.bayersensor.dcb_enhance = keyFile.get_boolean ("RAW", "DCBEnhance"); if (pedited) { pedited->raw.bayersensor.dcbEnhance = true; } } - if (keyFile.has_key ("RAW", "LMMSEIterations")) { - raw.bayersensor.lmmse_iterations = keyFile.get_integer("RAW", "LMMSEIterations"); + if (keyFile.has_key ("RAW", "LMMSEIterations")) { + raw.bayersensor.lmmse_iterations = keyFile.get_integer ("RAW", "LMMSEIterations"); if (pedited) { pedited->raw.bayersensor.lmmseIterations = true; } } - if (keyFile.has_key ("RAW", "PreBlackzero")) { - raw.bayersensor.black0 = keyFile.get_double("RAW", "PreBlackzero"); + if (keyFile.has_key ("RAW", "PreBlackzero")) { + raw.bayersensor.black0 = keyFile.get_double ("RAW", "PreBlackzero"); if (pedited) { pedited->raw.bayersensor.exBlack0 = true; } } - if (keyFile.has_key ("RAW", "PreBlackone")) { - raw.bayersensor.black1 = keyFile.get_double("RAW", "PreBlackone"); + if (keyFile.has_key ("RAW", "PreBlackone")) { + raw.bayersensor.black1 = keyFile.get_double ("RAW", "PreBlackone"); if (pedited) { pedited->raw.bayersensor.exBlack1 = true; } } - if (keyFile.has_key ("RAW", "PreBlacktwo")) { - raw.bayersensor.black2 = keyFile.get_double("RAW", "PreBlacktwo"); + if (keyFile.has_key ("RAW", "PreBlacktwo")) { + raw.bayersensor.black2 = keyFile.get_double ("RAW", "PreBlacktwo"); if (pedited) { pedited->raw.bayersensor.exBlack2 = true; } } - if (keyFile.has_key ("RAW", "PreBlackthree")) { - raw.bayersensor.black3 = keyFile.get_double("RAW", "PreBlackthree"); + if (keyFile.has_key ("RAW", "PreBlackthree")) { + raw.bayersensor.black3 = keyFile.get_double ("RAW", "PreBlackthree"); if (pedited) { pedited->raw.bayersensor.exBlack3 = true; } } - if (keyFile.has_key ("RAW", "PreTwoGreen")) { - raw.bayersensor.twogreen = keyFile.get_boolean("RAW", "PreTwoGreen"); + if (keyFile.has_key ("RAW", "PreTwoGreen")) { + raw.bayersensor.twogreen = keyFile.get_boolean ("RAW", "PreTwoGreen"); if (pedited) { pedited->raw.bayersensor.exTwoGreen = true; } } - //if (keyFile.has_key ("RAW", "ALLEnhance")) { raw.bayersensor.all_enhance = keyFile.get_boolean("RAW", "ALLEnhance"); if (pedited) pedited->raw.bayersensor.allEnhance = true; } +//if (keyFile.has_key ("RAW", "ALLEnhance")) { raw.bayersensor.all_enhance = keyFile.get_boolean("RAW", "ALLEnhance"); if (pedited) pedited->raw.bayersensor.allEnhance = true; } } } // load Bayer sensors' raw settings if (keyFile.has_group ("RAW Bayer")) { - if (keyFile.has_key ("RAW Bayer", "Method")) { + if (keyFile.has_key ("RAW Bayer", "Method")) { raw.bayersensor.method = keyFile.get_string ("RAW Bayer", "Method"); if (pedited) { @@ -7382,55 +7775,63 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("RAW Bayer", "CcSteps")) { - raw.bayersensor.ccSteps = keyFile.get_integer ("RAW Bayer", "CcSteps"); + if (keyFile.has_key ("RAW Bayer", "ImageNum")) { + raw.bayersensor.imageNum = keyFile.get_integer ("RAW Bayer", "ImageNum") - 1; + + if (pedited) { + pedited->raw.bayersensor.imageNum = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "CcSteps")) { + raw.bayersensor.ccSteps = keyFile.get_integer ("RAW Bayer", "CcSteps"); if (pedited) { pedited->raw.bayersensor.ccSteps = true; } } - if (keyFile.has_key ("RAW Bayer", "PreBlack0")) { - raw.bayersensor.black0 = keyFile.get_double("RAW Bayer", "PreBlack0"); + if (keyFile.has_key ("RAW Bayer", "PreBlack0")) { + raw.bayersensor.black0 = keyFile.get_double ("RAW Bayer", "PreBlack0"); if (pedited) { pedited->raw.bayersensor.exBlack0 = true; } } - if (keyFile.has_key ("RAW Bayer", "PreBlack1")) { - raw.bayersensor.black1 = keyFile.get_double("RAW Bayer", "PreBlack1"); + if (keyFile.has_key ("RAW Bayer", "PreBlack1")) { + raw.bayersensor.black1 = keyFile.get_double ("RAW Bayer", "PreBlack1"); if (pedited) { pedited->raw.bayersensor.exBlack1 = true; } } - if (keyFile.has_key ("RAW Bayer", "PreBlack2")) { - raw.bayersensor.black2 = keyFile.get_double("RAW Bayer", "PreBlack2"); + if (keyFile.has_key ("RAW Bayer", "PreBlack2")) { + raw.bayersensor.black2 = keyFile.get_double ("RAW Bayer", "PreBlack2"); if (pedited) { pedited->raw.bayersensor.exBlack2 = true; } } - if (keyFile.has_key ("RAW Bayer", "PreBlack3")) { - raw.bayersensor.black3 = keyFile.get_double("RAW Bayer", "PreBlack3"); + if (keyFile.has_key ("RAW Bayer", "PreBlack3")) { + raw.bayersensor.black3 = keyFile.get_double ("RAW Bayer", "PreBlack3"); if (pedited) { pedited->raw.bayersensor.exBlack3 = true; } } - if (keyFile.has_key ("RAW Bayer", "PreTwoGreen")) { - raw.bayersensor.twogreen = keyFile.get_boolean("RAW Bayer", "PreTwoGreen"); + if (keyFile.has_key ("RAW Bayer", "PreTwoGreen")) { + raw.bayersensor.twogreen = keyFile.get_boolean ("RAW Bayer", "PreTwoGreen"); if (pedited) { pedited->raw.bayersensor.exTwoGreen = true; } } - if (keyFile.has_key ("RAW Bayer", "LineDenoise")) { + if (keyFile.has_key ("RAW Bayer", "LineDenoise")) { raw.bayersensor.linenoise = keyFile.get_integer ("RAW Bayer", "LineDenoise" ); if (pedited) { @@ -7446,36 +7847,274 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("RAW Bayer", "DCBIterations")) { - raw.bayersensor.dcb_iterations = keyFile.get_integer("RAW Bayer", "DCBIterations"); + if (keyFile.has_key ("RAW Bayer", "DCBIterations")) { + raw.bayersensor.dcb_iterations = keyFile.get_integer ("RAW Bayer", "DCBIterations"); if (pedited) { pedited->raw.bayersensor.dcbIterations = true; } } - if (keyFile.has_key ("RAW Bayer", "DCBEnhance")) { - raw.bayersensor.dcb_enhance = keyFile.get_boolean("RAW Bayer", "DCBEnhance"); + if (keyFile.has_key ("RAW Bayer", "DCBEnhance")) { + raw.bayersensor.dcb_enhance = keyFile.get_boolean ("RAW Bayer", "DCBEnhance"); if (pedited) { pedited->raw.bayersensor.dcbEnhance = true; } } - if (keyFile.has_key ("RAW Bayer", "LMMSEIterations")) { - raw.bayersensor.lmmse_iterations = keyFile.get_integer("RAW Bayer", "LMMSEIterations"); + if (keyFile.has_key ("RAW Bayer", "LMMSEIterations")) { + raw.bayersensor.lmmse_iterations = keyFile.get_integer ("RAW Bayer", "LMMSEIterations"); if (pedited) { pedited->raw.bayersensor.lmmseIterations = true; } } - //if (keyFile.has_key ("RAW Bayer", "ALLEnhance")) { raw.bayersensor.all_enhance = keyFile.get_boolean("RAW Bayer", "ALLEnhance"); if (pedited) pedited->raw.bayersensor.allEnhance = true; } + if (keyFile.has_key ("RAW Bayer", "PixelShiftMotion")) { + raw.bayersensor.pixelShiftMotion = keyFile.get_integer ("RAW Bayer", "PixelShiftMotion"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftMotion = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "PixelShiftMotionCorrection")) { + raw.bayersensor.pixelShiftMotionCorrection = (RAWParams::BayerSensor::ePSMotionCorrection)keyFile.get_integer ("RAW Bayer", "PixelShiftMotionCorrection"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftMotionCorrection = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "PixelShiftMotionCorrectionMethod")) { + raw.bayersensor.pixelShiftMotionCorrectionMethod = (RAWParams::BayerSensor::ePSMotionCorrectionMethod)keyFile.get_integer ("RAW Bayer", "PixelShiftMotionCorrectionMethod"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftMotionCorrectionMethod = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftStddevFactorGreen")) { + raw.bayersensor.pixelShiftStddevFactorGreen = keyFile.get_double ("RAW Bayer", "pixelShiftStddevFactorGreen"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftStddevFactorGreen = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftStddevFactorRed")) { + raw.bayersensor.pixelShiftStddevFactorRed = keyFile.get_double ("RAW Bayer", "pixelShiftStddevFactorRed"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftStddevFactorRed = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftStddevFactorBlue")) { + raw.bayersensor.pixelShiftStddevFactorBlue = keyFile.get_double ("RAW Bayer", "pixelShiftStddevFactorBlue"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftStddevFactorBlue = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "PixelShiftEperIso")) { + raw.bayersensor.pixelShiftEperIso = keyFile.get_double ("RAW Bayer", "PixelShiftEperIso"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftEperIso = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "PixelShiftNreadIso")) { + raw.bayersensor.pixelShiftNreadIso = keyFile.get_double ("RAW Bayer", "PixelShiftNreadIso"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftNreadIso = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "PixelShiftPrnu")) { + raw.bayersensor.pixelShiftPrnu = keyFile.get_double ("RAW Bayer", "PixelShiftPrnu"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftPrnu = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "PixelShiftSigma")) { + raw.bayersensor.pixelShiftSigma = keyFile.get_double ("RAW Bayer", "PixelShiftSigma"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftSigma = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "PixelShiftSum")) { + raw.bayersensor.pixelShiftSum = keyFile.get_double ("RAW Bayer", "PixelShiftSum"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftSum = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "PixelShiftRedBlueWeight")) { + raw.bayersensor.pixelShiftRedBlueWeight = keyFile.get_double ("RAW Bayer", "PixelShiftRedBlueWeight"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftRedBlueWeight = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "PixelShiftShowMotion")) { + raw.bayersensor.pixelShiftShowMotion = keyFile.get_boolean ("RAW Bayer", "PixelShiftShowMotion"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftShowMotion = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "PixelShiftShowMotionMaskOnly")) { + raw.bayersensor.pixelShiftShowMotionMaskOnly = keyFile.get_boolean ("RAW Bayer", "PixelShiftShowMotionMaskOnly"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftShowMotionMaskOnly = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftAutomatic")) { + raw.bayersensor.pixelShiftAutomatic = keyFile.get_boolean ("RAW Bayer", "pixelShiftAutomatic"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftAutomatic = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftNonGreenHorizontal")) { + raw.bayersensor.pixelShiftNonGreenHorizontal = keyFile.get_boolean ("RAW Bayer", "pixelShiftNonGreenHorizontal"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftNonGreenHorizontal = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftNonGreenVertical")) { + raw.bayersensor.pixelShiftNonGreenVertical = keyFile.get_boolean ("RAW Bayer", "pixelShiftNonGreenVertical"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftNonGreenVertical = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftHoleFill")) { + raw.bayersensor.pixelShiftHoleFill = keyFile.get_boolean ("RAW Bayer", "pixelShiftHoleFill"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftHoleFill = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftMedian")) { + raw.bayersensor.pixelShiftMedian = keyFile.get_boolean ("RAW Bayer", "pixelShiftMedian"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftMedian = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftMedian3")) { + raw.bayersensor.pixelShiftMedian3 = keyFile.get_boolean ("RAW Bayer", "pixelShiftMedian3"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftMedian3 = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftGreen")) { + raw.bayersensor.pixelShiftGreen = keyFile.get_boolean ("RAW Bayer", "pixelShiftGreen"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftGreen = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftBlur")) { + raw.bayersensor.pixelShiftBlur = keyFile.get_boolean ("RAW Bayer", "pixelShiftBlur"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftBlur = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftSmoothFactor")) { + raw.bayersensor.pixelShiftSmoothFactor = keyFile.get_double ("RAW Bayer", "pixelShiftSmoothFactor"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftSmooth = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftExp0")) { + raw.bayersensor.pixelShiftExp0 = keyFile.get_boolean ("RAW Bayer", "pixelShiftExp0"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftExp0 = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftLmmse")) { + raw.bayersensor.pixelShiftLmmse = keyFile.get_boolean ("RAW Bayer", "pixelShiftLmmse"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftLmmse = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftEqualBright")) { + raw.bayersensor.pixelShiftEqualBright = keyFile.get_boolean ("RAW Bayer", "pixelShiftEqualBright"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftEqualBright = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftEqualBrightChannel")) { + raw.bayersensor.pixelShiftEqualBrightChannel = keyFile.get_boolean ("RAW Bayer", "pixelShiftEqualBrightChannel"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftEqualBrightChannel = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftNonGreenCross")) { + raw.bayersensor.pixelShiftNonGreenCross = keyFile.get_boolean ("RAW Bayer", "pixelShiftNonGreenCross"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftNonGreenCross = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftNonGreenCross2")) { + raw.bayersensor.pixelShiftNonGreenCross2 = keyFile.get_boolean ("RAW Bayer", "pixelShiftNonGreenCross2"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftNonGreenCross2 = true; + } + } + + if (keyFile.has_key ("RAW Bayer", "pixelShiftNonGreenAmaze")) { + raw.bayersensor.pixelShiftNonGreenAmaze = keyFile.get_boolean ("RAW Bayer", "pixelShiftNonGreenAmaze"); + + if (pedited) { + pedited->raw.bayersensor.pixelShiftNonGreenAmaze = true; + } + } } // load X-Trans sensors' raw settings if (keyFile.has_group ("RAW X-Trans")) { - if (keyFile.has_key ("RAW X-Trans", "Method")) { + if (keyFile.has_key ("RAW X-Trans", "Method")) { raw.xtranssensor.method = keyFile.get_string ("RAW X-Trans", "Method"); if (pedited) { @@ -7483,32 +8122,32 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } - if (keyFile.has_key ("RAW X-Trans", "CcSteps")) { - raw.xtranssensor.ccSteps = keyFile.get_integer ("RAW X-Trans", "CcSteps"); + if (keyFile.has_key ("RAW X-Trans", "CcSteps")) { + raw.xtranssensor.ccSteps = keyFile.get_integer ("RAW X-Trans", "CcSteps"); if (pedited) { pedited->raw.xtranssensor.ccSteps = true; } } - if (keyFile.has_key ("RAW X-Trans", "PreBlackRed")) { - raw.xtranssensor.blackred = keyFile.get_double("RAW X-Trans", "PreBlackRed"); + if (keyFile.has_key ("RAW X-Trans", "PreBlackRed")) { + raw.xtranssensor.blackred = keyFile.get_double ("RAW X-Trans", "PreBlackRed"); if (pedited) { pedited->raw.xtranssensor.exBlackRed = true; } } - if (keyFile.has_key ("RAW X-Trans", "PreBlackGreen")) { - raw.xtranssensor.blackgreen = keyFile.get_double("RAW X-Trans", "PreBlackGreen"); + if (keyFile.has_key ("RAW X-Trans", "PreBlackGreen")) { + raw.xtranssensor.blackgreen = keyFile.get_double ("RAW X-Trans", "PreBlackGreen"); if (pedited) { pedited->raw.xtranssensor.exBlackGreen = true; } } - if (keyFile.has_key ("RAW X-Trans", "PreBlackBlue")) { - raw.xtranssensor.blackblue = keyFile.get_double("RAW X-Trans", "PreBlackBlue"); + if (keyFile.has_key ("RAW X-Trans", "PreBlackBlue")) { + raw.xtranssensor.blackblue = keyFile.get_double ("RAW X-Trans", "PreBlackBlue"); if (pedited) { pedited->raw.xtranssensor.exBlackBlue = true; @@ -7548,7 +8187,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) for (unsigned int i = 0; i < keys.size(); i++) { // does this key already exist? - element = iptc.find(keys[i]); + element = iptc.find (keys[i]); if (element != iptc.end()) { // it already exist so we cleanup the values @@ -7562,7 +8201,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) std::vector::iterator currLoadedTagValue = currIptc.begin(); currLoadedTagValue != currIptc.end(); ++currLoadedTagValue) { - iptc[keys[i]].push_back(currLoadedTagValue->data()); + iptc[keys[i]].push_back (currLoadedTagValue->data()); } if (pedited) { @@ -7586,22 +8225,22 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) return 0; } -const Glib::ustring ColorManagementParams::NoICMString = Glib::ustring("No ICM: sRGB output"); +const Glib::ustring ColorManagementParams::NoICMString = Glib::ustring ("No ICM: sRGB output"); -bool operator==(const WaveletParams & a, const WaveletParams & b) +bool operator== (const WaveletParams & a, const WaveletParams & b) { - if(a.enabled != b.enabled) { + if (a.enabled != b.enabled) { return false; } - for(int i = 0; i < 9; i++) { - if(a.c[i] != b.c[i]) { + for (int i = 0; i < 9; i++) { + if (a.c[i] != b.c[i]) { return false; } } - for(int i = 0; i < 9; i++) { - if(a.ch[i] != b.ch[i]) { + for (int i = 0; i < 9; i++) { + if (a.ch[i] != b.ch[i]) { return false; } } @@ -7611,14 +8250,14 @@ bool operator==(const WaveletParams & a, const WaveletParams & b) -bool operator==(const DirPyrEqualizerParams & a, const DirPyrEqualizerParams & b) +bool operator== (const DirPyrEqualizerParams & a, const DirPyrEqualizerParams & b) { - if(a.enabled != b.enabled) { + if (a.enabled != b.enabled) { return false; } - for(int i = 0; i < 6; i++) { - if(a.mult[i] != b.mult[i]) { + for (int i = 0; i < 6; i++) { + if (a.mult[i] != b.mult[i]) { return false; } } @@ -7669,7 +8308,6 @@ bool ProcParams::operator== (const ProcParams& other) && retinex.gam == other.retinex.gam && retinex.slope == other.retinex.slope && retinex.neigh == other.retinex.neigh - && retinex.gain == other.retinex.gain && retinex.limd == other.retinex.limd && retinex.highl == other.retinex.highl && retinex.highlights == other.retinex.highlights @@ -7677,8 +8315,6 @@ bool ProcParams::operator== (const ProcParams& other) && retinex.shadows == other.retinex.shadows && retinex.stonalwidth == other.retinex.stonalwidth && retinex.radius == other.retinex.radius - - && retinex.baselog == other.retinex.baselog && retinex.skal == other.retinex.skal && retinex.offs == other.retinex.offs && retinex.retinexMethod == other.retinex.retinexMethod @@ -7761,9 +8397,14 @@ bool ProcParams::operator== (const ProcParams& other) && colorappearance.enabled == other.colorappearance.enabled && colorappearance.degree == other.colorappearance.degree && colorappearance.autodegree == other.colorappearance.autodegree + && colorappearance.degreeout == other.colorappearance.degreeout + && colorappearance.autodegreeout == other.colorappearance.autodegreeout && colorappearance.surround == other.colorappearance.surround + && colorappearance.surrsrc == other.colorappearance.surrsrc && colorappearance.adapscen == other.colorappearance.adapscen && colorappearance.autoadapscen == other.colorappearance.autoadapscen + && colorappearance.ybscen == other.colorappearance.ybscen + && colorappearance.autoybscen == other.colorappearance.autoybscen && colorappearance.adaplum == other.colorappearance.adaplum && colorappearance.badpixsl == other.colorappearance.badpixsl && colorappearance.wbmodel == other.colorappearance.wbmodel @@ -7780,12 +8421,16 @@ bool ProcParams::operator== (const ProcParams& other) && colorappearance.contrast == other.colorappearance.contrast && colorappearance.qcontrast == other.colorappearance.qcontrast && colorappearance.colorh == other.colorappearance.colorh + && colorappearance.tempout == other.colorappearance.tempout + && colorappearance.greenout == other.colorappearance.greenout + && colorappearance.tempsc == other.colorappearance.tempsc + && colorappearance.greensc == other.colorappearance.greensc + && colorappearance.ybout == other.colorappearance.ybout && impulseDenoise.enabled == other.impulseDenoise.enabled && impulseDenoise.thresh == other.impulseDenoise.thresh && dirpyrDenoise.enabled == other.dirpyrDenoise.enabled && dirpyrDenoise.enhance == other.dirpyrDenoise.enhance && dirpyrDenoise.median == other.dirpyrDenoise.median - && dirpyrDenoise.autochroma == other.dirpyrDenoise.autochroma // && dirpyrDenoise.perform == other.dirpyrDenoise.perform && dirpyrDenoise.luma == other.dirpyrDenoise.luma && dirpyrDenoise.lcurve == other.dirpyrDenoise.lcurve @@ -7867,9 +8512,9 @@ bool ProcParams::operator== (const ProcParams& other) && vignetting.strength == other.vignetting.strength && vignetting.centerX == other.vignetting.centerX && vignetting.centerY == other.vignetting.centerY - && !memcmp (&chmixer.red, &other.chmixer.red, 3 * sizeof(int)) - && !memcmp (&chmixer.green, &other.chmixer.green, 3 * sizeof(int)) - && !memcmp (&chmixer.blue, &other.chmixer.blue, 3 * sizeof(int)) + && !memcmp (&chmixer.red, &other.chmixer.red, 3 * sizeof (int)) + && !memcmp (&chmixer.green, &other.chmixer.green, 3 * sizeof (int)) + && !memcmp (&chmixer.blue, &other.chmixer.blue, 3 * sizeof (int)) && blackwhite.mixerRed == other.blackwhite.mixerRed && blackwhite.mixerOrange == other.blackwhite.mixerOrange && blackwhite.mixerYellow == other.blackwhite.mixerYellow @@ -7897,9 +8542,8 @@ bool ProcParams::operator== (const ProcParams& other) && resize.dataspec == other.resize.dataspec && resize.width == other.resize.width && resize.height == other.resize.height - && spot.enabled == other.spot.enabled - && spot.entries == other.spot.entries && raw.bayersensor.method == other.raw.bayersensor.method + && raw.bayersensor.imageNum == other.raw.bayersensor.imageNum && raw.bayersensor.ccSteps == other.raw.bayersensor.ccSteps && raw.bayersensor.black0 == other.raw.bayersensor.black0 && raw.bayersensor.black1 == other.raw.bayersensor.black1 @@ -7908,8 +8552,39 @@ bool ProcParams::operator== (const ProcParams& other) && raw.bayersensor.twogreen == other.raw.bayersensor.twogreen && raw.bayersensor.greenthresh == other.raw.bayersensor.greenthresh && raw.bayersensor.linenoise == other.raw.bayersensor.linenoise - && raw.bayersensor.dcb_enhance == other.raw.bayersensor.dcb_enhance && raw.bayersensor.dcb_iterations == other.raw.bayersensor.dcb_iterations + && raw.bayersensor.lmmse_iterations == other.raw.bayersensor.lmmse_iterations + && raw.bayersensor.pixelShiftMotion == other.raw.bayersensor.pixelShiftMotion + && raw.bayersensor.pixelShiftMotionCorrection == other.raw.bayersensor.pixelShiftMotionCorrection + && raw.bayersensor.pixelShiftMotionCorrectionMethod == other.raw.bayersensor.pixelShiftMotionCorrectionMethod + && raw.bayersensor.pixelShiftStddevFactorGreen == other.raw.bayersensor.pixelShiftStddevFactorGreen + && raw.bayersensor.pixelShiftStddevFactorRed == other.raw.bayersensor.pixelShiftStddevFactorRed + && raw.bayersensor.pixelShiftStddevFactorBlue == other.raw.bayersensor.pixelShiftStddevFactorBlue + && raw.bayersensor.pixelShiftEperIso == other.raw.bayersensor.pixelShiftEperIso + && raw.bayersensor.pixelShiftNreadIso == other.raw.bayersensor.pixelShiftNreadIso + && raw.bayersensor.pixelShiftPrnu == other.raw.bayersensor.pixelShiftPrnu + && raw.bayersensor.pixelShiftSigma == other.raw.bayersensor.pixelShiftSigma + && raw.bayersensor.pixelShiftSum == other.raw.bayersensor.pixelShiftSum + && raw.bayersensor.pixelShiftRedBlueWeight == other.raw.bayersensor.pixelShiftRedBlueWeight + && raw.bayersensor.pixelShiftShowMotion == other.raw.bayersensor.pixelShiftShowMotion + && raw.bayersensor.pixelShiftShowMotionMaskOnly == other.raw.bayersensor.pixelShiftShowMotionMaskOnly + && raw.bayersensor.pixelShiftAutomatic == other.raw.bayersensor.pixelShiftAutomatic + && raw.bayersensor.pixelShiftNonGreenHorizontal == other.raw.bayersensor.pixelShiftNonGreenHorizontal + && raw.bayersensor.pixelShiftNonGreenVertical == other.raw.bayersensor.pixelShiftNonGreenVertical + && raw.bayersensor.pixelShiftHoleFill == other.raw.bayersensor.pixelShiftHoleFill + && raw.bayersensor.pixelShiftMedian == other.raw.bayersensor.pixelShiftMedian + && raw.bayersensor.pixelShiftMedian3 == other.raw.bayersensor.pixelShiftMedian3 + && raw.bayersensor.pixelShiftGreen == other.raw.bayersensor.pixelShiftGreen + && raw.bayersensor.pixelShiftBlur == other.raw.bayersensor.pixelShiftBlur + && raw.bayersensor.pixelShiftSmoothFactor == other.raw.bayersensor.pixelShiftSmoothFactor + && raw.bayersensor.pixelShiftExp0 == other.raw.bayersensor.pixelShiftExp0 + && raw.bayersensor.pixelShiftLmmse == other.raw.bayersensor.pixelShiftLmmse + && raw.bayersensor.pixelShiftEqualBright == other.raw.bayersensor.pixelShiftEqualBright + && raw.bayersensor.pixelShiftEqualBrightChannel == other.raw.bayersensor.pixelShiftEqualBrightChannel + && raw.bayersensor.pixelShiftNonGreenCross == other.raw.bayersensor.pixelShiftNonGreenCross + && raw.bayersensor.pixelShiftNonGreenCross2 == other.raw.bayersensor.pixelShiftNonGreenCross2 + && raw.bayersensor.pixelShiftNonGreenAmaze == other.raw.bayersensor.pixelShiftNonGreenAmaze + && raw.bayersensor.dcb_enhance == other.raw.bayersensor.dcb_enhance && raw.xtranssensor.method == other.raw.xtranssensor.method && raw.xtranssensor.ccSteps == other.raw.xtranssensor.ccSteps && raw.xtranssensor.blackred == other.raw.xtranssensor.blackred @@ -7926,7 +8601,6 @@ bool ProcParams::operator== (const ProcParams& other) && raw.expos == other.raw.expos && raw.preser == other.raw.preser && raw.ca_autocorrect == other.raw.ca_autocorrect - && raw.caautostrength == other.raw.caautostrength && raw.cared == other.raw.cared && raw.cablue == other.raw.cablue && raw.hotPixelFilter == other.raw.hotPixelFilter @@ -7937,7 +8611,6 @@ bool ProcParams::operator== (const ProcParams& other) && icm.applyLookTable == other.icm.applyLookTable && icm.applyBaselineExposureOffset == other.icm.applyBaselineExposureOffset && icm.applyHueSatMap == other.icm.applyHueSatMap - && icm.blendCMSMatrix == other.icm.blendCMSMatrix && icm.dcpIlluminant == other.icm.dcpIlluminant && icm.working == other.icm.working && icm.output == other.icm.output @@ -7967,7 +8640,6 @@ bool ProcParams::operator== (const ProcParams& other) && wavelet.sup == other.wavelet.sup && wavelet.sky == other.wavelet.sky && wavelet.thres == other.wavelet.thres - && wavelet.threshold == other.wavelet.threshold && wavelet.chroma == other.wavelet.chroma && wavelet.chro == other.wavelet.chro && wavelet.tmr == other.wavelet.tmr @@ -8073,45 +8745,45 @@ bool ProcParams::operator== (const ProcParams& other) bool ProcParams::operator!= (const ProcParams& other) { - return !(*this == other); + return ! (*this == other); } -PartialProfile::PartialProfile(bool createInstance, bool paramsEditedValue) +PartialProfile::PartialProfile (bool createInstance, bool paramsEditedValue) { if (createInstance) { pparams = new ProcParams(); - pedited = new ParamsEdited(paramsEditedValue); + pedited = new ParamsEdited (paramsEditedValue); } else { pparams = nullptr; pedited = nullptr; } } -PartialProfile::PartialProfile(ProcParams* pp, ParamsEdited* pe, bool fullCopy) +PartialProfile::PartialProfile (ProcParams* pp, ParamsEdited* pe, bool fullCopy) { if (fullCopy && pp) { - pparams = new ProcParams(*pp); + pparams = new ProcParams (*pp); } else { pparams = pp; } if (fullCopy && pe) { - pedited = new ParamsEdited(*pe); + pedited = new ParamsEdited (*pe); } else { pedited = pe; } } -PartialProfile::PartialProfile(const ProcParams* pp, const ParamsEdited* pe) +PartialProfile::PartialProfile (const ProcParams* pp, const ParamsEdited* pe) { if (pp) { - pparams = new ProcParams(*pp); + pparams = new ProcParams (*pp); } else { pparams = nullptr; } if (pe) { - pedited = new ParamsEdited(*pe); + pedited = new ParamsEdited (*pe); } else { pedited = nullptr; } @@ -8129,8 +8801,10 @@ int PartialProfile::load (const Glib::ustring &fName) if (fName == DEFPROFILE_INTERNAL) { return 0; + } else if (fName == DEFPROFILE_DYNAMIC) { + return -1; // should not happen here } else { - return pparams->load(fName, pedited); + return pparams->load (fName, pedited); } } @@ -8160,17 +8834,17 @@ void PartialProfile::clearGeneral () } } -const void PartialProfile::applyTo(ProcParams *destParams) const +const void PartialProfile::applyTo (ProcParams *destParams) const { if (destParams && pparams && pedited) { - pedited->combine(*destParams, *pparams, true); + pedited->combine (*destParams, *pparams, true); } } -void PartialProfile::set(bool v) +void PartialProfile::set (bool v) { if (pedited) { - pedited->set(v); + pedited->set (v); } } diff --git a/rtengine/procparams.h b/rtengine/procparams.h index e9e1ab8c8..7d9c42b40 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -73,8 +73,8 @@ public: initEq1 = startAtOne; value[0] = bottom; value[1] = top; - value[2] = T(0); - value[3] = T(0); + value[2] = T (0); + value[3] = T (0); _isDouble = false; } @@ -89,14 +89,14 @@ public: } // for convenience, since 'values' is public - void setValues(T bottom, T top) + void setValues (T bottom, T top) { value[0] = bottom; value[1] = top; } // for convenience, since 'values' is public - void setValues(T bottomLeft, T topLeft, T bottomRight, T topRight) + void setValues (T bottomLeft, T topLeft, T bottomRight, T topRight) { value[0] = bottomLeft; value[1] = topLeft; @@ -113,64 +113,64 @@ public: // RV: Type of the value on the X axis // RV2: Type of the maximum value on the Y axis template - RT multiply(RV x, RV2 yMax) const + RT multiply (RV x, RV2 yMax) const { - double val = double(x); + double val = double (x); if (initEq1) { if (_isDouble) { - if (val == double(value[2]) && double(value[2]) == double(value[3])) + if (val == double (value[2]) && double (value[2]) == double (value[3])) // this handle the special case where the 2 right values are the same, then bottom one is sent back, // useful if one wants to keep the bottom value even beyond the x max bound { - return RT(0.); + return RT (0.); } - if (val >= double(value[3])) { - return RT(yMax); + if (val >= double (value[3])) { + return RT (yMax); } - if (val > double(value[2])) { - return RT(double(yMax) * (val - double(value[2])) / (double(value[3]) - double(value[2]))); + if (val > double (value[2])) { + return RT (double (yMax) * (val - double (value[2])) / (double (value[3]) - double (value[2]))); } } - if (val >= double(value[0])) { - return RT(0); + if (val >= double (value[0])) { + return RT (0); } - if (val > double(value[1])) { - return RT(double(yMax) * (1. - (val - double(value[0])) / (double(value[1]) - double(value[0])))); + if (val > double (value[1])) { + return RT (double (yMax) * (1. - (val - double (value[0])) / (double (value[1]) - double (value[0])))); } - return RT(yMax); + return RT (yMax); } else { if (_isDouble) { - if (val == double(value[2]) && double(value[2]) == double(value[3])) + if (val == double (value[2]) && double (value[2]) == double (value[3])) // this handle the special case where the 2 right values are the same, then top one is sent back, // useful if one wants to keep the top value even beyond the x max bound { - return RT(yMax); + return RT (yMax); } - if (val >= double(value[2])) { - return RT(0); + if (val >= double (value[2])) { + return RT (0); } - if (val > double(value[3])) { - return RT(double(yMax) * (1. - (val - double(value[3])) / (double(value[2]) - double(value[3])))); + if (val > double (value[3])) { + return RT (double (yMax) * (1. - (val - double (value[3])) / (double (value[2]) - double (value[3])))); } } - if (val >= double(value[1])) { - return RT(yMax); + if (val >= double (value[1])) { + return RT (yMax); } - if (val > double(value[0])) { - return RT(double(yMax) * (val - double(value[0])) / (double(value[1]) - double(value[0]))); + if (val > double (value[0])) { + return RT (double (yMax) * (val - double (value[0])) / (double (value[1]) - double (value[0]))); } - return RT(0); + return RT (0); } } @@ -207,7 +207,7 @@ public: } }*/ - Threshold& operator =(const Threshold &rhs) + Threshold& operator = (const Threshold &rhs) { value[0] = rhs.value[0]; value[1] = rhs.value[1]; @@ -219,21 +219,21 @@ public: } template - typename std::enable_if::value, bool>::type operator ==(const Threshold &rhs) const + typename std::enable_if::value, bool>::type operator == (const Threshold &rhs) const { if (_isDouble) { - return std::fabs(value[0] - rhs.value[0]) < 1e-10 - && std::fabs(value[1] - rhs.value[1]) < 1e-10 - && std::fabs(value[2] - rhs.value[2]) < 1e-10 - && std::fabs(value[3] - rhs.value[3]) < 1e-10; + return std::fabs (value[0] - rhs.value[0]) < 1e-10 + && std::fabs (value[1] - rhs.value[1]) < 1e-10 + && std::fabs (value[2] - rhs.value[2]) < 1e-10 + && std::fabs (value[3] - rhs.value[3]) < 1e-10; } else { - return std::fabs(value[0] - rhs.value[0]) < 1e-10 - && std::fabs(value[1] - rhs.value[1]) < 1e-10; + return std::fabs (value[0] - rhs.value[0]) < 1e-10 + && std::fabs (value[1] - rhs.value[1]) < 1e-10; } } template - typename std::enable_if::value, bool>::type operator ==(const Threshold &rhs) const + typename std::enable_if::value, bool>::type operator == (const Threshold &rhs) const { if (_isDouble) { return @@ -288,7 +288,7 @@ public: setDefaults(); } void setDefaults(); - static bool HLReconstructionNecessary(LUTu &histRedRaw, LUTu &histGreenRaw, LUTu &histBlueRaw); + static bool HLReconstructionNecessary (LUTu &histRedRaw, LUTu &histGreenRaw, LUTu &histBlueRaw); }; /** * Parameters of Retinex @@ -312,7 +312,6 @@ public: double gam; double slope; int neigh; - int gain; int offs; int highlights; int htonalwidth; @@ -328,16 +327,15 @@ public: int vart; int limd; int highl; - double baselog; int skal; bool medianmap; RetinexParams (); void setDefaults(); - void getCurves(RetinextransmissionCurve &transmissionCurveLUT, RetinexgaintransmissionCurve &gaintransmissionCurveLUT) const; + void getCurves (RetinextransmissionCurve &transmissionCurveLUT, RetinexgaintransmissionCurve &gaintransmissionCurveLUT) const; - static void getDefaultgaintransmissionCurve(std::vector &curve); + static void getDefaultgaintransmissionCurve (std::vector &curve); - static void getDefaulttransmissionCurve(std::vector &curve); + static void getDefaulttransmissionCurve (std::vector &curve); }; @@ -433,16 +431,16 @@ public: ColorToningParams (); void setDefaults(); // SHOULD BE GENERALIZED TO ALL CLASSES! /// @brief Transform the mixer values to their curve equivalences - void mixerToCurve(std::vector &colorCurve, std::vector &opacityCurve) const; + void mixerToCurve (std::vector &colorCurve, std::vector &opacityCurve) const; /// @brief Specifically transform the sliders values to their curve equivalences - void slidersToCurve(std::vector &colorCurve, std::vector &opacityCurve) const; + void slidersToCurve (std::vector &colorCurve, std::vector &opacityCurve) const; /// @brief Fill the ColorGradientCurve and OpacityCurve LUTf from the control points curve or sliders value - void getCurves(ColorGradientCurve &colorCurveLUT, OpacityCurve &opacityCurveLUT, const double xyz_rgb[3][3], const double rgb_xyz[3][3], bool &opautili) const; + void getCurves (ColorGradientCurve &colorCurveLUT, OpacityCurve &opacityCurveLUT, const double xyz_rgb[3][3], const double rgb_xyz[3][3], bool &opautili) const; - static void getDefaultColorCurve(std::vector &curve); - static void getDefaultOpacityCurve(std::vector &curve); - static void getDefaultCLCurve(std::vector &curve); - static void getDefaultCL2Curve(std::vector &curve); + static void getDefaultColorCurve (std::vector &curve); + static void getDefaultOpacityCurve (std::vector &curve); + static void getDefaultCLCurve (std::vector &curve); + static void getDefaultCL2Curve (std::vector &curve); }; /** @@ -467,7 +465,7 @@ public: int deconviter; int deconvdamping; - SharpeningParams() : threshold(20, 80, 2000, 1200, false) {}; + SharpeningParams(); }; class SharpenEdgeParams { @@ -502,7 +500,7 @@ public: bool pastsattog; std::vector skintonescurve; - VibranceParams() : psthreshold(0, 75, false) {}; + VibranceParams(); }; /** @@ -546,8 +544,9 @@ public: int temperature; double green; double equal; + double tempBias; - WBEntry(const Glib::ustring &p, enum WBTypes t, const Glib::ustring &l, int temp, double green, double equal) : ppLabel(p), type(t), GUILabel(l), temperature(temp), green(green), equal(equal) {}; + WBEntry (const Glib::ustring &p, enum WBTypes t, const Glib::ustring &l, int temp, double green, double equal, double bias) : ppLabel (p), type (t), GUILabel (l), temperature (temp), green (green), equal (equal), tempBias (bias) {}; }; class WBParams @@ -559,6 +558,7 @@ public: int temperature; double green; double equal; + double tempBias; static void init(); static void cleanup(); @@ -585,6 +585,8 @@ public: bool enabled; int degree; bool autodegree; + int degreeout; + bool autodegreeout; std::vector curve; std::vector curve2; std::vector curve3; @@ -593,8 +595,11 @@ public: eCTCModeId curveMode3; Glib::ustring surround; + Glib::ustring surrsrc; double adapscen; bool autoadapscen; + int ybscen; + bool autoybscen; double adaplum; int badpixsl; @@ -614,6 +619,12 @@ public: // bool badpix; bool datacie; bool tonecie; + int tempout; + int ybout; + double greenout; + int tempsc; + double greensc; + // bool sharpcie; }; @@ -688,7 +699,6 @@ public: bool enabled; bool enhance; bool median; - bool autochroma; bool perform; double luma; @@ -709,10 +719,10 @@ public: DirPyrDenoiseParams (); void setDefaults(); // SHOULD BE GENERALIZED TO ALL CLASSES! - void getCurves(NoiseCurve &lCurve, NoiseCurve &cCurve) const; + void getCurves (NoiseCurve &lCurve, NoiseCurve &cCurve) const; - static void getDefaultNoisCurve(std::vector &curve); - static void getDefaultCCCurve(std::vector &curve); + static void getDefaultNoisCurve (std::vector &curve); + static void getDefaultCCCurve (std::vector &curve); }; @@ -762,8 +772,8 @@ public: Glib::ustring orientation; Glib::ustring guide; - CropParams() : enabled(false), x(0), y(0), w(0), h(0), fixratio(false) {}; - void mapToResized(int resizedWidth, int resizedHeight, int scale, int &x1, int &x2, int &y1, int &y2) const; + CropParams() : enabled (false), x (0), y (0), w (0), h (0), fixratio (false) {}; + void mapToResized (int resizedWidth, int resizedHeight, int scale, int &x1, int &x2, int &y1, int &y2) const; }; /** @@ -978,7 +988,7 @@ public: float feather; float opacity; - SpotEntry() : radius(5), feather(1.f), opacity(1.f) {} + SpotEntry() : radius(25), feather(1.f), opacity(1.f) {} bool operator== (const SpotEntry& other) const { @@ -1030,7 +1040,6 @@ public: bool applyLookTable; bool applyBaselineExposureOffset; bool applyHueSatMap; - bool blendCMSMatrix; // setting no longer used int dcpIlluminant; Glib::ustring working; Glib::ustring output; @@ -1155,12 +1164,12 @@ public: WaveletParams (); void setDefaults(); - void getCurves(WavCurve &cCurve, WavOpacityCurveRG &opacityCurveLUTRG , WavOpacityCurveBY &opacityCurveLUTBY, WavOpacityCurveW &opacityCurveLUTW, WavOpacityCurveWL &opacityCurveLUTWL) const; - static void getDefaultCCWCurve(std::vector &curve); - static void getDefaultOpacityCurveRG(std::vector &curve); - static void getDefaultOpacityCurveBY(std::vector &curve); - static void getDefaultOpacityCurveW(std::vector &curve); - static void getDefaultOpacityCurveWL(std::vector &curve); + void getCurves (WavCurve &cCurve, WavOpacityCurveRG &opacityCurveLUTRG, WavOpacityCurveBY &opacityCurveLUTBY, WavOpacityCurveW &opacityCurveLUTW, WavOpacityCurveWL &opacityCurveLUTWL) const; + static void getDefaultCCWCurve (std::vector &curve); + static void getDefaultOpacityCurveRG (std::vector &curve); + static void getDefaultOpacityCurveBY (std::vector &curve); + static void getDefaultOpacityCurveW (std::vector &curve); + static void getDefaultOpacityCurveWL (std::vector &curve); }; @@ -1180,7 +1189,7 @@ public: Threshold hueskin; //Glib::ustring algo; Glib::ustring cbdlMethod; - DirPyrEqualizerParams() : hueskin(20, 80, 2000, 1200, false) {}; + DirPyrEqualizerParams() : hueskin (20, 80, 2000, 1200, false) {}; }; /** @@ -1233,12 +1242,19 @@ public: public: //enum eMethod{ eahd,hphd,vng4,dcb,amaze,ahd,IGV_noise,fast, //numMethods }; // This MUST be the last enum - enum eMethod { amaze, igv, lmmse, eahd, hphd, vng4, dcb, ahd, fast, mono, none, + enum eMethod { amaze, igv, lmmse, eahd, hphd, vng4, dcb, ahd, fast, mono, none, pixelshift, numMethods }; // This MUST be the last enum + enum ePSMotionCorrection { + Grid1x1, Grid1x2, Grid3x3, Grid5x5, Grid7x7, Grid3x3New + }; + enum ePSMotionCorrectionMethod { + Off, Automatic, Custom + }; static const char *methodstring[numMethods]; Glib::ustring method; + int imageNum; int ccSteps; double black0; double black1; @@ -1249,8 +1265,41 @@ public: int greenthresh; int dcb_iterations; int lmmse_iterations; + int pixelShiftMotion; + ePSMotionCorrection pixelShiftMotionCorrection; + ePSMotionCorrectionMethod pixelShiftMotionCorrectionMethod; + double pixelShiftStddevFactorGreen; + double pixelShiftStddevFactorRed; + double pixelShiftStddevFactorBlue; + double pixelShiftEperIso; + double pixelShiftNreadIso; + double pixelShiftPrnu; + double pixelShiftSigma; + double pixelShiftSum; + double pixelShiftRedBlueWeight; + bool pixelShiftShowMotion; + bool pixelShiftShowMotionMaskOnly; + bool pixelShiftAutomatic; + bool pixelShiftNonGreenHorizontal; + bool pixelShiftNonGreenVertical; + bool pixelShiftHoleFill; + bool pixelShiftMedian; + bool pixelShiftMedian3; + bool pixelShiftGreen; + bool pixelShiftBlur; + double pixelShiftSmoothFactor; + bool pixelShiftExp0; + bool pixelShiftLmmse; + bool pixelShiftEqualBright; + bool pixelShiftEqualBrightChannel; + bool pixelShiftNonGreenCross; + bool pixelShiftNonGreenCross2; + bool pixelShiftNonGreenAmaze; bool dcb_enhance; //bool all_enhance; + + void setPixelShiftDefaults(); + }; /** @@ -1291,7 +1340,6 @@ public: int ff_clipControl; bool ca_autocorrect; - double caautostrength; double cared; double cablue; @@ -1433,7 +1481,7 @@ class PartialProfile public: rtengine::procparams::ProcParams* pparams; ParamsEdited* pedited; - PartialProfile& operator =(const PartialProfile& rhs) + PartialProfile& operator = (const PartialProfile& rhs) { pparams = rhs.pparams; pedited = rhs.pedited; @@ -1458,7 +1506,7 @@ public: class AutoPartialProfile : public PartialProfile { public: - AutoPartialProfile() : PartialProfile(true) {} + AutoPartialProfile() : PartialProfile (true) {} ~AutoPartialProfile() { deleteInstance(); diff --git a/rtengine/profilestore.cc b/rtengine/profilestore.cc new file mode 100644 index 000000000..c713d6b5c --- /dev/null +++ b/rtengine/profilestore.cc @@ -0,0 +1,543 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ +#include "profilestore.h" + +#include "dynamicprofile.h" +#include "../rtgui/options.h" +#include "../rtgui/multilangmgr.h" + +using namespace rtengine; +using namespace rtengine::procparams; + +ProfileStore::ProfileStore () : storeState (STORESTATE_NOTINITIALIZED), internalDefaultProfile (nullptr), internalDefaultEntry (nullptr), internalDynamicEntry (nullptr), loadAll (true) +{ + internalDefaultProfile = new AutoPartialProfile(); + internalDefaultProfile->set (true); +} + +ProfileStore* ProfileStore::getInstance() +{ + static ProfileStore instance; + return &instance; +} + + +bool ProfileStore::init (bool loadAll) +{ + if (storeState == STORESTATE_DELETED) { + return false; + } + + this->loadAll = loadAll; + + if ((storeState == STORESTATE_NOTINITIALIZED || storeState == STORESTATE_DIRTY) && loadAll) { + storeState = STORESTATE_BEINGINITIALIZED; + _parseProfiles (); + storeState = STORESTATE_INITIALIZED; + } + + return storeState == STORESTATE_INITIALIZED; +} + +ProfileStore::~ProfileStore () +{ + if (storeState == STORESTATE_NOTINITIALIZED) { + return; + } + + // This lock prevent object's suppression while scanning the directories + storeState = STORESTATE_DELETED; + + { + MyMutex::MyLock lock (parseMutex); + + clearProfileList (); + partProfiles.clear (); + clearFileList(); + delete internalDefaultProfile; + delete internalDefaultEntry; + delete internalDynamicEntry; + } +} + +/* + * Public method to parse the profiles' directories + * Since there's a race condition in the multithreaded environment on this object, + * parseProfiles may need to ask for initialization of this object, and then will + * ask a mutex lock on it, has it been initialized by this call or not + * + * This method will scan the directory tree again and update the profile list. When finished, + * the listeners will be called in order to update with the new list + */ +void ProfileStore::parseProfilesOnce () +{ + + for (auto listener : listeners) { + listener->storeCurrentValue(); + } + + init (true); // safe even if already initialized + + for (auto listener : listeners) { + listener->updateProfileList(); + listener->restoreValue(); + } +} + +void ProfileStore::parseProfiles () +{ + + storeState = STORESTATE_DIRTY; + parseProfilesOnce (); +} + +void ProfileStore::_parseProfiles () +{ + // clear loaded profiles + folders.clear(); + clearFileList(); + clearProfileList (); + + folders.push_back ("<<< ROOT >>>"); // Fake path, so parentFolderId == 0 will be used to attach a ProfileStoreEntry to the root container, not sub-menu + + Glib::ustring p1 = options.getUserProfilePath(); + Glib::ustring p2 = options.getGlobalProfilePath(); + bool displayLevel0 = options.useBundledProfiles && !p1.empty() && !p2.empty() && p1 != p2; + + Glib::ustring virtualPath ("${U}"); + Glib::ustring currDir ("${U}"); + parseDir (p1, virtualPath, currDir, 0, 0, displayLevel0); + + if (displayLevel0) { + virtualPath = "${G}"; + currDir = "${G}"; + parseDir (p2, virtualPath, currDir, 0, 0, displayLevel0); + } + + // sort profiles + std::sort (entries.begin(), entries.end(), SortProfiles() ); + + // entries and partProfiles are empty, but the entry and profiles already exist (they have survived to clearFileList and clearProfileList) + if (!internalDefaultEntry) { + internalDefaultEntry = new ProfileStoreEntry (Glib::ustring ("(") + M ("PROFILEPANEL_PINTERNAL") + Glib::ustring (")"), PSET_FILE, 0, 0); + } + + entries.push_back (internalDefaultEntry); + partProfiles[internalDefaultEntry] = internalDefaultProfile; + + if (!internalDynamicEntry) { + internalDynamicEntry = new ProfileStoreEntry (Glib::ustring ("(") + M ("PROFILEPANEL_PDYNAMIC") + Glib::ustring (")"), PSET_FILE, 0, 0); + // do not add it to the entries. This is here only for the preferences dialog + } + + // Check if the default profiles has been found. + if (findEntryFromFullPathU (options.defProfRaw) == nullptr) { + options.setDefProfRawMissing (true); + + if (options.rtSettings.verbose) { + printf ("WARNING: Default profile \"%s\" for raw images not found!\n", options.defProfRaw.c_str()); + } + } + + if (findEntryFromFullPathU (options.defProfImg) == nullptr) { + options.setDefProfImgMissing (true); + + if (options.rtSettings.verbose) { + printf ("WARNING: Default profile \"%s\" for standard images not found!\n", options.defProfImg.c_str()); + } + } +} + +/// @return Returns true if some files has been found (directories are ignored) +bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath, Glib::ustring& currDir, unsigned int parentId, unsigned char level, bool displayLevel0) +{ + bool fileFound = false; + + // reload the available profiles from the profile dir + if (!realPath.empty() && Glib::file_test (realPath, Glib::FILE_TEST_EXISTS) && Glib::file_test (realPath, Glib::FILE_TEST_IS_DIR)) { + unsigned int folder = 0; // folder's own Id + + // add this entry to the folder list + folders.push_back (virtualPath); + folder = (unsigned int) (folders.size()) - 1; + + if (level > 0 || displayLevel0) { + // replace the virtual folder name by a localized text + if (currDir == "${U}") { + currDir = M ("PROFILEPANEL_MYPROFILES"); + } else if (currDir == "${G}") { + currDir = M ("PROFILEPANEL_GLOBALPROFILES"); + } + + // add this localized text to the file list + entries.push_back ( new ProfileStoreEntry (currDir, PSET_FOLDER, parentId, folder) ); + } + + // walking through the directory + Glib::Dir* dir = new Glib::Dir (realPath); + + for (Glib::DirIterator i = dir->begin(); i != dir->end(); ++i) { + currDir = *i; + + if (currDir == "." || currDir == "..") { + continue; + } + + Glib::ustring fname = Glib::build_filename (realPath, currDir); + + if (Glib::file_test (fname, Glib::FILE_TEST_IS_DIR)) { + Glib::ustring vp (Glib::build_filename (virtualPath, currDir)); + Glib::ustring rp (Glib::build_filename (realPath, currDir)); + fileFound = parseDir (rp, vp, currDir, folder, level + 1, 0); + } else { + size_t lastdot = currDir.find_last_of ('.'); + + if (lastdot != Glib::ustring::npos && lastdot == currDir.length() - 4 && currDir.substr (lastdot).casefold() == paramFileExtension) { + // file found + if ( options.rtSettings.verbose ) { + printf ("Processing file %s...", fname.c_str()); + } + + Glib::ustring name = currDir.substr (0, lastdot); + + // create the partial profile + AutoPartialProfile *pProf = new AutoPartialProfile(); + int res = pProf->load (fname); + + if (!res && pProf->pparams->ppVersion >= 220) { + fileFound = true; + + if ( options.rtSettings.verbose ) { + printf ("OK\n"); + } + + // adding this file to the list + ProfileStoreEntry* filePSE = new ProfileStoreEntry (name, PSET_FILE, folder, 0); + entries.push_back (filePSE); + + // map the partial profile + partProfiles[filePSE] = pProf; + //partProfiles.insert( std::pair (filePSE, pProf) ); + } else if ( options.rtSettings.verbose ) { + printf ("failed!\n"); + } + } + } + } + + delete dir; + } + + if (!fileFound && (level > 0 || displayLevel0)) { + // no files found in this level, we delete the subdirectory entry + folders.pop_back(); + + delete entries.back(); + entries.pop_back(); + } + + return fileFound; +} + +int ProfileStore::findFolderId (const Glib::ustring &path) +{ + // initialization must have been done when calling this + for (std::vector::iterator i = folders.begin(); i != folders.end(); ++i) { + if (*i == path) { + return i - folders.begin(); + } + } + + return -1; +} + +/** @brief Return the ProfileStoreEntry object that match the given file and path + * + * @param fullPath Path of the file; the filename may end by the standard extension, + * but have to begin with a virtual location ( ${G} or ${U} ) + * Will return null on invalid path or if the entry can't be found + */ +const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU (Glib::ustring path) +{ + if (path.empty()) { + return nullptr; + } + + if (storeState == STORESTATE_NOTINITIALIZED) { + parseProfilesOnce(); + } + + if (path == DEFPROFILE_INTERNAL || path == DEFPROFILE_DYNAMIC) { + return internalDefaultEntry; + } + + // consistently apply casefold() to make sure dot position is correct + const Glib::ustring casefolded_path = path.casefold(); + const Glib::ustring::size_type lastdot_pos = casefolded_path.find_last_of ('.'); + + if ( + lastdot_pos != Glib::ustring::npos + && lastdot_pos <= casefolded_path.size() - 4 + && !casefolded_path.compare (lastdot_pos, 4, paramFileExtension) + ) { + // removing the extension + // now use dot position without casefold() + path = path.substr (0, path.find_last_of ('.')); + } + + // dir separator may come from options file and may be \ or /, we convert them to G_DIR_SEPARATOR_S + if (path.size() > 4 && (path[4] == '/' || path[4] == '\\')) { + path = path.substr (0, 4) + G_DIR_SEPARATOR_S + path.substr (5); + } + + // removing the filename + Glib::ustring fName = Glib::path_get_basename (path); + + if (!fName.empty()) { + path = path.substr (0, path.length() - fName.length()); + } else { + // path is malformed, returning NULL; + return nullptr; + } + + path = Glib::path_get_dirname (path); + + // 1. find the path in the folder list + int parentFolderId = findFolderId (path); + + if (parentFolderId == -1) { + return nullptr; + } + + // 2. find the entry that match the given filename and parentFolderId + if (parentFolderId >= 0) { + for (auto entry : entries) { + if (entry->parentFolderId == parentFolderId && entry->label == fName) { + return entry; + } + } + } + + return nullptr; +} + +/** Protected version of findEntryFromFullPathU */ +const ProfileStoreEntry* ProfileStore::findEntryFromFullPath (Glib::ustring path) +{ + MyMutex::MyLock lock (parseMutex); + return findEntryFromFullPathU (path); +} + +const PartialProfile* ProfileStore::getProfile (Glib::ustring path) +{ + + if (storeState == STORESTATE_NOTINITIALIZED) { + parseProfilesOnce(); + } + + const ProfileStoreEntry *pse = findEntryFromFullPath (path); + + if (!pse) { + return nullptr; + } + + return getProfile (pse); +} + +const PartialProfile* ProfileStore::getProfile (const ProfileStoreEntry* entry) +{ + + if (storeState == STORESTATE_NOTINITIALIZED) { + parseProfilesOnce(); + } + + MyMutex::MyLock lock (parseMutex); + + if (entry == internalDefaultEntry) { + return internalDefaultProfile; + } + + std::map::iterator iter = partProfiles.find (entry); + + if (iter != partProfiles.end()) { + return iter->second; + } else { + // This shouldn't happen! +#ifndef NDEBUG + printf ("WARNING! Profile not found!\n"); +#endif + return nullptr; + } +} + +/** @brief Get a pointer to the profile's vector list + * + * This method grants you unique access to the vector list through Mutex locking. + * When you're done with the file list, you MUST call the releaseFileList method to release the lock. + */ +const std::vector* ProfileStore::getFileList () +{ + + if (storeState == STORESTATE_NOTINITIALIZED) { + parseProfilesOnce(); + } + + parseMutex.lock(); + + return &entries; +} + +void ProfileStore::releaseFileList() +{ + parseMutex.unlock(); +} + +/* + * Send back a pointer to the default procparams for raw or standard images. + * If the profile doesn't already exist in the profile list, + * it will add it with default internal values, so this method never fails + */ +const ProcParams* ProfileStore::getDefaultProcParams (bool isRaw) +{ + + //Note: the mutex is locked in getProfile, called below + // eventual initialization is done there too + + const PartialProfile* pProf = getProfile (isRaw ? options.defProfRaw : options.defProfImg); + + if (!pProf) { + pProf = internalDefaultProfile; + } + + return pProf->pparams; +} + +/* + * Send back a pointer to the default partial profile for raw or standard images. + * If it doesn't already exist in the profile list, it will add it with default internal values, + * so this method will never fails + */ +const PartialProfile* ProfileStore::getDefaultPartialProfile (bool isRaw) +{ + + //Note: the mutex is locked in getProfile, called below + // eventual initialization is done there too + + const PartialProfile* pProf = getProfile (isRaw ? options.defProfRaw : options.defProfImg); + + if (!pProf) { + pProf = internalDefaultProfile; + } + + return pProf; +} + +const Glib::ustring ProfileStore::getPathFromId (int folderId) +{ + // initialization must have been done when calling this + return folders.at (folderId); +} + + +void ProfileStore::clearFileList() +{ + for (auto entry : entries) { + if (entry != internalDefaultEntry) { + delete entry; + } + } + + entries.clear(); +} + +void ProfileStore::clearProfileList() +{ + for (auto partProfile : partProfiles) { + if (partProfile.second != internalDefaultProfile) { + delete partProfile.second; + } + } + + partProfiles.clear(); +} + +void ProfileStore::addListener (ProfileStoreListener *listener) +{ + listeners.push_back (listener); +} + +void ProfileStore::removeListener (ProfileStoreListener *listener) +{ + listeners.remove (listener); +} + +void ProfileStore::dumpFolderList() +{ + printf ("Folder list:\n------------\n"); + + for (unsigned int i = 0; i < folders.size(); i++) { + printf (" #%3ud - %s\n", i, folders.at (i).c_str()); + } + + printf ("\n"); +} + +PartialProfile *ProfileStore::loadDynamicProfile (const ImageMetaData *im) +{ + if (storeState == STORESTATE_NOTINITIALIZED) { + parseProfilesOnce(); + } + + PartialProfile *ret = new PartialProfile (true, true); + + if (!rulesLoaded) { + loadRules(); + } + + for (auto rule : dynamicRules) { + if (rule.matches (im)) { + if (options.rtSettings.verbose) { + printf ("found matching profile %s\n", rule.profilepath.c_str()); + } + + const PartialProfile *p = getProfile (rule.profilepath); + + if (p != nullptr) { + p->applyTo (ret->pparams); + } else { + printf ("ERROR loading matching profile from: %s\n", rule.profilepath.c_str()); + } + } + } + + return ret; +} + +ProfileStoreEntry::ProfileStoreEntry() : label (""), type (PSET_FOLDER), parentFolderId (0), folderId (0) {} + +ProfileStoreEntry::ProfileStoreEntry (Glib::ustring label, PSEType type, unsigned short parentFolder, unsigned short folder) : label (label), type (type), parentFolderId (parentFolder), folderId (folder) {} + +void ProfileStoreEntry::setValues (Glib::ustring label, PSEType type, unsigned short parentFolder, unsigned short folder) +{ + this->label = label; + this->type = type; + parentFolderId = parentFolder; + folderId = folder; +} + diff --git a/rtgui/profilestore.h b/rtengine/profilestore.h similarity index 68% rename from rtgui/profilestore.h rename to rtengine/profilestore.h index ab45a0867..372dbfc3b 100644 --- a/rtgui/profilestore.h +++ b/rtengine/profilestore.h @@ -23,13 +23,14 @@ #include #include -#include "../rtengine/rtengine.h" -#include "../rtengine/noncopyable.h" +#include "rtengine.h" +#include "noncopyable.h" +#include "dynamicprofile.h" -#include "threadutils.h" -#include "paramsedited.h" -#include "guiutils.h" +// forward decl +class DynamicProfileRule; +class DynamicProfileRules; /** @brief This will implement callback functions for the ProfileStore * @@ -80,7 +81,7 @@ public: * @param parentFolder index of the elements's path in the folder list * @param folder index of the folder's own path in the folder list */ - ProfileStoreEntry(Glib::ustring label, PSEType type, unsigned short parentFolder, unsigned short folder); + ProfileStoreEntry (Glib::ustring label, PSEType type, unsigned short parentFolder, unsigned short folder); /** @brief Set the values of the object after its instantiation * @param label Label to be used in menu or combobox; also used as profile's filename @@ -88,31 +89,7 @@ public: * @param parentFolder index of the elements's path in the folder list * @param folder index of the folder's own path in the folder list */ - void setValues(Glib::ustring label, PSEType type, unsigned short parentFolder, unsigned short folder); -}; - - -/** - * @brief subclass of Gtk::Label with extra fields for Combobox and Menu, to link with a ProfileStoreEntry - */ -class ProfileStoreLabel : public Gtk::Label -{ - -public: - const ProfileStoreEntry *entry; - -#ifndef NDEBUG - ProfileStoreLabel() : Gtk::Label("*** error ***"), entry(nullptr) {} -#else - ProfileStoreLabel() : Gtk::Label(""), entry(NULL) {} -#endif - - /** @brief Create a new ProfileStoreLabel - * - * @param entry Pointer to the ProfileStoreEntry object, be it a directory or a file - */ - explicit ProfileStoreLabel(const ProfileStoreEntry *entry); - ProfileStoreLabel (const ProfileStoreLabel &other); + void setValues (Glib::ustring label, PSEType type, unsigned short parentFolder, unsigned short folder); }; @@ -121,29 +98,31 @@ public: * This store can be queried by the GUI to display a Tree of the profiles available * in the user's and system's profile directory and subdirectories. */ -class ProfileStore : - public rtengine::NonCopyable +class ProfileStore : public rtengine::NonCopyable, public DynamicProfileRules { typedef enum { STORESTATE_NOTINITIALIZED, + STORESTATE_LIGHTWEIGHT, STORESTATE_BEINGINITIALIZED, STORESTATE_INITIALIZED, + STORESTATE_DIRTY, STORESTATE_DELETED } StoreState; private: struct SortProfiles { - bool operator ()(const ProfileStoreEntry* const a1, const ProfileStoreEntry* const a2) + bool operator () (const ProfileStoreEntry* const a1, const ProfileStoreEntry* const a2) { return a1->parentFolderId == a2->parentFolderId ? a1->label < a2->label : a1->parentFolderId < a2->parentFolderId; } }; - MyMutex *parseMutex; + MyMutex parseMutex; StoreState storeState; rtengine::procparams::AutoPartialProfile *internalDefaultProfile; ProfileStoreEntry *internalDefaultEntry; + ProfileStoreEntry *internalDynamicEntry; /** Alphabetically ordered list of folder and files through Gtk::Label sub-class; * ready to be used in Menu and Combobox @@ -160,6 +139,9 @@ private: /** List of the client of this store */ std::list listeners; + /** whereas we have to load all profile at init time or one by one upon request */ + bool loadAll; + /** @brief Method to recursively parse a profile folder with a level depth arbitrarily limited to 3 * * @param realPath current full path of the scanned directory ; e.g.: ~/MyProfiles/ @@ -172,76 +154,50 @@ private: * if false, only one root directory is expected */ bool parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath, Glib::ustring& currDir, unsigned int parentId, unsigned char level, bool displayLevel0); + /** @brief Will parse the profiles's dir only once. Subsequent call to this function will be ignored unless the profile list has been cleared + */ + void parseProfilesOnce (); + /** @brief Will scan the directory to fill the profile list + */ void _parseProfiles (); void clearFileList (); void clearProfileList (); - const ProfileStoreEntry* findEntryFromFullPathU(Glib::ustring path); + const ProfileStoreEntry* findEntryFromFullPathU (Glib::ustring path); public: ProfileStore(); ~ProfileStore(); - bool init (); + static ProfileStore* getInstance(); + + bool init (bool loadAll = true); void parseProfiles (); - int findFolderId(const Glib::ustring &path); - const ProfileStoreEntry* findEntryFromFullPath(Glib::ustring path); + int findFolderId (const Glib::ustring &path); + const ProfileStoreEntry* findEntryFromFullPath (Glib::ustring path); const rtengine::procparams::PartialProfile* getProfile (Glib::ustring path); const rtengine::procparams::PartialProfile* getProfile (const ProfileStoreEntry* entry); const std::vector* getFileList (); void releaseFileList (); const rtengine::procparams::ProcParams* getDefaultProcParams (bool isRaw); const rtengine::procparams::PartialProfile* getDefaultPartialProfile (bool isRaw); - const Glib::ustring getPathFromId(int folderId); + const Glib::ustring getPathFromId (int folderId); const ProfileStoreEntry* getInternalDefaultPSE() { return internalDefaultEntry; } - void addListener(ProfileStoreListener *listener); - void removeListener(ProfileStoreListener *listener); + const ProfileStoreEntry* getInternalDynamicPSE() + { + return internalDynamicEntry; + } + + void addListener (ProfileStoreListener *listener); + void removeListener (ProfileStoreListener *listener); + + rtengine::procparams::PartialProfile* loadDynamicProfile (const rtengine::ImageMetaData *im); void dumpFolderList(); - }; -class ProfileStoreComboBox : public MyComboBox -{ - -protected: - class MethodColumns : public Gtk::TreeModel::ColumnRecord - { - public: - Gtk::TreeModelColumn label; - Gtk::TreeModelColumn profileStoreEntry; - MethodColumns() - { - add(label); - add(profileStoreEntry); - } - }; - - Glib::RefPtr refTreeModel; - MethodColumns methodColumns; - void refreshProfileList_ (Gtk::TreeModel::Row *parentRow, int parentFolderId, bool initial, const std::vector *entryList); - Gtk::TreeIter findRowFromEntry_ (Gtk::TreeModel::Children childs, const ProfileStoreEntry *pse); - Gtk::TreeIter findRowFromFullPath_(Gtk::TreeModel::Children childs, int parentFolderId, Glib::ustring &name); - -public: - ProfileStoreComboBox(); - void updateProfileList(); - Glib::ustring getCurrentLabel(); - const ProfileStoreEntry* getSelectedEntry(); - Gtk::TreeIter findRowFromEntry (const ProfileStoreEntry *pse); - Gtk::TreeIter findRowFromFullPath (Glib::ustring path); - Glib::ustring getFullPathFromActiveRow (); - bool setActiveRowFromFullPath (Glib::ustring oldPath); - bool setActiveRowFromEntry (const ProfileStoreEntry *pse); - bool setInternalEntry (); - Gtk::TreeIter getRowFromLabel(Glib::ustring name); - Gtk::TreeIter addRow(const ProfileStoreEntry *profileStoreEntry); -}; - -extern ProfileStore profileStore; - #endif diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index 1a8488c76..f36e798d9 100644 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -4,16 +4,18 @@ * Created on: 20/nov/2010 */ -#include "rawimage.h" -#include "settings.h" -#include "camconst.h" -#include "utils.h" +#include #ifdef WIN32 #include #else #include #endif +#include "rawimage.h" +#include "settings.h" +#include "camconst.h" +#include "utils.h" + namespace rtengine { @@ -23,9 +25,9 @@ RawImage::RawImage( const Glib::ustring &name ) : data(nullptr) , prefilters(0) , filename(name) + , rotate_deg(0) , profile_data(nullptr) , allocation(nullptr) - , rotate_deg(0) { memset(maximum_c4, 0, sizeof(maximum_c4)); RT_matrix_from_constant = 0; @@ -37,6 +39,7 @@ RawImage::~RawImage() { if(ifp) { fclose(ifp); + ifp = nullptr; } if( image ) { @@ -82,9 +85,9 @@ eSensorType RawImage::getSensorType() */ void RawImage::get_colorsCoeff( float *pre_mul_, float *scale_mul_, float *cblack_, bool forceAutoWB) { - unsigned row, col, x, y, c, sum[8]; - unsigned W = this->get_width(); - unsigned H = this->get_height(); + unsigned sum[8], c; + unsigned W = this->get_width(); + unsigned H = this->get_height(); float val; double dsum[8], dmin, dmax; @@ -95,6 +98,9 @@ void RawImage::get_colorsCoeff( float *pre_mul_, float *scale_mul_, float *cblac pre_mul_[c] = this->get_pre_mul(c); } } else if ((this->get_cblack(4) + 1) / 2 == 1 && (this->get_cblack(5) + 1) / 2 == 1) { + for (int c = 0; c < 4; c++) { + cblack_[c] = this->get_cblack(c); + } for (int c = 0; c < 4; c++) { cblack_[FC(c / 2, c % 2)] = this->get_cblack(6 + c / 2 % this->get_cblack(4) * this->get_cblack(5) + c % 2 % this->get_cblack(5)); pre_mul_[c] = this->get_pre_mul(c); @@ -106,7 +112,7 @@ void RawImage::get_colorsCoeff( float *pre_mul_, float *scale_mul_, float *cblac } } - if ( this->get_cam_mul(0) == -1 || forceAutoWB) { + if (data && (this->get_cam_mul(0) == -1 || forceAutoWB)) { memset(dsum, 0, sizeof dsum); if (this->isBayer()) { @@ -116,7 +122,7 @@ void RawImage::get_colorsCoeff( float *pre_mul_, float *scale_mul_, float *cblac dsum[FC(1, 0) + 4] += (int)(((W + 1) / 2) * (H / 2)); dsum[FC(1, 1) + 4] += (int)((W / 2) * (H / 2)); - #pragma omp parallel private(val,row,col,x,y) + #pragma omp parallel private(val) { double dsumthr[8]; memset(dsumthr, 0, sizeof dsumthr); @@ -133,15 +139,15 @@ void RawImage::get_colorsCoeff( float *pre_mul_, float *scale_mul_, float *cblac float *tempdata = data[0]; #pragma omp for nowait - for (row = 0; row < H; row += 8) { - int ymax = row + 8 < H ? row + 8 : H; + for (size_t row = 0; row < H; row += 8) { + size_t ymax = row + 8 < H ? row + 8 : H; - for (col = 0; col < W ; col += 8) { - int xmax = col + 8 < W ? col + 8 : W; + for (size_t col = 0; col < W ; col += 8) { + size_t xmax = col + 8 < W ? col + 8 : W; memset(sum, 0, sizeof sum); - for (y = row; y < ymax; y++) - for (x = col; x < xmax; x++) { + for (size_t y = row; y < ymax; y++) + for (size_t x = col; x < xmax; x++) { int c = FC(y, x); val = tempdata[y * W + x]; @@ -202,13 +208,13 @@ skip_block2: #pragma omp for nowait - for (int row = 0; row < H; row += 8) - for (int col = 0; col < W ; col += 8) + for (size_t row = 0; row < H; row += 8) + for (size_t col = 0; col < W ; col += 8) { memset(sum, 0, sizeof sum); - for (int y = row; y < row + 8 && y < H; y++) - for (int x = col; x < col + 8 && x < W; x++) { + for (size_t y = row; y < row + 8 && y < H; y++) + for (size_t x = col; x < col + 8 && x < W; x++) { int c = XTRANSFC(y, x); float val = data[y][x]; @@ -246,12 +252,12 @@ skip_block3: pre_mul_[c] = 1; } } else { - for (row = 0; row < H; row += 8) - for (col = 0; col < W ; col += 8) { + for (size_t row = 0; row < H; row += 8) + for (size_t col = 0; col < W ; col += 8) { memset(sum, 0, sizeof sum); - for (y = row; y < row + 8 && y < H; y++) - for (x = col; x < col + 8 && x < W; x++) + for (size_t y = row; y < row + 8 && y < H; y++) + for (size_t x = col; x < col + 8 && x < W; x++) for (int c = 0; c < 3; c++) { if (this->isBayer()) { c = FC(y, x); @@ -292,8 +298,8 @@ skip_block: } else { memset(sum, 0, sizeof sum); - for (row = 0; row < 8; row++) - for (col = 0; col < 8; col++) { + for (size_t row = 0; row < 8; row++) + for (size_t col = 0; col < 8; col++) { int c = FC(row, col); if ((val = white[row][col] - cblack_[c]) > 0) { @@ -398,14 +404,18 @@ skip_block: } } -int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistener, double progressRange) +int RawImage::loadRaw (bool loadData, unsigned int imageNum, bool closeFile, ProgressListener *plistener, double progressRange) { ifname = filename.c_str(); image = nullptr; verbose = settings->verbose; oprof = nullptr; - ifp = gfopen (ifname); // Maps to either file map or direct fopen + if(!ifp) { + ifp = gfopen (ifname); // Maps to either file map or direct fopen + } else { + fseek (ifp, 0, SEEK_SET); + } if (!ifp) { return 3; @@ -422,7 +432,12 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene raw_image = nullptr; //***************** Read ALL raw file info - identify (); + // set the number of the frame to extract. If the number is larger then number of existing frames - 1, dcraw will handle that correctly + + shot_select = imageNum; + identify(); + // in case dcraw didn't handle the above mentioned case... + shot_select = std::min(shot_select, std::max(is_raw, 1u) - 1); if (!is_raw) { fclose(ifp); @@ -435,6 +450,10 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene return 2; } + if(!strcmp(make,"Fujifilm") && raw_height * raw_width * 2u != raw_size) { + parse_fuji_compressed_header(); + } + if (flip == 5) { this->rotate_deg = 270; } else if (flip == 3) { @@ -534,7 +553,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene free (raw_image); raw_image = nullptr; } else { - if (is_foveon && cc && cc->has_rawCrop()) { // foveon images + if (get_maker() == "Sigma" && cc && cc->has_rawCrop()) { // foveon images int lm, tm, w, h; cc->get_rawCrop(lm, tm, w, h); left_margin = lm; @@ -593,7 +612,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene if(tiff_bps > 0 && maximum_c4[i] > 0 && !isFoveon()) { unsigned compare = ((uint64_t)1 << tiff_bps) - 1; // use uint64_t to avoid overflow if tiff_bps == 32 - while(maximum_c4[i] > compare) { + while(static_cast(maximum_c4[i]) > compare) { maximum_c4[i] >>= 1; } } @@ -621,7 +640,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene } for (int c = 0; c < 4; c++) { - if (cblack[c] < black_c4[c]) { + if (static_cast(cblack[c]) < black_c4[c]) { cblack[c] = black_c4[c]; } } @@ -654,7 +673,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene return 0; } -float** RawImage::compress_image() +float** RawImage::compress_image(int frameNum) { if( !image ) { return nullptr; @@ -662,11 +681,12 @@ float** RawImage::compress_image() if (isBayer() || isXtrans()) { if (!allocation) { - allocation = new float[height * width]; + // shift the beginning of all frames but the first by 32 floats to avoid cache miss conflicts on CPUs which have <= 4-way associative L1-Cache + allocation = new float[height * width + frameNum * 32]; data = new float*[height]; for (int i = 0; i < height; i++) { - data[i] = allocation + i * width; + data[i] = allocation + i * width + frameNum * 32; } } } else if (colors == 1) { @@ -723,6 +743,10 @@ float** RawImage::compress_image() this->data[row][col] = image[row * width + col][0]; } } else { + if(get_maker() == "Sigma" && dng_version) { // Hack to prevent sigma dng files from crashing + height -= top_margin; + width -= left_margin; + } #pragma omp parallel for for (int row = 0; row < height; row++) @@ -763,7 +787,7 @@ RawImage::is_ppmThumb() const !thumb_load_raw ); } -void RawImage::getXtransMatrix( char XtransMatrix[6][6]) +void RawImage::getXtransMatrix( int XtransMatrix[6][6]) { for(int row = 0; row < 6; row++) for(int col = 0; col < 6; col++) { @@ -1058,7 +1082,7 @@ DCraw::dcraw_coeff_overrides(const char make[], const char model[], const int is char name[strlen(make) + strlen(model) + 32]; sprintf(name, "%s %s", make, model); - for (int i = 0; i < sizeof table / sizeof(table[0]); i++) { + for (size_t i = 0; i < sizeof table / sizeof(table[0]); i++) { if (strcasecmp(name, table[i].prefix) == 0) { *black_level = table[i].black_level; *white_level = table[i].white_level; diff --git a/rtengine/rawimage.h b/rtengine/rawimage.h index b741a7ffc..62752b59c 100644 --- a/rtengine/rawimage.h +++ b/rtengine/rawimage.h @@ -106,7 +106,7 @@ public: explicit RawImage( const Glib::ustring &name ); ~RawImage(); - int loadRaw (bool loadData = true, bool closeFile = true, ProgressListener *plistener = nullptr, double progressRange = 1.0); + int loadRaw (bool loadData, unsigned int imageNum = 0, bool closeFile = true, ProgressListener *plistener = nullptr, double progressRange = 1.0); void get_colorsCoeff( float* pre_mul_, float* scale_mul_, float* cblack_, bool forceAutoWB ); void set_prefilters() { @@ -119,23 +119,16 @@ public: { return image; } - float** compress_image(); // revert to compressed pixels format and release image data + float** compress_image(int frameNum); // revert to compressed pixels format and release image data float** data; // holds pixel values, data[i][j] corresponds to the ith row and jth column unsigned prefilters; // original filters saved ( used for 4 color processing ) + unsigned int getFrameCount() const { return is_raw; } protected: Glib::ustring filename; // complete filename int rotate_deg; // 0,90,180,270 degree of rotation: info taken by dcraw from exif char* profile_data; // Embedded ICC color profile float* allocation; // pointer to allocated memory int maximum_c4[4]; - bool isBayer() const - { - return (filters != 0 && filters != 9); - } - bool isXtrans() const - { - return filters == 9; - } bool isFoveon() const { return is_foveon; @@ -179,13 +172,7 @@ public: eSensorType getSensorType(); void getRgbCam (float rgbcam[3][4]); - void getXtransMatrix ( char xtransMatrix[6][6]); - void clearXtransCblack( ) - { - for(int c = 0; c < 4; c++) { - cblack[c] = 0; - } - } + void getXtransMatrix ( int xtransMatrix[6][6]); unsigned get_filters() const { return filters; @@ -307,16 +294,18 @@ public: return zero_is_bad == 1; } + bool isBayer() const + { + return (filters != 0 && filters != 9); + } + + bool isXtrans() const + { + return filters == 9; + } + public: // dcraw functions - void scale_colors() - { - if(isXtrans()) { - clearXtransCblack( ); - } - - DCraw::scale_colors(); - } void pre_interpolate() { DCraw::pre_interpolate(); @@ -356,6 +345,10 @@ public: return (xtrans[(row) % 6][(col) % 6]); } + unsigned DNGVERSION ( ) const + { + return dng_version; + } }; } diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 049c509f5..148d17ee9 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -37,7 +37,7 @@ #include #endif #include "opthelper.h" -//#define BENCHMARK +#define BENCHMARK #include "StopWatch.h" #define clipretinex( val, minv, maxv ) (( val = (val < minv ? minv : val ) ) > maxv ? maxv : val ) #undef CLIPD @@ -101,10 +101,10 @@ void transLineFuji (const float* const red, const float* const green, const floa int y = i + j - fw; int x = fw - i + j; - if (x >= 0 && y < image->height && y >= 0 && x < image->width) { - image->r(image->height - 1 - y, image->width - 1 - x) = red[j]; - image->g(image->height - 1 - y, image->width - 1 - x) = green[j]; - image->b(image->height - 1 - y, image->width - 1 - x) = blue[j]; + if (x >= 0 && y < image->getHeight() && y >= 0 && x < image->getWidth()) { + image->r(image->getHeight() - 1 - y, image->getWidth() - 1 - x) = red[j]; + image->g(image->getHeight() - 1 - y, image->getWidth() - 1 - x) = green[j]; + image->b(image->getHeight() - 1 - y, image->getWidth() - 1 - x) = blue[j]; } } @@ -115,10 +115,10 @@ void transLineFuji (const float* const red, const float* const green, const floa int y = i + j - fw; int x = fw - i + j; - if (x >= 0 && x < image->height && y >= 0 && y < image->width) { - image->r(image->height - 1 - x, y) = red[j]; - image->g(image->height - 1 - x, y) = green[j]; - image->b(image->height - 1 - x, y) = blue[j]; + if (x >= 0 && x < image->getHeight() && y >= 0 && y < image->getWidth()) { + image->r(image->getHeight() - 1 - x, y) = red[j]; + image->g(image->getHeight() - 1 - x, y) = green[j]; + image->b(image->getHeight() - 1 - x, y) = blue[j]; } } @@ -129,10 +129,10 @@ void transLineFuji (const float* const red, const float* const green, const floa int y = i + j - fw; int x = fw - i + j; - if (x >= 0 && y < image->width && y >= 0 && x < image->height) { - image->r(x, image->width - 1 - y) = red[j]; - image->g(x, image->width - 1 - y) = green[j]; - image->b(x, image->width - 1 - y) = blue[j]; + if (x >= 0 && y < image->getWidth() && y >= 0 && x < image->getHeight()) { + image->r(x, image->getWidth() - 1 - y) = red[j]; + image->g(x, image->getWidth() - 1 - y) = green[j]; + image->b(x, image->getWidth() - 1 - y) = blue[j]; } } @@ -144,7 +144,7 @@ void transLineFuji (const float* const red, const float* const green, const floa int y = i + j - fw; int x = fw - i + j; - if (x >= 0 && y < image->height && y >= 0 && x < image->width) { + if (x >= 0 && y < image->getHeight() && y >= 0 && x < image->getWidth()) { image->r(y, x) = red[j]; image->g(y, x) = green[j]; image->b(y, x) = blue[j]; @@ -425,25 +425,6 @@ RawImageSource::RawImageSource () : ImageSource() , W(0), H(0) , plistener(nullptr) - , border(4) - , ri(nullptr) - , cache(nullptr) - , rawData(0, 0) - , green(0, 0) - , red(0, 0) - , blue(0, 0) - , lc00(0.0) - , lc01(0.0) - , lc02(0.0) - , lc10(0.0) - , lc11(0.0) - , lc12(0.0) - , lc20(0.0) - , lc21(0.0) - , lc22(0.0) - , hlmax{} - , clmax{} - , chmax{} , scale_mul{} , c_black{} , c_white{} @@ -458,14 +439,37 @@ RawImageSource::RawImageSource () , cam_xyz{} , fuji(false) , d1x(false) + , border(4) + , chmax{} + , hlmax{} + , clmax{} , initialGain(0.0) , camInitialGain(0.0) , defGain(0.0) + , ri(nullptr) + , lc00(0.0) + , lc01(0.0) + , lc02(0.0) + , lc10(0.0) + , lc11(0.0) + , lc12(0.0) + , lc20(0.0) + , lc21(0.0) + , lc22(0.0) + , cache(nullptr) , threshold(0) + , rawData(0, 0) + , green(0, 0) + , red(0, 0) + , blue(0, 0) + , rawDirty(true) { camProfile = nullptr; embProfile = nullptr; rgbSourceModified = false; + for(int i = 0; i < 4; ++i) { + psRedBrightness[i] = psGreenBrightness[i] = psBlueBrightness[i] = 1.f; + } } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -475,8 +479,12 @@ RawImageSource::~RawImageSource () delete idata; - if (ri) { - delete ri; + for(size_t i = 0; i < numFrames; ++i) { + delete riFrames[i]; + } + + for(size_t i = 0; i < numFrames - 1; ++i) { + delete rawDataBuffer[i]; } flushRGB(); @@ -497,19 +505,20 @@ RawImageSource::~RawImageSource () //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -void RawImageSource::transformRect (PreviewProps pp, int tran, int &ssx1, int &ssy1, int &width, int &height, int &fw) +void RawImageSource::transformRect (const PreviewProps &pp, int tran, int &ssx1, int &ssy1, int &width, int &height, int &fw) { - - pp.x += border; - pp.y += border; + int pp_x = pp.getX() + border; + int pp_y = pp.getY() + border; + int pp_width = pp.getWidth(); + int pp_height = pp.getHeight(); if (d1x) { if ((tran & TR_ROT) == TR_R90 || (tran & TR_ROT) == TR_R270) { - pp.x /= 2; - pp.w = pp.w / 2 + 1; + pp_x /= 2; + pp_width = pp_width / 2 + 1; } else { - pp.y /= 2; - pp.h = pp.h / 2 + 1; + pp_y /= 2; + pp_height = pp_height / 2 + 1; } } @@ -527,44 +536,44 @@ void RawImageSource::transformRect (PreviewProps pp, int tran, int &ssx1, int &s sh = w; } - if( pp.w > sw - 2 * border) { - pp.w = sw - 2 * border; + if( pp_width > sw - 2 * border) { + pp_width = sw - 2 * border; } - if( pp.h > sh - 2 * border) { - pp.h = sh - 2 * border; + if( pp_height > sh - 2 * border) { + pp_height = sh - 2 * border; } - int ppx = pp.x, ppy = pp.y; + int ppx = pp_x, ppy = pp_y; if (tran & TR_HFLIP) { - ppx = sw - pp.x - pp.w; + ppx = max(sw - pp_x - pp_width, 0); } if (tran & TR_VFLIP) { - ppy = sh - pp.y - pp.h; + ppy = max(sh - pp_y - pp_height, 0); } int sx1 = ppx; // assuming it's >=0 int sy1 = ppy; // assuming it's >=0 - int sx2 = max(ppx + pp.w, w - 1); - int sy2 = max(ppy + pp.h, h - 1); + int sx2 = min(ppx + pp_width, w - 1); + int sy2 = min(ppy + pp_height, h - 1); if ((tran & TR_ROT) == TR_R180) { - sx1 = max(w - ppx - pp.w, 0); - sy1 = max(h - ppy - pp.h, 0); - sx2 = min(sx1 + pp.w, w - 1); - sy2 = min(sy1 + pp.h, h - 1); + sx1 = max(w - ppx - pp_width, 0); + sy1 = max(h - ppy - pp_height, 0); + sx2 = min(sx1 + pp_width, w - 1); + sy2 = min(sy1 + pp_height, h - 1); } else if ((tran & TR_ROT) == TR_R90) { sx1 = ppy; - sy1 = max(h - ppx - pp.w, 0); - sx2 = min(sx1 + pp.h, w - 1); - sy2 = min(sy1 + pp.w, h - 1); + sy1 = max(h - ppx - pp_width, 0); + sx2 = min(sx1 + pp_height, w - 1); + sy2 = min(sy1 + pp_width, h - 1); } else if ((tran & TR_ROT) == TR_R270) { - sx1 = max(w - ppy - pp.h, 0); + sx1 = max(w - ppy - pp_height, 0); sy1 = ppx; - sx2 = min(sx1 + pp.h, w - 1); - sy2 = min(sy1 + pp.w, h - 1); + sx2 = min(sx1 + pp_height, w - 1); + sy2 = min(sy1 + pp_width, h - 1); } if (fuji) { @@ -574,14 +583,14 @@ void RawImageSource::transformRect (PreviewProps pp, int tran, int &ssx1, int &s ssy1 = (sy1 - sx2 ) / 2 + ri->get_FujiWidth(); int ssx2 = (sx2 + sy2) / 2 + 1; int ssy2 = (sy2 - sx1) / 2 + ri->get_FujiWidth(); - fw = (sx2 - sx1) / 2 / pp.skip; - width = (ssx2 - ssx1) / pp.skip + ((ssx2 - ssx1) % pp.skip > 0); - height = (ssy2 - ssy1) / pp.skip + ((ssy2 - ssy1) % pp.skip > 0); + fw = (sx2 - sx1) / 2 / pp.getSkip(); + width = (ssx2 - ssx1) / pp.getSkip() + ((ssx2 - ssx1) % pp.getSkip() > 0); + height = (ssy2 - ssy1) / pp.getSkip() + ((ssy2 - ssy1) % pp.getSkip() > 0); } else { ssx1 = sx1; ssy1 = sy1; - width = (sx2 - sx1) / pp.skip + ((sx2 - sx1) % pp.skip > 0); - height = (sy2 - sy1) / pp.skip + ((sy2 - sy1) % pp.skip > 0); + width = (sx2 - sx1) / pp.getSkip() + ((sx2 - sx1) % pp.getSkip() > 0); + height = (sy2 - sy1) / pp.getSkip() + ((sy2 - sy1) % pp.getSkip() > 0); } } @@ -667,18 +676,18 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima defGain = 0.0; // compute image area to render in order to provide the requested part of the image - int sx1, sy1, imwidth, imheight, fw, d1xHeightOdd; + int sx1, sy1, imwidth, imheight, fw, d1xHeightOdd = 0; transformRect (pp, tran, sx1, sy1, imwidth, imheight, fw); // check possible overflows int maximwidth, maximheight; if ((tran & TR_ROT) == TR_R90 || (tran & TR_ROT) == TR_R270) { - maximwidth = image->height; - maximheight = image->width; + maximwidth = image->getHeight(); + maximheight = image->getWidth(); } else { - maximwidth = image->width; - maximheight = image->height; + maximwidth = image->getWidth(); + maximheight = image->getHeight(); } if (d1x) { @@ -699,7 +708,15 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima imheight = maximheight; } - int maxx = this->W, maxy = this->H, skip = pp.skip; + if (fuji) { // zero image to avoid access to uninitialized values in further processing because fuji super-ccd processing is not clean... + for (int i = 0; i < image->getHeight(); ++i) { + for (int j = 0; j < image->getWidth(); ++j) { + image->r(i, j) = image->g(i, j) = image->b(i, j) = 0; + } + } + } + + int maxx = this->W, maxy = this->H, skip = pp.getSkip(); // raw clip levels after white balance hlmax[0] = clmax[0] * rm; @@ -735,7 +752,7 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1) { for (int j = 0, jx = sx1; j < imwidth; j++, jx += skip) { - jx = jx >= (maxx - skip) ? jx = maxx - skip - 1 : jx; // avoid trouble + jx = std::min(jx, maxx - skip - 1); // avoid trouble float rtot = 0.f, gtot = 0.f, btot = 0.f; @@ -818,18 +835,18 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima #endif if (fuji) { - int a = ((tran & TR_ROT) == TR_R90 && image->width % 2 == 0) || ((tran & TR_ROT) == TR_R180 && image->height % 2 + image->width % 2 == 1) || ((tran & TR_ROT) == TR_R270 && image->height % 2 == 0); + int a = ((tran & TR_ROT) == TR_R90 && image->getWidth() % 2 == 0) || ((tran & TR_ROT) == TR_R180 && image->getHeight() % 2 + image->getWidth() % 2 == 1) || ((tran & TR_ROT) == TR_R270 && image->getHeight() % 2 == 0); // first row - for (int j = 1 + a; j < image->width - 1; j += 2) { + for (int j = 1 + a; j < image->getWidth() - 1; j += 2) { image->r(0, j) = (image->r(1, j) + image->r(0, j + 1) + image->r(0, j - 1)) / 3; image->g(0, j) = (image->g(1, j) + image->g(0, j + 1) + image->g(0, j - 1)) / 3; image->b(0, j) = (image->b(1, j) + image->b(0, j + 1) + image->b(0, j - 1)) / 3; } // other rows - for (int i = 1; i < image->height - 1; i++) { - for (int j = 2 - (a + i + 1) % 2; j < image->width - 1; j += 2) { + for (int i = 1; i < image->getHeight() - 1; i++) { + for (int j = 2 - (a + i + 1) % 2; j < image->getWidth() - 1; j += 2) { // edge-adaptive interpolation double dh = (ABS(image->r(i, j + 1) - image->r(i, j - 1)) + ABS(image->g(i, j + 1) - image->g(i, j - 1)) + ABS(image->b(i, j + 1) - image->b(i, j - 1))) / 1.0; double dv = (ABS(image->r(i + 1, j) - image->r(i - 1, j)) + ABS(image->g(i + 1, j) - image->g(i - 1, j)) + ABS(image->b(i + 1, j) - image->b(i - 1, j))) / 1.0; @@ -848,20 +865,20 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima } // last pixel - if (2 - (a + i + image->width) % 2 == 2) { - image->r(i, image->width - 1) = (image->r(i + 1, image->width - 1) + image->r(i - 1, image->width - 1) + image->r(i, image->width - 2)) / 3; - image->g(i, image->width - 1) = (image->g(i + 1, image->width - 1) + image->g(i - 1, image->width - 1) + image->g(i, image->width - 2)) / 3; - image->b(i, image->width - 1) = (image->b(i + 1, image->width - 1) + image->b(i - 1, image->width - 1) + image->b(i, image->width - 2)) / 3; + if (2 - (a + i + image->getWidth()) % 2 == 2) { + image->r(i, image->getWidth() - 1) = (image->r(i + 1, image->getWidth() - 1) + image->r(i - 1, image->getWidth() - 1) + image->r(i, image->getWidth() - 2)) / 3; + image->g(i, image->getWidth() - 1) = (image->g(i + 1, image->getWidth() - 1) + image->g(i - 1, image->getWidth() - 1) + image->g(i, image->getWidth() - 2)) / 3; + image->b(i, image->getWidth() - 1) = (image->b(i + 1, image->getWidth() - 1) + image->b(i - 1, image->getWidth() - 1) + image->b(i, image->getWidth() - 2)) / 3; } } // last row - int b = (a == 1 && image->height % 2) || (a == 0 && image->height % 2 == 0); + int b = (a == 1 && image->getHeight() % 2) || (a == 0 && image->getHeight() % 2 == 0); - for (int j = 1 + b; j < image->width - 1; j += 2) { - image->r(image->height - 1, j) = (image->r(image->height - 2, j) + image->r(image->height - 1, j + 1) + image->r(image->height - 1, j - 1)) / 3; - image->g(image->height - 1, j) = (image->g(image->height - 2, j) + image->g(image->height - 1, j + 1) + image->g(image->height - 1, j - 1)) / 3; - image->b(image->height - 1, j) = (image->b(image->height - 2, j) + image->b(image->height - 1, j + 1) + image->b(image->height - 1, j - 1)) / 3; + for (int j = 1 + b; j < image->getWidth() - 1; j += 2) { + image->r(image->getHeight() - 1, j) = (image->r(image->getHeight() - 2, j) + image->r(image->getHeight() - 1, j + 1) + image->r(image->getHeight() - 1, j - 1)) / 3; + image->g(image->getHeight() - 1, j) = (image->g(image->getHeight() - 2, j) + image->g(image->getHeight() - 1, j + 1) + image->g(image->getHeight() - 1, j - 1)) / 3; + image->b(image->getHeight() - 1, j) = (image->b(image->getHeight() - 2, j) + image->b(image->getHeight() - 1, j + 1) + image->b(image->getHeight() - 1, j - 1)) / 3; } } @@ -875,7 +892,7 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima } // Colour correction (only when running on full resolution) - if(pp.skip == 1) { + if(pp.getSkip() == 1) { switch(ri->getSensorType()) { case ST_BAYER: processFalseColorCorrection (image, raw.bayersensor.ccSteps); @@ -883,6 +900,11 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima case ST_FUJI_XTRANS: processFalseColorCorrection (image, raw.xtranssensor.ccSteps); + break; + + case ST_FOVEON: + case ST_NONE: + break; } } } @@ -894,6 +916,9 @@ DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, ColorTemp & findInputProfile(cmp.input, nullptr, (static_cast(getMetaData()))->getCamera(), &dcpProf, dummy); if (dcpProf == nullptr) { + if (settings->verbose) { + printf("Can't load DCP profile '%s'!\n", cmp.input.c_str()); + } return nullptr; } @@ -912,7 +937,7 @@ void RawImageSource::convertColorSpace(Imagefloat* image, const ColorManagementP /* interpolateBadPixelsBayer: correct raw pixels looking at the bitmap * takes into consideration if there are multiple bad pixels in the neighbourhood */ -int RawImageSource::interpolateBadPixelsBayer( PixelsMap &bitmapBads ) +int RawImageSource::interpolateBadPixelsBayer( PixelsMap &bitmapBads, array2D &rawData ) { static const float eps = 1.f; int counter = 0; @@ -1153,8 +1178,7 @@ int RawImageSource::interpolateBadPixelsXtrans( PixelsMap &bitmapBads ) } float wtdsum = 0.f, norm = 0.f; - int pixelColor = ri->XTRANSFC(row, col); - float oldval = rawData[row][col]; + unsigned int pixelColor = ri->XTRANSFC(row, col); if(pixelColor == 1) { // green channel. A green pixel can either be a solitary green pixel or a member of a 2x2 square of green pixels @@ -1470,11 +1494,10 @@ void RawImageSource::getFullSize (int& w, int& h, int tr) //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -void RawImageSource::getSize (PreviewProps pp, int& w, int& h) +void RawImageSource::getSize (const PreviewProps &pp, int& w, int& h) { - - w = pp.w / pp.skip + (pp.w % pp.skip > 0); - h = pp.h / pp.skip + (pp.h % pp.skip > 0); + w = pp.getWidth() / pp.getSkip() + (pp.getWidth() % pp.getSkip() > 0); + h = pp.getHeight() / pp.getSkip() + (pp.getHeight() % pp.getSkip() > 0); } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1494,7 +1517,7 @@ void RawImageSource::vflip (Imagefloat* image) //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -int RawImageSource::load (const Glib::ustring &fname, bool batch) +int RawImageSource::load (const Glib::ustring &fname, int imageNum, bool batch) { MyTime t1, t2; @@ -1505,15 +1528,59 @@ int RawImageSource::load (const Glib::ustring &fname, bool batch) plistener->setProgressStr ("Decoding..."); plistener->setProgress (0.0); } - ri = new RawImage(fname); - int errCode = ri->loadRaw (true, true, plistener, 0.8); + int errCode = ri->loadRaw (false, 0, false); if (errCode) { return errCode; } + numFrames = ri->getFrameCount(); - ri->compress_image(); + errCode = 0; + + if(numFrames > 1) { +#ifdef _OPENMP + #pragma omp parallel +#endif + { + int errCodeThr = 0; +#ifdef _OPENMP + #pragma omp for nowait +#endif + for(unsigned int i = 0; i < numFrames; ++i) { + if(i == 0) { + riFrames[i] = ri; + errCodeThr = riFrames[i]->loadRaw (true, i, true, plistener, 0.8); + } else { + riFrames[i] = new RawImage(fname); + errCodeThr = riFrames[i]->loadRaw (true, i); + } + } +#ifdef _OPENMP + #pragma omp critical +#endif + { + errCode = errCodeThr ? errCodeThr : errCode; + } + } + } else { + riFrames[0] = ri; + errCode = riFrames[0]->loadRaw (true, 0, true, plistener, 0.8); + } + + if(!errCode) { + for(unsigned int i = 0; i < numFrames; ++i) { + riFrames[i]->compress_image(i); + } + } else { + return errCode; + } + + if(numFrames > 1 ) { // this disables multi frame support for Fuji S5 until I found a solution to handle different dimensions + if(riFrames[0]->get_width() != riFrames[1]->get_width() || riFrames[0]->get_height() != riFrames[1]->get_height()) { + numFrames = 1; + } + } if (plistener) { plistener->setProgress (0.9); @@ -1554,7 +1621,7 @@ int RawImageSource::load (const Glib::ustring &fname, bool batch) imatrices.xyz_cam[i][j] += xyz_sRGB[i][k] * imatrices.rgb_cam[k][j]; } - camProfile = iccStore->createFromMatrix (imatrices.xyz_cam, false, "Camera"); + camProfile = ICCStore::getInstance()->createFromMatrix (imatrices.xyz_cam, false, "Camera"); inverse33 (imatrices.xyz_cam, imatrices.cam_xyz); for (int c = 0; c < 4; c++) { @@ -1626,8 +1693,10 @@ int RawImageSource::load (const Glib::ustring &fname, bool batch) initialGain = 1.0 / min(pre_mul[0], pre_mul[1], pre_mul[2]); }*/ + for(unsigned int i = 0;i < numFrames; ++i) { + riFrames[i]->set_prefilters(); + } - ri->set_prefilters(); //Load complete Exif informations RawMetaDataLocation rml; @@ -1719,7 +1788,24 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le printf( "Flat Field Correction:%s\n", rif->get_filename().c_str()); } - copyOriginalPixels(raw, ri, rid, rif); + if(numFrames == 4) { + int bufferNumber = 0; + for(unsigned int i=0; i<4; ++i) { + if(i==currFrame) { + copyOriginalPixels(raw, ri, rid, rif, rawData); + rawDataFrames[i] = &rawData; + } else { + if(!rawDataBuffer[bufferNumber]) { + rawDataBuffer[bufferNumber] = new array2D; + } + rawDataFrames[i] = rawDataBuffer[bufferNumber]; + ++bufferNumber; + copyOriginalPixels(raw, riFrames[i], rid, rif, *rawDataFrames[i]); + } + } + } else { + copyOriginalPixels(raw, ri, rid, rif, rawData); + } //FLATFIELD end @@ -1759,8 +1845,13 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le } } - - scaleColors( 0, 0, W, H, raw); //+ + raw parameters for black level(raw.blackxx) + if(numFrames == 4) { + for(int i=0; i<4; ++i) { + scaleColors( 0, 0, W, H, raw, *rawDataFrames[i]); + } + } else { + scaleColors( 0, 0, W, H, raw, rawData); //+ + raw parameters for black level(raw.blackxx) + } // Correct vignetting of lens profile if (!hasFlatField && lensProf.useVign) { @@ -1769,15 +1860,34 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le if (pLCPProf) { // don't check focal length to allow distortion correction for lenses without chip, also pass dummy focal length 1 in case of 0 LCPMapper map(pLCPProf, max(idata->getFocalLen(), 1.0), idata->getFocalLen35mm(), idata->getFocusDist(), idata->getFNumber(), true, false, W, H, coarse, -1); + if (ri->getSensorType() == ST_BAYER || ri->getSensorType() == ST_FUJI_XTRANS || ri->get_colors() == 1) { + if(numFrames == 4) { + for(int i = 0; i < 4; ++i) { #ifdef _OPENMP - #pragma omp parallel for + #pragma omp parallel for schedule(dynamic,16) #endif - for (int y = 0; y < H; y++) { - for (int x = 0; x < W; x++) { - if (rawData[y][x] > 0) { - rawData[y][x] *= map.calcVignetteFac(x, y); + for (int y = 0; y < H; y++) { + map.processVignetteLine(W, y, (*rawDataFrames[i])[y]); + } } + } else { + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for (int y = 0; y < H; y++) { + map.processVignetteLine(W, y, rawData[y]); + } + } + } else if(ri->get_colors() == 3) { +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) +#endif + + for (int y = 0; y < H; y++) { + map.processVignetteLine3Channels(W, y, rawData[y]); } } } @@ -1847,13 +1957,25 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le plistener->setProgress (0.0); } - green_equilibrate(0.01 * (raw.bayersensor.greenthresh)); + if(numFrames == 4) { + for(int i = 0; i < 4; ++i) { + green_equilibrate(0.01 * (raw.bayersensor.greenthresh), *rawDataFrames[i]); + } + } else { + green_equilibrate(0.01 * (raw.bayersensor.greenthresh), rawData); + } } if( totBP ) { if ( ri->getSensorType() == ST_BAYER ) { - interpolateBadPixelsBayer( *bitmapBads ); + if(numFrames == 4) { + for(int i = 0; i < 4; ++i) { + interpolateBadPixelsBayer( *bitmapBads, *rawDataFrames[i] ); + } + } else { + interpolateBadPixelsBayer( *bitmapBads, rawData ); + } } else if ( ri->getSensorType() == ST_FUJI_XTRANS ) { interpolateBadPixelsXtrans( *bitmapBads ); } else { @@ -1875,12 +1997,23 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le plistener->setProgressStr ("CA Auto Correction..."); plistener->setProgress (0.0); } - - CA_correct_RT(raw.cared, raw.cablue, 10.0 - raw.caautostrength); + if(numFrames == 4) { + for(int i=0; i<4; ++i) { + CA_correct_RT(raw.ca_autocorrect, raw.cared, raw.cablue, 8.0, *rawDataFrames[i]); + } + } else { + CA_correct_RT(raw.ca_autocorrect, raw.cared, raw.cablue, 8.0, rawData); + } } if ( raw.expos != 1 ) { - processRawWhitepoint(raw.expos, raw.preser); + if(numFrames == 4) { + for(int i = 0; i < 4; ++i) { + processRawWhitepoint(raw.expos, raw.preser, *rawDataFrames[i]); + } + } else { + processRawWhitepoint(raw.expos, raw.preser, rawData); + } } if(prepareDenoise && dirpyrdenoiseExpComp == INFINITY) { @@ -1902,6 +2035,7 @@ void RawImageSource::preprocess (const RAWParams &raw, const LensProfParams &le delete bitmapBads; } + rawDirty = true; return; } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1919,7 +2053,9 @@ void RawImageSource::demosaic(const RAWParams &raw) } else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::ahd] ) { ahd_demosaic (0, 0, W, H); } else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::amaze] ) { - amaze_demosaic_RT (0, 0, W, H); + amaze_demosaic_RT (0, 0, W, H, rawData, red, green, blue); + } else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::pixelshift] ) { + pixelshift(0, 0, W, H, raw.bayersensor, currFrame, ri->get_model(), raw.expos); } else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::dcb] ) { dcb_demosaic(raw.bayersensor.dcb_iterations, raw.bayersensor.dcb_enhance); } else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::eahd]) { @@ -1927,7 +2063,7 @@ void RawImageSource::demosaic(const RAWParams &raw) } else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::igv]) { igv_interpolate(W, H); } else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::lmmse]) { - lmmse_interpolate_omp(W, H, raw.bayersensor.lmmse_iterations); + lmmse_interpolate_omp(W, H, rawData, red, green, blue, raw.bayersensor.lmmse_iterations); } else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::fast] ) { fast_demosaic (0, 0, W, H); } else if (raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::mono] ) { @@ -1972,7 +2108,7 @@ void RawImageSource::demosaic(const RAWParams &raw) //void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexParams retinexParams, multi_array2D &conversionBuffer, LUTu &lhist16RETI) -void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexParams retinexParams, multi_array2D &conversionBuffer, LUTu &lhist16RETI) +void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, const RetinexParams &retinexParams, multi_array2D &conversionBuffer, LUTu &lhist16RETI) { bool useHsl = (retinexParams.retinexcolorspace == "HSLLOG" || retinexParams.retinexcolorspace == "HSLLIN"); conversionBuffer[0] (W - 2 * border, H - 2 * border); @@ -1980,7 +2116,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar conversionBuffer[2] (W - 2 * border, H - 2 * border); conversionBuffer[3] (W - 2 * border, H - 2 * border); - LUTf *retinexgamtab;//gamma before and after Retinex to restore tones + LUTf *retinexgamtab = nullptr;//gamma before and after Retinex to restore tones LUTf lutTonereti; if(retinexParams.gammaretinex == "low") { @@ -2074,7 +2210,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } } */ - if(retinexParams.gammaretinex != "none" && retinexParams.str != 0) {//gamma + if(retinexParams.gammaretinex != "none" && retinexParams.str != 0 && retinexgamtab) {//gamma #ifdef _OPENMP #pragma omp parallel for @@ -2165,8 +2301,8 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } } else { - TMatrix wprof = iccStore->workingSpaceMatrix (cmp.working); - float wp[3][3] = { + TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (cmp.working); + const float wp[3][3] = { {static_cast(wprof[0][0]), static_cast(wprof[0][1]), static_cast(wprof[0][2])}, {static_cast(wprof[1][0]), static_cast(wprof[1][1]), static_cast(wprof[1][2])}, {static_cast(wprof[2][0]), static_cast(wprof[2][1]), static_cast(wprof[2][2])} @@ -2226,7 +2362,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar } -void RawImageSource::retinexPrepareCurves(RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) +void RawImageSource::retinexPrepareCurves(const RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) { useHsl = (retinexParams.retinexcolorspace == "HSLLOG" || retinexParams.retinexcolorspace == "HSLLIN"); @@ -2241,7 +2377,7 @@ void RawImageSource::retinexPrepareCurves(RetinexParams retinexParams, LUTf &cdc retinexParams.getCurves(retinextransmissionCurve, retinexgaintransmissionCurve); } -void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &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) +void RawImageSource::retinex(ColorManagementParams cmp, const RetinexParams &deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &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) { MyTime t4, t5; t4.set(); @@ -2253,7 +2389,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC LUTf lutToneireti; lutToneireti(65536); - LUTf *retinexigamtab;//gamma before and after Retinex to restore tones + LUTf *retinexigamtab = nullptr;//gamma before and after Retinex to restore tones if(deh.gammaretinex == "low") { retinexigamtab = &(Color::igammatab_115_2); @@ -2442,7 +2578,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC } } else { - TMatrix wiprof = iccStore->workingSpaceInverseMatrix (cmp.working); + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (cmp.working); double wip[3][3] = { {wiprof[0][0], wiprof[0][1], wiprof[0][2]}, @@ -2713,7 +2849,7 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile float limitFactor = 1.f; if(raw.ff_AutoClipControl) { - int clipControlGui = 0; +// int clipControlGui = 0; for (int m = 0; m < 2; m++) for (int n = 0; n < 2; n++) { @@ -2758,7 +2894,7 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile } } - clipControlGui = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui +// clipControlGui = (1.f - limitFactor) * 100.f; // this value can be used to set the clip control slider in gui } else { limitFactor = max((float)(100 - raw.ff_clipControl) / 100.f, 0.01f); } @@ -2966,7 +3102,7 @@ void RawImageSource::processFlatField(const RAWParams &raw, RawImage *riFlatFile /* Copy original pixel data and * subtract dark frame (if present) from current image and apply flat field correction (if present) */ -void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, RawImage *riDark, RawImage *riFlatFile ) +void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, RawImage *riDark, RawImage *riFlatFile, array2D &rawData ) { // TODO: Change type of black[] to float to avoid conversions unsigned short black[4] = { @@ -3297,7 +3433,7 @@ SSEFUNCTION void RawImageSource::cfaboxblur(RawImage *riFlatFile, float* cfablur // Scale original pixels into the range 0 65535 using black offsets and multipliers -void RawImageSource::scaleColors(int winx, int winy, int winw, int winh, const RAWParams &raw) +void RawImageSource::scaleColors(int winx, int winy, int winw, int winh, const RAWParams &raw, array2D &rawData) { chmax[0] = chmax[1] = chmax[2] = chmax[3] = 0; //channel maxima float black_lev[4] = {0.f};//black level @@ -3514,7 +3650,7 @@ int RawImageSource::defTransform (int tran) void RawImageSource::processFalseColorCorrectionThread (Imagefloat* im, array2D &rbconv_Y, array2D &rbconv_I, array2D &rbconv_Q, array2D &rbout_I, array2D &rbout_Q, const int row_from, const int row_to) { - const int W = im->width; + const int W = im->getWidth(); constexpr float onebynine = 1.f / 9.f; #ifdef __SSE2__ @@ -3661,7 +3797,7 @@ void RawImageSource::processFalseColorCorrectionThread (Imagefloat* im, array2D void RawImageSource::processFalseColorCorrection (Imagefloat* im, const int steps) { - if (im->height < 4 || steps < 1) { + if (im->getHeight() < 4 || steps < 1) { return; } @@ -3671,14 +3807,14 @@ void RawImageSource::processFalseColorCorrection (Imagefloat* im, const int ste multi_array2D buffer (W, 3); int tid = omp_get_thread_num(); int nthreads = omp_get_num_threads(); - int blk = (im->height - 2) / nthreads; + int blk = (im->getHeight() - 2) / nthreads; for (int t = 0; t < steps; t++) { if (tid < nthreads - 1) { processFalseColorCorrectionThread (im, buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], 1 + tid * blk, 1 + (tid + 1)*blk); } else { - processFalseColorCorrectionThread (im, buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], 1 + tid * blk, im->height - 1); + processFalseColorCorrectionThread (im, buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], 1 + tid * blk, im->getHeight() - 1); } #pragma omp barrier @@ -3688,7 +3824,7 @@ void RawImageSource::processFalseColorCorrection (Imagefloat* im, const int ste multi_array2D buffer (W, 3); for (int t = 0; t < steps; t++) { - processFalseColorCorrectionThread (im, buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], 1 , im->height - 1); + processFalseColorCorrectionThread (im, buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], 1 , im->getHeight() - 1); } #endif @@ -3799,7 +3935,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam // in this case we avoid using the slllllooooooowwww lcms // Calculate matrix for direct conversion raw>working space - TMatrix work = iccStore->workingSpaceInverseMatrix (cmp.working); + TMatrix work = ICCStore::getInstance()->workingSpaceInverseMatrix (cmp.working); double mat[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; for (int i = 0; i < 3; i++) @@ -3812,8 +3948,8 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam #pragma omp parallel for #endif - for (int i = 0; i < im->height; i++) - for (int j = 0; j < im->width; j++) { + for (int i = 0; i < im->getHeight(); i++) + for (int j = 0; j < im->getWidth(); j++) { float newr = mat[0][0] * im->r(i, j) + mat[0][1] * im->g(i, j) + mat[0][2] * im->b(i, j); float newg = mat[1][0] * im->r(i, j) + mat[1][1] * im->g(i, j) + mat[1][2] * im->b(i, j); @@ -3891,7 +4027,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam // Initialize transform cmsHTRANSFORM hTransform; - cmsHPROFILE prophoto = iccStore->workingSpace("ProPhoto"); // We always use Prophoto to apply the ICC profile to minimize problems with clipping in LUT conversion. + cmsHPROFILE prophoto = ICCStore::getInstance()->workingSpace("ProPhoto"); // We always use Prophoto to apply the ICC profile to minimize problems with clipping in LUT conversion. bool transform_via_pcs_lab = false; bool separate_pcs_lab_highlights = false; lcmsMutex->lock (); @@ -3937,26 +4073,26 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam TMatrix toxyz = {}, torgb = {}; if (!working_space_is_prophoto) { - toxyz = iccStore->workingSpaceMatrix ("ProPhoto"); - torgb = iccStore->workingSpaceInverseMatrix (cmp.working); //sRGB .. Adobe...Wide... + toxyz = ICCStore::getInstance()->workingSpaceMatrix ("ProPhoto"); + torgb = ICCStore::getInstance()->workingSpaceInverseMatrix (cmp.working); //sRGB .. Adobe...Wide... } #ifdef _OPENMP #pragma omp parallel #endif { - AlignedBuffer buffer(im->width * 3); - AlignedBuffer hl_buffer(im->width * 3); - AlignedBuffer hl_scale(im->width); + AlignedBuffer buffer(im->getWidth() * 3); + AlignedBuffer hl_buffer(im->getWidth() * 3); + AlignedBuffer hl_scale(im->getWidth()); #ifdef _OPENMP #pragma omp for schedule(static) #endif - for ( int h = 0; h < im->height; ++h ) { + for ( int h = 0; h < im->getHeight(); ++h ) { float *p = buffer.data, *pR = im->r(h), *pG = im->g(h), *pB = im->b(h); // Apply pre-processing - for ( int w = 0; w < im->width; ++w ) { + for ( int w = 0; w < im->getWidth(); ++w ) { float r = *(pR++); float g = *(pG++); float b = *(pB++); @@ -4027,10 +4163,10 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam } // Run icc transform - cmsDoTransform (hTransform, buffer.data, buffer.data, im->width); + cmsDoTransform (hTransform, buffer.data, buffer.data, im->getWidth()); if (separate_pcs_lab_highlights) { - cmsDoTransform (hTransform, hl_buffer.data, hl_buffer.data, im->width); + cmsDoTransform (hTransform, hl_buffer.data, hl_buffer.data, im->getWidth()); } // Apply post-processing @@ -4039,7 +4175,7 @@ void RawImageSource::colorSpaceConversion_ (Imagefloat* im, ColorManagementParam pG = im->g(h); pB = im->b(h); - for ( int w = 0; w < im->width; ++w ) { + for ( int w = 0; w < im->getWidth(); ++w ) { float r, g, b, hr, hg, hb; @@ -4151,7 +4287,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed *dcpProf = DCPStore::getInstance()->getStdProfile(camName); if (*dcpProf == nullptr) { - in = iccStore->getStdProfile(camName); + in = ICCStore::getInstance()->getStdProfile(camName); } } else if (inProfile != "(camera)" && inProfile != "") { Glib::ustring normalName = inProfile; @@ -4165,7 +4301,7 @@ bool RawImageSource::findInputProfile(Glib::ustring inProfile, cmsHPROFILE embed } if (*dcpProf == nullptr) { - in = iccStore->getProfile (inProfile); + in = ICCStore::getInstance()->getProfile (inProfile); } } @@ -4482,13 +4618,13 @@ void RawImageSource::getAutoExpHistogram (LUTu & histogram, int& histcompr) } } else if (ri->get_colors() == 1) { for (int j = start; j < end; j++) { - tmphistogram[(int)(refwb_red * rawData[i][j])]++; + tmphistogram[(int)(refwb[0] * rawData[i][j])]++; } } else { for (int j = start; j < end; j++) { - tmphistogram[CLIP((int)(refwb_red * rawData[i][3 * j + 0]))]++; - tmphistogram[CLIP((int)(refwb_green * rawData[i][3 * j + 1]))] += 2; - tmphistogram[CLIP((int)(refwb_blue * rawData[i][3 * j + 2]))]++; + tmphistogram[(int)(refwb[0] * rawData[i][3 * j + 0])]++; + tmphistogram[(int)(refwb[1] * rawData[i][3 * j + 1])]++; + tmphistogram[(int)(refwb[2] * rawData[i][3 * j + 2])]++; } } } @@ -4869,14 +5005,14 @@ void RawImageSource::getAutoWBMultipliers (double &rm, double &gm, double &bm) } if( settings->verbose ) { - printf ("AVG: %g %g %g\n", avg_r / rn, avg_g / gn, avg_b / bn); + printf ("AVG: %g %g %g\n", avg_r / std::max(1, rn), avg_g / std::max(1, gn), avg_b / std::max(1, bn)); } // return ColorTemp (pow(avg_r/rn, 1.0/6.0)*img_r, pow(avg_g/gn, 1.0/6.0)*img_g, pow(avg_b/bn, 1.0/6.0)*img_b); - double reds = avg_r / rn * refwb_red; - double greens = avg_g / gn * refwb_green; - double blues = avg_b / bn * refwb_blue; + double reds = avg_r / std::max(1, rn) * refwb_red; + double greens = avg_g / std::max(1, gn) * refwb_green; + double blues = avg_b / std::max(1, bn) * refwb_blue; redAWBMul = rm = imatrices.rgb_cam[0][0] * reds + imatrices.rgb_cam[0][1] * greens + imatrices.rgb_cam[0][2] * blues; greenAWBMul = gm = imatrices.rgb_cam[1][0] * reds + imatrices.rgb_cam[1][1] * greens + imatrices.rgb_cam[1][2] * blues; @@ -4892,7 +5028,7 @@ ColorTemp RawImageSource::getSpotWB (std::vector &red, std::vectorgetSensorType() != ST_BAYER) { if(ri->getSensorType() == ST_FUJI_XTRANS) { @@ -4998,9 +5134,9 @@ ColorTemp RawImageSource::getSpotWB (std::vector &red, std::vector &red, std::vector &red, std::vector &red, std::vector cInversePoints; cInversePoints.push_back(double(DCT_Spline)); // The first value is the curve type - for (int i = 0; i < sizeof(phase_one_forward) / sizeof(phase_one_forward[0]); i += 2) { + for (unsigned int i = 0; i < sizeof(phase_one_forward) / sizeof(phase_one_forward[0]); i += 2) { cForwardPoints.push_back(phase_one_forward[i + 0]); cForwardPoints.push_back(phase_one_forward[i + 1]); cInversePoints.push_back(phase_one_forward[i + 1]); @@ -5228,6 +5364,36 @@ void RawImageSource::init () } } +void RawImageSource::getRawValues(int x, int y, int rotate, int &R, int &G, int &B) +{ + int xnew = x + border; + int ynew = y + border; + rotate += ri->get_rotateDegree(); + rotate %= 360; + if (rotate == 90) { + std::swap(xnew,ynew); + ynew = H - 1 - ynew; + } else if (rotate == 180) { + xnew = W - 1 - xnew; + ynew = H - 1 - ynew; + } else if (rotate == 270) { + std::swap(xnew,ynew); + ynew = H - 1 - ynew; + xnew = W - 1 - xnew; + ynew = H - 1 - ynew; + } + + int c = ri->getSensorType() == ST_FUJI_XTRANS ? ri->XTRANSFC(ynew,xnew) : ri->FC(ynew,xnew); + int val = round(rawData[ynew][xnew] / scale_mul[c]); + if(c == 0) { + R = val; G = 0; B = 0; + } else if(c == 2) { + R = 0; G = 0; B = val; + } else { + R = 0; G = val; B = 0; + } +} + void RawImageSource::cleanup () { delete phaseOneIccCurve; diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 151edf959..bc2589408 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -25,7 +25,7 @@ #include "curves.h" #include "color.h" #include "iimage.h" - +#include #define HR_SCALE 2 namespace rtengine @@ -71,6 +71,9 @@ protected: bool rgbSourceModified; RawImage* ri; // Copy of raw pixels, NOT corrected for initial gain, blackpoint etc. + RawImage* riFrames[4] = {nullptr}; + unsigned int currFrame = 0; + unsigned int numFrames = 0; // to accelerate CIELAB conversion: double lc00, lc01, lc02, lc10, lc11, lc12, lc20, lc21, lc22; @@ -78,6 +81,8 @@ protected: int threshold; array2D rawData; // holds preprocessed pixel values, rowData[i][j] corresponds to the ith row and jth column + array2D *rawDataFrames[4] = {nullptr}; + array2D *rawDataBuffer[3] = {nullptr}; // the interpolated green plane: array2D green; @@ -85,6 +90,10 @@ protected: array2D red; // the interpolated blue plane: array2D blue; + bool rawDirty; + float psRedBrightness[4]; + float psGreenBrightness[4]; + float psBlueBrightness[4]; void hphd_vertical (float** hpmap, int col_from, int col_to); @@ -92,7 +101,7 @@ protected: void hphd_green (float** hpmap); void processFalseColorCorrectionThread (Imagefloat* im, array2D &rbconv_Y, array2D &rbconv_I, array2D &rbconv_Q, array2D &rbout_I, array2D &rbout_Q, const int row_from, const int row_to); void hlRecovery (const std::string &method, float* red, float* green, float* blue, int width, float* hlmax); - void transformRect (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); unsigned FC(int row, int col) @@ -107,12 +116,12 @@ public: RawImageSource (); ~RawImageSource (); - int load (const Glib::ustring &fname, bool batch = false); + int load (const Glib::ustring &fname, int imageNum = 0, bool batch = false); void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse, bool prepareDenoise = true); void demosaic (const RAWParams &raw); - void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &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); - void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI); - void retinexPrepareBuffers (ColorManagementParams cmp, RetinexParams retinexParams, multi_array2D &conversionBuffer, LUTu &lhist16RETI); + void retinex (ColorManagementParams cmp, const RetinexParams &deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D &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); + void retinexPrepareCurves (const RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI); + void retinexPrepareBuffers (ColorManagementParams cmp, const RetinexParams &retinexParams, multi_array2D &conversionBuffer, LUTu &lhist16RETI); void flushRawData (); void flushRGB (); void HLRecovery_Global (ToneCurveParams hrp); @@ -125,9 +134,9 @@ public: } void processFlatField(const RAWParams &raw, RawImage *riFlatFile, unsigned short black[4]); - void copyOriginalPixels(const RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile ); + void copyOriginalPixels(const RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile, array2D &rawData ); void cfaboxblur (RawImage *riFlatFile, float* cfablur, int boxH, int boxW); - void scaleColors (int winx, int winy, int winw, int winh, const RAWParams &raw); // raw for cblack + void scaleColors (int winx, int winy, int winw, int winh, const RAWParams &raw, array2D &rawData); // raw for cblack void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const ColorManagementParams &cmp, const RAWParams &raw); eSensorType getSensorType () const @@ -151,7 +160,7 @@ public: } void getFullSize (int& w, int& h, int tr = TR_NONE); - void getSize (PreviewProps pp, int& w, int& h); + void getSize (const PreviewProps &pp, int& w, int& h); int getRotateDegree() const { return ri->get_rotateDegree(); @@ -188,13 +197,18 @@ public: void boxblur2(float** src, float** dst, float** temp, int H, int W, int box ); void boxblur_resamp(float **src, float **dst, float** temp, int H, int W, int box, int samp ); - void MSR(float** luminance, float **originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, RetinexParams deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax); + void MSR(float** luminance, float **originalLuminance, float **exLuminance, LUTf & mapcurve, bool &mapcontlutili, int width, int height, const RetinexParams &deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax); void HLRecovery_inpaint (float** red, float** green, float** blue); static void HLRecovery_Luminance (float* rin, float* gin, float* bin, float* rout, float* gout, float* bout, int width, float maxval); static void HLRecovery_CIELab (float* rin, float* gin, float* bin, float* rout, float* gout, float* bout, int width, float maxval, double cam[3][3], double icam[3][3]); static void HLRecovery_blend (float* rin, float* gin, float* bin, int width, float maxval, float* hlmax); static void init (); static void cleanup (); + void setCurrentFrame(unsigned int frameNum) { + currFrame = std::min(numFrames - 1, frameNum); + ri = riFrames[currFrame]; + } + int getFrameCount() {return numFrames;} protected: typedef unsigned short ushort; @@ -208,18 +222,18 @@ protected: inline void interpolate_row_rb (float* ar, float* ab, float* pg, float* cg, float* ng, int i); inline void interpolate_row_rb_mul_pp (float* ar, float* ab, float* pg, float* cg, float* ng, int i, float r_mul, float g_mul, float b_mul, int x1, int width, int skip); - void CA_correct_RT (const double cared, const double cablue, const double caautostrength); + void CA_correct_RT (const bool autoCA, const double cared, const double cablue, const double caautostrength, array2D &rawData); void ddct8x8s(int isgn, float a[8][8]); - void processRawWhitepoint (float expos, float preser); // exposure before interpolation + void processRawWhitepoint (float expos, float preser, array2D &rawData); // exposure before interpolation - int interpolateBadPixelsBayer( PixelsMap &bitmapBads ); + int interpolateBadPixelsBayer( PixelsMap &bitmapBads, array2D &rawData ); int interpolateBadPixelsNColours( PixelsMap &bitmapBads, const int colours ); int interpolateBadPixelsXtrans( PixelsMap &bitmapBads ); int findHotDeadPixels( PixelsMap &bpMap, float thresh, bool findHotPixels, bool findDeadPixels ); void cfa_linedn (float linenoiselevel);//Emil's line denoise - void green_equilibrate (float greenthresh);//Emil's green equilibration + void green_equilibrate (float greenthresh, array2D &rawData);//Emil's green equilibration void nodemosaic(bool bw); void eahd_demosaic(); @@ -228,33 +242,35 @@ protected: void ppg_demosaic(); void jdl_interpolate_omp(); void igv_interpolate(int winw, int winh); - void lmmse_interpolate_omp(int winw, int winh, int iterations); - void amaze_demosaic_RT(int winx, int winy, int winw, int winh);//Emil's code for AMaZE + void lmmse_interpolate_omp(int winw, int winh, array2D &rawData, array2D &red, array2D &green, array2D &blue, int iterations); + void amaze_demosaic_RT(int winx, int winy, int winw, int winh, array2D &rawData, array2D &red, array2D &green, array2D &blue);//Emil's code for AMaZE void fast_demosaic(int winx, int winy, int winw, int winh );//Emil's code for fast demosaicing void dcb_demosaic(int iterations, bool dcb_enhance); void ahd_demosaic(int winx, int winy, int winw, int winh); void border_interpolate(unsigned int border, float (*image)[4], unsigned int start = 0, unsigned int end = 0); void border_interpolate2(int winw, int winh, int lborders); void dcb_initTileLimits(int &colMin, int &rowMin, int &colMax, int &rowMax, int x0, int y0, int border); - void fill_raw( float (*cache )[4], int x0, int y0, float** rawData); - void fill_border( float (*cache )[4], int border, int x0, int y0); - void copy_to_buffer(float (*image2)[3], float (*image)[4]); - void dcb_hid(float (*image)[4], float (*bufferH)[3], float (*bufferV)[3], int x0, int y0); - void dcb_color(float (*image)[4], int x0, int y0); - void dcb_hid2(float (*image)[4], int x0, int y0); - void dcb_map(float (*image)[4], int x0, int y0); - void dcb_correction(float (*image)[4], int x0, int y0); - void dcb_pp(float (*image)[4], int x0, int y0); - void dcb_correction2(float (*image)[4], int x0, int y0); - void restore_from_buffer(float (*image)[4], float (*image2)[3]); - void dcb_refinement(float (*image)[4], int x0, int y0); - void dcb_color_full(float (*image)[4], int x0, int y0, float (*chroma)[2]); + void fill_raw( float (*cache )[3], int x0, int y0, float** rawData); + void fill_border( float (*cache )[3], int border, int x0, int y0); + void copy_to_buffer(float (*image2)[2], float (*image)[3]); + void dcb_hid(float (*image)[3], int x0, int y0); + void dcb_color(float (*image)[3], int x0, int y0); + void dcb_hid2(float (*image)[3], int x0, int y0); + void dcb_map(float (*image)[3], uint8_t *map, int x0, int y0); + void dcb_correction(float (*image)[3], uint8_t *map, int x0, int y0); + void dcb_pp(float (*image)[3], int x0, int y0); + void dcb_correction2(float (*image)[3], uint8_t *map, int x0, int y0); + void restore_from_buffer(float (*image)[3], float (*image2)[2]); + void dcb_refinement(float (*image)[3], uint8_t *map, int x0, int y0); + void dcb_color_full(float (*image)[3], int x0, int y0, float (*chroma)[2]); void cielab (const float (*rgb)[3], float* l, float* a, float *b, const int width, const int height, const int labWidth, const float xyz_cam[3][3]); void xtransborder_interpolate (int border); void xtrans_interpolate (const int passes, const bool useCieLab); void fast_xtrans_interpolate (); + void pixelshift(int winx, int winy, int winw, int winh, const RAWParams::BayerSensor &bayerParams, unsigned int frame, const std::string &model, float rawWpCorrection); void hflip (Imagefloat* im); void vflip (Imagefloat* im); + void getRawValues(int x, int y, int rotate, int &R, int &G, int &B); }; } diff --git a/rtengine/rawimagesource_i.h b/rtengine/rawimagesource_i.h index 1cd25d6fc..689ab03db 100644 --- a/rtengine/rawimagesource_i.h +++ b/rtengine/rawimagesource_i.h @@ -184,7 +184,7 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, n++; } - b = cg[j] + b / n; + b = cg[j] + b / std::max(1, n); ab[j] = b; } else { // linear R-G interp. horizontally @@ -243,7 +243,7 @@ inline void RawImageSource::interpolate_row_rb (float* ar, float* ab, float* pg, n++; } - r = cg[j] + r / n; + r = cg[j] + r / std::max(n, 1); ar[j] = r; } else { @@ -309,7 +309,7 @@ inline void RawImageSource::interpolate_row_rb_mul_pp (float* ar, float* ab, flo n++; } - b = g_mul * cg[j] + b / n; + b = g_mul * cg[j] + b / std::max(1, n); ab[jx] = b; } else { // linear R-G interp. horizontally @@ -368,7 +368,7 @@ inline void RawImageSource::interpolate_row_rb_mul_pp (float* ar, float* ab, flo n++; } - r = g_mul * cg[j] + r / n; + r = g_mul * cg[j] + r / std::max(n, 1); ar[jx] = r; } else { diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 8ece130ff..c106f4166 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -73,7 +73,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = { 0, // EvLDNRadius: obsolete, 0, // EvLDNEdgeTolerance: obsolete, 0, // EvCDNEnabled:obsolete, - ALL, // EvBlendCMSMatrix, + 0, // free entry RGBCURVE, // EvDCPToneCurve, ALLNORAW, // EvDCPIlluminant, RETINEX, // EvSHEnabled, @@ -451,7 +451,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = { DEMOSAIC, // EvLgam DEMOSAIC, // EvLslope RETINEX, // EvLhighl - DEMOSAIC, // EvLbaselog + SPOT, // EvSpotEnabled DEMOSAIC, // EvRetinexlhcurve OUTPUTPROFILE, // EvOIntent MONITORTRANSFORM, // EvMonitorTransform: no history message @@ -470,6 +470,48 @@ int refreshmap[rtengine::NUMOFEVENTS] = { RETINEX, // EvRetinexgaintransmission RETINEX, // EvLskal OUTPUTPROFILE, // EvOBPCompens - SPOT // EvSpotEnabled + ALLNORAW, // EvWBtempBias + DARKFRAME, // EvRawImageNum + DEMOSAIC, // EvPixelShiftMotion + DEMOSAIC, // EvPixelShiftMotionCorrection + DEMOSAIC, // EvPixelShiftStddevFactorGreen + DEMOSAIC, // EvPixelShiftEperIso + DEMOSAIC, // EvPixelShiftNreadIso + DEMOSAIC, // EvPixelShiftPrnu + DEMOSAIC, // EvPixelshiftShowMotion + DEMOSAIC, // EvPixelshiftShowMotionMaskOnly + DEMOSAIC, // EvPixelShiftAutomatic + DEMOSAIC, // EvPixelShiftNonGreenHorizontal + DEMOSAIC, // EvPixelShiftNonGreenVertical + DEMOSAIC, // EvPixelShiftNonGreenCross + DEMOSAIC, // EvPixelShiftStddevFactorRed + DEMOSAIC, // EvPixelShiftStddevFactorBlue + DEMOSAIC, // EvPixelShiftNonGreenCross2 + DEMOSAIC, // EvPixelShiftNonGreenAmaze + DEMOSAIC, // EvPixelShiftGreen + DEMOSAIC, // EvPixelShiftRedBlueWeight + DEMOSAIC, // EvPixelShiftBlur + DEMOSAIC, // EvPixelShiftSigma + DEMOSAIC, // EvPixelShiftSum + DEMOSAIC, // EvPixelShiftExp0 + DEMOSAIC, // EvPixelShiftHoleFill + DEMOSAIC, // EvPixelShiftMedian + DEMOSAIC, // EvPixelShiftMedian3 + DEMOSAIC, // EvPixelShiftMotionMethod + DEMOSAIC, // EvPixelShiftSmooth + DEMOSAIC, // EvPixelShiftLmmse + DEMOSAIC, // EvPixelShiftEqualBright + DEMOSAIC, // EvPixelShiftEqualBrightChannel + LUMINANCECURVE, // EvCATtempout + LUMINANCECURVE, // EvCATgreenout + LUMINANCECURVE, // EvCATybout + LUMINANCECURVE, // EvCATDegreeout + LUMINANCECURVE, // EvCATAutoDegreeout + LUMINANCECURVE, // EvCATtempsc + LUMINANCECURVE, // EvCATgreensc + LUMINANCECURVE, // EvCATybscen + LUMINANCECURVE // EvCATAutoyb + + }; diff --git a/rtengine/rt_math.h b/rtengine/rt_math.h index 67d883080..17a292618 100644 --- a/rtengine/rt_math.h +++ b/rtengine/rt_math.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include @@ -11,71 +12,90 @@ constexpr int MAXVAL = 0xffff; constexpr float MAXVALF = static_cast(MAXVAL); // float version of MAXVAL constexpr double MAXVALD = static_cast(MAXVAL); // double version of MAXVAL -template -inline _Tp SQR (_Tp x) +constexpr double RT_PI = 3.14159265358979323846; // pi +constexpr double RT_PI_2 = 1.57079632679489661923; // pi/2 +constexpr double RT_1_PI = 0.31830988618379067154; // 1/pi +constexpr double RT_2_PI = 0.63661977236758134308; // 2/pi +constexpr double RT_SQRT1_2 = 0.70710678118654752440; // 1/sqrt(2) + +constexpr double RT_INFINITY = std::numeric_limits::infinity(); +constexpr double RT_NAN = std::numeric_limits::quiet_NaN(); + +constexpr float RT_PI_F = RT_PI; +constexpr float RT_PI_F_2 = RT_PI_2; + +constexpr float RT_INFINITY_F = std::numeric_limits::infinity(); +constexpr float RT_NAN_F = std::numeric_limits::quiet_NaN(); + +template +constexpr T SQR(T x) { -// return std::pow(x,2); Slower than: return x * x; } -template -inline const _Tp& min(const _Tp& a, const _Tp& b) +template +constexpr const T& min(const T& a) { - return std::min(a, b); + return a; } -template -inline const _Tp& max(const _Tp& a, const _Tp& b) +template +constexpr const T& min(const T& a, const T& b) { - return std::max(a, b); + return b < a ? b : a; } - -template -inline const _Tp& LIM(const _Tp& a, const _Tp& b, const _Tp& c) +template +constexpr const T& min(const T& a, const T& b, const ARGS&... args) { - return std::max(b, std::min(a, c)); + return min(min(a, b), min(args...)); } -template -inline _Tp LIM01(const _Tp& a) +template +constexpr const T& max(const T& a) { - return std::max(_Tp(0), std::min(a, _Tp(1))); + return a; } -template -inline _Tp CLIP(const _Tp& a) +template +constexpr const T& max(const T& a, const T& b) { - return LIM(a, static_cast<_Tp>(0), static_cast<_Tp>(MAXVAL)); + return a < b ? b : a; } - -template -inline const _Tp& min(const _Tp& a, const _Tp& b, const _Tp& c) +template +constexpr const T& max(const T& a, const T& b, const ARGS&... args) { - return std::min(c, std::min(a, b)); + return max(max(a, b), max(args...)); } -template -inline const _Tp& max(const _Tp& a, const _Tp& b, const _Tp& c) +template +constexpr const T& LIM(const T& a, const T& b, const T& c) { - return std::max(c, std::max(a, b)); + return max(b, min(a, c)); } -template -inline const _Tp& min(const _Tp& a, const _Tp& b, const _Tp& c, const _Tp& d) +template +constexpr T LIM01(const T& a) { - return std::min(d, std::min(c, std::min(a, b))); + return max(T(0), min(a, T(1))); } -template -inline const _Tp& max(const _Tp& a, const _Tp& b, const _Tp& c, const _Tp& d) +template +constexpr T CLIP(const T& a) { - return std::max(d, std::max(c, std::max(a, b))); + return LIM(a, static_cast(0), static_cast(MAXVAL)); } -template -inline _Tp intp(_Tp a, _Tp b, _Tp c) +template +constexpr T SGN(const T& a) +{ + // returns -1 for a < 0, 0 for a = 0 and +1 for a > 0 + return (T(0) < a) - (a < T(0)); +} + +template +constexpr T intp(T a, T b, T c) { // calculate a * b + (1 - a) * c // following is valid: @@ -99,13 +119,13 @@ inline T norm2(const T& x, const T& y) template< typename T > inline T norminf(const T& x, const T& y) { - return std::max(std::abs(x), std::abs(y)); + return max(std::abs(x), std::abs(y)); } -inline int float2uint16range(float d) // clips input to [0;65535] and rounds +constexpr int float2uint16range(float d) { - d = CLIP(d); // clip to [0;65535] - return d + 0.5f; + // clips input to [0;65535] and rounds + return CLIP(d) + 0.5f; } constexpr std::uint8_t uint16ToUint8Rounded(std::uint16_t i) diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index 61c779fb7..9ba794a1f 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -273,8 +273,10 @@ class AutoCamListener { public : virtual ~AutoCamListener() {} - virtual void autoCamChanged (double ccam) {} + virtual void autoCamChanged (double ccam, double ccamout) {} virtual void adapCamChanged (double cadap) {} + virtual void ybCamChanged (int yb) {} + }; class AutoChromaListener @@ -310,6 +312,27 @@ public : }; +class AutoWBListener +{ +public : + virtual ~AutoWBListener() = default; + virtual void WBChanged (double temp, double green) = 0; +}; + +class FrameCountListener +{ +public : + virtual ~FrameCountListener() = default; + virtual void FrameCountChanged (int n, int frameNum) = 0; +}; + +class ImageTypeListener +{ +public : + virtual ~ImageTypeListener() = default; + virtual void imageTypeChanged (bool isRaw, bool isBayer, bool isXtrans) = 0; +}; + class WaveletListener { public : @@ -365,7 +388,7 @@ public: virtual void endUpdateParams (ProcEvent change) = 0; virtual void endUpdateParams (int changeFlags) = 0; // Starts a minimal update - virtual void startProcessing(int changeCode) = 0; + virtual void startProcessing (int changeCode) = 0; /** Stops image processing. When it returns, the image processing is already stopped. */ virtual void stopProcessing () = 0; /** Sets the scale of the preview image. The larger the number is, the faster the image updates are (typical values are 4-5). @@ -396,7 +419,7 @@ public: * @return a pointer to the Crop object that handles the image data trough its own pipeline */ virtual DetailedCrop* createCrop (::EditDataProvider *editDataProvider, bool isDetailWindow) = 0; - virtual bool getAutoWB (double& temp, double& green, double equal) = 0; + virtual bool getAutoWB (double& temp, double& green, double equal, double tempBias) = 0; virtual void getCamWB (double& temp, double& green) = 0; virtual void getSpotWB (int x, int y, int rectSize, double& temp, double& green) = 0; virtual void getAutoCrop (double ratio, int &x, int &y, int &w, int &h) = 0; @@ -410,11 +433,14 @@ public: virtual void setHistogramListener (HistogramListener *l) = 0; virtual void setPreviewImageListener (PreviewImageListener* l) = 0; virtual void setAutoCamListener (AutoCamListener* l) = 0; + virtual void setFrameCountListener (FrameCountListener* l) = 0; virtual void setAutoBWListener (AutoBWListener* l) = 0; + virtual void setAutoWBListener (AutoWBListener* l) = 0; virtual void setAutoColorTonListener (AutoColorTonListener* l) = 0; virtual void setAutoChromaListener (AutoChromaListener* l) = 0; virtual void setRetinexListener (RetinexListener* l) = 0; virtual void setWaveletListener (WaveletListener* l) = 0; + virtual void setImageTypeListener (ImageTypeListener* l) = 0; virtual void setMonitorProfile (const Glib::ustring& monitorProfile, RenderingIntent intent) = 0; virtual void getMonitorProfile (Glib::ustring& monitorProfile, RenderingIntent& intent) const = 0; @@ -435,24 +461,19 @@ public: * @brief Initializes the RT engine * @param s is a struct of basic settings * @param baseDir base directory of RT's installation dir - * @param userSettingsDir RT's base directory in the user's settings dir */ -int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDir); + * @param userSettingsDir RT's base directory in the user's settings dir + * @param loadAll if false, don't load the various dependencies (profiles, HALDClut files, ...), they'll be loaded from disk each time they'll be used (launching time improvement) */ +int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDir, bool loadAll = true); /** Cleanup the RT engine (static variables) */ void cleanup (); -/** Returns the available working profile names - * @return a vector of the available working profile names */ -std::vector getWorkingProfiles (); -/** Returns the available output gammas - * @return a vector of the available gamma names */ -std::vector getGamma (); - /** This class holds all the necessary informations to accomplish the full processing of the image */ class ProcessingJob { public: + virtual ~ProcessingJob() {} /** Creates a processing job from a file name. This function always succeeds. It only stores the data into the ProcessingJob class, it does not load * the image thus it returns immediately. @@ -460,7 +481,7 @@ public: * @param isRaw shall be true if it is a raw file * @param pparams is a struct containing the processing parameters * @return an object containing the data above. It can be passed to the functions that do the actual image processing. */ - static ProcessingJob* create (const Glib::ustring& fname, bool isRaw, const procparams::ProcParams& pparams); + static ProcessingJob* create (const Glib::ustring& fname, bool isRaw, const procparams::ProcParams& pparams, bool fast = false); /** Creates a processing job from a file name. This function always succeeds. It only stores the data into the ProcessingJob class, it does not load * the image thus it returns immediately. This function increases the reference count of the initialImage. If you decide not the process the image you @@ -469,12 +490,14 @@ public: * @param initialImage is a loaded and pre-processed initial image * @param pparams is a struct containing the processing parameters * @return an object containing the data above. It can be passed to the functions that do the actual image processing. */ - static ProcessingJob* create (InitialImage* initialImage, const procparams::ProcParams& pparams); + static ProcessingJob* create (InitialImage* initialImage, const procparams::ProcParams& pparams, bool fast = false); /** Cancels and destroys a processing job. The reference count of the corresponding initialImage (if any) is decreased. After the call of this function the ProcessingJob instance * gets invalid, you must not use it any more. Dont call this function while the job is being processed. * @param job is the job to destroy */ static void destroy (ProcessingJob* job); + + virtual bool fastPipeline() const = 0; }; /** This function performs all the image processinf steps corresponding to the given ProcessingJob. It returns when it is ready, so it can be slow. @@ -496,7 +519,7 @@ public: * @param img is the result of the last ProcessingJob * @return the next ProcessingJob to process */ virtual ProcessingJob* imageReady (IImage16* img) = 0; - virtual void error(Glib::ustring message) = 0; + virtual void error (Glib::ustring message) = 0; }; /** This function performs all the image processinf steps corresponding to the given ProcessingJob. It runs in the background, thus it returns immediately, * When it finishes, it calls the BatchProcessingListener with the resulting image and asks for the next job. It the listener gives a new job, it goes on diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index af42ce8b0..511b17f9f 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -37,27 +37,101 @@ #include "../rtgui/ppversion.h" #include "improccoordinator.h" #include -//#define BENCHMARK -#include "StopWatch.h" namespace { - bool checkRawImageThumb(const rtengine::RawImage& raw_image) - { - if (!raw_image.is_supportedThumb()) { - return false; - } - - const std::size_t length = - fdata(raw_image.get_thumbOffset(), raw_image.get_file())[1] != 0xD8 && raw_image.is_ppmThumb() - ? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3 - : raw_image.get_thumbLength(); - - return raw_image.get_thumbOffset() + length <= raw_image.get_file()->size; +bool checkRawImageThumb (const rtengine::RawImage& raw_image) +{ + if (!raw_image.is_supportedThumb()) { + return false; } + const ssize_t length = + fdata (raw_image.get_thumbOffset(), raw_image.get_file())[1] != 0xD8 && raw_image.is_ppmThumb() + ? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3 + : raw_image.get_thumbLength(); + + return raw_image.get_thumbOffset() + length <= raw_image.get_file()->size; +} + + +void scale_colors (rtengine::RawImage *ri, float scale_mul[4], float cblack[4]) +{ + DCraw::dcrawImage_t image = ri->get_image(); + + if (ri->isBayer()) { + const int height = ri->get_iheight(); + const int width = ri->get_iwidth(); + + for (int row = 0; row < height; ++row) { + unsigned c0 = ri->FC (row, 0); + unsigned c1 = ri->FC (row, 1); + int col = 0; + + for (; col < width - 1; col += 2) { + float val0 = image[row * width + col][c0]; + float val1 = image[row * width + col + 1][c1]; + val0 -= cblack[c0]; + val1 -= cblack[c1]; + val0 *= scale_mul[c0]; + val1 *= scale_mul[c1]; + image[row * width + col][c0] = rtengine::CLIP (val0); + image[row * width + col + 1][c1] = rtengine::CLIP (val1); + } + + if (col < width) { // in case width is odd + float val0 = image[row * width + col][c0]; + val0 -= cblack[c0]; + val0 *= scale_mul[c0]; + image[row * width + col][c0] = rtengine::CLIP (val0); + } + } + } else if (ri->isXtrans()) { + const int height = ri->get_iheight(); + const int width = ri->get_iwidth(); + unsigned c[6]; + + for (int row = 0; row < height; ++row) { + for (int i = 0; i < 6; ++i) { + c[i] = ri->XTRANSFC (row, i); + } + + int col = 0; + + for (; col < width - 5; col += 6) { + for (int i = 0; i < 6; ++i) { + const unsigned ccol = c[i]; + float val = image[row * width + col + i][ccol]; + val -= cblack[ccol]; + val *= scale_mul[ccol]; + image[row * width + col + i][ccol] = rtengine::CLIP (val); + } + } + + for (; col < width; ++col) { // remaining columns + const unsigned ccol = ri->XTRANSFC (row, col); + float val = image[row * width + col][ccol]; + val -= cblack[ccol]; + val *= scale_mul[ccol]; + image[row * width + col][ccol] = rtengine::CLIP (val); + } + } + } else { + const int size = ri->get_iheight() * ri->get_iwidth(); + + for (int i = 0; i < size; ++i) { + for (int j = 0; j < 4; ++j) { + float val = image[i][j]; + val -= cblack[j]; + val *= scale_mul[j]; + image[i][j] = rtengine::CLIP (val); + } + } + } +} + } extern Options options; @@ -71,7 +145,7 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, StdImageSource imgSrc; - if (imgSrc.load(fname)) { + if (imgSrc.load (fname)) { return nullptr; } @@ -91,23 +165,23 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, tpp->defGain = 1.0; tpp->gammaCorrected = false; tpp->isRaw = 0; - memset (tpp->colorMatrix, 0, sizeof(tpp->colorMatrix)); + memset (tpp->colorMatrix, 0, sizeof (tpp->colorMatrix)); tpp->colorMatrix[0][0] = 1.0; tpp->colorMatrix[1][1] = 1.0; tpp->colorMatrix[2][2] = 1.0; if (inspectorMode) { // Special case, meaning that we want a full sized thumbnail image (e.g. for the Inspector feature) - w = img->width; - h = img->height; + w = img->getWidth(); + h = img->getHeight(); tpp->scale = 1.; } else { if (fixwh == 1) { - w = h * img->width / img->height; - tpp->scale = (double)img->height / h; + w = h * img->getWidth() / img->getHeight(); + tpp->scale = (double)img->getHeight() / h; } else { - h = w * img->height / img->width; - tpp->scale = (double)img->width / w; + h = w * img->getHeight() / img->getWidth(); + tpp->scale = (double)img->getWidth() / w; } } @@ -121,21 +195,21 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, // we want an Image8 if (img->getType() == rtengine::sImage8) { // copy the image - Image8 *srcImg = static_cast(img); + Image8 *srcImg = static_cast (img); Image8 *thImg = new Image8 (w, h); - srcImg->copyData(thImg); + srcImg->copyData (thImg); tpp->thumbImg = thImg; } else { // copy the image with a conversion - tpp->thumbImg = resizeTo(w, h, TI_Bilinear, img); + tpp->thumbImg = resizeTo (w, h, TI_Bilinear, img); } } else { // we want the same image type than the source file - tpp->thumbImg = resizeToSameType(w, h, TI_Bilinear, img); + tpp->thumbImg = resizeToSameType (w, h, TI_Bilinear, img); // histogram computation tpp->aeHistCompression = 3; - tpp->aeHistogram(65536 >> tpp->aeHistCompression); + tpp->aeHistogram (65536 >> tpp->aeHistCompression); double avg_r = 0; double avg_g = 0; @@ -143,25 +217,26 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, int n = 0; if (img->getType() == rtengine::sImage8) { - Image8 *image = static_cast(img); - image->computeHistogramAutoWB(avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); + Image8 *image = static_cast (img); + image->computeHistogramAutoWB (avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); } else if (img->getType() == sImage16) { - Image16 *image = static_cast(img); - image->computeHistogramAutoWB(avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); + Image16 *image = static_cast (img); + image->computeHistogramAutoWB (avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); } else if (img->getType() == sImagefloat) { - Imagefloat *image = static_cast(img); - image->computeHistogramAutoWB(avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); + Imagefloat *image = static_cast (img); + image->computeHistogramAutoWB (avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); } else { - printf("loadFromImage: Unsupported image type \"%s\"!\n", img->getType()); + printf ("loadFromImage: Unsupported image type \"%s\"!\n", img->getType()); } if (n > 0) { ColorTemp cTemp; - tpp->redAWBMul = avg_r / double(n); - tpp->greenAWBMul = avg_g / double(n); - tpp->blueAWBMul = avg_b / double(n); + tpp->redAWBMul = avg_r / double (n); + tpp->greenAWBMul = avg_g / double (n); + tpp->blueAWBMul = avg_b / double (n); tpp->wbEqual = wbEq; + tpp->wbTempBias = 0.0; cTemp.mul2temp (tpp->redAWBMul, tpp->greenAWBMul, tpp->blueAWBMul, tpp->wbEqual, tpp->autoWBTemp, tpp->autoWBGreen); } @@ -174,10 +249,11 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataLocation& rml, int &w, int &h, int fixwh, bool rotate, bool inspectorMode) { - RawImage *ri = new RawImage(fname); - int r = ri->loadRaw(false, false); + RawImage *ri = new RawImage (fname); + unsigned int imageNum = 0; + int r = ri->loadRaw (false, imageNum, false); - if( r ) { + if ( r ) { delete ri; return nullptr; } @@ -189,25 +265,25 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL Image8* img = new Image8 (); // No sample format detection occurred earlier, so we set them here, // as they are mandatory for the setScanline method - img->setSampleFormat(IIOSF_UNSIGNED_CHAR); - img->setSampleArrangement(IIOSA_CHUNKY); + img->setSampleFormat (IIOSF_UNSIGNED_CHAR); + img->setSampleArrangement (IIOSA_CHUNKY); int err = 1; // See if it is something we support - if (checkRawImageThumb(*ri)) { - const char* data((const char*)fdata(ri->get_thumbOffset(), ri->get_file())); + if (checkRawImageThumb (*ri)) { + const char* data ((const char*)fdata (ri->get_thumbOffset(), ri->get_file())); if ( (unsigned char)data[1] == 0xd8 ) { - err = img->loadJPEGFromMemory(data, ri->get_thumbLength()); + err = img->loadJPEGFromMemory (data, ri->get_thumbLength()); } else if (ri->is_ppmThumb()) { - err = img->loadPPMFromMemory(data, ri->get_thumbWidth(), ri->get_thumbHeight(), ri->get_thumbSwap(), ri->get_thumbBPS()); + err = img->loadPPMFromMemory (data, ri->get_thumbWidth(), ri->get_thumbHeight(), ri->get_thumbSwap(), ri->get_thumbBPS()); } } // did we succeed? if ( err ) { - printf("Could not extract thumb from %s\n", fname.data()); + printf ("Could not extract thumb from %s\n", fname.data()); delete img; delete ri; return nullptr; @@ -216,23 +292,23 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL Thumbnail* tpp = new Thumbnail (); tpp->isRaw = 1; - memset (tpp->colorMatrix, 0, sizeof(tpp->colorMatrix)); + memset (tpp->colorMatrix, 0, sizeof (tpp->colorMatrix)); tpp->colorMatrix[0][0] = 1.0; tpp->colorMatrix[1][1] = 1.0; tpp->colorMatrix[2][2] = 1.0; if (inspectorMode) { // Special case, meaning that we want a full sized thumbnail image (e.g. for the Inspector feature) - w = img->width; - h = img->height; + w = img->getWidth(); + h = img->getHeight(); tpp->scale = 1.; } else { if (fixwh == 1) { - w = h * img->width / img->height; - tpp->scale = (double)img->height / h; + w = h * img->getWidth() / img->getHeight(); + tpp->scale = (double)img->getHeight() / h; } else { - h = w * img->height / img->width; - tpp->scale = (double)img->width / w; + h = w * img->getHeight() / img->getWidth(); + tpp->scale = (double)img->getWidth() / w; } } @@ -244,24 +320,24 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL if (inspectorMode) { tpp->thumbImg = img; } else { - tpp->thumbImg = resizeTo(w, h, TI_Nearest, img); + tpp->thumbImg = resizeTo (w, h, TI_Nearest, img); delete img; } if (rotate && ri->get_rotateDegree() > 0) { std::string fname = ri->get_filename(); - std::string suffix = fname.length() > 4 ? fname.substr(fname.length() - 3) : ""; + std::string suffix = fname.length() > 4 ? fname.substr (fname.length() - 3) : ""; - for (int i = 0; i < suffix.length(); i++) { - suffix[i] = std::tolower(suffix[i]); + for (unsigned int i = 0; i < suffix.length(); i++) { + suffix[i] = std::tolower (suffix[i]); } // Leaf .mos, Mamiya .mef and Phase One .iiq files have thumbnails already rotated. if (suffix != "mos" && suffix != "mef" && suffix != "iiq") { - tpp->thumbImg->rotate(ri->get_rotateDegree()); + tpp->thumbImg->rotate (ri->get_rotateDegree()); // width/height may have changed after rotating - w = tpp->thumbImg->width; - h = tpp->thumbImg->height; + w = tpp->thumbImg->getWidth(); + h = tpp->thumbImg->getHeight(); } } @@ -288,10 +364,12 @@ RawMetaDataLocation Thumbnail::loadMetaDataFromRaw (const Glib::ustring& fname) rml.ciffBase = -1; rml.ciffLength = -1; - RawImage ri(fname); - int r = ri.loadRaw(false); + RawImage ri (fname); + unsigned int imageNum = 0; - if( !r ) { + int r = ri.loadRaw (false, imageNum); + + if ( !r ) { rml.exifBase = ri.get_exifBase(); rml.ciffBase = ri.get_ciffBase(); rml.ciffLength = ri.get_ciffLen(); @@ -300,12 +378,14 @@ RawMetaDataLocation Thumbnail::loadMetaDataFromRaw (const Glib::ustring& fname) return rml; } -Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocation& rml, int &w, int &h, int fixwh, double wbEq, bool rotate) +Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocation& rml, int &w, int &h, int fixwh, double wbEq, bool rotate, int imageNum) { RawImage *ri = new RawImage (fname); - int r = ri->loadRaw(1, 0); + unsigned int tempImageNum = 0; - if( r ) { + int r = ri->loadRaw (1, tempImageNum, 0); + + if ( r ) { delete ri; return nullptr; } @@ -320,32 +400,38 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati tpp->embProfileLength = ri->get_profileLen(); if (ri->get_profileLen()) - tpp->embProfile = cmsOpenProfileFromMem(ri->get_profile(), - ri->get_profileLen()); //\ TODO check if mutex is needed + tpp->embProfile = cmsOpenProfileFromMem (ri->get_profile(), + ri->get_profileLen()); //\ TODO check if mutex is needed - tpp->redMultiplier = ri->get_pre_mul(0); - tpp->greenMultiplier = ri->get_pre_mul(1); - tpp->blueMultiplier = ri->get_pre_mul(2); + tpp->redMultiplier = ri->get_pre_mul (0); + tpp->greenMultiplier = ri->get_pre_mul (1); + tpp->blueMultiplier = ri->get_pre_mul (2); + + //ri->scale_colors(); + float pre_mul[4], scale_mul[4], cblack[4]; + ri->get_colorsCoeff (pre_mul, scale_mul, cblack, false); + scale_colors (ri, scale_mul, cblack); - ri->scale_colors(); ri->pre_interpolate(); rml.exifBase = ri->get_exifBase(); rml.ciffBase = ri->get_ciffBase(); rml.ciffLength = ri->get_ciffLen(); - tpp->camwbRed = tpp->redMultiplier / ri->get_pre_mul(0); - tpp->camwbGreen = tpp->greenMultiplier / ri->get_pre_mul(1); - tpp->camwbBlue = tpp->blueMultiplier / ri->get_pre_mul(2); - tpp->defGain = 1.0 / min(ri->get_pre_mul(0), ri->get_pre_mul(1), ri->get_pre_mul(2)); + tpp->camwbRed = tpp->redMultiplier / pre_mul[0]; //ri->get_pre_mul(0); + tpp->camwbGreen = tpp->greenMultiplier / pre_mul[1]; //ri->get_pre_mul(1); + tpp->camwbBlue = tpp->blueMultiplier / pre_mul[2]; //ri->get_pre_mul(2); + //tpp->defGain = 1.0 / min(ri->get_pre_mul(0), ri->get_pre_mul(1), ri->get_pre_mul(2)); + tpp->defGain = max (scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]) / min (scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]); + tpp->gammaCorrected = true; unsigned filter = ri->get_filters(); int firstgreen = 1; // locate first green location in the first row - if(ri->getSensorType() == ST_BAYER) - while (!FISGREEN(filter, 1, firstgreen) && firstgreen < 3) { + if (ri->getSensorType() == ST_BAYER) + while (!FISGREEN (filter, 1, firstgreen) && firstgreen < 3) { firstgreen++; } @@ -353,9 +439,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_FujiWidth() != 0) { if (fixwh == 1) { // fix height, scale width - skip = ((ri->get_height() - ri->get_FujiWidth()) / sqrt(0.5) - firstgreen - 1) / h; + skip = ((ri->get_height() - ri->get_FujiWidth()) / sqrt (0.5) - firstgreen - 1) / h; } else { - skip = (ri->get_FujiWidth() / sqrt(0.5) - firstgreen - 1) / w; + skip = (ri->get_FujiWidth() / sqrt (0.5) - firstgreen - 1) / w; } } else { if (fixwh == 1) { // fix height, scale width @@ -375,7 +461,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati int hskip = skip, vskip = skip; - if (!ri->get_model().compare("D1X")) { + if (!ri->get_model().compare ("D1X")) { hskip *= 2; } @@ -385,7 +471,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati DCraw::dcrawImage_t image = ri->get_image(); - Imagefloat* tmpImg = new Imagefloat(tmpw, tmph); + Imagefloat* tmpImg = new Imagefloat (tmpw, tmph); if (ri->getSensorType() == ST_BAYER) { // demosaicing! (sort of) @@ -397,7 +483,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati int g = image[ofs][1]; int r, b; - if (FISRED(filter, row, col + 1)) { + if (FISRED (filter, row, col + 1)) { r = (image[ofs + 1 ][0] + image[ofs - 1 ][0]) >> 1; b = (image[ofs + width][2] + image[ofs - width][2]) >> 1; } else { @@ -405,9 +491,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati r = (image[ofs + width][0] + image[ofs - width][0]) >> 1; } - tmpImg->r(y, x) = r; - tmpImg->g(y, x) = g; - tmpImg->b(y, x) = b; + tmpImg->r (y, x) = r; + tmpImg->g (y, x) = g; + tmpImg->b (y, x) = b; } } } else if (ri->get_colors() == 1) { @@ -417,45 +503,45 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati for (int col = firstgreen, x = 0; col < width - 1 && x < tmpw; col += hskip, x++) { int ofs = rofs + col; - tmpImg->r(y, x) = tmpImg->g(y, x) = tmpImg->b(y, x) = image[ofs][0]; + tmpImg->r (y, x) = tmpImg->g (y, x) = tmpImg->b (y, x) = image[ofs][0]; } } } else { - if(ri->getSensorType() == ST_FUJI_XTRANS) { - for( int row = 1, y = 0; row < height - 1 && y < tmph; row += vskip, y++) { + if (ri->getSensorType() == ST_FUJI_XTRANS) { + for ( int row = 1, y = 0; row < height - 1 && y < tmph; row += vskip, y++) { rofs = row * width; - for( int col = 1, x = 0; col < width - 1 && x < tmpw; col += hskip, x++ ) { + for ( int col = 1, x = 0; col < width - 1 && x < tmpw; col += hskip, x++ ) { int ofs = rofs + col; float sum[3] = {}; int c; - for(int v = -1; v <= 1; v++) { - for(int h = -1; h <= 1; h++) { - c = ri->XTRANSFC(row + v, col + h); + for (int v = -1; v <= 1; v++) { + for (int h = -1; h <= 1; h++) { + c = ri->XTRANSFC (row + v, col + h); sum[c] += image[ofs + v * width + h][c]; } } - c = ri->XTRANSFC(row, col); + c = ri->XTRANSFC (row, col); switch (c) { case 0: - tmpImg->r(y, x) = image[ofs][0]; - tmpImg->g(y, x) = sum[1] / 5.f; - tmpImg->b(y, x) = sum[2] / 3.f; + tmpImg->r (y, x) = image[ofs][0]; + tmpImg->g (y, x) = sum[1] / 5.f; + tmpImg->b (y, x) = sum[2] / 3.f; break; case 1: - tmpImg->r(y, x) = sum[0] / 2.f; - tmpImg->g(y, x) = image[ofs][1]; - tmpImg->b(y, x) = sum[2] / 2.f; + tmpImg->r (y, x) = sum[0] / 2.f; + tmpImg->g (y, x) = image[ofs][1]; + tmpImg->b (y, x) = sum[2] / 2.f; break; case 2: - tmpImg->r(y, x) = sum[0] / 3.f; - tmpImg->g(y, x) = sum[1] / 5.f; - tmpImg->b(y, x) = image[ofs][2]; + tmpImg->r (y, x) = sum[0] / 3.f; + tmpImg->g (y, x) = sum[1] / 5.f; + tmpImg->b (y, x) = image[ofs][2]; break; } } @@ -466,15 +552,36 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati int left_margin = ri->get_leftmargin(); firstgreen += left_margin; int top_margin = ri->get_topmargin(); + int wmax = tmpw; + int hmax = tmph; - for (int row = 1 + top_margin, y = 0; row < iheight + top_margin - 1 && y < tmph; row += vskip, y++) { + if (ri->get_maker() == "Sigma" && ri->DNGVERSION()) { // Hack to prevent sigma dng files from crashing + wmax = (width - 2 - left_margin) / hskip; + hmax = (height - 2 - top_margin) / vskip; + } + + int y = 0; + + for (int row = 1 + top_margin; row < iheight + top_margin - 1 && y < hmax; row += vskip, y++) { rofs = row * iwidth; - for (int col = firstgreen, x = 0; col < iwidth + left_margin - 1 && x < tmpw; col += hskip, x++) { + int x = 0; + + for (int col = firstgreen; col < iwidth + left_margin - 1 && x < wmax; col += hskip, x++) { int ofs = rofs + col; - tmpImg->r(y, x) = image[ofs][0]; - tmpImg->g(y, x) = image[ofs][1]; - tmpImg->b(y, x) = image[ofs][2]; + tmpImg->r (y, x) = image[ofs][0]; + tmpImg->g (y, x) = image[ofs][1]; + tmpImg->b (y, x) = image[ofs][2]; + } + + for (; x < tmpw; ++x) { + tmpImg->r (y, x) = tmpImg->g (y, x) = tmpImg->b (y, x) = 0; + } + } + + for (; y < tmph; ++y) { + for (int x = 0; x < tmpw; ++x) { + tmpImg->r (y, x) = tmpImg->g (y, x) = tmpImg->b (y, x) = 0; } } } @@ -482,16 +589,16 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_FujiWidth() != 0) { int fw = ri->get_FujiWidth() / hskip; - double step = sqrt(0.5); + double step = sqrt (0.5); int wide = fw / step; int high = (tmph - fw) / step; - Imagefloat* fImg = new Imagefloat(wide, high); + Imagefloat* fImg = new Imagefloat (wide, high); float r, c; for (int row = 0; row < high; row++) for (int col = 0; col < wide; col++) { - unsigned ur = r = fw + (row - col) * step; - unsigned uc = c = (row + col) * step; + int ur = r = fw + (row - col) * step; + int uc = c = (row + col) * step; if (ur > tmph - 2 || uc > tmpw - 2) { continue; @@ -499,9 +606,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati double fr = r - ur; double fc = c - uc; - fImg->r(row, col) = (tmpImg->r(ur, uc) * (1 - fc) + tmpImg->r(ur, uc + 1) * fc) * (1 - fr) + (tmpImg->r(ur + 1, uc) * (1 - fc) + tmpImg->r(ur + 1, uc + 1) * fc) * fr; - fImg->g(row, col) = (tmpImg->g(ur, uc) * (1 - fc) + tmpImg->g(ur, uc + 1) * fc) * (1 - fr) + (tmpImg->g(ur + 1, uc) * (1 - fc) + tmpImg->g(ur + 1, uc + 1) * fc) * fr; - fImg->b(row, col) = (tmpImg->b(ur, uc) * (1 - fc) + tmpImg->b(ur, uc + 1) * fc) * (1 - fr) + (tmpImg->b(ur + 1, uc) * (1 - fc) + tmpImg->b(ur + 1, uc + 1) * fc) * fr; + fImg->r (row, col) = (tmpImg->r (ur, uc) * (1 - fc) + tmpImg->r (ur, uc + 1) * fc) * (1 - fr) + (tmpImg->r (ur + 1, uc) * (1 - fc) + tmpImg->r (ur + 1, uc + 1) * fc) * fr; + fImg->g (row, col) = (tmpImg->g (ur, uc) * (1 - fc) + tmpImg->g (ur, uc + 1) * fc) * (1 - fr) + (tmpImg->g (ur + 1, uc) * (1 - fc) + tmpImg->g (ur + 1, uc + 1) * fc) * fr; + fImg->b (row, col) = (tmpImg->b (ur, uc) * (1 - fc) + tmpImg->b (ur, uc + 1) * fc) * (1 - fr) + (tmpImg->b (ur + 1, uc) * (1 - fc) + tmpImg->b (ur + 1, uc + 1) * fc) * fr; } delete tmpImg; @@ -518,7 +625,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati ); if (rotate_90) { - std::swap(tmpw, tmph); + std::swap (tmpw, tmph); } if (fixwh == 1) { // fix height, scale width @@ -532,22 +639,23 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati } if (rotate_90) { - tpp->thumbImg = resizeTo(h, w, TI_Bilinear, tmpImg); + tpp->thumbImg = resizeTo (h, w, TI_Bilinear, tmpImg); } else { - tpp->thumbImg = resizeTo(w, h, TI_Bilinear, tmpImg); + tpp->thumbImg = resizeTo (w, h, TI_Bilinear, tmpImg); } + delete tmpImg; if (ri->get_FujiWidth() != 0) { - tpp->scale = (double) (height - ri->get_FujiWidth()) / sqrt(0.5) / h; + tpp->scale = (double) (height - ri->get_FujiWidth()) * 2.0 / (rotate_90 ? w : h); } else { - tpp->scale = (double) height / h; + tpp->scale = (double) height / (rotate_90 ? w : h); } // generate histogram for auto exposure tpp->aeHistCompression = 3; - tpp->aeHistogram(65536 >> tpp->aeHistCompression); + tpp->aeHistogram (65536 >> tpp->aeHistCompression); tpp->aeHistogram.clear(); int radd = 4; int gadd = 4; @@ -562,8 +670,8 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_FujiWidth() != 0) { int fw = ri->get_FujiWidth(); - start = ABS(fw - i) + 8; - end = min(height + width - fw - i, fw + i) - 8; + start = ABS (fw - i) + 8; + end = min (height + width - fw - i, fw + i) - 8; } else { start = 8; end = width - 8; @@ -571,33 +679,33 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_colors() == 1) { for (int j = start; j < end; j++) { - tpp->aeHistogram[((int)(image[i * width + j][0])) >> tpp->aeHistCompression] += radd; - tpp->aeHistogram[((int)(image[i * width + j][0])) >> tpp->aeHistCompression] += gadd; - tpp->aeHistogram[((int)(image[i * width + j][0])) >> tpp->aeHistCompression] += badd; + tpp->aeHistogram[ ((int) (image[i * width + j][0])) >> tpp->aeHistCompression] += radd; + tpp->aeHistogram[ ((int) (image[i * width + j][0])) >> tpp->aeHistCompression] += gadd; + tpp->aeHistogram[ ((int) (image[i * width + j][0])) >> tpp->aeHistCompression] += badd; } - } else if(ri->getSensorType() == ST_BAYER) { + } else if (ri->getSensorType() == ST_BAYER) { for (int j = start; j < end; j++) - if (FISGREEN(filter, i, j)) { - tpp->aeHistogram[((int)(tpp->camwbGreen * image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; - } else if (FISRED(filter, i, j)) { - tpp->aeHistogram[((int)(tpp->camwbRed * image[i * width + j][0])) >> tpp->aeHistCompression] += radd; - } else if (FISBLUE(filter, i, j)) { - tpp->aeHistogram[((int)(tpp->camwbBlue * image[i * width + j][2])) >> tpp->aeHistCompression] += badd; + if (FISGREEN (filter, i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbGreen * image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; + } else if (FISRED (filter, i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbRed * image[i * width + j][0])) >> tpp->aeHistCompression] += radd; + } else if (FISBLUE (filter, i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbBlue * image[i * width + j][2])) >> tpp->aeHistCompression] += badd; } - } else if(ri->getSensorType() == ST_FUJI_XTRANS) { + } else if (ri->getSensorType() == ST_FUJI_XTRANS) { for (int j = start; j < end; j++) - if (ri->ISXTRANSGREEN(i, j)) { - tpp->aeHistogram[((int)(tpp->camwbGreen * image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; - } else if (ri->ISXTRANSRED(i, j)) { - tpp->aeHistogram[((int)(tpp->camwbRed * image[i * width + j][0])) >> tpp->aeHistCompression] += radd; - } else if (ri->ISXTRANSBLUE(i, j)) { - tpp->aeHistogram[((int)(tpp->camwbBlue * image[i * width + j][2])) >> tpp->aeHistCompression] += badd; + if (ri->ISXTRANSGREEN (i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbGreen * image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; + } else if (ri->ISXTRANSRED (i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbRed * image[i * width + j][0])) >> tpp->aeHistCompression] += radd; + } else if (ri->ISXTRANSBLUE (i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbBlue * image[i * width + j][2])) >> tpp->aeHistCompression] += badd; } } else { /* if(ri->getSensorType()==ST_FOVEON) */ for (int j = start; j < end; j++) { - tpp->aeHistogram[((int)(image[i * width + j][0] * 2.f)) >> tpp->aeHistCompression] += radd; - tpp->aeHistogram[((int)(image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; - tpp->aeHistogram[((int)(image[i * width + j][2] * 0.5f)) >> tpp->aeHistCompression] += badd; + tpp->aeHistogram[ ((int) (image[i * width + j][0] * 2.f)) >> tpp->aeHistCompression] += radd; + tpp->aeHistogram[ ((int) (image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; + tpp->aeHistogram[ ((int) (image[i * width + j][2] * 0.5f)) >> tpp->aeHistCompression] += badd; } } } @@ -615,14 +723,14 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_FujiWidth() != 0) { int fw = ri->get_FujiWidth(); - start = ABS(fw - i) + 32; - end = min(height + width - fw - i, fw + i) - 32; + start = ABS (fw - i) + 32; + end = min (height + width - fw - i, fw + i) - 32; } else { start = 32; end = width - 32; } - if(ri->getSensorType() == ST_BAYER) { + if (ri->getSensorType() == ST_BAYER) { for (int j = start; j < end; j++) { if (!filter) { double d = tpp->defGain * image[i * width + j][0]; @@ -637,7 +745,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati rn++; gn++; bn++; - } else if (FISGREEN(filter, i, j)) { + } else if (FISGREEN (filter, i, j)) { double d = tpp->defGain * image[i * width + j][1]; if (d > 64000.) { @@ -646,7 +754,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati avg_g += d; gn++; - } else if (FISRED(filter, i, j)) { + } else if (FISRED (filter, i, j)) { double d = tpp->defGain * image[i * width + j][0]; if (d > 64000.) { @@ -655,7 +763,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati avg_r += d; rn++; - } else if (FISBLUE(filter, i, j)) { + } else if (FISBLUE (filter, i, j)) { double d = tpp->defGain * image[i * width + j][2]; if (d > 64000.) { @@ -666,9 +774,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati bn++; } } - } else if(ri->getSensorType() == ST_FUJI_XTRANS) { + } else if (ri->getSensorType() == ST_FUJI_XTRANS) { for (int j = start; j < end; j++) { - if (ri->ISXTRANSGREEN(i, j)) { + if (ri->ISXTRANSGREEN (i, j)) { double d = tpp->defGain * image[i * width + j][1]; if (d > 64000.) { @@ -677,7 +785,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati avg_g += d; gn++; - } else if (ri->ISXTRANSRED(i, j)) { + } else if (ri->ISXTRANSRED (i, j)) { double d = tpp->defGain * image[i * width + j][0]; if (d > 64000.) { @@ -686,7 +794,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati avg_r += d; rn++; - } else if (ri->ISXTRANSBLUE(i, j)) { + } else if (ri->ISXTRANSBLUE (i, j)) { double d = tpp->defGain * image[i * width + j][2]; if (d > 64000.) { @@ -727,21 +835,22 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati double greens = avg_g / gn * tpp->camwbGreen; double blues = avg_b / bn * tpp->camwbBlue; - tpp->redAWBMul = ri->get_rgb_cam(0, 0) * reds + ri->get_rgb_cam(0, 1) * greens + ri->get_rgb_cam(0, 2) * blues; - tpp->greenAWBMul = ri->get_rgb_cam(1, 0) * reds + ri->get_rgb_cam(1, 1) * greens + ri->get_rgb_cam(1, 2) * blues; - tpp->blueAWBMul = ri->get_rgb_cam(2, 0) * reds + ri->get_rgb_cam(2, 1) * greens + ri->get_rgb_cam(2, 2) * blues; + tpp->redAWBMul = ri->get_rgb_cam (0, 0) * reds + ri->get_rgb_cam (0, 1) * greens + ri->get_rgb_cam (0, 2) * blues; + tpp->greenAWBMul = ri->get_rgb_cam (1, 0) * reds + ri->get_rgb_cam (1, 1) * greens + ri->get_rgb_cam (1, 2) * blues; + tpp->blueAWBMul = ri->get_rgb_cam (2, 0) * reds + ri->get_rgb_cam (2, 1) * greens + ri->get_rgb_cam (2, 2) * blues; tpp->wbEqual = wbEq; + tpp->wbTempBias = 0.0; ColorTemp cTemp; - cTemp.mul2temp(tpp->redAWBMul, tpp->greenAWBMul, tpp->blueAWBMul, tpp->wbEqual, tpp->autoWBTemp, tpp->autoWBGreen); + cTemp.mul2temp (tpp->redAWBMul, tpp->greenAWBMul, tpp->blueAWBMul, tpp->wbEqual, tpp->autoWBTemp, tpp->autoWBGreen); if (rotate && ri->get_rotateDegree() > 0) { - tpp->thumbImg->rotate(ri->get_rotateDegree()); + tpp->thumbImg->rotate (ri->get_rotateDegree()); } for (int a = 0; a < 3; a++) for (int b = 0; b < 3; b++) { - tpp->colorMatrix[a][b] = ri->get_rgb_cam(a, b); + tpp->colorMatrix[a][b] = ri->get_rgb_cam (a, b); } tpp->init(); @@ -756,7 +865,7 @@ void Thumbnail::init () { RawImageSource::inverse33 (colorMatrix, iColorMatrix); //colorMatrix is rgb_cam - memset (cam2xyz, 0, sizeof(cam2xyz)); + memset (cam2xyz, 0, sizeof (cam2xyz)); for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) @@ -764,21 +873,37 @@ void Thumbnail::init () cam2xyz[i][j] += xyz_sRGB[i][k] * colorMatrix[k][j]; } - camProfile = iccStore->createFromMatrix (cam2xyz, false, "Camera"); + camProfile = ICCStore::getInstance()->createFromMatrix (cam2xyz, false, "Camera"); } Thumbnail::Thumbnail () : - iColorMatrix{}, cam2xyz{}, scale(1.0), colorMatrix{}, isRaw(true), - camProfile(nullptr), thumbImg(nullptr), - camwbRed(1.0), camwbGreen(1.0), camwbBlue(1.0), - redAWBMul(-1.0), greenAWBMul(-1.0), blueAWBMul(-1.0), - autoWBTemp(2700), autoWBGreen(1.0), wbEqual(-1.0), - embProfileLength(0), embProfileData(nullptr), embProfile(nullptr), - redMultiplier(1.0), greenMultiplier(1.0), blueMultiplier(1.0), - defGain(1.0), - scaleForSave(8192), - gammaCorrected(false), - aeHistCompression(3) + camProfile (nullptr), + iColorMatrix{}, + cam2xyz{}, + thumbImg (nullptr), + camwbRed (1.0), + camwbGreen (1.0), + camwbBlue (1.0), + redAWBMul (-1.0), + greenAWBMul (-1.0), + blueAWBMul (-1.0), + autoWBTemp (2700), + autoWBGreen (1.0), + wbEqual (-1.0), + wbTempBias (0.0), + aeHistCompression (3), + embProfileLength (0), + embProfileData (nullptr), + embProfile (nullptr), + redMultiplier (1.0), + greenMultiplier (1.0), + blueMultiplier (1.0), + scale (1.0), + defGain (1.0), + scaleForSave (8192), + gammaCorrected (false), + colorMatrix{}, + isRaw (true) { } @@ -790,11 +915,11 @@ Thumbnail::~Thumbnail () delete [] embProfileData; if (embProfile) { - cmsCloseProfile(embProfile); + cmsCloseProfile (embProfile); } if (camProfile) { - cmsCloseProfile(camProfile); + cmsCloseProfile (camProfile); } } @@ -806,12 +931,12 @@ IImage8* Thumbnail::quickProcessImage (const procparams::ProcParams& params, int if (params.coarse.rotate == 90 || params.coarse.rotate == 270) { rwidth = rheight; - rheight = thumbImg->height * rwidth / thumbImg->width; + rheight = thumbImg->getHeight() * rwidth / thumbImg->getWidth(); } else { - rwidth = thumbImg->width * rheight / thumbImg->height; + rwidth = thumbImg->getWidth() * rheight / thumbImg->getHeight(); } - Image8* baseImg = resizeTo(rwidth, rheight, interp, thumbImg); + Image8* baseImg = resizeTo (rwidth, rheight, interp, thumbImg); if (params.coarse.rotate) { baseImg->rotate (params.coarse.rotate); @@ -832,14 +957,14 @@ IImage8* Thumbnail::quickProcessImage (const procparams::ProcParams& params, int IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rheight, TypeInterpolation interp, std::string camName, double focalLen, double focalLen35mm, float focusDist, float shutter, float fnumber, float iso, std::string expcomp_, double& myscale) { - BENCHFUN - // check if the WB's equalizer value has changed - if (wbEqual < (params.wb.equal - 5e-4) || wbEqual > (params.wb.equal + 5e-4)) { + if (wbEqual < (params.wb.equal - 5e-4) || wbEqual > (params.wb.equal + 5e-4) || wbTempBias < (params.wb.tempBias - 5e-4) || wbTempBias > (params.wb.tempBias + 5e-4)) { wbEqual = params.wb.equal; + wbTempBias = params.wb.tempBias; // recompute the autoWB ColorTemp cTemp; cTemp.mul2temp (redAWBMul, greenAWBMul, blueAWBMul, wbEqual, autoWBTemp, autoWBGreen); + autoWBTemp += autoWBTemp * wbTempBias; } // compute WB multipliers @@ -865,7 +990,6 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei gm = camwbGreen / gm; bm = camwbBlue / bm; double mul_lum = 0.299 * rm + 0.587 * gm + 0.114 * bm; - double logDefGain = 0.0; float rmi, gmi, bmi; rmi = rm * defGain / mul_lum; @@ -885,18 +1009,18 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei if (params.coarse.rotate == 90 || params.coarse.rotate == 270) { rwidth = rheight; - rheight = int(size_t(thumbImg->height) * size_t(rwidth) / size_t(thumbImg->width)); + rheight = int (size_t (thumbImg->getHeight()) * size_t (rwidth) / size_t (thumbImg->getWidth())); } else { - rwidth = int(size_t(thumbImg->width) * size_t(rheight) / size_t(thumbImg->height)); + rwidth = int (size_t (thumbImg->getWidth()) * size_t (rheight) / size_t (thumbImg->getHeight())); } - Imagefloat* baseImg = resizeTo(rwidth, rheight, interp, thumbImg); + Imagefloat* baseImg = resizeTo (rwidth, rheight, interp, thumbImg); if (params.coarse.rotate) { baseImg->rotate (params.coarse.rotate); - rwidth = baseImg->width; - rheight = baseImg->height; + rwidth = baseImg->getWidth(); + rheight = baseImg->getHeight(); } if (params.coarse.hflip) { @@ -915,12 +1039,12 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei #endif for (int j = 0; j < rwidth; j++) { - float red = baseImg->r(i, j) * rmi; - baseImg->r(i, j) = CLIP(red); - float green = baseImg->g(i, j) * gmi; - baseImg->g(i, j) = CLIP(green); - float blue = baseImg->b(i, j) * bmi; - baseImg->b(i, j) = CLIP(blue); + float red = baseImg->r (i, j) * rmi; + baseImg->r (i, j) = CLIP (red); + float green = baseImg->g (i, j) * gmi; + baseImg->g (i, j) = CLIP (green); + float blue = baseImg->b (i, j) * bmi; + baseImg->b (i, j) = CLIP (blue); } } @@ -936,17 +1060,16 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei StdImageSource::colorSpaceConversion (baseImg, params.icm, embProfile, thumbImg->getSampleFormat()); } - int fw = baseImg->width; - int fh = baseImg->height; + int fw = baseImg->getWidth(); + int fh = baseImg->getHeight(); //ColorTemp::CAT02 (baseImg, ¶ms) ;//perhaps not good! ImProcFunctions ipf (¶ms, false); - ipf.setScale (sqrt(double(fw * fw + fh * fh)) / sqrt(double(thumbImg->width * thumbImg->width + thumbImg->height * thumbImg->height))*scale); - ipf.updateColorProfiles (params.icm, options.rtSettings.monitorProfile, options.rtSettings.monitorIntent, false, false); + ipf.setScale (sqrt (double (fw * fw + fh * fh)) / sqrt (double (thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale); + ipf.updateColorProfiles (ICCStore::getInstance()->getDefaultMonitorProfileName(), options.rtSettings.monitorIntent, false, false); LUTu hist16 (65536); - double gamma = isRaw ? Color::sRGBGamma : 0; // usually in ImageSource, but we don't have that here ipf.firstAnalysis (baseImg, params, hist16); // perform transform @@ -954,9 +1077,9 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei Imagefloat* trImg = new Imagefloat (fw, fh); int origFW; int origFH; - double tscale; - getDimensions(origFW, origFH, tscale); - ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, origFW * tscale + 0.5, origFH * tscale + 0.5, focalLen, focalLen35mm, focusDist, 0, true); // Raw rotate degree not detectable here + double tscale = 0.0; + getDimensions (origFW, origFH, tscale); + ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, origFW * tscale + 0.5, origFH * tscale + 0.5, focalLen, focalLen35mm, focusDist, fnumber, 0, true); // Raw rotate degree not detectable here delete baseImg; baseImg = trImg; } @@ -966,7 +1089,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei if (params.sh.enabled) { shmap = new SHMap (fw, fh, false); - double radius = sqrt (double(fw * fw + fh * fh)) / 2.0; + double radius = sqrt (double (fw * fw + fh * fh)) / 2.0; double shradius = params.sh.radius; if (!params.sh.hq) { @@ -985,6 +1108,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei int hlcomprthresh = params.toneCurve.hlcomprthresh; if (params.toneCurve.autoexp && aeHistogram) { + double logDefGain = 0.0; ipf.getAutoExp (aeHistogram, aeHistCompression, logDefGain, params.toneCurve.clip, expcomp, bright, contr, black, hlcompr, hlcomprthresh); } @@ -994,7 +1118,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei LUTf satcurve (65536); LUTf lhskcurve (65536); - LUTf lumacurve(32770, 0); // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation + LUTf lumacurve (32770, 0); // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation LUTf clcurve (65536); LUTf clToningcurve; LUTf cl2Toningcurve; @@ -1024,49 +1148,49 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei bool opautili = false; - if(params.colorToning.enabled) { - TMatrix wprof = iccStore->workingSpaceMatrix (params.icm.working); + if (params.colorToning.enabled) { + TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working); double wp[3][3] = { {wprof[0][0], wprof[0][1], wprof[0][2]}, {wprof[1][0], wprof[1][1], wprof[1][2]}, {wprof[2][0], wprof[2][1], wprof[2][2]} }; - TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params.icm.working); + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params.icm.working); double wip[3][3] = { {wiprof[0][0], wiprof[0][1], wiprof[0][2]}, {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, {wiprof[2][0], wiprof[2][1], wiprof[2][2]} }; - params.colorToning.getCurves(ctColorCurve, ctOpacityCurve, wp, wip, opautili); + params.colorToning.getCurves (ctColorCurve, ctOpacityCurve, wp, wip, opautili); clToningcurve (65536); - CurveFactory::curveToning(params.colorToning.clcurve, clToningcurve, scale == 1 ? 1 : 16); + CurveFactory::curveToning (params.colorToning.clcurve, clToningcurve, scale == 1 ? 1 : 16); cl2Toningcurve (65536); - CurveFactory::curveToning(params.colorToning.cl2curve, cl2Toningcurve, scale == 1 ? 1 : 16); + CurveFactory::curveToning (params.colorToning.cl2curve, cl2Toningcurve, scale == 1 ? 1 : 16); } - if(params.blackwhite.enabled) { + if (params.blackwhite.enabled) { CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, hist16, dummy, customToneCurvebw1, customToneCurvebw2, 16); } double rrm, ggm, bbm; float autor, autog, autob; - float satLimit = float(params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; - float satLimitOpacity = 1.f - (float(params.colorToning.saturatedOpacity) / 100.f); + float satLimit = float (params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; + float satLimitOpacity = 1.f - (float (params.colorToning.saturatedOpacity) / 100.f); - if(params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings + if (params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings float moyS = 0.f; float eqty = 0.f; ipf.moyeqt (baseImg, moyS, eqty);//return image : mean saturation and standard dev of saturation //printf("moy=%f ET=%f\n", moyS,eqty); float satp = ((moyS + 1.5f * eqty) - 0.3f) / 0.7f; //1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale - if(satp >= 0.92f) { + if (satp >= 0.92f) { satp = 0.92f; //avoid values too high (out of gamut) } - if(satp <= 0.15f) { + if (satp <= 0.15f) { satp = 0.15f; //avoid too low values } @@ -1083,15 +1207,15 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei if (isRaw) { cmsHPROFILE dummy; - RawImageSource::findInputProfile(params.icm.input, nullptr, camName, &dcpProf, dummy); + RawImageSource::findInputProfile (params.icm.input, nullptr, camName, &dcpProf, dummy); if (dcpProf) { - dcpProf->setStep2ApplyState(params.icm.working, params.icm.toneCurve, params.icm.applyLookTable, params.icm.applyBaselineExposureOffset, as); + dcpProf->setStep2ApplyState (params.icm.working, params.icm.toneCurve, params.icm.applyLookTable, params.icm.applyBaselineExposureOffset, as); } } LUTu histToneCurve; - ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); // freeing up some memory customToneCurve1.Reset(); @@ -1106,12 +1230,12 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei } // luminance histogram update - if(params.labCurve.contrast != 0) { + if (params.labCurve.contrast != 0) { hist16.clear(); for (int i = 0; i < fh; i++) for (int j = 0; j < fw; j++) { - hist16[(int)((labView->L[i][j]))]++; + hist16[ (int) ((labView->L[i][j]))]++; } } @@ -1123,7 +1247,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei hist16, lumacurve, dummy, 16, utili); bool clcutili; - CurveFactory::curveCL(clcutili, params.labCurve.clcurve, clcurve, 16); + CurveFactory::curveCL (clcutili, params.labCurve.clcurve, clcurve, 16); bool autili, butili, ccutili, cclutili; CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, @@ -1131,13 +1255,13 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); - ipf.vibrance(labView); + ipf.vibrance (labView); - if((params.colorappearance.enabled && !params.colorappearance.tonecie) || !params.colorappearance.enabled) { - ipf.EPDToneMap(labView, 5, 6); + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || !params.colorappearance.enabled) { + ipf.EPDToneMap (labView, 5, 6); } - if(params.colorappearance.enabled) { + if (params.colorappearance.enabled) { CurveFactory::curveLightBrightColor ( params.colorappearance.curve, params.colorappearance.curve2, @@ -1150,18 +1274,18 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei 16); int begh = 0, endh = labView->H; bool execsharp = false; - float d; + float d, dj, yb; float fnum = fnumber;// F number float fiso = iso;// ISO float fspeed = shutter;//speed char * writ = new char[expcomp_.size() + 1];//convert expcomp_ to char - std::copy(expcomp_.begin(), expcomp_.end(), writ); + std::copy (expcomp_.begin(), expcomp_.end(), writ); writ[expcomp_.size()] = '\0'; - float fcomp = atof(writ); //compensation + - + float fcomp = atof (writ); //compensation + - delete[] writ; float adap; - if(fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) //if no exif data or wrong { adap = 2000.f; @@ -1170,9 +1294,9 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei float expo2 = params.toneCurve.expcomp; // exposure compensation in tonecurve ==> direct EV E_V += expo2; float expo1;//exposure raw white point - expo1 = log2(params.raw.expos); //log2 ==>linear to EV + expo1 = log2 (params.raw.expos); //log2 ==>linear to EV E_V += expo1; - adap = powf(2.f, E_V - 3.f); //cd / m2 + adap = powf (2.f, E_V - 3.f); //cd / m2 //end calculation adaptation scene luminosity } @@ -1180,14 +1304,13 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei LUTf CAMBrightCurveQ; float CAMMean; int sk; - int scale; sk = 16; int rtt = 0; CieImage* cieView = new CieImage (fw, fh); CAMMean = NAN; CAMBrightCurveJ.dirty = true; CAMBrightCurveQ.dirty = true; - ipf.ciecam_02float (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 6, execsharp, d, sk, rtt); + ipf.ciecam_02float (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, sk, execsharp, d, dj, yb, rtt); delete cieView; } @@ -1202,9 +1325,9 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei // calculate scale if (params.coarse.rotate == 90 || params.coarse.rotate == 270) { - myscale = scale * thumbImg->width / fh; + myscale = scale * thumbImg->getWidth() / fh; } else { - myscale = scale * thumbImg->height / fh; + myscale = scale * thumbImg->getHeight() / fh; } myscale = 1.0 / myscale; @@ -1234,12 +1357,12 @@ int Thumbnail::getImageWidth (const procparams::ProcParams& params, int rheight, int rwidth; if (params.coarse.rotate == 90 || params.coarse.rotate == 270) { - ratio = (float)(thumbImg->height) / (float)(thumbImg->width); + ratio = (float) (thumbImg->getHeight()) / (float) (thumbImg->getWidth()); } else { - ratio = (float)(thumbImg->width) / (float)(thumbImg->height); + ratio = (float) (thumbImg->getWidth()) / (float) (thumbImg->getHeight()); } - rwidth = (int)(ratio * (float)rheight); + rwidth = (int) (ratio * (float)rheight); return rwidth; } @@ -1247,8 +1370,8 @@ int Thumbnail::getImageWidth (const procparams::ProcParams& params, int rheight, void Thumbnail::getDimensions (int& w, int& h, double& scaleFac) { if (thumbImg) { - w = thumbImg->width; - h = thumbImg->height; + w = thumbImg->getWidth(); + h = thumbImg->getHeight(); scaleFac = scale; } else { w = 0; @@ -1268,15 +1391,17 @@ void Thumbnail::getCamWB (double& temp, double& green) green = currWB.getGreen (); } -void Thumbnail::getAutoWB (double& temp, double& green, double equal) +void Thumbnail::getAutoWB (double& temp, double& green, double equal, double tempBias) { - if (equal != wbEqual) { + if (equal != wbEqual || tempBias != wbTempBias) { // compute the values depending on equal ColorTemp cTemp; wbEqual = equal; + wbTempBias = tempBias; // compute autoWBTemp and autoWBGreen - cTemp.mul2temp(redAWBMul, greenAWBMul, blueAWBMul, wbEqual, autoWBTemp, autoWBGreen); + cTemp.mul2temp (redAWBMul, greenAWBMul, blueAWBMul, wbEqual, autoWBTemp, autoWBGreen); + autoWBTemp += autoWBTemp * tempBias; } temp = autoWBTemp; @@ -1295,7 +1420,7 @@ void Thumbnail::applyAutoExp (procparams::ProcParams& params) if (params.toneCurve.autoexp && aeHistogram) { ImProcFunctions ipf (¶ms, false); - ipf.getAutoExp (aeHistogram, aeHistCompression, log(defGain) / log(2.0), params.toneCurve.clip, params.toneCurve.expcomp, + ipf.getAutoExp (aeHistogram, aeHistCompression, log (defGain) / log (2.0), params.toneCurve.clip, params.toneCurve.expcomp, params.toneCurve.brightness, params.toneCurve.contrast, params.toneCurve.black, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh); } } @@ -1310,20 +1435,20 @@ void Thumbnail::getSpotWB (const procparams::ProcParams& params, int xp, int yp, points.push_back (Coord2D (j, i)); } - int fw = thumbImg->width, fh = thumbImg->height; + int fw = thumbImg->getWidth(), fh = thumbImg->getHeight(); if (params.coarse.rotate == 90 || params.coarse.rotate == 270) { - fw = thumbImg->height; - fh = thumbImg->width; + fw = thumbImg->getHeight(); + fh = thumbImg->getWidth(); } ImProcFunctions ipf (¶ms, false); ipf.transCoord (fw, fh, points, red, green, blue); - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); // calculate spot wb (copy & pasted from stdimagesource) double reds = 0, greens = 0, blues = 0; int rn = 0, gn = 0, bn = 0; - thumbImg->getSpotWBData(reds, greens, blues, rn, gn, bn, red, green, blue, tr); + thumbImg->getSpotWBData (reds, greens, blues, rn, gn, bn, red, green, blue, tr); reds = reds / rn * camwbRed; greens = greens / gn * camwbGreen; blues = blues / bn * camwbBlue; @@ -1339,8 +1464,8 @@ void Thumbnail::getSpotWB (const procparams::ProcParams& params, int xp, int yp, void Thumbnail::transformPixel (int x, int y, int tran, int& tx, int& ty) { - int W = thumbImg->width; - int H = thumbImg->height; + int W = thumbImg->getWidth(); + int H = thumbImg->getHeight(); int sw = W, sh = H; if ((tran & TR_ROT) == TR_R90 || (tran & TR_ROT) == TR_R270) { @@ -1382,13 +1507,13 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) return nullptr; } - if (thumbImg->width < trim_width) { + if (thumbImg->getWidth() < trim_width) { return nullptr; } // to utilize the 8 bit color range of the thumbnail we brighten it and apply gamma correction - unsigned char* tmpdata = new unsigned char[thumbImg->height * trim_width]; - int ix = 0, max; + unsigned char* tmpdata = new unsigned char[thumbImg->getHeight() * trim_width]; + int ix = 0; if (gammaCorrected) { // if it's gamma correct (usually a RAW), we have the problem that there is a lot noise etc. that makes the maximum way too high. @@ -1397,23 +1522,23 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) // Calc the histogram unsigned int* hist16 = new unsigned int [65536]; - memset(hist16, 0, sizeof(int) * 65536); + memset (hist16, 0, sizeof (int) * 65536); if (thumbImg->getType() == sImage8) { - Image8 *image = static_cast(thumbImg); - image->calcGrayscaleHist(hist16); + Image8 *image = static_cast (thumbImg); + image->calcGrayscaleHist (hist16); } else if (thumbImg->getType() == sImage16) { - Image16 *image = static_cast(thumbImg); - image->calcGrayscaleHist(hist16); + Image16 *image = static_cast (thumbImg); + image->calcGrayscaleHist (hist16); } else if (thumbImg->getType() == sImagefloat) { - Imagefloat *image = static_cast(thumbImg); - image->calcGrayscaleHist(hist16); + Imagefloat *image = static_cast (thumbImg); + image->calcGrayscaleHist (hist16); } else { - printf("getGrayscaleHistEQ #1: Unsupported image type \"%s\"!\n", thumbImg->getType()); + printf ("getGrayscaleHistEQ #1: Unsupported image type \"%s\"!\n", thumbImg->getType()); } // Go down till we cut off that many pixels - unsigned long cutoff = thumbImg->height * thumbImg->height * 4 * BurnOffPct; + unsigned long cutoff = thumbImg->getHeight() * thumbImg->getHeight() * 4 * BurnOffPct; int max_; unsigned long sum = 0; @@ -1428,72 +1553,72 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) // Correction and gamma to 8 Bit if (thumbImg->getType() == sImage8) { - Image8 *image = static_cast(thumbImg); + Image8 *image = static_cast (thumbImg); - for (int i = 0; i < thumbImg->height; i++) - for (int j = (thumbImg->width - trim_width) / 2; j < trim_width + (thumbImg->width - trim_width) / 2; j++) { + for (int i = 0; i < thumbImg->getHeight(); i++) + for (int j = (thumbImg->getWidth() - trim_width) / 2; j < trim_width + (thumbImg->getWidth() - trim_width) / 2; j++) { unsigned short r_, g_, b_; - image->convertTo(image->r(i, j), r_); - image->convertTo(image->g(i, j), g_); - image->convertTo(image->b(i, j), b_); - int r = Color::gammatabThumb[min(r_, static_cast(max_)) * scaleForSave >> 13]; - int g = Color::gammatabThumb[min(g_, static_cast(max_)) * scaleForSave >> 13]; - int b = Color::gammatabThumb[min(b_, static_cast(max_)) * scaleForSave >> 13]; + image->convertTo (image->r (i, j), r_); + image->convertTo (image->g (i, j), g_); + image->convertTo (image->b (i, j), b_); + int r = Color::gammatabThumb[min (r_, static_cast (max_)) * scaleForSave >> 13]; + int g = Color::gammatabThumb[min (g_, static_cast (max_)) * scaleForSave >> 13]; + int b = Color::gammatabThumb[min (b_, static_cast (max_)) * scaleForSave >> 13]; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else if (thumbImg->getType() == sImage16) { - Image16 *image = static_cast(thumbImg); + Image16 *image = static_cast (thumbImg); - for (int i = 0; i < thumbImg->height; i++) - for (int j = (thumbImg->width - trim_width) / 2; j < trim_width + (thumbImg->width - trim_width) / 2; j++) { + for (int i = 0; i < thumbImg->getHeight(); i++) + for (int j = (thumbImg->getWidth() - trim_width) / 2; j < trim_width + (thumbImg->getWidth() - trim_width) / 2; j++) { unsigned short r_, g_, b_; - image->convertTo(image->r(i, j), r_); - image->convertTo(image->g(i, j), g_); - image->convertTo(image->b(i, j), b_); - int r = Color::gammatabThumb[min(r_, static_cast(max_)) * scaleForSave >> 13]; - int g = Color::gammatabThumb[min(g_, static_cast(max_)) * scaleForSave >> 13]; - int b = Color::gammatabThumb[min(b_, static_cast(max_)) * scaleForSave >> 13]; + image->convertTo (image->r (i, j), r_); + image->convertTo (image->g (i, j), g_); + image->convertTo (image->b (i, j), b_); + int r = Color::gammatabThumb[min (r_, static_cast (max_)) * scaleForSave >> 13]; + int g = Color::gammatabThumb[min (g_, static_cast (max_)) * scaleForSave >> 13]; + int b = Color::gammatabThumb[min (b_, static_cast (max_)) * scaleForSave >> 13]; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else if (thumbImg->getType() == sImagefloat) { - Imagefloat *image = static_cast(thumbImg); + Imagefloat *image = static_cast (thumbImg); - for (int i = 0; i < thumbImg->height; i++) - for (int j = (thumbImg->width - trim_width) / 2; j < trim_width + (thumbImg->width - trim_width) / 2; j++) { + for (int i = 0; i < thumbImg->getHeight(); i++) + for (int j = (thumbImg->getWidth() - trim_width) / 2; j < trim_width + (thumbImg->getWidth() - trim_width) / 2; j++) { unsigned short r_, g_, b_; - image->convertTo(image->r(i, j), r_); - image->convertTo(image->g(i, j), g_); - image->convertTo(image->b(i, j), b_); - int r = Color::gammatabThumb[min(r_, static_cast(max_)) * scaleForSave >> 13]; - int g = Color::gammatabThumb[min(g_, static_cast(max_)) * scaleForSave >> 13]; - int b = Color::gammatabThumb[min(b_, static_cast(max_)) * scaleForSave >> 13]; + image->convertTo (image->r (i, j), r_); + image->convertTo (image->g (i, j), g_); + image->convertTo (image->b (i, j), b_); + int r = Color::gammatabThumb[min (r_, static_cast (max_)) * scaleForSave >> 13]; + int g = Color::gammatabThumb[min (g_, static_cast (max_)) * scaleForSave >> 13]; + int b = Color::gammatabThumb[min (b_, static_cast (max_)) * scaleForSave >> 13]; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } } else { // If it's not gamma corrected (usually a JPG) we take the normal maximum - max = 0; + int max = 0; if (thumbImg->getType() == sImage8) { - Image8 *image = static_cast(thumbImg); + Image8 *image = static_cast (thumbImg); unsigned char max_ = 0; - for (int row = 0; row < image->height; row++) - for (int col = 0; col < image->width; col++) { - if (image->r(row, col) > max_) { - max_ = image->r(row, col); + for (int row = 0; row < image->getHeight(); row++) + for (int col = 0; col < image->getWidth(); col++) { + if (image->r (row, col) > max_) { + max_ = image->r (row, col); } - if (image->g(row, col) > max_) { - max_ = image->g(row, col); + if (image->g (row, col) > max_) { + max_ = image->g (row, col); } - if (image->b(row, col) > max_) { - max_ = image->b(row, col); + if (image->b (row, col) > max_) { + max_ = image->b (row, col); } } - image->convertTo(max_, max); + image->convertTo (max_, max); if (max < 16384) { max = 16384; @@ -1502,37 +1627,37 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) scaleForSave = 65535 * 8192 / max; // Correction and gamma to 8 Bit - for (int i = 0; i < image->height; i++) - for (int j = (image->width - trim_width) / 2; j < trim_width + (image->width - trim_width) / 2; j++) { + for (int i = 0; i < image->getHeight(); i++) + for (int j = (image->getWidth() - trim_width) / 2; j < trim_width + (image->getWidth() - trim_width) / 2; j++) { unsigned short rtmp, gtmp, btmp; - image->convertTo(image->r(i, j), rtmp); - image->convertTo(image->g(i, j), gtmp); - image->convertTo(image->b(i, j), btmp); + image->convertTo (image->r (i, j), rtmp); + image->convertTo (image->g (i, j), gtmp); + image->convertTo (image->b (i, j), btmp); int r = rtmp * scaleForSave >> 21; int g = gtmp * scaleForSave >> 21; int b = btmp * scaleForSave >> 21; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else if (thumbImg->getType() == sImage16) { - Image16 *image = static_cast(thumbImg); + Image16 *image = static_cast (thumbImg); unsigned short max_ = 0; - for (int row = 0; row < image->height; row++) - for (int col = 0; col < image->width; col++) { - if (image->r(row, col) > max_) { - max_ = image->r(row, col); + for (int row = 0; row < image->getHeight(); row++) + for (int col = 0; col < image->getWidth(); col++) { + if (image->r (row, col) > max_) { + max_ = image->r (row, col); } - if (image->g(row, col) > max_) { - max_ = image->g(row, col); + if (image->g (row, col) > max_) { + max_ = image->g (row, col); } - if (image->b(row, col) > max_) { - max_ = image->b(row, col); + if (image->b (row, col) > max_) { + max_ = image->b (row, col); } } - image->convertTo(max_, max); + image->convertTo (max_, max); if (max < 16384) { max = 16384; @@ -1541,37 +1666,37 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) scaleForSave = 65535 * 8192 / max; // Correction and gamma to 8 Bit - for (int i = 0; i < image->height; i++) - for (int j = (image->width - trim_width) / 2; j < trim_width + (image->width - trim_width) / 2; j++) { + for (int i = 0; i < image->getHeight(); i++) + for (int j = (image->getWidth() - trim_width) / 2; j < trim_width + (image->getWidth() - trim_width) / 2; j++) { unsigned short rtmp, gtmp, btmp; - image->convertTo(image->r(i, j), rtmp); - image->convertTo(image->g(i, j), gtmp); - image->convertTo(image->b(i, j), btmp); + image->convertTo (image->r (i, j), rtmp); + image->convertTo (image->g (i, j), gtmp); + image->convertTo (image->b (i, j), btmp); int r = rtmp * scaleForSave >> 21; int g = gtmp * scaleForSave >> 21; int b = btmp * scaleForSave >> 21; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else if (thumbImg->getType() == sImagefloat) { - Imagefloat *image = static_cast(thumbImg); + Imagefloat *image = static_cast (thumbImg); float max_ = 0.f; - for (int row = 0; row < image->height; row++) - for (int col = 0; col < image->width; col++) { - if (image->r(row, col) > max_) { - max_ = image->r(row, col); + for (int row = 0; row < image->getHeight(); row++) + for (int col = 0; col < image->getWidth(); col++) { + if (image->r (row, col) > max_) { + max_ = image->r (row, col); } - if (image->g(row, col) > max_) { - max_ = image->g(row, col); + if (image->g (row, col) > max_) { + max_ = image->g (row, col); } - if (image->b(row, col) > max_) { - max_ = image->b(row, col); + if (image->b (row, col) > max_) { + max_ = image->b (row, col); } } - image->convertTo(max_, max); + image->convertTo (max_, max); if (max < 16384) { max = 16384; @@ -1580,19 +1705,19 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) scaleForSave = 65535 * 8192 / max; // Correction and gamma to 8 Bit - for (int i = 0; i < image->height; i++) - for (int j = (image->width - trim_width) / 2; j < trim_width + (image->width - trim_width) / 2; j++) { + for (int i = 0; i < image->getHeight(); i++) + for (int j = (image->getWidth() - trim_width) / 2; j < trim_width + (image->getWidth() - trim_width) / 2; j++) { unsigned short rtmp, gtmp, btmp; - image->convertTo(image->r(i, j), rtmp); - image->convertTo(image->g(i, j), gtmp); - image->convertTo(image->b(i, j), btmp); + image->convertTo (image->r (i, j), rtmp); + image->convertTo (image->g (i, j), gtmp); + image->convertTo (image->b (i, j), btmp); int r = rtmp * scaleForSave >> 21; int g = gtmp * scaleForSave >> 21; int b = btmp * scaleForSave >> 21; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else { - printf("getGrayscaleHistEQ #2: Unsupported image type \"%s\"!\n", thumbImg->getType()); + printf ("getGrayscaleHistEQ #2: Unsupported image type \"%s\"!\n", thumbImg->getType()); } } @@ -1613,7 +1738,7 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) } if (cdf_min != -1) { - hist[i] = (cdf - cdf_min) * 255 / ((thumbImg->height * trim_width) - cdf_min); + hist[i] = (cdf - cdf_min) * 255 / ((thumbImg->getHeight() * trim_width) - cdf_min); } } @@ -1639,22 +1764,22 @@ bool Thumbnail::writeImage (const Glib::ustring& fname, int format) return false; } - fwrite (thumbImg->getType(), sizeof (char), strlen(thumbImg->getType()), f); + fwrite (thumbImg->getType(), sizeof (char), strlen (thumbImg->getType()), f); fputc ('\n', f); - guint32 w = guint32(thumbImg->width); - guint32 h = guint32(thumbImg->height); + guint32 w = guint32 (thumbImg->getWidth()); + guint32 h = guint32 (thumbImg->getHeight()); fwrite (&w, sizeof (guint32), 1, f); fwrite (&h, sizeof (guint32), 1, f); if (thumbImg->getType() == sImage8) { - Image8 *image = static_cast(thumbImg); - image->writeData(f); + Image8 *image = static_cast (thumbImg); + image->writeData (f); } else if (thumbImg->getType() == sImage16) { - Image16 *image = static_cast(thumbImg); - image->writeData(f); + Image16 *image = static_cast (thumbImg); + image->writeData (f); } else if (thumbImg->getType() == sImagefloat) { - Imagefloat *image = static_cast(thumbImg); - image->writeData(f); + Imagefloat *image = static_cast (thumbImg); + image->writeData (f); } //thumbImg->writeData(f); @@ -1683,8 +1808,8 @@ bool Thumbnail::readImage (const Glib::ustring& fname) } char imgType[31]; // 30 -> arbitrary size, but should be enough for all image type's name - fgets(imgType, 30, f); - imgType[strlen(imgType) - 1] = '\0'; // imgType has a \n trailing character, so we overwrite it by the \0 char + fgets (imgType, 30, f); + imgType[strlen (imgType) - 1] = '\0'; // imgType has a \n trailing character, so we overwrite it by the \0 char guint32 width, height; fread (&width, 1, sizeof (guint32), f); @@ -1692,36 +1817,36 @@ bool Thumbnail::readImage (const Glib::ustring& fname) bool success = false; - if (!strcmp(imgType, sImage8)) { - Image8 *image = new Image8(width, height); - image->readData(f); + if (!strcmp (imgType, sImage8)) { + Image8 *image = new Image8 (width, height); + image->readData (f); thumbImg = image; success = true; - } else if (!strcmp(imgType, sImage16)) { - Image16 *image = new Image16(width, height); - image->readData(f); + } else if (!strcmp (imgType, sImage16)) { + Image16 *image = new Image16 (width, height); + image->readData (f); thumbImg = image; success = true; - } else if (!strcmp(imgType, sImagefloat)) { - Imagefloat *image = new Imagefloat(width, height); - image->readData(f); + } else if (!strcmp (imgType, sImagefloat)) { + Imagefloat *image = new Imagefloat (width, height); + image->readData (f); thumbImg = image; success = true; } else { - printf("readImage: Unsupported image type \"%s\"!\n", imgType); + printf ("readImage: Unsupported image type \"%s\"!\n", imgType); } - fclose(f); + fclose (f); return success; } bool Thumbnail::readData (const Glib::ustring& fname) { - setlocale(LC_NUMERIC, "C"); // to set decimal point to "." + setlocale (LC_NUMERIC, "C"); // to set decimal point to "." Glib::KeyFile keyFile; try { - MyMutex::MyLock thmbLock(thumbMutex); + MyMutex::MyLock thmbLock (thumbMutex); try { keyFile.load_from_file (fname); @@ -1800,11 +1925,11 @@ bool Thumbnail::readData (const Glib::ustring& fname) return true; } catch (Glib::Error &err) { if (options.rtSettings.verbose) { - printf("Thumbnail::readData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); + printf ("Thumbnail::readData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); } } catch (...) { if (options.rtSettings.verbose) { - printf("Thumbnail::readData / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); + printf ("Thumbnail::readData / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); } } @@ -1813,7 +1938,7 @@ bool Thumbnail::readData (const Glib::ustring& fname) bool Thumbnail::writeData (const Glib::ustring& fname) { - MyMutex::MyLock thmbLock(thumbMutex); + MyMutex::MyLock thmbLock (thumbMutex); Glib::ustring keyData; @@ -1846,11 +1971,11 @@ bool Thumbnail::writeData (const Glib::ustring& fname) } catch (Glib::Error& err) { if (options.rtSettings.verbose) { - printf("Thumbnail::writeData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); + printf ("Thumbnail::writeData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); } } catch (...) { if (options.rtSettings.verbose) { - printf("Thumbnail::writeData / Unknown exception while trying to save \"%s\"!\n", fname.c_str()); + printf ("Thumbnail::writeData / Unknown exception while trying to save \"%s\"!\n", fname.c_str()); } } @@ -1862,7 +1987,7 @@ bool Thumbnail::writeData (const Glib::ustring& fname) if (!f) { if (options.rtSettings.verbose) { - printf("Thumbnail::writeData / Error: unable to open file \"%s\" with write access!\n", fname.c_str()); + printf ("Thumbnail::writeData / Error: unable to open file \"%s\" with write access!\n", fname.c_str()); } return false; @@ -1877,21 +2002,29 @@ bool Thumbnail::writeData (const Glib::ustring& fname) bool Thumbnail::readEmbProfile (const Glib::ustring& fname) { + embProfileData = nullptr; + embProfile = nullptr; + embProfileLength = 0; + FILE* f = g_fopen (fname.c_str (), "rb"); - if (!f) { - embProfileData = nullptr; - embProfile = nullptr; - embProfileLength = 0; - } else { - fseek (f, 0, SEEK_END); - embProfileLength = ftell (f); - fseek (f, 0, SEEK_SET); - embProfileData = new unsigned char[embProfileLength]; - fread (embProfileData, 1, embProfileLength, f); + if (f) { + if (!fseek (f, 0, SEEK_END)) { + int profileLength = ftell (f); + + if (profileLength > 0) { + embProfileLength = profileLength; + + if (!fseek (f, 0, SEEK_SET)) { + embProfileData = new unsigned char[embProfileLength]; + fread (embProfileData, 1, embProfileLength, f); + embProfile = cmsOpenProfileFromMem (embProfileData, embProfileLength); + } + } + } + fclose (f); - embProfile = cmsOpenProfileFromMem (embProfileData, embProfileLength); - return true; + return embProfile != nullptr; } return false; @@ -1901,7 +2034,7 @@ bool Thumbnail::writeEmbProfile (const Glib::ustring& fname) { if (embProfileData) { - FILE* f = g_fopen(fname.c_str (), "wb"); + FILE* f = g_fopen (fname.c_str (), "wb"); if (f) { fwrite (embProfileData, 1, embProfileLength, f); @@ -1919,10 +2052,10 @@ bool Thumbnail::readAEHistogram (const Glib::ustring& fname) FILE* f = g_fopen (fname.c_str (), "rb"); if (!f) { - aeHistogram(0); + aeHistogram (0); } else { - aeHistogram(65536 >> aeHistCompression); - fread (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof(aeHistogram[0]), f); + aeHistogram (65536 >> aeHistCompression); + fread (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof (aeHistogram[0]), f); fclose (f); return true; } @@ -1937,7 +2070,7 @@ bool Thumbnail::writeAEHistogram (const Glib::ustring& fname) FILE* f = g_fopen (fname.c_str (), "wb"); if (f) { - fwrite (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof(aeHistogram[0]), f); + fwrite (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof (aeHistogram[0]), f); fclose (f); return true; } @@ -1949,7 +2082,7 @@ bool Thumbnail::writeAEHistogram (const Glib::ustring& fname) unsigned char* Thumbnail::getImage8Data() { if (thumbImg && thumbImg->getType() == rtengine::sImage8) { - Image8* img8 = static_cast(thumbImg); + Image8* img8 = static_cast (thumbImg); return img8->data; } diff --git a/rtengine/rtthumbnail.h b/rtengine/rtthumbnail.h index 18e72fc19..c40a226c4 100644 --- a/rtengine/rtthumbnail.h +++ b/rtengine/rtthumbnail.h @@ -47,7 +47,7 @@ class Thumbnail double camwbGreen; double camwbBlue; double redAWBMul, greenAWBMul, blueAWBMul; // multipliers for auto WB - double autoWBTemp, autoWBGreen, wbEqual; // autoWBTemp and autoWBGreen are updated each time autoWB is requested and if wbEqual has been modified + double autoWBTemp, autoWBGreen, wbEqual, wbTempBias; // autoWBTemp and autoWBGreen are updated each time autoWB is requested and if wbEqual has been modified LUTu aeHistogram; int aeHistCompression; int embProfileLength; @@ -78,12 +78,12 @@ public: void getDimensions (int& w, int& h, double& scaleFac); static Thumbnail* loadQuickFromRaw (const Glib::ustring& fname, rtengine::RawMetaDataLocation& rml, int &w, int &h, int fixwh, bool rotate, bool inspectorMode = false); - static Thumbnail* loadFromRaw (const Glib::ustring& fname, RawMetaDataLocation& rml, int &w, int &h, int fixwh, double wbEq, bool rotate); + static Thumbnail* loadFromRaw (const Glib::ustring& fname, RawMetaDataLocation& rml, int &w, int &h, int fixwh, double wbEq, bool rotate, int imageNum); static Thumbnail* loadFromImage (const Glib::ustring& fname, int &w, int &h, int fixwh, double wbEq, bool inspectorMode = false); static RawMetaDataLocation loadMetaDataFromRaw (const Glib::ustring& fname); void getCamWB (double& temp, double& green); - void getAutoWB (double& temp, double& green, double equal); + void getAutoWB (double& temp, double& green, double equal, double tempBias); void getAutoWBMultipliers (double& rm, double& gm, double& bm); void getSpotWB (const procparams::ProcParams& params, int x, int y, int rect, double& temp, double& green); void applyAutoExp (procparams::ProcParams& pparams); diff --git a/rtengine/settings.h b/rtengine/settings.h index b572e7310..ada63400a 100644 --- a/rtengine/settings.h +++ b/rtengine/settings.h @@ -38,6 +38,9 @@ public: int leveldnliss; // level of auto multi zone int leveldnautsimpl; // STD or EXPERT + Glib::ustring printerProfile; ///< ICC profile name used for soft-proofing a printer output + RenderingIntent printerIntent; ///< Colorimetric intent used with the above profile + bool printerBPC; ///< Black Point Compensation for the Labimage->Printer->Monitor transform Glib::ustring monitorProfile; ///< ICC profile name used for the monitor RenderingIntent monitorIntent; ///< Colorimetric intent used with the above profile bool monitorBPC; ///< Black Point Compensation for the Labimage->Monitor transform (directly, i.e. not soft-proofing and no WCS in between) diff --git a/rtengine/shmap.cc b/rtengine/shmap.cc index 65c1070a2..26674c906 100644 --- a/rtengine/shmap.cc +++ b/rtengine/shmap.cc @@ -85,12 +85,21 @@ void SHMap::update (Imagefloat* img, double radius, double lumi[3], bool hq, int if (!hq) { fillLuminance( img, map, lumi); + float *buffer = nullptr; + + if(radius > 40.) { + // When we pass another buffer to gaussianBlur, it will use iterated boxblur which is less prone to artifacts + buffer = new float[W * H]; + } + #ifdef _OPENMP #pragma omp parallel #endif { - gaussianBlur (map, map, W, H, radius); + gaussianBlur (map, map, W, H, radius, buffer); } + + delete [] buffer; } else { @@ -367,7 +376,7 @@ SSEFUNCTION void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, i #endif { #if defined( __SSE2__ ) && defined( __x86_64__ ) - __m128 dirwtv, valv, normv, dftemp1v, dftemp2v, fg; + vfloat dirwtv, valv, normv, dftemp1v, dftemp2v; #endif // __SSE2__ int j; #ifdef _OPENMP @@ -474,7 +483,7 @@ SSEFUNCTION void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, i #endif { #if defined( __SSE2__ ) && defined( __x86_64__ ) - __m128 dirwtv, valv, normv, dftemp1v, dftemp2v, fgg; + vfloat dirwtv, valv, normv, dftemp1v, dftemp2v; float domkerv[5][5][4] ALIGNED16 = {{{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}}; #endif // __SSE2__ diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 66c6d6aae..1cb6e06fb 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -35,641 +35,710 @@ namespace rtengine { extern const Settings* settings; -IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* pl, bool tunnelMetaData, bool flush) +namespace { - errorCode = 0; +template +void adjust_radius (const T &default_param, double scale_factor, T ¶m) +{ + const double delta = (param - default_param) * scale_factor; + param = default_param + delta; +} - ProcessingJobImpl* job = static_cast(pjob); - if (pl) { - pl->setProgressStr ("PROGRESSBAR_PROCESSING"); - pl->setProgress (0.0); +class ImageProcessor +{ +public: + ImageProcessor (ProcessingJob* pjob, int& errorCode, + ProgressListener* pl, bool tunnelMetaData, bool flush): + job (static_cast (pjob)), + errorCode (errorCode), + pl (pl), + tunnelMetaData (tunnelMetaData), + flush (flush), + // internal state + ipf_p (nullptr), + ii (nullptr), + imgsrc (nullptr), + fw (-1), + fh (-1), + pp (0, 0, 0, 0, 0) + { } - InitialImage* ii = job->initialImage; + Image16 *operator()() + { + if (!job->fast) { + return normal_pipeline(); + } else { + return fast_pipeline(); + } + } - if (!ii) { - ii = InitialImage::load (job->fname, job->isRaw, &errorCode); - - if (errorCode) { - delete job; +private: + Image16 *normal_pipeline() + { + if (!stage_init()) { return nullptr; } + + stage_denoise(); + stage_transform(); + return stage_finish(); } - procparams::ProcParams& params = job->pparams; + Image16 *fast_pipeline() + { + if (!job->pparams.resize.enabled) { + return normal_pipeline(); + } - // acquire image from imagesource - ImageSource* imgsrc = ii->getImageSource (); + pl = nullptr; - int tr = getCoarseBitMask(params.coarse); - int fw, fh; - imgsrc->getFullSize (fw, fh, tr); + if (!stage_init()) { + return nullptr; + } - // check the crop params - if (params.crop.x > fw || params.crop.y > fh) { - // the crop is completely out of the image, so we disable the crop - params.crop.enabled = false; - // and we set the values to the defaults - params.crop.x = 0; - params.crop.y = 0; - params.crop.w = fw; - params.crop.h = fh; - } else { - if (params.crop.x < 0) { + stage_transform(); + stage_early_resize(); + stage_denoise(); + return stage_finish(); + } + + bool stage_init() + { + errorCode = 0; + + if (pl) { + pl->setProgressStr ("PROGRESSBAR_PROCESSING"); + pl->setProgress (0.0); + } + + ii = job->initialImage; + + if (!ii) { + ii = InitialImage::load (job->fname, job->isRaw, &errorCode); + + if (errorCode) { + delete job; + return false; //return nullptr; + } + } + + procparams::ProcParams& params = job->pparams; + + // acquire image from imagesource + imgsrc = ii->getImageSource (); + + tr = getCoarseBitMask (params.coarse); + imgsrc->getFullSize (fw, fh, tr); + + // check the crop params + if (params.crop.x > fw || params.crop.y > fh) { + // the crop is completely out of the image, so we disable the crop + params.crop.enabled = false; + // and we set the values to the defaults params.crop.x = 0; - } - - if (params.crop.y < 0) { params.crop.y = 0; - } + params.crop.w = fw; + params.crop.h = fh; + } else { + if (params.crop.x < 0) { + params.crop.x = 0; + } - if ((params.crop.x + params.crop.w) > fw) { - // crop overflow in the width dimension ; we trim it - params.crop.w = fw - params.crop.x; - } + if (params.crop.y < 0) { + params.crop.y = 0; + } - if ((params.crop.y + params.crop.h) > fh) { - // crop overflow in the height dimension ; we trim it - params.crop.h = fh - params.crop.y; + if ((params.crop.x + params.crop.w) > fw) { + // crop overflow in the width dimension ; we trim it + params.crop.w = fw - params.crop.x; + } + + if ((params.crop.y + params.crop.h) > fh) { + // crop overflow in the height dimension ; we trim it + params.crop.h = fh - params.crop.y; + } } - } // MyTime t1,t2; // t1.set(); - ImProcFunctions ipf (¶ms, true); + ipf_p.reset (new ImProcFunctions (¶ms, true)); + ImProcFunctions &ipf = * (ipf_p.get()); - PreviewProps pp (0, 0, fw, fh, 1); - imgsrc->preprocess( params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled); + pp = PreviewProps (0, 0, fw, fh, 1); + imgsrc->setCurrentFrame (params.raw.bayersensor.imageNum); + imgsrc->preprocess ( params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled); - if (params.toneCurve.autoexp) {// this enabled HLRecovery - LUTu histRedRaw(256), histGreenRaw(256), histBlueRaw(256); - imgsrc->getRAWHistogram(histRedRaw, histGreenRaw, histBlueRaw); + if (params.toneCurve.autoexp) {// this enabled HLRecovery + LUTu histRedRaw (256), histGreenRaw (256), histBlueRaw (256); + imgsrc->getRAWHistogram (histRedRaw, histGreenRaw, histBlueRaw); - if (ToneCurveParams::HLReconstructionNecessary(histRedRaw, histGreenRaw, histBlueRaw) && !params.toneCurve.hrenabled) { - params.toneCurve.hrenabled = true; - // WARNING: Highlight Reconstruction is being forced 'on', should we force a method here too? + if (ToneCurveParams::HLReconstructionNecessary (histRedRaw, histGreenRaw, histBlueRaw) && !params.toneCurve.hrenabled) { + params.toneCurve.hrenabled = true; + // WARNING: Highlight Reconstruction is being forced 'on', should we force a method here too? + } } - } - if (pl) { - pl->setProgress (0.20); - } + if (pl) { + pl->setProgress (0.20); + } - imgsrc->demosaic( params.raw); + imgsrc->demosaic ( params.raw); - if (pl) { - pl->setProgress (0.30); - } + if (pl) { + pl->setProgress (0.30); + } - if(params.retinex.enabled) { //enabled Retinex - LUTf cdcurve (65536, 0); - LUTf mapcurve (65536, 0); - LUTu dummy; - RetinextransmissionCurve dehatransmissionCurve; - RetinexgaintransmissionCurve dehagaintransmissionCurve; - bool dehacontlutili = false; - bool mapcontlutili = false; - bool useHsl = false; + if (params.retinex.enabled) { //enabled Retinex + LUTf cdcurve (65536, 0); + LUTf mapcurve (65536, 0); + LUTu dummy; + RetinextransmissionCurve dehatransmissionCurve; + RetinexgaintransmissionCurve dehagaintransmissionCurve; + bool dehacontlutili = false; + bool mapcontlutili = false; + bool useHsl = false; // multi_array2D conversionBuffer(1, 1); - multi_array2D conversionBuffer(1, 1); - imgsrc->retinexPrepareBuffers(params.icm, params.retinex, conversionBuffer, dummy); - imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, dummy, dummy ); - float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, dummy); - } - - if (pl) { - pl->setProgress (0.40); - } - - imgsrc->HLRecovery_Global( params.toneCurve ); - - - if (pl) { - pl->setProgress (0.45); - } - - // set the color temperature - ColorTemp currWB = ColorTemp (params.wb.temperature, params.wb.green, params.wb.equal, params.wb.method); - - if (params.wb.method == "Camera") { - currWB = imgsrc->getWB (); - } else if (params.wb.method == "Auto") { - double rm, gm, bm; - imgsrc->getAutoWBMultipliers(rm, gm, bm); - currWB.update(rm, gm, bm, params.wb.equal); - } - - NoiseCurve noiseLCurve; - NoiseCurve noiseCCurve; - Imagefloat *calclum = nullptr ; - params.dirpyrDenoise.getCurves(noiseLCurve, noiseCCurve); - float autoNR = (float) settings->nrauto;// - float autoNRmax = (float) settings->nrautomax;// - int tilesize; - int overlap; - - if(settings->leveldnti == 0) { - tilesize = 1024; - overlap = 128; - } - - if(settings->leveldnti == 1) { - tilesize = 768; - overlap = 96; - } - - // const int tilesize = 768; - // const int overlap = 96; - int numtiles_W, numtiles_H, tilewidth, tileheight, tileWskip, tileHskip; - ipf.Tile_calc (tilesize, overlap, 2, fw, fh, numtiles_W, numtiles_H, tilewidth, tileheight, tileWskip, tileHskip); - int nbtl = numtiles_W * numtiles_H; - - if((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { - nbtl = 9; - } - - float *ch_M = new float [nbtl];//allocate memory - float *max_r = new float [nbtl]; - float *max_b = new float [nbtl]; - float *min_b = new float [9]; - float *min_r = new float [9]; - float *lumL = new float [nbtl]; - float *chromC = new float [nbtl]; - float *ry = new float [nbtl]; - float *sk = new float [nbtl]; - float *pcsk = new float [nbtl]; - - // printf("expert=%d\n",settings->leveldnautsimpl); - if(settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PON") { - MyTime t1pone, t2pone; - t1pone.set(); - int crW, crH; - - if(settings->leveldnv == 0) { - crW = 100; - crH = 100; + multi_array2D conversionBuffer (1, 1); + imgsrc->retinexPrepareBuffers (params.icm, params.retinex, conversionBuffer, dummy); + imgsrc->retinexPrepareCurves (params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, dummy, dummy ); + float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; + imgsrc->retinex ( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, dummy); } - if(settings->leveldnv == 1) { - crW = 250; - crH = 250; + if (pl) { + pl->setProgress (0.40); } - if(settings->leveldnv == 2) { - crW = int(tileWskip / 2); - crH = int(tileHskip / 2); + imgsrc->HLRecovery_Global ( params.toneCurve ); + + + if (pl) { + pl->setProgress (0.45); } - // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int(1.15f*(tileWskip/2));}//adapted to scale of preview - if(settings->leveldnv == 3) { - crW = tileWskip - 10; - crH = tileHskip - 10; + // set the color temperature + currWB = ColorTemp (params.wb.temperature, params.wb.green, params.wb.equal, params.wb.method); + + if (params.wb.method == "Camera") { + currWB = imgsrc->getWB (); + } else if (params.wb.method == "Auto") { + double rm, gm, bm; + imgsrc->getAutoWBMultipliers (rm, gm, bm); + currWB.update (rm, gm, bm, params.wb.equal, params.wb.tempBias); } - float lowdenoise = 1.f; - int levaut = settings->leveldnaut; + calclum = nullptr ; + params.dirpyrDenoise.getCurves (noiseLCurve, noiseCCurve); + autoNR = (float) settings->nrauto;// + autoNRmax = (float) settings->nrautomax;// - if(levaut == 1) { //Standard - lowdenoise = 0.7f; + if (settings->leveldnti == 0) { + tilesize = 1024; + overlap = 128; } - // int crW=tileWskip-10;//crop noise width - // int crH=tileHskip-10;//crop noise height + if (settings->leveldnti == 1) { + tilesize = 768; + overlap = 96; + } + + // const int tilesize = 768; + // const int overlap = 96; + int numtiles_W, numtiles_H, tilewidth, tileheight, tileWskip, tileHskip; + ipf.Tile_calc (tilesize, overlap, 2, fw, fh, numtiles_W, numtiles_H, tilewidth, tileheight, tileWskip, tileHskip); + int nbtl = numtiles_W * numtiles_H; + + if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { + nbtl = 9; + } + + ch_M = new float [nbtl];//allocate memory + max_r = new float [nbtl]; + max_b = new float [nbtl]; + min_b = new float [9]; + min_r = new float [9]; + lumL = new float [nbtl]; + chromC = new float [nbtl]; + ry = new float [nbtl]; + sk = new float [nbtl]; + pcsk = new float [nbtl]; + + // printf("expert=%d\n",settings->leveldnautsimpl); + if (settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PON") { + MyTime t1pone, t2pone; + t1pone.set(); + int crW = 100; // settings->leveldnv == 0 + int crH = 100; // settings->leveldnv == 0 + + if (settings->leveldnv == 1) { + crW = 250; + crH = 250; + } + + if (settings->leveldnv == 2) { + crW = int (tileWskip / 2); + crH = int (tileHskip / 2); + } + + // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int(1.15f*(tileWskip/2));}//adapted to scale of preview + if (settings->leveldnv == 3) { + crW = tileWskip - 10; + crH = tileHskip - 10; + } + + float lowdenoise = 1.f; + int levaut = settings->leveldnaut; + + if (levaut == 1) { //Standard + lowdenoise = 0.7f; + } + + // int crW=tileWskip-10;//crop noise width + // int crH=tileHskip-10;//crop noise height // Imagefloat *origCropPart;//init auto noise // origCropPart = new Imagefloat (crW, crH);//allocate memory - if (params.dirpyrDenoise.enabled) {//evaluate Noise - LUTf gamcurve(65536, 0); - float gam, gamthresh, gamslope; - ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); - #pragma omp parallel - { - Imagefloat *origCropPart;//init auto noise - origCropPart = new Imagefloat (crW, crH);//allocate memory - Imagefloat *provicalc = new Imagefloat ((crW + 1) / 2, (crH + 1) / 2); //for denoise curves - int skipP = 1; - #pragma omp for schedule(dynamic) collapse(2) nowait + if (params.dirpyrDenoise.enabled) {//evaluate Noise + LUTf gamcurve (65536, 0); + float gam, gamthresh, gamslope; + ipf.RGB_denoise_infoGamCurve (params.dirpyrDenoise, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); + #pragma omp parallel + { + Imagefloat *origCropPart;//init auto noise + origCropPart = new Imagefloat (crW, crH);//allocate memory + Imagefloat *provicalc = new Imagefloat ((crW + 1) / 2, (crH + 1) / 2); //for denoise curves + int skipP = 1; + #pragma omp for schedule(dynamic) collapse(2) nowait - for(int wcr = 0; wcr < numtiles_W; wcr++) { - for(int hcr = 0; hcr < numtiles_H; hcr++) { - int beg_tileW = wcr * tileWskip + tileWskip / 2.f - crW / 2.f; - int beg_tileH = hcr * tileHskip + tileHskip / 2.f - crH / 2.f; - PreviewProps ppP (beg_tileW , beg_tileH, crW, crH, skipP); - imgsrc->getImage (currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw ); + for (int wcr = 0; wcr < numtiles_W; wcr++) { + for (int hcr = 0; hcr < numtiles_H; hcr++) { + int beg_tileW = wcr * tileWskip + tileWskip / 2.f - crW / 2.f; + int beg_tileH = hcr * tileHskip + tileHskip / 2.f - crH / 2.f; + PreviewProps ppP (beg_tileW, beg_tileH, crW, crH, skipP); + imgsrc->getImage (currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw ); + //baseImg->getStdImage(currWB, tr, origCropPart, ppP, true, params.toneCurve); - // we only need image reduced to 1/4 here - for(int ii = 0; ii < crH; ii += 2) { - for(int jj = 0; jj < crW; jj += 2) { - provicalc->r(ii >> 1, jj >> 1) = origCropPart->r(ii, jj); - provicalc->g(ii >> 1, jj >> 1) = origCropPart->g(ii, jj); - provicalc->b(ii >> 1, jj >> 1) = origCropPart->b(ii, jj); + // we only need image reduced to 1/4 here + for (int ii = 0; ii < crH; ii += 2) { + for (int jj = 0; jj < crW; jj += 2) { + provicalc->r (ii >> 1, jj >> 1) = origCropPart->r (ii, jj); + provicalc->g (ii >> 1, jj >> 1) = origCropPart->g (ii, jj); + provicalc->b (ii >> 1, jj >> 1) = origCropPart->b (ii, jj); + } } - } - imgsrc->convertColorSpace(provicalc, params.icm, currWB);//for denoise luminance curve - float maxr = 0.f; - float maxb = 0.f; - float pondcorrec = 1.0f; - float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc; - int Nb; - chaut = 0.f; - redaut = 0.f; - blueaut = 0.f; - maxredaut = 0.f; - maxblueaut = 0.f; - chromina = 0.f; - sigma = 0.f; - ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); - float multip = 1.f; - float adjustr = 1.f; + imgsrc->convertColorSpace (provicalc, params.icm, currWB); //for denoise luminance curve + float maxr = 0.f; + float maxb = 0.f; + float pondcorrec = 1.0f; + float chaut, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc; + int Nb; + chaut = 0.f; + redaut = 0.f; + blueaut = 0.f; + maxredaut = 0.f; + maxblueaut = 0.f; + chromina = 0.f; + sigma = 0.f; + ipf.RGB_denoise_info (origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + float multip = 1.f; + float adjustr = 1.f; - if (params.icm.working == "ProPhoto") { - adjustr = 1.f; // - } else if (params.icm.working == "Adobe RGB") { - adjustr = 1.f / 1.3f; - } else if (params.icm.working == "sRGB") { - adjustr = 1.f / 1.3f; - } else if (params.icm.working == "WideGamut") { - adjustr = 1.f / 1.1f; - } else if (params.icm.working == "Rec2020") { - adjustr = 1.f / 1.1f; - } else if (params.icm.working == "Beta RGB") { - adjustr = 1.f / 1.2f; - } else if (params.icm.working == "BestRGB") { - adjustr = 1.f / 1.2f; - } else if (params.icm.working == "BruceRGB") { - adjustr = 1.f / 1.2f; - } - - if(!imgsrc->isRAW()) { - multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good fot gamma=1 - } - - float maxmax = max(maxredaut, maxblueaut); - float delta; - int mode = 2; - int lissage = settings->leveldnliss; - ipf.calcautodn_info (chaut, delta, Nb, levaut, maxmax, lumema, chromina, mode, lissage, redyel, skinc, nsknc); - - // printf("PROCESS cha=%f red=%f bl=%f redM=%f bluM=%f chrom=%f sigm=%f lum=%f sigL=%f\n",chaut,redaut,blueaut, maxredaut, maxblueaut, chromina, sigma, lumema, sigma_L); - if(maxredaut > maxblueaut) { - maxr = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - - if(minblueaut <= minredaut && minblueaut < chaut) { - maxb = (-chaut + minblueaut) / (autoNRmax * multip * adjustr * lowdenoise); + if (params.icm.working == "ProPhoto") { + adjustr = 1.f; // + } else if (params.icm.working == "Adobe RGB") { + adjustr = 1.f / 1.3f; + } else if (params.icm.working == "sRGB") { + adjustr = 1.f / 1.3f; + } else if (params.icm.working == "WideGamut") { + adjustr = 1.f / 1.1f; + } else if (params.icm.working == "Rec2020") { + adjustr = 1.f / 1.1f; + } else if (params.icm.working == "Beta RGB") { + adjustr = 1.f / 1.2f; + } else if (params.icm.working == "BestRGB") { + adjustr = 1.f / 1.2f; + } else if (params.icm.working == "BruceRGB") { + adjustr = 1.f / 1.2f; } + + if (!imgsrc->isRAW()) { + multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good fot gamma=1 + } + + float maxmax = max (maxredaut, maxblueaut); + float delta; + int mode = 2; + int lissage = settings->leveldnliss; + ipf.calcautodn_info (chaut, delta, Nb, levaut, maxmax, lumema, chromina, mode, lissage, redyel, skinc, nsknc); + + // printf("PROCESS cha=%f red=%f bl=%f redM=%f bluM=%f chrom=%f sigm=%f lum=%f sigL=%f\n",chaut,redaut,blueaut, maxredaut, maxblueaut, chromina, sigma, lumema, sigma_L); + if (maxredaut > maxblueaut) { + maxr = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); + + if (minblueaut <= minredaut && minblueaut < chaut) { + maxb = (-chaut + minblueaut) / (autoNRmax * multip * adjustr * lowdenoise); + } + } else { + maxb = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); + + if (minredaut <= minblueaut && minredaut < chaut) { + maxr = (-chaut + minredaut) / (autoNRmax * multip * adjustr * lowdenoise); + } + }//maxb mxr - empirical evaluation red / blue + + ch_M[hcr * numtiles_W + wcr] = pondcorrec * chaut / (autoNR * multip * adjustr * lowdenoise); + max_r[hcr * numtiles_W + wcr] = pondcorrec * maxr; + max_b[hcr * numtiles_W + wcr] = pondcorrec * maxb; + lumL[hcr * numtiles_W + wcr] = lumema; + chromC[hcr * numtiles_W + wcr] = chromina; + ry[hcr * numtiles_W + wcr] = redyel; + sk[hcr * numtiles_W + wcr] = skinc; + pcsk[hcr * numtiles_W + wcr] = nsknc; + + } + } + + delete provicalc; + delete origCropPart; + } + + int liss = settings->leveldnliss; //smooth result around mean + + if (liss == 2 || liss == 3) { + // I smooth only mean and not delta (max) + float nchm = 0.f; + float koef = 0.4f; //between 0.1 to 0.9 + + if (liss == 3) { + koef = 0.0f; //quasi auto for mean Ch + } + + for (int wcr = 0; wcr < numtiles_W; wcr++) { + for (int hcr = 0; hcr < numtiles_H; hcr++) { + nchm += ch_M[hcr * numtiles_W + wcr]; + } + } + + nchm /= (numtiles_H * numtiles_W); + + for (int wcr = 0; wcr < numtiles_W; wcr++) { + for (int hcr = 0; hcr < numtiles_H; hcr++) { + ch_M[hcr * numtiles_W + wcr] = nchm + (ch_M[hcr * numtiles_W + wcr] - nchm) * koef; + } + } + } + + if (liss == 3) { //same as auto but with much cells + float MaxR = 0.f; + float MaxB = 0.f; + float MaxRMoy = 0.f; + float MaxBMoy = 0.f; + + for (int k = 0; k < nbtl; k++) { + MaxBMoy += max_b[k]; + MaxRMoy += max_r[k]; + + if (max_r[k] > MaxR) { + MaxR = max_r[k]; + } + + if (max_b[k] > MaxB) { + MaxB = max_b[k]; + } + + } + + MaxBMoy /= nbtl; + MaxRMoy /= nbtl; + + for (int k = 0; k < nbtl; k++) { + if (MaxR > MaxB) { + max_r[k] = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; //#std Dev + //max_b[k]=MinB; + max_b[k] = MaxBMoy + (MaxB - MaxBMoy) * 0.66f; + } else { - maxb = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); + max_b[k] = MaxBMoy + (MaxB - MaxBMoy) * 0.66f; + //max_r[k]=MinR; + max_r[k] = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; - if(minredaut <= minblueaut && minredaut < chaut) { - maxr = (-chaut + minredaut) / (autoNRmax * multip * adjustr * lowdenoise); + } + } + } + + if (settings->verbose) { + t2pone.set(); + printf ("Info denoise ponderated performed in %d usec:\n", t2pone.etime (t1pone)); + } + + } + } + + + if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { + MyTime t1aue, t2aue; + t1aue.set(); + int crW, crH; + + if (settings->leveldnv == 0) { + crW = 100; + crH = 100; + } + + if (settings->leveldnv == 1) { + crW = 250; + crH = 250; + } + + if (settings->leveldnv == 2) { + crW = int (tileWskip / 2); + crH = int (tileHskip / 2); + } + + // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int(1.15f*(tileWskip/2));}//adapted to scale of preview + if (settings->leveldnv == 3) { + crW = tileWskip - 10; + crH = tileHskip - 10; + } + + float lowdenoise = 1.f; + int levaut = settings->leveldnaut; + + if (levaut == 1) { //Standard + lowdenoise = 0.7f; + } + + if (params.dirpyrDenoise.enabled) {//evaluate Noise + LUTf gamcurve (65536, 0); + float gam, gamthresh, gamslope; + ipf.RGB_denoise_infoGamCurve (params.dirpyrDenoise, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); + int Nb[9]; + int coordW[3];//coordonate of part of image to mesure noise + int coordH[3]; + int begW = 50; + int begH = 50; + coordW[0] = begW; + coordW[1] = fw / 2 - crW / 2; + coordW[2] = fw - crW - begW; + coordH[0] = begH; + coordH[1] = fh / 2 - crH / 2; + coordH[2] = fh - crH - begH; + #pragma omp parallel + { + Imagefloat *origCropPart;//init auto noise + origCropPart = new Imagefloat (crW, crH);//allocate memory + Imagefloat *provicalc = new Imagefloat ((crW + 1) / 2, (crH + 1) / 2); //for denoise curves + + #pragma omp for schedule(dynamic) collapse(2) nowait + + for (int wcr = 0; wcr <= 2; wcr++) { + for (int hcr = 0; hcr <= 2; hcr++) { + PreviewProps ppP (coordW[wcr], coordH[hcr], crW, crH, 1); + imgsrc->getImage (currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw); + //baseImg->getStdImage(currWB, tr, origCropPart, ppP, true, params.toneCurve); + + + // we only need image reduced to 1/4 here + for (int ii = 0; ii < crH; ii += 2) { + for (int jj = 0; jj < crW; jj += 2) { + provicalc->r (ii >> 1, jj >> 1) = origCropPart->r (ii, jj); + provicalc->g (ii >> 1, jj >> 1) = origCropPart->g (ii, jj); + provicalc->b (ii >> 1, jj >> 1) = origCropPart->b (ii, jj); + } } - }//maxb mxr - empirical evaluation red / blue - - ch_M[hcr * numtiles_W + wcr] = pondcorrec * chaut / (autoNR * multip * adjustr * lowdenoise); - max_r[hcr * numtiles_W + wcr] = pondcorrec * maxr; - max_b[hcr * numtiles_W + wcr] = pondcorrec * maxb; - lumL[hcr * numtiles_W + wcr] = lumema; - chromC[hcr * numtiles_W + wcr] = chromina; - ry[hcr * numtiles_W + wcr] = redyel; - sk[hcr * numtiles_W + wcr] = skinc; - pcsk[hcr * numtiles_W + wcr] = nsknc; + imgsrc->convertColorSpace (provicalc, params.icm, currWB); //for denoise luminance curve + int nb = 0; + float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; + ipf.RGB_denoise_info (origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + Nb[hcr * 3 + wcr] = nb; + ch_M[hcr * 3 + wcr] = chaut; + max_r[hcr * 3 + wcr] = maxredaut; + max_b[hcr * 3 + wcr] = maxblueaut; + min_r[hcr * 3 + wcr] = minredaut; + min_b[hcr * 3 + wcr] = minblueaut; + lumL[hcr * 3 + wcr] = lumema; + chromC[hcr * 3 + wcr] = chromina; + ry[hcr * 3 + wcr] = redyel; + sk[hcr * 3 + wcr] = skinc; + pcsk[hcr * 3 + wcr] = nsknc; + } } + + delete provicalc; + delete origCropPart; } - - delete provicalc; - delete origCropPart; - } - - int liss = settings->leveldnliss; //smooth result around mean - - if(liss == 2 || liss == 3) { - // I smooth only mean and not delta (max) - float nchm = 0.f; - float koef = 0.4f; //between 0.1 to 0.9 - - if(liss == 3) { - koef = 0.0f; //quasi auto for mean Ch - } - - for(int wcr = 0; wcr < numtiles_W; wcr++) { - for(int hcr = 0; hcr < numtiles_H; hcr++) { - nchm += ch_M[hcr * numtiles_W + wcr]; - } - } - - nchm /= (numtiles_H * numtiles_W); - - for(int wcr = 0; wcr < numtiles_W; wcr++) { - for(int hcr = 0; hcr < numtiles_H; hcr++) { - ch_M[hcr * numtiles_W + wcr] = nchm + (ch_M[hcr * numtiles_W + wcr] - nchm) * koef; - } - } - } - - if(liss == 3) { //same as auto but with much cells + float chM = 0.f; float MaxR = 0.f; float MaxB = 0.f; + float MinR = 100000000.f; + float MinB = 100000000.f; + float maxr = 0.f; + float maxb = 0.f; + float multip = 1.f; + float adjustr = 1.f; + float Max_R[9] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}; + float Max_B[9] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}; + float Min_R[9]; + float Min_B[9]; float MaxRMoy = 0.f; float MaxBMoy = 0.f; + float MinRMoy = 0.f; + float MinBMoy = 0.f; - for(int k = 0; k < nbtl; k++) { - MaxBMoy += max_b[k]; - MaxRMoy += max_r[k]; - - if(max_r[k] > MaxR) { - MaxR = max_r[k]; - } - - if(max_b[k] > MaxB) { - MaxB = max_b[k]; - } - + if (params.icm.working == "ProPhoto") { + adjustr = 1.f; + } else if (params.icm.working == "Adobe RGB") { + adjustr = 1.f / 1.3f; + } else if (params.icm.working == "sRGB") { + adjustr = 1.f / 1.3f; + } else if (params.icm.working == "WideGamut") { + adjustr = 1.f / 1.1f; + } else if (params.icm.working == "Rec2020") { + adjustr = 1.f / 1.1f; + } else if (params.icm.working == "Beta RGB") { + adjustr = 1.f / 1.2f; + } else if (params.icm.working == "BestRGB") { + adjustr = 1.f / 1.2f; + } else if (params.icm.working == "BruceRGB") { + adjustr = 1.f / 1.2f; } - MaxBMoy /= nbtl; - MaxRMoy /= nbtl; + if (!imgsrc->isRAW()) { + multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good fot gamma=1 + } - for(int k = 0; k < nbtl; k++) { - if(MaxR > MaxB) { - max_r[k] = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; //#std Dev - //max_b[k]=MinB; - max_b[k] = MaxBMoy + (MaxB - MaxBMoy) * 0.66f; + float delta[9]; + int mode = 1; + int lissage = settings->leveldnliss; + for (int k = 0; k < 9; k++) { + float maxmax = max (max_r[k], max_b[k]); + ipf.calcautodn_info (ch_M[k], delta[k], Nb[k], levaut, maxmax, lumL[k], chromC[k], mode, lissage, ry[k], sk[k], pcsk[k] ); + // printf("ch_M=%f delta=%f\n",ch_M[k], delta[k]); + } + + for (int k = 0; k < 9; k++) { + if (max_r[k] > max_b[k]) { + //printf("R delta=%f koef=%f\n",delta[k],autoNRmax*multip*adjustr*lowdenoise); + Max_R[k] = (delta[k]) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); + Min_B[k] = - (ch_M[k] - min_b[k]) / (autoNRmax * multip * adjustr * lowdenoise); + Max_B[k] = 0.f; + Min_R[k] = 0.f; } else { - max_b[k] = MaxBMoy + (MaxB - MaxBMoy) * 0.66f; - //max_r[k]=MinR; - max_r[k] = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; - - } - } - } - - if (settings->verbose) { - t2pone.set(); - printf("Info denoise ponderated performed in %d usec:\n", t2pone.etime(t1pone)); - } - - } - } - - - if((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { - MyTime t1aue, t2aue; - t1aue.set(); - int crW, crH; - - if(settings->leveldnv == 0) { - crW = 100; - crH = 100; - } - - if(settings->leveldnv == 1) { - crW = 250; - crH = 250; - } - - if(settings->leveldnv == 2) { - crW = int(tileWskip / 2); - crH = int(tileHskip / 2); - } - - // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int(1.15f*(tileWskip/2));}//adapted to scale of preview - if(settings->leveldnv == 3) { - crW = tileWskip - 10; - crH = tileHskip - 10; - } - - float lowdenoise = 1.f; - int levaut = settings->leveldnaut; - - if(levaut == 1) { //Standard - lowdenoise = 0.7f; - } - - if (params.dirpyrDenoise.enabled) {//evaluate Noise - LUTf gamcurve(65536, 0); - float gam, gamthresh, gamslope; - ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); - int Nb[9]; - int coordW[3];//coordonate of part of image to mesure noise - int coordH[3]; - int begW = 50; - int begH = 50; - coordW[0] = begW; - coordW[1] = fw / 2 - crW / 2; - coordW[2] = fw - crW - begW; - coordH[0] = begH; - coordH[1] = fh / 2 - crH / 2; - coordH[2] = fh - crH - begH; - #pragma omp parallel - { - Imagefloat *origCropPart;//init auto noise - origCropPart = new Imagefloat (crW, crH);//allocate memory - Imagefloat *provicalc = new Imagefloat ((crW + 1) / 2, (crH + 1) / 2); //for denoise curves - - #pragma omp for schedule(dynamic) collapse(2) nowait - - for(int wcr = 0; wcr <= 2; wcr++) { - for(int hcr = 0; hcr <= 2; hcr++) { - PreviewProps ppP (coordW[wcr] , coordH[hcr], crW, crH, 1); - imgsrc->getImage (currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw); - - // we only need image reduced to 1/4 here - for(int ii = 0; ii < crH; ii += 2) { - for(int jj = 0; jj < crW; jj += 2) { - provicalc->r(ii >> 1, jj >> 1) = origCropPart->r(ii, jj); - provicalc->g(ii >> 1, jj >> 1) = origCropPart->g(ii, jj); - provicalc->b(ii >> 1, jj >> 1) = origCropPart->b(ii, jj); - } - } - - imgsrc->convertColorSpace(provicalc, params.icm, currWB);//for denoise luminance curve - int nb = 0; - float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; - ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); - Nb[hcr * 3 + wcr] = nb; - ch_M[hcr * 3 + wcr] = chaut; - max_r[hcr * 3 + wcr] = maxredaut; - max_b[hcr * 3 + wcr] = maxblueaut; - min_r[hcr * 3 + wcr] = minredaut; - min_b[hcr * 3 + wcr] = minblueaut; - lumL[hcr * 3 + wcr] = lumema; - chromC[hcr * 3 + wcr] = chromina; - ry[hcr * 3 + wcr] = redyel; - sk[hcr * 3 + wcr] = skinc; - pcsk[hcr * 3 + wcr] = nsknc; + //printf("B delta=%f koef=%f\n",delta[k],autoNRmax*multip*adjustr*lowdenoise); + Max_B[k] = (delta[k]) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); + Min_R[k] = - (ch_M[k] - min_r[k]) / (autoNRmax * multip * adjustr * lowdenoise); + Min_B[k] = 0.f; + Max_R[k] = 0.f; } } - delete provicalc; - delete origCropPart; - } - float chM = 0.f; - float MaxR = 0.f; - float MaxB = 0.f; - float MinR = 100000000.f; - float MinB = 100000000.f; - float maxr = 0.f; - float maxb = 0.f; - float multip = 1.f; - float adjustr = 1.f; - float Max_R[9] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}; - float Max_B[9] = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f}; - float Min_R[9]; - float Min_B[9]; - float MaxRMoy = 0.f; - float MaxBMoy = 0.f; - float MinRMoy = 0.f; - float MinBMoy = 0.f; + for (int k = 0; k < 9; k++) { + // printf("ch_M= %f Max_R=%f Max_B=%f min_r=%f min_b=%f\n",ch_M[k],Max_R[k], Max_B[k],Min_R[k], Min_B[k]); + chM += ch_M[k]; + MaxBMoy += Max_B[k]; + MaxRMoy += Max_R[k]; + MinRMoy += Min_R[k]; + MinBMoy += Min_B[k]; - if (params.icm.working == "ProPhoto") { - adjustr = 1.f; - } else if (params.icm.working == "Adobe RGB") { - adjustr = 1.f / 1.3f; - } else if (params.icm.working == "sRGB") { - adjustr = 1.f / 1.3f; - } else if (params.icm.working == "WideGamut") { - adjustr = 1.f / 1.1f; - } else if (params.icm.working == "Rec2020") { - adjustr = 1.f / 1.1f; - } else if (params.icm.working == "Beta RGB") { - adjustr = 1.f / 1.2f; - } else if (params.icm.working == "BestRGB") { - adjustr = 1.f / 1.2f; - } else if (params.icm.working == "BruceRGB") { - adjustr = 1.f / 1.2f; - } + if (Max_R[k] > MaxR) { + MaxR = Max_R[k]; + } - if(!imgsrc->isRAW()) { - multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good fot gamma=1 - } + if (Max_B[k] > MaxB) { + MaxB = Max_B[k]; + } - float delta[9]; - int mode = 1; - int lissage = settings->leveldnliss; + if (Min_R[k] < MinR) { + MinR = Min_R[k]; + } - for(int k = 0; k < 9; k++) { - float maxmax = max(max_r[k], max_b[k]); - ipf.calcautodn_info (ch_M[k], delta[k], Nb[k], levaut, maxmax, lumL[k], chromC[k], mode, lissage, ry[k], sk[k], pcsk[k] ); - // printf("ch_M=%f delta=%f\n",ch_M[k], delta[k]); - } + if (Min_B[k] < MinB) { + MinB = Min_B[k]; + } + + } + + chM /= 9; + MaxBMoy /= 9; + MaxRMoy /= 9; + MinBMoy /= 9; + MinRMoy /= 9; + + if (MaxR > MaxB) { + maxr = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; //#std Dev + // maxb=MinB; + maxb = MinBMoy + (MinB - MinBMoy) * 0.66f; - for(int k = 0; k < 9; k++) { - if(max_r[k] > max_b[k]) { - //printf("R delta=%f koef=%f\n",delta[k],autoNRmax*multip*adjustr*lowdenoise); - Max_R[k] = (delta[k]) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - Min_B[k] = -(ch_M[k] - min_b[k]) / (autoNRmax * multip * adjustr * lowdenoise); - Max_B[k] = 0.f; - Min_R[k] = 0.f; } else { - //printf("B delta=%f koef=%f\n",delta[k],autoNRmax*multip*adjustr*lowdenoise); - Max_B[k] = (delta[k]) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - Min_R[k] = - (ch_M[k] - min_r[k]) / (autoNRmax * multip * adjustr * lowdenoise); - Min_B[k] = 0.f; - Max_R[k] = 0.f; + maxb = MaxBMoy + (MaxB - MaxBMoy) * 0.66f; + // maxr=MinR; + maxr = MinRMoy + (MinR - MinRMoy) * 0.66f; + } - } - - for(int k = 0; k < 9; k++) { - // printf("ch_M= %f Max_R=%f Max_B=%f min_r=%f min_b=%f\n",ch_M[k],Max_R[k], Max_B[k],Min_R[k], Min_B[k]); - chM += ch_M[k]; - MaxBMoy += Max_B[k]; - MaxRMoy += Max_R[k]; - MinRMoy += Min_R[k]; - MinBMoy += Min_B[k]; - - if(Max_R[k] > MaxR) { - MaxR = Max_R[k]; - } - - if(Max_B[k] > MaxB) { - MaxB = Max_B[k]; - } - - if(Min_R[k] < MinR) { - MinR = Min_R[k]; - } - - if(Min_B[k] < MinB) { - MinB = Min_B[k]; - } - - } - - chM /= 9; - MaxBMoy /= 9; - MaxRMoy /= 9; - MinBMoy /= 9; - MinRMoy /= 9; - - if(MaxR > MaxB) { - maxr = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; //#std Dev - // maxb=MinB; - maxb = MinBMoy + (MinB - MinBMoy) * 0.66f; - - } else { - maxb = MaxBMoy + (MaxB - MaxBMoy) * 0.66f; - // maxr=MinR; - maxr = MinRMoy + (MinR - MinRMoy) * 0.66f; - - } // printf("SIMPL cha=%f red=%f bl=%f \n",chM,maxr,maxb); - params.dirpyrDenoise.chroma = chM / (autoNR * multip * adjustr); - params.dirpyrDenoise.redchro = maxr; - params.dirpyrDenoise.bluechro = maxb; + params.dirpyrDenoise.chroma = chM / (autoNR * multip * adjustr); + params.dirpyrDenoise.redchro = maxr; + params.dirpyrDenoise.bluechro = maxb; + } + + if (settings->verbose) { + t2aue.set(); + printf ("Info denoise auto performed in %d usec:\n", t2aue.etime (t1aue)); + } + + //end evaluate noise } - if (settings->verbose) { - t2aue.set(); - printf("Info denoise auto performed in %d usec:\n", t2aue.etime(t1aue)); + baseImg = new Imagefloat (fw, fh); + imgsrc->getImage (currWB, tr, baseImg, pp, params.toneCurve, params.icm, params.raw); + + if (pl) { + pl->setProgress (0.50); } - //end evaluate noise - } - - - - - - Imagefloat* baseImg = new Imagefloat (fw, fh); - imgsrc->getImage (currWB, tr, baseImg, pp, params.toneCurve, params.icm, params.raw); - - if (pl) { - pl->setProgress (0.50); - } - // LUTf Noisecurve (65536,0); //!!!// auto exposure!!! - double expcomp = params.toneCurve.expcomp; - int bright = params.toneCurve.brightness; - int contr = params.toneCurve.contrast; - int black = params.toneCurve.black; - int hlcompr = params.toneCurve.hlcompr; - int hlcomprthresh = params.toneCurve.hlcomprthresh; + expcomp = params.toneCurve.expcomp; + bright = params.toneCurve.brightness; + contr = params.toneCurve.contrast; + black = params.toneCurve.black; + hlcompr = params.toneCurve.hlcompr; + hlcomprthresh = params.toneCurve.hlcomprthresh; - if (params.toneCurve.autoexp) { - LUTu aehist; - int aehistcompr; - imgsrc->getAutoExpHistogram (aehist, aehistcompr); - ipf.getAutoExp (aehist, aehistcompr, imgsrc->getDefGain(), params.toneCurve.clip, expcomp, bright, contr, black, hlcompr, hlcomprthresh); + + if (params.toneCurve.autoexp) { + LUTu aehist; + int aehistcompr; + imgsrc->getAutoExpHistogram (aehist, aehistcompr); + ipf.getAutoExp (aehist, aehistcompr, imgsrc->getDefGain(), params.toneCurve.clip, expcomp, bright, contr, black, hlcompr, hlcomprthresh); + } + + // at this stage, we can flush the raw data to free up quite an important amount of memory + // commented out because it makes the application crash when batch processing... + // TODO: find a better place to flush rawData and rawRGB + if (flush) { + imgsrc->flushRawData(); + imgsrc->flushRGB(); + } + + return true; } - // at this stage, we can flush the raw data to free up quite an important amount of memory - // commented out because it makes the application crash when batch processing... - // TODO: find a better place to flush rawData and rawRGB - if(flush) { - imgsrc->flushRawData(); - imgsrc->flushRGB(); - } + void stage_denoise() + { + procparams::ProcParams& params = job->pparams; + //ImProcFunctions ipf (¶ms, true); + ImProcFunctions &ipf = * (ipf_p.get()); - // perform luma/chroma denoise + // perform luma/chroma denoise // CieImage *cieView; // NoisCurve noiseLCurve; // bool lldenoiseutili=false; @@ -677,113 +746,803 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p // params.dirpyrDenoise.getCurves(noiseLCurve, lldenoiseutili); // if (params.dirpyrDenoise.enabled && lldenoiseutili) { - DirPyrDenoiseParams denoiseParams = params.dirpyrDenoise; // make a copy because we cheat here + DirPyrDenoiseParams denoiseParams = params.dirpyrDenoise; // make a copy because we cheat here - if(denoiseParams.Lmethod == "CUR") { - if(noiseLCurve) { - denoiseParams.luma = 0.5f; - } else { - denoiseParams.luma = 0.0f; + if (denoiseParams.Lmethod == "CUR") { + if (noiseLCurve) { + denoiseParams.luma = 0.5f; + } else { + denoiseParams.luma = 0.0f; + } + } else if (denoiseParams.Lmethod == "SLI") { + noiseLCurve.Reset(); } - } else if(denoiseParams.Lmethod == "SLI") { - noiseLCurve.Reset(); + + if (denoiseParams.enabled && (noiseLCurve || noiseCCurve )) { + // we only need image reduced to 1/4 here + calclum = new Imagefloat ((fw + 1) / 2, (fh + 1) / 2); //for luminance denoise curve + #pragma omp parallel for + + for (int ii = 0; ii < fh; ii += 2) { + for (int jj = 0; jj < fw; jj += 2) { + calclum->r (ii >> 1, jj >> 1) = baseImg->r (ii, jj); + calclum->g (ii >> 1, jj >> 1) = baseImg->g (ii, jj); + calclum->b (ii >> 1, jj >> 1) = baseImg->b (ii, jj); + } + } + + imgsrc->convertColorSpace (calclum, params.icm, currWB); + } + + if (denoiseParams.enabled) { + // CurveFactory::denoiseLL(lldenoiseutili, denoiseParams.lcurve, Noisecurve,1); + //denoiseParams.getCurves(noiseLCurve); +// ipf.RGB_denoise(baseImg, baseImg, calclum, imgsrc->isRAW(), denoiseParams, params.defringe, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, lldenoiseutili); + float chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi; + int kall = 2; + ipf.RGB_denoise (kall, baseImg, baseImg, calclum, ch_M, max_r, max_b, imgsrc->isRAW(), denoiseParams, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi); + + } + +// delete calclum; + delete [] ch_M; + delete [] max_r; + delete [] max_b; + delete [] min_r; + delete [] min_b; + delete [] lumL; + delete [] chromC; + delete [] ry; + delete [] sk; + delete [] pcsk; } - if (denoiseParams.enabled && (noiseLCurve || noiseCCurve )) { - // we only need image reduced to 1/4 here - calclum = new Imagefloat ((fw + 1) / 2, (fh + 1) / 2); //for luminance denoise curve - #pragma omp parallel for + void stage_transform() + { + procparams::ProcParams& params = job->pparams; + //ImProcFunctions ipf (¶ms, true); + ImProcFunctions &ipf = * (ipf_p.get()); - for(int ii = 0; ii < fh; ii += 2) { - for(int jj = 0; jj < fw; jj += 2) { - calclum->r(ii >> 1, jj >> 1) = baseImg->r(ii, jj); - calclum->g(ii >> 1, jj >> 1) = baseImg->g(ii, jj); - calclum->b(ii >> 1, jj >> 1) = baseImg->b(ii, jj); + imgsrc->convertColorSpace (baseImg, params.icm, currWB); + + // perform first analysis + hist16 (65536); + + ipf.firstAnalysis (baseImg, params, hist16); + + // perform transform (excepted resizing) + if (ipf.needsTransform()) { + Imagefloat* trImg = new Imagefloat (fw, fh); + ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, fw, fh, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), + imgsrc->getMetaData()->getFocusDist(), + imgsrc->getMetaData()->getFNumber(), + imgsrc->getRotateDegree(), true); + delete baseImg; + baseImg = trImg; + } + } + + Image16 *stage_finish() + { + procparams::ProcParams& params = job->pparams; + //ImProcFunctions ipf (¶ms, true); + ImProcFunctions &ipf = * (ipf_p.get()); + + if (params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { + const int W = baseImg->getWidth(); + const int H = baseImg->getHeight(); + LabImage labcbdl (W, H); + ipf.rgb2lab (*baseImg, labcbdl, params.icm.working); + ipf.dirpyrequalizer (&labcbdl, 1); + ipf.lab2rgb (labcbdl, *baseImg, params.icm.working); + } + + // update blurmap + SHMap* shmap = nullptr; + + if (params.sh.enabled) { + shmap = new SHMap (fw, fh, true); + double radius = sqrt (double (fw * fw + fh * fh)) / 2.0; + double shradius = params.sh.radius; + + if (!params.sh.hq) { + shradius *= radius / 1800.0; + } + + shmap->update (baseImg, shradius, ipf.lumimul, params.sh.hq, 1); + } + + // Spot Removal + + if (params.spot.enabled && !params.spot.entries.empty ()) { + ipf.removeSpots (baseImg, params.spot.entries, pp); + } + + // RGB processing + + curve1 (65536); + curve2 (65536); + curve (65536, 0); + satcurve (65536, 0); + lhskcurve (65536, 0); + lumacurve (32770, 0); // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation + clcurve (65536, 0); + wavclCurve (65536, 0); + + //if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; + + CurveFactory::complexCurve (expcomp, black / 65535.0, hlcompr, hlcomprthresh, params.toneCurve.shcompr, bright, contr, + params.toneCurve.curveMode, params.toneCurve.curve, params.toneCurve.curveMode2, params.toneCurve.curve2, + hist16, curve1, curve2, curve, dummy, customToneCurve1, customToneCurve2 ); + + CurveFactory::RGBCurve (params.rgbCurves.rcurve, rCurve, 1); + CurveFactory::RGBCurve (params.rgbCurves.gcurve, gCurve, 1); + CurveFactory::RGBCurve (params.rgbCurves.bcurve, bCurve, 1); + + bool opautili = false; + + if (params.colorToning.enabled) { + TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working); + double wp[3][3] = { + {wprof[0][0], wprof[0][1], wprof[0][2]}, + {wprof[1][0], wprof[1][1], wprof[1][2]}, + {wprof[2][0], wprof[2][1], wprof[2][2]} + }; + TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix (params.icm.working); + double wip[3][3] = { + {wiprof[0][0], wiprof[0][1], wiprof[0][2]}, + {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, + {wiprof[2][0], wiprof[2][1], wiprof[2][2]} + }; + params.colorToning.getCurves (ctColorCurve, ctOpacityCurve, wp, wip, opautili); + clToningcurve (65536, 0); + CurveFactory::curveToning (params.colorToning.clcurve, clToningcurve, 1); + cl2Toningcurve (65536, 0); + CurveFactory::curveToning (params.colorToning.cl2curve, cl2Toningcurve, 1); + } + + labView = new LabImage (fw, fh); + + if (params.blackwhite.enabled) { + CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, hist16, dummy, customToneCurvebw1, customToneCurvebw2, 1); + } + + double rrm, ggm, bbm; + float autor, autog, autob; + float satLimit = float (params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; + float satLimitOpacity = 1.f - (float (params.colorToning.saturatedOpacity) / 100.f); + + if (params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings + float moyS = 0.f; + float eqty = 0.f; + ipf.moyeqt (baseImg, moyS, eqty);//return image : mean saturation and standard dev of saturation + float satp = ((moyS + 1.5f * eqty) - 0.3f) / 0.7f; //1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale + + if (satp >= 0.92f) { + satp = 0.92f; //avoid values too high (out of gamut) + } + + if (satp <= 0.15f) { + satp = 0.15f; //avoid too low values + } + + satLimit = 100.f * satp; + + satLimitOpacity = 100.f * (moyS - 0.85f * eqty); //-0.85 sigma==>20% pixels with low saturation + } + + autor = -9000.f; // This will ask to compute the "auto" values for the B&W tool (have to be inferior to -5000) + DCPProfile::ApplyState as; + DCPProfile *dcpProf = imgsrc->getDCP (params.icm, currWB, as); + + LUTu histToneCurve; + + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); + + if (settings->verbose) { + printf ("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); + } + + // if clut was used and size of clut cache == 1 we free the memory used by the clutstore (default clut cache size = 1 for 32 bit OS) + if ( params.filmSimulation.enabled && !params.filmSimulation.clutFilename.empty() && options.clutCacheSize == 1) { + CLUTStore::getInstance().clearCache(); + } + + // freeing up some memory + customToneCurve1.Reset(); + customToneCurve2.Reset(); + ctColorCurve.Reset(); + ctOpacityCurve.Reset(); + noiseLCurve.Reset(); + noiseCCurve.Reset(); + customToneCurvebw1.Reset(); + customToneCurvebw2.Reset(); + + // Freeing baseImg because not used anymore + delete baseImg; + baseImg = nullptr; + + if (shmap) { + delete shmap; + } + + shmap = nullptr; + + if (pl) { + pl->setProgress (0.55); + } + + //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + // start tile processing...??? + + + if (params.labCurve.contrast != 0) { //only use hist16 for contrast + hist16.clear(); + +#ifdef _OPENMP + #pragma omp parallel +#endif + { + LUTu hist16thr (hist16.getSize()); // one temporary lookup table per thread + hist16thr.clear(); +#ifdef _OPENMP + #pragma omp for schedule(static) nowait +#endif + + for (int i = 0; i < fh; i++) + for (int j = 0; j < fw; j++) { + hist16thr[ (int) ((labView->L[i][j]))]++; + } + + #pragma omp critical + { + hist16 += hist16thr; + } } } - imgsrc->convertColorSpace(calclum, params.icm, currWB); - } + bool utili; + CurveFactory::complexLCurve (params.labCurve.brightness, params.labCurve.contrast, params.labCurve.lcurve, hist16, lumacurve, dummy, 1, utili); - if (denoiseParams.enabled) { - // CurveFactory::denoiseLL(lldenoiseutili, denoiseParams.lcurve, Noisecurve,1); - //denoiseParams.getCurves(noiseLCurve); -// ipf.RGB_denoise(baseImg, baseImg, calclum, imgsrc->isRAW(), denoiseParams, params.defringe, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, lldenoiseutili); - float chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi; - int kall = 2; - ipf.RGB_denoise(kall, baseImg, baseImg, calclum, ch_M, max_r, max_b, imgsrc->isRAW(), denoiseParams, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi); + bool clcutili; + CurveFactory::curveCL (clcutili, params.labCurve.clcurve, clcurve, 1); - } + bool ccutili, cclutili; + CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, + params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 1); -// delete calclum; - delete [] ch_M; - delete [] max_r; - delete [] max_b; - delete [] min_r; - delete [] min_b; - delete [] lumL; - delete [] chromC; - delete [] ry; - delete [] sk; - delete [] pcsk; + ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); - imgsrc->convertColorSpace(baseImg, params.icm, currWB); - - // perform first analysis - LUTu hist16 (65536); - - ipf.firstAnalysis (baseImg, params, hist16); - - // perform transform (excepted resizing) - if (ipf.needsTransform()) { - Imagefloat* trImg = new Imagefloat (fw, fh); - ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, fw, fh, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), - imgsrc->getMetaData()->getFocusDist(), imgsrc->getRotateDegree(), true); - delete baseImg; - baseImg = trImg; - } - - - if (params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { - const int W = baseImg->getWidth(); - const int H = baseImg->getHeight(); - LabImage labcbdl(W, H); - ipf.rgb2lab(*baseImg, labcbdl, params.icm.working); - ipf.dirpyrequalizer (&labcbdl, 1); - ipf.lab2rgb(labcbdl, *baseImg, params.icm.working); - } - - // update blurmap - SHMap* shmap = nullptr; - - if (params.sh.enabled) { - shmap = new SHMap (fw, fh, true); - double radius = sqrt (double(fw * fw + fh * fh)) / 2.0; - double shradius = params.sh.radius; - - if (!params.sh.hq) { - shradius *= radius / 1800.0; + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { + ipf.EPDToneMap (labView, 5, 1); } - shmap->update (baseImg, shradius, ipf.lumimul, params.sh.hq, 1); + + ipf.vibrance (labView); + + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + ipf.impulsedenoise (labView); + } + + // for all treatments Defringe, Sharpening, Contrast detail ,Microcontrast they are activated if "CIECAM" function are disabled + + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + ipf.defringe (labView); + } + + if (params.sharpenEdge.enabled) { + ipf.MLsharpen (labView); + } + + if (params.sharpenMicro.enabled) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + ipf.MLmicrocontrast (labView); //!params.colorappearance.sharpcie + } + } + + if (((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) && params.sharpening.enabled) { + + float **buffer = new float*[fh]; + + for (int i = 0; i < fh; i++) { + buffer[i] = new float[fw]; + } + + ipf.sharpening (labView, (float**)buffer, params.sharpening); + + for (int i = 0; i < fh; i++) { + delete [] buffer[i]; + } + + delete [] buffer; + } + + WaveletParams WaveParams = params.wavelet; + WavCurve wavCLVCurve; + WavOpacityCurveRG waOpacityCurveRG; + WavOpacityCurveBY waOpacityCurveBY; + WavOpacityCurveW waOpacityCurveW; + WavOpacityCurveWL waOpacityCurveWL; + + params.wavelet.getCurves (wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL ); + + + // directional pyramid wavelet + if (params.dirpyrequalizer.cbdlMethod == "aft") { + if ((params.colorappearance.enabled && !settings->autocielab) || !params.colorappearance.enabled) { + ipf.dirpyrequalizer (labView, 1); //TODO: this is the luminance tonecurve, not the RGB one + } + } + + bool wavcontlutili = false; + + CurveFactory::curveWavContL (wavcontlutili, params.wavelet.wavclCurve, wavclCurve,/* hist16C, dummy,*/ 1); + + if (params.wavelet.enabled) { + ipf.ip_wavelet (labView, labView, 2, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, 1); + } + + wavCLVCurve.Reset(); + + //Colorappearance and tone-mapping associated + + int f_w = 1, f_h = 1; + int begh = 0, endh = fh; + + if (params.colorappearance.tonecie || params.colorappearance.enabled) { + f_w = fw; + f_h = fh; + } + + CieImage *cieView = new CieImage (f_w, (f_h)); + begh = 0; + endh = fh; + CurveFactory::curveLightBrightColor ( + params.colorappearance.curve, + params.colorappearance.curve2, + params.colorappearance.curve3, + hist16, dummy, + dummy, dummy, + customColCurve1, + customColCurve2, + customColCurve3, + 1); + + if (params.colorappearance.enabled) { + double adap; + float fnum = imgsrc->getMetaData()->getFNumber ();// F number + float fiso = imgsrc->getMetaData()->getISOSpeed () ;// ISO + float fspeed = imgsrc->getMetaData()->getShutterSpeed () ;//speed + float fcomp = imgsrc->getMetaData()->getExpComp ();//compensation + - + + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { + adap = 2000.; + }//if no exif data or wrong + else { + float E_V = fcomp + log2 ((fnum * fnum) / fspeed / (fiso / 100.f)); + E_V += params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV + E_V += log2 (params.raw.expos); // exposure raw white point ; log2 ==> linear to EV + adap = powf (2.f, E_V - 3.f); //cd / m2 + } + + LUTf CAMBrightCurveJ; + LUTf CAMBrightCurveQ; + float CAMMean = NAN; + + if (params.sharpening.enabled) { + if (settings->ciecamfloat) { + float d, dj, yb; + ipf.ciecam_02float (cieView, float (adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); + } else { + double dd, dj, yb; + ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, yb, 1); + } + } else { + if (settings->ciecamfloat) { + float d, dj, yb; + ipf.ciecam_02float (cieView, float (adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); + } else { + double dd, dj, yb; + ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, yb, 1); + } + } + } + + delete cieView; + cieView = nullptr; + + + + + // end tile processing...??? + //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + if (pl) { + pl->setProgress (0.60); + } + + int imw, imh; + double tmpScale = ipf.resizeScale (¶ms, fw, fh, imw, imh); + bool labResize = params.resize.enabled && params.resize.method != "Nearest" && tmpScale != 1.0; + LabImage *tmplab; + + // crop and convert to rgb16 + int cx = 0, cy = 0, cw = labView->W, ch = labView->H; + + if (params.crop.enabled) { + cx = params.crop.x; + cy = params.crop.y; + cw = params.crop.w; + ch = params.crop.h; + + if (labResize) { // crop lab data + tmplab = new LabImage (cw, ch); + + for (int row = 0; row < ch; row++) { + for (int col = 0; col < cw; col++) { + tmplab->L[row][col] = labView->L[row + cy][col + cx]; + tmplab->a[row][col] = labView->a[row + cy][col + cx]; + tmplab->b[row][col] = labView->b[row + cy][col + cx]; + } + } + + delete labView; + labView = tmplab; + cx = 0; + cy = 0; + } + } + + if (labResize) { // resize lab data + // resize image + tmplab = new LabImage (imw, imh); + ipf.Lanczos (labView, tmplab, tmpScale); + delete labView; + labView = tmplab; + cw = labView->W; + ch = labView->H; + + if (params.prsharpening.enabled) { + for (int i = 0; i < ch; i++) + for (int j = 0; j < cw; j++) { + labView->L[i][j] = labView->L[i][j] < 0.f ? 0.f : labView->L[i][j]; + } + + float **buffer = new float*[ch]; + + for (int i = 0; i < ch; i++) { + buffer[i] = new float[cw]; + } + + ipf.sharpening (labView, (float**)buffer, params.prsharpening); + + for (int i = 0; i < ch; i++) { + delete [] buffer[i]; + } + + delete [] buffer; + } + } + + Image16* readyImg = nullptr; + cmsHPROFILE jprof = nullptr; + bool customGamma = false; + bool useLCMS = false; + bool bwonly = params.blackwhite.enabled && !params.colorToning.enabled && !autili && !butili ; + + if (params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 + + GammaValues ga; + // if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; + readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly, &ga); + customGamma = true; + + //or selected Free gamma + useLCMS = false; + + if ((jprof = ICCStore::getInstance()->createCustomGammaOutputProfile (params.icm, ga)) == nullptr) { + useLCMS = true; + } + + } else { + // if Default gamma mode: we use the profile selected in the "Output profile" combobox; + // gamma come from the selected profile, otherwise it comes from "Free gamma" tool + + readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly); + + if (settings->verbose) { + printf ("Output profile_: \"%s\"\n", params.icm.output.c_str()); + } + } + + delete labView; + labView = nullptr; + + + + if (bwonly) { //force BW r=g=b + if (settings->verbose) { + printf ("Force BW\n"); + } + + for (int ccw = 0; ccw < cw; ccw++) { + for (int cch = 0; cch < ch; cch++) { + readyImg->r (cch, ccw) = readyImg->g (cch, ccw); + readyImg->b (cch, ccw) = readyImg->g (cch, ccw); + } + } + } + + if (pl) { + pl->setProgress (0.70); + } + + if (tmpScale != 1.0 && params.resize.method == "Nearest") { // resize rgb data (gamma applied) + Image16* tempImage = new Image16 (imw, imh); + ipf.resize (readyImg, tempImage, tmpScale); + delete readyImg; + readyImg = tempImage; + } + + if (tunnelMetaData) { + readyImg->setMetadata (ii->getMetaData()->getExifData ()); + } else { + readyImg->setMetadata (ii->getMetaData()->getExifData (), params.exif, params.iptc); + } + + + // Setting the output curve to readyImg + if (customGamma) { + if (!useLCMS) { + // use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generated by lab2rgb16 w/ gamma + ProfileContent pc (jprof); + readyImg->setOutputProfile (pc.getData().c_str(), pc.getData().size()); + } + } else { + // use the selected output profile if present, otherwise use LCMS2 profile generate by lab2rgb16 w/ gamma + + if (params.icm.output != "" && params.icm.output != ColorManagementParams::NoICMString) { + + // if ICCStore::getInstance()->getProfile send back an object, then ICCStore::getInstance()->getContent will do too + cmsHPROFILE jprof = ICCStore::getInstance()->getProfile (params.icm.output); //get outProfile + + if (jprof == nullptr) { + if (settings->verbose) { + printf ("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", params.icm.output.c_str()); + } + } else { + if (settings->verbose) { + printf ("Using \"%s\" output profile\n", params.icm.output.c_str()); + } + + ProfileContent pc = ICCStore::getInstance()->getContent (params.icm.output); + readyImg->setOutputProfile (pc.getData().c_str(), pc.getData().size()); + } + } else { + // No ICM + readyImg->setOutputProfile (nullptr, 0); + } + } + +// t2.set(); +// if( settings->verbose ) +// printf("Total:- %d usec\n", t2.etime(t1)); + + if (!job->initialImage) { + ii->decreaseRef (); + } + + delete job; + + if (pl) { + pl->setProgress (0.75); + } + + /* curve1.reset();curve2.reset(); + curve.reset(); + satcurve.reset(); + lhskcurve.reset(); + + rCurve.reset(); + gCurve.reset(); + bCurve.reset(); + hist16.reset(); + hist16C.reset(); + */ + return readyImg; } - if (params.spot.enabled && !params.spot.entries.empty()) { - ipf.removeSpots(baseImg, params.spot.entries, pp); + void stage_early_resize() + { + procparams::ProcParams& params = job->pparams; + //ImProcFunctions ipf (¶ms, true); + ImProcFunctions &ipf = * (ipf_p.get()); + + int imw, imh; + double scale_factor = ipf.resizeScale (¶ms, fw, fh, imw, imh); + + std::unique_ptr tmplab (new LabImage (fw, fh)); + ipf.rgb2lab (*baseImg, *tmplab, params.icm.working); + + if (params.crop.enabled) { + int cx = params.crop.x; + int cy = params.crop.y; + int cw = params.crop.w; + int ch = params.crop.h; + + std::unique_ptr cropped (new LabImage (cw, ch)); + + for (int row = 0; row < ch; row++) { + for (int col = 0; col < cw; col++) { + cropped->L[row][col] = tmplab->L[row + cy][col + cx]; + cropped->a[row][col] = tmplab->a[row + cy][col + cx]; + cropped->b[row][col] = tmplab->b[row + cy][col + cx]; + } + } + + tmplab = std::move (cropped); + } + + assert (params.resize.enabled); + + // resize image + { + std::unique_ptr resized (new LabImage (imw, imh)); + ipf.Lanczos (tmplab.get(), resized.get(), scale_factor); + tmplab = std::move (resized); + } + + adjust_procparams (scale_factor); + + fw = imw; + fh = imh; + + delete baseImg; + baseImg = new Imagefloat (fw, fh); + ipf.lab2rgb (*tmplab, *baseImg, params.icm.working); } - // RGB processing + void adjust_procparams (double scale_factor) + { + procparams::ProcParams ¶ms = job->pparams; + procparams::ProcParams defaultparams; - LUTf curve1 (65536); - LUTf curve2 (65536); - LUTf curve (65536, 0); - LUTf satcurve (65536, 0); - LUTf lhskcurve (65536, 0); - LUTf lumacurve(32770, 0); // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation - LUTf clcurve (65536, 0); + params.resize.enabled = false; + params.crop.enabled = false; + + if (params.prsharpening.enabled) { + params.sharpening = params.prsharpening; + } else { + adjust_radius (defaultparams.sharpening.radius, scale_factor, + params.sharpening.radius); + } + + params.impulseDenoise.thresh *= scale_factor; + + if (scale_factor < 0.5) { + params.impulseDenoise.enabled = false; + } + + params.wavelet.strength *= scale_factor; + params.dirpyrDenoise.luma *= scale_factor; + //params.dirpyrDenoise.Ldetail += (100 - params.dirpyrDenoise.Ldetail) * scale_factor; + auto &lcurve = params.dirpyrDenoise.lcurve; + + for (size_t i = 2; i < lcurve.size(); i += 4) { + lcurve[i] *= min (scale_factor * 2, 1.0); + } + + noiseLCurve.Set (lcurve); + const char *medmethods[] = { "soft", "33", "55soft", "55", "77", "99" }; + + if (params.dirpyrDenoise.median) { + auto &key = params.dirpyrDenoise.methodmed == "RGB" ? params.dirpyrDenoise.rgbmethod : params.dirpyrDenoise.medmethod; + + for (int i = 1; i < int (sizeof (medmethods) / sizeof (const char *)); ++i) { + if (key == medmethods[i]) { + int j = i - int (1.0 / scale_factor); + + if (j < 0) { + params.dirpyrDenoise.median = false; + } else { + key = medmethods[j]; + } + + break; + } + } + } + + params.epd.scale *= scale_factor; + //params.epd.edgeStopping *= scale_factor; + + const double dirpyreq_scale = min (scale_factor * 1.5, 1.0); + + for (int i = 0; i < 6; ++i) { + adjust_radius (defaultparams.dirpyrequalizer.mult[i], dirpyreq_scale, + params.dirpyrequalizer.mult[i]); + } + + params.dirpyrequalizer.threshold *= scale_factor; + + adjust_radius (defaultparams.defringe.radius, scale_factor, + params.defringe.radius); + adjust_radius (defaultparams.sh.radius, scale_factor, params.sh.radius); + + if (params.raw.xtranssensor.method == + procparams::RAWParams::XTransSensor::methodstring[ + procparams::RAWParams::XTransSensor::threePass]) { + params.raw.xtranssensor.method = + procparams::RAWParams::XTransSensor::methodstring[ + procparams::RAWParams::XTransSensor::onePass]; + } + + if (params.raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::pixelshift]) { + params.raw.bayersensor.method = procparams::RAWParams::BayerSensor::methodstring[params.raw.bayersensor.pixelShiftLmmse ? procparams::RAWParams::BayerSensor::lmmse : procparams::RAWParams::BayerSensor::amaze]; + } + } + +private: + ProcessingJobImpl* job; + int& errorCode; + ProgressListener* pl; + bool tunnelMetaData; + bool flush; + + // internal state + std::unique_ptr ipf_p; + InitialImage *ii; + ImageSource *imgsrc; + int fw; + int fh; + + int tr; + PreviewProps pp; + + NoiseCurve noiseLCurve; + NoiseCurve noiseCCurve; + Imagefloat *calclum; + float autoNR; + float autoNRmax; + int tilesize; + int overlap; + + float *ch_M; + float *max_r; + float *max_b; + float *min_b; + float *min_r; + float *lumL; + float *chromC; + float *ry; + float *sk; + float *pcsk; + + double expcomp; + int bright; + int contr; + int black; + int hlcompr; + int hlcomprthresh; + + ColorTemp currWB; + Imagefloat *baseImg; + LabImage* labView; + + LUTu hist16; + + LUTf curve1; + LUTf curve2; + LUTf curve; + LUTf satcurve; + LUTf lhskcurve; + LUTf lumacurve; + LUTf clcurve; LUTf clToningcurve; LUTf cl2Toningcurve; - LUTf wavclCurve (65536, 0); + LUTf wavclCurve; LUTf rCurve; LUTf gCurve; @@ -796,489 +1555,17 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p ColorAppearance customColCurve1, customColCurve2, customColCurve3 ; ToneCurve customToneCurvebw1; ToneCurve customToneCurvebw2; - //if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; - CurveFactory::complexCurve (expcomp, black / 65535.0, hlcompr, hlcomprthresh, params.toneCurve.shcompr, bright, contr, - params.toneCurve.curveMode, params.toneCurve.curve, params.toneCurve.curveMode2, params.toneCurve.curve2, - hist16, curve1, curve2, curve, dummy, customToneCurve1, customToneCurve2 ); + bool autili, butili; +}; - CurveFactory::RGBCurve (params.rgbCurves.rcurve, rCurve, 1); - CurveFactory::RGBCurve (params.rgbCurves.gcurve, gCurve, 1); - CurveFactory::RGBCurve (params.rgbCurves.bcurve, bCurve, 1); +} // namespace - bool opautili = false; - if(params.colorToning.enabled) { - TMatrix wprof = iccStore->workingSpaceMatrix (params.icm.working); - double wp[3][3] = { - {wprof[0][0], wprof[0][1], wprof[0][2]}, - {wprof[1][0], wprof[1][1], wprof[1][2]}, - {wprof[2][0], wprof[2][1], wprof[2][2]} - }; - TMatrix wiprof = iccStore->workingSpaceInverseMatrix (params.icm.working); - double wip[3][3] = { - {wiprof[0][0], wiprof[0][1], wiprof[0][2]}, - {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, - {wiprof[2][0], wiprof[2][1], wiprof[2][2]} - }; - params.colorToning.getCurves(ctColorCurve, ctOpacityCurve, wp, wip, opautili); - clToningcurve (65536, 0); - CurveFactory::curveToning(params.colorToning.clcurve, clToningcurve, 1); - cl2Toningcurve (65536, 0); - CurveFactory::curveToning(params.colorToning.cl2curve, cl2Toningcurve, 1); - } - - LabImage* labView = new LabImage (fw, fh); - - if(params.blackwhite.enabled) { - CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, hist16, dummy, customToneCurvebw1, customToneCurvebw2, 1); - } - - double rrm, ggm, bbm; - float autor, autog, autob; - float satLimit = float(params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; - float satLimitOpacity = 1.f - (float(params.colorToning.saturatedOpacity) / 100.f); - - if(params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings - float moyS = 0.f; - float eqty = 0.f; - ipf.moyeqt (baseImg, moyS, eqty);//return image : mean saturation and standard dev of saturation - float satp = ((moyS + 1.5f * eqty) - 0.3f) / 0.7f; //1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale - - if(satp >= 0.92f) { - satp = 0.92f; //avoid values too high (out of gamut) - } - - if(satp <= 0.15f) { - satp = 0.15f; //avoid too low values - } - - satLimit = 100.f * satp; - - satLimitOpacity = 100.f * (moyS - 0.85f * eqty); //-0.85 sigma==>20% pixels with low saturation - } - - autor = -9000.f; // This will ask to compute the "auto" values for the B&W tool (have to be inferior to -5000) - DCPProfile::ApplyState as; - DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); - - LUTu histToneCurve; - - ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); - - if (settings->verbose) { - printf("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); - } - - // if clut was used and size of clut cache == 1 we free the memory used by the clutstore (default clut cache size = 1 for 32 bit OS) - if ( params.filmSimulation.enabled && !params.filmSimulation.clutFilename.empty() && options.clutCacheSize == 1) { - CLUTStore::getInstance().clearCache(); - } - - // freeing up some memory - customToneCurve1.Reset(); - customToneCurve2.Reset(); - ctColorCurve.Reset(); - ctOpacityCurve.Reset(); - noiseLCurve.Reset(); - noiseCCurve.Reset(); - customToneCurvebw1.Reset(); - customToneCurvebw2.Reset(); - - // Freeing baseImg because not used anymore - delete baseImg; - baseImg = nullptr; - - if (shmap) { - delete shmap; - } - - shmap = nullptr; - - if (pl) { - pl->setProgress (0.55); - } - - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - // start tile processing...??? - - - if(params.labCurve.contrast != 0) { //only use hist16 for contrast - hist16.clear(); - -#ifdef _OPENMP - #pragma omp parallel -#endif - { - LUTu hist16thr (hist16.getSize()); // one temporary lookup table per thread - hist16thr.clear(); -#ifdef _OPENMP - #pragma omp for schedule(static) nowait -#endif - - for (int i = 0; i < fh; i++) - for (int j = 0; j < fw; j++) { - hist16thr[(int)((labView->L[i][j]))]++; - } - - #pragma omp critical - { - hist16 += hist16thr; - } - } - } - - bool utili; - CurveFactory::complexLCurve (params.labCurve.brightness, params.labCurve.contrast, params.labCurve.lcurve, hist16, lumacurve, dummy, 1, utili); - - bool clcutili; - CurveFactory::curveCL(clcutili, params.labCurve.clcurve, clcurve, 1); - - bool autili, butili, ccutili, cclutili; - CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, - params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 1); - - ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); - - if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { - ipf.EPDToneMap(labView, 5, 1); - } - - - ipf.vibrance(labView); - - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { - ipf.impulsedenoise (labView); - } - - // for all treatments Defringe, Sharpening, Contrast detail ,Microcontrast they are activated if "CIECAM" function are disabled - - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { - ipf.defringe (labView); - } - - if (params.sharpenEdge.enabled) { - ipf.MLsharpen(labView); - } - - if (params.sharpenMicro.enabled) { - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { - ipf.MLmicrocontrast (labView); //!params.colorappearance.sharpcie - } - } - - if(((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) && params.sharpening.enabled) { - - float **buffer = new float*[fh]; - - for (int i = 0; i < fh; i++) { - buffer[i] = new float[fw]; - } - - ipf.sharpening (labView, (float**)buffer, params.sharpening); - - for (int i = 0; i < fh; i++) { - delete [] buffer[i]; - } - - delete [] buffer; - } - - WaveletParams WaveParams = params.wavelet; - WavCurve wavCLVCurve; - WavOpacityCurveRG waOpacityCurveRG; - WavOpacityCurveBY waOpacityCurveBY; - WavOpacityCurveW waOpacityCurveW; - WavOpacityCurveWL waOpacityCurveWL; - - params.wavelet.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL ); - - - // directional pyramid wavelet - if(params.dirpyrequalizer.cbdlMethod == "aft") { - if((params.colorappearance.enabled && !settings->autocielab) || !params.colorappearance.enabled) { - ipf.dirpyrequalizer (labView, 1); //TODO: this is the luminance tonecurve, not the RGB one - } - } - - bool wavcontlutili = false; - - CurveFactory::curveWavContL(wavcontlutili, params.wavelet.wavclCurve, wavclCurve,/* hist16C, dummy,*/ 1); - - if(params.wavelet.enabled) { - ipf.ip_wavelet(labView, labView, 2, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, 1); - } - - wavCLVCurve.Reset(); - - //Colorappearance and tone-mapping associated - - int f_w = 1, f_h = 1; - int begh = 0, endh = fh; - - if(params.colorappearance.tonecie || params.colorappearance.enabled) { - f_w = fw; - f_h = fh; - } - - CieImage *cieView = new CieImage (f_w, (f_h)); - begh = 0; - endh = fh; - CurveFactory::curveLightBrightColor ( - params.colorappearance.curve, - params.colorappearance.curve2, - params.colorappearance.curve3, - hist16, dummy, - dummy, dummy, - customColCurve1, - customColCurve2, - customColCurve3, - 1); - - if(params.colorappearance.enabled) { - double adap; - float fnum = imgsrc->getMetaData()->getFNumber ();// F number - float fiso = imgsrc->getMetaData()->getISOSpeed () ;// ISO - float fspeed = imgsrc->getMetaData()->getShutterSpeed () ;//speed - float fcomp = imgsrc->getMetaData()->getExpComp ();//compensation + - - - if(fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { - adap = 2000.; - }//if no exif data or wrong - else { - float E_V = fcomp + log2 ((fnum * fnum) / fspeed / (fiso / 100.f)); - E_V += params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV - E_V += log2(params.raw.expos);// exposure raw white point ; log2 ==> linear to EV - adap = powf(2.f, E_V - 3.f); //cd / m2 - } - - LUTf CAMBrightCurveJ; - LUTf CAMBrightCurveQ; - float CAMMean = NAN; - - if (params.sharpening.enabled) { - if(settings->ciecamfloat) { - float d; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, 1, 1); - } else { - double dd; - ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1, 1); - } - } else { - if(settings->ciecamfloat) { - float d; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, 1, 1); - } else { - double dd; - ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1, 1); - } - } - } - - delete cieView; - cieView = nullptr; - - - - - // end tile processing...??? - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - if (pl) { - pl->setProgress (0.60); - } - - int imw, imh; - double tmpScale = ipf.resizeScale(¶ms, fw, fh, imw, imh); - bool labResize = params.resize.enabled && params.resize.method != "Nearest" && tmpScale != 1.0; - LabImage *tmplab; - - // crop and convert to rgb16 - int cx = 0, cy = 0, cw = labView->W, ch = labView->H; - - if (params.crop.enabled) { - cx = params.crop.x; - cy = params.crop.y; - cw = params.crop.w; - ch = params.crop.h; - - if(labResize) { // crop lab data - tmplab = new LabImage(cw, ch); - - for(int row = 0; row < ch; row++) { - for(int col = 0; col < cw; col++) { - tmplab->L[row][col] = labView->L[row + cy][col + cx]; - tmplab->a[row][col] = labView->a[row + cy][col + cx]; - tmplab->b[row][col] = labView->b[row + cy][col + cx]; - } - } - - delete labView; - labView = tmplab; - cx = 0; - cy = 0; - } - } - - if (labResize) { // resize lab data - // resize image - tmplab = new LabImage(imw, imh); - ipf.Lanczos (labView, tmplab, tmpScale); - delete labView; - labView = tmplab; - cw = labView->W; - ch = labView->H; - - if(params.prsharpening.enabled) { - for(int i = 0; i < ch; i++) - for(int j = 0; j < cw; j++) { - labView->L[i][j] = labView->L[i][j] < 0.f ? 0.f : labView->L[i][j]; - } - - float **buffer = new float*[ch]; - - for (int i = 0; i < ch; i++) { - buffer[i] = new float[cw]; - } - - ipf.sharpening (labView, (float**)buffer, params.prsharpening); - - for (int i = 0; i < ch; i++) { - delete [] buffer[i]; - } - - delete [] buffer; - } - } - - Image16* readyImg = nullptr; - cmsHPROFILE jprof = nullptr; - bool customGamma = false; - bool useLCMS = false; - bool bwonly = params.blackwhite.enabled && !params.colorToning.enabled && !autili && !butili ; - - if(params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 - - GammaValues ga; - // if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; - readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly, &ga); - customGamma = true; - - //or selected Free gamma - useLCMS = false; - - if ((jprof = iccStore->createCustomGammaOutputProfile (params.icm, ga)) == nullptr) { - useLCMS = true; - } - - } else { - // if Default gamma mode: we use the profile selected in the "Output profile" combobox; - // gamma come from the selected profile, otherwise it comes from "Free gamma" tool - - readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly); - - if (settings->verbose) { - printf("Output profile_: \"%s\"\n", params.icm.output.c_str()); - } - } - - delete labView; - labView = nullptr; - - - - if(bwonly) { //force BW r=g=b - if (settings->verbose) { - printf("Force BW\n"); - } - - for (int ccw = 0; ccw < cw; ccw++) { - for (int cch = 0; cch < ch; cch++) { - readyImg->r(cch, ccw) = readyImg->g(cch, ccw); - readyImg->b(cch, ccw) = readyImg->g(cch, ccw); - } - } - } - - if (pl) { - pl->setProgress (0.70); - } - - if (tmpScale != 1.0 && params.resize.method == "Nearest") { // resize rgb data (gamma applied) - Image16* tempImage = new Image16 (imw, imh); - ipf.resize (readyImg, tempImage, tmpScale); - delete readyImg; - readyImg = tempImage; - } - - if (tunnelMetaData) { - readyImg->setMetadata (ii->getMetaData()->getExifData ()); - } else { - readyImg->setMetadata (ii->getMetaData()->getExifData (), params.exif, params.iptc); - } - - - // Setting the output curve to readyImg - if (customGamma) { - if (!useLCMS) { - // use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generated by lab2rgb16 w/ gamma - ProfileContent pc(jprof); - readyImg->setOutputProfile (pc.data, pc.length); - } - } else { - // use the selected output profile if present, otherwise use LCMS2 profile generate by lab2rgb16 w/ gamma - - if (params.icm.output != "" && params.icm.output != ColorManagementParams::NoICMString) { - - // if iccStore->getProfile send back an object, then iccStore->getContent will do too - cmsHPROFILE jprof = iccStore->getProfile(params.icm.output); //get outProfile - - if (jprof == nullptr) { - if (settings->verbose) { - printf("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", params.icm.output.c_str()); - } - } else { - if (settings->verbose) { - printf("Using \"%s\" output profile\n", params.icm.output.c_str()); - } - - ProfileContent pc = iccStore->getContent (params.icm.output); - readyImg->setOutputProfile (pc.data, pc.length); - } - } else { - // No ICM - readyImg->setOutputProfile (nullptr, 0); - } - } - -// t2.set(); -// if( settings->verbose ) -// printf("Total:- %d usec\n", t2.etime(t1)); - - if (!job->initialImage) { - ii->decreaseRef (); - } - - delete job; - - if (pl) { - pl->setProgress (0.75); - } - - /* curve1.reset();curve2.reset(); - curve.reset(); - satcurve.reset(); - lhskcurve.reset(); - - rCurve.reset(); - gCurve.reset(); - bCurve.reset(); - hist16.reset(); - hist16C.reset(); - */ - return readyImg; +IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* pl, bool tunnelMetaData, bool flush) +{ + ImageProcessor proc (pjob, errorCode, pl, tunnelMetaData, flush); + return proc(); } void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bool tunnelMetaData) @@ -1291,7 +1578,7 @@ void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bo IImage16* img = processImage (currentJob, errorCode, bpl, tunnelMetaData, true); if (errorCode) { - bpl->error (M("MAIN_MSG_CANNOTLOAD")); + bpl->error (M ("MAIN_MSG_CANNOTLOAD")); currentJob = nullptr; } else { try { @@ -1307,14 +1594,9 @@ void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bo void startBatchProcessing (ProcessingJob* job, BatchProcessingListener* bpl, bool tunnelMetaData) { - if (bpl) -#if __GNUC__ == 4 && __GNUC_MINOR__ == 8 && defined( WIN32 ) && defined(__x86_64__) - // See Issue 2384 "Very bad response time on win7/64 using gcc 4.8 when queue is running" - Glib::Thread::create(sigc::bind(sigc::ptr_fun(batchProcessingThread), job, bpl, tunnelMetaData), 0, true, true, Glib::THREAD_PRIORITY_NORMAL); - -#else - Glib::Thread::create(sigc::bind(sigc::ptr_fun(batchProcessingThread), job, bpl, tunnelMetaData), 0, true, true, Glib::THREAD_PRIORITY_LOW); -#endif + if (bpl) { + Glib::Thread::create (sigc::bind (sigc::ptr_fun (batchProcessingThread), job, bpl, tunnelMetaData), 0, true, true, Glib::THREAD_PRIORITY_LOW); + } } diff --git a/rtengine/sleef.c b/rtengine/sleef.c index bc38a3cfb..17dfccc0f 100644 --- a/rtengine/sleef.c +++ b/rtengine/sleef.c @@ -12,7 +12,8 @@ #include #include -#include +//#include +#include "rt_math.h" //#include //#include @@ -56,9 +57,9 @@ __inline double mla(double x, double y, double z) { return x * y + z; } __inline double xrint(double x) { return x < 0 ? (int)(x - 0.5) : (int)(x + 0.5); } __inline int xisnan(double x) { return x != x; } -__inline int xisinf(double x) { return x == INFINITY || x == -INFINITY; } -__inline int xisminf(double x) { return x == -INFINITY; } -__inline int xispinf(double x) { return x == INFINITY; } +__inline int xisinf(double x) { return x == rtengine::RT_INFINITY || x == -rtengine::RT_INFINITY; } +__inline int xisminf(double x) { return x == -rtengine::RT_INFINITY; } +__inline int xispinf(double x) { return x == rtengine::RT_INFINITY; } __inline double ldexpk(double x, int q) { double u; @@ -87,7 +88,7 @@ __inline int ilogbp1(double d) { __inline int xilogb(double d) { int e = ilogbp1(xfabs(d)) - 1; e = d == 0 ? (-2147483647 - 1) : e; - e = d == INFINITY || d == -INFINITY ? 2147483647 : e; + e = d == rtengine::RT_INFINITY || d == -rtengine::RT_INFINITY ? 2147483647 : e; return e; } @@ -309,7 +310,7 @@ __inline double atan2k(double y, double x) { u = u * t + (-0.333333333333311110369124); t = u * t * s + s; - t = q * (M_PI/2) + t; + t = q * (rtengine::RT_PI_2) + t; return t; } @@ -318,11 +319,11 @@ __inline double xatan2(double y, double x) { double r = atan2k(xfabs(y), x); r = mulsign(r, x); - if (xisinf(x) || x == 0) r = M_PI/2 - (xisinf(x) ? (sign(x) * (M_PI /2)) : 0); - if (xisinf(y) ) r = M_PI/2 - (xisinf(x) ? (sign(x) * (M_PI*1/4)) : 0); - if ( y == 0) r = (sign(x) == -1 ? M_PI : 0); + if (xisinf(x) || x == 0) r = rtengine::RT_PI_2 - (xisinf(x) ? (sign(x) * (rtengine::RT_PI_2)) : 0); + if (xisinf(y) ) r = rtengine::RT_PI_2 - (xisinf(x) ? (sign(x) * (rtengine::RT_PI*1/4)) : 0); + if ( y == 0) r = (sign(x) == -1 ? rtengine::RT_PI : 0); - return xisnan(x) || xisnan(y) ? NAN : mulsign(r, y); + return xisnan(x) || xisnan(y) ? rtengine::RT_NAN : mulsign(r, y); } __inline double xasin(double d) { @@ -330,7 +331,7 @@ __inline double xasin(double d) { } __inline double xacos(double d) { - return mulsign(atan2k(sqrt((1+d)*(1-d)), xfabs(d)), d) + (d < 0 ? M_PI : 0); + return mulsign(atan2k(sqrt((1+d)*(1-d)), xfabs(d)), d) + (d < 0 ? rtengine::RT_PI : 0); } __inline double xatan(double s) { @@ -374,7 +375,7 @@ __inline double xsin(double d) { int q; double u, s; - q = (int)xrint(d * M_1_PI); + q = (int)xrint(d * rtengine::RT_1_PI); d = mla(q, -PI4_A*4, d); d = mla(q, -PI4_B*4, d); @@ -403,7 +404,7 @@ __inline double xcos(double d) { int q; double u, s; - q = 1 + 2*(int)xrint(d * M_1_PI - 0.5); + q = 1 + 2*(int)xrint(d * rtengine::RT_1_PI - 0.5); d = mla(q, -PI4_A*2, d); d = mla(q, -PI4_B*2, d); @@ -433,7 +434,7 @@ __inline double2 xsincos(double d) { double u, s, t; double2 r; - q = (int)xrint(d * (2 * M_1_PI)); + q = (int)xrint(d * (2 * rtengine::RT_1_PI)); s = d; @@ -469,7 +470,7 @@ __inline double2 xsincos(double d) { if ((q & 2) != 0) { r.x = -r.x; } if (((q+1) & 2) != 0) { r.y = -r.y; } - if (xisinf(d)) { r.x = r.y = NAN; } + if (xisinf(d)) { r.x = r.y = rtengine::RT_NAN; } return r; } @@ -478,7 +479,7 @@ __inline double xtan(double d) { int q; double u, s, x; - q = (int)xrint(d * (2 * M_1_PI)); + q = (int)xrint(d * (2 * rtengine::RT_1_PI)); x = mla(q, -PI4_A*2, d); x = mla(q, -PI4_B*2, x); @@ -508,7 +509,7 @@ __inline double xtan(double d) { if ((q & 1) != 0) u = 1.0 / u; - if (xisinf(d)) u = NAN; + if (xisinf(d)) u = rtengine::RT_NAN; return u; } @@ -534,9 +535,9 @@ __inline double xlog(double d) { x = x * t + 0.693147180559945286226764 * e; - if (xisinf(d)) x = INFINITY; - if (d < 0) x = NAN; - if (d == 0) x = -INFINITY; + if (xisinf(d)) x = rtengine::RT_INFINITY; + if (d < 0) x = rtengine::RT_NAN; + if (d == 0) x = -rtengine::RT_INFINITY; return x; } @@ -625,13 +626,13 @@ __inline double xpow(double x, double y) { double result = expk(mul_ds(logk(xfabs(x)), y)); - result = xisnan(result) ? INFINITY : result; - result *= (x >= 0 ? 1 : (!yisint ? NAN : (yisodd ? -1 : 1))); + result = xisnan(result) ? rtengine::RT_INFINITY : result; + result *= (x >= 0 ? 1 : (!yisint ? rtengine::RT_NAN : (yisodd ? -1 : 1))); double efx = mulsign(xfabs(x) - 1, y); - if (xisinf(y)) result = efx < 0 ? 0.0 : (efx == 0 ? 1.0 : INFINITY); - if (xisinf(x) || x == 0) result = (yisodd ? sign(x) : 1) * ((x == 0 ? -y : y) < 0 ? 0 : INFINITY); - if (xisnan(x) || xisnan(y)) result = NAN; + if (xisinf(y)) result = efx < 0 ? 0.0 : (efx == 0 ? 1.0 : rtengine::RT_INFINITY); + if (xisinf(x) || x == 0) result = (yisodd ? sign(x) : 1) * ((x == 0 ? -y : y) < 0 ? 0 : rtengine::RT_INFINITY); + if (xisnan(x) || xisnan(y)) result = rtengine::RT_NAN; if (y == 0 || x == 1) result = 1; return result; @@ -670,9 +671,9 @@ __inline double xsinh(double x) { d = add2_dd(d, div_dd(dd(-1, 0), d)); y = (d.x + d.y) * 0.5; - y = xisinf(x) || xisnan(y) ? INFINITY : y; + y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y; y = mulsign(y, x); - y = xisnan(x) ? NAN : y; + y = xisnan(x) ? rtengine::RT_NAN : y; return y; } @@ -682,8 +683,8 @@ __inline double xcosh(double x) { d = add2_dd(d, div_dd(dd(1, 0), d)); double y = (d.x + d.y) * 0.5; - y = xisinf(x) || xisnan(y) ? INFINITY : y; - y = xisnan(x) ? NAN : y; + y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y; + y = xisnan(x) ? rtengine::RT_NAN : y; return y; } @@ -697,7 +698,7 @@ __inline double xtanh(double x) { y = xisinf(x) || xisnan(y) ? 1.0 : y; y = mulsign(y, x); - y = xisnan(x) ? NAN : y; + y = xisnan(x) ? rtengine::RT_NAN : y; return y; } @@ -732,9 +733,9 @@ __inline double xasinh(double x) { double2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(y, y), 1)), y)); y = d.x + d.y; - y = xisinf(x) || xisnan(y) ? INFINITY : y; + y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y; y = mulsign(y, x); - y = xisnan(x) ? NAN : y; + y = xisnan(x) ? rtengine::RT_NAN : y; return y; } @@ -743,10 +744,10 @@ __inline double xacosh(double x) { double2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(x, x), -1)), x)); double y = d.x + d.y; - y = xisinf(x) || xisnan(y) ? INFINITY : y; + y = xisinf(x) || xisnan(y) ? rtengine::RT_INFINITY : y; y = x == 1.0 ? 0.0 : y; - y = x < 1.0 ? NAN : y; - y = xisnan(x) ? NAN : y; + y = x < 1.0 ? rtengine::RT_NAN : y; + y = xisnan(x) ? rtengine::RT_NAN : y; return y; } @@ -754,11 +755,11 @@ __inline double xacosh(double x) { __inline double xatanh(double x) { double y = xfabs(x); double2 d = logk2(div_dd(add2_ss(1, y), add2_ss(1, -y))); - y = y > 1.0 ? NAN : (y == 1.0 ? INFINITY : (d.x + d.y) * 0.5); + y = y > 1.0 ? rtengine::RT_NAN : (y == 1.0 ? rtengine::RT_INFINITY : (d.x + d.y) * 0.5); - y = xisinf(x) || xisnan(y) ? NAN : y; + y = xisinf(x) || xisnan(y) ? rtengine::RT_NAN : y; y = mulsign(y, x); - y = xisnan(x) ? NAN : y; + y = xisnan(x) ? rtengine::RT_NAN : y; return y; } @@ -809,7 +810,7 @@ __inline double xsqrt(double d) { // max error : 0.5 ulp // You can change xfma to fma if fma is correctly implemented x = xfma(d * x, d * x, -d) * (x * -0.5) + d * x; - return d == INFINITY ? INFINITY : x * q; + return d == rtengine::RT_INFINITY ? rtengine::RT_INFINITY : x * q; } __inline double xcbrt(double d) { // max error : 2 ulps @@ -842,14 +843,14 @@ __inline double xcbrt(double d) { // max error : 2 ulps __inline double xexp2(double a) { double u = expk(mul_ds(dd(0.69314718055994528623, 2.3190468138462995584e-17), a)); - if (xispinf(a)) u = INFINITY; + if (xispinf(a)) u = rtengine::RT_INFINITY; if (xisminf(a)) u = 0; return u; } __inline double xexp10(double a) { double u = expk(mul_ds(dd(2.3025850929940459011, -2.1707562233822493508e-16), a)); - if (xispinf(a)) u = INFINITY; + if (xispinf(a)) u = rtengine::RT_INFINITY; if (xisminf(a)) u = 0; return u; } @@ -857,7 +858,7 @@ __inline double xexp10(double a) { __inline double xexpm1(double a) { double2 d = add2_ds(expk2(dd(a, 0)), -1.0); double x = d.x + d.y; - if (xispinf(a)) x = INFINITY; + if (xispinf(a)) x = rtengine::RT_INFINITY; if (xisminf(a)) x = -1; return x; } @@ -866,9 +867,9 @@ __inline double xlog10(double a) { double2 d = mul_dd(logk(a), dd(0.43429448190325176116, 6.6494347733425473126e-17)); double x = d.x + d.y; - if (xisinf(a)) x = INFINITY; - if (a < 0) x = NAN; - if (a == 0) x = -INFINITY; + if (xisinf(a)) x = rtengine::RT_INFINITY; + if (a < 0) x = rtengine::RT_NAN; + if (a == 0) x = -rtengine::RT_INFINITY; return x; } @@ -877,9 +878,9 @@ __inline double xlog1p(double a) { double2 d = logk2(add2_ss(a, 1)); double x = d.x + d.y; - if (xisinf(a)) x = INFINITY; - if (a < -1) x = NAN; - if (a == -1) x = -INFINITY; + if (xisinf(a)) x = rtengine::RT_INFINITY; + if (a < -1) x = rtengine::RT_NAN; + if (a == -1) x = -rtengine::RT_INFINITY; return x; } @@ -895,11 +896,6 @@ __inline double xlog1p(double a) { #define L2Lf 1.428606765330187045e-06f #define R_LN2f 1.442695040888963407359924681001892137426645954152985934135449406931f -#define M_PIf ((float)M_PI) -#define M_PIf_2 ((float)M_PI_2) - -#define INFINITYf ((float)INFINITY) -#define NANf ((float)NAN) __inline int32_t floatToRawIntBits(float d) { union { @@ -932,9 +928,9 @@ __inline float mlaf(float x, float y, float z) { return x * y + z; } __inline float xrintf(float x) { return x < 0 ? (int)(x - 0.5f) : (int)(x + 0.5f); } __inline int xisnanf(float x) { return x != x; } -__inline int xisinff(float x) { return x == INFINITYf || x == -INFINITYf; } -__inline int xisminff(float x) { return x == -INFINITYf; } -__inline int xispinff(float x) { return x == INFINITYf; } +__inline int xisinff(float x) { return x == rtengine::RT_INFINITY_F || x == -rtengine::RT_INFINITY_F; } +__inline int xisminff(float x) { return x == -rtengine::RT_INFINITY_F; } +__inline int xispinff(float x) { return x == rtengine::RT_INFINITY_F; } __inline int ilogbp1f(float d) { int m = d < 5.421010862427522E-20f; @@ -988,7 +984,7 @@ __inline float xsinf(float d) { int q; float u, s; - q = (int)xrintf(d * (float)M_1_PI); + q = (int)xrintf(d * (float)rtengine::RT_1_PI); d = mlaf(q, -PI4_Af*4, d); d = mlaf(q, -PI4_Bf*4, d); @@ -1013,7 +1009,7 @@ __inline float xcosf(float d) { int q; float u, s; - q = 1 + 2*(int)xrintf(d * (float)M_1_PI - 0.5f); + q = 1 + 2*(int)xrintf(d * (float)rtengine::RT_1_PI - 0.5f); d = mlaf(q, -PI4_Af*2, d); d = mlaf(q, -PI4_Bf*2, d); @@ -1039,7 +1035,7 @@ __inline float2 xsincosf(float d) { float u, s, t; float2 r; - q = (int)rint(d * ((float)(2 * M_1_PI))); + q = (int)rint(d * ((float)(2 * rtengine::RT_1_PI))); s = d; @@ -1071,7 +1067,7 @@ __inline float2 xsincosf(float d) { if ((q & 2) != 0) { r.x = -r.x; } if (((q+1) & 2) != 0) { r.y = -r.y; } - if (xisinff(d)) { r.x = r.y = NANf; } + if (xisinff(d)) { r.x = r.y = rtengine::RT_NAN_F; } return r; } @@ -1080,7 +1076,7 @@ __inline float xtanf(float d) { int q; float u, s, x; - q = (int)xrintf(d * (float)(2 * M_1_PI)); + q = (int)xrintf(d * (float)(2 * rtengine::RT_1_PI)); x = d; @@ -1104,7 +1100,7 @@ __inline float xtanf(float d) { if ((q & 1) != 0) u = 1.0f / u; - if (xisinff(d)) u = NANf; + if (xisinff(d)) u = rtengine::RT_NAN_F; return u; } @@ -1156,18 +1152,18 @@ __inline float atan2kf(float y, float x) { t = u * t; t = mlaf(t,s,s); - return mlaf(q,(float)(M_PIf_2),t); + return mlaf(q,(float)(rtengine::RT_PI_F_2),t); } __inline float xatan2f(float y, float x) { float r = atan2kf(xfabsf(y), x); r = mulsignf(r, x); - if (xisinff(x) || x == 0) r = M_PIf/2 - (xisinff(x) ? (signf(x) * (float)(M_PIf*.5f)) : 0); - if (xisinff(y) ) r = M_PIf/2 - (xisinff(x) ? (signf(x) * (float)(M_PIf*.25f)) : 0); - if ( y == 0) r = (signf(x) == -1 ? M_PIf : 0); + if (xisinff(x) || x == 0) r = rtengine::RT_PI_F/2 - (xisinff(x) ? (signf(x) * (float)(rtengine::RT_PI_F*.5f)) : 0); + if (xisinff(y) ) r = rtengine::RT_PI_F/2 - (xisinff(x) ? (signf(x) * (float)(rtengine::RT_PI_F*.25f)) : 0); + if ( y == 0) r = (signf(x) == -1 ? rtengine::RT_PI_F : 0); - return xisnanf(x) || xisnanf(y) ? NANf : mulsignf(r, y); + return xisnanf(x) || xisnanf(y) ? rtengine::RT_NAN_F : mulsignf(r, y); } __inline float xasinf(float d) { @@ -1175,7 +1171,7 @@ __inline float xasinf(float d) { } __inline float xacosf(float d) { - return mulsignf(atan2kf(sqrtf((1.0f+d)*(1.0f-d)), fabsf(d)), d) + (d < 0 ? (float)M_PI : 0.0f); + return mulsignf(atan2kf(sqrtf((1.0f+d)*(1.0f-d)), fabsf(d)), d) + (d < 0 ? (float)rtengine::RT_PI : 0.0f); } __inline float xlogf(float d) { @@ -1196,9 +1192,9 @@ __inline float xlogf(float d) { x = x * t + 0.693147180559945286226764f * e; - if (xisinff(d)) x = INFINITYf; - if (d < 0) x = NANf; - if (d == 0) x = -INFINITYf; + if (xisinff(d)) x = rtengine::RT_INFINITY_F; + if (d < 0) x = rtengine::RT_NAN_F; + if (d == 0) x = -rtengine::RT_INFINITY_F; return x; } diff --git a/rtengine/sleefsseavx.c b/rtengine/sleefsseavx.c index a55fcf897..e4f587464 100644 --- a/rtengine/sleefsseavx.c +++ b/rtengine/sleefsseavx.c @@ -12,10 +12,11 @@ #define SLEEFSSEAVX #include -#include +//#include //#include //#include //#include "sleefsseavx.h" +#include "rt_math.h" #ifdef __SSE2__ #include "helpersse2.h" @@ -51,8 +52,8 @@ #define L2Lf 1.428606765330187045e-06f #define R_LN2f 1.442695040888963407359924681001892137426645954152985934135449406931f -#define INFINITYf ((float)INFINITY) -#define NANf ((float)NAN) +#define INFINITYf ((float)rtengine::RT_INFINITY) +#define NANf ((float)rtengine::RT_NAN) // @@ -259,7 +260,7 @@ static INLINE vdouble xldexp(vdouble x, vint q) { return vldexp(x, q); } static INLINE vint xilogb(vdouble d) { vdouble e = vcast_vd_vi(vsubi(vilogbp1(vabs(d)), vcast_vi_i(1))); e = vsel(vmask_eq(d, vcast_vd_d(0)), vcast_vd_d(-2147483648.0), e); - e = vsel(vmask_eq(vabs(d), vcast_vd_d(INFINITY)), vcast_vd_d(2147483647), e); + e = vsel(vmask_eq(vabs(d), vcast_vd_d(rtengine::RT_INFINITY)), vcast_vd_d(2147483647), e); return vrint_vi_vd(e); } @@ -267,7 +268,7 @@ static INLINE vdouble xsin(vdouble d) { vint q; vdouble u, s; - q = vrint_vi_vd(vmul(d, vcast_vd_d(M_1_PI))); + q = vrint_vi_vd(vmul(d, vcast_vd_d(rtengine::RT_1_PI))); u = vcast_vd_vi(q); d = vadd(d, vmul(u, vcast_vd_d(-PI4_A*4))); @@ -297,7 +298,7 @@ static INLINE vdouble xcos(vdouble d) { vint q; vdouble u, s; - q = vrint_vi_vd(vsub(vmul(d, vcast_vd_d(M_1_PI)), vcast_vd_d(0.5))); + q = vrint_vi_vd(vsub(vmul(d, vcast_vd_d(rtengine::RT_1_PI)), vcast_vd_d(0.5))); q = vaddi(vaddi(q, q), vcast_vi_i(1)); u = vcast_vd_vi(q); @@ -330,7 +331,7 @@ static INLINE vdouble2 xsincos(vdouble d) { vdouble u, s, t, rx, ry; vdouble2 r; - q = vrint_vi_vd(vmul(d, vcast_vd_d(M_2_PI))); + q = vrint_vi_vd(vmul(d, vcast_vd_d(rtengine::RT_2_PI))); s = d; @@ -374,8 +375,8 @@ static INLINE vdouble2 xsincos(vdouble d) { r.y = vreinterpret_vd_vm(vxorm(vandm(m, vreinterpret_vm_vd(vcast_vd_d(-0.0))), vreinterpret_vm_vd(r.y))); m = vmask_isinf(d); - r.x = vsel(m, vcast_vd_d(NAN), r.x); - r.y = vsel(m, vcast_vd_d(NAN), r.y); + r.x = vsel(m, vcast_vd_d(rtengine::RT_NAN), r.x); + r.y = vsel(m, vcast_vd_d(rtengine::RT_NAN), r.y); return r; } @@ -385,7 +386,7 @@ static INLINE vdouble xtan(vdouble d) { vdouble u, s, x; vmask m; - q = vrint_vi_vd(vmul(d, vcast_vd_d(M_2_PI))); + q = vrint_vi_vd(vmul(d, vcast_vd_d(rtengine::RT_2_PI))); u = vcast_vd_vi(q); x = vadd(d, vmul(u, vcast_vd_d(-PI4_A*2))); @@ -417,7 +418,7 @@ static INLINE vdouble xtan(vdouble d) { u = vsel(m, vrec(u), u); - u = vsel(vmask_isinf(d), vcast_vd_d(NAN), u); + u = vsel(vmask_isinf(d), vcast_vd_d(rtengine::RT_NAN), u); return u; } @@ -459,7 +460,7 @@ static INLINE vdouble atan2k(vdouble y, vdouble x) { u = vmla(u, t, vcast_vd_d(-0.333333333333311110369124)); t = vadd(s, vmul(s, vmul(t, u))); - t = vadd(t, vmul(vcast_vd_vi(q), vcast_vd_d(M_PI/2))); + t = vadd(t, vmul(vcast_vd_vi(q), vcast_vd_d(rtengine::RT_PI/2))); return t; } @@ -468,11 +469,11 @@ static INLINE vdouble xatan2(vdouble y, vdouble x) { vdouble r = atan2k(vabs(y), x); r = vmulsign(r, x); - r = vsel(vorm(vmask_isinf(x), vmask_eq(x, vcast_vd_d(0))), vsub(vcast_vd_d(M_PI/2), visinf2(x, vmulsign(vcast_vd_d(M_PI/2), x))), r); - r = vsel(vmask_isinf(y), vsub(vcast_vd_d(M_PI/2), visinf2(x, vmulsign(vcast_vd_d(M_PI/4), x))), r); - r = vsel(vmask_eq(y, vcast_vd_d(0)), vsel(vmask_eq(vsign(x), vcast_vd_d(-1.0)), vcast_vd_d(M_PI), vcast_vd_d(0)), r); + r = vsel(vorm(vmask_isinf(x), vmask_eq(x, vcast_vd_d(0))), vsub(vcast_vd_d(rtengine::RT_PI/2), visinf2(x, vmulsign(vcast_vd_d(rtengine::RT_PI/2), x))), r); + r = vsel(vmask_isinf(y), vsub(vcast_vd_d(rtengine::RT_PI/2), visinf2(x, vmulsign(vcast_vd_d(rtengine::RT_PI/4), x))), r); + r = vsel(vmask_eq(y, vcast_vd_d(0)), vsel(vmask_eq(vsign(x), vcast_vd_d(-1.0)), vcast_vd_d(rtengine::RT_PI), vcast_vd_d(0)), r); - return vsel(vorm(vmask_isnan(x), vmask_isnan(y)), vcast_vd_d(NAN), vmulsign(r, y)); + return vsel(vorm(vmask_isnan(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_NAN), vmulsign(r, y)); } static INLINE vdouble xasin(vdouble d) { @@ -481,7 +482,7 @@ static INLINE vdouble xasin(vdouble d) { y = vsub(vcast_vd_d(1), d); x = vmul(x, y); x = vsqrt(x); - x = vsel(vmask_isnan(x), vcast_vd_d(NAN), atan2k(vabs(d), x)); + x = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), atan2k(vabs(d), x)); return vmulsign(x, d); } @@ -492,7 +493,7 @@ static INLINE vdouble xacos(vdouble d) { x = vmul(x, y); x = vsqrt(x); x = vmulsign(atan2k(x, vabs(d)), d); - y = (vdouble)vandm(vmask_lt(d, vcast_vd_d(0)), (vmask)vcast_vd_d(M_PI)); + y = (vdouble)vandm(vmask_lt(d, vcast_vd_d(0)), (vmask)vcast_vd_d(rtengine::RT_PI)); x = vadd(x, y); return x; } @@ -531,7 +532,7 @@ static INLINE vdouble xatan(vdouble s) { t = vadd(s, vmul(s, vmul(t, u))); - t = vsel(vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(1)), vsub(vcast_vd_d(M_PI/2), t), t); + t = vsel(vmaski_eq(vandi(q, vcast_vi_i(1)), vcast_vi_i(1)), vsub(vcast_vd_d(rtengine::RT_PI/2), t), t); t = vsel(vmaski_eq(vandi(q, vcast_vi_i(2)), vcast_vi_i(2)), vneg(t), t); return t; @@ -559,9 +560,9 @@ static INLINE vdouble xlog(vdouble d) { x = vadd(vmul(x, t), vmul(vcast_vd_d(0.693147180559945286226764), vcast_vd_vi(e))); - x = vsel(vmask_ispinf(d), vcast_vd_d(INFINITY), x); - x = vsel(vmask_gt(vcast_vd_d(0), d), vcast_vd_d(NAN), x); - x = vsel(vmask_eq(d, vcast_vd_d(0)), vcast_vd_d(-INFINITY), x); + x = vsel(vmask_ispinf(d), vcast_vd_d(rtengine::RT_INFINITY), x); + x = vsel(vmask_gt(vcast_vd_d(0), d), vcast_vd_d(rtengine::RT_NAN), x); + x = vsel(vmask_eq(d, vcast_vd_d(0)), vcast_vd_d(-rtengine::RT_INFINITY), x); return x; } @@ -659,7 +660,7 @@ static INLINE vdouble xpow(vdouble x, vdouble y) { vdouble result = expk(mul_ds(logk(vabs(x)), y)); - //result = vsel(vmask_isnan(result), vcast_vd_d(INFINITY), result); + //result = vsel(vmask_isnan(result), vcast_vd_d(rtengine::RT_INFINITY), result); result = vmul(result, vsel(vmask_gt(x, vcast_vd_d(0)), @@ -668,7 +669,7 @@ static INLINE vdouble xpow(vdouble x, vdouble y) { vsel(yisodd, vcast_vd_d(-1), vcast_vd_d(1)), - vcast_vd_d(NAN)))); + vcast_vd_d(rtengine::RT_NAN)))); vdouble efx = vreinterpret_vd_vm(vxorm(vreinterpret_vm_vd(vsub(vabs(x), vcast_vd_d(1))), vsignbit(y))); @@ -677,17 +678,17 @@ static INLINE vdouble xpow(vdouble x, vdouble y) { vcast_vd_d(0), vsel(vmask_eq(efx, vcast_vd_d(0)), vcast_vd_d(1.0), - vcast_vd_d(INFINITY))), + vcast_vd_d(rtengine::RT_INFINITY))), result); result = vsel(vorm(vmask_isinf(x), vmask_eq(x, vcast_vd_d(0))), vmul(vsel(yisodd, vsign(x), vcast_vd_d(1)), vsel(vmask_lt(vsel(vmask_eq(x, vcast_vd_d(0)), vneg(y), y), vcast_vd_d(0)), vcast_vd_d(0), - vcast_vd_d(INFINITY))), + vcast_vd_d(rtengine::RT_INFINITY))), result); - result = vsel(vorm(vmask_isnan(x), vmask_isnan(y)), vcast_vd_d(NAN), result); + result = vsel(vorm(vmask_isnan(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_NAN), result); result = vsel(vorm(vmask_eq(y, vcast_vd_d(0)), vmask_eq(x, vcast_vd_d(1))), vcast_vd_d(1), result); @@ -733,9 +734,9 @@ static INLINE vdouble xsinh(vdouble x) { d = add2_dd(d, div_dd(dd(vcast_vd_d(-1), vcast_vd_d(0)), d)); y = vmul(vadd(d.x, d.y), vcast_vd_d(0.5)); - y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(INFINITY), y); + y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_INFINITY), y); y = vmulsign(y, x); - y = vsel(vmask_isnan(x), vcast_vd_d(NAN), y); + y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y); return y; } @@ -745,8 +746,8 @@ static INLINE vdouble xcosh(vdouble x) { d = add2_dd(d, div_dd(dd(vcast_vd_d(1), vcast_vd_d(0)), d)); vdouble y = vmul(vadd(d.x, d.y), vcast_vd_d(0.5)); - y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(INFINITY), y); - y = vsel(vmask_isnan(x), vcast_vd_d(NAN), y); + y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_INFINITY), y); + y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y); return y; } @@ -760,7 +761,7 @@ static INLINE vdouble xtanh(vdouble x) { y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(1.0), y); y = vmulsign(y, x); - y = vsel(vmask_isnan(x), vcast_vd_d(NAN), y); + y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y); return y; } @@ -797,9 +798,9 @@ static INLINE vdouble xasinh(vdouble x) { vdouble2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(y, y), vcast_vd_d(1))), y)); y = vadd(d.x, d.y); - y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(INFINITY), y); + y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_INFINITY), y); y = vmulsign(y, x); - y = vsel(vmask_isnan(x), vcast_vd_d(NAN), y); + y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y); return y; } @@ -808,10 +809,10 @@ static INLINE vdouble xacosh(vdouble x) { vdouble2 d = logk2(add2_ds(sqrt_d(add2_ds(mul_ss(x, x), vcast_vd_d(-1))), x)); vdouble y = vadd(d.x, d.y); - y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(INFINITY), y); + y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_INFINITY), y); y = vsel(vmask_eq(x, vcast_vd_d(1.0)), vcast_vd_d(0.0), y); - y = vsel(vmask_lt(x, vcast_vd_d(1.0)), vcast_vd_d(NAN), y); - y = vsel(vmask_isnan(x), vcast_vd_d(NAN), y); + y = vsel(vmask_lt(x, vcast_vd_d(1.0)), vcast_vd_d(rtengine::RT_NAN), y); + y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y); return y; } @@ -819,11 +820,11 @@ static INLINE vdouble xacosh(vdouble x) { static INLINE vdouble xatanh(vdouble x) { vdouble y = vabs(x); vdouble2 d = logk2(div_dd(add2_ss(vcast_vd_d(1), y), add2_ss(vcast_vd_d(1), -y))); - y = vsel(vmask_gt(y, vcast_vd_d(1.0)), vcast_vd_d(NAN), vsel(vmask_eq(y, vcast_vd_d(1.0)), vcast_vd_d(INFINITY), vmul(vadd(d.x, d.y), vcast_vd_d(0.5)))); + y = vsel(vmask_gt(y, vcast_vd_d(1.0)), vcast_vd_d(rtengine::RT_NAN), vsel(vmask_eq(y, vcast_vd_d(1.0)), vcast_vd_d(rtengine::RT_INFINITY), vmul(vadd(d.x, d.y), vcast_vd_d(0.5)))); - y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(NAN), y); + y = vsel(vorm(vmask_isinf(x), vmask_isnan(y)), vcast_vd_d(rtengine::RT_NAN), y); y = vmulsign(y, x); - y = vsel(vmask_isnan(x), vcast_vd_d(NAN), y); + y = vsel(vmask_isnan(x), vcast_vd_d(rtengine::RT_NAN), y); return y; } @@ -864,14 +865,14 @@ static INLINE vdouble xcbrt(vdouble d) { static INLINE vdouble xexp2(vdouble a) { vdouble u = expk(mul_ds(dd(vcast_vd_d(0.69314718055994528623), vcast_vd_d(2.3190468138462995584e-17)), a)); - u = vsel(vmask_ispinf(a), vcast_vd_d(INFINITY), u); + u = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), u); u = vsel(vmask_isminf(a), vcast_vd_d(0), u); return u; } static INLINE vdouble xexp10(vdouble a) { vdouble u = expk(mul_ds(dd(vcast_vd_d(2.3025850929940459011), vcast_vd_d(-2.1707562233822493508e-16)), a)); - u = vsel(vmask_ispinf(a), vcast_vd_d(INFINITY), u); + u = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), u); u = vsel(vmask_isminf(a), vcast_vd_d(0), u); return u; } @@ -879,7 +880,7 @@ static INLINE vdouble xexp10(vdouble a) { static INLINE vdouble xexpm1(vdouble a) { vdouble2 d = add2_ds(expk2(dd(a, vcast_vd_d(0))), vcast_vd_d(-1.0)); vdouble x = d.x + d.y; - x = vsel(vmask_ispinf(a), vcast_vd_d(INFINITY), x); + x = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), x); x = vsel(vmask_isminf(a), vcast_vd_d(-1), x); return x; } @@ -888,9 +889,9 @@ static INLINE vdouble xlog10(vdouble a) { vdouble2 d = mul_dd(logk(a), dd(vcast_vd_d(0.43429448190325176116), vcast_vd_d(6.6494347733425473126e-17))); vdouble x = d.x + d.y; - x = vsel(vmask_ispinf(a), vcast_vd_d(INFINITY), x); - x = vsel(vmask_gt(vcast_vd_d(0), a), vcast_vd_d(NAN), x); - x = vsel(vmask_eq(a, vcast_vd_d(0)), vcast_vd_d(-INFINITY), x); + x = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), x); + x = vsel(vmask_gt(vcast_vd_d(0), a), vcast_vd_d(rtengine::RT_NAN), x); + x = vsel(vmask_eq(a, vcast_vd_d(0)), vcast_vd_d(-rtengine::RT_INFINITY), x); return x; } @@ -899,9 +900,9 @@ static INLINE vdouble xlog1p(vdouble a) { vdouble2 d = logk2(add2_ss(a, vcast_vd_d(1))); vdouble x = d.x + d.y; - x = vsel(vmask_ispinf(a), vcast_vd_d(INFINITY), x); - x = vsel(vmask_gt(vcast_vd_d(-1), a), vcast_vd_d(NAN), x); - x = vsel(vmask_eq(a, vcast_vd_d(-1)), vcast_vd_d(-INFINITY), x); + x = vsel(vmask_ispinf(a), vcast_vd_d(rtengine::RT_INFINITY), x); + x = vsel(vmask_gt(vcast_vd_d(-1), a), vcast_vd_d(rtengine::RT_NAN), x); + x = vsel(vmask_eq(a, vcast_vd_d(-1)), vcast_vd_d(-rtengine::RT_INFINITY), x); return x; } @@ -1005,7 +1006,7 @@ static INLINE vfloat xsinf(vfloat d) { vint2 q; vfloat u, s; - q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)M_1_PI))); + q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)rtengine::RT_1_PI))); u = vcast_vf_vi2(q); d = vmlaf(u, vcast_vf_f(-PI4_Af*4), d); @@ -1031,7 +1032,7 @@ static INLINE vfloat xcosf(vfloat d) { vint2 q; vfloat u, s; - q = vrint_vi2_vf(vsubf(vmulf(d, vcast_vf_f((float)M_1_PI)), vcast_vf_f(0.5f))); + q = vrint_vi2_vf(vsubf(vmulf(d, vcast_vf_f((float)rtengine::RT_1_PI)), vcast_vf_f(0.5f))); q = vaddi2(vaddi2(q, q), vcast_vi2_i(1)); u = vcast_vf_vi2(q); @@ -1060,7 +1061,7 @@ static INLINE vfloat2 xsincosf(vfloat d) { vfloat u, s, t, rx, ry; vfloat2 r; - q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)M_2_PI))); + q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)rtengine::RT_2_PI))); s = d; @@ -1100,8 +1101,8 @@ static INLINE vfloat2 xsincosf(vfloat d) { r.y = vreinterpret_vf_vm(vxorm(vandm(m, vreinterpret_vm_vf(vcast_vf_f(-0.0))), vreinterpret_vm_vf(r.y))); m = vmaskf_isinf(d); - r.x = vself(m, vcast_vf_f(NAN), r.x); - r.y = vself(m, vcast_vf_f(NAN), r.y); + r.x = vself(m, vcast_vf_f(rtengine::RT_NAN), r.x); + r.y = vself(m, vcast_vf_f(rtengine::RT_NAN), r.y); return r; } @@ -1111,7 +1112,7 @@ static INLINE vfloat xtanf(vfloat d) { vmask m; vfloat u, s, x; - q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)(2 * M_1_PI)))); + q = vrint_vi2_vf(vmulf(d, vcast_vf_f((float)(2 * rtengine::RT_1_PI)))); x = d; @@ -1165,7 +1166,7 @@ static INLINE vfloat xatanf(vfloat s) { t = vaddf(s, vmulf(s, vmulf(t, u))); - t = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(1)), vsubf(vcast_vf_f((float)(M_PI/2)), t), t); + t = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(1)), vcast_vi2_i(1)), vsubf(vcast_vf_f((float)(rtengine::RT_PI/2)), t), t); t = vself(vmaski2_eq(vandi2(q, vcast_vi2_i(2)), vcast_vi2_i(2)), vnegf(t), t); return t; @@ -1197,7 +1198,7 @@ static INLINE vfloat atan2kf(vfloat y, vfloat x) { u = vmlaf(u, t, vcast_vf_f(-0.333331018686294555664062f)); t = vaddf(s, vmulf(s, vmulf(t, u))); - t = vaddf(t, vmulf(vcast_vf_vi2(q), vcast_vf_f((float)(M_PI/2)))); + t = vaddf(t, vmulf(vcast_vf_vi2(q), vcast_vf_f((float)(rtengine::RT_PI/2)))); return t; } @@ -1206,9 +1207,9 @@ static INLINE vfloat xatan2f(vfloat y, vfloat x) { vfloat r = atan2kf(vabsf(y), x); r = vmulsignf(r, x); - r = vself(vorm(vmaskf_isinf(x), vmaskf_eq(x, vcast_vf_f(0.0f))), vsubf(vcast_vf_f((float)(M_PI/2)), visinf2f(x, vmulsignf(vcast_vf_f((float)(M_PI/2)), x))), r); - r = vself(vmaskf_isinf(y), vsubf(vcast_vf_f((float)(M_PI/2)), visinf2f(x, vmulsignf(vcast_vf_f((float)(M_PI/4)), x))), r); - r = vself(vmaskf_eq(y, vcast_vf_f(0.0f)), vselfzero(vmaskf_eq(vsignf(x), vcast_vf_f(-1.0f)), vcast_vf_f((float)M_PI)), r); + r = vself(vorm(vmaskf_isinf(x), vmaskf_eq(x, vcast_vf_f(0.0f))), vsubf(vcast_vf_f((float)(rtengine::RT_PI/2)), visinf2f(x, vmulsignf(vcast_vf_f((float)(rtengine::RT_PI/2)), x))), r); + r = vself(vmaskf_isinf(y), vsubf(vcast_vf_f((float)(rtengine::RT_PI/2)), visinf2f(x, vmulsignf(vcast_vf_f((float)(rtengine::RT_PI/4)), x))), r); + r = vself(vmaskf_eq(y, vcast_vf_f(0.0f)), vselfzero(vmaskf_eq(vsignf(x), vcast_vf_f(-1.0f)), vcast_vf_f((float)rtengine::RT_PI)), r); return vself(vorm(vmaskf_isnan(x), vmaskf_isnan(y)), vcast_vf_f(NANf), vmulsignf(r, y)); } @@ -1230,7 +1231,7 @@ static INLINE vfloat xacosf(vfloat d) { x = vmulf(x, y); x = vsqrtf(x); x = vmulsignf(atan2kf(x, vabsf(d)), d); - y = (vfloat)vandm(vmaskf_lt(d, vcast_vf_f(0.0f)), (vmask)vcast_vf_f((float)M_PI)); + y = (vfloat)vandm(vmaskf_lt(d, vcast_vf_f(0.0f)), (vmask)vcast_vf_f((float)rtengine::RT_PI)); x = vaddf(x, y); return x; } diff --git a/rtengine/spot.cc b/rtengine/spot.cc index b37c1d62c..87f174e72 100644 --- a/rtengine/spot.cc +++ b/rtengine/spot.cc @@ -62,22 +62,22 @@ void ImProcFunctions::removeSpots (Imagefloat* img, const std::vector //float radius = float (entry.radius) + 0.5f; float featherRadius = entry.radius * (1.f + entry.feather); - int scaledFeatherRadius = featherRadius / pp.skip; + int scaledFeatherRadius = featherRadius / pp.getSkip (); - int src_XMin = int ((srcX - featherRadius - pp.x) / float (pp.skip) + 0.5f); - int src_XMax = int ((srcX + featherRadius - pp.x) / float (pp.skip) + 0.5f); - int src_YMin = int ((srcY - featherRadius - pp.y) / float (pp.skip) + 0.5f); - int src_YMax = int ((srcY + featherRadius - pp.y) / float (pp.skip) + 0.5f); + int src_XMin = int ((srcX - featherRadius - pp.getX()) / float (pp.getSkip()) + 0.5f); + int src_XMax = int ((srcX + featherRadius - pp.getX()) / float (pp.getSkip()) + 0.5f); + int src_YMin = int ((srcY - featherRadius - pp.getY()) / float (pp.getSkip()) + 0.5f); + int src_YMax = int ((srcY + featherRadius - pp.getY()) / float (pp.getSkip()) + 0.5f); - int dst_XMin = int ((dstX - featherRadius - pp.x) / float (pp.skip) + 0.5f); - int dst_XMax = int ((dstX + featherRadius - pp.x) / float (pp.skip) + 0.5f); - int dst_YMin = int ((dstY - featherRadius - pp.y) / float (pp.skip) + 0.5f); - int dst_YMax = int ((dstY + featherRadius - pp.y) / float (pp.skip) + 0.5f); + int dst_XMin = int ((dstX - featherRadius - pp.getX()) / float (pp.getSkip()) + 0.5f); + int dst_XMax = int ((dstX + featherRadius - pp.getX()) / float (pp.getSkip()) + 0.5f); + int dst_YMin = int ((dstY - featherRadius - pp.getY()) / float (pp.getSkip()) + 0.5f); + int dst_YMax = int ((dstY + featherRadius - pp.getY()) / float (pp.getSkip()) + 0.5f); //printf(" -> X: %04d > %04d\n -> Y: %04d > %04d\n", dst_XMin, dst_XMax, dst_YMin, dst_YMax); // scaled spot is too small, we do not preview it - if (scaledFeatherRadius < 2 && pp.skip != 1) { + if (scaledFeatherRadius < 2 && pp.getSkip() != 1) { #ifndef NDEBUG if (options.rtSettings.verbose) { printf ("Skipping spot located at %d x %d, too small for the preview zoom rate\n", entry.sourcePos.x, entry.sourcePos.y); @@ -97,24 +97,24 @@ void ImProcFunctions::removeSpots (Imagefloat* img, const std::vector } // skipping entries where the source circle isn't completely inside the image bounds - if (src_XMin < 0 || src_XMax >= img->width || src_YMin < 0 || src_YMax >= img->height) { + if (src_XMin < 0 || src_XMax >= img->getWidth() || src_YMin < 0 || src_YMax >= img->getHeight()) { #ifndef NDEBUG if (options.rtSettings.verbose) { printf ("Skipping spot located at %d x %d, from the data at %d x %d, radius=%d, feather=%.3f, opacity=%.3f: source out of bounds\n", entry.sourcePos.x, entry.sourcePos.y, entry.targetPos.x, entry.targetPos.y, entry.radius, entry.feather, entry.opacity); printf ("%d < 0 || %d >= %d || %d < 0 || %d >= %d\n", - src_XMin, src_XMax, img->width, src_YMin, src_YMax, img->height); + src_XMin, src_XMax, img->getWidth(), src_YMin, src_YMax, img->getHeight()); } #endif continue; } // skipping entries where the dest circle is completely outside the image bounds - if (dst_XMin >= img->width || dst_XMax <= 0 || dst_YMin >= img->height || dst_YMax <= 0) { + if (dst_XMin >= img->getWidth() || dst_XMax <= 0 || dst_YMin >= img->getHeight() || dst_YMax <= 0) { #ifndef NDEBUG if (options.rtSettings.verbose) { printf ("Skipping spot located at %d x %d, from the data at %d x %d, radius=%d, feather=%.3f, opacity=%.3f: source out of bounds\n", entry.sourcePos.x, entry.sourcePos.y, entry.targetPos.x, entry.targetPos.y, entry.radius, entry.feather, entry.opacity); printf ("%d >= %d || %d <= 0 || %d >= %d || %d <= 0\n", - dst_XMin, img->width, dst_XMax, dst_YMin, img->height, dst_YMax); + dst_XMin, img->getWidth(), dst_XMax, dst_YMin, img->getHeight(), dst_YMax); } #endif continue; @@ -123,10 +123,10 @@ void ImProcFunctions::removeSpots (Imagefloat* img, const std::vector // ----------------- Core function ----------------- #if 0 - int scaledPPX = pp.x / pp.skip; - int scaledPPY = pp.y / pp.skip; - int scaledPPW = pp.w / pp.skip + (pp.w % pp.skip > 0); - int scaledPPH = pp.h / pp.skip + (pp.h % pp.skip > 0); + int scaledPPX = pp.getX() / pp.skip; + int scaledPPY = pp.getY() / pp.skip; + int scaledPPW = pp.getWidth() / pp.skip + (pp.getWidth() % pp.getSkip() > 0); + int scaledPPH = pp.getHeight() / pp.skip + (pp.getHeight() % pp.skip > 0); int sizeX = dst_XMax - dst_XMin + 1; int sizeY = dst_YMax - dst_YMin + 1; @@ -340,11 +340,11 @@ void ImProcFunctions::removeSpots (Imagefloat* img, const std::vector // add solution to original image and store in tempPR for (int i = 0, i2 = dst_YMin; i2 < dst_YMax - 1; ++i, ++i2) { - if (i2 < 0 || i2 >= img->height) { + if (i2 < 0 || i2 >= img->getHeight()) { continue; } for (int j = 0, j2 = dst_XMin; j2 < dst_XMax - 1; ++j, ++j2) { - if (j2 < 0 || j2 >= img->width) { + if (j2 < 0 || j2 >= img->getWidth()) { continue; } //float c2 = float (mask (i, j)) / 255.f; diff --git a/rtengine/stdimagesource.cc b/rtengine/stdimagesource.cc index 6017a1ca6..87f25a497 100644 --- a/rtengine/stdimagesource.cc +++ b/rtengine/stdimagesource.cc @@ -74,27 +74,19 @@ void StdImageSource::getSampleFormat (const Glib::ustring &fname, IIOSampleForma sFormat = IIOSF_UNKNOWN; sArrangement = IIOSA_UNKNOWN; - size_t lastdot = fname.find_last_of ('.'); - - if( Glib::ustring::npos == lastdot ) { - return; - } - - if (!fname.casefold().compare (lastdot, 4, ".jpg") || - !fname.casefold().compare (lastdot, 5, ".jpeg")) { + if (hasJpegExtension(fname)) { // For now, png and jpeg files are converted to unsigned short by the loader itself, // but there should be functions that read the sample format first, like the TIFF case below sFormat = IIOSF_UNSIGNED_CHAR; sArrangement = IIOSA_CHUNKY; return; - } else if (!fname.casefold().compare (lastdot, 4, ".png")) { + } else if (hasPngExtension(fname)) { int result = ImageIO::getPNGSampleFormat (fname, sFormat, sArrangement); if (result == IMIO_SUCCESS) { return; } - } else if (!fname.casefold().compare (lastdot, 4, ".tif") || - !fname.casefold().compare (lastdot, 5, ".tiff")) { + } else if (hasTiffExtension(fname)) { int result = ImageIO::getTIFFSampleFormat (fname, sFormat, sArrangement); if (result == IMIO_SUCCESS) { @@ -110,7 +102,7 @@ void StdImageSource::getSampleFormat (const Glib::ustring &fname, IIOSampleForma * and RT's image data type (Image8, Image16 and Imagefloat), then it will * load the image into it */ -int StdImageSource::load (const Glib::ustring &fname, bool batch) +int StdImageSource::load (const Glib::ustring &fname, int imageNum, bool batch) { fileName = fname; @@ -125,22 +117,19 @@ int StdImageSource::load (const Glib::ustring &fname, bool batch) switch (sFormat) { case (IIOSF_UNSIGNED_CHAR): { - Image8 *img_8 = new Image8 (); - img = img_8; + img = new Image8; break; } case (IIOSF_UNSIGNED_SHORT): { - Image16 *img_16 = new Image16 (); - img = img_16; + img = new Image16; break; } case (IIOSF_LOGLUV24): case (IIOSF_LOGLUV32): case (IIOSF_FLOAT): { - Imagefloat *img_float = new Imagefloat (); - img = img_float; + img = new Imagefloat; break; } @@ -229,7 +218,7 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement bool skipTransform = false; cmsHPROFILE in = nullptr; - cmsHPROFILE out = iccStore->workingSpace (cmp.working); + cmsHPROFILE out = ICCStore::getInstance()->workingSpace (cmp.working); if (cmp.input == "(embedded)" || cmp.input == "" || cmp.input == "(camera)" || cmp.input == "(cameraICC)") { if (embedded) { @@ -238,12 +227,12 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { skipTransform = true; } else { - in = iccStore->getsRGBProfile (); + in = ICCStore::getInstance()->getsRGBProfile (); } } } else { if (cmp.input != "(none)") { - in = iccStore->getProfile (cmp.input); + in = ICCStore::getInstance()->getProfile (cmp.input); if (in == nullptr && embedded) { in = embedded; @@ -251,7 +240,7 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement if (sampleFormat & (IIOSF_LOGLUV24 | IIOSF_LOGLUV32 | IIOSF_FLOAT)) { skipTransform = true; } else { - in = iccStore->getsRGBProfile (); + in = ICCStore::getInstance()->getsRGBProfile (); } } } @@ -260,7 +249,7 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement if (!skipTransform && in) { if(in == embedded && cmsGetColorSpace(in) != cmsSigRgbData) { // if embedded profile is not an RGB profile, use sRGB printf("embedded profile is not an RGB profile, using sRGB as input profile\n"); - in = iccStore->getsRGBProfile (); + in = ICCStore::getInstance()->getsRGBProfile (); } lcmsMutex->lock (); @@ -287,20 +276,19 @@ void StdImageSource::colorSpaceConversion (Imagefloat* im, const ColorManagement void StdImageSource::getFullSize (int& w, int& h, int tr) { - w = img->width; - h = img->height; + w = img->getWidth(); + h = img->getHeight(); if ((tr & TR_ROT) == TR_R90 || (tr & TR_ROT) == TR_R270) { - w = img->height; - h = img->width; + w = img->getHeight(); + h = img->getWidth(); } } -void StdImageSource::getSize (PreviewProps pp, int& w, int& h) +void StdImageSource::getSize (const PreviewProps &pp, int& w, int& h) { - - w = pp.w / pp.skip + (pp.w % pp.skip > 0); - h = pp.h / pp.skip + (pp.h % pp.skip > 0); + w = pp.getWidth() / pp.getSkip() + (pp.getWidth() % pp.getSkip() > 0); + h = pp.getHeight() / pp.getSkip() + (pp.getHeight() % pp.getSkip() > 0); } void StdImageSource::getAutoExpHistogram (LUTu & histogram, int& histcompr) diff --git a/rtengine/stdimagesource.h b/rtengine/stdimagesource.h index 0ef487a75..330c08244 100644 --- a/rtengine/stdimagesource.h +++ b/rtengine/stdimagesource.h @@ -42,7 +42,7 @@ public: StdImageSource (); ~StdImageSource (); - int load (const Glib::ustring &fname, bool batch = false); + int load (const Glib::ustring &fname, int imageNum = 0, bool batch = false); void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const ColorManagementParams &cmp, const RAWParams &raw); ColorTemp getWB () const { @@ -51,6 +51,8 @@ public: void getAutoWBMultipliers (double &rm, double &gm, double &bm); ColorTemp getSpotWB (std::vector &red, std::vector &green, std::vector &blue, int tran, double equal); + eSensorType getSensorType() const {return ST_NONE;} + bool isWBProviderReady () { return true; @@ -64,7 +66,7 @@ public: } void getFullSize (int& w, int& h, int tr = TR_NONE); - void getSize (PreviewProps pp, int& w, int& h); + void getSize (const PreviewProps &pp, int& w, int& h); ImageData* getImageData () { @@ -95,6 +97,13 @@ public: { return rgbSourceModified; } + void setCurrentFrame(unsigned int frameNum) {} + int getFrameCount() {return 1;} + + + void getRawValues(int x, int y, int rotate, int &R, int &G, int &B) { R = G = B = 0;} + + }; } #endif diff --git a/rtengine/utils.cc b/rtengine/utils.cc index b862e290f..4ab5bc1b8 100644 --- a/rtengine/utils.cc +++ b/rtengine/utils.cc @@ -29,7 +29,7 @@ using namespace std; namespace rtengine { -void poke255_uc(unsigned char* &dest, unsigned char r, unsigned char g, unsigned char b) +void poke255_uc(unsigned char*& dest, unsigned char r, unsigned char g, unsigned char b) { #if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ *(dest++) = b; @@ -44,7 +44,7 @@ void poke255_uc(unsigned char* &dest, unsigned char r, unsigned char g, unsigned #endif } -void poke01_d(unsigned char* &dest, double r, double g, double b) +void poke01_d(unsigned char*& dest, double r, double g, double b) { #if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ *(dest++) = (unsigned char)(b * 255.); @@ -59,7 +59,7 @@ void poke01_d(unsigned char* &dest, double r, double g, double b) #endif } -void poke01_f(unsigned char* &dest, float r, float g, float b) +void poke01_f(unsigned char*& dest, float r, float g, float b) { #if __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ *(dest++) = (unsigned char)(b * 255.f); @@ -74,9 +74,8 @@ void poke01_f(unsigned char* &dest, float r, float g, float b) #endif } -void bilinearInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh) +void bilinearInterp(const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh) { - int ix = 0; for (int i = 0; i < dh; i++) { @@ -132,9 +131,8 @@ void bilinearInterp (const unsigned char* src, int sw, int sh, unsigned char* ds } } -void nearestInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh) +void nearestInterp(const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh) { - int ix = 0; for (int i = 0; i < dh; i++) { @@ -150,9 +148,8 @@ void nearestInterp (const unsigned char* src, int sw, int sh, unsigned char* dst } } -void rotate (unsigned char* img, int& w, int& h, int deg) +void rotate(unsigned char* img, int& w, int& h, int deg) { - if (deg == 0) { return; } @@ -186,44 +183,85 @@ void rotate (unsigned char* img, int& w, int& h, int deg) rotated[3 * (w * (h - i - 1) + w - j - 1) + 2] = img[ix++]; } - memcpy (img, rotated, 3 * w * h); - delete [] rotated; + memcpy(img, rotated, 3 * w * h); + delete[] rotated; } -void hflip (unsigned char* img, int w, int h) +void hflip(unsigned char* img, int w, int h) { + if(w > 0 && h > 0) { + unsigned char* flipped = new unsigned char[3 * w * h]; + int ix = 0; - unsigned char* flipped = new unsigned char[3 * w * h]; - int ix = 0; + for (int i = 0; i < h; i++) + for (int j = 0; j < w; j++) { + flipped[3 * (w * i + w - 1 - j) + 0] = img[ix++]; + flipped[3 * (w * i + w - 1 - j) + 1] = img[ix++]; + flipped[3 * (w * i + w - 1 - j) + 2] = img[ix++]; + } - for (int i = 0; i < h; i++) - for (int j = 0; j < w; j++) { - flipped[3 * (w * i + w - 1 - j) + 0] = img[ix++]; - flipped[3 * (w * i + w - 1 - j) + 1] = img[ix++]; - flipped[3 * (w * i + w - 1 - j) + 2] = img[ix++]; - } - - memcpy (img, flipped, 3 * w * h); - delete [] flipped; + memcpy(img, flipped, 3 * w * h); + delete[] flipped; + } } -void vflip (unsigned char* img, int w, int h) +void vflip(unsigned char* img, int w, int h) { + if(w > 0 && h > 0) { + unsigned char* flipped = new unsigned char[3 * w * h]; + int ix = 0; - unsigned char* flipped = new unsigned char[3 * w * h]; - int ix = 0; + for (int i = 0; i < h; i++) + for (int j = 0; j < w; j++) { + flipped[3 * (w * (h - 1 - i) + j) + 0] = img[ix++]; + flipped[3 * (w * (h - 1 - i) + j) + 1] = img[ix++]; + flipped[3 * (w * (h - 1 - i) + j) + 2] = img[ix++]; + } - for (int i = 0; i < h; i++) - for (int j = 0; j < w; j++) { - flipped[3 * (w * (h - 1 - i) + j) + 0] = img[ix++]; - flipped[3 * (w * (h - 1 - i) + j) + 1] = img[ix++]; - flipped[3 * (w * (h - 1 - i) + j) + 2] = img[ix++]; - } + memcpy(img, flipped, 3 * w * h); + delete[] flipped; + } +} - memcpy (img, flipped, 3 * w * h); - delete [] flipped; +Glib::ustring getFileExtension(const Glib::ustring& filename) +{ + const Glib::ustring::size_type lastdot_pos = filename.find_last_of('.'); + return + lastdot_pos != Glib::ustring::npos + ? filename.substr(lastdot_pos + 1).lowercase() + : Glib::ustring(); +} + +bool hasJpegExtension(const Glib::ustring& filename) +{ + const Glib::ustring extension = getFileExtension(filename); + return extension == "jpg" || extension == "jpeg"; +} + +bool hasTiffExtension(const Glib::ustring& filename) +{ + const Glib::ustring extension = getFileExtension(filename); + return extension == "tif" || extension == "tiff"; +} + +bool hasPngExtension(const Glib::ustring& filename) +{ + return getFileExtension(filename) == "png"; +} + +void swab(const void* from, void* to, ssize_t n) +{ + // Adapted from glibc + const char* char_from = static_cast(from); + char* char_to = static_cast(to); + + n &= ~static_cast(1); + + while (n > 1) { + const char b0 = char_from[--n], b1 = char_from[--n]; + char_to[n] = b0; + char_to[n + 1] = b1; + } } } - - diff --git a/rtengine/utils.h b/rtengine/utils.h index c46999219..9c56ad0a0 100644 --- a/rtengine/utils.h +++ b/rtengine/utils.h @@ -19,22 +19,23 @@ #pragma once #include +#include namespace rtengine { -// update a point of a Cairo::Surface by accessing the raw data -void poke255_uc(unsigned char* &dest, unsigned char r, unsigned char g, unsigned char b); -// update a point of a Cairo::Surface by accessing the raw data -void poke01_d(unsigned char* &dest, double r, double g, double b); -// update a point of a Cairo::Surface by accessing the raw data -void poke01_f(unsigned char* &dest, float r, float g, float b); +// Update a point of a Cairo::Surface by accessing the raw data +void poke255_uc(unsigned char*& dest, unsigned char r, unsigned char g, unsigned char b); +// Update a point of a Cairo::Surface by accessing the raw data +void poke01_d(unsigned char*& dest, double r, double g, double b); +// Update a point of a Cairo::Surface by accessing the raw data +void poke01_f(unsigned char*& dest, float r, float g, float b); -void bilinearInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh); -void nearestInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh); -void rotate (unsigned char* img, int& w, int& h, int deg); -void hflip (unsigned char* img, int w, int h); -void vflip (unsigned char* img, int w, int h); +void bilinearInterp(const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh); +void nearestInterp(const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh); +void rotate(unsigned char* img, int& w, int& h, int deg); +void hflip(unsigned char* img, int w, int h); +void vflip(unsigned char* img, int w, int h); template typename std::underlying_type::type toUnderlying(ENUM value) @@ -42,4 +43,15 @@ typename std::underlying_type::type toUnderlying(ENUM value) return static_cast::type>(value); } +// Return lower case extension without the "." or "" if the given name contains no "." +Glib::ustring getFileExtension(const Glib::ustring& filename); +// Return true if file has .jpeg or .jpg extension (ignoring case) +bool hasJpegExtension(const Glib::ustring& filename); +// Return true if file has .tiff or .tif extension (ignoring case) +bool hasTiffExtension(const Glib::ustring& filename); +// Return true if file has .png extension (ignoring case) +bool hasPngExtension(const Glib::ustring& filename); + +void swab(const void* from, void* to, ssize_t n); + } diff --git a/rtexif/CMakeLists.txt b/rtexif/CMakeLists.txt index a2e713ed7..820f682a4 100644 --- a/rtexif/CMakeLists.txt +++ b/rtexif/CMakeLists.txt @@ -1,23 +1,17 @@ -add_library (rtexif rtexif.cc stdattribs.cc nikonattribs.cc canonattribs.cc pentaxattribs.cc fujiattribs.cc sonyminoltaattribs.cc olympusattribs.cc kodakattribs.cc) -add_dependencies (rtexif AboutFile) +add_library(rtexif rtexif.cc stdattribs.cc nikonattribs.cc canonattribs.cc pentaxattribs.cc fujiattribs.cc sonyminoltaattribs.cc olympusattribs.cc kodakattribs.cc panasonicattribs.cc) +add_dependencies(rtexif UpdateInfo) -IF (WIN32) - set_target_properties (rtexif PROPERTIES COMPILE_FLAGS " -ffast-math -fexpensive-optimizations") - include_directories (${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS} - ${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS}) - link_directories (. "${PROJECT_SOURCE_DIR}/rtexif" ${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS} - ${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS}) - #set_target_properties (rth PROPERTIES LINK_FLAGS "-mwindows") -ELSE (WIN32) - set_target_properties (rtexif PROPERTIES COMPILE_FLAGS " -ffast-math -fexpensive-optimizations -fPIC") - 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}) -ENDIF (WIN32) +if(WIN32) + include_directories(${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS} ${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS}) + link_directories(. "${PROJECT_SOURCE_DIR}/rtexif" ${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS} ${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS}) +else() + set_target_properties(rtexif PROPERTIES COMPILE_FLAGS " -fPIC") + 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}) +endif() -include_directories (BEFORE "${CMAKE_CURRENT_BINARY_DIR}") +include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}") -IF (BUILD_SHARED_LIBS) - INSTALL(TARGETS rtexif DESTINATION ${LIBDIR}) -ENDIF (BUILD_SHARED_LIBS) +if(BUILD_SHARED_LIBS) + install(TARGETS rtexif DESTINATION ${LIBDIR}) +endif() diff --git a/rtexif/canonattribs.cc b/rtexif/canonattribs.cc index 7fa01f624..01b00dd53 100644 --- a/rtexif/canonattribs.cc +++ b/rtexif/canonattribs.cc @@ -36,9 +36,9 @@ public: { int n = t->toInt(); - if( n == 0 ) { + if ( n == 0 ) { return "OFF"; - } else if( n == 1) { + } else if ( n == 1) { return "ON"; } else { return "undef"; @@ -66,9 +66,9 @@ public: virtual std::string toString (Tag* t) { char buffer[32]; - double v = pow(2.0, t->toDouble() / 64.0); + double v = pow (2.0, t->toDouble() / 64.0); - if( v < 0. || v > 1000.) { + if ( v < 0. || v > 1000.) { return "undef"; } @@ -94,9 +94,9 @@ class CASelfTimerInterpreter : public Interpreter public: virtual std::string toString (Tag* t) { - int sec = t->toInt(0, SHORT); + int sec = t->toInt (0, SHORT); - if( !sec ) { + if ( !sec ) { return "OFF"; } @@ -171,6 +171,7 @@ public: choices[16] = "Pan Focus"; choices[256] = "AF + MF"; choices[512] = "Movie Snap Focus"; + choices[519] = "Movie Servo AF"; } }; CAFocusModeInterpreter caFocusModeInterpreter; @@ -387,41 +388,41 @@ public: virtual std::string toString (Tag* t) { std::ostringstream s; - unsigned bits = t->toInt(0, SHORT); + unsigned bits = t->toInt (0, SHORT); - if( bits & 0x0001 ) { + if ( bits & 0x0001 ) { s << "Manual "; } - if( bits & 0x0002 ) { + if ( bits & 0x0002 ) { s << "TTL "; } - if( bits & 0x0004 ) { + if ( bits & 0x0004 ) { s << "A-TTL "; } - if( bits & 0x0008 ) { + if ( bits & 0x0008 ) { s << "E-TTL "; } - if( bits & 0x0010 ) { + if ( bits & 0x0010 ) { s << "FP sync enabled "; } - if( bits & 0x0080 ) { + if ( bits & 0x0080 ) { s << "2nd curtain "; } - if( bits & 0x0800 ) { + if ( bits & 0x0800 ) { s << "FP sync used "; } - if( bits & 0x2000 ) { + if ( bits & 0x2000 ) { s << "Built-in "; } - if( bits & 0x4000 ) { + if ( bits & 0x4000 ) { s << "External "; } @@ -534,11 +535,11 @@ class CAFocalInterpreter : public Interpreter public: virtual std::string toString (Tag* t) { - Tag *unitTag = t->getParent()->getRoot()->findTag("FocalUnits"); + Tag *unitTag = t->getParent()->getRoot()->findTag ("FocalUnits"); double v = unitTag ? unitTag->toDouble() : 1.; v = (v > 0. ? t->toDouble() / v : t->toDouble()); - if( v < 0. || v > 1000000.) { + if ( v < 0. || v > 1000000.) { return "undef"; } @@ -554,342 +555,350 @@ class CALensInterpreter : public IntLensInterpreter< int > public: CALensInterpreter () { - choices.insert(p_t(1, "Canon EF 50mm f/1.8")); - choices.insert(p_t(2, "Canon EF 28mm f/2.8")); - choices.insert(p_t(3, "Canon EF 135mm f/2.8 Soft")); - choices.insert(p_t(4, "Canon EF 35-105mm f/3.5-4.5 or Sigma Lens")); - choices.insert(p_t(4, "Sigma UC Zoom 35-135mm f/4-5.6")); - choices.insert(p_t(5, "Canon EF 35-70mm f/3.5-4.5")); - choices.insert(p_t(6, "Canon EF 28-70mm f/3.5-4.5 or Sigma or Tokina Lens")); - choices.insert(p_t(6, "Sigma 18-50mm f/3.5-5.6 DC")); - choices.insert(p_t(6, "Sigma 18-125mm f/3.5-5.6 DC IF ASP")); - choices.insert(p_t(6, "Tokina AF 193-2 19-35mm f/3.5-4.5")); - choices.insert(p_t(6, "Sigma 28-80mm f/3.5-5.6 II Macro")); - choices.insert(p_t(7, "Canon EF 100-300mm f/5.6L")); - choices.insert(p_t(8, "Canon EF 100-300mm f/5.6 or Sigma or Tokina Lens")); - choices.insert(p_t(8, "Sigma 70-300mm f/4-5.6 [APO] DG Macro")); - choices.insert(p_t(8, "Tokina AT-X 242 AF 24-200mm f/3.5-5.6")); - choices.insert(p_t(9, "Canon EF 70-210mm f/4")); - choices.insert(p_t(9, "Sigma 55-200mm f/4-5.6 DC")); - choices.insert(p_t(10, "Canon EF 50mm f/2.5 Macro or Sigma Lens")); - choices.insert(p_t(10, "Sigma 50mm f/2.8 EX")); - choices.insert(p_t(10, "Sigma 28mm f/1.8")); - choices.insert(p_t(10, "Sigma 105mm f/2.8 Macro EX")); - choices.insert(p_t(10, "Sigma 70mm f/2.8 EX DG Macro EF")); - choices.insert(p_t(11, "Canon EF 35mm f/2")); - choices.insert(p_t(13, "Canon EF 15mm f/2.8 Fisheye")); - choices.insert(p_t(14, "Canon EF 50-200mm f/3.5-4.5L")); - choices.insert(p_t(15, "Canon EF 50-200mm f/3.5-4.5")); - choices.insert(p_t(16, "Canon EF 35-135mm f/3.5-4.5")); - choices.insert(p_t(17, "Canon EF 35-70mm f/3.5-4.5A")); - choices.insert(p_t(18, "Canon EF 28-70mm f/3.5-4.5")); - choices.insert(p_t(20, "Canon EF 100-200mm f/4.5A")); - choices.insert(p_t(21, "Canon EF 80-200mm f/2.8L")); - choices.insert(p_t(22, "Canon EF 20-35mm f/2.8L or Tokina Lens")); - choices.insert(p_t(22, "Tokina AT-X 280 AF Pro 28-80mm f/2.8 Aspherical")); - choices.insert(p_t(23, "Canon EF 35-105mm f/3.5-4.5")); - choices.insert(p_t(24, "Canon EF 35-80mm f/4-5.6 Power Zoom")); - choices.insert(p_t(25, "Canon EF 35-80mm f/4-5.6 Power Zoom")); - choices.insert(p_t(26, "Canon EF 100mm f/2.8 Macro or Other Lens")); - choices.insert(p_t(26, "Cosina 100mm f/3.5 Macro AF")); - choices.insert(p_t(26, "Tamron SP AF 90mm f/2.8 Di Macro")); - choices.insert(p_t(26, "Tamron SP AF 180mm f/3.5 Di Macro")); - choices.insert(p_t(26, "Carl Zeiss Planar T* 50mm f/1.4")); - choices.insert(p_t(27, "Canon EF 35-80mm f/4-5.6")); - choices.insert(p_t(28, "Canon EF 80-200mm f/4.5-5.6 or Tamron Lens")); - choices.insert(p_t(28, "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF")); - choices.insert(p_t(28, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro")); - choices.insert(p_t(28, "Tamron AF 70-300mm f/4-5.6 Di LD 1:2 Macro")); - choices.insert(p_t(28, "Tamron AF Aspherical 28-200mm f/3.8-5.6")); - choices.insert(p_t(29, "Canon EF 50mm f/1.8 II")); - choices.insert(p_t(30, "Canon EF 35-105mm f/4.5-5.6")); - choices.insert(p_t(31, "Canon EF 75-300mm f/4-5.6 or Tamron Lens")); - choices.insert(p_t(31, "Tamron SP AF 300mm f/2.8 LD IF")); - choices.insert(p_t(32, "Canon EF 24mm f/2.8 or Sigma Lens")); - choices.insert(p_t(32, "Sigma 15mm f/2.8 EX Fisheye")); - choices.insert(p_t(33, "Voigtlander or Carl Zeiss Lens")); - choices.insert(p_t(33, "Voigtlander Ultron 40mm f/2 SLII Aspherical")); - choices.insert(p_t(33, "Voigtlander Color Skopar 20mm f/3.5 SLII Aspherical")); - choices.insert(p_t(33, "Voigtlander APO-Lanthar 90mm f/3.5 SLII Close Focus")); - choices.insert(p_t(33, "Carl Zeiss Distagon T* 15mm f/2.8 ZE")); - choices.insert(p_t(33, "Carl Zeiss Distagon T* 18mm f/3.5 ZE")); - choices.insert(p_t(33, "Carl Zeiss Distagon T* 21mm f/2.8 ZE")); - choices.insert(p_t(33, "Carl Zeiss Distagon T* 25mm f/2 ZE")); - choices.insert(p_t(33, "Carl Zeiss Distagon T* 28mm f/2 ZE")); - choices.insert(p_t(33, "Carl Zeiss Distagon T* 35mm f/2 ZE")); - choices.insert(p_t(33, "Carl Zeiss Distagon T* 35mm f/1.4 ZE")); - choices.insert(p_t(33, "Carl Zeiss Planar T* 50mm f/1.4 ZE")); - choices.insert(p_t(33, "Carl Zeiss Makro-Planar T* 50mm f/2 ZE")); - choices.insert(p_t(33, "Carl Zeiss Makro-Planar T* 100mm f/2 ZE")); - choices.insert(p_t(33, "Carl Zeiss Apo-Sonnar T* 135mm f/2 ZE")); - choices.insert(p_t(35, "Canon EF 35-80mm f/4-5.6")); - choices.insert(p_t(36, "Canon EF 38-76mm f/4.5-5.6")); - choices.insert(p_t(37, "Canon EF 35-80mm f/4-5.6 or Tamron Lens")); - choices.insert(p_t(37, "Tamron 70-200mm f/2.8 Di LD IF Macro")); - choices.insert(p_t(37, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro Model A20")); - choices.insert(p_t(37, "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical [IF]")); - choices.insert(p_t(37, "Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical [IF] Macro")); - choices.insert(p_t(38, "Canon EF 80-200mm f/4.5-5.6")); - choices.insert(p_t(39, "Canon EF 75-300mm f/4-5.6")); - choices.insert(p_t(40, "Canon EF 28-80mm f/3.5-5.6")); - choices.insert(p_t(41, "Canon EF 28-90mm f/4-5.6")); - choices.insert(p_t(42, "Canon EF 28-200mm f/3.5-5.6 or Tamron Lens")); - choices.insert(p_t(42, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro Model A20")); - choices.insert(p_t(43, "Canon EF 28-105mm f/4-5.6")); - choices.insert(p_t(44, "Canon EF 90-300mm f/4.5-5.6")); - choices.insert(p_t(45, "Canon EF-S 18-55mm f/3.5-5.6 [II]")); - choices.insert(p_t(46, "Canon EF 28-90mm f/4-5.6")); - choices.insert(p_t(47, "Zeiss Milvus 35mm f/2 or 50mm f/2")); - choices.insert(p_t(47, "Zeiss Milvus 50mm f/2 Makro")); - choices.insert(p_t(48, "Canon EF-S 18-55mm f/3.5-5.6 IS")); - choices.insert(p_t(49, "Canon EF-S 55-250mm f/4-5.6 IS")); - choices.insert(p_t(50, "Canon EF-S 18-200mm f/3.5-5.6 IS")); - choices.insert(p_t(51, "Canon EF-S 18-135mm f/3.5-5.6 IS")); - choices.insert(p_t(52, "Canon EF-S 18-55mm f/3.5-5.6 IS II")); - choices.insert(p_t(53, "Canon EF-S 18-55mm f/3.5-5.6 III")); - choices.insert(p_t(54, "Canon EF-S 55-250mm f/4-5.6 IS II")); - choices.insert(p_t(94, "Canon TS-E 17mm f/4L")); - choices.insert(p_t(95, "Canon TS-E 24.0mm f/3.5 L II")); - choices.insert(p_t(124, "Canon MP-E 65mm f/2.8 1-5x Macro Photo")); - choices.insert(p_t(125, "Canon TS-E 24mm f/3.5L")); - choices.insert(p_t(126, "Canon TS-E 45mm f/2.8")); - choices.insert(p_t(127, "Canon TS-E 90mm f/2.8")); - choices.insert(p_t(129, "Canon EF 300mm f/2.8L")); - choices.insert(p_t(130, "Canon EF 50mm f/1.0L")); - choices.insert(p_t(131, "Canon EF 28-80mm f/2.8-4L or Sigma Lens")); - choices.insert(p_t(131, "Sigma 8mm f/3.5 EX DG Circular Fisheye")); - choices.insert(p_t(131, "Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM")); - choices.insert(p_t(131, "Sigma 17-70mm f/2.8-4.5 DC Macro")); - choices.insert(p_t(131, "Sigma APO 50-150mm f/2.8 [II] EX DC HSM")); - choices.insert(p_t(131, "Sigma APO 120-300mm f/2.8 EX DG HSM")); - choices.insert(p_t(131, "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye")); - choices.insert(p_t(131, "Sigma 70-200mm f/2.8 APO EX HSM")); - choices.insert(p_t(132, "Canon EF 1200mm f/5.6L")); - choices.insert(p_t(134, "Canon EF 600mm f/4L IS")); - choices.insert(p_t(135, "Canon EF 200mm f/1.8L")); - choices.insert(p_t(136, "Canon EF 300mm f/2.8L")); - choices.insert(p_t(137, "Canon EF 85mm f/1.2L or Sigma or Tamron Lens")); - choices.insert(p_t(137, "Sigma 18-50mm f/2.8-4.5 DC OS HSM")); - choices.insert(p_t(137, "Sigma 50-200mm f/4-5.6 DC OS HSM")); - choices.insert(p_t(137, "Sigma 18-250mm f/3.5-6.3 DC OS HSM")); - choices.insert(p_t(137, "Sigma 24-70mm f/2.8 IF EX DG HSM")); - choices.insert(p_t(137, "Sigma 18-125mm f/3.8-5.6 DC OS HSM")); - choices.insert(p_t(137, "Sigma 17-70mm f/2.8-4 DC Macro OS HSM | C")); - choices.insert(p_t(137, "Sigma 17-50mm f/2.8 OS HSM")); - choices.insert(p_t(137, "Sigma 18-200mm f/3.5-6.3 DC OS HSM [II]")); - choices.insert(p_t(137, "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD")); - choices.insert(p_t(137, "Sigma 8-16mm f/4.5-5.6 DC HSM")); - choices.insert(p_t(137, "Tamron SP 17-50mm f/2.8 XR Di II VC")); - choices.insert(p_t(137, "Tamron SP 60mm f/2 Macro Di II")); - choices.insert(p_t(137, "Sigma 10-20mm f/3.5 EX DC HSM")); - choices.insert(p_t(137, "Tamron SP 24-70mm f/2.8 Di VC USD")); - choices.insert(p_t(137, "Sigma 18-35mm f/1.8 DC HSM")); - choices.insert(p_t(137, "Sigma 12-24mm f/4.5-5.6 DG HSM II")); - choices.insert(p_t(138, "Canon EF 28-80mm f/2.8-4L")); - choices.insert(p_t(139, "Canon EF 400mm f/2.8L")); - choices.insert(p_t(140, "Canon EF 500mm f/4.5L")); - choices.insert(p_t(141, "Canon EF 500mm f/4.5L")); - choices.insert(p_t(142, "Canon EF 300mm f/2.8L IS")); - choices.insert(p_t(143, "Canon EF 500mm f/4L IS or Sigma Lens")); - choices.insert(p_t(143, "Sigma 17-70mm f/2.8-4 DC Macro OS HSM")); - choices.insert(p_t(144, "Canon EF 35-135mm f/4-5.6 USM")); - choices.insert(p_t(145, "Canon EF 100-300mm f/4.5-5.6 USM")); - choices.insert(p_t(146, "Canon EF 70-210mm f/3.5-4.5 USM")); - choices.insert(p_t(147, "Canon EF 35-135mm f/4-5.6 USM")); - choices.insert(p_t(148, "Canon EF 28-80mm f/3.5-5.6 USM")); - choices.insert(p_t(149, "Canon EF 100mm f/2 USM")); - choices.insert(p_t(150, "Canon EF 14mm f/2.8L or Sigma Lens")); - choices.insert(p_t(150, "Sigma 20mm EX f/1.8")); - choices.insert(p_t(150, "Sigma 30mm f/1.4 DC HSM")); - choices.insert(p_t(150, "Sigma 24mm f/1.8 DG Macro EX")); - choices.insert(p_t(150, "Sigma 28mm f/1.8 DG Macro EX")); - choices.insert(p_t(151, "Canon EF 200mm f/2.8L")); - choices.insert(p_t(152, "Canon EF 300mm f/4L IS or Sigma Lens")); - choices.insert(p_t(152, "Sigma 12-24mm f/4.5-5.6 EX DG ASPHERICAL HSM")); - choices.insert(p_t(152, "Sigma 14mm f/2.8 EX Aspherical HSM")); - choices.insert(p_t(152, "Sigma 10-20mm f/4-5.6")); - choices.insert(p_t(152, "Sigma 100-300mm f/4")); - choices.insert(p_t(153, "Canon EF 35-350mm f/3.5-5.6L or Sigma or Tamron Lens")); - choices.insert(p_t(153, "Sigma 50-500mm f/4-6.3 APO HSM EX")); - choices.insert(p_t(153, "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical [IF] Macro")); - choices.insert(p_t(153, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro Model A14")); - choices.insert(p_t(153, "Tamron 18-250mm f/3.5-6.3 Di II LD Aspherical [IF] Macro")); - choices.insert(p_t(154, "Canon EF 20mm f/2.8 USM or Zeiss Lens")); - choices.insert(p_t(154, "Zeiss Milvus 21mm f/2.8")); - choices.insert(p_t(155, "Canon EF 85mm f/1.8 USM")); - choices.insert(p_t(156, "Canon EF 28-105mm f/3.5-4.5 USM or Tamron Lens")); - choices.insert(p_t(156, "Tamron SP 70-300mm f/4.0-5.6 Di VC USD")); - choices.insert(p_t(156, "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF")); - choices.insert(p_t(160, "Canon EF 20-35mm f/3.5-4.5 USM or Tamron or Tokina Lens")); - choices.insert(p_t(160, "Tamron AF 19-35mm f/3.5-4.5")); - choices.insert(p_t(160, "Tokina AT-X 124 AF Pro DX 12-24mm f/4")); - choices.insert(p_t(160, "Tokina AT-X 107 AF DX 10-17mm f/3.5-4.5 Fisheye")); - choices.insert(p_t(160, "Tokina AT-X 116 AF Pro DX 11-16mm f/2.8")); - choices.insert(p_t(160, "Tokina AT-X 11-20 F2.8 PRO DX Aspherical 11-20mm f/2.8")); - choices.insert(p_t(161, "Canon EF 28-70mm f/2.8L or Sigma or Tamron Lens")); - choices.insert(p_t(161, "Sigma 24-70mm f/2.8 EX")); - choices.insert(p_t(161, "Sigma 28-70mm f/2.8 EX")); - choices.insert(p_t(161, "Sigma 24-60mm f/2.8 EX DG")); - choices.insert(p_t(161, "Tamron AF 17-50mm f/2.8 Di-II LD Aspherical")); - choices.insert(p_t(161, "Tamron 90mm f/2.8")); - choices.insert(p_t(161, "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical IF")); - choices.insert(p_t(161, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro")); - choices.insert(p_t(162, "Canon EF 200mm f/2.8L")); - choices.insert(p_t(163, "Canon EF 300mm f/4L")); - choices.insert(p_t(164, "Canon EF 400mm f/5.6L")); - choices.insert(p_t(165, "Canon EF 70-200mm f/2.8 L")); - choices.insert(p_t(166, "Canon EF 70-200mm f/2.8 L + 1.4x")); - choices.insert(p_t(167, "Canon EF 70-200mm f/2.8 L + 2x")); - choices.insert(p_t(168, "Canon EF 28mm f/1.8 USM or Sigma Lens")); - choices.insert(p_t(168, "Sigma 50-100mm f/1.8 DC HSM | A")); - choices.insert(p_t(169, "Canon EF 17-35mm f/2.8L or Sigma Lens")); - choices.insert(p_t(169, "Sigma 18-200mm f/3.5-6.3 DC OS")); - choices.insert(p_t(169, "Sigma 15-30mm f/3.5-4.5 EX DG Aspherical")); - choices.insert(p_t(169, "Sigma 18-50mm f/2.8 Macro")); - choices.insert(p_t(169, "Sigma 50mm f/1.4 EX DG HSM")); - choices.insert(p_t(169, "Sigma 85mm f/1.4 EX DG HSM")); - choices.insert(p_t(169, "Sigma 30mm f/1.4 EX DC HSM")); - choices.insert(p_t(169, "Sigma 35mm f/1.4 DG HSM")); - choices.insert(p_t(170, "Canon EF 200mm f/2.8L II")); - choices.insert(p_t(171, "Canon EF 300mm f/4L")); - choices.insert(p_t(172, "Canon EF 400mm f/5.6L or Sigma Lens")); - choices.insert(p_t(172, "Sigma 150-600mm f/5-6.3 DG OS HSM | S")); - choices.insert(p_t(173, "Canon EF 180mm Macro f/3.5L or Sigma Lens")); - choices.insert(p_t(173, "Sigma 180mm EX HSM Macro f/3.5")); - choices.insert(p_t(173, "Sigma APO Macro 150mm f/2.8 EX DG HSM")); - choices.insert(p_t(174, "Canon EF 135mm f/2L or Other Lens")); - choices.insert(p_t(174, "Sigma 70-200mm f/2.8 EX DG APO OS HSM")); - choices.insert(p_t(174, "Sigma 50-500mm f/4.5-6.3 APO DG OS HSM")); - choices.insert(p_t(174, "Sigma 150-500mm f/5-6.3 APO DG OS HSM")); - choices.insert(p_t(174, "Zeiss Milvus 100mm f/2 Makro")); - choices.insert(p_t(175, "Canon EF 400mm f/2.8L")); - choices.insert(p_t(176, "Canon EF 24-85mm f/3.5-4.5 USM")); - choices.insert(p_t(177, "Canon EF 300mm f/4L IS")); - choices.insert(p_t(178, "Canon EF 28-135mm f/3.5-5.6 IS")); - choices.insert(p_t(179, "Canon EF 24mm f/1.4L")); - choices.insert(p_t(180, "Canon EF 35mm f/1.4L or Other Lens")); - choices.insert(p_t(180, "Sigma 50mm f/1.4 DG HSM | A")); - choices.insert(p_t(180, "Sigma 24mm f/1.4 DG HSM | A")); - choices.insert(p_t(180, "Zeiss Milvus 50mm f/1.4")); - choices.insert(p_t(180, "Zeiss Milvus 85mm f/1.4")); - choices.insert(p_t(180, "Zeiss Otus 28mm f/1.4 ZE")); - choices.insert(p_t(181, "Canon EF 100-400mm f/4.5-5.6L IS + 1.4x or Sigma Lens")); - choices.insert(p_t(181, "Sigma 150-600mm f/5-6.3 DG OS HSM | S + 1.4x")); - choices.insert(p_t(182, "Canon EF 100-400mm f/4.5-5.6L IS + 2x or Sigma Lens")); - choices.insert(p_t(182, "Sigma 150-600mm f/5-6.3 DG OS HSM | S + 2x")); - choices.insert(p_t(183, "Canon EF 100-400mm f/4.5-5.6L IS or Sigma Lens")); - choices.insert(p_t(183, "Sigma 150mm f/2.8 EX DG OS HSM APO Macro")); - choices.insert(p_t(183, "Sigma 105mm f/2.8 EX DG OS HSM Macro")); - choices.insert(p_t(183, "Sigma 180mm f/2.8 EX DG OS HSM APO Macro")); - choices.insert(p_t(183, "Sigma 150-600mm f/5-6.3 DG OS HSM | C")); - choices.insert(p_t(183, "Sigma 150-600mm f/5-6.3 DG OS HSM | S")); - choices.insert(p_t(184, "Canon EF 400mm f/2.8L + 2x")); - choices.insert(p_t(185, "Canon EF 600mm f/4L IS")); - choices.insert(p_t(186, "Canon EF 70-200mm f/4L")); - choices.insert(p_t(187, "Canon EF 70-200mm f/4L + 1.4x")); - choices.insert(p_t(188, "Canon EF 70-200mm f/4L + 2x")); - choices.insert(p_t(189, "Canon EF 70-200mm f/4L + 2.8x")); - choices.insert(p_t(190, "Canon EF 100mm f/2.8 Macro USM")); - choices.insert(p_t(191, "Canon EF 400mm f/4 DO IS")); - choices.insert(p_t(193, "Canon EF 35-80mm f/4-5.6 USM")); - choices.insert(p_t(194, "Canon EF 80-200mm f/4.5-5.6 USM")); - choices.insert(p_t(195, "Canon EF 35-105mm f/4.5-5.6 USM")); - choices.insert(p_t(196, "Canon EF 75-300mm f/4-5.6 USM")); - choices.insert(p_t(197, "Canon EF 75-300mm f/4-5.6 IS USM")); - choices.insert(p_t(198, "Canon EF 50mm f/1.4 USM or Zeiss Lens")); - choices.insert(p_t(198, "Zeiss Otus 55mm f/1.4 ZE")); - choices.insert(p_t(198, "Zeiss Otus 85mm f/1.4 ZE")); - choices.insert(p_t(199, "Canon EF 28-80mm f/3.5-5.6 USM")); - choices.insert(p_t(200, "Canon EF 75-300mm f/4-5.6 USM")); - choices.insert(p_t(201, "Canon EF 28-80mm f/3.5-5.6 USM")); - choices.insert(p_t(202, "Canon EF 28-80mm f/3.5-5.6 USM IV")); - choices.insert(p_t(208, "Canon EF 22-55mm f/4-5.6 USM")); - choices.insert(p_t(209, "Canon EF 55-200mm f/4.5-5.6")); - choices.insert(p_t(210, "Canon EF 28-90mm f/4-5.6 USM")); - choices.insert(p_t(211, "Canon EF 28-200mm f/3.5-5.6 USM")); - choices.insert(p_t(212, "Canon EF 28-105mm f/4-5.6 USM")); - choices.insert(p_t(213, "Canon EF 90-300mm f/4.5-5.6 USM or Tamron Lens")); - choices.insert(p_t(213, "Tamron SP 150-600mm f/5-6.3 Di VC USD")); - choices.insert(p_t(213, "Tamron 16-300mm f/3.5-6.3 Di II VC PZD Macro")); - choices.insert(p_t(213, "Tamron SP 35mm f/1.8 Di VC USD")); - choices.insert(p_t(213, "Tamron SP 45mm f/1.8 Di VC USD")); - choices.insert(p_t(214, "Canon EF-S 18-55mm f/3.5-5.6 USM")); - choices.insert(p_t(215, "Canon EF 55-200mm f/4.5-5.6 II USM")); - choices.insert(p_t(217, "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD")); - choices.insert(p_t(224, "Canon EF 70-200mm f/2.8L IS")); - choices.insert(p_t(225, "Canon EF 70-200mm f/2.8L IS + 1.4x")); - choices.insert(p_t(226, "Canon EF 70-200mm f/2.8L IS + 2x")); - choices.insert(p_t(227, "Canon EF 70-200mm f/2.8L IS + 2.8x")); - choices.insert(p_t(228, "Canon EF 28-105mm f/3.5-4.5 USM")); - choices.insert(p_t(229, "Canon EF 16-35mm f/2.8L")); - choices.insert(p_t(230, "Canon EF 24-70mm f/2.8L")); - choices.insert(p_t(231, "Canon EF 17-40mm f/4L")); - choices.insert(p_t(232, "Canon EF 70-300mm f/4.5-5.6 DO IS USM")); - choices.insert(p_t(233, "Canon EF 28-300mm f/3.5-5.6L IS")); - choices.insert(p_t(234, "Canon EF-S 17-85mm f/4-5.6 IS USM or Tokina Lens")); - choices.insert(p_t(234, "Tokina AT-X 12-28 PRO DX 12-28mm f/4")); - choices.insert(p_t(235, "Canon EF-S 10-22mm f/3.5-4.5 USM")); - choices.insert(p_t(236, "Canon EF-S 60mm f/2.8 Macro USM")); - choices.insert(p_t(237, "Canon EF 24-105mm f/4L IS")); - choices.insert(p_t(238, "Canon EF 70-300mm f/4-5.6 IS USM")); - choices.insert(p_t(239, "Canon EF 85mm f/1.2L II")); - choices.insert(p_t(240, "Canon EF-S 17-55mm f/2.8 IS USM")); - choices.insert(p_t(241, "Canon EF 50mm f/1.2L")); - choices.insert(p_t(242, "Canon EF 70-200mm f/4L IS")); - choices.insert(p_t(243, "Canon EF 70-200mm f/4L IS + 1.4x")); - choices.insert(p_t(244, "Canon EF 70-200mm f/4L IS + 2x")); - choices.insert(p_t(245, "Canon EF 70-200mm f/4L IS + 2.8x")); - choices.insert(p_t(246, "Canon EF 16-35mm f/2.8L II")); - choices.insert(p_t(247, "Canon EF 14mm f/2.8L II USM")); - choices.insert(p_t(248, "Canon EF 200mm f/2L IS or Sigma Lens")); - choices.insert(p_t(248, "Sigma 24-35mm f/2 DG HSM | A")); - choices.insert(p_t(249, "Canon EF 800mm f/5.6L IS")); - choices.insert(p_t(250, "Canon EF 24mm f/1.4L II or Sigma Lens")); - choices.insert(p_t(250, "Sigma 20mm f/1.4 DG HSM | A")); - choices.insert(p_t(251, "Canon EF 70-200mm f/2.8L IS II USM")); - choices.insert(p_t(252, "Canon EF 70-200mm f/2.8L IS II USM + 1.4x")); - choices.insert(p_t(253, "Canon EF 70-200mm f/2.8L IS II USM + 2x")); - choices.insert(p_t(254, "Canon EF 100mm f/2.8L Macro IS USM")); - choices.insert(p_t(255, "Sigma 24-105mm f/4 DG OS HSM | A or Other Sigma Lens")); - choices.insert(p_t(255, "Sigma 180mm f/2.8 EX DG OS HSM APO Macro")); - choices.insert(p_t(488, "Canon EF-S 15-85mm f/3.5-5.6 IS USM")); - choices.insert(p_t(489, "Canon EF 70-300mm f/4-5.6L IS USM")); - choices.insert(p_t(490, "Canon EF 8-15mm f/4L Fisheye USM")); - choices.insert(p_t(491, "Canon EF 300mm f/2.8L IS II USM")); - choices.insert(p_t(492, "Canon EF 400mm f/2.8L IS II USM")); - choices.insert(p_t(493, "Canon EF 500mm f/4L IS II USM or EF 24-105mm f4L IS USM")); - choices.insert(p_t(493, "Canon EF 24-105mm f/4L IS USM")); - choices.insert(p_t(494, "Canon EF 600mm f/4.0L IS II USM")); - choices.insert(p_t(495, "Canon EF 24-70mm f/2.8L II USM")); - choices.insert(p_t(496, "Canon EF 200-400mm f/4L IS USM")); - choices.insert(p_t(499, "Canon EF 200-400mm f/4L IS USM + 1.4x")); - choices.insert(p_t(502, "Canon EF 28mm f/2.8 IS USM")); - choices.insert(p_t(503, "Canon EF 24mm f/2.8 IS USM")); - choices.insert(p_t(504, "Canon EF 24-70mm f/4L IS USM")); - choices.insert(p_t(505, "Canon EF 35mm f/2 IS USM")); - choices.insert(p_t(506, "Canon EF 400mm f/4 DO IS II USM")); - choices.insert(p_t(507, "Canon EF 16-35mm f/4L IS USM")); - choices.insert(p_t(508, "Canon EF 11-24mm f/4L USM")); - choices.insert(p_t(747, "Canon EF 100-400mm f/4.5-5.6L IS II USM")); - choices.insert(p_t(748, "Canon EF 100-400mm f/4.5-5.6L IS II USM + 1.4x")); - choices.insert(p_t(750, "Canon EF 35mm f/1.4L II USM")); - choices.insert(p_t(4142, "Canon EF-S 18-135mm f/3.5-5.6 IS STM")); - choices.insert(p_t(4143, "Canon EF-M 18-55mm f/3.5-5.6 IS STM or Tamron Lens")); - choices.insert(p_t(4143, "Tamron 18-200mm f/3.5-6.3 Di III VC")); - choices.insert(p_t(4144, "Canon EF 40mm f/2.8 STM")); - choices.insert(p_t(4145, "Canon EF-M 22mm f/2 STM")); - choices.insert(p_t(4146, "Canon EF-S 18-55mm f/3.5-5.6 IS STM")); - choices.insert(p_t(4147, "Canon EF-M 11-22mm f/4-5.6 IS STM")); - choices.insert(p_t(4148, "Canon EF-S 55-250mm f/4-5.6 IS STM")); - choices.insert(p_t(4149, "Canon EF-M 55-200mm f/4.5-6.3 IS STM")); - choices.insert(p_t(4150, "Canon EF-S 10-18mm f/4.5-5.6 IS STM")); - choices.insert(p_t(4152, "Canon EF 24-105mm f/3.5-5.6 IS STM")); - choices.insert(p_t(4153, "Canon EF-M 15-45mm f/3.5-6.3 IS STM")); - choices.insert(p_t(4154, "Canon EF-S 24mm f/2.8 STM")); - choices.insert(p_t(4155, "Canon EF-M 28mm f/3.5 Macro IS STM ")); - choices.insert(p_t(4156, "Canon EF 50mm f/1.8 STM")); - choices.insert(p_t(36912, "Canon EF-S 18-135mm f/3.5-5.6 IS USM")); - choices.insert(p_t(65535, "n/a")); + choices.insert (p_t (1, "Canon EF 50mm f/1.8")); + choices.insert (p_t (2, "Canon EF 28mm f/2.8")); + choices.insert (p_t (3, "Canon EF 135mm f/2.8 Soft")); + choices.insert (p_t (4, "Canon EF 35-105mm f/3.5-4.5 or Sigma Lens")); + choices.insert (p_t (4, "Sigma UC Zoom 35-135mm f/4-5.6")); + choices.insert (p_t (5, "Canon EF 35-70mm f/3.5-4.5")); + choices.insert (p_t (6, "Canon EF 28-70mm f/3.5-4.5 or Sigma or Tokina Lens")); + choices.insert (p_t (6, "Sigma 18-50mm f/3.5-5.6 DC")); + choices.insert (p_t (6, "Sigma 18-125mm f/3.5-5.6 DC IF ASP")); + choices.insert (p_t (6, "Tokina AF 193-2 19-35mm f/3.5-4.5")); + choices.insert (p_t (6, "Sigma 28-80mm f/3.5-5.6 II Macro")); + choices.insert (p_t (7, "Canon EF 100-300mm f/5.6L")); + choices.insert (p_t (8, "Canon EF 100-300mm f/5.6 or Sigma or Tokina Lens")); + choices.insert (p_t (8, "Sigma 70-300mm f/4-5.6 [APO] DG Macro")); + choices.insert (p_t (8, "Tokina AT-X 242 AF 24-200mm f/3.5-5.6")); + choices.insert (p_t (9, "Canon EF 70-210mm f/4")); + choices.insert (p_t (9, "Sigma 55-200mm f/4-5.6 DC")); + choices.insert (p_t (10, "Canon EF 50mm f/2.5 Macro or Sigma Lens")); + choices.insert (p_t (10, "Sigma 50mm f/2.8 EX")); + choices.insert (p_t (10, "Sigma 28mm f/1.8")); + choices.insert (p_t (10, "Sigma 105mm f/2.8 Macro EX")); + choices.insert (p_t (10, "Sigma 70mm f/2.8 EX DG Macro EF")); + choices.insert (p_t (11, "Canon EF 35mm f/2")); + choices.insert (p_t (13, "Canon EF 15mm f/2.8 Fisheye")); + choices.insert (p_t (14, "Canon EF 50-200mm f/3.5-4.5L")); + choices.insert (p_t (15, "Canon EF 50-200mm f/3.5-4.5")); + choices.insert (p_t (16, "Canon EF 35-135mm f/3.5-4.5")); + choices.insert (p_t (17, "Canon EF 35-70mm f/3.5-4.5A")); + choices.insert (p_t (18, "Canon EF 28-70mm f/3.5-4.5")); + choices.insert (p_t (20, "Canon EF 100-200mm f/4.5A")); + choices.insert (p_t (21, "Canon EF 80-200mm f/2.8L")); + choices.insert (p_t (22, "Canon EF 20-35mm f/2.8L or Tokina Lens")); + choices.insert (p_t (22, "Tokina AT-X 280 AF Pro 28-80mm f/2.8 Aspherical")); + choices.insert (p_t (23, "Canon EF 35-105mm f/3.5-4.5")); + choices.insert (p_t (24, "Canon EF 35-80mm f/4-5.6 Power Zoom")); + choices.insert (p_t (25, "Canon EF 35-80mm f/4-5.6 Power Zoom")); + choices.insert (p_t (26, "Canon EF 100mm f/2.8 Macro or Other Lens")); + choices.insert (p_t (26, "Cosina 100mm f/3.5 Macro AF")); + choices.insert (p_t (26, "Tamron SP AF 90mm f/2.8 Di Macro")); + choices.insert (p_t (26, "Tamron SP AF 180mm f/3.5 Di Macro")); + choices.insert (p_t (26, "Carl Zeiss Planar T* 50mm f/1.4")); + choices.insert (p_t (27, "Canon EF 35-80mm f/4-5.6")); + choices.insert (p_t (28, "Canon EF 80-200mm f/4.5-5.6 or Tamron Lens")); + choices.insert (p_t (28, "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF")); + choices.insert (p_t (28, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro")); + choices.insert (p_t (28, "Tamron AF 70-300mm f/4-5.6 Di LD 1:2 Macro")); + choices.insert (p_t (28, "Tamron AF Aspherical 28-200mm f/3.8-5.6")); + choices.insert (p_t (29, "Canon EF 50mm f/1.8 II")); + choices.insert (p_t (30, "Canon EF 35-105mm f/4.5-5.6")); + choices.insert (p_t (31, "Canon EF 75-300mm f/4-5.6 or Tamron Lens")); + choices.insert (p_t (31, "Tamron SP AF 300mm f/2.8 LD IF")); + choices.insert (p_t (32, "Canon EF 24mm f/2.8 or Sigma Lens")); + choices.insert (p_t (32, "Sigma 15mm f/2.8 EX Fisheye")); + choices.insert (p_t (33, "Voigtlander or Carl Zeiss Lens")); + choices.insert (p_t (33, "Voigtlander Ultron 40mm f/2 SLII Aspherical")); + choices.insert (p_t (33, "Voigtlander Color Skopar 20mm f/3.5 SLII Aspherical")); + choices.insert (p_t (33, "Voigtlander APO-Lanthar 90mm f/3.5 SLII Close Focus")); + choices.insert (p_t (33, "Carl Zeiss Distagon T* 15mm f/2.8 ZE")); + choices.insert (p_t (33, "Carl Zeiss Distagon T* 18mm f/3.5 ZE")); + choices.insert (p_t (33, "Carl Zeiss Distagon T* 21mm f/2.8 ZE")); + choices.insert (p_t (33, "Carl Zeiss Distagon T* 25mm f/2 ZE")); + choices.insert (p_t (33, "Carl Zeiss Distagon T* 28mm f/2 ZE")); + choices.insert (p_t (33, "Carl Zeiss Distagon T* 35mm f/2 ZE")); + choices.insert (p_t (33, "Carl Zeiss Distagon T* 35mm f/1.4 ZE")); + choices.insert (p_t (33, "Carl Zeiss Planar T* 50mm f/1.4 ZE")); + choices.insert (p_t (33, "Carl Zeiss Makro-Planar T* 50mm f/2 ZE")); + choices.insert (p_t (33, "Carl Zeiss Makro-Planar T* 100mm f/2 ZE")); + choices.insert (p_t (33, "Carl Zeiss Apo-Sonnar T* 135mm f/2 ZE")); + choices.insert (p_t (35, "Canon EF 35-80mm f/4-5.6")); + choices.insert (p_t (36, "Canon EF 38-76mm f/4.5-5.6")); + choices.insert (p_t (37, "Canon EF 35-80mm f/4-5.6 or Tamron Lens")); + choices.insert (p_t (37, "Tamron 70-200mm f/2.8 Di LD IF Macro")); + choices.insert (p_t (37, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro Model A20")); + choices.insert (p_t (37, "Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical [IF]")); + choices.insert (p_t (37, "Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical [IF] Macro")); + choices.insert (p_t (38, "Canon EF 80-200mm f/4.5-5.6")); + choices.insert (p_t (39, "Canon EF 75-300mm f/4-5.6")); + choices.insert (p_t (40, "Canon EF 28-80mm f/3.5-5.6")); + choices.insert (p_t (41, "Canon EF 28-90mm f/4-5.6")); + choices.insert (p_t (42, "Canon EF 28-200mm f/3.5-5.6 or Tamron Lens")); + choices.insert (p_t (42, "Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro Model A20")); + choices.insert (p_t (43, "Canon EF 28-105mm f/4-5.6")); + choices.insert (p_t (44, "Canon EF 90-300mm f/4.5-5.6")); + choices.insert (p_t (45, "Canon EF-S 18-55mm f/3.5-5.6 [II]")); + choices.insert (p_t (46, "Canon EF 28-90mm f/4-5.6")); + choices.insert (p_t (47, "Zeiss Milvus 35mm f/2 or 50mm f/2")); + choices.insert (p_t (47, "Zeiss Milvus 50mm f/2 Makro")); + choices.insert (p_t (48, "Canon EF-S 18-55mm f/3.5-5.6 IS")); + choices.insert (p_t (49, "Canon EF-S 55-250mm f/4-5.6 IS")); + choices.insert (p_t (50, "Canon EF-S 18-200mm f/3.5-5.6 IS")); + choices.insert (p_t (51, "Canon EF-S 18-135mm f/3.5-5.6 IS")); + choices.insert (p_t (52, "Canon EF-S 18-55mm f/3.5-5.6 IS II")); + choices.insert (p_t (53, "Canon EF-S 18-55mm f/3.5-5.6 III")); + choices.insert (p_t (54, "Canon EF-S 55-250mm f/4-5.6 IS II")); + choices.insert (p_t (60, "Irix 11mm f/4")); + choices.insert (p_t (94, "Canon TS-E 17mm f/4L")); + choices.insert (p_t (95, "Canon TS-E 24.0mm f/3.5 L II")); + choices.insert (p_t (124, "Canon MP-E 65mm f/2.8 1-5x Macro Photo")); + choices.insert (p_t (125, "Canon TS-E 24mm f/3.5L")); + choices.insert (p_t (126, "Canon TS-E 45mm f/2.8")); + choices.insert (p_t (127, "Canon TS-E 90mm f/2.8")); + choices.insert (p_t (129, "Canon EF 300mm f/2.8L")); + choices.insert (p_t (130, "Canon EF 50mm f/1.0L")); + choices.insert (p_t (131, "Canon EF 28-80mm f/2.8-4L or Sigma Lens")); + choices.insert (p_t (131, "Sigma 8mm f/3.5 EX DG Circular Fisheye")); + choices.insert (p_t (131, "Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM")); + choices.insert (p_t (131, "Sigma 17-70mm f/2.8-4.5 DC Macro")); + choices.insert (p_t (131, "Sigma APO 50-150mm f/2.8 [II] EX DC HSM")); + choices.insert (p_t (131, "Sigma APO 120-300mm f/2.8 EX DG HSM")); + choices.insert (p_t (131, "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye")); + choices.insert (p_t (131, "Sigma 70-200mm f/2.8 APO EX HSM")); + choices.insert (p_t (132, "Canon EF 1200mm f/5.6L")); + choices.insert (p_t (134, "Canon EF 600mm f/4L IS")); + choices.insert (p_t (135, "Canon EF 200mm f/1.8L")); + choices.insert (p_t (136, "Canon EF 300mm f/2.8L")); + choices.insert (p_t (137, "Canon EF 85mm f/1.2L or Sigma or Tamron Lens")); + choices.insert (p_t (137, "Sigma 18-50mm f/2.8-4.5 DC OS HSM")); + choices.insert (p_t (137, "Sigma 50-200mm f/4-5.6 DC OS HSM")); + choices.insert (p_t (137, "Sigma 18-250mm f/3.5-6.3 DC OS HSM")); + choices.insert (p_t (137, "Sigma 24-70mm f/2.8 IF EX DG HSM")); + choices.insert (p_t (137, "Sigma 18-125mm f/3.8-5.6 DC OS HSM")); + choices.insert (p_t (137, "Sigma 17-70mm f/2.8-4 DC Macro OS HSM | C")); + choices.insert (p_t (137, "Sigma 17-50mm f/2.8 OS HSM")); + choices.insert (p_t (137, "Sigma 18-200mm f/3.5-6.3 DC OS HSM [II]")); + choices.insert (p_t (137, "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD")); + choices.insert (p_t (137, "Sigma 8-16mm f/4.5-5.6 DC HSM")); + choices.insert (p_t (137, "Tamron SP 17-50mm f/2.8 XR Di II VC")); + choices.insert (p_t (137, "Tamron SP 60mm f/2 Macro Di II")); + choices.insert (p_t (137, "Sigma 10-20mm f/3.5 EX DC HSM")); + choices.insert (p_t (137, "Tamron SP 24-70mm f/2.8 Di VC USD")); + choices.insert (p_t (137, "Sigma 18-35mm f/1.8 DC HSM")); + choices.insert (p_t (137, "Sigma 12-24mm f/4.5-5.6 DG HSM II")); + choices.insert (p_t (138, "Canon EF 28-80mm f/2.8-4L")); + choices.insert (p_t (139, "Canon EF 400mm f/2.8L")); + choices.insert (p_t (140, "Canon EF 500mm f/4.5L")); + choices.insert (p_t (141, "Canon EF 500mm f/4.5L")); + choices.insert (p_t (142, "Canon EF 300mm f/2.8L IS")); + choices.insert (p_t (143, "Canon EF 500mm f/4L IS or Sigma Lens")); + choices.insert (p_t (143, "Sigma 17-70mm f/2.8-4 DC Macro OS HSM")); + choices.insert (p_t (144, "Canon EF 35-135mm f/4-5.6 USM")); + choices.insert (p_t (145, "Canon EF 100-300mm f/4.5-5.6 USM")); + choices.insert (p_t (146, "Canon EF 70-210mm f/3.5-4.5 USM")); + choices.insert (p_t (147, "Canon EF 35-135mm f/4-5.6 USM")); + choices.insert (p_t (148, "Canon EF 28-80mm f/3.5-5.6 USM")); + choices.insert (p_t (149, "Canon EF 100mm f/2 USM")); + choices.insert (p_t (150, "Canon EF 14mm f/2.8L or Sigma Lens")); + choices.insert (p_t (150, "Sigma 20mm EX f/1.8")); + choices.insert (p_t (150, "Sigma 30mm f/1.4 DC HSM")); + choices.insert (p_t (150, "Sigma 24mm f/1.8 DG Macro EX")); + choices.insert (p_t (150, "Sigma 28mm f/1.8 DG Macro EX")); + choices.insert (p_t (151, "Canon EF 200mm f/2.8L")); + choices.insert (p_t (152, "Canon EF 300mm f/4L IS or Sigma Lens")); + choices.insert (p_t (152, "Sigma 12-24mm f/4.5-5.6 EX DG ASPHERICAL HSM")); + choices.insert (p_t (152, "Sigma 14mm f/2.8 EX Aspherical HSM")); + choices.insert (p_t (152, "Sigma 10-20mm f/4-5.6")); + choices.insert (p_t (152, "Sigma 100-300mm f/4")); + choices.insert (p_t (153, "Canon EF 35-350mm f/3.5-5.6L or Sigma or Tamron Lens")); + choices.insert (p_t (153, "Sigma 50-500mm f/4-6.3 APO HSM EX")); + choices.insert (p_t (153, "Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical [IF] Macro")); + choices.insert (p_t (153, "Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro Model A14")); + choices.insert (p_t (153, "Tamron 18-250mm f/3.5-6.3 Di II LD Aspherical [IF] Macro")); + choices.insert (p_t (154, "Canon EF 20mm f/2.8 USM or Zeiss Lens")); + choices.insert (p_t (154, "Zeiss Milvus 21mm f/2.8")); + choices.insert (p_t (155, "Canon EF 85mm f/1.8 USM")); + choices.insert (p_t (156, "Canon EF 28-105mm f/3.5-4.5 USM or Tamron Lens")); + choices.insert (p_t (156, "Tamron SP 70-300mm f/4.0-5.6 Di VC USD")); + choices.insert (p_t (156, "Tamron SP AF 28-105mm f/2.8 LD Aspherical IF")); + choices.insert (p_t (160, "Canon EF 20-35mm f/3.5-4.5 USM or Tamron or Tokina Lens")); + choices.insert (p_t (160, "Tamron AF 19-35mm f/3.5-4.5")); + choices.insert (p_t (160, "Tokina AT-X 124 AF Pro DX 12-24mm f/4")); + choices.insert (p_t (160, "Tokina AT-X 107 AF DX 10-17mm f/3.5-4.5 Fisheye")); + choices.insert (p_t (160, "Tokina AT-X 116 AF Pro DX 11-16mm f/2.8")); + choices.insert (p_t (160, "Tokina AT-X 11-20 F2.8 PRO DX Aspherical 11-20mm f/2.8")); + choices.insert (p_t (161, "Canon EF 28-70mm f/2.8L or Sigma or Tamron Lens")); + choices.insert (p_t (161, "Sigma 24-70mm f/2.8 EX")); + choices.insert (p_t (161, "Sigma 28-70mm f/2.8 EX")); + choices.insert (p_t (161, "Sigma 24-60mm f/2.8 EX DG")); + choices.insert (p_t (161, "Tamron AF 17-50mm f/2.8 Di-II LD Aspherical")); + choices.insert (p_t (161, "Tamron 90mm f/2.8")); + choices.insert (p_t (161, "Tamron SP AF 17-35mm f/2.8-4 Di LD Aspherical IF")); + choices.insert (p_t (161, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro")); + choices.insert (p_t (162, "Canon EF 200mm f/2.8L")); + choices.insert (p_t (163, "Canon EF 300mm f/4L")); + choices.insert (p_t (164, "Canon EF 400mm f/5.6L")); + choices.insert (p_t (165, "Canon EF 70-200mm f/2.8 L")); + choices.insert (p_t (166, "Canon EF 70-200mm f/2.8 L + 1.4x")); + choices.insert (p_t (167, "Canon EF 70-200mm f/2.8 L + 2x")); + choices.insert (p_t (168, "Canon EF 28mm f/1.8 USM or Sigma Lens")); + choices.insert (p_t (168, "Sigma 50-100mm f/1.8 DC HSM | A")); + choices.insert (p_t (169, "Canon EF 17-35mm f/2.8L or Sigma Lens")); + choices.insert (p_t (169, "Sigma 18-200mm f/3.5-6.3 DC OS")); + choices.insert (p_t (169, "Sigma 15-30mm f/3.5-4.5 EX DG Aspherical")); + choices.insert (p_t (169, "Sigma 18-50mm f/2.8 Macro")); + choices.insert (p_t (169, "Sigma 50mm f/1.4 EX DG HSM")); + choices.insert (p_t (169, "Sigma 85mm f/1.4 EX DG HSM")); + choices.insert (p_t (169, "Sigma 30mm f/1.4 EX DC HSM")); + choices.insert (p_t (169, "Sigma 35mm f/1.4 DG HSM")); + choices.insert (p_t (170, "Canon EF 200mm f/2.8L II")); + choices.insert (p_t (171, "Canon EF 300mm f/4L")); + choices.insert (p_t (172, "Canon EF 400mm f/5.6L or Sigma Lens")); + choices.insert (p_t (172, "Sigma 150-600mm f/5-6.3 DG OS HSM | S")); + choices.insert (p_t (173, "Canon EF 180mm Macro f/3.5L or Sigma Lens")); + choices.insert (p_t (173, "Sigma 180mm EX HSM Macro f/3.5")); + choices.insert (p_t (173, "Sigma APO Macro 150mm f/2.8 EX DG HSM")); + choices.insert (p_t (174, "Canon EF 135mm f/2L or Other Lens")); + choices.insert (p_t (174, "Sigma 70-200mm f/2.8 EX DG APO OS HSM")); + choices.insert (p_t (174, "Sigma 50-500mm f/4.5-6.3 APO DG OS HSM")); + choices.insert (p_t (174, "Sigma 150-500mm f/5-6.3 APO DG OS HSM")); + choices.insert (p_t (174, "Zeiss Milvus 100mm f/2 Makro")); + choices.insert (p_t (175, "Canon EF 400mm f/2.8L")); + choices.insert (p_t (176, "Canon EF 24-85mm f/3.5-4.5 USM")); + choices.insert (p_t (177, "Canon EF 300mm f/4L IS")); + choices.insert (p_t (178, "Canon EF 28-135mm f/3.5-5.6 IS")); + choices.insert (p_t (179, "Canon EF 24mm f/1.4L")); + choices.insert (p_t (180, "Canon EF 35mm f/1.4L or Other Lens")); + choices.insert (p_t (180, "Sigma 50mm f/1.4 DG HSM | A")); + choices.insert (p_t (180, "Sigma 24mm f/1.4 DG HSM | A")); + choices.insert (p_t (180, "Zeiss Milvus 50mm f/1.4")); + choices.insert (p_t (180, "Zeiss Milvus 85mm f/1.4")); + choices.insert (p_t (180, "Zeiss Otus 28mm f/1.4 ZE")); + choices.insert (p_t (181, "Canon EF 100-400mm f/4.5-5.6L IS + 1.4x or Sigma Lens")); + choices.insert (p_t (181, "Sigma 150-600mm f/5-6.3 DG OS HSM | S + 1.4x")); + choices.insert (p_t (182, "Canon EF 100-400mm f/4.5-5.6L IS + 2x or Sigma Lens")); + choices.insert (p_t (182, "Sigma 150-600mm f/5-6.3 DG OS HSM | S + 2x")); + choices.insert (p_t (183, "Canon EF 100-400mm f/4.5-5.6L IS or Sigma Lens")); + choices.insert (p_t (183, "Sigma 150mm f/2.8 EX DG OS HSM APO Macro")); + choices.insert (p_t (183, "Sigma 105mm f/2.8 EX DG OS HSM Macro")); + choices.insert (p_t (183, "Sigma 180mm f/2.8 EX DG OS HSM APO Macro")); + choices.insert (p_t (183, "Sigma 150-600mm f/5-6.3 DG OS HSM | C")); + choices.insert (p_t (183, "Sigma 150-600mm f/5-6.3 DG OS HSM | S")); + choices.insert (p_t (184, "Canon EF 400mm f/2.8L + 2x")); + choices.insert (p_t (185, "Canon EF 600mm f/4L IS")); + choices.insert (p_t (186, "Canon EF 70-200mm f/4L")); + choices.insert (p_t (187, "Canon EF 70-200mm f/4L + 1.4x")); + choices.insert (p_t (188, "Canon EF 70-200mm f/4L + 2x")); + choices.insert (p_t (189, "Canon EF 70-200mm f/4L + 2.8x")); + choices.insert (p_t (190, "Canon EF 100mm f/2.8 Macro USM")); + choices.insert (p_t (191, "Canon EF 400mm f/4 DO IS")); + choices.insert (p_t (193, "Canon EF 35-80mm f/4-5.6 USM")); + choices.insert (p_t (194, "Canon EF 80-200mm f/4.5-5.6 USM")); + choices.insert (p_t (195, "Canon EF 35-105mm f/4.5-5.6 USM")); + choices.insert (p_t (196, "Canon EF 75-300mm f/4-5.6 USM")); + choices.insert (p_t (197, "Canon EF 75-300mm f/4-5.6 IS USM")); + choices.insert (p_t (198, "Canon EF 50mm f/1.4 USM or Zeiss Lens")); + choices.insert (p_t (198, "Zeiss Otus 55mm f/1.4 ZE")); + choices.insert (p_t (198, "Zeiss Otus 85mm f/1.4 ZE")); + choices.insert (p_t (199, "Canon EF 28-80mm f/3.5-5.6 USM")); + choices.insert (p_t (200, "Canon EF 75-300mm f/4-5.6 USM")); + choices.insert (p_t (201, "Canon EF 28-80mm f/3.5-5.6 USM")); + choices.insert (p_t (202, "Canon EF 28-80mm f/3.5-5.6 USM IV")); + choices.insert (p_t (208, "Canon EF 22-55mm f/4-5.6 USM")); + choices.insert (p_t (209, "Canon EF 55-200mm f/4.5-5.6")); + choices.insert (p_t (210, "Canon EF 28-90mm f/4-5.6 USM")); + choices.insert (p_t (211, "Canon EF 28-200mm f/3.5-5.6 USM")); + choices.insert (p_t (212, "Canon EF 28-105mm f/4-5.6 USM")); + choices.insert (p_t (213, "Canon EF 90-300mm f/4.5-5.6 USM or Tamron Lens")); + choices.insert (p_t (213, "Tamron SP 150-600mm f/5-6.3 Di VC USD")); + choices.insert (p_t (213, "Tamron 16-300mm f/3.5-6.3 Di II VC PZD Macro")); + choices.insert (p_t (213, "Tamron SP 35mm f/1.8 Di VC USD")); + choices.insert (p_t (213, "Tamron SP 45mm f/1.8 Di VC USD")); + choices.insert (p_t (214, "Canon EF-S 18-55mm f/3.5-5.6 USM")); + choices.insert (p_t (215, "Canon EF 55-200mm f/4.5-5.6 II USM")); + choices.insert (p_t (217, "Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD")); + choices.insert (p_t (224, "Canon EF 70-200mm f/2.8L IS")); + choices.insert (p_t (225, "Canon EF 70-200mm f/2.8L IS + 1.4x")); + choices.insert (p_t (226, "Canon EF 70-200mm f/2.8L IS + 2x")); + choices.insert (p_t (227, "Canon EF 70-200mm f/2.8L IS + 2.8x")); + choices.insert (p_t (228, "Canon EF 28-105mm f/3.5-4.5 USM")); + choices.insert (p_t (229, "Canon EF 16-35mm f/2.8L")); + choices.insert (p_t (230, "Canon EF 24-70mm f/2.8L")); + choices.insert (p_t (231, "Canon EF 17-40mm f/4L")); + choices.insert (p_t (232, "Canon EF 70-300mm f/4.5-5.6 DO IS USM")); + choices.insert (p_t (233, "Canon EF 28-300mm f/3.5-5.6L IS")); + choices.insert (p_t (234, "Canon EF-S 17-85mm f/4-5.6 IS USM or Tokina Lens")); + choices.insert (p_t (234, "Tokina AT-X 12-28 PRO DX 12-28mm f/4")); + choices.insert (p_t (235, "Canon EF-S 10-22mm f/3.5-4.5 USM")); + choices.insert (p_t (236, "Canon EF-S 60mm f/2.8 Macro USM")); + choices.insert (p_t (237, "Canon EF 24-105mm f/4L IS")); + choices.insert (p_t (238, "Canon EF 70-300mm f/4-5.6 IS USM")); + choices.insert (p_t (239, "Canon EF 85mm f/1.2L II")); + choices.insert (p_t (240, "Canon EF-S 17-55mm f/2.8 IS USM")); + choices.insert (p_t (241, "Canon EF 50mm f/1.2L")); + choices.insert (p_t (242, "Canon EF 70-200mm f/4L IS")); + choices.insert (p_t (243, "Canon EF 70-200mm f/4L IS + 1.4x")); + choices.insert (p_t (244, "Canon EF 70-200mm f/4L IS + 2x")); + choices.insert (p_t (245, "Canon EF 70-200mm f/4L IS + 2.8x")); + choices.insert (p_t (246, "Canon EF 16-35mm f/2.8L II")); + choices.insert (p_t (247, "Canon EF 14mm f/2.8L II USM")); + choices.insert (p_t (248, "Canon EF 200mm f/2L IS or Sigma Lens")); + choices.insert (p_t (248, "Sigma 24-35mm f/2 DG HSM | A")); + choices.insert (p_t (249, "Canon EF 800mm f/5.6L IS")); + choices.insert (p_t (250, "Canon EF 24mm f/1.4L II or Sigma Lens")); + choices.insert (p_t (250, "Sigma 20mm f/1.4 DG HSM | A")); + choices.insert (p_t (251, "Canon EF 70-200mm f/2.8L IS II USM")); + choices.insert (p_t (252, "Canon EF 70-200mm f/2.8L IS II USM + 1.4x")); + choices.insert (p_t (253, "Canon EF 70-200mm f/2.8L IS II USM + 2x")); + choices.insert (p_t (254, "Canon EF 100mm f/2.8L Macro IS USM")); + choices.insert (p_t (255, "Sigma 24-105mm f/4 DG OS HSM | A or Other Sigma Lens")); + choices.insert (p_t (255, "Sigma 180mm f/2.8 EX DG OS HSM APO Macro")); + choices.insert (p_t (488, "Canon EF-S 15-85mm f/3.5-5.6 IS USM")); + choices.insert (p_t (489, "Canon EF 70-300mm f/4-5.6L IS USM")); + choices.insert (p_t (490, "Canon EF 8-15mm f/4L Fisheye USM")); + choices.insert (p_t (491, "Canon EF 300mm f/2.8L IS II USM or Tamron Lens")); + choices.insert (p_t (491, "Tamron SP 70-200mm f/2.8 Di VC USD G2 (A025)")); + choices.insert (p_t (492, "Canon EF 400mm f/2.8L IS II USM")); + choices.insert (p_t (493, "Canon EF 500mm f/4L IS II USM or EF 24-105mm f4L IS USM")); + choices.insert (p_t (493, "Canon EF 24-105mm f/4L IS USM")); + choices.insert (p_t (494, "Canon EF 600mm f/4.0L IS II USM")); + choices.insert (p_t (495, "Canon EF 24-70mm f/2.8L II USM")); + choices.insert (p_t (496, "Canon EF 200-400mm f/4L IS USM")); + choices.insert (p_t (499, "Canon EF 200-400mm f/4L IS USM + 1.4x")); + choices.insert (p_t (502, "Canon EF 28mm f/2.8 IS USM")); + choices.insert (p_t (503, "Canon EF 24mm f/2.8 IS USM")); + choices.insert (p_t (504, "Canon EF 24-70mm f/4L IS USM")); + choices.insert (p_t (505, "Canon EF 35mm f/2 IS USM")); + choices.insert (p_t (506, "Canon EF 400mm f/4 DO IS II USM")); + choices.insert (p_t (507, "Canon EF 16-35mm f/4L IS USM")); + choices.insert (p_t (508, "Canon EF 11-24mm f/4L USM")); + choices.insert (p_t (747, "Canon EF 100-400mm f/4.5-5.6L IS II USM or Tamron Lens")); + choices.insert (p_t (747, "Tamron SP 150-600mm F5-6.3 Di VC USD G2")); + choices.insert (p_t (748, "Canon EF 100-400mm f/4.5-5.6L IS II USM + 1.4x")); + choices.insert (p_t (750, "Canon EF 35mm f/1.4L II USM")); + choices.insert (p_t (751, "Canon EF 16-35mm f/2.8L III USM")); + choices.insert (p_t (752, "Canon EF 24-105mm f/4L IS II USM")); + choices.insert (p_t (4142, "Canon EF-S 18-135mm f/3.5-5.6 IS STM")); + choices.insert (p_t (4143, "Canon EF-M 18-55mm f/3.5-5.6 IS STM or Tamron Lens")); + choices.insert (p_t (4143, "Tamron 18-200mm f/3.5-6.3 Di III VC")); + choices.insert (p_t (4144, "Canon EF 40mm f/2.8 STM")); + choices.insert (p_t (4145, "Canon EF-M 22mm f/2 STM")); + choices.insert (p_t (4146, "Canon EF-S 18-55mm f/3.5-5.6 IS STM")); + choices.insert (p_t (4147, "Canon EF-M 11-22mm f/4-5.6 IS STM")); + choices.insert (p_t (4148, "Canon EF-S 55-250mm f/4-5.6 IS STM")); + choices.insert (p_t (4149, "Canon EF-M 55-200mm f/4.5-6.3 IS STM")); + choices.insert (p_t (4150, "Canon EF-S 10-18mm f/4.5-5.6 IS STM")); + choices.insert (p_t (4152, "Canon EF 24-105mm f/3.5-5.6 IS STM")); + choices.insert (p_t (4153, "Canon EF-M 15-45mm f/3.5-6.3 IS STM")); + choices.insert (p_t (4154, "Canon EF-S 24mm f/2.8 STM")); + choices.insert (p_t (4155, "Canon EF-M 28mm f/3.5 Macro IS STM")); + choices.insert (p_t (4156, "Canon EF 50mm f/1.8 STM")); + choices.insert (p_t (4157, "Canon EF-M 18-150mm 1:3.5-6.3 IS STM")); + choices.insert (p_t (4158, "Canon EF-S 18-55mm f/4-5.6 IS STM")); + choices.insert (p_t (36910, "Canon EF 70-300mm f/4-5.6 IS II USM")); + choices.insert (p_t (36912, "Canon EF-S 18-135mm f/3.5-5.6 IS USM")); + choices.insert (p_t (65535, "n/a")); } virtual std::string toString (Tag* t) @@ -897,43 +906,43 @@ public: int lensID = t->toInt(); it_t r; - size_t nFound = choices.count( lensID ); + size_t nFound = choices.count ( lensID ); - if(1 == nFound) { + if (1 == nFound) { r = choices.find ( lensID ); return r->second; } - Tag *apertureTag = t->getParent()->getRoot()->findTag("MaxAperture"); - Tag *focalLengthTag = t->getParent()->getRoot()->findTag("FocalLength"); - Tag *focalLengthMaxTag = t->getParent()->getRoot()->findTag("LongFocal"); - Tag *focalLengthMinTag = t->getParent()->getRoot()->findTag("ShortFocal"); - Tag *unitTag = t->getParent()->getRoot()->findTag("FocalUnits"); + Tag *apertureTag = t->getParent()->getRoot()->findTag ("MaxAperture"); + Tag *focalLengthTag = t->getParent()->getRoot()->findTag ("FocalLength"); + Tag *focalLengthMaxTag = t->getParent()->getRoot()->findTag ("LongFocal"); + Tag *focalLengthMinTag = t->getParent()->getRoot()->findTag ("ShortFocal"); + Tag *unitTag = t->getParent()->getRoot()->findTag ("FocalUnits"); double maxApertureAtFocal = 0.; double focalLength = 0.; double focalLengthMin = 0.; double focalLengthMax = 0.; - if( apertureTag ) { - maxApertureAtFocal = pow(2.0, apertureTag->toDouble() / 64.0); + if ( apertureTag ) { + maxApertureAtFocal = pow (2.0, apertureTag->toDouble() / 64.0); } - if( unitTag ) { + if ( unitTag ) { double unit = unitTag->toDouble(); - if( unit == 0. ) { + if ( unit == 0. ) { unit = 1; } - if( focalLengthTag ) { + if ( focalLengthTag ) { focalLength = focalLengthTag->toDouble(); } - if( focalLengthMinTag ) { + if ( focalLengthMinTag ) { focalLengthMin = focalLengthMinTag->toDouble() / unit; } - if( focalLengthMaxTag ) { + if ( focalLengthMaxTag ) { focalLengthMax = focalLengthMaxTag->toDouble() / unit; } } @@ -961,56 +970,57 @@ public: double deltaMin = 1000.; - std::string bestMatch(s.str()); + std::string bestMatch (s.str()); std::ostringstream candidates; - for (r = choices.lower_bound(lensID); r != choices.upper_bound(lensID); r++) { + for (r = choices.lower_bound (lensID); r != choices.upper_bound (lensID); r++) { double a1, a2, f1, f2, dif; - if( !extractLensInfo( r->second , f1, f2, a1, a2) ) { + if ( !extractLensInfo ( r->second, f1, f2, a1, a2) ) { continue; } - if( f1 == 0. || a1 == 0.) { + if ( f1 == 0. || a1 == 0.) { continue; } - if( focalLength < f1 - .5 || focalLength > f2 + 0.5 ) { + if ( focalLength < f1 - .5 || focalLength > f2 + 0.5 ) { continue; } - if( focalLengthMin > 0. && fabs(f1 - focalLengthMin) > 0.5 ) { + if ( focalLengthMin > 0. && fabs (f1 - focalLengthMin) > 0.5 ) { continue; } - if( focalLengthMax > 0. && fabs(f2 - focalLengthMax) > 0.5 ) { + if ( focalLengthMax > 0. && fabs (f2 - focalLengthMax) > 0.5 ) { continue; } - if( maxApertureAtFocal > 0.1) { + if ( maxApertureAtFocal > 0.1) { double lensAperture; - if( maxApertureAtFocal < a1 - 0.15 || maxApertureAtFocal > a2 + 0.15) { + + if ( maxApertureAtFocal < a1 - 0.15 || maxApertureAtFocal > a2 + 0.15) { continue; } - if( a1 == a2 || f1 == f2) { + if ( a1 == a2 || f1 == f2) { lensAperture = a1; } else { - lensAperture = exp( log(a1) + (log(a2) - log(a1)) / (log(f2) - log(f1)) * (log(focalLength) - log(f1)) ); + lensAperture = exp ( log (a1) + (log (a2) - log (a1)) / (log (f2) - log (f1)) * (log (focalLength) - log (f1)) ); } - dif = abs(lensAperture - maxApertureAtFocal); + dif = abs (lensAperture - maxApertureAtFocal); } else { dif = 0; } - if( dif < deltaMin ) { + if ( dif < deltaMin ) { deltaMin = dif; bestMatch = r->second; } - if( dif < 0.15) { - if( candidates.tellp() ) { + if ( dif < 0.15) { + if ( candidates.tellp() ) { candidates << "\n or " << r->second; } else { candidates << r->second; @@ -1019,7 +1029,7 @@ public: } - if( !candidates.tellp() ) { + if ( !candidates.tellp() ) { return bestMatch; } else { return candidates.str(); @@ -1047,7 +1057,7 @@ public: { int val = t->toInt(); - if( val < 40 ) { + if ( val < 40 ) { return "undef"; } @@ -1094,10 +1104,10 @@ public: } virtual double toDouble (Tag* t, int ofs) { - int a = Interpreter::toInt(t, ofs); + int a = Interpreter::toInt (t, ofs); - if(a > 1) { - double i = pow(2., double(a) / 32. - 4.) * 50.; + if (a > 1) { + double i = pow (2., double (a) / 32. - 4.) * 50.; return i; } else { return 0.; @@ -1105,10 +1115,10 @@ public: } virtual int toInt (Tag* t, int ofs, TagType astype) { - int a = Interpreter::toInt(t, ofs, astype); + int a = Interpreter::toInt (t, ofs, astype); - if(a > 1) { - int i = int(double(powf(2.f, float(a) / 32.f - 4.f)) * 50.f + 0.5f); + if (a > 1) { + int i = int (double (powf (2.f, float (a) / 32.f - 4.f)) * 50.f + 0.5f); return i; } else { return 0; @@ -1181,10 +1191,13 @@ public: CAPictureStyleInterpreter() { choices[0] = "None"; - choices[1] = "Standard "; - choices[2] = "Set 1"; - choices[3] = "Set 2"; - choices[4] = "Set 3"; + choices[1] = "Standard"; + choices[2] = "Portrait"; + choices[3] = "High Saturation"; + choices[4] = "Adobe RGB"; + choices[5] = "Low Saturation"; + choices[6] = "CM Set 1"; + choices[7] = "CM Set 2"; choices[0x21] = "User Def. 1"; choices[0x22] = "User Def. 2"; choices[0x23] = "User Def. 3"; @@ -1223,7 +1236,7 @@ public: { int n = t->toInt(); - if( n == -1) { + if ( n == -1) { return "undef"; } @@ -1308,7 +1321,7 @@ public: { choices[248] = "EOS High-end"; choices[250] = "Compact"; - choices[252] = "EOS Mid-end"; + choices[252] = "EOS Mid-range"; choices[255] = "DV Camera"; } }; @@ -1429,7 +1442,7 @@ class CAFileNumberInterpreter : public Interpreter public: virtual std::string toString (Tag* t) { - unsigned long val = t->toInt(0, LONG); + unsigned long val = t->toInt (0, LONG); char buffer[32]; sprintf (buffer, "%ld", ((val & 0xffc0) >> 6) * 10000 + ((val >> 16) & 0xff) + ((val & 0x3f) << 8) ); return buffer; @@ -1437,315 +1450,319 @@ public: }; CAFileNumberInterpreter caFileNumberInterpreter; +// CanonModelID class CAModelIDInterpreter : public ChoiceInterpreter { public: CAModelIDInterpreter () { - choices[0x1010000] = "PowerShot A30"; - choices[0x1040000] = "PowerShot S300 / Digital IXUS 300 / IXY Digital 300"; - choices[0x1060000] = "PowerShot A20"; - choices[0x1080000] = "PowerShot A10"; - choices[0x1090000] = "PowerShot S110 / Digital IXUS v / IXY Digital 200"; - choices[0x1100000] = "PowerShot G2"; - choices[0x1110000] = "PowerShot S40"; - choices[0x1120000] = "PowerShot S30"; - choices[0x1130000] = "PowerShot A40"; - choices[0x1140000] = "EOS D30"; - choices[0x1150000] = "PowerShot A100"; - choices[0x1160000] = "PowerShot S200 / Digital IXUS v2 / IXY Digital 200a"; - choices[0x1170000] = "PowerShot A200"; - choices[0x1180000] = "PowerShot S330 / Digital IXUS 330 / IXY Digital 300a"; - choices[0x1190000] = "PowerShot G3"; - choices[0x1210000] = "PowerShot S45"; - choices[0x1230000] = "PowerShot SD100 / Digital IXUS II / IXY Digital 30"; - choices[0x1240000] = "PowerShot S230 / Digital IXUS v3 / IXY Digital 320"; - choices[0x1250000] = "PowerShot A70"; - choices[0x1260000] = "PowerShot A60"; - choices[0x1270000] = "PowerShot S400 / Digital IXUS 400 / IXY Digital 400"; - choices[0x1290000] = "PowerShot G5"; - choices[0x1300000] = "PowerShot A300"; - choices[0x1310000] = "PowerShot S50"; - choices[0x1340000] = "PowerShot A80"; - choices[0x1350000] = "PowerShot SD10 / Digital IXUS i / IXY Digital L"; - choices[0x1360000] = "PowerShot S1 IS"; - choices[0x1370000] = "PowerShot Pro1"; - choices[0x1380000] = "PowerShot S70"; - choices[0x1390000] = "PowerShot S60"; - choices[0x1400000] = "PowerShot G6"; - choices[0x1410000] = "PowerShot S500 / Digital IXUS 500 / IXY Digital 500"; - choices[0x1420000] = "PowerShot A75"; - choices[0x1440000] = "PowerShot SD110 / Digital IXUS IIs / IXY Digital 30a"; - choices[0x1450000] = "PowerShot A400"; - choices[0x1470000] = "PowerShot A310"; - choices[0x1490000] = "PowerShot A85"; - choices[0x1520000] = "PowerShot S410 / Digital IXUS 430 / IXY Digital 450"; - choices[0x1530000] = "PowerShot A95"; - choices[0x1540000] = "PowerShot SD300 / Digital IXUS 40 / IXY Digital 50"; - choices[0x1550000] = "PowerShot SD200 / Digital IXUS 30 / IXY Digital 40"; - choices[0x1560000] = "PowerShot A520"; - choices[0x1570000] = "PowerShot A510"; - choices[0x1590000] = "PowerShot SD20 / Digital IXUS i5 / IXY Digital L2"; - choices[0x1640000] = "PowerShot S2 IS"; - choices[0x1650000] = "PowerShot SD430 / Digital IXUS Wireless / IXY Digital Wireless"; - choices[0x1660000] = "PowerShot SD500 / Digital IXUS 700 / IXY Digital 600"; - choices[0x1668000] = "EOS D60"; - choices[0x1700000] = "PowerShot SD30 / Digital IXUS i Zoom / IXY Digital L3"; - choices[0x1740000] = "PowerShot A430"; - choices[0x1750000] = "PowerShot A410"; - choices[0x1760000] = "PowerShot S80"; - choices[0x1780000] = "PowerShot A620"; - choices[0x1790000] = "PowerShot A610"; - choices[0x1800000] = "PowerShot SD630 / Digital IXUS 65 / IXY Digital 80"; - choices[0x1810000] = "PowerShot SD450 / Digital IXUS 55 / IXY Digital 60"; - choices[0x1820000] = "PowerShot TX1"; - choices[0x1870000] = "PowerShot SD400 / Digital IXUS 50 / IXY Digital 55"; - choices[0x1880000] = "PowerShot A420"; - choices[0x1890000] = "PowerShot SD900 / Digital IXUS 900 Ti / IXY Digital 1000"; - choices[0x1900000] = "PowerShot SD550 / Digital IXUS 750 / IXY Digital 700"; - choices[0x1920000] = "PowerShot A700"; - choices[0x1940000] = "PowerShot SD700 IS / Digital IXUS 800 IS / IXY Digital 800 IS"; - choices[0x1950000] = "PowerShot S3 IS"; - choices[0x1960000] = "PowerShot A540"; - choices[0x1970000] = "PowerShot SD600 / Digital IXUS 60 / IXY Digital 70"; - choices[0x1980000] = "PowerShot G7"; - choices[0x1990000] = "PowerShot A530"; - choices[0x2000000] = "PowerShot SD800 IS / Digital IXUS 850 IS / IXY Digital 900 IS"; - choices[0x2010000] = "PowerShot SD40 / Digital IXUS i7 / IXY Digital L4"; - choices[0x2020000] = "PowerShot A710 IS"; - choices[0x2030000] = "PowerShot A640"; - choices[0x2040000] = "PowerShot A630"; - choices[0x2090000] = "PowerShot S5 IS"; - choices[0x2100000] = "PowerShot A460"; - choices[0x2120000] = "PowerShot SD850 IS / Digital IXUS 950 IS / IXY Digital 810 IS"; - choices[0x2130000] = "PowerShot A570 IS"; - choices[0x2140000] = "PowerShot A560"; - choices[0x2150000] = "PowerShot SD750 / Digital IXUS 75 / IXY Digital 90"; - choices[0x2160000] = "PowerShot SD1000 / Digital IXUS 70 / IXY Digital 10"; - choices[0x2180000] = "PowerShot A550"; - choices[0x2190000] = "PowerShot A450"; - choices[0x2230000] = "PowerShot G9"; - choices[0x2240000] = "PowerShot A650 IS"; - choices[0x2260000] = "PowerShot A720 IS"; - choices[0x2290000] = "PowerShot SX100 IS"; - choices[0x2300000] = "PowerShot SD950 IS / Digital IXUS 960 IS / IXY Digital 2000 IS"; - choices[0x2310000] = "PowerShot SD870 IS / Digital IXUS 860 IS / IXY Digital 910 IS"; - choices[0x2320000] = "PowerShot SD890 IS / Digital IXUS 970 IS / IXY Digital 820 IS"; - choices[0x2360000] = "PowerShot SD790 IS / Digital IXUS 90 IS / IXY Digital 95 IS"; - choices[0x2370000] = "PowerShot SD770 IS / Digital IXUS 85 IS / IXY Digital 25 IS"; - choices[0x2380000] = "PowerShot A590 IS"; - choices[0x2390000] = "PowerShot A580"; - choices[0x2420000] = "PowerShot A470"; - choices[0x2430000] = "PowerShot SD1100 IS / Digital IXUS 80 IS / IXY Digital 20 IS"; - choices[0x2460000] = "PowerShot SX1 IS"; - choices[0x2470000] = "PowerShot SX10 IS"; - choices[0x2480000] = "PowerShot A1000 IS"; - choices[0x2490000] = "PowerShot G10"; - choices[0x2510000] = "PowerShot A2000 IS"; - choices[0x2520000] = "PowerShot SX110 IS"; - choices[0x2530000] = "PowerShot SD990 IS / Digital IXUS 980 IS / IXY Digital 3000 IS"; - choices[0x2540000] = "PowerShot SD880 IS / Digital IXUS 870 IS / IXY Digital 920 IS"; - choices[0x2550000] = "PowerShot E1"; - choices[0x2560000] = "PowerShot D10"; - choices[0x2570000] = "PowerShot SD960 IS / Digital IXUS 110 IS / IXY Digital 510 IS"; - choices[0x2580000] = "PowerShot A2100 IS"; - choices[0x2590000] = "PowerShot A480"; - choices[0x2600000] = "PowerShot SX200 IS"; - choices[0x2610000] = "PowerShot SD970 IS / Digital IXUS 990 IS / IXY Digital 830 IS"; - choices[0x2620000] = "PowerShot SD780 IS / Digital IXUS 100 IS / IXY Digital 210 IS"; - choices[0x2630000] = "PowerShot A1100 IS"; - choices[0x2640000] = "PowerShot SD1200 IS / Digital IXUS 95 IS / IXY Digital 110 IS"; - choices[0x2700000] = "PowerShot G11"; - choices[0x2710000] = "PowerShot SX120 IS"; - choices[0x2720000] = "PowerShot S90"; - choices[0x2750000] = "PowerShot SX20 IS"; - choices[0x2760000] = "PowerShot SD980 IS / Digital IXUS 200 IS / IXY Digital 930 IS"; - choices[0x2770000] = "PowerShot SD940 IS / Digital IXUS 120 IS / IXY Digital 220 IS"; - choices[0x2800000] = "PowerShot A495"; - choices[0x2810000] = "PowerShot A490"; - choices[0x2820000] = "PowerShot A3100 IS / A3150 IS"; - choices[0x2830000] = "PowerShot A3000 IS"; - choices[0x2840000] = "PowerShot SD1400 IS / IXUS 130 / IXY 400F"; - choices[0x2850000] = "PowerShot SD1300 IS / IXUS 105 / IXY 200F"; - choices[0x2860000] = "PowerShot SD3500 IS / IXUS 210 / IXY 10S"; - choices[0x2870000] = "PowerShot SX210 IS"; - choices[0x2880000] = "PowerShot SD4000 IS / IXUS 300 HS / IXY 30S"; - choices[0x2890000] = "PowerShot SD4500 IS / IXUS 1000 HS / IXY 50S"; - choices[0x2920000] = "PowerShot G12"; - choices[0x2930000] = "PowerShot SX30 IS"; - choices[0x2940000] = "PowerShot SX130 IS"; - choices[0x2950000] = "PowerShot S95"; - choices[0x2980000] = "PowerShot A3300 IS"; - choices[0x2990000] = "PowerShot A3200 IS"; - choices[0x3000000] = "PowerShot ELPH 500 HS / IXUS 310 HS / IXY 31S"; - choices[0x3010000] = "PowerShot Pro90 IS"; - choices[0x3010001] = "PowerShot A800"; - choices[0x3020000] = "PowerShot ELPH 100 HS / IXUS 115 HS / IXY 210F"; - choices[0x3030000] = "PowerShot SX230 HS"; - choices[0x3040000] = "PowerShot ELPH 300 HS / IXUS 220 HS / IXY 410F"; - choices[0x3050000] = "PowerShot A2200"; - choices[0x3060000] = "PowerShot A1200"; - choices[0x3070000] = "PowerShot SX220 HS"; - choices[0x3080000] = "PowerShot G1 X"; - choices[0x3090000] = "PowerShot SX150 IS"; - choices[0x3100000] = "PowerShot ELPH 510 HS / IXUS 1100 HS / IXY 51S"; - choices[0x3110000] = "PowerShot S100 (new)"; - choices[0x3120000] = "PowerShot ELPH 310 HS / IXUS 230 HS / IXY 600F"; - choices[0x3130000] = "PowerShot SX40 HS"; - choices[0x3140000] = "IXY 32S"; - choices[0x3160000] = "PowerShot A1300"; - choices[0x3170000] = "PowerShot A810"; - choices[0x3180000] = "PowerShot ELPH 320 HS / IXUS 240 HS / IXY 420F"; - choices[0x3190000] = "PowerShot ELPH 110 HS / IXUS 125 HS / IXY 220F"; - choices[0x3200000] = "PowerShot D20"; - choices[0x3210000] = "PowerShot A4000 IS"; - choices[0x3220000] = "PowerShot SX260 HS"; - choices[0x3230000] = "PowerShot SX240 HS"; - choices[0x3240000] = "PowerShot ELPH 530 HS / IXUS 510 HS / IXY 1"; - choices[0x3250000] = "PowerShot ELPH 520 HS / IXUS 500 HS / IXY 3"; - choices[0x3260000] = "PowerShot A3400 IS"; - choices[0x3270000] = "PowerShot A2400 IS"; - choices[0x3280000] = "PowerShot A2300"; - choices[0x3330000] = "PowerShot G15"; - choices[0x3340000] = "PowerShot SX50"; - choices[0x3350000] = "PowerShot SX160 IS"; - choices[0x3360000] = "PowerShot S110 (new)"; - choices[0x3370000] = "PowerShot SX500 IS"; - choices[0x3380000] = "PowerShot N"; - choices[0x3390000] = "IXUS 245 HS / IXY 430F"; - choices[0x3400000] = "PowerShot SX280 HS"; - choices[0x3410000] = "PowerShot SX270 HS"; - choices[0x3420000] = "PowerShot A3500 IS"; - choices[0x3430000] = "PowerShot A2600"; - choices[0x3450000] = "PowerShot A1400"; - choices[0x3460000] = "PowerShot ELPH 130 IS / IXUS 140 / IXY 110F"; - choices[0x3470000] = "PowerShot ELPH 115/120 IS / IXUS 132/135 / IXY 90F/100F"; - choices[0x3490000] = "PowerShot ELPH 330 HS / IXUS 255 HS / IXY 610F"; - choices[0x3510000] = "PowerShot A2500"; - choices[0x3540000] = "PowerShot G16"; - choices[0x3550000] = "PowerShot S120"; - choices[0x3560000] = "PowerShot SX170 IS"; - choices[0x3580000] = "PowerShot SX510 HS"; - choices[0x3590000] = "PowerShot S200 (new)"; - choices[0x3600000] = "IXY 620F"; - choices[0x3610000] = "PowerShot N100"; - choices[0x3640000] = "PowerShot G1 X Mark II"; - choices[0x3650000] = "PowerShot D30"; - choices[0x3660000] = "PowerShot SX700 HS"; - choices[0x3670000] = "PowerShot SX600 HS"; - choices[0x3680000] = "PowerShot ELPH 140 IS / IXUS 150 / IXY 130"; - choices[0x3690000] = "PowerShot ELPH 135 / IXUS 145 / IXY 120"; - choices[0x3700000] = "PowerShot ELPH 340 HS / IXUS 265 HS / IXY 630"; - choices[0x3710000] = "PowerShot ELPH 150 IS / IXUS 155 / IXY 140"; - choices[0x3740000] = "EOS M3"; - choices[0x3750000] = "PowerShot SX60 HS"; - choices[0x3760000] = "PowerShot SX520 HS"; - choices[0x3770000] = "PowerShot SX400 IS"; - choices[0x3780000] = "PowerShot G7 X"; - choices[0x3790000] = "PowerShot N2"; - choices[0x3800000] = "PowerShot SX530 HS"; - choices[0x3820000] = "PowerShot SX710 HS"; - choices[0x3830000] = "PowerShot SX610 HS"; - choices[0x3840000] = "EOS M10"; - choices[0x3850000] = "PowerShot G3 X"; - choices[0x3860000] = "PowerShot ELPH 165 HS / IXUS 165 / IXY 160"; - choices[0x3870000] = "PowerShot ELPH 160 / IXUS 160"; - choices[0x3880000] = "PowerShot ELPH 350 HS / IXUS 275 HS / IXY 640"; - choices[0x3890000] = "PowerShot ELPH 170 IS / IXUS 170"; - choices[0x3910000] = "PowerShot SX410 IS"; - choices[0x3930000] = "PowerShot G9 X"; - choices[0x3950000] = "PowerShot G5 X"; - choices[0x3970000] = "PowerShot G7 X Mark II"; - choices[0x3990000] = "PowerShot ELPH 360 HS / IXUS 285 HS / IXY 650"; - choices[0x4010000] = "PowerShot SX540 HS"; - choices[0x4020000] = "PowerShot SX420 IS"; - choices[0x4030000] = "PowerShot ELPH 190 IS / IXUS 180 / IXY 190"; - choices[0x4040000] = "PowerShot G1"; - choices[0x4040001] = "IXY 180"; - choices[0x4050000] = "PowerShot SX720 HS"; - choices[0x6040000] = "PowerShot S100 / Digital IXUS / IXY Digital"; - choices[0x4007d673] = "DC19/DC21/DC22"; - choices[0x4007d674] = "XH A1"; - choices[0x4007d675] = "HV10"; - choices[0x4007d676] = "MD130/MD140/MD150/MD160/ZR850"; - choices[0x4007d777] = "DC50"; - choices[0x4007d778] = "HV20"; - choices[0x4007d779] = "DC211"; - choices[0x4007d77a] = "HG10"; - choices[0x4007d77b] = "HR10"; - choices[0x4007d77d] = "MD255/ZR950"; - choices[0x4007d81c] = "HF11"; - choices[0x4007d878] = "HV30"; - choices[0x4007d87c] = "XH A1S"; - choices[0x4007d87e] = "DC301/DC310/DC311/DC320/DC330"; - choices[0x4007d87f] = "FS100"; - choices[0x4007d880] = "HF10"; - choices[0x4007d882] = "HG20/HG21"; - choices[0x4007d925] = "HF21"; - choices[0x4007d926] = "HF S11"; - choices[0x4007d978] = "HV40"; - choices[0x4007d987] = "DC410/DC411/DC420"; - choices[0x4007d988] = "FS19/FS20/FS21/FS22/FS200"; - choices[0x4007d989] = "HF20/HF200"; - choices[0x4007d98a] = "HF S10/S100"; - choices[0x4007da8e] = "HF R10/R16/R17/R18/R100/R106"; - choices[0x4007da8f] = "HF M30/M31/M36/M300/M306"; - choices[0x4007da90] = "HF S20/S21/S200"; - choices[0x4007da92] = "FS31/FS36/FS37/FS300/FS305/FS306/FS307"; - choices[0x4007dda9] = "HF G25"; - choices[0x4007dfb4] = "XC10"; - choices[0x80000001] = "EOS-1D"; - choices[0x80000167] = "EOS-1DS"; - choices[0x80000168] = "EOS 10D"; - choices[0x80000169] = "EOS-1D Mark III"; - choices[0x80000170] = "EOS Digital Rebel / 300D / Kiss Digital"; - choices[0x80000174] = "EOS-1D Mark II"; - choices[0x80000175] = "EOS 20D"; - choices[0x80000176] = "EOS Digital Rebel XSi / 450D / Kiss X2"; - choices[0x80000188] = "EOS-1Ds Mark II"; - choices[0x80000189] = "EOS Digital Rebel XT / 350D / Kiss Digital N"; - choices[0x80000190] = "EOS 40D"; - choices[0x80000213] = "EOS 5D"; - choices[0x80000215] = "EOS-1Ds Mark III"; - choices[0x80000218] = "EOS 5D Mark II"; - choices[0x80000219] = "WFT-E1"; - choices[0x80000232] = "EOS-1D Mark II N"; - choices[0x80000234] = "EOS 30D"; - choices[0x80000236] = "EOS Digital Rebel XTi / 400D / Kiss Digital X"; - choices[0x80000241] = "WFT-E2"; - choices[0x80000246] = "WFT-E3"; - choices[0x80000250] = "EOS 7D"; - choices[0x80000252] = "EOS Rebel T1i / 500D / Kiss X3"; - choices[0x80000254] = "EOS Rebel XS / 1000D / Kiss F"; - choices[0x80000261] = "EOS 50D"; - choices[0x80000269] = "EOS-1D X"; - choices[0x80000270] = "EOS Rebel T2i / 550D / Kiss X4"; - choices[0x80000271] = "WFT-E4"; - choices[0x80000273] = "WFT-E5"; - choices[0x80000281] = "EOS-1D Mark IV"; - choices[0x80000285] = "EOS 5D Mark III"; - choices[0x80000286] = "EOS Rebel T3i / 600D / Kiss X5"; - choices[0x80000287] = "EOS 60D"; - choices[0x80000288] = "EOS Rebel T3 / 1100D / Kiss X50"; - choices[0x80000289] = "EOS 7D Mark II"; - choices[0x80000297] = "WFT-E2 II"; - choices[0x80000298] = "WFT-E4 II"; - choices[0x80000301] = "EOS Rebel T4i / 650D / Kiss X6i"; - choices[0x80000302] = "EOS 6D"; - choices[0x80000324] = "EOS-1D C"; - choices[0x80000325] = "EOS 70D"; - choices[0x80000326] = "EOS Rebel T5i / 700D / Kiss X7i"; - choices[0x80000327] = "EOS Rebel T5 / 1200D / Kiss X70"; - choices[0x80000328] = "EOS-1D X MARK II"; - choices[0x80000331] = "EOS M"; - choices[0x80000346] = "EOS Rebel SL1 / 100D / Kiss X7"; - choices[0x80000347] = "EOS Rebel T6s / 760D / 8000D"; - choices[0x80000350] = "EOS 80D"; - choices[0x80000355] = "EOS M2"; - choices[0x80000382] = "EOS 5DS"; - choices[0x80000393] = "EOS Rebel T6i / 750D / Kiss X8i"; - choices[0x80000401] = "EOS 5DS R"; - choices[0x80000404] = "EOS Rebel T6 / 1300D / Kiss X80"; + choices[16842752] = "PowerShot A30"; + choices[17039360] = "PowerShot S300 / Digital IXUS 300 / IXY Digital 300"; + choices[17170432] = "PowerShot A20"; + choices[17301504] = "PowerShot A10"; + choices[17367040] = "PowerShot S110 / Digital IXUS v / IXY Digital 200"; + choices[17825792] = "PowerShot G2"; + choices[17891328] = "PowerShot S40"; + choices[17956864] = "PowerShot S30"; + choices[18022400] = "PowerShot A40"; + choices[18087936] = "EOS D30"; + choices[18153472] = "PowerShot A100"; + choices[18219008] = "PowerShot S200 / Digital IXUS v2 / IXY Digital 200a"; + choices[18284544] = "PowerShot A200"; + choices[18350080] = "PowerShot S330 / Digital IXUS 330 / IXY Digital 300a"; + choices[18415616] = "PowerShot G3"; + choices[18939904] = "PowerShot S45"; + choices[19070976] = "PowerShot SD100 / Digital IXUS II / IXY Digital 30"; + choices[19136512] = "PowerShot S230 / Digital IXUS v3 / IXY Digital 320"; + choices[19202048] = "PowerShot A70"; + choices[19267584] = "PowerShot A60"; + choices[19333120] = "PowerShot S400 / Digital IXUS 400 / IXY Digital 400"; + choices[19464192] = "PowerShot G5"; + choices[19922944] = "PowerShot A300"; + choices[19988480] = "PowerShot S50"; + choices[20185088] = "PowerShot A80"; + choices[20250624] = "PowerShot SD10 / Digital IXUS i / IXY Digital L"; + choices[20316160] = "PowerShot S1 IS"; + choices[20381696] = "PowerShot Pro1"; + choices[20447232] = "PowerShot S70"; + choices[20512768] = "PowerShot S60"; + choices[20971520] = "PowerShot G6"; + choices[21037056] = "PowerShot S500 / Digital IXUS 500 / IXY Digital 500"; + choices[21102592] = "PowerShot A75"; + choices[21233664] = "PowerShot SD110 / Digital IXUS IIs / IXY Digital 30a"; + choices[21299200] = "PowerShot A400"; + choices[21430272] = "PowerShot A310"; + choices[21561344] = "PowerShot A85"; + choices[22151168] = "PowerShot S410 / Digital IXUS 430 / IXY Digital 450"; + choices[22216704] = "PowerShot A95"; + choices[22282240] = "PowerShot SD300 / Digital IXUS 40 / IXY Digital 50"; + choices[22347776] = "PowerShot SD200 / Digital IXUS 30 / IXY Digital 40"; + choices[22413312] = "PowerShot A520"; + choices[22478848] = "PowerShot A510"; + choices[22609920] = "PowerShot SD20 / Digital IXUS i5 / IXY Digital L2"; + choices[23330816] = "PowerShot S2 IS"; + choices[23396352] = "PowerShot SD430 / Digital IXUS Wireless / IXY Digital Wireless"; + choices[23461888] = "PowerShot SD500 / Digital IXUS 700 / IXY Digital 600"; + choices[23494656] = "EOS D60"; + choices[24117248] = "PowerShot SD30 / Digital IXUS i Zoom / IXY Digital L3"; + choices[24379392] = "PowerShot A430"; + choices[24444928] = "PowerShot A410"; + choices[24510464] = "PowerShot S80"; + choices[24641536] = "PowerShot A620"; + choices[24707072] = "PowerShot A610"; + choices[25165824] = "PowerShot SD630 / Digital IXUS 65 / IXY Digital 80"; + choices[25231360] = "PowerShot SD450 / Digital IXUS 55 / IXY Digital 60"; + choices[25296896] = "PowerShot TX1"; + choices[25624576] = "PowerShot SD400 / Digital IXUS 50 / IXY Digital 55"; + choices[25690112] = "PowerShot A420"; + choices[25755648] = "PowerShot SD900 / Digital IXUS 900 Ti / IXY Digital 1000"; + choices[26214400] = "PowerShot SD550 / Digital IXUS 750 / IXY Digital 700"; + choices[26345472] = "PowerShot A700"; + choices[26476544] = "PowerShot SD700 IS / Digital IXUS 800 IS / IXY Digital 800 IS"; + choices[26542080] = "PowerShot S3 IS"; + choices[26607616] = "PowerShot A540"; + choices[26673152] = "PowerShot SD600 / Digital IXUS 60 / IXY Digital 70"; + choices[26738688] = "PowerShot G7"; + choices[26804224] = "PowerShot A530"; + choices[33554432] = "PowerShot SD800 IS / Digital IXUS 850 IS / IXY Digital 900 IS"; + choices[33619968] = "PowerShot SD40 / Digital IXUS i7 / IXY Digital L4"; + choices[33685504] = "PowerShot A710 IS"; + choices[33751040] = "PowerShot A640"; + choices[33816576] = "PowerShot A630"; + choices[34144256] = "PowerShot S5 IS"; + choices[34603008] = "PowerShot A460"; + choices[34734080] = "PowerShot SD850 IS / Digital IXUS 950 IS / IXY Digital 810 IS"; + choices[34799616] = "PowerShot A570 IS"; + choices[34865152] = "PowerShot A560"; + choices[34930688] = "PowerShot SD750 / Digital IXUS 75 / IXY Digital 90"; + choices[34996224] = "PowerShot SD1000 / Digital IXUS 70 / IXY Digital 10"; + choices[35127296] = "PowerShot A550"; + choices[35192832] = "PowerShot A450"; + choices[35848192] = "PowerShot G9"; + choices[35913728] = "PowerShot A650 IS"; + choices[36044800] = "PowerShot A720 IS"; + choices[36241408] = "PowerShot SX100 IS"; + choices[36700160] = "PowerShot SD950 IS / Digital IXUS 960 IS / IXY Digital 2000 IS"; + choices[36765696] = "PowerShot SD870 IS / Digital IXUS 860 IS / IXY Digital 910 IS"; + choices[36831232] = "PowerShot SD890 IS / Digital IXUS 970 IS / IXY Digital 820 IS"; + choices[37093376] = "PowerShot SD790 IS / Digital IXUS 90 IS / IXY Digital 95 IS"; + choices[37158912] = "PowerShot SD770 IS / Digital IXUS 85 IS / IXY Digital 25 IS"; + choices[37224448] = "PowerShot A590 IS"; + choices[37289984] = "PowerShot A580"; + choices[37879808] = "PowerShot A470"; + choices[37945344] = "PowerShot SD1100 IS / Digital IXUS 80 IS / IXY Digital 20 IS"; + choices[38141952] = "PowerShot SX1 IS"; + choices[38207488] = "PowerShot SX10 IS"; + choices[38273024] = "PowerShot A1000 IS"; + choices[38338560] = "PowerShot G10"; + choices[38862848] = "PowerShot A2000 IS"; + choices[38928384] = "PowerShot SX110 IS"; + choices[38993920] = "PowerShot SD990 IS / Digital IXUS 980 IS / IXY Digital 3000 IS"; + choices[39059456] = "PowerShot SD880 IS / Digital IXUS 870 IS / IXY Digital 920 IS"; + choices[39124992] = "PowerShot E1"; + choices[39190528] = "PowerShot D10"; + choices[39256064] = "PowerShot SD960 IS / Digital IXUS 110 IS / IXY Digital 510 IS"; + choices[39321600] = "PowerShot A2100 IS"; + choices[39387136] = "PowerShot A480"; + choices[39845888] = "PowerShot SX200 IS"; + choices[39911424] = "PowerShot SD970 IS / Digital IXUS 990 IS / IXY Digital 830 IS"; + choices[39976960] = "PowerShot SD780 IS / Digital IXUS 100 IS / IXY Digital 210 IS"; + choices[40042496] = "PowerShot A1100 IS"; + choices[40108032] = "PowerShot SD1200 IS / Digital IXUS 95 IS / IXY Digital 110 IS"; + choices[40894464] = "PowerShot G11"; + choices[40960000] = "PowerShot SX120 IS"; + choices[41025536] = "PowerShot S90"; + choices[41222144] = "PowerShot SX20 IS"; + choices[41287680] = "PowerShot SD980 IS / Digital IXUS 200 IS / IXY Digital 930 IS"; + choices[41353216] = "PowerShot SD940 IS / Digital IXUS 120 IS / IXY Digital 220 IS"; + choices[41943040] = "PowerShot A495"; + choices[42008576] = "PowerShot A490"; + choices[42074112] = "PowerShot A3100 IS / A3150 IS"; + choices[42139648] = "PowerShot A3000 IS"; + choices[42205184] = "PowerShot SD1400 IS / IXUS 130 / IXY 400F"; + choices[42270720] = "PowerShot SD1300 IS / IXUS 105 / IXY 200F"; + choices[42336256] = "PowerShot SD3500 IS / IXUS 210 / IXY 10S"; + choices[42401792] = "PowerShot SX210 IS"; + choices[42467328] = "PowerShot SD4000 IS / IXUS 300 HS / IXY 30S"; + choices[42532864] = "PowerShot SD4500 IS / IXUS 1000 HS / IXY 50S"; + choices[43122688] = "PowerShot G12"; + choices[43188224] = "PowerShot SX30 IS"; + choices[43253760] = "PowerShot SX130 IS"; + choices[43319296] = "PowerShot S95"; + choices[43515904] = "PowerShot A3300 IS"; + choices[43581440] = "PowerShot A3200 IS"; + choices[50331648] = "PowerShot ELPH 500 HS / IXUS 310 HS / IXY 31S"; + choices[50397184] = "PowerShot Pro90 IS"; + choices[50397185] = "PowerShot A800"; + choices[50462720] = "PowerShot ELPH 100 HS / IXUS 115 HS / IXY 210F"; + choices[50528256] = "PowerShot SX230 HS"; + choices[50593792] = "PowerShot ELPH 300 HS / IXUS 220 HS / IXY 410F"; + choices[50659328] = "PowerShot A2200"; + choices[50724864] = "PowerShot A1200"; + choices[50790400] = "PowerShot SX220 HS"; + choices[50855936] = "PowerShot G1 X"; + choices[50921472] = "PowerShot SX150 IS"; + choices[51380224] = "PowerShot ELPH 510 HS / IXUS 1100 HS / IXY 51S"; + choices[51445760] = "PowerShot S100 (new)"; + choices[51511296] = "PowerShot ELPH 310 HS / IXUS 230 HS / IXY 600F"; + choices[51576832] = "PowerShot SX40 HS"; + choices[51642368] = "IXY 32S"; + choices[51773440] = "PowerShot A1300"; + choices[51838976] = "PowerShot A810"; + choices[51904512] = "PowerShot ELPH 320 HS / IXUS 240 HS / IXY 420F"; + choices[51970048] = "PowerShot ELPH 110 HS / IXUS 125 HS / IXY 220F"; + choices[52428800] = "PowerShot D20"; + choices[52494336] = "PowerShot A4000 IS"; + choices[52559872] = "PowerShot SX260 HS"; + choices[52625408] = "PowerShot SX240 HS"; + choices[52690944] = "PowerShot ELPH 530 HS / IXUS 510 HS / IXY 1"; + choices[52756480] = "PowerShot ELPH 520 HS / IXUS 500 HS / IXY 3"; + choices[52822016] = "PowerShot A3400 IS"; + choices[52887552] = "PowerShot A2400 IS"; + choices[52953088] = "PowerShot A2300"; + choices[53673984] = "PowerShot G15"; + choices[53739520] = "PowerShot SX50"; + choices[53805056] = "PowerShot SX160 IS"; + choices[53870592] = "PowerShot S110 (new)"; + choices[53936128] = "PowerShot SX500 IS"; + choices[54001664] = "PowerShot N"; + choices[54067200] = "IXUS 245 HS / IXY 430F"; + choices[54525952] = "PowerShot SX280 HS"; + choices[54591488] = "PowerShot SX270 HS"; + choices[54657024] = "PowerShot A3500 IS"; + choices[54722560] = "PowerShot A2600"; + choices[54853632] = "PowerShot A1400"; + choices[54919168] = "PowerShot ELPH 130 IS / IXUS 140 / IXY 110F"; + choices[54984704] = "PowerShot ELPH 115/120 IS / IXUS 132/135 / IXY 90F/100F"; + choices[55115776] = "PowerShot ELPH 330 HS / IXUS 255 HS / IXY 610F"; + choices[55640064] = "PowerShot A2500"; + choices[55836672] = "PowerShot G16"; + choices[55902208] = "PowerShot S120"; + choices[55967744] = "PowerShot SX170 IS"; + choices[56098816] = "PowerShot SX510 HS"; + choices[56164352] = "PowerShot S200 (new)"; + choices[56623104] = "IXY 620F"; + choices[56688640] = "PowerShot N100"; + choices[56885248] = "PowerShot G1 X Mark II"; + choices[56950784] = "PowerShot D30"; + choices[57016320] = "PowerShot SX700 HS"; + choices[57081856] = "PowerShot SX600 HS"; + choices[57147392] = "PowerShot ELPH 140 IS / IXUS 150 / IXY 130"; + choices[57212928] = "PowerShot ELPH 135 / IXUS 145 / IXY 120"; + choices[57671680] = "PowerShot ELPH 340 HS / IXUS 265 HS / IXY 630"; + choices[57737216] = "PowerShot ELPH 150 IS / IXUS 155 / IXY 140"; + choices[57933824] = "EOS M3"; + choices[57999360] = "PowerShot SX60 HS"; + choices[58064896] = "PowerShot SX520 HS"; + choices[58130432] = "PowerShot SX400 IS"; + choices[58195968] = "PowerShot G7 X"; + choices[58261504] = "PowerShot N2"; + choices[58720256] = "PowerShot SX530 HS"; + choices[58851328] = "PowerShot SX710 HS"; + choices[58916864] = "PowerShot SX610 HS"; + choices[58982400] = "EOS M10"; + choices[59047936] = "PowerShot G3 X"; + choices[59113472] = "PowerShot ELPH 165 HS / IXUS 165 / IXY 160"; + choices[59179008] = "PowerShot ELPH 160 / IXUS 160"; + choices[59244544] = "PowerShot ELPH 350 HS / IXUS 275 HS / IXY 640"; + choices[59310080] = "PowerShot ELPH 170 IS / IXUS 170"; + choices[59834368] = "PowerShot SX410 IS"; + choices[59965440] = "PowerShot G9 X"; + choices[60030976] = "EOS M5"; + choices[60096512] = "PowerShot G5 X"; + choices[60227584] = "PowerShot G7 X Mark II"; + choices[60358656] = "PowerShot ELPH 360 HS / IXUS 285 HS / IXY 650"; + choices[67174400] = "PowerShot SX540 HS"; + choices[67239936] = "PowerShot SX420 IS"; + choices[67305472] = "PowerShot ELPH 190 IS / IXUS 180 / IXY 190"; + choices[67371008] = "PowerShot G1"; + choices[67371009] = "IXY 180"; + choices[67436544] = "PowerShot SX720 HS"; + choices[67502080] = "PowerShot SX620 HS"; + choices[100925440] = "PowerShot S100 / Digital IXUS / IXY Digital"; + choices[1074255475] = "DC19/DC21/DC22"; + choices[1074255476] = "XH A1"; + choices[1074255477] = "HV10"; + choices[1074255478] = "MD130/MD140/MD150/MD160/ZR850"; + choices[1074255735] = "DC50"; + choices[1074255736] = "HV20"; + choices[1074255737] = "DC211"; + choices[1074255738] = "HG10"; + choices[1074255739] = "HR10"; + choices[1074255741] = "MD255/ZR950"; + choices[1074255900] = "HF11"; + choices[1074255992] = "HV30"; + choices[1074255996] = "XH A1S"; + choices[1074255998] = "DC301/DC310/DC311/DC320/DC330"; + choices[1074255999] = "FS100"; + choices[1074256000] = "HF10"; + choices[1074256002] = "HG20/HG21"; + choices[1074256165] = "HF21"; + choices[1074256166] = "HF S11"; + choices[1074256248] = "HV40"; + choices[1074256263] = "DC410/DC411/DC420"; + choices[1074256264] = "FS19/FS20/FS21/FS22/FS200"; + choices[1074256265] = "HF20/HF200"; + choices[1074256266] = "HF S10/S100"; + choices[1074256526] = "HF R10/R16/R17/R18/R100/R106"; + choices[1074256527] = "HF M30/M31/M36/M300/M306"; + choices[1074256528] = "HF S20/S21/S200"; + choices[1074256530] = "FS31/FS36/FS37/FS300/FS305/FS306/FS307"; + choices[1074257321] = "HF G25"; + choices[1074257844] = "XC10"; + choices[2147483649] = "EOS-1D"; + choices[2147484007] = "EOS-1DS"; + choices[2147484008] = "EOS 10D"; + choices[2147484009] = "EOS-1D Mark III"; + choices[2147484016] = "EOS Digital Rebel / 300D / Kiss Digital"; + choices[2147484020] = "EOS-1D Mark II"; + choices[2147484021] = "EOS 20D"; + choices[2147484022] = "EOS Digital Rebel XSi / 450D / Kiss X2"; + choices[2147484040] = "EOS-1Ds Mark II"; + choices[2147484041] = "EOS Digital Rebel XT / 350D / Kiss Digital N"; + choices[2147484048] = "EOS 40D"; + choices[2147484179] = "EOS 5D"; + choices[2147484181] = "EOS-1Ds Mark III"; + choices[2147484184] = "EOS 5D Mark II"; + choices[2147484185] = "WFT-E1"; + choices[2147484210] = "EOS-1D Mark II N"; + choices[2147484212] = "EOS 30D"; + choices[2147484214] = "EOS Digital Rebel XTi / 400D / Kiss Digital X"; + choices[2147484225] = "WFT-E2"; + choices[2147484230] = "WFT-E3"; + choices[2147484240] = "EOS 7D"; + choices[2147484242] = "EOS Rebel T1i / 500D / Kiss X3"; + choices[2147484244] = "EOS Rebel XS / 1000D / Kiss F"; + choices[2147484257] = "EOS 50D"; + choices[2147484265] = "EOS-1D X"; + choices[2147484272] = "EOS Rebel T2i / 550D / Kiss X4"; + choices[2147484273] = "WFT-E4"; + choices[2147484275] = "WFT-E5"; + choices[2147484289] = "EOS-1D Mark IV"; + choices[2147484293] = "EOS 5D Mark III"; + choices[2147484294] = "EOS Rebel T3i / 600D / Kiss X5"; + choices[2147484295] = "EOS 60D"; + choices[2147484296] = "EOS Rebel T3 / 1100D / Kiss X50"; + choices[2147484297] = "EOS 7D Mark II"; + choices[2147484311] = "WFT-E2 II"; + choices[2147484312] = "WFT-E4 II"; + choices[2147484417] = "EOS Rebel T4i / 650D / Kiss X6i"; + choices[2147484418] = "EOS 6D"; + choices[2147484452] = "EOS-1D C"; + choices[2147484453] = "EOS 70D"; + choices[2147484454] = "EOS Rebel T5i / 700D / Kiss X7i"; + choices[2147484455] = "EOS Rebel T5 / 1200D / Kiss X70"; + choices[2147484456] = "EOS-1D X MARK II"; + choices[2147484465] = "EOS M"; + choices[2147484486] = "EOS Rebel SL1 / 100D / Kiss X7"; + choices[2147484487] = "EOS Rebel T6s / 760D / 8000D"; + choices[2147484489] = "EOS 5D Mark IV"; + choices[2147484496] = "EOS 80D"; + choices[2147484501] = "EOS M2"; + choices[2147484546] = "EOS 5DS"; + choices[2147484563] = "EOS Rebel T6i / 750D / Kiss X8i"; + choices[2147484673] = "EOS 5DS R"; + choices[2147484676] = "EOS Rebel T6 / 1300D / Kiss X80"; } }; CAModelIDInterpreter caModelIDInterpreter; @@ -1830,7 +1847,7 @@ const TagAttrib canonFocalLengthAttribs[] = { const TagAttrib canonShotInfoAttribs[] = { {0, AC_WRITE, 0, nullptr, 1, AUTO, "AutoISO", &stdInterpreter}, - {0, AC_WRITE, 0, nullptr, 2, AUTO, "BaseISO" , &caBaseISOInterpreter}, + {0, AC_WRITE, 0, nullptr, 2, AUTO, "BaseISO", &caBaseISOInterpreter}, {0, AC_WRITE, 0, nullptr, 3, AUTO, "MeasuredEV", &stdInterpreter}, {0, AC_WRITE, 0, nullptr, 4, AUTO, "TargetAperture", &caApertureInterpreter}, {0, AC_WRITE, 0, nullptr, 5, AUTO, "TargetExposureTime", &caExposureTimeInterpreter}, @@ -1839,13 +1856,13 @@ const TagAttrib canonShotInfoAttribs[] = { {0, AC_WRITE, 0, nullptr, 8, AUTO, "SlowShutter", &caSlowShutterInterpreter}, {0, AC_WRITE, 0, nullptr, 9, AUTO, "SequenceNumber", &stdInterpreter}, {0, AC_WRITE, 0, nullptr, 10, AUTO, "OpticalZoomCode", &stdInterpreter}, - {0, AC_WRITE, 0, nullptr, 13, AUTO, "FlashGuideNumber" , &caFlashGuideNumberInterpreter}, + {0, AC_WRITE, 0, nullptr, 13, AUTO, "FlashGuideNumber", &caFlashGuideNumberInterpreter}, {0, AC_WRITE, 0, nullptr, 14, AUTO, "AFPointsInFocus", &caAFPointsInFocusInterpreter}, {0, AC_WRITE, 0, nullptr, 15, AUTO, "FlashExposureComp", &stdInterpreter}, {0, AC_WRITE, 0, nullptr, 16, AUTO, "AutoExposureBracketing", &caAutoExposureBracketingInterpreter}, {0, AC_WRITE, 0, nullptr, 17, AUTO, "AEBBracketValue", &stdInterpreter}, {0, AC_WRITE, 0, nullptr, 18, AUTO, "ControlMode", &caControModeInterpreter}, - {0, AC_WRITE, 0, nullptr, 21, AUTO, "FNumber" , &caApertureInterpreter}, + {0, AC_WRITE, 0, nullptr, 21, AUTO, "FNumber", &caApertureInterpreter}, {0, AC_WRITE, 0, nullptr, 22, AUTO, "ExposureTime", &caExposureTimeInterpreter}, {0, AC_WRITE, 0, nullptr, 23, AUTO, "MeasuredEV2", &caMeasuredEVInterpreter}, {0, AC_WRITE, 0, nullptr, 24, AUTO, "BulbDuration", &stdInterpreter}, @@ -1865,15 +1882,15 @@ const TagAttrib canonFileInfoAttribs[] = { {0, AC_WRITE, 0, nullptr, 6, AUTO, "RawJpgQuality", &caRAWJpegQualityInterpreter}, {0, AC_WRITE, 0, nullptr, 7, AUTO, "RawJpgSize", &caJpegSizeInterpreter}, {0, AC_WRITE, 0, nullptr, 8, AUTO, "NoiseReduction", &stdInterpreter}, - {0, AC_WRITE, 0, nullptr, 9, AUTO, "WBBracketMode" , &caWBBracketModeInterpreter}, + {0, AC_WRITE, 0, nullptr, 9, AUTO, "WBBracketMode", &caWBBracketModeInterpreter}, {0, AC_WRITE, 0, nullptr, 12, AUTO, "WBBracketValueAB", &stdInterpreter}, {0, AC_WRITE, 0, nullptr, 13, AUTO, "WBBracketValueGM", &stdInterpreter}, - {0, AC_WRITE, 0, nullptr, 14, AUTO, "FilterEffect" , &caFilterEffectInterpreter}, - {0, AC_WRITE, 0, nullptr, 15, AUTO, "ToningEffect" , &caToningEffectInterpreter}, - {0, AC_WRITE, 0, nullptr, 19, AUTO, "LiveViewShooting" , &caOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 14, AUTO, "FilterEffect", &caFilterEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 15, AUTO, "ToningEffect", &caToningEffectInterpreter}, + {0, AC_WRITE, 0, nullptr, 19, AUTO, "LiveViewShooting", &caOnOffInterpreter}, {0, AC_WRITE, 0, nullptr, 20, AUTO, "FocusDistanceUpper", &caFocusDistanceInterpreter}, {0, AC_WRITE, 0, nullptr, 21, AUTO, "FocusDistanceLower", &caFocusDistanceInterpreter}, - {0, AC_WRITE, 0, nullptr, 25, AUTO, "FlashExposureLock" , &caOnOffInterpreter}, + {0, AC_WRITE, 0, nullptr, 25, AUTO, "FlashExposureLock", &caOnOffInterpreter}, { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr}, }; @@ -1964,7 +1981,7 @@ const TagAttrib canonAttribs[] = { {0, AC_WRITE, 0, nullptr, 0x00a9, AUTO, "ColorBalance", &stdInterpreter}, {0, AC_WRITE, 0, nullptr, 0x00aa, AUTO, "MeasuredColor", &stdInterpreter}, {0, AC_WRITE, 0, nullptr, 0x00ae, AUTO, "ColorTemperature", &stdInterpreter}, - {0, AC_NEW , 0, nullptr, 0x00b0, AUTO, "CanonFlags", &stdInterpreter}, + {0, AC_NEW, 0, nullptr, 0x00b0, AUTO, "CanonFlags", &stdInterpreter}, {0, AC_WRITE, 0, nullptr, 0x00b1, AUTO, "ModifiedInfo", &stdInterpreter}, {0, AC_WRITE, 0, nullptr, 0x00b2, AUTO, "ToneCurveMatching", &stdInterpreter}, {0, AC_WRITE, 0, nullptr, 0x00b3, AUTO, "WhiteBalanceMatching", &stdInterpreter}, diff --git a/rtexif/fujiattribs.cc b/rtexif/fujiattribs.cc index aabd88859..6f76a64b5 100644 --- a/rtexif/fujiattribs.cc +++ b/rtexif/fujiattribs.cc @@ -84,18 +84,22 @@ class FASaturationInterpreter : public ChoiceInterpreter public: FASaturationInterpreter () { - choices[0] = "Normal"; - choices[0x80] = "Medium High"; - choices[0x100] = "High"; - choices[0x180] = "Medium Low"; - choices[0x200] = "Low"; - choices[0x300] = "None (B&W)"; - choices[0x301] = "B&W Red Filter"; - choices[0x302] = "B&W Yellow Filter"; - choices[0x303] = "B&W Green Filter"; - choices[0x310] = "B&W Sepia"; - choices[0x400] = "Low 2"; - choices[0x8000] = "Film Simulation"; + choices[0] = "Normal"; + choices[128] = "Medium High"; + choices[256] = "High"; + choices[384] = "Medium Low"; + choices[512] = "Low"; + choices[768] = "None (B&W)"; + choices[769] = "B&W Red Filter"; + choices[770] = "B&W Yellow Filter"; + choices[771] = "B&W Green Filter"; + choices[784] = "B&W Sepia"; + choices[1024] = "Low 2"; + choices[1280] = "Acros"; + choices[1281] = "Acros Red Filter"; + choices[1282] = "Acros Yellow Filter"; + choices[1283] = "Acros Green Filter"; + choices[32768] = "Film Simulation"; } }; FASaturationInterpreter faSaturationInterpreter; diff --git a/rtexif/kodakattribs.cc b/rtexif/kodakattribs.cc index c92be3a84..1b6e522c5 100644 --- a/rtexif/kodakattribs.cc +++ b/rtexif/kodakattribs.cc @@ -11,7 +11,7 @@ namespace rtexif { -void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) +void parseKodakIfdTextualInfo (Tag *textualInfo, Tag* exif_) { // parse TextualInfo and copy values into corresponding standard Exif if (textualInfo->getType() != ASCII) { @@ -20,12 +20,11 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) TagDirectory *exif = exif_->getDirectory(); char *value = (char *)textualInfo->getValue(); - int valuesize = textualInfo->getValueSize(); char *p = value; char *pc, *plf; - while ((pc = strchr(p, ':')) != nullptr && (plf = strchr(pc, '\n')) != nullptr) { + while ((pc = strchr (p, ':')) != nullptr && (plf = strchr (pc, '\n')) != nullptr) { while (*p == ' ') { p++; } @@ -36,7 +35,7 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) len--; } - std::string key = std::string(p, len); + std::string key = std::string (p, len); ++pc; while (*pc == ' ') { @@ -49,7 +48,7 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) len--; } - std::string val = std::string(pc, len); + std::string val = std::string (pc, len); p = ++plf; // we pick out a few select tags here @@ -57,78 +56,78 @@ void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif_) if (key == "Lens") { // Proback645 may have "Lens" but not "Focal Length" - float flen = atof(val.c_str()); + float flen = atof (val.c_str()); if (flen != 0.0) { - t = new Tag(exif, lookupAttrib(exifAttribs, "FocalLength")); - t->initRational(flen * 32, 32); - exif->replaceTag(t); + t = new Tag (exif, lookupAttrib (exifAttribs, "FocalLength")); + t->initRational (flen * 32, 32); + exif->replaceTag (t); } } else if (key == "Focal Length") { - float flen = atof(val.c_str()); + float flen = atof (val.c_str()); if (flen != 0.0) { - t = new Tag(exif, lookupAttrib(exifAttribs, "FocalLength")); - t->initRational(flen * 32, 32); - exif->replaceTag(t); + t = new Tag (exif, lookupAttrib (exifAttribs, "FocalLength")); + t->initRational (flen * 32, 32); + exif->replaceTag (t); } } else if (key == "Aperture") { - float aperture = atof(&val.c_str()[1]); + float aperture = atof (&val.c_str()[1]); if (aperture != 0.0) { - t = new Tag(exif, lookupAttrib(exifAttribs, "FNumber")); - t->initRational((int)(aperture * 10), 10); - exif->replaceTag(t); + t = new Tag (exif, lookupAttrib (exifAttribs, "FNumber")); + t->initRational ((int) (aperture * 10), 10); + exif->replaceTag (t); } } else if (key == "Exposure Bias" || key == "Compensation") { float bias = 0.0; if (val != "Off") { - bias = atof(val.c_str()); + bias = atof (val.c_str()); } - t = new Tag (exif, lookupAttrib(exifAttribs, "ExposureBiasValue")); - t->initRational ((int)(bias * 1000), 1000); - exif->replaceTag(t); + t = new Tag (exif, lookupAttrib (exifAttribs, "ExposureBiasValue")); + t->initRational ((int) (bias * 1000), 1000); + exif->replaceTag (t); } else if (key == "ISO Speed") { - t = new Tag (exif, lookupAttrib(exifAttribs, "ISOSpeedRatings")); - t->initInt(atoi(val.c_str()), SHORT); - exif->replaceTag(t); + t = new Tag (exif, lookupAttrib (exifAttribs, "ISOSpeedRatings")); + t->initInt (atoi (val.c_str()), SHORT); + exif->replaceTag (t); } else if (key == "Shutter") { - const char *p1 = strchr(val.c_str(), '/'); + const char *p1 = strchr (val.c_str(), '/'); int a, b; if (p1 == nullptr) { - a = atoi(val.c_str()); + a = atoi (val.c_str()); b = 1; } else { - a = atoi(val.c_str()); - b = atoi(&p1[1]); + a = atoi (val.c_str()); + b = atoi (&p1[1]); } - t = new Tag (exif, lookupAttrib(exifAttribs, "ExposureTime")); - t->initRational(a, b); - exif->replaceTag(t); + t = new Tag (exif, lookupAttrib (exifAttribs, "ExposureTime")); + t->initRational (a, b); + exif->replaceTag (t); - float ssv = -log2((float)a / (float)b); // convert to APEX value - t = new Tag (exif, lookupAttrib(exifAttribs, "ShutterSpeedValue")); - t->initRational(1000000 * ssv, 1000000); - exif->replaceTag(t); + float ssv = -log2 ((float)a / (float)b); // convert to APEX value + t = new Tag (exif, lookupAttrib (exifAttribs, "ShutterSpeedValue")); + t->initRational (1000000 * ssv, 1000000); + exif->replaceTag (t); } else if (key == "Flash Fired") { - t = new Tag (exif, lookupAttrib(exifAttribs, "Flash")); + t = new Tag (exif, lookupAttrib (exifAttribs, "Flash")); if (val == "No") { - t->initInt(0, SHORT); + t->initInt (0, SHORT); } else { // not sure if "Flash Fired" is only yes/no, only seen "No" in test pictures - t->initInt(1, SHORT); + t->initInt (1, SHORT); } - exif->replaceTag(t); + exif->replaceTag (t); } else if (key == "White balance") { // yes should be small 'b' int 'balance'. - t = new Tag (exif, lookupAttrib(exifAttribs, "Flash")); - t->initInt((val == "Auto") ? 0 : 1, SHORT); - exif->replaceTag(t); + t = new Tag (exif, lookupAttrib (exifAttribs, "Flash")); + t->initInt ((val == "Auto") ? 0 : 1, SHORT); + exif->replaceTag (t); } } } diff --git a/rtexif/nikonattribs.cc b/rtexif/nikonattribs.cc index 9bbeee8ce..bf4fc5a6b 100644 --- a/rtexif/nikonattribs.cc +++ b/rtexif/nikonattribs.cc @@ -38,7 +38,7 @@ public: virtual std::string toString (Tag* t) { char buffer[32]; - sprintf (buffer, "%d", t->toInt(2)); + sprintf (buffer, "%d", t->toInt (2)); return buffer; } }; @@ -59,8 +59,8 @@ public: { int a = t->getValue()[ofs]; - if(a > 1) { - double i = pow(2., double(a) / 12. - 5.) * 100.; + if (a > 1) { + double i = pow (2., double (a) / 12. - 5.) * 100.; return i; } else { return 0.; @@ -70,8 +70,8 @@ public: { int a = t->getValue()[ofs]; - if(a > 1) { - int i = int(double(powf(2.f, float(a) / 12.f - 5.f)) * 100.f + 0.5f); + if (a > 1) { + int i = int (double (powf (2.f, float (a) / 12.f - 5.f)) * 100.f + 0.5f); return i; } else { return 0; @@ -90,50 +90,50 @@ public: // unclear if this interpretation is correct! switch (a) { - case 0x0: - return "Off"; + case 0x0: + return "Off"; - case 0x101: - return "Hi 0.3"; + case 0x101: + return "Hi 0.3"; - case 0x102: - return "Hi 0.5"; + case 0x102: + return "Hi 0.5"; - case 0x103: - return "Hi 0.7"; + case 0x103: + return "Hi 0.7"; - case 0x104: - return "Hi 1.0"; + case 0x104: + return "Hi 1.0"; - case 0x105: - return "Hi 1.3"; + case 0x105: + return "Hi 1.3"; - case 0x106: - return "Hi 1.5"; + case 0x106: + return "Hi 1.5"; - case 0x107: - return "Hi 1.7"; + case 0x107: + return "Hi 1.7"; - case 0x108: - return "Hi 2.0"; + case 0x108: + return "Hi 2.0"; - case 0x201: - return "Lo 0.3"; + case 0x201: + return "Lo 0.3"; - case 0x202: - return "Lo 0.5"; + case 0x202: + return "Lo 0.5"; - case 0x203: - return "Lo 0.7"; + case 0x203: + return "Lo 0.7"; - case 0x204: - return "Lo 1.0"; + case 0x204: + return "Lo 1.0"; - default: { - char buffer[32]; - sprintf(buffer, "0x%04X", a); - return buffer; - } + default: { + char buffer[32]; + sprintf (buffer, "0x%04X", a); + return buffer; + } } } }; @@ -222,7 +222,7 @@ public: amchoices[0x3] = "Group Dynamic"; amchoices[0x4] = "Single Area (wide)"; amchoices[0x5] = "Dynamic Area (wide)"; - // AFPoint + // AFPoint afpchoices[0x0] = "Center"; afpchoices[0x1] = "Top"; afpchoices[0x2] = "Bottom"; @@ -251,62 +251,52 @@ public: af << "Center"; } else { af << ", Center"; - } - else if (aff & 2) + } else if (aff & 2) if (af.str() == "") { af << "Top"; } else { af << ", Top"; - } - else if (aff & 4) + } else if (aff & 4) if (af.str() == "") { af << "Bottom"; } else { af << ", Bottom"; - } - else if (aff & 8) + } else if (aff & 8) if (af.str() == "") { af << "Left"; } else { af << ", Left"; - } - else if (aff & 16) + } else if (aff & 16) if (af.str() == "") { af << "Right"; } else { af << ", Right"; - } - else if (aff & 32) + } else if (aff & 32) if (af.str() == "") { af << "Upper-left"; } else { af << ", Upper-left"; - } - else if (aff & 64) + } else if (aff & 64) if (af.str() == "") { af << "Upper-right"; } else { af << ", Upper-right"; - } - else if (aff & 128) + } else if (aff & 128) if (af.str() == "") { af << " Lower-left"; } else { af << ", Lower-left"; - } - else if (aff & 256) + } else if (aff & 256) if (af.str() == "") { af << "Lower-right"; } else { af << ", Lower-right"; - } - else if (aff & 512) + } else if (aff & 512) if (af.str() == "") { af << "Far Left"; } else { af << ", Far Left"; - } - else if (aff & 1024) { + } else if (aff & 1024) { if (af.str() == "") { af << "Far Right"; } else { @@ -372,21 +362,21 @@ public: std::ostringstream ld; ld << "Version = " << ver << std::endl; - int lenstype = t->getParent()->getTag(0x0083)->toInt(0, BYTE); + int lenstype = t->getParent()->getTag (0x0083)->toInt (0, BYTE); std::ostringstream lid; lid.setf (std::ios_base::hex, std::ios_base::basefield); lid.setf (std::ios_base::uppercase); - Tag *modelTag = t->getParent()->getRoot()->findTag("Model"); - std::string model( modelTag ? modelTag->valueToString() : ""); + Tag *modelTag = t->getParent()->getRoot()->findTag ("Model"); + std::string model ( modelTag ? modelTag->valueToString() : ""); int lidoffs = 7; bool d100 = false; - if (model.substr(0, 10) == "NIKON D100" || model.substr(0, 9) == "NIKON D1X") { + if (model.substr (0, 10) == "NIKON D100" || model.substr (0, 9) == "NIKON D1X") { lidoffs = 0; d100 = true; - } else if( ver < 204) { + } else if ( ver < 204) { lidoffs = 7; d100 = false; } else { @@ -403,14 +393,14 @@ public: } if (ver >= 201) { - const unsigned char* serval = t->getParent()->getTag(0x001d)->getValue (); + const unsigned char* serval = t->getParent()->getTag (0x001d)->getValue (); int serial = 0; for (int i = 0; serval[i]; i++) { - serial = serial * 10 + (isdigit(serval[i]) ? serval[i] - '0' : serval[i] % 10); + serial = serial * 10 + (isdigit (serval[i]) ? serval[i] - '0' : serval[i] % 10); } - const unsigned char* scval = t->getParent()->getTag(0x00a7)->getValue (); + const unsigned char* scval = t->getParent()->getTag (0x00a7)->getValue (); int key = 0; for (int i = 0; i < 4; i++) { @@ -431,7 +421,7 @@ public: if (!d100) { int EffectiveMaxApertureValue; - if( ver < 204 ) { + if ( ver < 204 ) { ld << "ExitPupilPosition = " << (int) buffer[0] << std::endl; ld << "AFAperture = " << (int) buffer[1] << std::endl; ld << "FocusPosition = " << (int) buffer[4] << std::endl; @@ -448,111 +438,111 @@ public: } switch (EffectiveMaxApertureValue) { - case 0x8: - EffectiveMaxApertureString = "1.2"; - break; + case 0x8: + EffectiveMaxApertureString = "1.2"; + break; - case 0xc: - EffectiveMaxApertureString = "1.4"; - break; + case 0xc: + EffectiveMaxApertureString = "1.4"; + break; - case 0x14: - EffectiveMaxApertureString = "1.8"; - break; + case 0x14: + EffectiveMaxApertureString = "1.8"; + break; - case 0x18: - EffectiveMaxApertureString = "2.0"; - break; + case 0x18: + EffectiveMaxApertureString = "2.0"; + break; - case 0x20: - EffectiveMaxApertureString = "2.5"; - break; + case 0x20: + EffectiveMaxApertureString = "2.5"; + break; - case 0x24: - EffectiveMaxApertureString = "2.8"; - break; + case 0x24: + EffectiveMaxApertureString = "2.8"; + break; - case 0x2a: - EffectiveMaxApertureString = "3.3"; - break; + case 0x2a: + EffectiveMaxApertureString = "3.3"; + break; - case 0x2c: - EffectiveMaxApertureString = "3.5"; - break; + case 0x2c: + EffectiveMaxApertureString = "3.5"; + break; - case 0x30: - EffectiveMaxApertureString = "4.0"; - break; + case 0x30: + EffectiveMaxApertureString = "4.0"; + break; - case 0x34: - EffectiveMaxApertureString = "4.5"; - break; + case 0x34: + EffectiveMaxApertureString = "4.5"; + break; - case 0x38: - EffectiveMaxApertureString = "5.0"; - break; + case 0x38: + EffectiveMaxApertureString = "5.0"; + break; - case 0x3c: - EffectiveMaxApertureString = "5.6"; - break; + case 0x3c: + EffectiveMaxApertureString = "5.6"; + break; - case 0x40: - EffectiveMaxApertureString = "6.3"; - break; + case 0x40: + EffectiveMaxApertureString = "6.3"; + break; - case 0x44: - EffectiveMaxApertureString = "7.1"; - break; + case 0x44: + EffectiveMaxApertureString = "7.1"; + break; - case 0x48: - EffectiveMaxApertureString = "8.0"; - break; + case 0x48: + EffectiveMaxApertureString = "8.0"; + break; - case 0x4e: - EffectiveMaxApertureString = "9.5"; - break; + case 0x4e: + EffectiveMaxApertureString = "9.5"; + break; - case 0x54: - EffectiveMaxApertureString = "11.0"; - break; + case 0x54: + EffectiveMaxApertureString = "11.0"; + break; - case 0x5a: - EffectiveMaxApertureString = "13.0"; - break; + case 0x5a: + EffectiveMaxApertureString = "13.0"; + break; - case 0x5e: - EffectiveMaxApertureString = "15.0"; - break; + case 0x5e: + EffectiveMaxApertureString = "15.0"; + break; - case 0x60: - EffectiveMaxApertureString = "16.0"; - break; + case 0x60: + EffectiveMaxApertureString = "16.0"; + break; - case 0x66: - EffectiveMaxApertureString = "19.0"; - break; + case 0x66: + EffectiveMaxApertureString = "19.0"; + break; - case 0x6c: - EffectiveMaxApertureString = "22.0"; - break; + case 0x6c: + EffectiveMaxApertureString = "22.0"; + break; - default : - EffectiveMaxApertureString = ""; + default : + EffectiveMaxApertureString = ""; } ld << "EffectiveMaxAperture = " << EffectiveMaxApertureString << std::endl; } for (int i = 0; i < 7; i++) { - lid << std::setw(2) << std::setfill('0') << (int)buffer[lidoffs + i] << ' '; + lid << std::setw (2) << std::setfill ('0') << (int)buffer[lidoffs + i] << ' '; } - lid << std::setw(2) << std::setfill('0') << lenstype; + lid << std::setw (2) << std::setfill ('0') << lenstype; std::map::const_iterator r = lenses.find (lid.str()); if (r != lenses.end()) { - if(r == lenses.begin() && EffectiveMaxApertureString != "") { // first entry is for unchipped lenses + if (r == lenses.begin() && EffectiveMaxApertureString != "") { // first entry is for unchipped lenses ld << "Lens = Unknown $FL$mm f/" << EffectiveMaxApertureString; } else { ld << "Lens = " << r->second; @@ -618,6 +608,7 @@ const std::map NALensDataInterpreter::lenses = { {"00 4C 7C 7C 2C 2C 00 02", "Tamron SP AF 180mm f/3.5 Di Model (B01)"}, {"00 53 2B 50 24 24 00 06", "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16)"}, {"00 54 2B 50 24 24 00 06", "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical (IF) (A16NII)"}, + {"00 54 38 38 18 18 00 00", "Carl Zeiss Distagon T* 2/25 ZF.2"}, {"00 54 3C 3C 18 18 00 00", "Carl Zeiss Distagon T* 2/28 ZF.2"}, {"00 54 44 44 0C 0C 00 00", "Carl Zeiss Distagon T* 1.4/35 ZF.2"}, {"00 54 44 44 18 18 00 00", "Carl Zeiss Distagon T* 2/35 ZF.2"}, @@ -851,6 +842,7 @@ const std::map NALensDataInterpreter::lenses = { {"4A 48 24 24 24 0C 4D 02", "Samyang AE 14mm f/2.8 ED AS IF UMC"}, {"4A 54 29 29 18 0C 4D 02", "Samyang 16mm f/2.0 ED AS UMC CS"}, {"4A 54 62 62 0C 0C 4D 02", "AF Nikkor 85mm f/1.4D IF"}, + {"4A 60 36 36 0C 0C 4D 02", "Samyang 24mm f/1.4 ED AS UMC"}, {"4A 60 44 44 0C 0C 4D 02", "Samyang 35mm f/1.4 AS UMC"}, {"4A 60 62 62 0C 0C 4D 02", "Samyang AE 85mm f/1.4 AS IF UMC"}, {"4B 3C A0 A0 30 30 4E 02", "AF-S Nikkor 500mm f/4D IF-ED"}, @@ -907,6 +899,7 @@ const std::map NALensDataInterpreter::lenses = { {"74 40 37 62 2C 34 78 06", "AF-S Zoom-Nikkor 24-85mm f/3.5-4.5G IF-ED"}, {"75 40 3C 68 2C 3C 79 06", "AF Zoom-Nikkor 28-100mm f/3.5-5.6G"}, {"76 58 50 50 14 14 7A 02", "AF Nikkor 50mm f/1.8D"}, + {"77 44 60 98 34 3C 7B 0E", "Sigma 80-400mm f4.5-5.6 APO DG D OS"}, {"77 44 61 98 34 3C 7B 0E", "Sigma 80-400mm f/4.5-5.6 EX OS"}, {"77 48 5C 80 24 24 7B 0E", "AF-S VR Zoom-Nikkor 70-200mm f/2.8G IF-ED"}, {"78 40 37 6E 2C 3C 7C 0E", "AF-S VR Zoom-Nikkor 24-120mm f/3.5-5.6G IF-ED"}, @@ -914,6 +907,7 @@ const std::map NALensDataInterpreter::lenses = { {"79 40 3C 80 2C 3C 7F 06", "AF Zoom-Nikkor 28-200mm f/3.5-5.6G IF-ED"}, {"79 48 3C 5C 24 24 1C 06", "Sigma 28-70mm f/2.8 EX DG"}, {"79 48 5C 5C 24 24 1C 06", "Sigma Macro 70mm f/2.8 EX DG"}, + {"79 54 31 31 0C 0C 4B 06", "Sigma 20mm f/1.4 DG HSM | A"}, {"7A 3B 53 80 30 3C 4B 06", "Sigma 55-200mm f/4-5.6 DC HSM"}, {"7A 3C 1F 37 30 30 7E 06", "AF-S DX Zoom-Nikkor 12-24mm f/4G IF-ED"}, {"7A 3C 1F 37 30 30 7E 06", "Tokina AT-X 124 AF PRO DX II (AF 12-24mm f/4)"}, @@ -981,6 +975,8 @@ const std::map NALensDataInterpreter::lenses = { {"9E 40 2D 6A 2C 3C A0 0E", "AF-S DX VR Zoom-Nikkor 18-105mm f/3.5-5.6G ED"}, {"9F 37 50 A0 34 40 4B 0E", "Sigma 50-500mm f/4.5-6.3 DG OS HSM"}, {"9F 58 44 44 14 14 A1 06", "AF-S DX Nikkor 35mm f/1.8G"}, + {"A0 40 2D 53 2C 3C CA 0E", "AF-P DX Nikkor 18-55mm f/3.5-5.6G VR"}, + {"A0 40 2D 53 2C 3C CA 8E", "AF-P DX Nikkor 18-55mm f/3.5-5.6G"}, {"A0 40 2D 74 2C 3C BB 0E", "AF-S DX Nikkor 18-140mm f/3.5-5.6G ED VR"}, {"A0 48 2A 5C 24 30 4B 0E", "Sigma 17-70mm f/2.8-4 DC Macro OS HSM"}, {"A0 54 50 50 0C 0C A2 06", "AF-S Nikkor 50mm f/1.4G"}, @@ -993,10 +989,13 @@ const std::map NALensDataInterpreter::lenses = { {"A3 3C 5C 8E 30 3C 4B 0E", "Sigma 70-300mm f/4-5.6 DG OS"}, {"A4 40 2D 8E 2C 40 BF 0E", "AF-S DX Nikkor 18-300mm f/3.5-6.3G ED VR"}, {"A4 47 2D 50 24 34 4B 0E", "Sigma 18-50mm f/2.8-4.5 DC OS HSM"}, + {"A4 48 5C 80 24 24 CF 0E", "AF-S Nikkor 70-200mm f/2.8E FL ED VR"}, {"A4 54 37 37 0C 0C A6 06", "AF-S Nikkor 24mm f/1.4G ED"}, {"A5 40 2D 88 2C 40 4B 0E", "Sigma 18-250mm f/3.5-6.3 DC OS HSM"}, {"A5 40 3C 8E 2C 3C A7 0E", "AF-S Nikkor 28-300mm f/3.5-5.6G ED VR"}, {"A5 4C 44 44 14 14 C0 06", "AF-S Nikkor 35mm f/1.8G ED"}, + {"A5 54 6A 6A 0C 0C D0 06", "AF-S Nikkor 105mm f/1.4E ED"}, + {"A5 54 6A 6A 0C 0C D0 46", "AF-S Nikkor 105mm f/1.4E ED"}, {"A6 48 37 5C 24 24 4B 06", "Sigma 24-70mm f/2.8 IF EX DG HSM"}, {"A6 48 8E 8E 24 24 A8 0E", "AF-S VR Nikkor 300mm f/2.8G IF-ED II"}, {"A6 48 98 98 24 24 C1 0E", "AF-S Nikkor 400mm f/2.8E FL ED VR"}, @@ -1040,9 +1039,12 @@ const std::map NALensDataInterpreter::lenses = { {"E0 3C 5C 8E 30 3C 4B 06", "Sigma 70-300mm f/4-5.6 APO DG Macro HSM"}, {"E1 58 37 37 14 14 1C 02", "Sigma 24mm f/1.8 EX DG Aspherical Macro"}, {"E3 54 50 50 24 24 35 02", "Sigma Macro 50mm f/2.8 EX DG"}, + {"E4 54 64 64 24 24 DF 0E", "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1 (F017)"}, {"E5 54 6A 6A 24 24 35 02", "Sigma Macro 105mm f/2.8 EX DG"}, + {"E6 40 2D 80 2C 40 DF 0E", "Tamron AF 18-200mm f/3.5-6.3 Di II VC (B018)"}, {"E6 41 3C 8E 2C 40 1C 02", "Sigma 28-300mm f/3.5-6.3 DG Macro"}, - {"E8 4C 44 44 14 14 DF 0E", "Tamron SP 35mm f/1.8 VC"}, + {"E7 4C 4C 4C 14 14 DF 0E", "Tamron SP 45mm f/1.8 Di VC USD (F013)"}, + {"E8 4C 44 44 14 14 DF 0E", "Tamron SP 35mm f/1.8 Di VC USD (F012)"}, {"E9 48 27 3E 24 24 DF 0E", "Tamron SP 15-30mm f/2.8 Di VC USD (A012)"}, {"E9 54 37 5C 24 24 1C 02", "Sigma 24-70mm f/2.8 EX DG Macro"}, {"EA 40 29 8E 2C 40 DF 0E", "Tamron AF 16-300mm f/3.5-6.3 Di II VC PZD (B016)"}, diff --git a/rtexif/olympusattribs.cc b/rtexif/olympusattribs.cc index 4b61225a0..21cfb5738 100644 --- a/rtexif/olympusattribs.cc +++ b/rtexif/olympusattribs.cc @@ -66,8 +66,8 @@ public: virtual std::string toString (Tag* t) { std::ostringstream str; - str.precision(2); - str << pow(2, t->toInt() / 512.0); + str.precision (2); + str << pow (2, t->toInt() / 512.0); return str.str(); } }; @@ -122,6 +122,9 @@ public: lenses["00 24 00"] = "Olympus Zuiko Digital ED 40-150mm f/4.0-5.6"; lenses["00 24 10"] = "Olympus M.Zuiko Digital ED 300mm f/4.0 IS Pro"; lenses["00 25 10"] = "Olympus M.Zuiko Digital ED 8mm f/1.8 Fisheye Pro"; + lenses["00 26 10"] = "Olympus M.Zuiko Digital ED 12-100mm f/4.0 IS Pro"; + lenses["00 27 10"] = "Olympus M.Zuiko Digital ED 30mm f/3.5 Macro"; + lenses["00 28 10"] = "Olympus M.Zuiko Digital ED 25mm f/1.2 Pro"; lenses["00 30 00"] = "Olympus Zuiko Digital ED 50-200mm f/2.8-3.5 SWD"; lenses["00 31 00"] = "Olympus Zuiko Digital ED 12-60mm f/2.8-4.0 SWD"; lenses["00 32 00"] = "Olympus Zuiko Digital ED 14-35mm f/2.0 SWD"; @@ -193,9 +196,9 @@ public: std::ostringstream lid; lid.setf (std::ios_base::hex, std::ios_base::basefield); lid.setf (std::ios_base::uppercase); - lid << std::setw(2) << std::setfill('0') << t->toInt(0) << ' '; //maker - lid << std::setw(2) << std::setfill('0') << t->toInt(2) << ' '; //model - lid << std::setw(2) << std::setfill('0') << t->toInt(3); // submodel + lid << std::setw (2) << std::setfill ('0') << t->toInt (0) << ' '; //maker + lid << std::setw (2) << std::setfill ('0') << t->toInt (2) << ' '; //model + lid << std::setw (2) << std::setfill ('0') << t->toInt (3); // submodel std::map::iterator r = lenses.find (lid.str()); @@ -258,6 +261,7 @@ public: choices[1] = "Sequential shooting AF"; choices[2] = "Continuous AF"; choices[3] = "Multi AF"; + choices[4] = "Face detect"; choices[10] = "MF"; } }; diff --git a/rtexif/panasonicattribs.cc b/rtexif/panasonicattribs.cc new file mode 100644 index 000000000..3062824cf --- /dev/null +++ b/rtexif/panasonicattribs.cc @@ -0,0 +1,142 @@ +/* + * This file is part of RawTherapee. + */ +#ifndef _PANASONICATTRIBS_ +#define _PANASONICATTRIBS_ + +#include +#include "rtexif.h" + +namespace rtexif +{ + +// TODO: write interpreters + +const TagAttrib panasonicAttribs[] = { + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "Quality", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "FirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "WhiteBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "FocusMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x000f, AUTO, "AFMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001a, AUTO, "ImageStabilization", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001c, AUTO, "Macro", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x001f, AUTO, "ShootingMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0020, AUTO, "Audio", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0023, AUTO, "WhiteBalanceBias", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0024, AUTO, "FlashBias", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0025, AUTO, "InternalSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0026, AUTO, "ExifVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0028, AUTO, "ColorEffect", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0029, AUTO, "TimeSincePowerOn", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x002a, AUTO, "BurstMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x002b, AUTO, "SequenceNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x002c, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x002d, AUTO, "NoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x002e, AUTO, "SelfTimer", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0030, AUTO, "Rotation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0031, AUTO, "AFAssistLamp", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0032, AUTO, "ColorMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0033, AUTO, "BabyAge1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0034, AUTO, "OpticalZoomMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0035, AUTO, "ConversionLens", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0036, AUTO, "TravelDay", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0039, AUTO, "Contrast", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003a, AUTO, "WorldTimeLocation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003b, AUTO, "TextStamp1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003c, AUTO, "ProgramISO", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003d, AUTO, "AdvancedSceneType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003e, AUTO, "TextStamp2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x003f, AUTO, "FacesDetected", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0040, AUTO, "Saturation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0041, AUTO, "Sharpness", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0042, AUTO, "FilmMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0044, AUTO, "ColorTempKelvin", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0045, AUTO, "BracketSettings", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0046, AUTO, "WBAdjustAB", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0047, AUTO, "WBAdjustGM", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0048, AUTO, "FlashCurtain", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0049, AUTO, "LongShutterNoiseReduction", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x004b, AUTO, "ImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x004c, AUTO, "ImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x004d, AUTO, "AFPointPosition", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x004e, AUTO, "FaceDetInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0051, AUTO, "LensType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0052, AUTO, "LensSerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0053, AUTO, "AccessoryType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0054, AUTO, "AccessorySerialNumber", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0059, AUTO, "Transform1", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x005d, AUTO, "IntelligentExposure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0060, AUTO, "LensFirmwareVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0061, AUTO, "FaceRecInfo", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0062, AUTO, "FlashWarning", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0065, AUTO, "Title", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0066, AUTO, "BabyName", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0067, AUTO, "Location", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0069, AUTO, "Country", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x006b, AUTO, "State", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x006d, AUTO, "City", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x006f, AUTO, "Landmark", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0070, AUTO, "IntelligentResolution", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0077, AUTO, "BurstSheed", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0079, AUTO, "IntelligentDRange", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x007c, AUTO, "ClearRetouch", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0080, AUTO, "City2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0086, AUTO, "ManometerPressure", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0089, AUTO, "PhotoStyle", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008a, AUTO, "ShadingCompensation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008c, AUTO, "AccelerometerZ", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008d, AUTO, "AccelerometerX", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008e, AUTO, "AccelerometerY", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x008f, AUTO, "CameraOrientation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0090, AUTO, "RollAngle", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0091, AUTO, "PitchAngle", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0093, AUTO, "SweepPanoramaDirection", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0094, AUTO, "PanoramaFieldOfView", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0096, AUTO, "TimerRecording", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x009d, AUTO, "InternalNDFilter", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x009e, AUTO, "HDR", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x009f, AUTO, "ShutterType", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00a3, AUTO, "ClearRetouchValue", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x00ab, AUTO, "TouchAE", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0e00, AUTO, "PrintIM", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8000, AUTO, "MakerNoteVersion", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8001, AUTO, "SceneMode", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8004, AUTO, "WBRedLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8005, AUTO, "WBGreenLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8006, AUTO, "WBBlueLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8007, AUTO, "FlashFired", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8008, AUTO, "TextStamp3", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8009, AUTO, "TextStamp4", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8010, AUTO, "BabyAge2", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x8012, AUTO, "Transform2", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } +}; + +const TagAttrib panasonicRawAttribs[] = { + {0, AC_WRITE, 0, nullptr, 0x0001, AUTO, "Version", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0002, AUTO, "SensorWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0003, AUTO, "SensorHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0004, AUTO, "SensorTopBorder", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0005, AUTO, "SensorLeftBorder", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0006, AUTO, "ImageHeight", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0007, AUTO, "ImageWidth", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0011, AUTO, "RedBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0012, AUTO, "BlueBalance", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0017, AUTO, "ISOSpeed", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0024, AUTO, "WBRedLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0025, AUTO, "WBGreenLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0026, AUTO, "WBBlueLevel", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x002e, AUTO, "PreviewImage", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x010f, AUTO, "Make", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0110, AUTO, "Model", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0111, AUTO, "StripOffsets", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0112, AUTO, "Orientation", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0116, AUTO, "RowsPerStrip", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0117, AUTO, "StripByteCounts", &stdInterpreter}, + {0, AC_WRITE, 0, nullptr, 0x0118, AUTO, "RawDataOffset", &stdInterpreter}, + { -1, AC_DONTWRITE, 0, nullptr, 0, AUTO, "", nullptr } +}; + +} +#endif + diff --git a/rtexif/pentaxattribs.cc b/rtexif/pentaxattribs.cc index 9fc6b6fb6..2c52a0c88 100644 --- a/rtexif/pentaxattribs.cc +++ b/rtexif/pentaxattribs.cc @@ -42,6 +42,7 @@ public: choices[3] = "TIFF"; choices[4] = "RAW"; choices[5] = "Premium"; + choices[6] = "RAW (HDR enabled)"; choices[7] = "RAW (pixel shift enabled)"; choices[65535] = "n/a"; } @@ -371,6 +372,12 @@ public: choices[37] = "128000"; choices[38] = "160000"; choices[39] = "204800"; + choices[40] = "256000"; + choices[41] = "320000"; + choices[42] = "409600"; + choices[43] = "512000"; + choices[44] = "640000"; + choices[45] = "819200"; choices[50] = "50"; choices[100] = "100"; choices[200] = "200"; @@ -412,7 +419,7 @@ public: char buffer[32]; double v = t->toDouble() / 10; - if( v < 0. || v > 1000. ) { + if ( v < 0. || v > 1000. ) { return "undef"; } @@ -604,14 +611,14 @@ public: } virtual std::string toString (Tag* t) { - int c = 256 * t->toInt(0, BYTE) + t->toInt(1, BYTE); + int c = 256 * t->toInt (0, BYTE) + t->toInt (1, BYTE); std::map::iterator r = choices.find (c); if (r != choices.end()) { std::ostringstream s; s << r->second; - if( t->toInt(1, BYTE) == 0 ) { + if ( t->toInt (1, BYTE) == 0 ) { s << "\n1/2 EV steps"; } else { s << "\n1/3 EV steps"; @@ -663,10 +670,10 @@ public: } virtual std::string toString (Tag* t) { - std::map::iterator r = choices.find (t->toInt(0, BYTE)); - std::map::iterator r1 = choices1.find (t->toInt(1, BYTE)); - std::map::iterator r2 = choices2.find (t->toInt(2, BYTE)); - std::map::iterator r3 = choices3.find (t->toInt(3, BYTE)); + std::map::iterator r = choices.find (t->toInt (0, BYTE)); + std::map::iterator r1 = choices1.find (t->toInt (1, BYTE)); + std::map::iterator r2 = choices2.find (t->toInt (2, BYTE)); + std::map::iterator r3 = choices3.find (t->toInt (3, BYTE)); std::ostringstream s; s << ((r != choices.end()) ? r->second : ""); s << ((r1 != choices1.end()) ? r1->second : "") << " "; @@ -693,335 +700,338 @@ class PALensTypeInterpreter : public IntLensInterpreter< int > public: PALensTypeInterpreter () { - choices.insert(p_t(256 * 0 + 0, "M-42 or No Lens")); - choices.insert(p_t(256 * 1 + 0, "K or M Lens")); - choices.insert(p_t(256 * 2 + 0, "A Series Lens")); - choices.insert(p_t(256 * 3 + 0, "Sigma")); - choices.insert(p_t(256 * 3 + 17, "smc PENTAX-FA SOFT 85mm f/2.8")); - choices.insert(p_t(256 * 3 + 18, "smc PENTAX-F 1.7X AF ADAPTER")); - choices.insert(p_t(256 * 3 + 19, "smc PENTAX-F 24-50mm f/4")); - choices.insert(p_t(256 * 3 + 20, "smc PENTAX-F 35-80mm f/4-5.6")); - choices.insert(p_t(256 * 3 + 21, "smc PENTAX-F 80-200mm f/4.7-5.6")); - choices.insert(p_t(256 * 3 + 22, "smc PENTAX-F FISH-EYE 17-28mm f/3.5-4.5")); - choices.insert(p_t(256 * 3 + 23, "smc PENTAX-F 100-300mm f/4.5-5.6 or Sigma Lens")); - choices.insert(p_t(256 * 3 + 23, "Sigma AF 28-300mm f/3.5-5.6 DL IF")); - choices.insert(p_t(256 * 3 + 23, "Sigma AF 28-300mm f/3.5-6.3 DG IF Macro")); - choices.insert(p_t(256 * 3 + 23, "Tokina 80-200mm f/2.8 ATX-Pro")); - choices.insert(p_t(256 * 3 + 24, "smc PENTAX-F 35-135mm f/3.5-4.5")); - choices.insert(p_t(256 * 3 + 25, "smc PENTAX-F 35-105mm f/4-5.6 or Sigma or Tokina Lens")); - choices.insert(p_t(256 * 3 + 25, "Sigma AF 28-300mm f/3.5-5.6 DL IF")); - choices.insert(p_t(256 * 3 + 25, "Sigma 55-200mm f/4-5.6 DC")); - choices.insert(p_t(256 * 3 + 25, "Sigma AF 28-300mm f/3.5-6.3 DL IF")); - choices.insert(p_t(256 * 3 + 25, "Sigma AF 28-300mm f/3.5-6.3 DG IF Macro")); - choices.insert(p_t(256 * 3 + 25, "Tokina 80-200mm f/2.8 ATX-Pro")); - choices.insert(p_t(256 * 3 + 26, "smc PENTAX-F* 250-600mm f/5.6 ED[IF]")); - choices.insert(p_t(256 * 3 + 27, "smc PENTAX-F 28-80mm f/3.5-4.5 or Tokina Lens")); - choices.insert(p_t(256 * 3 + 27, "Tokina AT-X Pro AF 28-70mm f/2.6-2.8")); - choices.insert(p_t(256 * 3 + 28, "smc PENTAX-F 35-70mm f/3.5-4.5 or Tokina Lens")); - choices.insert(p_t(256 * 3 + 28, "Tokina 19-35mm f/3.5-4.5 AF")); - choices.insert(p_t(256 * 3 + 28, "Tokina AT-X AF 400mm f/5.6")); - choices.insert(p_t(256 * 3 + 29, "PENTAX-F 28-80mm f/3.5-4.5 or Sigma or Tokina Lens")); - choices.insert(p_t(256 * 3 + 29, "Sigma AF 18-125mm f/3.5-5.6 DC")); - choices.insert(p_t(256 * 3 + 29, "Tokina AT-X PRO 28-70mm f/2.6-2.8")); - choices.insert(p_t(256 * 3 + 30, "PENTAX-F 70-200mm f/4-5.6")); - choices.insert(p_t(256 * 3 + 31, "smc PENTAX-F 70-210mm f/4-5.6 or Tokina or Takumar Lens")); - choices.insert(p_t(256 * 3 + 31, "Tokina AF 730 75-300mm f/4.5-5.6")); - choices.insert(p_t(256 * 3 + 31, "Takumar-F 70-210mm f/4-5.6")); - choices.insert(p_t(256 * 3 + 32, "smc PENTAX-F 50mm f/1.4")); - choices.insert(p_t(256 * 3 + 33, "smc PENTAX-F 50mm f/1.7")); - choices.insert(p_t(256 * 3 + 34, "smc PENTAX-F 135mm f/2.8 [IF]")); - choices.insert(p_t(256 * 3 + 35, "smc PENTAX-F 28mm f/2.8")); - choices.insert(p_t(256 * 3 + 36, "Sigma 20mm f/1.8 EX DG Aspherical RF")); - choices.insert(p_t(256 * 3 + 38, "smc PENTAX-F* 300mm f/4.5 ED[IF]")); - choices.insert(p_t(256 * 3 + 39, "smc PENTAX-F* 600mm f/4 ED[IF]")); - choices.insert(p_t(256 * 3 + 40, "smc PENTAX-F Macro 100mm f/2.8")); - choices.insert(p_t(256 * 3 + 41, "smc PENTAX-F Macro 50mm f/2.8 or Sigma Lens")); - choices.insert(p_t(256 * 3 + 41, "Sigma 50mm f/2.8 Macro")); - choices.insert(p_t(256 * 3 + 42, "Sigma 300mm f/2.8 EX DG APO IF")); - choices.insert(p_t(256 * 3 + 44, "Sigma or Tamron Lens (3 44)")); - choices.insert(p_t(256 * 3 + 44, "Sigma AF 10-20mm f/4-5.6 EX DC")); - choices.insert(p_t(256 * 3 + 44, "Sigma 12-24mm f/4.5-5.6 EX DG")); - choices.insert(p_t(256 * 3 + 44, "Sigma 17-70mm f/2.8-4.5 DC Macro")); - choices.insert(p_t(256 * 3 + 44, "Sigma 18-50mm f/3.5-5.6 DC")); - choices.insert(p_t(256 * 3 + 44, "Sigma 17-35mm f/2.8-4 EX DG")); - choices.insert(p_t(256 * 3 + 44, "Tamron 35-90mm f/4 AF")); - choices.insert(p_t(256 * 3 + 46, "Sigma or Samsung Lens (3 46)")); - choices.insert(p_t(256 * 3 + 46, "Sigma APO 70-200mm f/2.8 EX")); - choices.insert(p_t(256 * 3 + 46, "Sigma EX APO 100-300mm f/4 IF")); - choices.insert(p_t(256 * 3 + 46, "Samsung/Schneider D-XENON 50-200mm f/4-5.6 ED")); - choices.insert(p_t(256 * 3 + 50, "smc PENTAX-FA 28-70mm f/4 AL")); - choices.insert(p_t(256 * 3 + 51, "Sigma 28mm f/1.8 EX DG Aspherical Macro")); - choices.insert(p_t(256 * 3 + 52, "smc PENTAX-FA 28-200mm f/3.8-5.6 AL[IF] or Tamron Lens")); - choices.insert(p_t(256 * 3 + 52, "Tamron AF LD 28-200mm f/3.8-5.6 [IF] Aspherical (171D)")); - choices.insert(p_t(256 * 3 + 53, "smc PENTAX-FA 28-80mm f/3.5-5.6 AL")); - choices.insert(p_t(256 * 3 + 247, "smc PENTAX-DA FISH-EYE 10-17mm f/3.5-4.5 ED[IF]")); - choices.insert(p_t(256 * 3 + 248, "smc PENTAX-DA 12-24mm f/4 ED AL[IF]")); - choices.insert(p_t(256 * 3 + 250, "smc PENTAX-DA 50-200mm f/4-5.6 ED")); - choices.insert(p_t(256 * 3 + 251, "smc PENTAX-DA 40mm f/2.8 Limited")); - choices.insert(p_t(256 * 3 + 252, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL")); - choices.insert(p_t(256 * 3 + 253, "smc PENTAX-DA 14mm f/2.8 ED[IF]")); - choices.insert(p_t(256 * 3 + 254, "smc PENTAX-DA 16-45mm f/4 ED AL")); - choices.insert(p_t(256 * 3 + 255, "Sigma Lens (3 255)")); - choices.insert(p_t(256 * 3 + 255, "Sigma 18-200mm f/3.5-6.3 DC")); - choices.insert(p_t(256 * 3 + 255, "Sigma DL-II 35-80mm f/4-5.6")); - choices.insert(p_t(256 * 3 + 255, "Sigma DL Zoom 75-300mm f/4-5.6")); - choices.insert(p_t(256 * 3 + 255, "Sigma DF EX Aspherical 28-70mm f/2.8")); - choices.insert(p_t(256 * 3 + 255, "Sigma AF Tele 400mm f/5.6 Multi-coated")); - choices.insert(p_t(256 * 3 + 255, "Sigma 24-60mm f/2.8 EX DG")); - choices.insert(p_t(256 * 3 + 255, "Sigma 70-300mm f/4-5.6 Macro")); - choices.insert(p_t(256 * 3 + 255, "Sigma 55-200mm f/4-5.6 DC")); - choices.insert(p_t(256 * 3 + 255, "Sigma 18-50mm f/2.8 EX DC")); - choices.insert(p_t(256 * 4 + 1, "smc PENTAX-FA SOFT 28mm f/2.8")); - 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 + 6, "smc PENTAX-FA 35-80mm f/4-5.6")); - choices.insert(p_t(256 * 4 + 12, "smc PENTAX-FA 50mm f/1.4")); - choices.insert(p_t(256 * 4 + 15, "smc PENTAX-FA 28-105mm f/4-5.6 [IF]")); - choices.insert(p_t(256 * 4 + 16, "Tamron AF 80-210mm f/4-5.6 (178D)")); - choices.insert(p_t(256 * 4 + 19, "Tamron SP AF 90mm f/2.8 (172E)")); - choices.insert(p_t(256 * 4 + 20, "smc PENTAX-FA 28-80mm f/3.5-5.6")); - choices.insert(p_t(256 * 4 + 21, "Cosina AF 100-300mm f/5.6-6.7")); - choices.insert(p_t(256 * 4 + 22, "Tokina 28-80mm f/3.5-5.6")); - choices.insert(p_t(256 * 4 + 23, "smc PENTAX-FA 20-35mm f/4 AL")); - choices.insert(p_t(256 * 4 + 24, "smc PENTAX-FA 77mm f/1.8 Limited")); - choices.insert(p_t(256 * 4 + 25, "Tamron SP AF 14mm f/2.8")); - choices.insert(p_t(256 * 4 + 26, "smc PENTAX-FA Macro 100mm f/3.5 or Cosina Lens")); - choices.insert(p_t(256 * 4 + 26, "Cosina 100mm f/3.5 Macro")); - choices.insert(p_t(256 * 4 + 27, "Tamron AF 28-300mm f/3.5-6.3 LD Aspherical[IF] Macro (185D/285D)")); - choices.insert(p_t(256 * 4 + 28, "smc PENTAX-FA 35mm f/2 AL")); - choices.insert(p_t(256 * 4 + 29, "Tamron AF 28-200mm f/3.8-5.6 LD Super II Macro (371D)")); - choices.insert(p_t(256 * 4 + 34, "smc PENTAX-FA 24-90mm f/3.5-4.5 AL[IF]")); - choices.insert(p_t(256 * 4 + 35, "smc PENTAX-FA 100-300mm f/4.7-5.8")); - choices.insert(p_t(256 * 4 + 36, "Tamron AF 70-300mm f/4-5.6 LD Macro 1:2")); - choices.insert(p_t(256 * 4 + 37, "Tamron SP AF 24-135mm f/3.5-5.6 AD AL (190D)")); - choices.insert(p_t(256 * 4 + 38, "smc PENTAX-FA 28-105mm f/3.2-4.5 AL[IF]")); - choices.insert(p_t(256 * 4 + 39, "smc PENTAX-FA 31mm f/1.8 AL Limited")); - choices.insert(p_t(256 * 4 + 41, "Tamron AF 28-200mm Super Zoom f/3.8-5.6 Aspherical XR [IF] Macro (A03)")); - choices.insert(p_t(256 * 4 + 43, "smc PENTAX-FA 28-90mm f/3.5-5.6")); - choices.insert(p_t(256 * 4 + 44, "smc PENTAX-FA J 75-300mm f/4.5-5.8 AL")); - choices.insert(p_t(256 * 4 + 45, "Tamron Lens (4 45)")); - choices.insert(p_t(256 * 4 + 45, "Tamron 28-300mm f/3.5-6.3 Ultra zoom XR")); - choices.insert(p_t(256 * 4 + 45, "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical [IF] Macro")); - choices.insert(p_t(256 * 4 + 46, "smc PENTAX-FA J 28-80mm f/3.5-5.6 AL")); - choices.insert(p_t(256 * 4 + 47, "smc PENTAX-FA J 18-35mm f/4-5.6 AL")); - choices.insert(p_t(256 * 4 + 49, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro")); - choices.insert(p_t(256 * 4 + 51, "smc PENTAX-D FA 50mm f/2.8 Macro")); - choices.insert(p_t(256 * 4 + 52, "smc PENTAX-D FA 100mm f/2.8 Macro")); - choices.insert(p_t(256 * 4 + 55, "Samsung/Schneider D-XENOGON 35mm f/2")); - choices.insert(p_t(256 * 4 + 56, "Samsung/Schneider D-XENON 100mm f/2.8 Macro")); - choices.insert(p_t(256 * 4 + 75, "Tamron SP AF 70-200mm f/2.8 Di LD [IF] Macro (A001)")); - choices.insert(p_t(256 * 4 + 214, "smc PENTAX-DA 35mm f/2.4 AL")); - choices.insert(p_t(256 * 4 + 229, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL II")); - choices.insert(p_t(256 * 4 + 230, "Tamron SP AF 17-50mm f/2.8 XR Di II")); - choices.insert(p_t(256 * 4 + 231, "smc PENTAX-DA 18-250mm f/3.5-6.3 ED AL [IF]")); - choices.insert(p_t(256 * 4 + 237, "Samsung/Schneider D-XENOGON 10-17mm f/3.5-4.5")); - choices.insert(p_t(256 * 4 + 239, "Samsung/Schneider D-XENON 12-24mm f/4 ED AL [IF]")); - choices.insert(p_t(256 * 4 + 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM (SDM unused)")); - choices.insert(p_t(256 * 4 + 243, "smc PENTAX-DA 70mm f/2.4 Limited")); - choices.insert(p_t(256 * 4 + 244, "smc PENTAX-DA 21mm f/3.2 AL Limited")); - choices.insert(p_t(256 * 4 + 245, "Samsung/Schneider D-XENON 50-200mm f/4-5.6")); - choices.insert(p_t(256 * 4 + 246, "Samsung/Schneider D-XENON 18-55mm f/3.5-5.6")); - choices.insert(p_t(256 * 4 + 247, "smc PENTAX-DA FISH-EYE 10-17mm f/3.5-4.5 ED[IF]")); - choices.insert(p_t(256 * 4 + 248, "smc PENTAX-DA 12-24mm f/4 ED AL [IF]")); - choices.insert(p_t(256 * 4 + 249, "Tamron XR DiII 18-200mm f/3.5-6.3 (A14)")); - choices.insert(p_t(256 * 4 + 250, "smc PENTAX-DA 50-200mm f/4-5.6 ED")); - choices.insert(p_t(256 * 4 + 251, "smc PENTAX-DA 40mm f/2.8 Limited")); - choices.insert(p_t(256 * 4 + 252, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL")); - choices.insert(p_t(256 * 4 + 253, "smc PENTAX-DA 14mm f/2.8 ED[IF]")); - choices.insert(p_t(256 * 4 + 254, "smc PENTAX-DA 16-45mm f/4 ED AL")); - choices.insert(p_t(256 * 5 + 1, "smc PENTAX-FA* 24mm f/2 AL[IF]")); - choices.insert(p_t(256 * 5 + 2, "smc PENTAX-FA 28mm f/2.8 AL")); - choices.insert(p_t(256 * 5 + 3, "smc PENTAX-FA 50mm f/1.7")); - choices.insert(p_t(256 * 5 + 4, "smc PENTAX-FA 50mm f/1.4")); - choices.insert(p_t(256 * 5 + 5, "smc PENTAX-FA* 600mm f/4 ED[IF]")); - choices.insert(p_t(256 * 5 + 6, "smc PENTAX-FA* 300mm f/4.5 ED[IF]")); - choices.insert(p_t(256 * 5 + 7, "smc PENTAX-FA 135mm f/2.8 [IF]")); - choices.insert(p_t(256 * 5 + 8, "smc PENTAX-FA Macro 50mm f/2.8")); - choices.insert(p_t(256 * 5 + 9, "smc PENTAX-FA Macro 100mm f/2.8")); - choices.insert(p_t(256 * 5 + 10, "smc PENTAX-FA* 85mm f/1.4 [IF]")); - choices.insert(p_t(256 * 5 + 11, "smc PENTAX-FA* 200mm f/2.8 ED[IF]")); - choices.insert(p_t(256 * 5 + 12, "smc PENTAX-FA 28-80mm f/3.5-4.7")); - choices.insert(p_t(256 * 5 + 13, "smc PENTAX-FA 70-200mm f/4-5.6")); - choices.insert(p_t(256 * 5 + 14, "smc PENTAX-FA* 250-600mm f/5.6 ED[IF]")); - choices.insert(p_t(256 * 5 + 15, "smc PENTAX-FA 28-105mm f/4-5.6")); - choices.insert(p_t(256 * 5 + 16, "smc PENTAX-FA 100-300mm f/4.5-5.6")); - choices.insert(p_t(256 * 5 + 98, "smc PENTAX-FA 100-300mm f/4.5-5.6")); - choices.insert(p_t(256 * 6 + 1, "smc PENTAX-FA* 85mm f/1.4 [IF]")); - choices.insert(p_t(256 * 6 + 2, "smc PENTAX-FA* 200mm f/2.8 ED[IF]")); - choices.insert(p_t(256 * 6 + 3, "smc PENTAX-FA* 300mm f/2.8 ED[IF]")); - choices.insert(p_t(256 * 6 + 4, "smc PENTAX-FA* 28-70mm f/2.8 AL")); - choices.insert(p_t(256 * 6 + 5, "smc PENTAX-FA* 80-200mm f/2.8 ED[IF]")); - choices.insert(p_t(256 * 6 + 6, "smc PENTAX-FA* 28-70mm f/2.8 AL")); - choices.insert(p_t(256 * 6 + 7, "smc PENTAX-FA* 80-200mm f/2.8 ED[IF]")); - choices.insert(p_t(256 * 6 + 8, "smc PENTAX-FA 28-70mm f/4AL")); - choices.insert(p_t(256 * 6 + 9, "smc PENTAX-FA 20mm f/2.8")); - choices.insert(p_t(256 * 6 + 10, "smc PENTAX-FA* 400mm f/5.6 ED[IF]")); - choices.insert(p_t(256 * 6 + 13, "smc PENTAX-FA* 400mm f/5.6 ED[IF]")); - choices.insert(p_t(256 * 6 + 14, "smc PENTAX-FA* Macro 200mm f/4 ED[IF]")); - choices.insert(p_t(256 * 7 + 0, "smc PENTAX-DA 21mm f/3.2 AL Limited")); - choices.insert(p_t(256 * 7 + 58, "smc PENTAX-D FA Macro 100mm f/2.8 WR")); - choices.insert(p_t(256 * 7 + 75, "Tamron SP AF 70-200mm f/2.8 Di LD [IF] Macro (A001)")); - choices.insert(p_t(256 * 7 + 201, "smc Pentax-DA L 50-200mm f/4-5.6 ED WR")); - choices.insert(p_t(256 * 7 + 202, "smc PENTAX-DA L 18-55mm f/3.5-5.6 AL WR")); - choices.insert(p_t(256 * 7 + 203, "HD PENTAX-DA 55-300mm f/4-5.8 ED WR")); - choices.insert(p_t(256 * 7 + 204, "HD PENTAX-DA 15mm f/4 ED AL Limited")); - choices.insert(p_t(256 * 7 + 205, "HD PENTAX-DA 35mm f/2.8 Macro Limited")); - choices.insert(p_t(256 * 7 + 206, "HD PENTAX-DA 70mm f/2.4 Limited")); - choices.insert(p_t(256 * 7 + 207, "HD PENTAX-DA 21mm f/3.2 ED AL Limited")); - choices.insert(p_t(256 * 7 + 208, "HD PENTAX-DA 40mm f/2.8 Limited")); - choices.insert(p_t(256 * 7 + 212, "smc PENTAX-DA 50mm f/1.8")); - choices.insert(p_t(256 * 7 + 213, "smc PENTAX-DA 40mm f/2.8 XS")); - choices.insert(p_t(256 * 7 + 214, "smc PENTAX-DA 35mm f/2.4 AL")); - choices.insert(p_t(256 * 7 + 216, "smc PENTAX-DA L 55-300mm f/4-5.8 ED")); - choices.insert(p_t(256 * 7 + 217, "smc PENTAX-DA 50-200mm f/4-5.6 ED WR")); - choices.insert(p_t(256 * 7 + 218, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL WR")); - choices.insert(p_t(256 * 7 + 220, "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical [IF]")); - choices.insert(p_t(256 * 7 + 221, "smc PENTAX-DA L 50-200mm f/4-5.6 ED")); - choices.insert(p_t(256 * 7 + 222, "smc PENTAX-DA L 18-55mm f/3.5-5.6")); - choices.insert(p_t(256 * 7 + 223, "Samsung/Schneider D-XENON 18-55mm f/3.5-5.6 II")); - choices.insert(p_t(256 * 7 + 224, "smc PENTAX-DA 15mm f/4 ED AL Limited")); - choices.insert(p_t(256 * 7 + 225, "Samsung/Schneider D-XENON 18-250mm f/3.5-6.3")); - choices.insert(p_t(256 * 7 + 226, "smc PENTAX-DA* 55mm f/1.4 SDM (SDM unused)")); - choices.insert(p_t(256 * 7 + 227, "smc PENTAX-DA* 60-250mm f/4 [IF] SDM (SDM unused)")); - choices.insert(p_t(256 * 7 + 228, "Samsung 16-45mm f/4 ED")); - choices.insert(p_t(256 * 7 + 229, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL II")); - choices.insert(p_t(256 * 7 + 230, "Tamron AF 17-50mm f/2.8 XR Di-II LD (Model A16)")); - choices.insert(p_t(256 * 7 + 231, "smc PENTAX-DA 18-250mm f/3.5-6.3 ED AL [IF]")); - choices.insert(p_t(256 * 7 + 233, "smc PENTAX-DA 35mm f/2.8 Macro Limited")); - choices.insert(p_t(256 * 7 + 234, "smc PENTAX-DA* 300mm f/4 ED [IF] SDM (SDM unused)")); - choices.insert(p_t(256 * 7 + 235, "smc PENTAX-DA* 200mm f/2.8 ED [IF] SDM (SDM unused)")); - choices.insert(p_t(256 * 7 + 236, "smc PENTAX-DA 55-300mm f/4-5.8 ED")); - choices.insert(p_t(256 * 7 + 238, "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical [IF] Macro")); - choices.insert(p_t(256 * 7 + 241, "smc PENTAX-DA* 50-135mm f/2.8 ED [IF] SDM (SDM unused)")); - choices.insert(p_t(256 * 7 + 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM (SDM unused)")); - choices.insert(p_t(256 * 7 + 243, "smc PENTAX-DA 70mm f/2.4 Limited")); - choices.insert(p_t(256 * 7 + 244, "smc PENTAX-DA 21mm f/3.2 AL Limited")); - choices.insert(p_t(256 * 8 + 0, "Sigma 50-150mm f/2.8 II APO EX DC HSM")); - choices.insert(p_t(256 * 8 + 3, "Sigma AF 18-125mm f/3.5-5.6 DC")); - choices.insert(p_t(256 * 8 + 4, "Sigma 50mm f/1.4 EX DG HSM")); - choices.insert(p_t(256 * 8 + 7, "Sigma 24-70mm f/2.8 IF EX DG HSM")); - choices.insert(p_t(256 * 8 + 8, "Sigma 18-250mm f/3.5-6.3 DC OS HSM")); - choices.insert(p_t(256 * 8 + 11, "Sigma 10-20mm f/3.5 EX DC HSM")); - choices.insert(p_t(256 * 8 + 12, "Sigma 70-300mm f/4-5.6 DG OS")); - choices.insert(p_t(256 * 8 + 13, "Sigma 120-400mm f/4.5-5.6 APO DG OS HSM")); - choices.insert(p_t(256 * 8 + 14, "Sigma 17-70mm f/2.8-4.0 DC Macro OS HSM")); - choices.insert(p_t(256 * 8 + 15, "Sigma 150-500mm f/5-6.3 APO DG OS HSM")); - choices.insert(p_t(256 * 8 + 16, "Sigma 70-200mm f/2.8 EX DG Macro HSM II")); - choices.insert(p_t(256 * 8 + 17, "Sigma 50-500mm f/4.5-6.3 DG OS HSM")); - choices.insert(p_t(256 * 8 + 18, "Sigma 8-16mm f/4.5-5.6 DC HSM")); - choices.insert(p_t(256 * 8 + 21, "Sigma 17-50mm f/2.8 EX DC OS HSM")); - choices.insert(p_t(256 * 8 + 22, "Sigma 85mm f/1.4 EX DG HSM")); - choices.insert(p_t(256 * 8 + 23, "Sigma 70-200mm f/2.8 APO EX DG OS HSM")); - choices.insert(p_t(256 * 8 + 25, "Sigma 17-50mm f/2.8 EX DC HSM")); - choices.insert(p_t(256 * 8 + 27, "Sigma 18-200mm f/3.5-6.3 II DC HSM")); - choices.insert(p_t(256 * 8 + 28, "Sigma 18-250mm f/3.5-6.3 DC Macro HSM")); - choices.insert(p_t(256 * 8 + 29, "Sigma 35mm f/1.4 DG HSM")); - choices.insert(p_t(256 * 8 + 30, "Sigma 17-70mm f/2.8-4 DC Macro HSM | C")); - choices.insert(p_t(256 * 8 + 31, "Sigma 18-35mm f/1.8 DC HSM")); - choices.insert(p_t(256 * 8 + 32, "Sigma 30mm f/1.4 DC HSM | A")); - choices.insert(p_t(256 * 8 + 34, "Sigma 18-300mm f/3.5-6.3 DC Macro HSM")); - choices.insert(p_t(256 * 8 + 59, "HD PENTAX-D FA 150-450mm f/4.5-5.6 ED DC AW")); - choices.insert(p_t(256 * 8 + 60, "HD PENTAX-D FA* 70-200mm f/2.8 ED DC AW")); - choices.insert(p_t(256 * 8 + 61, "HD PENTAX-D FA 28-105mm f/3.5-5.6 ED DC 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 + 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 + 199, "HD PENTAX-DA 18-50mm f/4-5.6 DC WR RE")); - choices.insert(p_t(256 * 8 + 200, "HD PENTAX-DA 16-85mm f/3.5-5.6 ED DC WR")); - choices.insert(p_t(256 * 8 + 209, "HD PENTAX-DA 20-40mm f/2.8-4 ED Limited DC WR")); - choices.insert(p_t(256 * 8 + 210, "smc PENTAX-DA 18-270mm f/3.5-6.3 ED SDM")); - choices.insert(p_t(256 * 8 + 211, "HD PENTAX-DA 560mm f/5.6 ED AW")); - choices.insert(p_t(256 * 8 + 215, "smc PENTAX-DA 18-135mm f/3.5-5.6 ED AL [IF] DC WR")); - choices.insert(p_t(256 * 8 + 226, "smc PENTAX-DA* 55mm f/1.4 SDM")); - choices.insert(p_t(256 * 8 + 227, "smc PENTAX-DA* 60-250mm f/4 [IF] SDM")); - choices.insert(p_t(256 * 8 + 232, "smc PENTAX-DA 17-70mm f/4 AL [IF] SDM")); - choices.insert(p_t(256 * 8 + 234, "smc PENTAX-DA* 300mm f/4 ED [IF] SDM")); - choices.insert(p_t(256 * 8 + 235, "smc PENTAX-DA* 200mm f/2.8 ED [IF] SDM")); - choices.insert(p_t(256 * 8 + 241, "smc PENTAX-DA* 50-135mm f/2.8 ED [IF] SDM")); - choices.insert(p_t(256 * 8 + 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM")); - choices.insert(p_t(256 * 8 + 255, "Sigma Lens (8 255)")); - choices.insert(p_t(256 * 8 + 255, "Sigma 70-200mm f/2.8 EX DG Macro HSM II")); - choices.insert(p_t(256 * 8 + 255, "Sigma 150-500mm f/5-6.3 DG APO [OS] HSM")); - choices.insert(p_t(256 * 8 + 255, "Sigma 50-150mm f/2.8 II APO EX DC HSM")); - choices.insert(p_t(256 * 8 + 255, "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye")); - choices.insert(p_t(256 * 8 + 255, "Sigma 50-200mm f/4-5.6 DC OS")); - choices.insert(p_t(256 * 8 + 255, "Sigma 24-70mm f/2.8 EX DG HSM")); - choices.insert(p_t(256 * 9 + 0, "645 Manual Lens")); - choices.insert(p_t(256 * 10 + 0, "645 A Series Lens")); - choices.insert(p_t(256 * 11 + 1, "smc PENTAX-FA 645 75mm f/2.8")); - choices.insert(p_t(256 * 11 + 2, "smc PENTAX-FA 645 45mm f/2.8")); - choices.insert(p_t(256 * 11 + 3, "smc PENTAX-FA* 645 300mm f/4 ED [IF]")); - choices.insert(p_t(256 * 11 + 4, "smc PENTAX-FA 645 45-85mm f/4.5")); - choices.insert(p_t(256 * 11 + 5, "smc PENTAX-FA 645 400mm f/5.6 ED [IF]")); - choices.insert(p_t(256 * 11 + 7, "smc PENTAX-FA 645 Macro 120mm f/4")); - choices.insert(p_t(256 * 11 + 8, "smc PENTAX-FA 645 80-160mm f/4.5")); - choices.insert(p_t(256 * 11 + 9, "smc PENTAX-FA 645 200mm f/4 [IF]")); - choices.insert(p_t(256 * 11 + 10, "smc PENTAX-FA 645 150mm f/2.8 [IF]")); - choices.insert(p_t(256 * 11 + 11, "smc PENTAX-FA 645 35mm f/3.5 AL [IF]")); - choices.insert(p_t(256 * 11 + 12, "smc PENTAX-FA 645 300mm f/5.6 ED [IF]")); - choices.insert(p_t(256 * 11 + 14, "smc PENTAX-FA 645 55-110mm f/5.6")); - choices.insert(p_t(256 * 11 + 16, "smc PENTAX-FA 645 33-55mm f/4.5 AL")); - choices.insert(p_t(256 * 11 + 17, "smc PENTAX-FA 645 150-300mm f/5.6 ED [IF]")); - choices.insert(p_t(256 * 11 + 21, "HD PENTAX-D FA 645 35mm f/3.5 AL [IF]")); - choices.insert(p_t(256 * 13 + 18, "smc PENTAX-D FA 645 55mm f/2.8 AL [IF] SDM AW")); - choices.insert(p_t(256 * 13 + 19, "smc PENTAX-D FA 645 25mm f/4 AL [IF] SDM AW")); - choices.insert(p_t(256 * 13 + 20, "HD PENTAX-D FA 645 90mm f/2.8 ED AW SR")); - choices.insert(p_t(256 * 13 + 253, "HD PENTAX-DA 645 28-45mm f/4.5 ED AW SR")); - choices.insert(p_t(256 * 21 + 0, "Pentax Q Manual Lens")); - choices.insert(p_t(256 * 21 + 1, "01 Standard Prime 8.5mm f/1.9")); - choices.insert(p_t(256 * 21 + 2, "02 Standard Zoom 5-15mm f/2.8-4.5")); - choices.insert(p_t(256 * 21 + 6, "06 Telephoto Zoom 15-45mm f/2.8")); - choices.insert(p_t(256 * 21 + 7, "07 Mount Shield 11.5mm f/9")); - choices.insert(p_t(256 * 21 + 8, "08 Wide Zoom 3.8-5.9mm f/3.7-4")); - choices.insert(p_t(256 * 22 + 3, "03 Fish-eye 3.2mm f/5.6")); - choices.insert(p_t(256 * 22 + 4, "04 Toy Lens Wide 6.3mm f/7.1")); - choices.insert(p_t(256 * 22 + 5, "05 Toy Lens Telephoto 18mm f/8")); + choices.insert (p_t (256 * 0 + 0, "M-42 or No Lens")); + choices.insert (p_t (256 * 1 + 0, "K or M Lens")); + choices.insert (p_t (256 * 2 + 0, "A Series Lens")); + choices.insert (p_t (256 * 3 + 0, "Sigma")); + choices.insert (p_t (256 * 3 + 17, "smc PENTAX-FA SOFT 85mm f/2.8")); + choices.insert (p_t (256 * 3 + 18, "smc PENTAX-F 1.7X AF ADAPTER")); + choices.insert (p_t (256 * 3 + 19, "smc PENTAX-F 24-50mm f/4")); + choices.insert (p_t (256 * 3 + 20, "smc PENTAX-F 35-80mm f/4-5.6")); + choices.insert (p_t (256 * 3 + 21, "smc PENTAX-F 80-200mm f/4.7-5.6")); + choices.insert (p_t (256 * 3 + 22, "smc PENTAX-F FISH-EYE 17-28mm f/3.5-4.5")); + choices.insert (p_t (256 * 3 + 23, "smc PENTAX-F 100-300mm f/4.5-5.6 or Sigma Lens")); + choices.insert (p_t (256 * 3 + 23, "Sigma AF 28-300mm f/3.5-5.6 DL IF")); + choices.insert (p_t (256 * 3 + 23, "Sigma AF 28-300mm f/3.5-6.3 DG IF Macro")); + choices.insert (p_t (256 * 3 + 23, "Tokina 80-200mm f/2.8 ATX-Pro")); + choices.insert (p_t (256 * 3 + 24, "smc PENTAX-F 35-135mm f/3.5-4.5")); + choices.insert (p_t (256 * 3 + 25, "smc PENTAX-F 35-105mm f/4-5.6 or Sigma or Tokina Lens")); + choices.insert (p_t (256 * 3 + 25, "Sigma 55-200mm f/4-5.6 DC")); + choices.insert (p_t (256 * 3 + 25, "Sigma AF 28-300mm f/3.5-5.6 DL IF")); + choices.insert (p_t (256 * 3 + 25, "Sigma AF 28-300mm f/3.5-6.3 DL IF")); + choices.insert (p_t (256 * 3 + 25, "Sigma AF 28-300mm f/3.5-6.3 DG IF Macro")); + choices.insert (p_t (256 * 3 + 25, "Tokina 80-200mm f/2.8 ATX-Pro")); + choices.insert (p_t (256 * 3 + 26, "smc PENTAX-F* 250-600mm f/5.6 ED[IF]")); + choices.insert (p_t (256 * 3 + 27, "smc PENTAX-F 28-80mm f/3.5-4.5 or Tokina Lens")); + choices.insert (p_t (256 * 3 + 27, "Tokina AT-X Pro AF 28-70mm f/2.6-2.8")); + choices.insert (p_t (256 * 3 + 28, "smc PENTAX-F 35-70mm f/3.5-4.5 or Tokina Lens")); + choices.insert (p_t (256 * 3 + 28, "Tokina 19-35mm f/3.5-4.5 AF")); + choices.insert (p_t (256 * 3 + 28, "Tokina AT-X AF 400mm f/5.6")); + choices.insert (p_t (256 * 3 + 29, "PENTAX-F 28-80mm f/3.5-4.5 or Sigma or Tokina Lens")); + choices.insert (p_t (256 * 3 + 29, "Sigma AF 18-125mm f/3.5-5.6 DC")); + choices.insert (p_t (256 * 3 + 29, "Tokina AT-X PRO 28-70mm f/2.6-2.8")); + choices.insert (p_t (256 * 3 + 30, "PENTAX-F 70-200mm f/4-5.6")); + choices.insert (p_t (256 * 3 + 31, "smc PENTAX-F 70-210mm f/4-5.6 or Tokina or Takumar Lens")); + choices.insert (p_t (256 * 3 + 31, "Tokina AF 730 75-300mm f/4.5-5.6")); + choices.insert (p_t (256 * 3 + 31, "Takumar-F 70-210mm f/4-5.6")); + choices.insert (p_t (256 * 3 + 32, "smc PENTAX-F 50mm f/1.4")); + choices.insert (p_t (256 * 3 + 33, "smc PENTAX-F 50mm f/1.7")); + choices.insert (p_t (256 * 3 + 34, "smc PENTAX-F 135mm f/2.8 [IF]")); + choices.insert (p_t (256 * 3 + 35, "smc PENTAX-F 28mm f/2.8")); + choices.insert (p_t (256 * 3 + 36, "Sigma 20mm f/1.8 EX DG Aspherical RF")); + choices.insert (p_t (256 * 3 + 38, "smc PENTAX-F* 300mm f/4.5 ED[IF]")); + choices.insert (p_t (256 * 3 + 39, "smc PENTAX-F* 600mm f/4 ED[IF]")); + choices.insert (p_t (256 * 3 + 40, "smc PENTAX-F Macro 100mm f/2.8")); + choices.insert (p_t (256 * 3 + 41, "smc PENTAX-F Macro 50mm f/2.8 or Sigma Lens")); + choices.insert (p_t (256 * 3 + 41, "Sigma 50mm f/2.8 Macro")); + choices.insert (p_t (256 * 3 + 42, "Sigma 300mm f/2.8 EX DG APO IF")); + choices.insert (p_t (256 * 3 + 44, "Sigma or Tamron Lens (3 44)")); + choices.insert (p_t (256 * 3 + 44, "Sigma AF 10-20mm f/4-5.6 EX DC")); + choices.insert (p_t (256 * 3 + 44, "Sigma 12-24mm f/4.5-5.6 EX DG")); + choices.insert (p_t (256 * 3 + 44, "Sigma 17-70mm f/2.8-4.5 DC Macro")); + choices.insert (p_t (256 * 3 + 44, "Sigma 18-50mm f/3.5-5.6 DC")); + choices.insert (p_t (256 * 3 + 44, "Sigma 17-35mm f/2.8-4 EX DG")); + choices.insert (p_t (256 * 3 + 44, "Tamron 35-90mm f/4 AF")); + choices.insert (p_t (256 * 3 + 44, "Sigma AF 18-35mm f/3.5-4.5 Aspherical")); + choices.insert (p_t (256 * 3 + 46, "Sigma or Samsung Lens (3 46)")); + choices.insert (p_t (256 * 3 + 46, "Sigma APO 70-200mm f/2.8 EX")); + choices.insert (p_t (256 * 3 + 46, "Sigma EX APO 100-300mm f/4 IF")); + choices.insert (p_t (256 * 3 + 46, "Samsung/Schneider D-XENON 50-200mm f/4-5.6 ED")); + choices.insert (p_t (256 * 3 + 50, "smc PENTAX-FA 28-70mm f/4 AL")); + choices.insert (p_t (256 * 3 + 51, "Sigma 28mm f/1.8 EX DG Aspherical Macro")); + choices.insert (p_t (256 * 3 + 52, "smc PENTAX-FA 28-200mm f/3.8-5.6 AL[IF] or Tamron Lens")); + choices.insert (p_t (256 * 3 + 52, "Tamron AF LD 28-200mm f/3.8-5.6 [IF] Aspherical (171D)")); + choices.insert (p_t (256 * 3 + 53, "smc PENTAX-FA 28-80mm f/3.5-5.6 AL")); + choices.insert (p_t (256 * 3 + 247, "smc PENTAX-DA FISH-EYE 10-17mm f/3.5-4.5 ED[IF]")); + choices.insert (p_t (256 * 3 + 248, "smc PENTAX-DA 12-24mm f/4 ED AL[IF]")); + choices.insert (p_t (256 * 3 + 250, "smc PENTAX-DA 50-200mm f/4-5.6 ED")); + choices.insert (p_t (256 * 3 + 251, "smc PENTAX-DA 40mm f/2.8 Limited")); + choices.insert (p_t (256 * 3 + 252, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL")); + choices.insert (p_t (256 * 3 + 253, "smc PENTAX-DA 14mm f/2.8 ED[IF]")); + choices.insert (p_t (256 * 3 + 254, "smc PENTAX-DA 16-45mm f/4 ED AL")); + choices.insert (p_t (256 * 3 + 255, "Sigma Lens (3 255)")); + choices.insert (p_t (256 * 3 + 255, "Sigma 18-200mm f/3.5-6.3 DC")); + choices.insert (p_t (256 * 3 + 255, "Sigma DL-II 35-80mm f/4-5.6")); + choices.insert (p_t (256 * 3 + 255, "Sigma DL Zoom 75-300mm f/4-5.6")); + choices.insert (p_t (256 * 3 + 255, "Sigma DF EX Aspherical 28-70mm f/2.8")); + choices.insert (p_t (256 * 3 + 255, "Sigma AF Tele 400mm f/5.6 Multi-coated")); + choices.insert (p_t (256 * 3 + 255, "Sigma 24-60mm f/2.8 EX DG")); + choices.insert (p_t (256 * 3 + 255, "Sigma 70-300mm f/4-5.6 Macro")); + choices.insert (p_t (256 * 3 + 255, "Sigma 55-200mm f/4-5.6 DC")); + choices.insert (p_t (256 * 3 + 255, "Sigma 18-50mm f/2.8 EX DC")); + choices.insert (p_t (256 * 4 + 1, "smc PENTAX-FA SOFT 28mm f/2.8")); + 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 + 6, "smc PENTAX-FA 35-80mm f/4-5.6")); + 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 + 15, "smc PENTAX-FA 28-105mm f/4-5.6 [IF]")); + choices.insert (p_t (256 * 4 + 16, "Tamron AF 80-210mm f/4-5.6 (178D)")); + choices.insert (p_t (256 * 4 + 19, "Tamron SP AF 90mm f/2.8 (172E)")); + choices.insert (p_t (256 * 4 + 20, "smc PENTAX-FA 28-80mm f/3.5-5.6")); + choices.insert (p_t (256 * 4 + 21, "Cosina AF 100-300mm f/5.6-6.7")); + choices.insert (p_t (256 * 4 + 22, "Tokina 28-80mm f/3.5-5.6")); + choices.insert (p_t (256 * 4 + 23, "smc PENTAX-FA 20-35mm f/4 AL")); + choices.insert (p_t (256 * 4 + 24, "smc PENTAX-FA 77mm f/1.8 Limited")); + choices.insert (p_t (256 * 4 + 25, "Tamron SP AF 14mm f/2.8")); + choices.insert (p_t (256 * 4 + 26, "smc PENTAX-FA Macro 100mm f/3.5 or Cosina Lens")); + choices.insert (p_t (256 * 4 + 26, "Cosina 100mm f/3.5 Macro")); + choices.insert (p_t (256 * 4 + 27, "Tamron AF 28-300mm f/3.5-6.3 LD Aspherical[IF] Macro (185D/285D)")); + choices.insert (p_t (256 * 4 + 28, "smc PENTAX-FA 35mm f/2 AL")); + choices.insert (p_t (256 * 4 + 29, "Tamron AF 28-200mm f/3.8-5.6 LD Super II Macro (371D)")); + choices.insert (p_t (256 * 4 + 34, "smc PENTAX-FA 24-90mm f/3.5-4.5 AL[IF]")); + choices.insert (p_t (256 * 4 + 35, "smc PENTAX-FA 100-300mm f/4.7-5.8")); + choices.insert (p_t (256 * 4 + 36, "Tamron AF 70-300mm f/4-5.6 LD Macro 1:2")); + choices.insert (p_t (256 * 4 + 37, "Tamron SP AF 24-135mm f/3.5-5.6 AD AL (190D)")); + choices.insert (p_t (256 * 4 + 38, "smc PENTAX-FA 28-105mm f/3.2-4.5 AL[IF]")); + choices.insert (p_t (256 * 4 + 39, "smc PENTAX-FA 31mm f/1.8 AL Limited")); + choices.insert (p_t (256 * 4 + 41, "Tamron AF 28-200mm Super Zoom f/3.8-5.6 Aspherical XR [IF] Macro (A03)")); + choices.insert (p_t (256 * 4 + 43, "smc PENTAX-FA 28-90mm f/3.5-5.6")); + choices.insert (p_t (256 * 4 + 44, "smc PENTAX-FA J 75-300mm f/4.5-5.8 AL")); + choices.insert (p_t (256 * 4 + 45, "Tamron Lens (4 45)")); + choices.insert (p_t (256 * 4 + 45, "Tamron 28-300mm f/3.5-6.3 Ultra zoom XR")); + choices.insert (p_t (256 * 4 + 45, "Tamron AF 28-300mm f/3.5-6.3 XR Di LD Aspherical [IF] Macro")); + choices.insert (p_t (256 * 4 + 46, "smc PENTAX-FA J 28-80mm f/3.5-5.6 AL")); + choices.insert (p_t (256 * 4 + 47, "smc PENTAX-FA J 18-35mm f/4-5.6 AL")); + choices.insert (p_t (256 * 4 + 49, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro")); + choices.insert (p_t (256 * 4 + 51, "smc PENTAX-D FA 50mm f/2.8 Macro")); + choices.insert (p_t (256 * 4 + 52, "smc PENTAX-D FA 100mm f/2.8 Macro")); + choices.insert (p_t (256 * 4 + 55, "Samsung/Schneider D-XENOGON 35mm f/2")); + choices.insert (p_t (256 * 4 + 56, "Samsung/Schneider D-XENON 100mm f/2.8 Macro")); + choices.insert (p_t (256 * 4 + 75, "Tamron SP AF 70-200mm f/2.8 Di LD [IF] Macro (A001)")); + choices.insert (p_t (256 * 4 + 214, "smc PENTAX-DA 35mm f/2.4 AL")); + choices.insert (p_t (256 * 4 + 229, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL II")); + choices.insert (p_t (256 * 4 + 230, "Tamron SP AF 17-50mm f/2.8 XR Di II")); + choices.insert (p_t (256 * 4 + 231, "smc PENTAX-DA 18-250mm f/3.5-6.3 ED AL [IF]")); + choices.insert (p_t (256 * 4 + 237, "Samsung/Schneider D-XENOGON 10-17mm f/3.5-4.5")); + choices.insert (p_t (256 * 4 + 239, "Samsung/Schneider D-XENON 12-24mm f/4 ED AL [IF]")); + choices.insert (p_t (256 * 4 + 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM (SDM unused)")); + choices.insert (p_t (256 * 4 + 243, "smc PENTAX-DA 70mm f/2.4 Limited")); + choices.insert (p_t (256 * 4 + 244, "smc PENTAX-DA 21mm f/3.2 AL Limited")); + choices.insert (p_t (256 * 4 + 245, "Samsung/Schneider D-XENON 50-200mm f/4-5.6")); + choices.insert (p_t (256 * 4 + 246, "Samsung/Schneider D-XENON 18-55mm f/3.5-5.6")); + choices.insert (p_t (256 * 4 + 247, "smc PENTAX-DA FISH-EYE 10-17mm f/3.5-4.5 ED[IF]")); + choices.insert (p_t (256 * 4 + 248, "smc PENTAX-DA 12-24mm f/4 ED AL [IF]")); + choices.insert (p_t (256 * 4 + 249, "Tamron XR DiII 18-200mm f/3.5-6.3 (A14)")); + choices.insert (p_t (256 * 4 + 250, "smc PENTAX-DA 50-200mm f/4-5.6 ED")); + choices.insert (p_t (256 * 4 + 251, "smc PENTAX-DA 40mm f/2.8 Limited")); + choices.insert (p_t (256 * 4 + 252, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL")); + choices.insert (p_t (256 * 4 + 253, "smc PENTAX-DA 14mm f/2.8 ED[IF]")); + choices.insert (p_t (256 * 4 + 254, "smc PENTAX-DA 16-45mm f/4 ED AL")); + choices.insert (p_t (256 * 5 + 1, "smc PENTAX-FA* 24mm f/2 AL[IF]")); + choices.insert (p_t (256 * 5 + 2, "smc PENTAX-FA 28mm f/2.8 AL")); + choices.insert (p_t (256 * 5 + 3, "smc PENTAX-FA 50mm f/1.7")); + choices.insert (p_t (256 * 5 + 4, "smc PENTAX-FA 50mm f/1.4")); + choices.insert (p_t (256 * 5 + 5, "smc PENTAX-FA* 600mm f/4 ED[IF]")); + choices.insert (p_t (256 * 5 + 6, "smc PENTAX-FA* 300mm f/4.5 ED[IF]")); + choices.insert (p_t (256 * 5 + 7, "smc PENTAX-FA 135mm f/2.8 [IF]")); + choices.insert (p_t (256 * 5 + 8, "smc PENTAX-FA Macro 50mm f/2.8")); + choices.insert (p_t (256 * 5 + 9, "smc PENTAX-FA Macro 100mm f/2.8")); + choices.insert (p_t (256 * 5 + 10, "smc PENTAX-FA* 85mm f/1.4 [IF]")); + choices.insert (p_t (256 * 5 + 11, "smc PENTAX-FA* 200mm f/2.8 ED[IF]")); + choices.insert (p_t (256 * 5 + 12, "smc PENTAX-FA 28-80mm f/3.5-4.7")); + choices.insert (p_t (256 * 5 + 13, "smc PENTAX-FA 70-200mm f/4-5.6")); + choices.insert (p_t (256 * 5 + 14, "smc PENTAX-FA* 250-600mm f/5.6 ED[IF]")); + choices.insert (p_t (256 * 5 + 15, "smc PENTAX-FA 28-105mm f/4-5.6")); + choices.insert (p_t (256 * 5 + 16, "smc PENTAX-FA 100-300mm f/4.5-5.6")); + choices.insert (p_t (256 * 5 + 98, "smc PENTAX-FA 100-300mm f/4.5-5.6")); + choices.insert (p_t (256 * 6 + 1, "smc PENTAX-FA* 85mm f/1.4 [IF]")); + choices.insert (p_t (256 * 6 + 2, "smc PENTAX-FA* 200mm f/2.8 ED[IF]")); + choices.insert (p_t (256 * 6 + 3, "smc PENTAX-FA* 300mm f/2.8 ED[IF]")); + choices.insert (p_t (256 * 6 + 4, "smc PENTAX-FA* 28-70mm f/2.8 AL")); + choices.insert (p_t (256 * 6 + 5, "smc PENTAX-FA* 80-200mm f/2.8 ED[IF]")); + choices.insert (p_t (256 * 6 + 6, "smc PENTAX-FA* 28-70mm f/2.8 AL")); + choices.insert (p_t (256 * 6 + 7, "smc PENTAX-FA* 80-200mm f/2.8 ED[IF]")); + choices.insert (p_t (256 * 6 + 8, "smc PENTAX-FA 28-70mm f/4AL")); + choices.insert (p_t (256 * 6 + 9, "smc PENTAX-FA 20mm f/2.8")); + choices.insert (p_t (256 * 6 + 10, "smc PENTAX-FA* 400mm f/5.6 ED[IF]")); + choices.insert (p_t (256 * 6 + 13, "smc PENTAX-FA* 400mm f/5.6 ED[IF]")); + choices.insert (p_t (256 * 6 + 14, "smc PENTAX-FA* Macro 200mm f/4 ED[IF]")); + choices.insert (p_t (256 * 7 + 0, "smc PENTAX-DA 21mm f/3.2 AL Limited")); + choices.insert (p_t (256 * 7 + 58, "smc PENTAX-D FA Macro 100mm f/2.8 WR")); + choices.insert (p_t (256 * 7 + 75, "Tamron SP AF 70-200mm f/2.8 Di LD [IF] Macro (A001)")); + choices.insert (p_t (256 * 7 + 201, "smc Pentax-DA L 50-200mm f/4-5.6 ED WR")); + choices.insert (p_t (256 * 7 + 202, "smc PENTAX-DA L 18-55mm f/3.5-5.6 AL WR")); + choices.insert (p_t (256 * 7 + 203, "HD PENTAX-DA 55-300mm f/4-5.8 ED WR")); + choices.insert (p_t (256 * 7 + 204, "HD PENTAX-DA 15mm f/4 ED AL Limited")); + choices.insert (p_t (256 * 7 + 205, "HD PENTAX-DA 35mm f/2.8 Macro Limited")); + choices.insert (p_t (256 * 7 + 206, "HD PENTAX-DA 70mm f/2.4 Limited")); + choices.insert (p_t (256 * 7 + 207, "HD PENTAX-DA 21mm f/3.2 ED AL Limited")); + choices.insert (p_t (256 * 7 + 208, "HD PENTAX-DA 40mm f/2.8 Limited")); + choices.insert (p_t (256 * 7 + 212, "smc PENTAX-DA 50mm f/1.8")); + choices.insert (p_t (256 * 7 + 213, "smc PENTAX-DA 40mm f/2.8 XS")); + choices.insert (p_t (256 * 7 + 214, "smc PENTAX-DA 35mm f/2.4 AL")); + choices.insert (p_t (256 * 7 + 216, "smc PENTAX-DA L 55-300mm f/4-5.8 ED")); + choices.insert (p_t (256 * 7 + 217, "smc PENTAX-DA 50-200mm f/4-5.6 ED WR")); + choices.insert (p_t (256 * 7 + 218, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL WR")); + choices.insert (p_t (256 * 7 + 220, "Tamron SP AF 10-24mm f/3.5-4.5 Di II LD Aspherical [IF]")); + choices.insert (p_t (256 * 7 + 221, "smc PENTAX-DA L 50-200mm f/4-5.6 ED")); + choices.insert (p_t (256 * 7 + 222, "smc PENTAX-DA L 18-55mm f/3.5-5.6")); + choices.insert (p_t (256 * 7 + 223, "Samsung/Schneider D-XENON 18-55mm f/3.5-5.6 II")); + choices.insert (p_t (256 * 7 + 224, "smc PENTAX-DA 15mm f/4 ED AL Limited")); + choices.insert (p_t (256 * 7 + 225, "Samsung/Schneider D-XENON 18-250mm f/3.5-6.3")); + choices.insert (p_t (256 * 7 + 226, "smc PENTAX-DA* 55mm f/1.4 SDM (SDM unused)")); + choices.insert (p_t (256 * 7 + 227, "smc PENTAX-DA* 60-250mm f/4 [IF] SDM (SDM unused)")); + choices.insert (p_t (256 * 7 + 228, "Samsung 16-45mm f/4 ED")); + choices.insert (p_t (256 * 7 + 229, "smc PENTAX-DA 18-55mm f/3.5-5.6 AL II")); + choices.insert (p_t (256 * 7 + 230, "Tamron AF 17-50mm f/2.8 XR Di-II LD (Model A16)")); + choices.insert (p_t (256 * 7 + 231, "smc PENTAX-DA 18-250mm f/3.5-6.3 ED AL [IF]")); + choices.insert (p_t (256 * 7 + 233, "smc PENTAX-DA 35mm f/2.8 Macro Limited")); + choices.insert (p_t (256 * 7 + 234, "smc PENTAX-DA* 300mm f/4 ED [IF] SDM (SDM unused)")); + choices.insert (p_t (256 * 7 + 235, "smc PENTAX-DA* 200mm f/2.8 ED [IF] SDM (SDM unused)")); + choices.insert (p_t (256 * 7 + 236, "smc PENTAX-DA 55-300mm f/4-5.8 ED")); + choices.insert (p_t (256 * 7 + 238, "Tamron AF 18-250mm f/3.5-6.3 Di II LD Aspherical [IF] Macro")); + choices.insert (p_t (256 * 7 + 241, "smc PENTAX-DA* 50-135mm f/2.8 ED [IF] SDM (SDM unused)")); + choices.insert (p_t (256 * 7 + 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM (SDM unused)")); + choices.insert (p_t (256 * 7 + 243, "smc PENTAX-DA 70mm f/2.4 Limited")); + choices.insert (p_t (256 * 7 + 244, "smc PENTAX-DA 21mm f/3.2 AL Limited")); + choices.insert (p_t (256 * 8 + 0, "Sigma 50-150mm f/2.8 II APO EX DC HSM")); + choices.insert (p_t (256 * 8 + 3, "Sigma AF 18-125mm f/3.5-5.6 DC")); + choices.insert (p_t (256 * 8 + 4, "Sigma 50mm f/1.4 EX DG HSM")); + choices.insert (p_t (256 * 8 + 7, "Sigma 24-70mm f/2.8 IF EX DG HSM")); + choices.insert (p_t (256 * 8 + 8, "Sigma 18-250mm f/3.5-6.3 DC OS HSM")); + choices.insert (p_t (256 * 8 + 11, "Sigma 10-20mm f/3.5 EX DC HSM")); + choices.insert (p_t (256 * 8 + 12, "Sigma 70-300mm f/4-5.6 DG OS")); + choices.insert (p_t (256 * 8 + 13, "Sigma 120-400mm f/4.5-5.6 APO DG OS HSM")); + choices.insert (p_t (256 * 8 + 14, "Sigma 17-70mm f/2.8-4.0 DC Macro OS HSM")); + choices.insert (p_t (256 * 8 + 15, "Sigma 150-500mm f/5-6.3 APO DG OS HSM")); + choices.insert (p_t (256 * 8 + 16, "Sigma 70-200mm f/2.8 EX DG Macro HSM II")); + choices.insert (p_t (256 * 8 + 17, "Sigma 50-500mm f/4.5-6.3 DG OS HSM")); + choices.insert (p_t (256 * 8 + 18, "Sigma 8-16mm f/4.5-5.6 DC HSM")); + choices.insert (p_t (256 * 8 + 21, "Sigma 17-50mm f/2.8 EX DC OS HSM")); + choices.insert (p_t (256 * 8 + 22, "Sigma 85mm f/1.4 EX DG HSM")); + choices.insert (p_t (256 * 8 + 23, "Sigma 70-200mm f/2.8 APO EX DG OS HSM")); + choices.insert (p_t (256 * 8 + 25, "Sigma 17-50mm f/2.8 EX DC HSM")); + choices.insert (p_t (256 * 8 + 27, "Sigma 18-200mm f/3.5-6.3 II DC HSM")); + choices.insert (p_t (256 * 8 + 28, "Sigma 18-250mm f/3.5-6.3 DC Macro HSM")); + choices.insert (p_t (256 * 8 + 29, "Sigma 35mm f/1.4 DG HSM")); + choices.insert (p_t (256 * 8 + 30, "Sigma 17-70mm f/2.8-4 DC Macro HSM | C")); + choices.insert (p_t (256 * 8 + 31, "Sigma 18-35mm f/1.8 DC HSM")); + choices.insert (p_t (256 * 8 + 32, "Sigma 30mm f/1.4 DC HSM | A")); + choices.insert (p_t (256 * 8 + 34, "Sigma 18-300mm f/3.5-6.3 DC Macro HSM")); + choices.insert (p_t (256 * 8 + 59, "HD PENTAX-D FA 150-450mm f/4.5-5.6 ED DC AW")); + choices.insert (p_t (256 * 8 + 60, "HD PENTAX-D FA* 70-200mm f/2.8 ED DC AW")); + choices.insert (p_t (256 * 8 + 61, "HD PENTAX-D FA 28-105mm f/3.5-5.6 ED DC 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 + 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 + 199, "HD PENTAX-DA 18-50mm f/4-5.6 DC WR RE")); + choices.insert (p_t (256 * 8 + 200, "HD PENTAX-DA 16-85mm f/3.5-5.6 ED DC WR")); + choices.insert (p_t (256 * 8 + 209, "HD PENTAX-DA 20-40mm f/2.8-4 ED Limited DC WR")); + choices.insert (p_t (256 * 8 + 210, "smc PENTAX-DA 18-270mm f/3.5-6.3 ED SDM")); + choices.insert (p_t (256 * 8 + 211, "HD PENTAX-DA 560mm f/5.6 ED AW")); + choices.insert (p_t (256 * 8 + 215, "smc PENTAX-DA 18-135mm f/3.5-5.6 ED AL [IF] DC WR")); + choices.insert (p_t (256 * 8 + 226, "smc PENTAX-DA* 55mm f/1.4 SDM")); + choices.insert (p_t (256 * 8 + 227, "smc PENTAX-DA* 60-250mm f/4 [IF] SDM")); + choices.insert (p_t (256 * 8 + 232, "smc PENTAX-DA 17-70mm f/4 AL [IF] SDM")); + choices.insert (p_t (256 * 8 + 234, "smc PENTAX-DA* 300mm f/4 ED [IF] SDM")); + choices.insert (p_t (256 * 8 + 235, "smc PENTAX-DA* 200mm f/2.8 ED [IF] SDM")); + choices.insert (p_t (256 * 8 + 241, "smc PENTAX-DA* 50-135mm f/2.8 ED [IF] SDM")); + choices.insert (p_t (256 * 8 + 242, "smc PENTAX-DA* 16-50mm f/2.8 ED AL [IF] SDM")); + choices.insert (p_t (256 * 8 + 255, "Sigma Lens (8 255)")); + choices.insert (p_t (256 * 8 + 255, "Sigma 70-200mm f/2.8 EX DG Macro HSM II")); + choices.insert (p_t (256 * 8 + 255, "Sigma 150-500mm f/5-6.3 DG APO [OS] HSM")); + choices.insert (p_t (256 * 8 + 255, "Sigma 50-150mm f/2.8 II APO EX DC HSM")); + choices.insert (p_t (256 * 8 + 255, "Sigma 4.5mm f/2.8 EX DC HSM Circular Fisheye")); + choices.insert (p_t (256 * 8 + 255, "Sigma 50-200mm f/4-5.6 DC OS")); + choices.insert (p_t (256 * 8 + 255, "Sigma 24-70mm f/2.8 EX DG HSM")); + choices.insert (p_t (256 * 9 + 0, "645 Manual Lens")); + choices.insert (p_t (256 * 10 + 0, "645 A Series Lens")); + choices.insert (p_t (256 * 11 + 1, "smc PENTAX-FA 645 75mm f/2.8")); + choices.insert (p_t (256 * 11 + 2, "smc PENTAX-FA 645 45mm f/2.8")); + choices.insert (p_t (256 * 11 + 3, "smc PENTAX-FA* 645 300mm f/4 ED [IF]")); + choices.insert (p_t (256 * 11 + 4, "smc PENTAX-FA 645 45-85mm f/4.5")); + choices.insert (p_t (256 * 11 + 5, "smc PENTAX-FA 645 400mm f/5.6 ED [IF]")); + choices.insert (p_t (256 * 11 + 7, "smc PENTAX-FA 645 Macro 120mm f/4")); + choices.insert (p_t (256 * 11 + 8, "smc PENTAX-FA 645 80-160mm f/4.5")); + choices.insert (p_t (256 * 11 + 9, "smc PENTAX-FA 645 200mm f/4 [IF]")); + choices.insert (p_t (256 * 11 + 10, "smc PENTAX-FA 645 150mm f/2.8 [IF]")); + choices.insert (p_t (256 * 11 + 11, "smc PENTAX-FA 645 35mm f/3.5 AL [IF]")); + choices.insert (p_t (256 * 11 + 12, "smc PENTAX-FA 645 300mm f/5.6 ED [IF]")); + choices.insert (p_t (256 * 11 + 14, "smc PENTAX-FA 645 55-110mm f/5.6")); + choices.insert (p_t (256 * 11 + 16, "smc PENTAX-FA 645 33-55mm f/4.5 AL")); + choices.insert (p_t (256 * 11 + 17, "smc PENTAX-FA 645 150-300mm f/5.6 ED [IF]")); + choices.insert (p_t (256 * 11 + 21, "HD PENTAX-D FA 645 35mm f/3.5 AL [IF]")); + choices.insert (p_t (256 * 13 + 18, "smc PENTAX-D FA 645 55mm f/2.8 AL [IF] SDM AW")); + choices.insert (p_t (256 * 13 + 19, "smc PENTAX-D FA 645 25mm f/4 AL [IF] SDM AW")); + choices.insert (p_t (256 * 13 + 20, "HD PENTAX-D FA 645 90mm f/2.8 ED AW SR")); + choices.insert (p_t (256 * 13 + 253, "HD PENTAX-DA 645 28-45mm f/4.5 ED AW SR")); + choices.insert (p_t (256 * 21 + 0, "Pentax Q Manual Lens")); + choices.insert (p_t (256 * 21 + 1, "01 Standard Prime 8.5mm f/1.9")); + choices.insert (p_t (256 * 21 + 2, "02 Standard Zoom 5-15mm f/2.8-4.5")); + choices.insert (p_t (256 * 21 + 6, "06 Telephoto Zoom 15-45mm f/2.8")); + choices.insert (p_t (256 * 21 + 7, "07 Mount Shield 11.5mm f/9")); + choices.insert (p_t (256 * 21 + 8, "08 Wide Zoom 3.8-5.9mm f/3.7-4")); + choices.insert (p_t (256 * 21 + 233, "Adapter Q for K-mount Lens")); + choices.insert (p_t (256 * 22 + 3, "03 Fish-eye 3.2mm f/5.6")); + choices.insert (p_t (256 * 22 + 4, "04 Toy Lens Wide 6.3mm f/7.1")); + choices.insert (p_t (256 * 22 + 5, "05 Toy Lens Telephoto 18mm f/8")); } virtual std::string toString (Tag* t) { double *liArray = nullptr; double maxApertureAtFocal = 0.; double focalLength = 0.; - int lensID = 256 * t->toInt(0, BYTE) + t->toInt(1, BYTE); + int lensID = 256 * t->toInt (0, BYTE) + t->toInt (1, BYTE); TagDirectory *root = t->getParent()->getRoot(); if (root) { Tag *t1; - t1 = root->findTag("FocalLength"); // Should get tag 0x920A (rational64u) from the standard Exif tag list + t1 = root->findTag ("FocalLength"); // Should get tag 0x920A (rational64u) from the standard Exif tag list - if( t1) { + if ( t1) { focalLength = t1->toDouble(); // Focal Length } - t1 = root->findTag("MaxAperture"); + t1 = root->findTag ("MaxAperture"); - if(t1) { + if (t1) { double maxAperture = t1->toDouble(); // MaxApertureValue at focal Length if (maxAperture != 0.) { maxApertureAtFocal = maxAperture; } else { - t1 = root->findTag("NominalMaxAperture"); + t1 = root->findTag ("NominalMaxAperture"); - if(t1) { + if (t1) { maxApertureAtFocal = t1->toDouble(); } } } - t1 = root->getTagP("LensInfo"); + t1 = root->getTagP ("LensInfo"); - if(t1) { + if (t1) { liArray = t1->toDoubleArray(); } // Focal length below 10mm are set to 0 by the camera in the standard Exif tag, so we'll look into the makernotes // This value will have decimals, which reflects more precision... or imprecision, due to the packed form of this value, who knows? if (focalLength == 0.) { - rtexif::TagDirectory* mnote = root->findTag("MakerNote")->getDirectory(); - rtexif::Tag* flt = mnote->getTagP("LensInfo/FocalLength"); + rtexif::TagDirectory* mnote = root->findTag ("MakerNote")->getDirectory(); + rtexif::Tag* flt = mnote->getTagP ("LensInfo/FocalLength"); if (flt) { focalLength = flt->toDouble (); @@ -1031,9 +1041,9 @@ public: } } - std::string retval = guess( lensID, focalLength, maxApertureAtFocal, liArray); + std::string retval = guess ( lensID, focalLength, maxApertureAtFocal, liArray); - if(liArray) { + if (liArray) { delete [] liArray; } @@ -1049,7 +1059,7 @@ public: virtual std::string toString (Tag* t) { std::ostringstream str; - int b = t->toInt(0, BYTE); + int b = t->toInt (0, BYTE); if (!b) { str << "Not stabilized"; @@ -1136,9 +1146,9 @@ public: int idx = 0; if (t->getCount() == 1) { - idx = t->toInt(0, BYTE); + idx = t->toInt (0, BYTE); } else if (t->getCount() == 2) { - idx = t->toInt(0, BYTE) << 8 | t->toInt(1, BYTE); + idx = t->toInt (0, BYTE) << 8 | t->toInt (1, BYTE); } std::map::iterator r = choices.find (idx); @@ -1160,7 +1170,7 @@ public: } virtual std::string toString (Tag* t) { - std::map::iterator r = choices.find (t->toInt(0, BYTE)); + std::map::iterator r = choices.find (t->toInt (0, BYTE)); std::ostringstream s; s << ((r != choices.end()) ? r->second : "n/a"); return s.str(); @@ -1198,7 +1208,7 @@ public: } virtual std::string toString (Tag* t) { - std::map::iterator r = choices.find (t->toInt(0, BYTE)); + std::map::iterator r = choices.find (t->toInt (0, BYTE)); std::ostringstream s; s << ((r != choices.end()) ? r->second : "n/a"); return s.str(); @@ -1229,9 +1239,9 @@ public: } virtual std::string toString (Tag* t) { - std::map::iterator r = choices.find (t->toInt(0, BYTE)); - std::map::iterator r1 = choices1.find (t->toInt(1, BYTE)); - std::map::iterator r2 = choices2.find (t->toInt(2, BYTE)); + std::map::iterator r = choices.find (t->toInt (0, BYTE)); + std::map::iterator r1 = choices1.find (t->toInt (1, BYTE)); + std::map::iterator r2 = choices2.find (t->toInt (2, BYTE)); std::ostringstream s; s << ((r != choices.end() ) ? r->second : "") << std::endl; s << ((r1 != choices1.end()) ? r1->second : "") << std::endl; @@ -1280,10 +1290,10 @@ public: buffer[0] = 0; // return buffer; // TODO: how to get the string content!? - // normal path below (copy the content of the string), but has to be bug fixed - memcpy(buffer, t->getValue(), 30); - buffer[30] = 0; - return buffer; +// // normal path below (copy the content of the string), but has to be bug fixed +// memcpy (buffer, t->getValue(), 30); +// buffer[30] = 0; +// return buffer; } }; PALensModelQInterpreter paLensModelQInterpreter; @@ -1298,10 +1308,10 @@ public: buffer[0] = 0; return buffer; // TODO: how to get the string content!? - // normal path below (copy the content of the string), but has to be bug fixed - memcpy(buffer, t->getValue(), 20); - buffer[20] = 0; - return buffer; +// // normal path below (copy the content of the string), but has to be bug fixed +// memcpy (buffer, t->getValue(), 20); +// buffer[20] = 0; +// return buffer; } }; PALensInfoQInterpreter paLensInfoQInterpreter; @@ -1315,9 +1325,9 @@ public: int a; if (t->getCount() == 1) { - a = t->toInt(0, SLONG) / 256; // int32u + a = t->toInt (0, SLONG) / 256; // int32u } else { - a = t->toInt(0, SBYTE) / 6; // int8u[2] + a = t->toInt (0, SBYTE) / 6; // int8u[2] } char buffer[32]; @@ -1329,12 +1339,12 @@ public: int a; if (t->getCount() == 1) { - a = t->toInt(0, SLONG) / 256; // int32u + a = t->toInt (0, SLONG) / 256; // int32u } else { - a = t->toInt(0, SBYTE) / 6; // int8u[2] + a = t->toInt (0, SBYTE) / 6; // int8u[2] } - return double(a); + return double (a); } }; PAFlashExposureCompInterpreter paFlashExposureCompInterpreter; @@ -1345,9 +1355,9 @@ public: PAFocalLengthInterpreter() {} virtual std::string toString (Tag* t) { - double a = double(t->toInt(0, LONG)); + double a = double (t->toInt (0, LONG)); - if(a > 1.) { + if (a > 1.) { char buffer[32]; sprintf (buffer, "%.2f", a / 100. ); return buffer; @@ -1357,9 +1367,9 @@ public: } virtual double toDouble (Tag* t, int ofs) { - double a = double(t->toInt(0, LONG)); + double a = double (t->toInt (0, LONG)); - if(a > 1.) { + if (a > 1.) { return a / 100.; } else { return 0.; @@ -1374,10 +1384,10 @@ public: PALensDataFocalLengthInterpreter() {} virtual std::string toString (Tag* t) { - int a = t->toInt(0, BYTE); - float b = float(10 * int(a >> 2)) * pow(4.f, float(int(a & 0x03) - 2)); + int a = t->toInt (0, BYTE); + float b = float (10 * int (a >> 2)) * pow (4.f, float (int (a & 0x03) - 2)); - if(b > 1.f) { + if (b > 1.f) { char buffer[32]; sprintf (buffer, "%.2f", b ); return buffer; @@ -1387,10 +1397,10 @@ public: } virtual double toDouble (Tag* t, int ofs) { - int a = t->toInt(ofs, BYTE); - float b = float(10 * int(a >> 2)) * pow(4.f, float(int(a & 0x03) - 2)); + int a = t->toInt (ofs, BYTE); + float b = float (10 * int (a >> 2)) * pow (4.f, float (int (a & 0x03) - 2)); - if(b > 1.f) { + if (b > 1.f) { return b; } else { return 0.; @@ -1405,16 +1415,16 @@ public: PAISOfInterpreter() {} virtual std::string toString (Tag* t) { - int a = t->toInt(0, BYTE); + int a = t->toInt (0, BYTE); char buffer[32]; - double v = 100.*exp(double(a - 32) * log(2.) / 8.); + double v = 100.*exp (double (a - 32) * log (2.) / 8.); sprintf (buffer, "%.1f", v ); return buffer; } virtual double toDouble (Tag* t, int ofs) { - int a = t->toInt(0, BYTE); - return 100.*exp(double(a - 32) * log(2.) / 8.); + int a = t->toInt (0, BYTE); + return 100.*exp (double (a - 32) * log (2.) / 8.); } }; PAISOfInterpreter paISOfInterpreter; @@ -1425,14 +1435,14 @@ public: PAMaxApertureInterpreter() {} virtual std::string toString (Tag* t) { - int a = t->toInt(0, BYTE); + int a = t->toInt (0, BYTE); a &= 0x7F; - if(a > 1) { + if (a > 1) { char buffer[32]; - double v = pow(2.0, (a - 1) / 32.0); + double v = pow (2.0, (a - 1) / 32.0); - if( v < 0. || v > 1000. ) { + if ( v < 0. || v > 1000. ) { return "undef"; } @@ -1444,11 +1454,11 @@ public: } virtual double toDouble (Tag* t, int ofs) { - int a = t->toInt(0, BYTE); + int a = t->toInt (0, BYTE); a &= 0x7F; - if(a > 1) { - return pow(2.0, double(a - 1) / 32.0); + if (a > 1) { + return pow (2.0, double (a - 1) / 32.0); } else { return 0.; } @@ -1462,16 +1472,16 @@ public: PAAEXvInterpreter() {} virtual std::string toString (Tag* t) { - int a = t->toInt(0, BYTE); + int a = t->toInt (0, BYTE); char buffer[32]; - double v = double(a - 64) / 8.; + double v = double (a - 64) / 8.; sprintf (buffer, "%.1f", v ); return buffer; } virtual double toDouble (Tag* t, int ofs) { - int a = t->toInt(0, BYTE); - return double(a - 64) / 8.; + int a = t->toInt (0, BYTE); + return double (a - 64) / 8.; } }; PAAEXvInterpreter paAEXvInterpreter; @@ -1482,16 +1492,16 @@ public: PAAEBXvInterpreter() {} virtual std::string toString (Tag* t) { - int a = t->toInt(0, SBYTE); + int a = t->toInt (0, SBYTE); char buffer[32]; - double v = double(a) / 8.; + double v = double (a) / 8.; sprintf (buffer, "%.1f", v ); return buffer; } virtual double toDouble (Tag* t, int ofs) { - int a = t->toInt(0, SBYTE); - return double(a) / 8.; + int a = t->toInt (0, SBYTE); + return double (a) / 8.; } }; PAAEBXvInterpreter paAEBXvInterpreter; @@ -1502,16 +1512,16 @@ public: PAApertureInterpreter() {} virtual std::string toString (Tag* t) { - int a = t->toInt(0, BYTE); + int a = t->toInt (0, BYTE); char buffer[32]; - double v = exp((double(a) - 68.) * log(2.) / 16.); + double v = exp ((double (a) - 68.) * log (2.) / 16.); sprintf (buffer, "%.1f", v ); return buffer; } virtual double toDouble (Tag* t, int ofs) { - int a = t->toInt(0, BYTE); - return exp((double(a) - 68.) * log(2.) / 16.); + int a = t->toInt (0, BYTE); + return exp ((double (a) - 68.) * log (2.) / 16.); } }; PAApertureInterpreter paApertureInterpreter; @@ -1522,16 +1532,16 @@ public: PAExposureTimeInterpreter() {} virtual std::string toString (Tag* t) { - int a = t->toInt(0, BYTE); + int a = t->toInt (0, BYTE); char buffer[32]; - double v = 24.*exp(-(double(a) - 32.) * log(2.) / 8.); + double v = 24.*exp (- (double (a) - 32.) * log (2.) / 8.); sprintf (buffer, "%.6f", v ); return buffer; } virtual double toDouble (Tag* t, int ofs) { - int a = t->toInt(0, BYTE); - return 24.*exp(-(double(a) - 32.) * log(2.) / 8.); + int a = t->toInt (0, BYTE); + return 24.*exp (- (double (a) - 32.) * log (2.) / 8.); } }; PAExposureTimeInterpreter paExposureTimeInterpreter; @@ -1543,15 +1553,15 @@ public: virtual std::string toString (Tag* t) { char buffer[32]; - int a = t->toInt(0, BYTE); + int a = t->toInt (0, BYTE); int mina = a & 0x0F; - sprintf (buffer, "%.1f", double(int(pow(2.0, double(mina + 10) / 4.0) + 0.2))); + sprintf (buffer, "%.1f", double (int (pow (2.0, double (mina + 10) / 4.0) + 0.2))); return buffer; } virtual double toDouble (Tag* t, int ofs) { - int a = t->toInt(0, BYTE) & 0x0F; - return double(int(pow(2.0, double(a + 10) / 4.0) + 0.2)); + int a = t->toInt (0, BYTE) & 0x0F; + return double (int (pow (2.0, double (a + 10) / 4.0) + 0.2)); } }; PANominalMinApertureInterpreter paNominalMinApertureInterpreter; @@ -1563,15 +1573,15 @@ public: virtual std::string toString (Tag* t) { char buffer[32]; - int a = t->toInt(0, BYTE); + int a = t->toInt (0, BYTE); int maxa = (a & 0xF0) >> 4; - sprintf (buffer, "%.1f", double(int(pow(2.0, double(maxa) / 4.0) + 0.2)) ); + sprintf (buffer, "%.1f", double (int (pow (2.0, double (maxa) / 4.0) + 0.2)) ); return buffer; } virtual double toDouble (Tag* t, int ofs) { - int a = ( t->toInt(0, BYTE) & 0xF0) >> 4; - return double(int(pow(2.0, double(a) / 4.0) + 0.2)); + int a = ( t->toInt (0, BYTE) & 0xF0) >> 4; + return double (int (pow (2.0, double (a) / 4.0) + 0.2)); } }; PANominalMaxApertureInterpreter paNominalMaxApertureInterpreter; @@ -1681,8 +1691,8 @@ public: virtual std::string toString (Tag* t) { char buffer[32]; - int b = t->toInt(0, BYTE) & 0x1F; - sprintf (buffer, "%.0f", pow(2., b / 16. + 4) ); + int b = t->toInt (0, BYTE) & 0x1F; + sprintf (buffer, "%.0f", pow (2., b / 16. + 4) ); return buffer; } }; @@ -1696,7 +1706,7 @@ public: { std::ostringstream str; - if( t->toInt(0, BYTE) & 0x20 ) { + if ( t->toInt (0, BYTE) & 0x20 ) { str << "1/3 EV steps"; } else { str << "1/2 EV steps"; @@ -1715,7 +1725,7 @@ public: { std::ostringstream str; - if( t->toInt(0, BYTE) & 0x40 ) { + if ( t->toInt (0, BYTE) & 0x40 ) { str << "P Shift"; } else { str << "Tv or Av"; @@ -1734,7 +1744,7 @@ public: { std::ostringstream str; - if( t->toInt(0, BYTE) & 0x80 ) { + if ( t->toInt (0, BYTE) & 0x80 ) { str << "Permitted"; } else { str << "Prohibited"; @@ -1762,7 +1772,7 @@ public: } virtual std::string toString (Tag* t) { - std::map::iterator r = choices.find (t->toInt(0, BYTE) >> 4); + std::map::iterator r = choices.find (t->toInt (0, BYTE) >> 4); if (r != choices.end()) { return r->second; @@ -1782,13 +1792,13 @@ public: virtual std::string toString (Tag* t) { std::ostringstream str; - int v = (t->toInt(0, BYTE) & 0xF); + int v = (t->toInt (0, BYTE) & 0xF); - if(!v) { + if (!v) { str << "Multi-segment"; - } else if(v & 1) { + } else if (v & 1) { str << "Center-weighted average"; - } else if(v & 2) { + } else if (v & 2) { str << "Spot"; } @@ -1846,31 +1856,31 @@ public: virtual std::string toString (Tag* t) { std::ostringstream str; - int c = t->toInt(0, BYTE); + int c = t->toInt (0, BYTE); - switch(c & 0xf) { - case 0: - str << "Manual"; - break; + switch (c & 0xf) { + case 0: + str << "Manual"; + break; - case 1: - str << "AF-S"; - break; + case 1: + str << "AF-S"; + break; - case 2: - str << "AF-C"; - break; + case 2: + str << "AF-C"; + break; - case 3: - str << "AF-A"; - break; + case 3: + str << "AF-A"; + break; } - if( (c & 0xF0) == 0) { + if ( (c & 0xF0) == 0) { str << ", Point Selection Auto"; - } else if( c & 0x20 ) { + } else if ( c & 0x20 ) { str << ", Fixed Center Point Selected"; - } else if( c & 0x10 ) { + } else if ( c & 0x10 ) { str << ", Point Selected"; } @@ -1885,18 +1895,18 @@ public: PAAFModeInterpreter() {} virtual std::string toString (Tag* t) { - switch(t->toInt(0, BYTE) & 0x3) { - case 0: - return "Normal"; + switch (t->toInt (0, BYTE) & 0x3) { + case 0: + return "Normal"; - case 1: - return "Hi Speed"; + case 1: + return "Hi Speed"; - case 2: - return "Depth"; + case 2: + return "Depth"; - case 3: - return "MTF"; + case 3: + return "MTF"; } return"Normal"; @@ -1911,14 +1921,15 @@ public: PAAFPointSelectedInterpreter() {} virtual std::string toString (Tag* t) { - int c = t->toInt(0, SHORT); + int c = t->toInt (0, SHORT); - if( !c ) { + if ( !c ) { return "Auto"; } else { const char *ps[] = {"Upper-left", "Top", "Upper-right", "Left", "Mid-left", "Center", "Mid-right", "Right", "Lower-left", "Bottom", "Lower-right"}; - for( int iBit = 0; iBit < 11; iBit++) - if( c & (1 << iBit) ) { + + for ( int iBit = 0; iBit < 11; iBit++) + if ( c & (1 << iBit) ) { return ps[iBit]; } @@ -1934,25 +1945,25 @@ public: PADriveMode2Interpreter() {} virtual std::string toString (Tag* t) { - int c = t->toInt(0, BYTE); + int c = t->toInt (0, BYTE); - if( !c ) { + if ( !c ) { return "Single-frame"; - } else if( c & 0x01) { + } else if ( c & 0x01) { return "Continuous"; - } else if( c & 0x02) { + } else if ( c & 0x02) { return "Continuous (Lo)"; - } else if( c & 0x04) { + } else if ( c & 0x04) { return "Self-timer (12 s)"; - } else if( c & 0x08) { + } else if ( c & 0x08) { return "Self-timer (2 s)"; - } else if( c & 0x10 ) { + } else if ( c & 0x10 ) { return "Remote Control (3 s delay)"; - } else if( c & 0x20) { + } else if ( c & 0x20) { return "Remote Control"; - } else if( c & 0x40) { + } else if ( c & 0x40) { return "Exposure Bracket"; - } else if( c & 0x80) { + } else if ( c & 0x80) { return "Multiple Exposure"; } else { return "Unknown"; diff --git a/rtexif/rtexif.cc b/rtexif/rtexif.cc index 64ddd0ee3..c12f5f782 100644 --- a/rtexif/rtexif.cc +++ b/rtexif/rtexif.cc @@ -47,13 +47,13 @@ Interpreter stdInterpreter; #define TAG_SUBFILETYPE 0x00fe TagDirectory::TagDirectory () - : attribs(ifdAttribs), order(HOSTORDER), parent(nullptr) {} + : attribs (ifdAttribs), order (HOSTORDER), parent (nullptr) {} TagDirectory::TagDirectory (TagDirectory* p, const TagAttrib* ta, ByteOrder border) - : attribs(ta), order(border), parent(p) {} + : attribs (ta), order (border), parent (p) {} TagDirectory::TagDirectory (TagDirectory* p, FILE* f, int base, const TagAttrib* ta, ByteOrder border, bool skipIgnored) - : attribs(ta), order(border), parent(p) + : attribs (ta), order (border), parent (p) { int numOfTags = get2 (f, order); @@ -119,13 +119,13 @@ void TagDirectory::sort () for (size_t i = 0; i < tags.size(); i++) if (tags[i]->isDirectory()) - for (int j = 0; tags[i]->getDirectory(j); j++) { - tags[i]->getDirectory(j)->sort (); + for (int j = 0; tags[i]->getDirectory (j); j++) { + tags[i]->getDirectory (j)->sort (); } } TagDirectory* TagDirectory::getRoot() { - if(parent) { + if (parent) { return parent->getRoot(); } else { return this; @@ -177,7 +177,7 @@ const TagAttrib* TagDirectory::getAttribP (const char* name) TagDirectory *tagDir; if (attribs[i].subdirAttribs && tag && (tagDir = tag->getDirectory())) { - return tagDir->getAttribP(n + 1); + return tagDir->getAttribP (n + 1); } else { return nullptr; } @@ -208,9 +208,9 @@ void TagDirectory::printAll (unsigned int level) const std::string name = tags[i]->nameToString (); if (tags[i]->isDirectory()) { - for (int j = 0; tags[i]->getDirectory(j); j++) { + for (int j = 0; tags[i]->getDirectory (j); j++) { printf ("%s+-- DIRECTORY %s[%d]:\n", prefixStr, name.c_str(), j); - tags[i]->getDirectory(j)->printAll (level + 1); + tags[i]->getDirectory (j)->printAll (level + 1); } } } @@ -270,7 +270,7 @@ bool TagDirectory::CPBDump (const Glib::ustring &commFName, const Glib::ustring f = g_fopen (commFName.c_str (), "wt"); if (f == nullptr) { - printf("TagDirectory::keyFileDump(\"%s\") >>> Error: unable to open file with write access!\n", commFName.c_str()); + printf ("TagDirectory::keyFileDump(\"%s\") >>> Error: unable to open file with write access!\n", commFName.c_str()); delete kf; return false; } @@ -278,17 +278,17 @@ bool TagDirectory::CPBDump (const Glib::ustring &commFName, const Glib::ustring try { kf->set_string ("RT General", "CachePath", options.cacheBaseDir); - kf->set_string ("RT General", "AppVersion", VERSION); - kf->set_integer("RT General", "ProcParamsVersion", PPVERSION); + kf->set_string ("RT General", "AppVersion", RTVERSION); + kf->set_integer ("RT General", "ProcParamsVersion", PPVERSION); kf->set_string ("RT General", "ImageFileName", imageFName); kf->set_string ("RT General", "OutputProfileFileName", profileFName); kf->set_string ("RT General", "DefaultProcParams", defaultPParams); - kf->set_boolean("RT General", "FlaggingMode", flagMode); + kf->set_boolean ("RT General", "FlaggingMode", flagMode); kf->set_double ("Common Data", "FNumber", cfs->fnumber); kf->set_double ("Common Data", "Shutter", cfs->shutter); kf->set_double ("Common Data", "FocalLength", cfs->focalLen); - kf->set_integer("Common Data", "ISO", cfs->iso); + kf->set_integer ("Common Data", "ISO", cfs->iso); kf->set_string ("Common Data", "Lens", cfs->lens); kf->set_string ("Common Data", "Make", cfs->camMake); kf->set_string ("Common Data", "Model", cfs->camModel); @@ -301,25 +301,24 @@ bool TagDirectory::CPBDump (const Glib::ustring &commFName, const Glib::ustring std::string tagName = tags[i]->nameToString (); if (tags[i]->isDirectory()) - for (int j = 0; tags[i]->getDirectory(j); j++) { + for (int j = 0; tags[i]->getDirectory (j); j++) { // Accumulating the TagDirectories to dump later - tagDirPaths.push_back( Glib::ustring( tagDirName + "/" + getDumpKey(tags[i]->getID(), tagName) ) ); - tagDirList.push_back(tags[i]->getDirectory(j)); + tagDirPaths.push_back ( Glib::ustring ( tagDirName + "/" + getDumpKey (tags[i]->getID(), tagName) ) ); + tagDirList.push_back (tags[i]->getDirectory (j)); try { - kf->set_string (tagDirName, getDumpKey(tags[i]->getID(), tagName), "$subdir"); + kf->set_string (tagDirName, getDumpKey (tags[i]->getID(), tagName), "$subdir"); } catch (Glib::KeyFileError&) {} - } - else { + } else { try { - kf->set_string (tagDirName, getDumpKey(tags[i]->getID(), tagName), tags[i]->valueToString()); + kf->set_string (tagDirName, getDumpKey (tags[i]->getID(), tagName), tags[i]->valueToString()); } catch (Glib::KeyFileError&) {} } } // dumping the sub-directories for (size_t i = 0; i < tagDirList.size(); i++) { - tagDirList.at(i)->CPBDump(commFName, imageFName, profileFName, defaultPParams, cfs, flagMode, kf, tagDirPaths.at(i)); + tagDirList.at (i)->CPBDump (commFName, imageFName, profileFName, defaultPParams, cfs, flagMode, kf, tagDirPaths.at (i)); } if (!keyFile) { @@ -339,15 +338,15 @@ Glib::ustring TagDirectory::getDumpKey (int tagID, const Glib::ustring &tagName) Glib::ustring key; if (options.CPBKeys == CPBKT_TID || options.CPBKeys == CPBKT_TID_NAME) { - key = Glib::ustring(Glib::ustring::format(std::fixed, std::hex, std::setfill(L'0'), std::setw(4), tagID)); + key = Glib::ustring (Glib::ustring::format (std::fixed, std::hex, std::setfill (L'0'), std::setw (4), tagID)); } if (options.CPBKeys == CPBKT_TID_NAME) { - key += Glib::ustring("_"); + key += Glib::ustring ("_"); } if (options.CPBKeys == CPBKT_TID_NAME || options.CPBKeys == CPBKT_NAME) { - key += Glib::ustring(tagName); + key += Glib::ustring (tagName); } return key; @@ -433,7 +432,7 @@ Tag* TagDirectory::getTagP (const char* name) const TagDirectory *tagDir; if (attribs[i].subdirAttribs && tag && (tagDir = tag->getDirectory())) { - return tagDir->getTagP(n + 1); + return tagDir->getTagP (n + 1); } else { return nullptr; } @@ -453,7 +452,7 @@ Tag* TagDirectory::findTag (const char* name) const if (!strcmp (attribs[i].name, name)) { Tag* t = getTag (attribs[i].ID); - if(t) { + if (t) { return t; } else { break; @@ -462,11 +461,11 @@ Tag* TagDirectory::findTag (const char* name) const } for (size_t i = 0; i < tags.size(); i++) - if(tags[i]->isDirectory()) { + if (tags[i]->isDirectory()) { TagDirectory *dir = tags[i]->getDirectory(); - Tag* t = dir->findTag(name); + Tag* t = dir->findTag (name); - if(t) { + if (t) { return t; } } @@ -476,15 +475,15 @@ Tag* TagDirectory::findTag (const char* name) const // Searches a simple value, as either attribute or element // only for simple values, not for entries with special chars or free text -bool TagDirectory::getXMPTagValue(const char* name, char* value) const +bool TagDirectory::getXMPTagValue (const char* name, char* value) const { *value = 0; - if (!getTag("ApplicationNotes")) { + if (!getTag ("ApplicationNotes")) { return false; } - char *sXMP = (char*)getTag("ApplicationNotes")->getValue(); + char *sXMP = (char*)getTag ("ApplicationNotes")->getValue(); // Check for full word char *pos = sXMP; @@ -492,15 +491,15 @@ bool TagDirectory::getXMPTagValue(const char* name, char* value) const bool found = false; do { - pos = strstr(pos, name); + pos = strstr (pos, name); if (pos) { - char nextChar = *(pos + strlen(name)); + char nextChar = * (pos + strlen (name)); if (nextChar == ' ' || nextChar == '>' || nextChar == '=') { found = true; } else { - pos += strlen(name); + pos += strlen (name); } } } while (pos && !found); @@ -509,8 +508,8 @@ bool TagDirectory::getXMPTagValue(const char* name, char* value) const return false; } - char *posTag = strchr(pos, '>'); - char *posAttr = strchr(pos, '"'); + char *posTag = strchr (pos, '>'); + char *posAttr = strchr (pos, '"'); if (!posTag && !posAttr) { return false; @@ -518,14 +517,14 @@ bool TagDirectory::getXMPTagValue(const char* name, char* value) const if (posTag && (!posAttr || posTag < posAttr)) { // Tag - pos = strchr(posTag + 1, '<'); - strncpy(value, posTag + 1, pos - posTag - 1); + pos = strchr (posTag + 1, '<'); + strncpy (value, posTag + 1, pos - posTag - 1); value[pos - posTag - 1] = 0; return true; } else if (posAttr && (!posTag || posAttr < posTag)) { // Attribute - pos = strchr(posAttr + 1, '"'); - strncpy(value, posAttr + 1, pos - posAttr - 1); + pos = strchr (posAttr + 1, '"'); + strncpy (value, posAttr + 1, pos - posAttr - 1); value[pos - posAttr - 1] = 0; return true; } else { @@ -537,7 +536,7 @@ void TagDirectory::keepTag (int ID) { for (size_t i = 0; i < tags.size(); i++) if (tags[i]->getID() == ID) { - tags[i]->setKeep(true); + tags[i]->setKeep (true); } } @@ -655,8 +654,8 @@ void TagDirectory::applyChange (std::string name, std::string value) for (size_t i = 0; i < tags.size(); i++) if (tags[i]->isDirectory()) { - for (int j = 0; tags[i]->getDirectory(j); j++) { - if (tags[i]->nameToString(j) == fseg) { + for (int j = 0; tags[i]->getDirectory (j); j++) { + if (tags[i]->nameToString (j) == fseg) { t = tags[i]; dirnum = j; break; @@ -688,43 +687,43 @@ void TagDirectory::applyChange (std::string name, std::string value) } if (t && dirnum >= 0) { - t->getDirectory(dirnum)->applyChange (name.substr (dp + 1, std::string::npos), value); + t->getDirectory (dirnum)->applyChange (name.substr (dp + 1, std::string::npos), value); } } } TagDirectoryTable::TagDirectoryTable () - : values(nullptr), zeroOffset(0), valuesSize(0), defaultType(INVALID) + : values (nullptr), zeroOffset (0), valuesSize (0), defaultType (INVALID) { } TagDirectoryTable::TagDirectoryTable (TagDirectory* p, unsigned char *v, int memsize, int offs, TagType type, const TagAttrib* ta, ByteOrder border) - : TagDirectory(p, ta, border), zeroOffset(offs), valuesSize(memsize), defaultType( type ) + : TagDirectory (p, ta, border), zeroOffset (offs), valuesSize (memsize), defaultType ( type ) { values = new unsigned char[valuesSize]; - memcpy(values, v, valuesSize); + memcpy (values, v, valuesSize); // Security ; will avoid to read above the buffer limit if the RT's tagDirectoryTable is longer that what's in the file - int count = valuesSize / getTypeSize(type); + int count = valuesSize / getTypeSize (type); - for(const TagAttrib* tattr = ta; tattr->ignore != -1 && tattr->ID < count; ++tattr) { - Tag* newTag = new Tag (this, tattr, (values + zeroOffset + tattr->ID * getTypeSize(type)), tattr->type == AUTO ? type : tattr->type); - tags.push_back(newTag); // Here we can insert more tag in the same offset because of bitfield meaning + for (const TagAttrib* tattr = ta; tattr->ignore != -1 && tattr->ID < count; ++tattr) { + Tag* newTag = new Tag (this, tattr, (values + zeroOffset + tattr->ID * getTypeSize (type)), tattr->type == AUTO ? type : tattr->type); + tags.push_back (newTag); // Here we can insert more tag in the same offset because of bitfield meaning } } TagDirectoryTable::TagDirectoryTable (TagDirectory* p, FILE* f, int memsize, int offs, TagType type, const TagAttrib* ta, ByteOrder border) - : TagDirectory(p, ta, border), zeroOffset(offs), valuesSize(memsize), defaultType( type ) + : TagDirectory (p, ta, border), zeroOffset (offs), valuesSize (memsize), defaultType ( type ) { values = new unsigned char[valuesSize]; fread (values, 1, valuesSize, f); // Security ; will avoid to read above the buffer limit if the RT's tagDirectoryTable is longer that what's in the file - int count = valuesSize / getTypeSize(type); + int count = valuesSize / getTypeSize (type); - for(const TagAttrib* tattr = ta; tattr->ignore != -1 && tattr->ID < count; ++tattr) { - Tag* newTag = new Tag (this, tattr, (values + zeroOffset + tattr->ID * getTypeSize(type)), tattr->type == AUTO ? type : tattr->type); - tags.push_back(newTag); // Here we can insert more tag in the same offset because of bitfield meaning + for (const TagAttrib* tattr = ta; tattr->ignore != -1 && tattr->ID < count; ++tattr) { + Tag* newTag = new Tag (this, tattr, (values + zeroOffset + tattr->ID * getTypeSize (type)), tattr->type == AUTO ? type : tattr->type); + tags.push_back (newTag); // Here we can insert more tag in the same offset because of bitfield meaning } } TagDirectory* TagDirectoryTable::clone (TagDirectory* parent) @@ -736,7 +735,7 @@ TagDirectory* TagDirectoryTable::clone (TagDirectory* parent) TagDirectoryTable::~TagDirectoryTable() { - if(values) { + if (values) { delete [] values; } } @@ -747,8 +746,8 @@ int TagDirectoryTable::calculateSize () int TagDirectoryTable::write (int start, unsigned char* buffer) { - if( values && valuesSize) { - memcpy(buffer + start, values, valuesSize); + if ( values && valuesSize) { + memcpy (buffer + start, values, valuesSize); return start + valuesSize; } else { return start; @@ -760,7 +759,7 @@ int TagDirectoryTable::write (int start, unsigned char* buffer) //----------------------------------------------------------------------------- Tag::Tag (TagDirectory* p, FILE* f, int base) - : type(INVALID), count(0), value(nullptr), allocOwnMemory(true), attrib(nullptr), parent(p), directory(nullptr) + : type (INVALID), count (0), value (nullptr), allocOwnMemory (true), attrib (nullptr), parent (p), directory (nullptr) { ByteOrder order = getOrder(); @@ -781,17 +780,18 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) // (only a small part of it will actually be parsed though) if ((int)type < 1 || (int)type > 14 || count > 10 * 1024 * 1024) { type = INVALID; + valuesize = 0; return; } // store next Tag's position in file - int save = ftell(f) + 4; + int save = ftell (f) + 4; // load value field (possibly seek before) - valuesize = count * getTypeSize(type); + valuesize = count * getTypeSize (type); if (valuesize > 4) { - fseek (f, get4(f, getOrder()) + base, SEEK_SET); + fseek (f, get4 (f, getOrder()) + base, SEEK_SET); } attrib = parent->getAttrib (tag); @@ -800,36 +800,36 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) keep = true; } - if( tag == 0xc634 ) { // DNGPrivateData - int currPos = ftell(f); + if ( tag == 0xc634 ) { // DNGPrivateData + int currPos = ftell (f); const int buffersize = 32; char buffer[buffersize], *p = buffer; - while( fread (p, 1, 1, f ) && *p != 0 && p - buffer < buffersize - 1 ) { + while ( fread (p, 1, 1, f ) && *p != 0 && p - buffer < buffersize - 1 ) { p++; } *p = 0; - if( !strncmp(buffer, "Adobe", 5) ) { + if ( !strncmp (buffer, "Adobe", 5) ) { fread (buffer, 1, 14, f ); - if( !strncmp( buffer, "MakN", 4) ) { + if ( !strncmp ( buffer, "MakN", 4) ) { ByteOrder bom = ((buffer[8] == 'M' && buffer[9] == 'M') ? MOTOROLA : INTEL) ; - Tag* tmake = parent->getRoot()->findTag("Make"); - std::string make( tmake ? tmake->valueToString() : ""); - int save = ftell(f); - int originalOffset = sget4( (unsigned char*)&buffer[10], ( make.find("SONY") != std::string::npos ) || ( make.find("Canon") != std::string::npos ) || ( make.find("OLYMPUS") != std::string::npos ) ? MOTOROLA : bom ); + Tag* tmake = parent->getRoot()->findTag ("Make"); + std::string make ( tmake ? tmake->valueToString() : ""); + int save = ftell (f); + int originalOffset = sget4 ( (unsigned char*)&buffer[10], ( make.find ("SONY") != std::string::npos ) || ( make.find ("Canon") != std::string::npos ) || ( make.find ("OLYMPUS") != std::string::npos ) ? MOTOROLA : bom ); - if( !parseMakerNote(f, save - originalOffset , bom )) { + if ( !parseMakerNote (f, save - originalOffset, bom )) { type = INVALID; } } - } else if( !strncmp(buffer, "PENTAX", 6) ) { + } else if ( !strncmp (buffer, "PENTAX", 6) ) { makerNoteKind = HEADERIFD; fread (buffer, 1, 2, f); directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, f, currPos, pentaxAttribs, strncmp(buffer, "MM", 2) ? INTEL : MOTOROLA); + directory[0] = new TagDirectory (parent, f, currPos, pentaxAttribs, strncmp (buffer, "MM", 2) ? INTEL : MOTOROLA); directory[1] = nullptr; } else /* SONY uses this tag to write hidden info and pointer to private encrypted tags @@ -848,9 +848,25 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) } } + if (tag == 0x002e) { // location of the embedded preview image in raw files of Panasonic cameras + TagDirectory* previewdir = ExifManager::parseJPEG (f, ftell (f)); // try to parse the exif data from the preview image + + if (previewdir) { + if (previewdir->getTag ("Exif")) { + if (previewdir->getTag ("Make")) { + if (previewdir->getTag ("Make")->valueToString() == "Panasonic") { // "make" is not yet available here, so get it from the preview tags to assure we're doing the right thing + Tag* t = new Tag (parent->getRoot(), lookupAttrib (ifdAttribs, "Exif")); // replace raw exif with preview exif assuming there are the same + t->initSubDir (previewdir->getTag ("Exif")->getDirectory()); + parent->getRoot()->addTag (t); + } + } + } + } + } + // if this tag is the makernote, it needs special treatment (brand specific parsing) if (tag == 0x927C && attrib && !strcmp (attrib->name, "MakerNote") ) { - if( !parseMakerNote(f, base, order )) { + if ( !parseMakerNote (f, base, order )) { type = INVALID; fseek (f, save, SEEK_SET); return; @@ -872,180 +888,180 @@ Tag::Tag (TagDirectory* p, FILE* f, int base) tmodel->toString (model); } - if (!strncmp(make, "SONY", 4)) { - switch( tag ) { - case 0x0010: - directory = new TagDirectory*[2]; - directory[1] = nullptr; + if (!strncmp (make, "SONY", 4)) { + switch ( tag ) { + case 0x0010: + directory = new TagDirectory*[2]; + directory[1] = nullptr; - if (count == 15360) { - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , sonyCameraInfoAttribs, order); - } else { - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , sonyCameraInfo2Attribs, order); - } + if (count == 15360) { + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE, sonyCameraInfoAttribs, order); + } else { + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE, sonyCameraInfo2Attribs, order); + } - break; + break; - case 0x0114: - directory = new TagDirectory*[2]; - directory[1] = nullptr; + case 0x0114: + directory = new TagDirectory*[2]; + directory[1] = nullptr; - if (count == 280 || count == 364) { - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SHORT , sonyCameraSettingsAttribs, MOTOROLA); - } else if (count == 332) { - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SHORT , sonyCameraSettingsAttribs2, MOTOROLA); - } else if(count == 1536 || count == 2048) { - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , sonyCameraSettingsAttribs3, INTEL); - } else { - // Unknown CameraSettings - delete [] directory; - directory = nullptr; - type = INVALID; - } + if (count == 280 || count == 364) { + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SHORT, sonyCameraSettingsAttribs, MOTOROLA); + } else if (count == 332) { + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SHORT, sonyCameraSettingsAttribs2, MOTOROLA); + } else if (count == 1536 || count == 2048) { + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE, sonyCameraSettingsAttribs3, INTEL); + } else { + // Unknown CameraSettings + delete [] directory; + directory = nullptr; + type = INVALID; + } - makerNoteKind = directory ? TABLESUBDIR : NOMK; - break; + makerNoteKind = directory ? TABLESUBDIR : NOMK; + break; - case 0x9405: - directory = new TagDirectory*[2]; - directory[1] = nullptr; - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SHORT , attrib->subdirAttribs, order); - makerNoteKind = TABLESUBDIR; - break; + case 0x9405: + directory = new TagDirectory*[2]; + directory[1] = nullptr; + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SHORT, attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; - default: - goto defsubdirs; + default: + goto defsubdirs; } - } else if ((!strncmp(make, "PENTAX", 6)) || (!strncmp(make, "RICOH", 5) && !strncmp(model, "PENTAX", 6))) { // Either the former Pentax brand or the RICOH brand + PENTAX model" - switch( tag ) { - case 0x007d: - case 0x0205: - case 0x0208: - case 0x0216: - directory = new TagDirectory*[2]; - directory[1] = nullptr; - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , attrib->subdirAttribs, order); - makerNoteKind = TABLESUBDIR; - break; + } else if ((!strncmp (make, "PENTAX", 6)) || (!strncmp (make, "RICOH", 5) && !strncmp (model, "PENTAX", 6))) { // Either the former Pentax brand or the RICOH brand + PENTAX model" + switch ( tag ) { + case 0x007d: + case 0x0205: + case 0x0208: + case 0x0216: + directory = new TagDirectory*[2]; + directory[1] = nullptr; + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE, attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; - case 0x0215: - directory = new TagDirectory*[2]; - directory[1] = nullptr; - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, LONG , attrib->subdirAttribs, order); - makerNoteKind = TABLESUBDIR; - break; + case 0x0215: + directory = new TagDirectory*[2]; + directory[1] = nullptr; + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, LONG, attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; - case 0x005c: - directory = new TagDirectory*[2]; - directory[1] = nullptr; + case 0x005c: + directory = new TagDirectory*[2]; + directory[1] = nullptr; - if (count == 4) { // SRInfo - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , pentaxSRInfoAttribs, order); - } else if (count == 2) { // SRInfo2 - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , pentaxSRInfo2Attribs, order); - } else { - // Unknown SRInfo - delete [] directory; - directory = nullptr; - type = INVALID; + if (count == 4) { // SRInfo + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE, pentaxSRInfoAttribs, order); + } else if (count == 2) { // SRInfo2 + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE, pentaxSRInfo2Attribs, order); + } else { + // Unknown SRInfo + delete [] directory; + directory = nullptr; + type = INVALID; + } + + makerNoteKind = directory ? TABLESUBDIR : NOMK; + break; + + case 0x0206: + directory = new TagDirectory*[2]; + directory[1] = nullptr; + + if (count == 21) { // AEInfo2 + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE, pentaxAEInfo2Attribs, order); + } else if (count == 48) { // AEInfo3 + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE, pentaxAEInfo3Attribs, order); + } else if (count <= 25) { // AEInfo + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE, pentaxAEInfoAttribs, order); + } else { + // Unknown AEInfo + delete [] directory; + directory = nullptr; + type = INVALID; + } + + makerNoteKind = directory ? TABLESUBDIR : NOMK; + break; + + case 0x0207: { + // There are 2 format pentaxLensDataAttribs + int offsetFirst = 4; // LensInfo2 + + if ( strstr (model, "*ist") || strstr (model, "GX-1") || strstr (model, "K200D") || (strstr (model, "K100D") && !strstr (model, "K100D Super")) || strstr (model, "K110D") || strstr (model, "645Z")) { + offsetFirst = 3; // LensInfo + } else if ( strstr (model, "645D") ) { + offsetFirst = 13; // LensInfo3 + } else if ( strstr (model, "K-01") || strstr (model, "K-30") || strstr (model, "K-50")) { + offsetFirst = 15; // LensInfo5 + } else if ( strstr (model, "K-5") || strstr (model, "K-r") ) { + offsetFirst = 12; // LensInfo4 + } else if (!strncmp (make, "RICOH", 5)) { // all PENTAX camera model produced under the RICOH era uses LensInfo5, for now... + offsetFirst = 15; // LensInfo5 too + } + + directory = new TagDirectory*[2]; + directory[1] = nullptr; + directory[0] = new TagDirectoryTable (parent, f, valuesize, offsetFirst, BYTE, attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; } - - makerNoteKind = directory ? TABLESUBDIR : NOMK; break; - case 0x0206: - directory = new TagDirectory*[2]; - directory[1] = nullptr; + case 0x0239: + directory = new TagDirectory*[2]; + directory[1] = nullptr; + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE, attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; - if (count == 21) { // AEInfo2 - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , pentaxAEInfo2Attribs, order); - } else if (count == 48) { // AEInfo3 - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , pentaxAEInfo3Attribs, order); - } else if (count <= 25) { // AEInfo - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , pentaxAEInfoAttribs, order); - } else { - // Unknown AEInfo - delete [] directory; - directory = nullptr; - type = INVALID; - } - - makerNoteKind = directory ? TABLESUBDIR : NOMK; - break; - - case 0x0207: { - // There are 2 format pentaxLensDataAttribs - int offsetFirst = 4; // LensInfo2 - - if( strstr(model, "*ist") || strstr(model, "GX-1") || strstr(model, "K100D") || strstr(model, "K110D") ) { - offsetFirst = 3; // LensInfo - } else if( strstr(model, "645D") ) { - offsetFirst = 13; // LensInfo3 - } else if( strstr(model, "K-01") || strstr(model, "K-30") || strstr(model, "K-50")) { - offsetFirst = 15; // LensInfo5 - } else if( strstr(model, "K-5") || strstr(model, "K-r") ) { - offsetFirst = 12; // LensInfo4 - } else if(!strncmp(make, "RICOH", 5)) { // all PENTAX camera model produced under the RICOH era uses LensInfo5, for now... - offsetFirst = 15; // LensInfo5 too - } - - directory = new TagDirectory*[2]; - directory[1] = nullptr; - directory[0] = new TagDirectoryTable (parent, f, valuesize, offsetFirst, BYTE , attrib->subdirAttribs, order); - makerNoteKind = TABLESUBDIR; + default: + goto defsubdirs; } - break; + } else if (!strncmp (make, "Canon", 5)) { + switch ( tag ) { + case 0x0001: + case 0x0002: + case 0x0004: + case 0x0005: + case 0x0093: + case 0x0098: + case 0x00a0: + directory = new TagDirectory*[2]; + directory[1] = nullptr; + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SSHORT, attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; - case 0x0239: - directory = new TagDirectory*[2]; - directory[1] = nullptr; - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , attrib->subdirAttribs, order); - makerNoteKind = TABLESUBDIR; - break; + case 0x009a: + case 0x4013: + directory = new TagDirectory*[2]; + directory[1] = nullptr; + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, LONG, attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; - default: - goto defsubdirs; + default: + goto defsubdirs; } - } else if (!strncmp(make, "Canon", 5)) { - switch( tag ) { - case 0x0001: - case 0x0002: - case 0x0004: - case 0x0005: - case 0x0093: - case 0x0098: - case 0x00a0: - directory = new TagDirectory*[2]; - directory[1] = nullptr; - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, SSHORT , attrib->subdirAttribs, order); - makerNoteKind = TABLESUBDIR; - break; - - case 0x009a: - case 0x4013: - directory = new TagDirectory*[2]; - directory[1] = nullptr; - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, LONG , attrib->subdirAttribs, order); - makerNoteKind = TABLESUBDIR; - break; - - default: - goto defsubdirs; - } - } else if (!strncmp(make, "NIKON", 5)) { + } else if (!strncmp (make, "NIKON", 5)) { switch (tag) { - case 0x0025: { - directory = new TagDirectory*[2]; - directory[1] = nullptr; - directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE , attrib->subdirAttribs, order); - makerNoteKind = TABLESUBDIR; - break; - } + case 0x0025: { + directory = new TagDirectory*[2]; + directory[1] = nullptr; + directory[0] = new TagDirectoryTable (parent, f, valuesize, 0, BYTE, attrib->subdirAttribs, order); + makerNoteKind = TABLESUBDIR; + break; + } - default: - goto defsubdirs; + default: + goto defsubdirs; } - } else if(type == UNDEFINED) { + } else if (type == UNDEFINED) { count = 1; type = LONG; directory = new TagDirectory*[2]; @@ -1069,7 +1085,7 @@ defsubdirs: // read value value = new unsigned char [valuesize]; fread (value, 1, valuesize, f); - int pos = ftell (f); + // count the number of valid subdirs int sdcount = count; @@ -1083,10 +1099,9 @@ defsubdirs: // load directories for (size_t j = 0, i = 0; j < count; j++, i++) { - int newpos = base + toInt(j * 4, LONG); + int newpos = base + toInt (j * 4, LONG); fseek (f, newpos, SEEK_SET); directory[i] = new TagDirectory (parent, f, base, attrib->subdirAttribs, order); - fseek (f, pos, SEEK_SET); } // set the terminating NULL @@ -1101,22 +1116,22 @@ defsubdirs: } -bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) +bool Tag::parseMakerNote (FILE* f, int base, ByteOrder bom ) { value = nullptr; - Tag* tmake = parent->getRoot()->findTag("Make"); - std::string make( tmake ? tmake->valueToString() : ""); + Tag* tmake = parent->getRoot()->findTag ("Make"); + std::string make ( tmake ? tmake->valueToString() : ""); Tag* tmodel = parent->getRoot()->findTag ("Model"); - std::string model( tmodel ? tmodel->valueToString() : ""); + std::string model ( tmodel ? tmodel->valueToString() : ""); - if ( make.find( "NIKON" ) != std::string::npos ) { - if ( model.find("NIKON E700") != std::string::npos || - model.find("NIKON E800") != std::string::npos || - model.find("NIKON E900") != std::string::npos || - model.find("NIKON E900S") != std::string::npos || - model.find("NIKON E910") != std::string::npos || - model.find("NIKON E950") != std::string::npos ) { + if ( make.find ( "NIKON" ) != std::string::npos ) { + if ( model.find ("NIKON E700") != std::string::npos || + model.find ("NIKON E800") != std::string::npos || + model.find ("NIKON E900") != std::string::npos || + model.find ("NIKON E900S") != std::string::npos || + model.find ("NIKON E910") != std::string::npos || + model.find ("NIKON E950") != std::string::npos ) { makerNoteKind = HEADERIFD; valuesize = 8; value = new unsigned char[8]; @@ -1124,8 +1139,8 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, nikon2Attribs, bom); directory[1] = nullptr; - } else if ( model.find("NIKON E990") != std::string::npos || - (model.find("NIKON D1") != std::string::npos && model.size() > 8 && model.at(8) != '0')) { + } else if ( model.find ("NIKON E990") != std::string::npos || + (model.find ("NIKON D1") != std::string::npos && model.size() > 8 && model.at (8) != '0')) { makerNoteKind = IFD; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, nikon3Attribs, bom); @@ -1140,19 +1155,22 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) directory = new TagDirectory*[2]; // byte order for makernotes can be different from exif byte order. We have to get it from makernotes header ByteOrder MakerNoteOrder; - if(value[10] == 'M' && value[11] == 'M') + + if (value[10] == 'M' && value[11] == 'M') { MakerNoteOrder = rtexif::MOTOROLA; - else + } else { MakerNoteOrder = rtexif::INTEL; + } + directory[0] = new TagDirectory (parent, f, basepos + 10, nikon3Attribs, MakerNoteOrder); directory[1] = nullptr; } - } else if ( make.find( "Canon" ) != std::string::npos ) { + } else if ( make.find ( "Canon" ) != std::string::npos ) { makerNoteKind = IFD; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, canonAttribs, bom); directory[1] = nullptr; - } else if ( make.find( "PENTAX" ) != std::string::npos ) { + } else if ( make.find ( "PENTAX" ) != std::string::npos ) { makerNoteKind = HEADERIFD; valuesize = 6; value = new unsigned char[6]; @@ -1160,7 +1178,7 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, pentaxAttribs, bom); directory[1] = nullptr; - } else if ( (make.find( "RICOH" ) != std::string::npos ) && (model.find("PENTAX") != std::string::npos) ) { + } else if ( (make.find ( "RICOH" ) != std::string::npos ) && (model.find ("PENTAX") != std::string::npos) ) { makerNoteKind = HEADERIFD; valuesize = 10; value = new unsigned char[10]; @@ -1168,25 +1186,25 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, ftell (f) - 10, pentaxAttribs, bom); directory[1] = nullptr; - } else if ( make.find( "FUJIFILM" ) != std::string::npos ) { + } else if ( make.find ( "FUJIFILM" ) != std::string::npos ) { makerNoteKind = FUJI; valuesize = 12; value = new unsigned char[12]; fread (value, 1, 12, f); directory = new TagDirectory*[2]; - directory[0] = new TagDirectory (parent, f, ftell(f) - 12, fujiAttribs, INTEL); + directory[0] = new TagDirectory (parent, f, ftell (f) - 12, fujiAttribs, INTEL); directory[1] = nullptr; - } else if ( make.find( "KONICA MINOLTA" ) != std::string::npos || make.find( "Minolta" ) != std::string::npos ) { + } else if ( make.find ( "KONICA MINOLTA" ) != std::string::npos || make.find ( "Minolta" ) != std::string::npos ) { makerNoteKind = IFD; directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, minoltaAttribs, bom); directory[1] = nullptr; - } else if ( make.find( "SONY" ) != std::string::npos ) { + } else if ( make.find ( "SONY" ) != std::string::npos ) { valuesize = 12; value = new unsigned char[12]; fread (value, 1, 12, f); - if (!strncmp((char*)value, "SONY DSC", 8)) { + if (!strncmp ((char*)value, "SONY DSC", 8)) { makerNoteKind = HEADERIFD; } else { makerNoteKind = IFD; @@ -1196,7 +1214,7 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) directory = new TagDirectory*[2]; directory[0] = new TagDirectory (parent, f, base, sonyAttribs, bom ); directory[1] = nullptr; - } else if ( make.find( "OLYMPUS" ) != std::string::npos ) { + } else if ( make.find ( "OLYMPUS" ) != std::string::npos ) { makerNoteKind = HEADERIFD; valuesize = 8; value = new unsigned char[12]; @@ -1204,14 +1222,22 @@ bool Tag::parseMakerNote(FILE* f, int base, ByteOrder bom ) directory = new TagDirectory*[2]; directory[1] = nullptr; - if (!strncmp((char*)value, "OLYMPUS", 7)) { + if (!strncmp ((char*)value, "OLYMPUS", 7)) { makerNoteKind = OLYMPUS2; fread (value + 8, 1, 4, f); valuesize = 12; - directory[0] = new TagDirectory (parent, f, ftell(f) - 12, olympusAttribs, value[8] == 'I' ? INTEL : MOTOROLA); + directory[0] = new TagDirectory (parent, f, ftell (f) - 12, olympusAttribs, value[8] == 'I' ? INTEL : MOTOROLA); } else { directory[0] = new TagDirectory (parent, f, base, olympusAttribs, bom); } + } else if ( make.find ( "Panasonic" ) != std::string::npos) { + makerNoteKind = HEADERIFD; + valuesize = 12; + value = new unsigned char[12]; + fread (value, 1, 12, f); + directory = new TagDirectory*[2]; + directory[0] = new TagDirectory (parent, f, base, panasonicAttribs, bom); + directory[1] = nullptr; } else { return false; } @@ -1269,6 +1295,7 @@ Tag::~Tag () // if there are directories behind the tag, delete them if (directory) { int i = 0; + while (directory[i]) { delete directory[i++]; } @@ -1303,7 +1330,7 @@ void Tag::fromInt (int v) void Tag::fromString (const char* v, int size) { - if( value && allocOwnMemory) { + if ( value && allocOwnMemory) { delete [] value; } @@ -1315,17 +1342,19 @@ void Tag::fromString (const char* v, int size) count = valuesize; - if( allocOwnMemory ) { + if ( allocOwnMemory ) { value = new unsigned char [valuesize]; } - memcpy ((char*)value, v, valuesize); + if(value) { + memcpy ((char*)value, v, valuesize); + } } int Tag::toInt (int ofs, TagType astype) { if (attrib) { - return attrib->interpreter->toInt(this, ofs, astype); + return attrib->interpreter->toInt (this, ofs, astype); } int a; @@ -1335,39 +1364,39 @@ int Tag::toInt (int ofs, TagType astype) } switch (astype) { - //case SBYTE: return (signed char)(value[ofs]); - case SBYTE: - return int((reinterpret_cast(value))[ofs]); + //case SBYTE: return (signed char)(value[ofs]); + case SBYTE: + return int ((reinterpret_cast (value))[ofs]); - case BYTE: - return value[ofs]; + case BYTE: + return value[ofs]; - case ASCII: - return 0; + case ASCII: + return 0; - case SSHORT: - return (int)int2_to_signed(sget2 (value + ofs, getOrder())); + case SSHORT: + return (int)int2_to_signed (sget2 (value + ofs, getOrder())); - case SHORT: - return (int)sget2 (value + ofs, getOrder()); + case SHORT: + return (int)sget2 (value + ofs, getOrder()); - case SLONG: - case LONG: - return (int)sget4 (value + ofs, getOrder()); + case SLONG: + case LONG: + return (int)sget4 (value + ofs, getOrder()); - case SRATIONAL: - case RATIONAL: - a = (int)sget4 (value + ofs + 4, getOrder()); - return a == 0 ? 0 : (int)sget4 (value + ofs, getOrder()) / a; + case SRATIONAL: + case RATIONAL: + a = (int)sget4 (value + ofs + 4, getOrder()); + return a == 0 ? 0 : (int)sget4 (value + ofs, getOrder()) / a; - case FLOAT: - return (int)toDouble(ofs); + case FLOAT: + return (int)toDouble (ofs); - case UNDEFINED: - return 0; + case UNDEFINED: + return 0; - default: - return 0; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR) + default: + return 0; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR) } return 0; @@ -1376,7 +1405,7 @@ int Tag::toInt (int ofs, TagType astype) double Tag::toDouble (int ofs) { if (attrib) { - return attrib->interpreter->toDouble(this, ofs); + return attrib->interpreter->toDouble (this, ofs); } union IntFloat { @@ -1387,54 +1416,53 @@ double Tag::toDouble (int ofs) double ud, dd; switch (type) { - case SBYTE: - return (double)(int((reinterpret_cast(value))[ofs])); + case SBYTE: + return (double) (int ((reinterpret_cast (value))[ofs])); - case BYTE: - return (double)((int)value[ofs]); + case BYTE: + return (double) ((int)value[ofs]); - case ASCII: - return 0.0; + case ASCII: + return 0.0; - case SSHORT: - return (double)int2_to_signed(sget2 (value + ofs, getOrder())); + case SSHORT: + return (double)int2_to_signed (sget2 (value + ofs, getOrder())); - case SHORT: - return (double)((int)sget2 (value + ofs, getOrder())); + case SHORT: + return (double) ((int)sget2 (value + ofs, getOrder())); - case SLONG: - case LONG: - return (double)((int)sget4 (value + ofs, getOrder())); + case SLONG: + case LONG: + return (double) ((int)sget4 (value + ofs, getOrder())); - case SRATIONAL: - case RATIONAL: - ud = (int)sget4 (value + ofs, getOrder()); - dd = (int)sget4 (value + ofs + 4, getOrder()); - return dd == 0. ? 0. : (double)ud / (double)dd; + case SRATIONAL: + case RATIONAL: + ud = (int)sget4 (value + ofs, getOrder()); + dd = (int)sget4 (value + ofs + 4, getOrder()); + return dd == 0. ? 0. : (double)ud / (double)dd; - case FLOAT: - conv.i = sget4 (value + ofs, getOrder()); - return conv.f; // IEEE FLOATs are already C format, they just need a recast + case FLOAT: + conv.i = sget4 (value + ofs, getOrder()); + return conv.f; // IEEE FLOATs are already C format, they just need a recast - case UNDEFINED: - return 0.; + case UNDEFINED: + return 0.; - default: - return 0.; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR) + default: + return 0.; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR) } - return 0.; } /** * @brief Create an array of the elements */ -double *Tag::toDoubleArray(int ofs) +double *Tag::toDoubleArray (int ofs) { double *values = new double[count]; for (unsigned int i = 0; i < count; ++i) { - values[i] = toDouble(ofs + i * getTypeSize(type)); + values[i] = toDouble (ofs + i * getTypeSize (type)); } return values; @@ -1444,48 +1472,48 @@ void Tag::toRational (int& num, int& denom, int ofs) { switch (type) { - case BYTE: - num = (int)value[ofs]; - denom = 1; - break; + case BYTE: + num = (int)value[ofs]; + denom = 1; + break; - case ASCII: - num = 0; - denom = 0; - break; + case ASCII: + num = 0; + denom = 0; + break; - case SSHORT: - case SHORT: - num = (int)sget2 (value + ofs, getOrder()); - denom = 1; - break; + case SSHORT: + case SHORT: + num = (int)sget2 (value + ofs, getOrder()); + denom = 1; + break; - case SLONG: - case LONG: - num = (int)sget4 (value + ofs, getOrder()); - denom = 1; - break; + case SLONG: + case LONG: + num = (int)sget4 (value + ofs, getOrder()); + denom = 1; + break; - case SRATIONAL: - case RATIONAL: - num = (int)sget4 (value + ofs, getOrder()); - denom = (int)sget4 (value + ofs + 4, getOrder()); - break; + case SRATIONAL: + case RATIONAL: + num = (int)sget4 (value + ofs, getOrder()); + denom = (int)sget4 (value + ofs + 4, getOrder()); + break; - case FLOAT: - num = 0; - denom = 0; - break; + case FLOAT: + num = 0; + denom = 0; + break; - case UNDEFINED: - num = 0; - denom = 0; - break; + case UNDEFINED: + num = 0; + denom = 0; + break; - default: - num = 0; - denom = 0; - break; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR) + default: + num = 0; + denom = 0; + break; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR) } } @@ -1533,41 +1561,41 @@ void Tag::toString (char* buffer, int ofs) strcat (buffer, ", "); } - char* b = buffer + strlen(buffer); + char* b = buffer + strlen (buffer); switch (type) { - case UNDEFINED: - case BYTE: - sprintf (b, "%d", value[i + ofs]); - break; + case UNDEFINED: + case BYTE: + sprintf (b, "%d", value[i + ofs]); + break; - case SSHORT: - sprintf (b, "%d", toInt(2 * i + ofs)); - break; + case SSHORT: + sprintf (b, "%d", toInt (2 * i + ofs)); + break; - case SHORT: - sprintf (b, "%u", toInt(2 * i + ofs)); - break; + case SHORT: + sprintf (b, "%u", toInt (2 * i + ofs)); + break; - case SLONG: - sprintf (b, "%d", toInt(4 * i + ofs)); - break; + case SLONG: + sprintf (b, "%d", toInt (4 * i + ofs)); + break; - case LONG: - sprintf (b, "%u", toInt(4 * i + ofs)); - break; + case LONG: + sprintf (b, "%u", toInt (4 * i + ofs)); + break; - case SRATIONAL: - case RATIONAL: - sprintf (b, "%d/%d", (int)sget4 (value + 8 * i + ofs, getOrder()), (int)sget4 (value + 8 * i + ofs + 4, getOrder())); - break; + case SRATIONAL: + case RATIONAL: + sprintf (b, "%d/%d", (int)sget4 (value + 8 * i + ofs, getOrder()), (int)sget4 (value + 8 * i + ofs + 4, getOrder())); + break; - case FLOAT: - sprintf (b, "%g", toDouble(8 * i + ofs)); - break; + case FLOAT: + sprintf (b, "%g", toDouble (8 * i + ofs)); + break; - default: - break; + default: + break; } } @@ -1579,16 +1607,16 @@ void Tag::toString (char* buffer, int ofs) std::string Tag::nameToString (int i) { - char buffer[1024]; + char buffer[1025]; if (attrib) { - strcpy (buffer, attrib->name); + strncpy (buffer, attrib->name, 1024); } else { sprintf (buffer, "0x%x", tag); } if (i > 0) { - sprintf (buffer + strlen(buffer) - 1, "[%d]", i); + sprintf (buffer + strlen (buffer) - 1, "[%d]", i); } return buffer; @@ -1628,17 +1656,15 @@ int Tag::calculateSize () if (j > 1) { size += 4 * j; } + if (makerNoteKind != NOMK) { + count = directory[0]->calculateSize () / getTypeSize (type); + } } else if (valuesize > 4) { size += valuesize + (valuesize % 2); // we align tags to even byte positions } - if (makerNoteKind != NOMK) { - count = directory[0]->calculateSize () / getTypeSize(type); - } - if (makerNoteKind == NIKON3 || makerNoteKind == OLYMPUS2 || makerNoteKind == FUJI) { - size += valuesize; - } else if (makerNoteKind == HEADERIFD) { + if (makerNoteKind == NIKON3 || makerNoteKind == OLYMPUS2 || makerNoteKind == FUJI || makerNoteKind == HEADERIFD) { size += valuesize; } @@ -1692,7 +1718,7 @@ int Tag::write (int offs, int dataOffs, unsigned char* buffer) dataOffs += valuesize; dataOffs += directory[0]->write (dataOffs, buffer); return dataOffs; - } else if( makerNoteKind == TABLESUBDIR) { + } else if ( makerNoteKind == TABLESUBDIR) { sset4 (dataOffs, buffer + offs, parent->getOrder()); dataOffs = directory[0]->write (dataOffs, buffer); return dataOffs; @@ -1719,26 +1745,26 @@ int Tag::write (int offs, int dataOffs, unsigned char* buffer) } Tag::Tag (TagDirectory* p, const TagAttrib* attr) - : tag(attr ? attr->ID : -1), type(INVALID), count(0), value(nullptr), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) + : tag (attr ? attr->ID : -1), type (INVALID), count (0), value (nullptr), valuesize (0), keep (true), allocOwnMemory (true), attrib (attr), parent (p), directory (nullptr), makerNoteKind (NOMK) { } Tag::Tag (TagDirectory* p, const TagAttrib* attr, int data, TagType t) - : tag(attr ? attr->ID : -1), type(t), count(1), value(nullptr), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) + : tag (attr ? attr->ID : -1), type (t), count (1), value (nullptr), valuesize (0), keep (true), allocOwnMemory (true), attrib (attr), parent (p), directory (nullptr), makerNoteKind (NOMK) { initInt (data, t); } Tag::Tag (TagDirectory* p, const TagAttrib* attr, unsigned char *data, TagType t) - : tag(attr ? attr->ID : -1), type(t), count(1), value(nullptr), valuesize(0), keep(true), allocOwnMemory(false), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) + : tag (attr ? attr->ID : -1), type (t), count (1), value (nullptr), valuesize (0), keep (true), allocOwnMemory (false), attrib (attr), parent (p), directory (nullptr), makerNoteKind (NOMK) { initType (data, t); } Tag::Tag (TagDirectory* p, const TagAttrib* attr, const char* text) - : tag(attr ? attr->ID : -1), type(ASCII), count(1), value(nullptr), valuesize(0), keep(true), allocOwnMemory(true), attrib(attr), parent(p), directory(nullptr), makerNoteKind (NOMK) + : tag (attr ? attr->ID : -1), type (ASCII), count (1), value (nullptr), valuesize (0), keep (true), allocOwnMemory (true), attrib (attr), parent (p), directory (nullptr), makerNoteKind (NOMK) { initString (text); @@ -1746,9 +1772,9 @@ Tag::Tag (TagDirectory* p, const TagAttrib* attr, const char* text) void Tag::initType (unsigned char *data, TagType type) { - valuesize = getTypeSize(type); + valuesize = getTypeSize (type); - if( allocOwnMemory ) { + if ( allocOwnMemory ) { value = new unsigned char[valuesize]; memcpy ((char*)value, data, valuesize); } else { @@ -1781,7 +1807,7 @@ void Tag::initString (const char* text) { type = ASCII; - count = strlen(text) + 1; + count = strlen (text) + 1; valuesize = count; value = new unsigned char[valuesize]; strcpy ((char*)value, text); @@ -1872,9 +1898,9 @@ TagDirectory* ExifManager::parseCIFF (FILE* f, int base, int length) { TagDirectory* root = new TagDirectory (nullptr, ifdAttribs, INTEL); - Tag* exif = new Tag (root, lookupAttrib(ifdAttribs, "Exif")); + Tag* exif = new Tag (root, lookupAttrib (ifdAttribs, "Exif")); exif->initSubDir (); - Tag* mn = new Tag (exif->getDirectory(), lookupAttrib(exifAttribs, "MakerNote")); + Tag* mn = new Tag (exif->getDirectory(), lookupAttrib (exifAttribs, "MakerNote")); mn->initMakerNote (IFD, canonAttribs); root->addTag (exif); exif->getDirectory()->addTag (mn); @@ -1886,14 +1912,19 @@ TagDirectory* ExifManager::parseCIFF (FILE* f, int base, int length) Tag* ExifManager::saveCIFFMNTag (FILE* f, TagDirectory* root, int len, const char* name) { int s = ftell (f); - char* data = new char [len]; - fread (data, len, 1, f); - TagDirectory* mn = root->getTag ("Exif")->getDirectory()->getTag("MakerNote")->getDirectory(); - Tag* cs = new Tag (mn, lookupAttrib(canonAttribs, name)); - cs->initUndefArray (data, len); - mn->addTag (cs); - fseek (f, s, SEEK_SET); - return cs; + if(s >= 0) { + char* data = new char [len]; + fread (data, len, 1, f); + TagDirectory* mn = root->getTag ("Exif")->getDirectory()->getTag ("MakerNote")->getDirectory(); + Tag* cs = new Tag (mn, lookupAttrib (canonAttribs, name)); + cs->initUndefArray (data, len); + mn->addTag (cs); + fseek (f, s, SEEK_SET); + delete [] data; + return cs; + } else { + return nullptr; + } } void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) @@ -1918,7 +1949,7 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) int focal_len, iso; focal_len = iso = -1; - TagDirectory* exif = root->getTag("Exif")->getDirectory(); + TagDirectory* exif = root->getTag ("Exif")->getDirectory(); time_t timestamp = time (nullptr); @@ -1932,33 +1963,33 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) fseek (f, base + get4 (f, INTEL), SEEK_SET); if ((((type >> 8) + 8) | 8) == 0x38) { - parseCIFF (f, ftell(f), len, root); // Parse a sub-table + parseCIFF (f, ftell (f), len, root); // Parse a sub-table } if (type == 0x0810) { fread (buffer, 64, 1, f); - t = new Tag (root, lookupAttrib(ifdAttribs, "Artist")); + t = new Tag (root, lookupAttrib (ifdAttribs, "Artist")); t->initString (buffer); root->addTag (t); } if (type == 0x080a) { fread (buffer, 64, 1, f); - t = new Tag (root, lookupAttrib(ifdAttribs, "Make")); + t = new Tag (root, lookupAttrib (ifdAttribs, "Make")); t->initString (buffer); root->addTag (t); - fseek (f, strlen(buffer) - 63, SEEK_CUR); + fseek (f, strlen (buffer) - 63, SEEK_CUR); fread (buffer, 64, 1, f); - t = new Tag (root, lookupAttrib(ifdAttribs, "Model")); + t = new Tag (root, lookupAttrib (ifdAttribs, "Model")); t->initString (buffer); root->addTag (t); } if (type == 0x1818) { - ev = int_to_float(get4(f, INTEL)); - shutter = int_to_float(get4(f, INTEL)); + ev = int_to_float (get4 (f, INTEL)); + shutter = int_to_float (get4 (f, INTEL)); exptime = pow (2, -shutter); - aperture = int_to_float(get4(f, INTEL)); + aperture = int_to_float (get4 (f, INTEL)); fnumber = pow (2, aperture / 2); } @@ -1966,79 +1997,79 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) if (type == 0x102d) { Tag* t = saveCIFFMNTag (f, root, len, "CanonCameraSettings"); int mm = t->toInt (34, SHORT); - Tag* nt = new Tag (exif, lookupAttrib(exifAttribs, "MeteringMode")); + Tag* nt = new Tag (exif, lookupAttrib (exifAttribs, "MeteringMode")); switch (mm) { - case 0: - nt->initInt (5, SHORT); - break; + case 0: + nt->initInt (5, SHORT); + break; - case 1: - nt->initInt (3, SHORT); - break; + case 1: + nt->initInt (3, SHORT); + break; - case 2: - nt->initInt (1, SHORT); - break; + case 2: + nt->initInt (1, SHORT); + break; - case 3: - nt->initInt (5, SHORT); - break; + case 3: + nt->initInt (5, SHORT); + break; - case 4: - nt->initInt (6, SHORT); - break; + case 4: + nt->initInt (6, SHORT); + break; - case 5: - nt->initInt (2, SHORT); - break; + case 5: + nt->initInt (2, SHORT); + break; } exif->addTag (nt); - nt = new Tag (exif, lookupAttrib(exifAttribs, "MaxApertureValue")); - nt->initRational (t->toInt(52, SHORT), 32); + nt = new Tag (exif, lookupAttrib (exifAttribs, "MaxApertureValue")); + nt->initRational (t->toInt (52, SHORT), 32); exif->addTag (nt); - int em = t->toInt(40, SHORT); - nt = new Tag (exif, lookupAttrib(exifAttribs, "ExposureProgram")); + int em = t->toInt (40, SHORT); + nt = new Tag (exif, lookupAttrib (exifAttribs, "ExposureProgram")); switch (em) { - case 0: - nt->initInt (2, SHORT); - break; + case 0: + nt->initInt (2, SHORT); + break; - case 1: - nt->initInt (2, SHORT); - break; + case 1: + nt->initInt (2, SHORT); + break; - case 2: - nt->initInt (4, SHORT); - break; + case 2: + nt->initInt (4, SHORT); + break; - case 3: - nt->initInt (3, SHORT); - break; + case 3: + nt->initInt (3, SHORT); + break; - case 4: - nt->initInt (1, SHORT); - break; + case 4: + nt->initInt (1, SHORT); + break; - default: - nt->initInt (0, SHORT); - break; + default: + nt->initInt (0, SHORT); + break; } exif->addTag (nt); - nt = new Tag (exif, lookupAttrib(exifAttribs, "Flash")); + nt = new Tag (exif, lookupAttrib (exifAttribs, "Flash")); - if (t->toInt(8, SHORT) == 0) { + if (t->toInt (8, SHORT) == 0) { nt->initInt (0, SHORT); } else { nt->initInt (1, SHORT); } exif->addTag (nt); - nt = new Tag (exif, lookupAttrib(exifAttribs, "MaxApertureValue")); - nt->initRational (t->toInt(52, SHORT), 32); + nt = new Tag (exif, lookupAttrib (exifAttribs, "MaxApertureValue")); + nt->initRational (t->toInt (52, SHORT), 32); exif->addTag (nt); } @@ -2069,11 +2100,11 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) if (type == 0x102a) { saveCIFFMNTag (f, root, len, "CanonShotInfo"); - iso = pow (2, (get4(f, INTEL), get2(f, INTEL)) / 32.0 - 4) * 50; - aperture = (get2(f, INTEL), (short)get2(f, INTEL)) / 32.0f; + iso = pow (2, (get4 (f, INTEL), get2 (f, INTEL)) / 32.0 - 4) * 50; + aperture = (get2 (f, INTEL), (short)get2 (f, INTEL)) / 32.0f; fnumber = pow (2, aperture / 2); - shutter = ((short)get2(f, INTEL)) / 32.0f; - ev = ((short)get2(f, INTEL)) / 32.0f; + shutter = ((short)get2 (f, INTEL)) / 32.0f; + ev = ((short)get2 (f, INTEL)) / 32.0f; fseek (f, 34, SEEK_CUR); if (shutter > 1e6) { @@ -2108,67 +2139,67 @@ void ExifManager::parseCIFF (FILE* f, int base, int length, TagDirectory* root) } if (shutter > -999) { - t = new Tag (exif, lookupAttrib(exifAttribs, "ShutterSpeedValue")); - t->initRational ((int)(shutter * 10000), 10000); + t = new Tag (exif, lookupAttrib (exifAttribs, "ShutterSpeedValue")); + t->initRational ((int) (shutter * 10000), 10000); exif->addTag (t); } if (exptime > -999) { - t = new Tag (exif, lookupAttrib(exifAttribs, "ExposureTime")); - t->initRational ((int)(exptime * 10000), 10000); + t = new Tag (exif, lookupAttrib (exifAttribs, "ExposureTime")); + t->initRational ((int) (exptime * 10000), 10000); exif->addTag (t); } if (aperture > -999) { - t = new Tag (exif, lookupAttrib(exifAttribs, "ApertureValue")); - t->initRational ((int)(aperture * 10), 10); + t = new Tag (exif, lookupAttrib (exifAttribs, "ApertureValue")); + t->initRational ((int) (aperture * 10), 10); exif->addTag (t); } if (fnumber > -999) { - t = new Tag (exif, lookupAttrib(exifAttribs, "FNumber")); - t->initRational ((int)(fnumber * 10), 10); + t = new Tag (exif, lookupAttrib (exifAttribs, "FNumber")); + t->initRational ((int) (fnumber * 10), 10); exif->addTag (t); } if (ev > -999) { - t = new Tag (exif, lookupAttrib(exifAttribs, "ExposureBiasValue")); - t->initRational ((int)(ev * 1000), 1000); + t = new Tag (exif, lookupAttrib (exifAttribs, "ExposureBiasValue")); + t->initRational ((int) (ev * 1000), 1000); exif->addTag (t); } if (iso > 0) { - t = new Tag (exif, lookupAttrib(exifAttribs, "ISOSpeedRatings")); + t = new Tag (exif, lookupAttrib (exifAttribs, "ISOSpeedRatings")); t->initInt (iso, LONG); exif->addTag (t); } if (focal_len > 0) { - t = new Tag (exif, lookupAttrib(exifAttribs, "FocalLength")); + t = new Tag (exif, lookupAttrib (exifAttribs, "FocalLength")); t->initRational (focal_len * 32, 32); exif->addTag (t); } - if (timestamp != time(nullptr)) { + if (timestamp != time (nullptr)) { struct tm* tim = localtime (×tamp); strftime (buffer, 20, "%Y:%m:%d %H:%M:%S", tim); - t = new Tag (exif, lookupAttrib(exifAttribs, "DateTimeOriginal")); + t = new Tag (exif, lookupAttrib (exifAttribs, "DateTimeOriginal")); t->initString (buffer); exif->addTag (t); - t = new Tag (exif, lookupAttrib(exifAttribs, "DateTimeDigitized")); + t = new Tag (exif, lookupAttrib (exifAttribs, "DateTimeDigitized")); t->initString (buffer); exif->addTag (t); - t = new Tag (root, lookupAttrib(ifdAttribs, "DateTime")); + t = new Tag (root, lookupAttrib (ifdAttribs, "DateTime")); t->initString (buffer); root->addTag (t); } } static void -parse_leafdata(TagDirectory* root, ByteOrder order) +parse_leafdata (TagDirectory* root, ByteOrder order) { - Tag *leafdata = root->getTag("LeafData"); + Tag *leafdata = root->getTag ("LeafData"); if (!leafdata) { return; @@ -2190,17 +2221,17 @@ parse_leafdata(TagDirectory* root, ByteOrder order) int rotation_angle = 0; int found_count = 0; - while (pos + (int)sizeof(hdr) <= valuesize && found_count < 2) { + while (pos + (int)sizeof (hdr) <= valuesize && found_count < 2) { hdr = (char *)&value[pos]; - if (strncmp(hdr, PKTS_tag, 4) != 0) { + if (strncmp (hdr, PKTS_tag, 4) != 0) { // in a few cases the header can be offset a few bytes, don't know why // it does not seem to be some sort of alignment, it appears random, // this check takes care of it, restart if we find an offset match. int offset = 1; for (; offset <= 3; offset++) { - if (strncmp(&hdr[offset], PKTS_tag, 4) == 0) { + if (strncmp (&hdr[offset], PKTS_tag, 4) == 0) { pos += offset; break; } @@ -2213,7 +2244,7 @@ parse_leafdata(TagDirectory* root, ByteOrder order) break; } - int size = sget4((unsigned char *)&hdr[48], order); + int size = sget4 ((unsigned char *)&hdr[48], order); if (pos + size > valuesize) { break; @@ -2222,19 +2253,19 @@ parse_leafdata(TagDirectory* root, ByteOrder order) pos += 52; char *val = (char *)&value[pos]; - if (strncmp(&hdr[8], "CameraObj_ISO_speed", 19) == 0) { - iso_speed = 25 * (1 << (atoi(val) - 1)); + if (strncmp (&hdr[8], "CameraObj_ISO_speed", 19) == 0) { + iso_speed = 25 * (1 << (atoi (val) - 1)); found_count++; - } else if (strncmp(&hdr[8], "ImgProf_rotation_angle", 22) == 0) { - rotation_angle = atoi(val); + } else if (strncmp (&hdr[8], "ImgProf_rotation_angle", 22) == 0) { + rotation_angle = atoi (val); found_count++; } else { // check if this is a sub-directory, include test for that strange offset of next header if (size >= 8 && - (strncmp(val, PKTS_tag, 4) == 0 || - strncmp(&val[1], PKTS_tag, 4) == 0 || - strncmp(&val[2], PKTS_tag, 4) == 0 || - strncmp(&val[3], PKTS_tag, 4) == 0)) { + (strncmp (val, PKTS_tag, 4) == 0 || + strncmp (&val[1], PKTS_tag, 4) == 0 || + strncmp (&val[2], PKTS_tag, 4) == 0 || + strncmp (&val[3], PKTS_tag, 4) == 0)) { // start of next hdr, this is a sub-directory, we skip those for now. size = 0; } @@ -2252,35 +2283,35 @@ parse_leafdata(TagDirectory* root, ByteOrder order) root->addTagFront (exif); } - if (!exif->getDirectory()->getTag("ISOSpeedRatings")) { + if (!exif->getDirectory()->getTag ("ISOSpeedRatings")) { Tag *t = new Tag (exif->getDirectory(), exif->getDirectory()->getAttrib ("ISOSpeedRatings")); t->initInt (iso_speed, LONG); exif->getDirectory()->addTagFront (t); } - if (!root->getTag("Orientation")) { + if (!root->getTag ("Orientation")) { int orientation; switch (rotation_angle) { - case 0: - orientation = 1; - break; + case 0: + orientation = 1; + break; - case 90: - orientation = 6; - break; + case 90: + orientation = 6; + break; - case 180: - orientation = 3; - break; + case 180: + orientation = 3; + break; - case 270: - orientation = 8; - break; + case 270: + orientation = 8; + break; - default: - orientation = 1; - break; + default: + orientation = 1; + break; } Tag *t = new Tag (root, root->getAttrib ("Orientation")); @@ -2289,7 +2320,7 @@ parse_leafdata(TagDirectory* root, ByteOrder order) } // now look in ApplicationNotes tag for additional information - Tag *appnotes = root->getTag("ApplicationNotes"); + Tag *appnotes = root->getTag ("ApplicationNotes"); if (!appnotes) { return; @@ -2301,21 +2332,21 @@ parse_leafdata(TagDirectory* root, ByteOrder order) // Quick-and-dirty value extractor, no real xml parsing. // We could make it more generic, but we just get most important // values we know use to be in there. - if ((p = strstr(xmp, "xmlns:tiff")) != nullptr && - (end = strstr(p, "")) != nullptr) { + if ((p = strstr (xmp, "xmlns:tiff")) != nullptr && + (end = strstr (p, "")) != nullptr) { *end = '\0'; - while ((p = strstr(p, "')) == nullptr) { + if ((tagend = strchr (tag, '>')) == nullptr) { break; } *tagend = '\0'; char *val = &tagend[1]; - if ((p = strstr(val, "getAttrib (tag) && !root->getTag (tag)) { Tag *t = new Tag (root, root->getAttrib (tag)); - if (strcmp(tag, "Make") == 0 || - strcmp(tag, "Model") == 0) { - if (strcmp(tag, "Model") == 0) { + if (strcmp (tag, "Make") == 0 || + strcmp (tag, "Model") == 0) { + if (strcmp (tag, "Model") == 0) { // Leaf adds back serial number and camera model to the 'Model' // tag, we strip that away here so the back can be recognized // and matched against DCP profile - char *p1 = strchr(val, '('); + char *p1 = strchr (val, '('); if (p1 != nullptr) { *p1 = '\0'; @@ -2339,7 +2370,7 @@ parse_leafdata(TagDirectory* root, ByteOrder order) // Model name also contains a leading "Leaf " which we already // have in the Make name, remove that. - if (strstr(val, "Leaf ") == val) { + if (strstr (val, "Leaf ") == val) { t->initString (&val[5]); } else { t->initString (val); @@ -2365,21 +2396,21 @@ parse_leafdata(TagDirectory* root, ByteOrder order) *end = '<'; } - if ((p = strstr(xmp, "xmlns:exif")) != nullptr && - (end = strstr(p, "")) != nullptr) { + if ((p = strstr (xmp, "xmlns:exif")) != nullptr && + (end = strstr (p, "")) != nullptr) { *end = '\0'; - while ((p = strstr(p, "')) == nullptr) { + if ((tagend = strchr (tag, '>')) == nullptr) { break; } *tagend = '\0'; char *val = &tagend[1]; - if ((p = strstr(val, "initRational (num, denom); exif->getDirectory()->addTagFront (t); // we also make an "FNumber" tag since many tools don't interpret ApertureValue // according to Exif standard - t = new Tag (exif->getDirectory(), lookupAttrib(exifAttribs, "FNumber")); - double f = pow(sqrt(2.0), ((double)num / denom)); + t = new Tag (exif->getDirectory(), lookupAttrib (exifAttribs, "FNumber")); + double f = pow (sqrt (2.0), ((double)num / denom)); if (f > 10.0) { - t->initRational ((int)floor(f), 1); + t->initRational ((int)floor (f), 1); } else { - t->initRational ((int)floor(f * 10.0), 10); + t->initRational ((int)floor (f * 10.0), 10); } exif->getDirectory()->addTagFront (t); - } else if (strcmp(tag, "ShutterSpeedValue") == 0 && sscanf(val, "%d/%d", &num, &denom) == 2) { + } else if (strcmp (tag, "ShutterSpeedValue") == 0 && sscanf (val, "%d/%d", &num, &denom) == 2) { t->initRational (num, denom); exif->getDirectory()->addTagFront (t); // we also make an "ExposureTime" tag since many tools don't interpret ShutterSpeedValue // according to Exif standard - t = new Tag (exif->getDirectory(), lookupAttrib(exifAttribs, "ExposureTime")); - double f = 1.0 / pow(2.0, ((double)num / denom)); + t = new Tag (exif->getDirectory(), lookupAttrib (exifAttribs, "ExposureTime")); + double f = 1.0 / pow (2.0, ((double)num / denom)); if (f > 10.0) { - t->initRational ((int)floor(f), 1); + t->initRational ((int)floor (f), 1); } else if (f > 1.0) { - t->initRational ((int)floor(f * 10.0), 10); + t->initRational ((int)floor (f * 10.0), 10); } else if (f == 1.0) { t->initRational (1, 1); } else { @@ -2442,9 +2473,9 @@ parse_leafdata(TagDirectory* root, ByteOrder order) int idx = -1; for (int i = 1; etimes[i] > 0; i++) { - if (abs(etimes[i] - f) < diff) { + if (abs (etimes[i] - f) < diff) { idx = i; - diff = abs(etimes[i] - f); + diff = abs (etimes[i] - f); } } @@ -2453,35 +2484,37 @@ parse_leafdata(TagDirectory* root, ByteOrder order) } if (f < 2) { - t->initRational (10, (int)(10 * f)); + t->initRational (10, (int) (10 * f)); } else { t->initRational (1, (int)f); } } exif->getDirectory()->addTagFront (t); - } else if (strcmp(tag, "FocalLength") == 0 && sscanf(val, "%d/%d", &num, &denom) == 2) { + } else if (strcmp (tag, "FocalLength") == 0 && sscanf (val, "%d/%d", &num, &denom) == 2) { t->initRational (num, denom); exif->getDirectory()->addTagFront (t); - } else if (strcmp(tag, "ISOSpeedRatings") == 0) { + } else if (strcmp (tag, "ISOSpeedRatings") == 0) { char *p1 = val; - while (*p1 != '\0' && !isdigit(*p1)) { + while (*p1 != '\0' && !isdigit (*p1)) { p1++; } if (*p1 != '\0') { - t->initInt (atoi(p1), LONG); + t->initInt (atoi (p1), LONG); exif->getDirectory()->addTagFront (t); + } else { + delete t; } - } else if (strcmp(tag, "DateTimeOriginal") == 0 && - sscanf(val, "%d-%d-%dT%d:%d:%dZ", - &tm.tm_year, &tm.tm_mon, - &tm.tm_mday, &tm.tm_hour, - &tm.tm_min, &tm.tm_sec) == 6) { + } else if (strcmp (tag, "DateTimeOriginal") == 0 && + sscanf (val, "%d-%d-%dT%d:%d:%dZ", + &tm.tm_year, &tm.tm_mon, + &tm.tm_mday, &tm.tm_hour, + &tm.tm_min, &tm.tm_sec) == 6) { char tstr[64]; - sprintf(tstr, "%04d:%02d:%02d %02d:%02d:%02d", tm.tm_year, tm.tm_mon, - tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); + sprintf (tstr, "%04d:%02d:%02d %02d:%02d:%02d", tm.tm_year, tm.tm_mon, + tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); t->initString (tstr); exif->getDirectory()->addTagFront (t); } else { @@ -2499,12 +2532,12 @@ parse_leafdata(TagDirectory* root, ByteOrder order) TagDirectory* ExifManager::parse (FILE* f, int base, bool skipIgnored) { - setlocale(LC_NUMERIC, "C"); // to set decimal point in sscanf + setlocale (LC_NUMERIC, "C"); // to set decimal point in sscanf // read tiff header fseek (f, base, SEEK_SET); unsigned short bo; fread (&bo, 1, 2, f); - ByteOrder order = (ByteOrder)((int)bo); + ByteOrder order = (ByteOrder) ((int)bo); get2 (f, order); int firstifd = get4 (f, order); @@ -2518,59 +2551,59 @@ TagDirectory* ExifManager::parse (FILE* f, int base, bool skipIgnored) Tag* make = root->getTag ("Make"); Tag* exif = root->getTag ("Exif"); - if (exif && !exif->getDirectory()->getTag("ISOSpeedRatings")) { - if (make && !strncmp((char*)make->getValue(), "NIKON", 5)) { - Tag* mn = exif->getDirectory()->getTag("MakerNote"); + if (exif && !exif->getDirectory()->getTag ("ISOSpeedRatings")) { + if (make && !strncmp ((char*)make->getValue(), "NIKON", 5)) { + Tag* mn = exif->getDirectory()->getTag ("MakerNote"); if (mn) { - Tag* iso = mn->getDirectory()->getTag("ISOSpeed"); + Tag* iso = mn->getDirectory()->getTag ("ISOSpeed"); if (iso) { std::string isov = iso->valueToString (); Tag* niso = new Tag (exif->getDirectory(), exif->getDirectory()->getAttrib ("ISOSpeedRatings")); - niso->initInt (atoi(isov.c_str()), SHORT); + niso->initInt (atoi (isov.c_str()), SHORT); exif->getDirectory()->addTagFront (niso); } } - } else if (make && (!strncmp((char*)make->getValue(), "Panasonic", 9) || !strncmp((char*)make->getValue(), "LEICA", 5))) { - Tag* iso = root->getTag("PanaISO"); + } else if (make && (!strncmp ((char*)make->getValue(), "Panasonic", 9) || !strncmp ((char*)make->getValue(), "LEICA", 5))) { + Tag* iso = root->getTag ("PanaISO"); if (iso) { std::string isov = iso->valueToString (); Tag* niso = new Tag (exif->getDirectory(), exif->getDirectory()->getAttrib ("ISOSpeedRatings")); - niso->initInt (atoi(isov.c_str()), SHORT); + niso->initInt (atoi (isov.c_str()), SHORT); exif->getDirectory()->addTagFront (niso); } } } - if (make && !strncmp((char*)make->getValue(), "Kodak", 5)) { + if (make && !strncmp ((char*)make->getValue(), "Kodak", 5)) { if (!exif) { // old Kodak cameras may have exif tags in IFD0, reparse and create an exif subdir fseek (f, base + firstifd, SEEK_SET); TagDirectory* exifdir = new TagDirectory (nullptr, f, base, exifAttribs, order, true); exif = new Tag (root, root->getAttrib ("Exif")); - exif->initSubDir(exifdir); + exif->initSubDir (exifdir); root->addTagFront (exif); - if (!exif->getDirectory()->getTag("ISOSpeedRatings") && exif->getDirectory()->getTag ("ExposureIndex")) { + if (!exif->getDirectory()->getTag ("ISOSpeedRatings") && exif->getDirectory()->getTag ("ExposureIndex")) { Tag* niso = new Tag (exif->getDirectory(), exif->getDirectory()->getAttrib ("ISOSpeedRatings")); niso->initInt (exif->getDirectory()->getTag ("ExposureIndex")->toInt(), SHORT); exif->getDirectory()->addTagFront (niso); } } - Tag *kodakIFD = root->getTag("KodakIFD"); + Tag *kodakIFD = root->getTag ("KodakIFD"); - if (kodakIFD && kodakIFD->getDirectory()->getTag("TextualInfo")) { - parseKodakIfdTextualInfo(kodakIFD->getDirectory()->getTag("TextualInfo"), exif); + if (kodakIFD && kodakIFD->getDirectory()->getTag ("TextualInfo")) { + parseKodakIfdTextualInfo (kodakIFD->getDirectory()->getTag ("TextualInfo"), exif); } } - parse_leafdata(root, order); + parse_leafdata (root, order); - if (make && !strncmp((char*)make->getValue(), "Hasselblad", 10)) { + if (make && !strncmp ((char*)make->getValue(), "Hasselblad", 10)) { /* Figuring out the Hasselblad model is a mess. Hasselblad raw data comes in four slightly different containers, 3FR (directly from CF card), FFF (same as 3FR but filtered through @@ -2590,20 +2623,20 @@ TagDirectory* ExifManager::parse (FILE* f, int base, bool skipIgnored) of doing so. You need Hasselblad's own software to shoot multi-shot and can only do that tethered. In single-shot mode they should be exactly the same as the single-shot models. */ - Tag *subd = root->getTag(0x14a); - Tag *iw = (subd) ? subd->getDirectory()->getTag("ImageWidth") : nullptr; + Tag *subd = root->getTag (0x14a); + Tag *iw = (subd) ? subd->getDirectory()->getTag ("ImageWidth") : nullptr; int sensorWidth = (iw) ? iw->toInt() : 0; Tag* tmodel = root->getTag ("Model"); const char *model = (tmodel) ? (const char *)tmodel->getValue() : ""; - if (strstr(model, "Hasselblad ") == model) { + if (strstr (model, "Hasselblad ") == model) { model += 11; } else { // if HxD is used in flash sync mode for example, we need to fetch model from this tag - Tag* tmodel3 = root->getTag("UniqueCameraModel"); + Tag* tmodel3 = root->getTag ("UniqueCameraModel"); const char *model3 = (tmodel3) ? (const char *)tmodel3->getValue() : ""; - if (strstr(model3, "Hasselblad ") == model3) { + if (strstr (model3, "Hasselblad ") == model3) { model = model3 + 11; } } @@ -2611,127 +2644,127 @@ TagDirectory* ExifManager::parse (FILE* f, int base, bool skipIgnored) // FIXME: due to lack of test files this Hasselblad model identification is not 100% complete // This needs checking out: CFV-39/CFV-50 3FR, H3DII vs H3D, old CF/CFH models - if (!strcmp(model, "H3D")) { + if (!strcmp (model, "H3D")) { // We can't differ between H3D and H3DII for the 22, 31 and 39 models. There's was no H3D-50 so we know that is a // H3DII-50. At the time of writing I have no test files for the H3D vs H3DII models, so there still may be a chance // to differ between them. AFAIK Adobe's DNG converter don't differ between them, and actually call the H3DII-50 // H3D-50 although Hasselblad never released such a model. switch (sensorWidth) { - case 4096: - tmodel->initString("H3D-22"); - break; + case 4096: + tmodel->initString ("H3D-22"); + break; - case 6542: - tmodel->initString("H3D-31"); - break; + case 6542: + tmodel->initString ("H3D-31"); + break; - case 7262: - tmodel->initString("H3D-39"); - break; + case 7262: + tmodel->initString ("H3D-39"); + break; - case 8282: - tmodel->initString("H3DII-50"); - break; + case 8282: + tmodel->initString ("H3DII-50"); + break; } - } else if (!strcmp(model, "H4D")) { + } else if (!strcmp (model, "H4D")) { switch (sensorWidth) { - case 6542: - tmodel->initString("H4D-31"); - break; + case 6542: + tmodel->initString ("H4D-31"); + break; - case 7410: - tmodel->initString("H4D-40"); - break; + case 7410: + tmodel->initString ("H4D-40"); + break; - case 8282: - tmodel->initString("H4D-50"); - break; + case 8282: + tmodel->initString ("H4D-50"); + break; - case 9044: - tmodel->initString("H4D-60"); - break; + case 9044: + tmodel->initString ("H4D-60"); + break; } - } else if (!strcmp(model, "H5D")) { + } else if (!strcmp (model, "H5D")) { switch (sensorWidth) { - case 7410: - tmodel->initString("H5D-40"); - break; + case 7410: + tmodel->initString ("H5D-40"); + break; - case 8282: - tmodel->initString("H5D-50"); - break; + case 8282: + tmodel->initString ("H5D-50"); + break; - case 8374: - tmodel->initString("H5D-50c"); - break; + case 8374: + tmodel->initString ("H5D-50c"); + break; - case 9044: - tmodel->initString("H5D-60"); - break; + case 9044: + tmodel->initString ("H5D-60"); + break; } - } else if (!strcmp(model, "CFV")) { + } else if (!strcmp (model, "CFV")) { switch (sensorWidth) { - case 7262: - tmodel->initString("CFV-39"); - break; + case 7262: + tmodel->initString ("CFV-39"); + break; - case 8282: - tmodel->initString("CFV-50"); - break; + case 8282: + tmodel->initString ("CFV-50"); + break; - case 8374: - tmodel->initString("CFV-50c"); - break; + case 8374: + tmodel->initString ("CFV-50c"); + break; } } // and a few special cases - Tag* tmodel3 = root->getTag("UniqueCameraModel"); + Tag* tmodel3 = root->getTag ("UniqueCameraModel"); const char *model3 = (tmodel3) ? (const char *)tmodel3->getValue() : ""; - if (strstr(model3, "Hasselblad ") == model3) { + if (strstr (model3, "Hasselblad ") == model3) { model3 = model3 + 11; } - if (!strcmp(model3, "ixpressCF132")) { - tmodel->initString("CF-22"); - } else if (!strcmp(model3, "Hasselblad96")) { - tmodel->initString("CFV"); // popularly called CFV-16, but the official name is CFV - } else if (!strcmp(model3, "Hasselblad234")) { - tmodel->initString("CFV-39"); + if (!strcmp (model3, "ixpressCF132")) { + tmodel->initString ("CF-22"); + } else if (!strcmp (model3, "Hasselblad96")) { + tmodel->initString ("CFV"); // popularly called CFV-16, but the official name is CFV + } else if (!strcmp (model3, "Hasselblad234")) { + tmodel->initString ("CFV-39"); } else if (sensorWidth == 4090) { - tmodel->initString("V96C"); + tmodel->initString ("V96C"); } // and yet some, this is for Adobe-generated DNG files - Tag* tmodel4 = root->getTag("LocalizedCameraModel"); + Tag* tmodel4 = root->getTag ("LocalizedCameraModel"); if (tmodel4) { - const char *model4 = (tmodel4) ? (const char *)tmodel4->getValue() : ""; + const char *model4 = (const char *)tmodel4->getValue(); - if (strstr(model4, "Hasselblad ") == model4) { + if (strstr (model4, "Hasselblad ") == model4) { model4 = model4 + 11; } - if (!strcmp(model4, "ixpressCF132-22")) { - tmodel->initString("CF-22"); - } else if (!strcmp(model4, "Hasselblad96-16")) { - tmodel->initString("CFV"); - } else if (!strcmp(model4, "Hasselblad234-39")) { - tmodel->initString("CFV-39"); - } else if (!strcmp(model4, "H3D-50")) { + if (!strcmp (model4, "ixpressCF132-22")) { + tmodel->initString ("CF-22"); + } else if (!strcmp (model4, "Hasselblad96-16")) { + tmodel->initString ("CFV"); + } else if (!strcmp (model4, "Hasselblad234-39")) { + tmodel->initString ("CFV-39"); + } else if (!strcmp (model4, "H3D-50")) { // Adobe names H3DII-50 incorrectly as H3D-50 - tmodel->initString("H3DII-50"); - } else if (strstr(model4, "H3D-") == model4 || strstr(model4, "H4D-") == model4 || strstr(model4, "H5D-") == model4) { - tmodel->initString(model4); + tmodel->initString ("H3DII-50"); + } else if (strstr (model4, "H3D-") == model4 || strstr (model4, "H4D-") == model4 || strstr (model4, "H5D-") == model4) { + tmodel->initString (model4); } } } - if (!root->getTag("Orientation")) { - if (make && !strncmp((char*)make->getValue(), "Phase One", 9)) { + if (!root->getTag ("Orientation")) { + if (make && !strncmp ((char*)make->getValue(), "Phase One", 9)) { int orientation = 0; - Tag *iw = root->getTag("ImageWidth"); + Tag *iw = root->getTag ("ImageWidth"); if (iw) { // from dcraw, derive orientation from image width @@ -2749,30 +2782,32 @@ TagDirectory* ExifManager::parse (FILE* f, int base, bool skipIgnored) return root; } -TagDirectory* ExifManager::parseJPEG (FILE* f) +TagDirectory* ExifManager::parseJPEG (FILE* f, int offset) { - fseek (f, 0, SEEK_SET); - unsigned char markerl = 0xff; - unsigned char c; - fread (&c, 1, 1, f); - const char exifid[] = "Exif\0\0"; - char idbuff[8]; - int tiffbase = -1; + if(!fseek (f, offset, SEEK_SET)) { + unsigned char c; + if(fread (&c, 1, 1, f) == 1) { + constexpr unsigned char markerl = 0xff; + const char exifid[] = "Exif\0\0"; + char idbuff[8]; + int tiffbase = -1; - while (fread (&c, 1, 1, f)) { - if (c != markerl) { - continue; - } + while (fread (&c, 1, 1, f)) { + if (c != markerl) { + continue; + } - if (fread (&c, 1, 1, f) && c == 0xe1) { // APP1 marker found - if (fread (idbuff, 1, 8, f) < 8) { - return nullptr; - } + if (fread (&c, 1, 1, f) && c == 0xe1) { // APP1 marker found + if (fread (idbuff, 1, 8, f) < 8) { + return nullptr; + } - if (!memcmp(idbuff + 2, exifid, 6)) { // Exif info found - tiffbase = ftell (f); - return parse (f, tiffbase); + if (!memcmp (idbuff + 2, exifid, 6)) { // Exif info found + tiffbase = ftell (f); + return parse (f, tiffbase); + } + } } } } @@ -2792,18 +2827,18 @@ std::vector ExifManager::getDefaultTIFFTags (TagDirectory* forthis) std::vector defTags; defTags.reserve (12); - defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "ImageWidth"), 0, LONG)); - defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "ImageHeight"), 0, LONG)); - defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "XResolution"), 300, RATIONAL)); - defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "YResolution"), 300, RATIONAL)); - defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "ResolutionUnit"), 2, SHORT)); - defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "Software"), "RawTherapee " VERSION)); - defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "Orientation"), 1, SHORT)); - defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "SamplesPerPixel"), 3, SHORT)); - defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "BitsPerSample"), 8, SHORT)); - defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "PlanarConfiguration"), 1, SHORT)); - defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "PhotometricInterpretation"), 2, SHORT)); - defTags.push_back (new Tag (forthis, lookupAttrib(ifdAttribs, "Compression"), 1, SHORT)); + defTags.push_back (new Tag (forthis, lookupAttrib (ifdAttribs, "ImageWidth"), 0, LONG)); + defTags.push_back (new Tag (forthis, lookupAttrib (ifdAttribs, "ImageHeight"), 0, LONG)); + defTags.push_back (new Tag (forthis, lookupAttrib (ifdAttribs, "XResolution"), 300, RATIONAL)); + defTags.push_back (new Tag (forthis, lookupAttrib (ifdAttribs, "YResolution"), 300, RATIONAL)); + defTags.push_back (new Tag (forthis, lookupAttrib (ifdAttribs, "ResolutionUnit"), 2, SHORT)); + defTags.push_back (new Tag (forthis, lookupAttrib (ifdAttribs, "Software"), "RawTherapee " RTVERSION)); + defTags.push_back (new Tag (forthis, lookupAttrib (ifdAttribs, "Orientation"), 1, SHORT)); + defTags.push_back (new Tag (forthis, lookupAttrib (ifdAttribs, "SamplesPerPixel"), 3, SHORT)); + defTags.push_back (new Tag (forthis, lookupAttrib (ifdAttribs, "BitsPerSample"), 8, SHORT)); + defTags.push_back (new Tag (forthis, lookupAttrib (ifdAttribs, "PlanarConfiguration"), 1, SHORT)); + defTags.push_back (new Tag (forthis, lookupAttrib (ifdAttribs, "PhotometricInterpretation"), 2, SHORT)); + defTags.push_back (new Tag (forthis, lookupAttrib (ifdAttribs, "Compression"), 1, SHORT)); return defTags; } @@ -2831,7 +2866,7 @@ int ExifManager::createJPEGMarker (const TagDirectory* root, const rtengine::pro TagDirectory* cl; if (root) { - cl = (const_cast(root))->clone (nullptr); + cl = (const_cast (root))->clone (nullptr); } else { cl = new TagDirectory (nullptr, ifdAttribs, INTEL); } @@ -2874,26 +2909,31 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro TagDirectory* cl; if (root) { - cl = (const_cast(root))->clone (nullptr); + cl = (const_cast (root))->clone (nullptr); // remove some unknown top level tags which produce warnings when opening a tiff - Tag *removeTag = cl->getTag(0x9003); - if(removeTag) - removeTag->setKeep(false); - removeTag = cl->getTag(0x9211); - if(removeTag) - removeTag->setKeep(false); + Tag *removeTag = cl->getTag (0x9003); + + if (removeTag) { + removeTag->setKeep (false); + } + + removeTag = cl->getTag (0x9211); + + if (removeTag) { + removeTag->setKeep (false); + } } else { cl = new TagDirectory (nullptr, ifdAttribs, HOSTORDER); } // add tiff strip data int rps = 8; - int strips = ceil((double)H / rps); - cl->replaceTag (new Tag (cl, lookupAttrib(ifdAttribs, "RowsPerStrip"), rps, LONG)); - Tag* stripBC = new Tag (cl, lookupAttrib(ifdAttribs, "StripByteCounts")); + int strips = ceil ((double)H / rps); + cl->replaceTag (new Tag (cl, lookupAttrib (ifdAttribs, "RowsPerStrip"), rps, LONG)); + Tag* stripBC = new Tag (cl, lookupAttrib (ifdAttribs, "StripByteCounts")); stripBC->initInt (0, LONG, strips); cl->replaceTag (stripBC); - Tag* stripOffs = new Tag (cl, lookupAttrib(ifdAttribs, "StripOffsets")); + Tag* stripOffs = new Tag (cl, lookupAttrib (ifdAttribs, "StripOffsets")); stripOffs->initInt (0, LONG, strips); cl->replaceTag (stripOffs); @@ -2901,7 +2941,7 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro stripBC->setInt (rps * W * 3 * bps / 8, i * 4); } - int remaining = (H - rps * floor((double)H / rps)) * W * 3 * bps / 8; + int remaining = (H - rps * floor ((double)H / rps)) * W * 3 * bps / 8; if (remaining) { stripBC->setInt (remaining, (strips - 1) * 4); @@ -2910,13 +2950,13 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro } if (profiledata) { - Tag* icc = new Tag (cl, lookupAttrib(ifdAttribs, "ICCProfile")); + Tag* icc = new Tag (cl, lookupAttrib (ifdAttribs, "ICCProfile")); icc->initUndefArray (profiledata, profilelen); cl->replaceTag (icc); } if (iptcdata) { - Tag* iptc = new Tag (cl, lookupAttrib(ifdAttribs, "IPTCData")); + Tag* iptc = new Tag (cl, lookupAttrib (ifdAttribs, "IPTCData")); iptc->initLongArray (iptcdata, iptclen); cl->replaceTag (iptc); } @@ -2931,10 +2971,10 @@ int ExifManager::createTIFFHeader (const TagDirectory* root, const rtengine::pro defTags[0]->setInt (W, 0, LONG); defTags[1]->setInt (H, 0, LONG); - defTags[8]->initInt(0, SHORT, 3); + defTags[8]->initInt (0, SHORT, 3); for (int i = 0; i < 3; i++) { - defTags[8]->setInt(bps, i * 2, SHORT); + defTags[8]->setInt (bps, i * 2, SHORT); } for (int i = defTags.size() - 1; i >= 0; i--) { @@ -3070,39 +3110,39 @@ short int int2_to_signed (short unsigned int i) * -mm f/- * NB: no space between separator '-'; no space between focal length and 'mm' */ -bool extractLensInfo(std::string &fullname, double &minFocal, double &maxFocal, double &maxApertureAtMinFocal, double &maxApertureAtMaxFocal) +bool extractLensInfo (std::string &fullname, double &minFocal, double &maxFocal, double &maxApertureAtMinFocal, double &maxApertureAtMaxFocal) { minFocal = 0.0; maxFocal = 0.0; maxApertureAtMinFocal = 0.0; maxApertureAtMaxFocal = 0.0; - char buffer[1024]; - strcpy(buffer, fullname.c_str()); - char *pF = strstr(buffer, "f/" ); + char buffer[1025]; + strncpy (buffer, fullname.c_str(), 1024); + char *pF = strstr (buffer, "f/" ); - if( pF ) { - sscanf(pF + 2, "%lf-%lf", &maxApertureAtMinFocal, &maxApertureAtMaxFocal); + if ( pF ) { + sscanf (pF + 2, "%lf-%lf", &maxApertureAtMinFocal, &maxApertureAtMaxFocal); - if(maxApertureAtMinFocal > 0. && maxApertureAtMaxFocal == 0.) { + if (maxApertureAtMinFocal > 0. && maxApertureAtMaxFocal == 0.) { maxApertureAtMaxFocal = maxApertureAtMinFocal; } char *pMM = pF - 3; - while( pMM[0] != 'm' && pMM[1] != 'm' && pMM > buffer) { + while ( pMM[0] != 'm' && pMM[1] != 'm' && pMM > buffer) { pMM--; } - if( pMM[0] == 'm' && pMM[1] == 'm' ) { + if ( pMM[0] == 'm' && pMM[1] == 'm' ) { char *sp = pMM; - while( *sp != ' ' && sp > buffer ) { + while ( *sp != ' ' && sp > buffer ) { sp--; } - sscanf(sp + 1, "%lf-%lf", &minFocal, &maxFocal); + sscanf (sp + 1, "%lf-%lf", &minFocal, &maxFocal); - if(maxFocal == 0.) { + if (maxFocal == 0.) { maxFocal = minFocal; } diff --git a/rtexif/rtexif.h b/rtexif/rtexif.h index e1d8ede6e..0167ef445 100644 --- a/rtexif/rtexif.h +++ b/rtexif/rtexif.h @@ -54,7 +54,7 @@ const enum ByteOrder HOSTORDER = MOTOROLA; #endif enum MNKind {NOMK, IFD, HEADERIFD, NIKON3, OLYMPUS2, FUJI, TABLESUBDIR}; -bool extractLensInfo(std::string &fullname, double &minFocal, double &maxFocal, double &maxApertureAtMinFocal, double &maxApertureAtMaxFocal); +bool extractLensInfo (std::string &fullname, double &minFocal, double &maxFocal, double &maxApertureAtMinFocal, double &maxApertureAtMaxFocal); unsigned short sget2 (unsigned char *s, ByteOrder order); int sget4 (unsigned char *s, ByteOrder order); @@ -135,7 +135,7 @@ public: Tag* getTagP (const char* name) const; // Try to get the Tag at a given location. 'name' is a path relative to this directory (e.g. "LensInfo/FocalLength") Tag* getTag (int ID) const; virtual Tag* findTag (const char* name) const; - bool getXMPTagValue(const char* name, char* value) const; + bool getXMPTagValue (const char* name, char* value) const; void keepTag (int ID); virtual void addTag (Tag* a); @@ -197,7 +197,7 @@ protected: TagDirectory* parent; TagDirectory** directory; MNKind makerNoteKind; - bool parseMakerNote(FILE* f, int base, ByteOrder bom ); + bool parseMakerNote (FILE* f, int base, ByteOrder bom ); public: Tag (TagDirectory* parent, FILE* f, int base); // parse next tag from the file @@ -236,7 +236,7 @@ public: } signed char* getSignedValue () const { - return reinterpret_cast(value); + return reinterpret_cast (value); } const TagAttrib* getAttrib () const { @@ -312,7 +312,7 @@ class ExifManager static Tag* saveCIFFMNTag (FILE* f, TagDirectory* root, int len, const char* name); public: static TagDirectory* parse (FILE*f, int base, bool skipIgnored = true); - static TagDirectory* parseJPEG (FILE*f); + static TagDirectory* parseJPEG (FILE*f, int offset = 0); // offset: to extract exif data from a embedded preview/thumbnail static TagDirectory* parseTIFF (FILE*f, bool skipIgnored = true); static TagDirectory* parseCIFF (FILE* f, int base, int length); static void parseCIFF (FILE* f, int base, int length, TagDirectory* root); @@ -334,62 +334,62 @@ public: { char buffer[1024]; t->toString (buffer); - std::string s(buffer); - std::string::size_type p1 = s.find_first_not_of(' '); + std::string s (buffer); + std::string::size_type p1 = s.find_first_not_of (' '); - if( p1 == std::string::npos ) { + if ( p1 == std::string::npos ) { return s; } else { - return s.substr(p1, s.find_last_not_of(' ') - p1 + 1); + return s.substr (p1, s.find_last_not_of (' ') - p1 + 1); } } virtual void fromString (Tag* t, const std::string& value) { if (t->getType() == SHORT || t->getType() == LONG) { - t->fromInt (atoi(value.c_str())); + t->fromInt (atoi (value.c_str())); } else { t->fromString (value.c_str()); } } // Get the value as a double - virtual double toDouble(Tag* t, int ofs = 0) + virtual double toDouble (Tag* t, int ofs = 0) { double ud, dd; switch (t->getType()) { - case SBYTE: - return double(int(t->getSignedValue()[ofs])); + case SBYTE: + return double (int (t->getSignedValue()[ofs])); - case BYTE: - return (double)((int)t->getValue()[ofs]); + case BYTE: + return (double) ((int)t->getValue()[ofs]); - case ASCII: - return 0.0; + case ASCII: + return 0.0; - case SSHORT: - return (double)int2_to_signed(sget2 (t->getValue() + ofs, t->getOrder())); + case SSHORT: + return (double)int2_to_signed (sget2 (t->getValue() + ofs, t->getOrder())); - case SHORT: - return (double)((int)sget2 (t->getValue() + ofs, t->getOrder())); + case SHORT: + return (double) ((int)sget2 (t->getValue() + ofs, t->getOrder())); - case SLONG: - case LONG: - return (double)((int)sget4 (t->getValue() + ofs, t->getOrder())); + case SLONG: + case LONG: + return (double) ((int)sget4 (t->getValue() + ofs, t->getOrder())); - case SRATIONAL: - case RATIONAL: - ud = (int)sget4 (t->getValue() + ofs, t->getOrder()); - dd = (int)sget4 (t->getValue() + ofs + 4, t->getOrder()); - return dd == 0. ? 0. : (double)ud / (double)dd; + case SRATIONAL: + case RATIONAL: + ud = (int)sget4 (t->getValue() + ofs, t->getOrder()); + dd = (int)sget4 (t->getValue() + ofs + 4, t->getOrder()); + return dd == 0. ? 0. : (double)ud / (double)dd; - case FLOAT: - return double(sget4 (t->getValue() + ofs, t->getOrder())); + case FLOAT: + return double (sget4 (t->getValue() + ofs, t->getOrder())); - case UNDEFINED: - return 0.; + case UNDEFINED: + return 0.; - default: - return 0.; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR) + default: + return 0.; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR) } } // Get the value as an int @@ -402,38 +402,38 @@ public: } switch (astype) { - case SBYTE: - return int(t->getSignedValue()[ofs]); + case SBYTE: + return int (t->getSignedValue()[ofs]); - case BYTE: - return t->getValue()[ofs]; + case BYTE: + return t->getValue()[ofs]; - case ASCII: - return 0; + case ASCII: + return 0; - case SSHORT: - return (int)int2_to_signed(sget2 (t->getValue() + ofs, t->getOrder())); + case SSHORT: + return (int)int2_to_signed (sget2 (t->getValue() + ofs, t->getOrder())); - case SHORT: - return (int)sget2 (t->getValue() + ofs, t->getOrder()); + case SHORT: + return (int)sget2 (t->getValue() + ofs, t->getOrder()); - case SLONG: - case LONG: - return (int)sget4 (t->getValue() + ofs, t->getOrder()); + case SLONG: + case LONG: + return (int)sget4 (t->getValue() + ofs, t->getOrder()); - case SRATIONAL: - case RATIONAL: - a = (int)sget4 (t->getValue() + ofs + 4, t->getOrder()); - return a == 0 ? 0 : (int)sget4 (t->getValue() + ofs, t->getOrder()) / a; + case SRATIONAL: + case RATIONAL: + a = (int)sget4 (t->getValue() + ofs + 4, t->getOrder()); + return a == 0 ? 0 : (int)sget4 (t->getValue() + ofs, t->getOrder()) / a; - case FLOAT: - return (int)toDouble(t, ofs); + case FLOAT: + return (int)toDouble (t, ofs); - case UNDEFINED: - return 0; + case UNDEFINED: + return 0; - default: - return 0; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR) + default: + return 0; // Quick fix for missing cases (INVALID, DOUBLE, OLYUNDEF, SUBDIR) } return 0; @@ -470,28 +470,28 @@ protected: typedef std::pair< T, std::string> p_t; container_t choices; - virtual std::string guess(const T lensID, double focalLength, double maxApertureAtFocal, double *lensInfoArray) + virtual std::string guess (const T lensID, double focalLength, double maxApertureAtFocal, double *lensInfoArray) { it_t r; - size_t nFound = choices.count( lensID ); + size_t nFound = choices.count ( lensID ); - switch( nFound ) { - case 0: { // lens Unknown - std::ostringstream s; - s << lensID; - return s.str(); + switch ( nFound ) { + case 0: { // lens Unknown + std::ostringstream s; + s << lensID; + return s.str(); + } + + case 1: // lens found + r = choices.find ( lensID ); + return r->second; + + default: + // More than one hit: we must guess + break; } - case 1: // lens found - r = choices.find ( lensID ); - return r->second; - - default: - // More than one hit: we must guess - break; - } - - std::string bestMatch("Unknown"); + std::string bestMatch ("Unknown"); double a1, a2, f1, f2; /* FIRST TRY @@ -499,8 +499,8 @@ protected: * Get the lens info (min/man focal, min/max aperture) and compare them to the possible choice */ if (lensInfoArray) { - for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); ++r ) { - if( !extractLensInfo( r->second , f1, f2, a1, a2) ) { + for ( r = choices.lower_bound ( lensID ); r != choices.upper_bound (lensID); ++r ) { + if ( !extractLensInfo ( r->second, f1, f2, a1, a2) ) { continue; } @@ -513,17 +513,17 @@ protected: // No lens found, we update the "unknown" string with the lens info values if (lensInfoArray[0] == lensInfoArray[1]) { - bestMatch += Glib::ustring::compose(" (%1mm", int(lensInfoArray[0])); + bestMatch += Glib::ustring::compose (" (%1mm", int (lensInfoArray[0])); } else { - bestMatch += Glib::ustring::compose(" (%1-%2mm", int(lensInfoArray[0]), int(lensInfoArray[1])); + bestMatch += Glib::ustring::compose (" (%1-%2mm", int (lensInfoArray[0]), int (lensInfoArray[1])); } if (lensInfoArray[2] == lensInfoArray[3]) { - bestMatch += Glib::ustring::compose(" f/%1)", Glib::ustring::format(std::fixed, std::setprecision(1), lensInfoArray[2])); + bestMatch += Glib::ustring::compose (" f/%1)", Glib::ustring::format (std::fixed, std::setprecision (1), lensInfoArray[2])); } else - bestMatch += Glib::ustring::compose(" f/%1-%2)", - Glib::ustring::format(std::fixed, std::setprecision(1), lensInfoArray[2]), - Glib::ustring::format(std::fixed, std::setprecision(1), lensInfoArray[3])); + bestMatch += Glib::ustring::compose (" f/%1-%2)", + Glib::ustring::format (std::fixed, std::setprecision (1), lensInfoArray[2]), + Glib::ustring::format (std::fixed, std::setprecision (1), lensInfoArray[3])); } /* SECOND TRY @@ -536,45 +536,46 @@ protected: std::ostringstream candidates; double deltaMin = 1000.; - for ( r = choices.lower_bound( lensID ); r != choices.upper_bound(lensID); ++r ) { + for ( r = choices.lower_bound ( lensID ); r != choices.upper_bound (lensID); ++r ) { double dif; - if( !extractLensInfo( r->second , f1, f2, a1, a2) ) { + if ( !extractLensInfo ( r->second, f1, f2, a1, a2) ) { continue; } - if( f1 == 0. || a1 == 0.) { + if ( f1 == 0. || a1 == 0.) { continue; } - if( focalLength < f1 - .5 || focalLength > f2 + 0.5 ) { + if ( focalLength < f1 - .5 || focalLength > f2 + 0.5 ) { continue; } - if( maxApertureAtFocal > 0.1) { + if ( maxApertureAtFocal > 0.1) { double lensAperture; - if( maxApertureAtFocal < a1 - 0.15 || maxApertureAtFocal > a2 + 0.15) { + + if ( maxApertureAtFocal < a1 - 0.15 || maxApertureAtFocal > a2 + 0.15) { continue; } - if( a1 == a2 || f1 == f2) { + if ( a1 == a2 || f1 == f2) { lensAperture = a1; } else { - lensAperture = exp( log(a1) + (log(a2) - log(a1)) / (log(f2) - log(f1)) * (log(focalLength) - log(f1)) ); + lensAperture = exp ( log (a1) + (log (a2) - log (a1)) / (log (f2) - log (f1)) * (log (focalLength) - log (f1)) ); } - dif = std::abs(lensAperture - maxApertureAtFocal); + dif = std::abs (lensAperture - maxApertureAtFocal); } else { dif = 0; } - if( dif < deltaMin ) { + if ( dif < deltaMin ) { deltaMin = dif; bestMatch = r->second; } - if( dif < 0.15) { - if( candidates.tellp() ) { + if ( dif < 0.15) { + if ( candidates.tellp() ) { candidates << "\n or " << r->second; } else { candidates << r->second; @@ -582,7 +583,7 @@ protected: } } - if( !candidates.tellp() ) { + if ( !candidates.tellp() ) { return bestMatch; } else { return candidates.str(); @@ -590,7 +591,7 @@ protected: } }; -inline static int getTypeSize( TagType type ) +inline static int getTypeSize ( TagType type ) { return ("11124811248484"[type < 14 ? type : 0] - '0'); } @@ -627,6 +628,8 @@ extern const TagAttrib sonyCameraSettingsAttribs3[]; //extern const TagAttrib sonyDNGMakerNote[]; extern const TagAttrib olympusAttribs[]; extern const TagAttrib kodakIfdAttribs[]; -void parseKodakIfdTextualInfo(Tag *textualInfo, Tag* exif); +void parseKodakIfdTextualInfo (Tag *textualInfo, Tag* exif); +extern const TagAttrib panasonicAttribs[]; +extern const TagAttrib panasonicRawAttribs[]; } #endif diff --git a/rtexif/sonyminoltaattribs.cc b/rtexif/sonyminoltaattribs.cc index a559969bf..7195bf8e5 100644 --- a/rtexif/sonyminoltaattribs.cc +++ b/rtexif/sonyminoltaattribs.cc @@ -664,6 +664,7 @@ public: {128, "Sigma 35mm f/1.4 DG HSM"}, {128, "Sigma 18-35mm f/1.8 DC HSM"}, {128, "Sigma 50-500mm f/4.5-6.3 APO DG OS HSM"}, + {128, "Sigma 24-105mm f/4 DG HSM | Art 013"}, {129, "Tamron Lens (129)"}, {129, "Tamron 200-400mm f/5.6 LD"}, {129, "Tamron 70-300mm f/4-5.6 LD"}, @@ -676,11 +677,15 @@ public: {142, "Voigtlander 70-300mm f/4.5-5.6"}, {146, "Voigtlander Macro APO-Lanthar 125mm f/2.5 SL"}, {194, "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical [IF]"}, + {202, "Tamron SP AF 70-200mm f/2.8 Di LD [IF] Macro"}, {203, "Tamron SP 70-200mm f/2.8 Di USD"}, {204, "Tamron SP 24-70mm f/2.8 Di USD"}, - {213, "Tamron 16-300mm f/3.5-6.3 Di II PZD"}, + {212, "Tamron 28-300mm f/3.5-6.3 Di PZD"}, + {213, "Tamron 16-300mm f/3.5-6.3 Di II PZD Macro"}, {214, "Tamron SP 150-600mm f/5-6.3 Di USD"}, - {224, "Tamron SP 90mm f/2.8 Di Macro 1:1 USD"}, + {215, "Tamron SP 15-30mm f/2.8 Di USD"}, + {218, "Tamron SP 90mm f/2.8 Di Macro 1:1 USD (F017)"}, + {224, "Tamron SP 90mm f/2.8 Di Macro 1:1 USD (F004)"}, {255, "Tamron Lens (255)"}, {255, "Tamron SP AF 17-50mm f/2.8 XR Di II LD Aspherical"}, {255, "Tamron AF 18-250mm f/3.5-6.3 XR Di II LD"}, @@ -691,7 +696,7 @@ public: {255, "Tamron SP AF 70-200mm f/2.8 Di LD IF Macro"}, {255, "Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical IF"}, {255, "Tamron AF 90-300mm f/4.5-5.6 Telemacro"}, - {1868, "Sigma MC-11 Adapter"}, + {1868, "Sigma MC-11 SA-E Mount Converter with not-supported Sigma lens"}, {2550, "Minolta AF 50mm f/1.7"}, {2551, "Minolta AF 35-70mm f/4 or Other Lens"}, {2551, "Sigma UC AF 28-70mm f/3.5-4.5"}, @@ -814,6 +819,7 @@ public: {4587, "Tamron AF 70-210mm f/2.8 SP LD"}, {4812, "Metabones Canon EF Speed Booster Ultra"}, {6118, "Canon EF Adapter"}, + {6528, "Sigma 16mm f/2.8 Filtermatic Fisheye"}, {6553, "E-Mount, T-Mount, Other Lens or no lens"}, {6553, "Sony E 16mm f/2.8"}, {6553, "Sony E 18-55mm f/3.5-5.6 OSS"}, @@ -827,6 +833,7 @@ public: {6553, "Sony E PZ 16-50mm f/3.5-5.6 OSS"}, {6553, "Sony FE 35mm f/2.8 ZA"}, {6553, "Sony FE 24-70mm f/4 ZA OSS"}, + {6553, "Sony FE 85mm f/1.8"}, {6553, "Sony E 18-200mm f/3.5-6.3 OSS LE"}, {6553, "Sony E 20mm f/2.8"}, {6553, "Sony E 35mm f/1.8 OSS"}, @@ -837,32 +844,42 @@ public: {6553, "Sony FE 55mm f/1.8 ZA"}, {6553, "Sony FE 70-200mm f/4 G OSS"}, {6553, "Sony FE 16-35mm f/4 ZA OSS"}, + {6553, "Sony FE 50mm f/2.8 Macro"}, {6553, "Sony FE 28-70mm f/3.5-5.6 OSS"}, {6553, "Sony FE 35mm f/1.4 ZA"}, {6553, "Sony FE 24-240mm f/3.5-6.3 OSS"}, {6553, "Sony FE 28mm f/2"}, {6553, "Sony FE PZ 28-135mm f/4 G OSS"}, + {6553, "Sony FE 100mm f/2.8 STF GM OSS"}, {6553, "Sony FE 24-70mm f/2.8 GM"}, + {6553, "Sony FE 50mm f/1.4 ZA"}, {6553, "Sony FE 85mm f/1.4 GM"}, {6553, "Sony FE 50mm f/1.8"}, {6553, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"}, {6553, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"}, {6553, "Sony FE 70-300mm f/4.5-5.6 G OSS"}, {6553, "Sony FE 70-200mm f/2.8 GM OSS"}, + {6553, "Sony FE 70-200mm f/2.8 GM OSS + 1.4X Teleconverter"}, + {6553, "Sony FE 70-200mm f/2.8 GM OSS + 2X Teleconverter"}, + {6553, "Samyang AF 50mm f/1.4 FE"}, + {6553, "Samyang AF 14mm f/2.8 FE"}, {6553, "Sigma 19mm f/2.8 [EX] DN"}, {6553, "Sigma 30mm f/2.8 [EX] DN"}, {6553, "Sigma 60mm f/2.8 DN"}, - {6553, "Sigma 30mm f/1.4 DC DN | C"}, + {6553, "Sigma 30mm f/1.4 DC DN | C 016"}, {6553, "Tamron 18-200mm f/3.5-6.3 Di III VC"}, - {6553, "Zeiss Batis 25mm f/2"}, - {6553, "Zeiss Batis 85mm f/1.8"}, - {6553, "Zeiss Batis 18mm f/2.8"}, - {6553, "Zeiss Loxia 21mm f/2.8"}, - {6553, "Zeiss Loxia 35mm f/2"}, - {6553, "Zeiss Loxia 50mm f/2"}, + {6553, "Tokina Firin 20mm f/2 FE MF"}, {6553, "Zeiss Touit 12mm f/2.8"}, {6553, "Zeiss Touit 32mm f/1.8"}, {6553, "Zeiss Touit 50mm f/2.8 Macro"}, + {6553, "Zeiss Batis 25mm f/2"}, + {6553, "Zeiss Batis 85mm f/1.8"}, + {6553, "Zeiss Batis 18mm f/2.8"}, + {6553, "Zeiss Batis 135mm f/2.8"}, + {6553, "Zeiss Loxia 50mm f/2"}, + {6553, "Zeiss Loxia 35mm f/2"}, + {6553, "Zeiss Loxia 21mm f/2.8"}, + {6553, "Zeiss Loxia 85mm f/2.4"}, {6553, "Arax MC 35mm f/2.8 Tilt+Shift"}, {6553, "Arax MC 80mm f/2.8 Tilt+Shift"}, {6553, "Zenitar MF 16mm f/2.8 Fisheye M42"}, @@ -870,7 +887,7 @@ public: {6553, "Pentacon Auto 135mm f/2.8"}, {6553, "Pentacon Auto 29mm f/2.8"}, {6553, "Helios 44-2 58mm f/2.0"}, - {18688, "Sigma MC-11 Adapter"}, + {18688, "Sigma MC-11 SA-E Mount Converter with not-supported Sigma lens"}, {25501, "Minolta AF 50mm f/1.7"}, {25511, "Minolta AF 35-70mm f/4 or Other Lens"}, {25511, "Sigma UC AF 28-70mm f/3.5-4.5"}, @@ -993,6 +1010,7 @@ public: {45871, "Tamron AF 70-210mm f/2.8 SP LD"}, {48128, "Metabones Canon EF Speed Booster Ultra"}, {61184, "Canon EF Adapter"}, + {65280, "Sigma 16mm f/2.8 Filtermatic Fisheye"}, {65535, "E-Mount, T-Mount, Other Lens or no lens"}, {65535, "Sony E 16mm f/2.8"}, {65535, "Sony E 18-55mm f/3.5-5.6 OSS"}, @@ -1006,6 +1024,7 @@ public: {65535, "Sony E PZ 16-50mm f/3.5-5.6 OSS"}, {65535, "Sony FE 35mm f/2.8 ZA"}, {65535, "Sony FE 24-70mm f/4 ZA OSS"}, + {65535, "Sony FE 85mm f/1.8"}, {65535, "Sony E 18-200mm f/3.5-6.3 OSS LE"}, {65535, "Sony E 20mm f/2.8"}, {65535, "Sony E 35mm f/1.8 OSS"}, @@ -1016,56 +1035,66 @@ public: {65535, "Sony FE 55mm f/1.8 ZA"}, {65535, "Sony FE 70-200mm f/4 G OSS"}, {65535, "Sony FE 16-35mm f/4 ZA OSS"}, + {65535, "Sony FE 50mm f/2.8 Macro"}, {65535, "Sony FE 28-70mm f/3.5-5.6 OSS"}, {65535, "Sony FE 35mm f/1.4 ZA"}, {65535, "Sony FE 24-240mm f/3.5-6.3 OSS"}, {65535, "Sony FE 28mm f/2"}, {65535, "Sony FE PZ 28-135mm f/4 G OSS"}, + {65535, "Sony FE 100mm f/2.8 STF GM OSS"}, {65535, "Sony FE 24-70mm f/2.8 GM"}, + {65535, "Sony FE 50mm f/1.4 ZA"}, {65535, "Sony FE 85mm f/1.4 GM"}, {65535, "Sony FE 50mm f/1.8"}, {65535, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)"}, {65535, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)"}, {65535, "Sony FE 70-300mm f/4.5-5.6 G OSS"}, {65535, "Sony FE 70-200mm f/2.8 GM OSS"}, + {65535, "Sony FE 70-200mm f/2.8 GM OSS + 1.4X Teleconverter"}, + {65535, "Sony FE 70-200mm f/2.8 GM OSS + 2X Teleconverter"}, + {65535, "Samyang AF 50mm f/1.4 FE"}, + {65535, "Samyang AF 14mm f/2.8 FE"}, {65535, "Sigma 19mm f/2.8 [EX] DN"}, {65535, "Sigma 30mm f/2.8 [EX] DN"}, {65535, "Sigma 60mm f/2.8 DN"}, - {65535, "Sigma 30mm f/1.4 DC DN | C"}, + {65535, "Sigma 30mm f/1.4 DC DN | C 016"}, {65535, "Tamron 18-200mm f/3.5-6.3 Di III VC"}, - {65535, "Zeiss Batis 25mm f/2"}, - {65535, "Zeiss Batis 85mm f/1.8"}, - {65535, "Zeiss Batis 18mm f/2.8"}, - {65535, "Zeiss Loxia 21mm f/2.8"}, - {65535, "Zeiss Loxia 35mm f/2"}, - {65535, "Zeiss Loxia 50mm f/2"}, + {65535, "Tokina Firin 20mm f/2 FE MF"}, {65535, "Zeiss Touit 12mm f/2.8"}, {65535, "Zeiss Touit 32mm f/1.8"}, {65535, "Zeiss Touit 50mm f/2.8 Macro"}, + {65535, "Zeiss Batis 25mm f/2"}, + {65535, "Zeiss Batis 85mm f/1.8"}, + {65535, "Zeiss Batis 18mm f/2.8"}, + {65535, "Zeiss Batis 135mm f/2.8"}, + {65535, "Zeiss Loxia 50mm f/2"}, + {65535, "Zeiss Loxia 35mm f/2"}, + {65535, "Zeiss Loxia 21mm f/2.8"}, + {65535, "Zeiss Loxia 85mm f/2.4"}, {65535, "Arax MC 35mm f/2.8 Tilt+Shift"}, {65535, "Arax MC 80mm f/2.8 Tilt+Shift"}, {65535, "Zenitar MF 16mm f/2.8 Fisheye M42"}, {65535, "Samyang 500mm Mirror f/8.0"}, {65535, "Pentacon Auto 135mm f/2.8"}, {65535, "Pentacon Auto 29mm f/2.8"}, - {65535, "Helios 44-2 58mm f/2.0"} + {65535, "Helios 44-2 58mm f/2.0"}, }; } virtual std::string toString (Tag* t) { int lensID = t->toInt(); - Tag *lensInfoTag = t->getParent()->getRoot()->findTag("LensInfo"); - Tag *apertureTag = t->getParent()->getRoot()->findTag("MaxApertureValue"); - Tag *focalLengthTag = t->getParent()->getRoot()->findTag("FocalLength"); + Tag *lensInfoTag = t->getParent()->getRoot()->findTag ("LensInfo"); + Tag *apertureTag = t->getParent()->getRoot()->findTag ("MaxApertureValue"); + Tag *focalLengthTag = t->getParent()->getRoot()->findTag ("FocalLength"); double maxApertureAtFocal = 0.; double focalLength = 0.; - if( apertureTag ) { - maxApertureAtFocal = pow(2.0, apertureTag->toDouble() / 2.0); + if ( apertureTag ) { + maxApertureAtFocal = pow (2.0, apertureTag->toDouble() / 2.0); } - if( focalLengthTag ) { + if ( focalLengthTag ) { focalLength = focalLengthTag->toDouble(); } @@ -1075,9 +1104,9 @@ public: liArray = lensInfoTag->toDoubleArray(); } - std::string retval = guess( lensID, focalLength, maxApertureAtFocal, liArray); + std::string retval = guess ( lensID, focalLength, maxApertureAtFocal, liArray); - if(liArray) { + if (liArray) { delete [] liArray; } @@ -1091,87 +1120,104 @@ class SALensID2Interpreter : public IntLensInterpreter< int > public: SALensID2Interpreter () { - choices.insert(p_t(0, "Unknown E-mount lens or other lens")); - choices.insert(p_t(1, "Sony LA-EA1 Adapter")); - choices.insert(p_t(2, "Sony LA-EA2 Adapter")); - choices.insert(p_t(3, "Sony LA-EA3 Adapter")); - choices.insert(p_t(6, "Sony LA-EA4 Adapter")); - choices.insert(p_t(44, "Metabones Canon EF Smart Adapter")); - choices.insert(p_t(78, "Metabones Canon EF Smart Adapter Mark III or Other Adapter")); - choices.insert(p_t(234, "Metabones Canon EF Smart Adapter Mark IV")); - choices.insert(p_t(239, "Metabones Canon EF Speed Booster")); - choices.insert(p_t(32784, "Sony E 16mm f/2.8")); - choices.insert(p_t(32785, "Sony E 18-55mm f/3.5-5.6 OSS")); - choices.insert(p_t(32786, "Sony E 55-210mm f/4.5-6.3 OSS")); - choices.insert(p_t(32787, "Sony E 18-200mm f/3.5-6.3 OSS")); - choices.insert(p_t(32788, "Sony E 30mm f/3.5 Macro")); - choices.insert(p_t(32789, "Sony E 24mm f/1.8 ZA")); - choices.insert(p_t(32790, "Sony E 50mm f/1.8 OSS")); - choices.insert(p_t(32791, "Sony E 16-70mm f/4 ZA OSS")); - choices.insert(p_t(32792, "Sony E 10-18mm f/4 OSS")); - choices.insert(p_t(32793, "Sony E PZ 16-50mm f/3.5-5.6 OSS")); - choices.insert(p_t(32794, "Sony FE 35mm f/2.8 ZA")); - choices.insert(p_t(32795, "Sony FE 24-70mm f/4 ZA OSS")); - choices.insert(p_t(32797, "Sony E 18-200mm f/3.5-6.3 OSS LE")); - choices.insert(p_t(32798, "Sony E 20mm f/2.8")); - choices.insert(p_t(32799, "Sony E 35mm f/1.8 OSS")); - choices.insert(p_t(32800, "Sony E PZ 18-105mm f/4 G OSS")); - choices.insert(p_t(32802, "Sony FE 90mm f/2.8 Macro G OSS")); - choices.insert(p_t(32803, "Sony E 18-50mm f/4-5.6")); - choices.insert(p_t(32807, "Sony E PZ 18-200mm f/3.5-6.3 OSS")); - choices.insert(p_t(32808, "Sony FE 55mm f/1.8 ZA")); - choices.insert(p_t(32810, "Sony FE 70-200mm f/4 G OSS")); - choices.insert(p_t(32811, "Sony FE 16-35mm f/4 ZA OSS")); - choices.insert(p_t(32813, "Sony FE 28-70mm f/3.5-5.6 OSS")); - choices.insert(p_t(32814, "Sony FE 35mm f/1.4 ZA")); - choices.insert(p_t(32815, "Sony FE 24-240mm f/3.5-6.3 OSS")); - choices.insert(p_t(32816, "Sony FE 28mm f/2")); - choices.insert(p_t(32817, "Sony FE PZ 28-135mm f/4 G OSS")); - choices.insert(p_t(32821, "Sony FE 24-70mm f/2.8 GM")); - choices.insert(p_t(32823, "Sony FE 85mm f/1.4 GM")); - choices.insert(p_t(32824, "Sony FE 50mm f/1.8")); - choices.insert(p_t(32826, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)")); - choices.insert(p_t(32827, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)")); - choices.insert(p_t(32828, "Sony FE 70-300mm f/4.5-5.6 G OSS")); - choices.insert(p_t(32830, "Sony FE 70-200mm f/2.8 GM OSS")); - choices.insert(p_t(49201, "Zeiss Touit 12mm f/2.8")); - choices.insert(p_t(49202, "Zeiss Touit 32mm f/1.8")); - choices.insert(p_t(49203, "Zeiss Touit 50mm f/2.8 Macro")); - choices.insert(p_t(49216, "Zeiss Batis 25mm f/2")); - choices.insert(p_t(49217, "Zeiss Batis 85mm f/1.8")); - choices.insert(p_t(49218, "Zeiss Batis 18mm f/2.8")); - choices.insert(p_t(49232, "Zeiss Loxia 50mm f/2")); - choices.insert(p_t(49233, "Zeiss Loxia 35mm f/2")); - choices.insert(p_t(49234, "Zeiss Loxia 21mm f/2.8")); - choices.insert(p_t(50480, "Sigma 30mm f/1.4 DC DN | C 016")); - choices.insert(p_t(50481, "Sigma 50mm f/1.4 DG HSM | A 014 + MC-11")); - choices.insert(p_t(50482, "Sigma 18-300mm f/3.5-6.3 DC MACRO OS HSM | C 014 + MC-11")); - choices.insert(p_t(50483, "Sigma 18-35mm f/1.8 DC HSM | A 013 + MC-11")); - choices.insert(p_t(50484, "Sigma 24-35mm f/2 DG HSM | A 015 + MC-11")); - choices.insert(p_t(50486, "Sigma 150-600mm f/5-6.3 DG OS HSM | C 015 + MC-11")); - choices.insert(p_t(50487, "Sigma 20mm f/1.4 DG HSM | A 015 + MC-11")); - choices.insert(p_t(50488, "Sigma 35mm f/1.4 DG HSM | A 012 + MC-11")); - choices.insert(p_t(50489, "Sigma 150-600mm f/5-6.3 DG OS HSM | S 014 + MC-11")); - choices.insert(p_t(50490, "Sigma 120-300mm f/2.8 DG OS HSM | S 013 + MC-11")); - choices.insert(p_t(50492, "Sigma 24-105mm f/4 DG OS HSM | A 013 + MC-11")); - choices.insert(p_t(50493, "Sigma 17-70mm f/2.8-4 DC MACRO OS HSM | C 013 + MC-11")); - choices.insert(p_t(50495, "Sigma 50-100mm f/1.8 DC HSM | A 016 + MC-11")); + choices.insert (p_t (0, "Unknown E-mount lens or other lens")); + choices.insert (p_t (1, "Sony LA-EA1 Adapter")); + choices.insert (p_t (2, "Sony LA-EA2 Adapter")); + choices.insert (p_t (3, "Sony LA-EA3 Adapter")); + choices.insert (p_t (6, "Sony LA-EA4 Adapter")); + choices.insert (p_t (44, "Metabones Canon EF Smart Adapter")); + choices.insert (p_t (78, "Metabones Canon EF Smart Adapter Mark III or Other Adapter")); + choices.insert (p_t (234, "Metabones Canon EF Smart Adapter Mark IV")); + choices.insert (p_t (239, "Metabones Canon EF Speed Booster")); + choices.insert (p_t (32784, "Sony E 16mm f/2.8")); + choices.insert (p_t (32785, "Sony E 18-55mm f/3.5-5.6 OSS")); + choices.insert (p_t (32786, "Sony E 55-210mm f/4.5-6.3 OSS")); + choices.insert (p_t (32787, "Sony E 18-200mm f/3.5-6.3 OSS")); + choices.insert (p_t (32788, "Sony E 30mm f/3.5 Macro")); + choices.insert (p_t (32789, "Sony E 24mm f/1.8 ZA or Samyang AF 50mm f/1.4 FE")); + choices.insert (p_t (32789, "Samyang AF 50mm f/1.4 FE")); + choices.insert (p_t (32790, "Sony E 50mm f/1.8 OSS or Samyang AF 14mm f/2.8 FE")); + choices.insert (p_t (32790, "Samyang AF 14mm f/2.8 FE")); + choices.insert (p_t (32791, "Sony E 16-70mm f/4 ZA OSS")); + choices.insert (p_t (32792, "Sony E 10-18mm f/4 OSS")); + choices.insert (p_t (32793, "Sony E PZ 16-50mm f/3.5-5.6 OSS")); + choices.insert (p_t (32794, "Sony FE 35mm f/2.8 ZA")); + choices.insert (p_t (32795, "Sony FE 24-70mm f/4 ZA OSS")); + choices.insert (p_t (32796, "Sony FE 85mm f/1.8")); + choices.insert (p_t (32797, "Sony E 18-200mm f/3.5-6.3 OSS LE")); + choices.insert (p_t (32798, "Sony E 20mm f/2.8")); + choices.insert (p_t (32799, "Sony E 35mm f/1.8 OSS")); + choices.insert (p_t (32800, "Sony E PZ 18-105mm f/4 G OSS")); + choices.insert (p_t (32802, "Sony FE 90mm f/2.8 Macro G OSS")); + choices.insert (p_t (32803, "Sony E 18-50mm f/4-5.6")); + choices.insert (p_t (32807, "Sony E PZ 18-200mm f/3.5-6.3 OSS")); + choices.insert (p_t (32808, "Sony FE 55mm f/1.8 ZA")); + choices.insert (p_t (32810, "Sony FE 70-200mm f/4 G OSS")); + choices.insert (p_t (32811, "Sony FE 16-35mm f/4 ZA OSS")); + choices.insert (p_t (32812, "Sony FE 50mm f/2.8 Macro")); + choices.insert (p_t (32813, "Sony FE 28-70mm f/3.5-5.6 OSS")); + choices.insert (p_t (32814, "Sony FE 35mm f/1.4 ZA")); + choices.insert (p_t (32815, "Sony FE 24-240mm f/3.5-6.3 OSS")); + choices.insert (p_t (32816, "Sony FE 28mm f/2")); + choices.insert (p_t (32817, "Sony FE PZ 28-135mm f/4 G OSS")); + choices.insert (p_t (32819, "Sony FE 100mm f/2.8 STF GM OSS")); + choices.insert (p_t (32821, "Sony FE 24-70mm f/2.8 GM")); + choices.insert (p_t (32822, "Sony FE 50mm f/1.4 ZA")); + choices.insert (p_t (32823, "Sony FE 85mm f/1.4 GM")); + choices.insert (p_t (32824, "Sony FE 50mm f/1.8")); + choices.insert (p_t (32826, "Sony FE 21mm f/2.8 (SEL28F20 + SEL075UWC)")); + choices.insert (p_t (32827, "Sony FE 16mm f/3.5 Fisheye (SEL28F20 + SEL057FEC)")); + choices.insert (p_t (32828, "Sony FE 70-300mm f/4.5-5.6 G OSS")); + choices.insert (p_t (32830, "Sony FE 70-200mm f/2.8 GM OSS")); + choices.insert (p_t (33002, "Sigma 85mm f/1.4 DG HSM | A 016 (+ Metabones Ver.50)")); + choices.insert (p_t (33072, "Sony FE 70-200mm f/2.8 GM OSS + 1.4X Teleconverter")); + choices.insert (p_t (33073, "Sony FE 70-200mm f/2.8 GM OSS + 2X Teleconverter")); + choices.insert (p_t (33076, "Sony FE 100mm f/2.8 STF GM OSS (macro mode)")); + choices.insert (p_t (49201, "Zeiss Touit 12mm f/2.8")); + choices.insert (p_t (49202, "Zeiss Touit 32mm f/1.8")); + choices.insert (p_t (49203, "Zeiss Touit 50mm f/2.8 Macro")); + choices.insert (p_t (49216, "Zeiss Batis 25mm f/2")); + choices.insert (p_t (49217, "Zeiss Batis 85mm f/1.8")); + choices.insert (p_t (49218, "Zeiss Batis 18mm f/2.8")); + choices.insert (p_t (49219, "Zeiss Batis 135mm f/2.8")); + choices.insert (p_t (49232, "Zeiss Loxia 50mm f/2")); + choices.insert (p_t (49233, "Zeiss Loxia 35mm f/2")); + choices.insert (p_t (49234, "Zeiss Loxia 21mm f/2.8")); + choices.insert (p_t (49235, "Zeiss Loxia 85mm f/2.4")); + choices.insert (p_t (50480, "Sigma 30mm f/1.4 DC DN | C 016")); + choices.insert (p_t (50481, "Sigma 50mm f/1.4 DG HSM | A 014 + MC-11")); + choices.insert (p_t (50482, "Sigma 18-300mm f/3.5-6.3 DC MACRO OS HSM | C 014 + MC-11")); + choices.insert (p_t (50483, "Sigma 18-35mm f/1.8 DC HSM | A 013 + MC-11")); + choices.insert (p_t (50484, "Sigma 24-35mm f/2 DG HSM | A 015 + MC-11")); + choices.insert (p_t (50486, "Sigma 150-600mm f/5-6.3 DG OS HSM | C 015 + MC-11")); + choices.insert (p_t (50487, "Sigma 20mm f/1.4 DG HSM | A 015 + MC-11")); + choices.insert (p_t (50488, "Sigma 35mm f/1.4 DG HSM | A 012 + MC-11")); + choices.insert (p_t (50489, "Sigma 150-600mm f/5-6.3 DG OS HSM | S 014 + MC-11")); + choices.insert (p_t (50490, "Sigma 120-300mm f/2.8 DG OS HSM | S 013 + MC-11")); + choices.insert (p_t (50492, "Sigma 24-105mm f/4 DG OS HSM | A 013 + MC-11")); + choices.insert (p_t (50493, "Sigma 17-70mm f/2.8-4 DC MACRO OS HSM | C 013 + MC-11")); + choices.insert (p_t (50495, "Sigma 50-100mm f/1.8 DC HSM | A 016 + MC-11")); + 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 (50994, "Voigtlander ULTRA WIDE-HELIAR 12mm f/5.6 III")); + choices.insert (p_t (50996, "Voigtlander NOKTON 40mm f/1.2 Aspherical")); + choices.insert (p_t (51505, "Samyang AF 14mm f/2.8 FE")); } virtual std::string toString (Tag* t) { int lensID = t->toInt(); - Tag *lensInfoTag = t->getParent()->getRoot()->findTag("LensInfo"); - Tag *apertureTag = t->getParent()->getRoot()->findTag("MaxApertureValue"); - Tag *focalLengthTag = t->getParent()->getRoot()->findTag("FocalLength"); + Tag *lensInfoTag = t->getParent()->getRoot()->findTag ("LensInfo"); + Tag *apertureTag = t->getParent()->getRoot()->findTag ("MaxApertureValue"); + Tag *focalLengthTag = t->getParent()->getRoot()->findTag ("FocalLength"); double maxApertureAtFocal = 0.; double focalLength = 0.; - if( apertureTag ) { - maxApertureAtFocal = pow(2.0, apertureTag->toDouble() / 2.0); + if ( apertureTag ) { + maxApertureAtFocal = pow (2.0, apertureTag->toDouble() / 2.0); } - if( focalLengthTag ) { + if ( focalLengthTag ) { focalLength = focalLengthTag->toDouble(); } @@ -1181,9 +1227,9 @@ public: liArray = lensInfoTag->toDoubleArray(); } - std::string retval = guess( lensID, focalLength, maxApertureAtFocal, liArray); + std::string retval = guess ( lensID, focalLength, maxApertureAtFocal, liArray); - if(liArray) { + if (liArray) { delete [] liArray; } @@ -1956,7 +2002,7 @@ public: { double a = t->toDouble(); - if(a > 0) { + if (a > 0) { char buffer[32]; sprintf (buffer, "%.4f", a); return buffer; @@ -1977,8 +2023,8 @@ public: } // Decode the value - if(a > 0) { - return pow(2., 6. - (double(a) / 8.)); + if (a > 0) { + return pow (2., 6. - (double (a) / 8.)); } else { return 0.; } @@ -1999,8 +2045,8 @@ public: } // Decode the value - if(a) { - return int(powf(2.f, 6.f - (float(a) / 8.f)) + 0.5f); + if (a) { + return int (powf (2.f, 6.f - (float (a) / 8.f)) + 0.5f); } else { return 0; } @@ -2014,9 +2060,9 @@ public: SAFNumberInterpreter () {} virtual std::string toString (Tag* t) { - double a = double(t->toDouble()); + double a = double (t->toDouble()); - if(a) { + if (a) { char buffer[32]; sprintf (buffer, "%.1f", a / 100. ); return buffer; @@ -2037,8 +2083,8 @@ public: } // Decode the value - if(a > 0) { - return pow(2., (double(a) / 8. - 1.) / 2.); + if (a > 0) { + return pow (2., (double (a) / 8. - 1.) / 2.); } else { return 0.; } @@ -2059,8 +2105,8 @@ public: } // Decode the value - if(a) { - return int(powf(2.f, (float(a) / 8.f - 1.f) / 2.f) + 0.5f); + if (a) { + return int (powf (2.f, (float (a) / 8.f - 1.f) / 2.f) + 0.5f); } else { return 0; } @@ -2076,7 +2122,7 @@ public: { int a = t->toInt(); - if(a) { + if (a) { char buffer[32]; sprintf (buffer, "%d", a ); return buffer; @@ -2100,8 +2146,8 @@ public: } // Decode the value - if(a && a != 254) { // 254 = 'Auto' for CameraSettings3, but we might say the same for CameraSettings & CameraSettings2 (?) - return int(expf((double(a) / 8.f - 6.f) * logf(2.f)) * 100.f + 0.5f); + if (a && a != 254) { // 254 = 'Auto' for CameraSettings3, but we might say the same for CameraSettings & CameraSettings2 (?) + return int (expf ((double (a) / 8.f - 6.f) * logf (2.f)) * 100.f + 0.5f); } else { return 0; } @@ -2125,7 +2171,7 @@ public: // Get the value int a = t->getValue()[ofs]; // Decode the value - return (double(a) - 128.) / 24.; + return (double (a) - 128.) / 24.; } }; SAExposureCompSetInterpreter saExposureCompSetInterpreter; diff --git a/rtexif/stdattribs.cc b/rtexif/stdattribs.cc index 2bd7a60f7..514dd5215 100644 --- a/rtexif/stdattribs.cc +++ b/rtexif/stdattribs.cc @@ -332,7 +332,7 @@ public: char buffer[32]; double v = t->toDouble(); - if( v < 0. || v > 1000. ) { + if ( v < 0. || v > 1000. ) { return "undef"; } @@ -349,9 +349,9 @@ public: virtual std::string toString (Tag* t) { char buffer[32]; - double v = pow(2.0, t->toDouble() / 2.0); + double v = pow (2.0, t->toDouble() / 2.0); - if( v < 0. || v > 1000. ) { + if ( v < 0. || v > 1000. ) { return "undef"; } @@ -370,7 +370,7 @@ public: char buffer[32]; double v = t->toDouble(); - if( v < -1000. || v > 1000. ) { + if ( v < -1000. || v > 1000. ) { return "undef"; } @@ -389,7 +389,7 @@ public: char buffer[32]; double d = pow (2.0, -t->toDouble()); - if (d > 0.0 && d < 0.9) { + if (d > 0.0 && d <= 0.5) { sprintf (buffer, "1/%.0f", 1.0 / d); } else { sprintf (buffer, "%.1f", d); @@ -409,7 +409,7 @@ public: char buffer[32]; double d = t->toDouble(); - if (d > 0.0 && d < 0.9) { + if (d > 0.0 && d <= 0.5) { sprintf (buffer, "1/%.0f", 1.0 / d); } else { sprintf (buffer, "%.1f", d); @@ -429,7 +429,7 @@ public: char buffer[32]; double v = t->toDouble(); - if( v > 1000000. || v < 0 ) { + if ( v > 1000000. || v < 0 ) { return "undef"; } @@ -445,16 +445,23 @@ public: UserCommentInterpreter () {} virtual std::string toString (Tag* t) { - char *buffer = new char[t->getCount()]; + int count = t->getCount(); - if (!strncmp((char*)t->getValue(), "ASCII\0\0\0", 8)) { - strncpy (buffer, (char*)t->getValue() + 8, t->getCount() - 8); - buffer[t->getCount() - 8] = '\0'; + if (count <= 8) { + return std::string(); + } + + count = std::min (count, 65535); // limit to 65535 chars to avoid crashes in case of corrupted metadata + char *buffer = new char[count - 7]; + + if (!memcmp ((char*)t->getValue(), "ASCII\0\0\0", 8)) { + strncpy (buffer, (char*)t->getValue() + 8, count - 8); + buffer[count - 8] = '\0'; } else { buffer[0] = 0; } - std::string retVal(buffer); + std::string retVal (buffer); delete [] buffer; return retVal; } @@ -478,8 +485,8 @@ public: char colors[] = "RGB"; char buffer[1024]; - for( int i = 0; i < t->getCount(); i++) { - unsigned char c = t->toInt(i, BYTE); + for ( int i = 0; i < t->getCount(); i++) { + unsigned char c = t->toInt (i, BYTE); buffer[i] = c < 3 ? colors[c] : ' '; } diff --git a/rtgui/CMakeLists.txt b/rtgui/CMakeLists.txt index 81118b9eb..2a6f6df49 100644 --- a/rtgui/CMakeLists.txt +++ b/rtgui/CMakeLists.txt @@ -1,74 +1,278 @@ - -set (BASESOURCEFILES - editwindow.cc batchtoolpanelcoord.cc paramsedited.cc cropwindow.cc previewhandler.cc previewwindow.cc navigator.cc indclippedpanel.cc previewmodepanel.cc filterpanel.cc - exportpanel.cc cursormanager.cc rtwindow.cc renamedlg.cc recentbrowser.cc placesbrowser.cc filepanel.cc editorpanel.cc batchqueuepanel.cc - ilabel.cc thumbbrowserbase.cc adjuster.cc filebrowserentry.cc filebrowser.cc filethumbnailbuttonset.cc - cachemanager.cc cacheimagedata.cc shcselector.cc perspective.cc thresholdselector.cc thresholdadjuster.cc - clipboard.cc thumbimageupdater.cc bqentryupdater.cc lensgeom.cc coloredbar.cc edit.cc coordinateadjuster.cc - coarsepanel.cc cacorrection.cc chmixer.cc blackwhite.cc - resize.cc icmpanel.cc crop.cc shadowshighlights.cc spot.cc - impulsedenoise.cc dirpyrdenoise.cc epd.cc - exifpanel.cc toolpanel.cc lensprofile.cc lockablecolorpicker.cc - sharpening.cc vibrance.cc rgbcurves.cc colortoning.cc - whitebalance.cc vignetting.cc gradient.cc pcvignette.cc rotate.cc distortion.cc - crophandler.cc dirbrowser.cc - curveeditor.cc curveeditorgroup.cc diagonalcurveeditorsubgroup.cc flatcurveeditorsubgroup.cc - filecatalog.cc extprog.cc - previewloader.cc rtimage.cc inspector.cc - histogrampanel.cc history.cc imagearea.cc - imageareapanel.cc iptcpanel.cc labcurve.cc main.cc - multilangmgr.cc mycurve.cc myflatcurve.cc mydiagonalcurve.cc options.cc retinex.cc - preferences.cc profilepanel.cc saveasdlg.cc - saveformatpanel.cc soundman.cc splash.cc - thumbnail.cc tonecurve.cc toolbar.cc - guiutils.cc threadutils.cc zoompanel.cc toolpanelcoord.cc - thumbbrowserentrybase.cc batchqueueentry.cc - batchqueue.cc lwbutton.cc lwbuttonset.cc - batchqueuebuttonset.cc browserfilter.cc exiffiltersettings.cc - profilestore.cc partialpastedlg.cc - sensorbayer.cc sensorxtrans.cc preprocess.cc bayerpreprocess.cc bayerprocess.cc bayerrawexposure.cc xtransprocess.cc xtransrawexposure.cc - darkframe.cc flatfield.cc rawcacorrection.cc rawexposure.cc wavelet.cc - dirpyrequalizer.cc hsvequalizer.cc defringe.cc - popupcommon.cc popupbutton.cc popuptogglebutton.cc sharpenedge.cc sharpenmicro.cc colorappearance.cc - filmsimulation.cc prsharpening.cc) - -include_directories (BEFORE "${CMAKE_CURRENT_BINARY_DIR}") - -if (APPLE) - 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/... - set (EXTRA_LIB_RTGUI ${MacIntegration_LIBRARIES}) - set (EXTRA_INCDIR ${EXTRA_INCDIR} ${MacIntegration_INCLUDE_DIRS}) -endif (APPLE) -if (WIN32) - set (EXTRA_SRC windirmonitor.cc myicon.rc) - set (EXTRA_LIB_RTGUI winmm) - include_directories (${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS} - ${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS} ${GIO_INCLUDE_DIRS} ${GIOMM_INCLUDE_DIRS}) - link_directories (. "${PROJECT_SOURCE_DIR}/rtexif" ${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS} - ${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS} ${GIO_LIBRARY_DIRS} ${GIOMM_LIBRARY_DIRS}) - #set_target_properties (rth PROPERTIES LINK_FLAGS "-mwindows") -else (WIN32) - include_directories (${EXTRA_INCDIR} ${GLIB2_INCLUDE_DIRS} ${GLIBMM_INCLUDE_DIRS} - ${GTK_INCLUDE_DIRS} ${GTKMM_INCLUDE_DIRS} ${GIO_INCLUDE_DIRS} ${GIOMM_INCLUDE_DIRS} ${IPTCDATA_INCLUDE_DIRS} - ${LCMS_INCLUDE_DIRS} ${EXPAT_INCLUDE_DIRS} ${FFTW3F_LIBRARY_DIRS} ${GTHREAD_INCLUDE_DIRS} ${GOBJECT_INCLUDE_DIRS} - ${CANBERRA-GTK_INCLUDE_DIRS}) - link_directories (${EXTRA_LIBDIR} ${GLIB2_LIBRARY_DIRS} ${GLIBMM_LIBRARY_DIRS} - ${GTK_LIBRARY_DIRS} ${GTKMM_LIBRARY_DIRS} ${GIO_LIBRARY_DIRS} ${GIOMM_LIBRARY_DIRS} ${IPTCDATA_LIBRARY_DIRS} - ${LCMS_LIBRARY_DIRS} ${EXPAT_LIBRARY_DIRS} ${FFTW3F_LIBRARY_DIRS} ${GTHREAD_LIBRARY_DIRS} ${GOBJECT_LIBRARY_DIRS} - ${CANBERRA-GTK_LIBRARY_DIRS}) -endif (WIN32) -# create config.h which defines where data are stored -configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h") - -add_executable (rth ${EXTRA_SRC} ${BASESOURCEFILES}) -add_dependencies (rth AboutFile) - -set_target_properties (rth PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS}" OUTPUT_NAME rawtherapee) -#target_link_libraries (rth rtengine ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${TIFF_LIBRARIES} ${EXTRA_LIB} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES} -# ${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${GTK_LIBRARIES} ${GTKMM_LIBRARIES} ${GIO_LIBRARIES} ${GIOMM_LIBRARIES} ${LCMS_LIBRARIES} ${IPTCDATA_LIBRARIES}) -target_link_libraries (rth rtengine ${JPEG_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${TIFF_LIBRARIES} ${GOBJECT_LIBRARIES} ${GTHREAD_LIBRARIES} - ${GLIB2_LIBRARIES} ${GLIBMM_LIBRARIES} ${GTK_LIBRARIES} ${GTKMM_LIBRARIES} ${GIO_LIBRARIES} ${GIOMM_LIBRARIES} ${LCMS_LIBRARIES} ${EXPAT_LIBRARIES} - ${FFTW3F_LIBRARIES} ${IPTCDATA_LIBRARIES} ${CANBERRA-GTK_LIBRARIES} ${EXTRA_LIB_RTGUI}) -install (TARGETS rth DESTINATION ${BINDIR}) - +# Common source files for both CLI and non-CLI execautables +set(CLISOURCEFILES + edit.cc + main-cli.cc + multilangmgr.cc + options.cc + paramsedited.cc + pathutils.cc + threadutils.cc + ) + +set(NONCLISOURCEFILES + adjuster.cc + batchqueue.cc + batchqueuebuttonset.cc + batchqueueentry.cc + batchqueuepanel.cc + batchtoolpanelcoord.cc + bayerpreprocess.cc + bayerprocess.cc + bayerrawexposure.cc + blackwhite.cc + bqentryupdater.cc + browserfilter.cc + cacheimagedata.cc + cachemanager.cc + cacorrection.cc + checkbox.cc + chmixer.cc + clipboard.cc + coarsepanel.cc + colorappearance.cc + coloredbar.cc + colortoning.cc + coordinateadjuster.cc + crop.cc + crophandler.cc + cropwindow.cc + cursormanager.cc + curveeditor.cc + curveeditorgroup.cc + darkframe.cc + defringe.cc + diagonalcurveeditorsubgroup.cc + dirbrowser.cc + dirpyrdenoise.cc + dirpyrequalizer.cc + distortion.cc + dynamicprofilepanel.cc + edit.cc + editorpanel.cc + editwindow.cc + epd.cc + exiffiltersettings.cc + exifpanel.cc + exportpanel.cc + extprog.cc + filebrowser.cc + filebrowserentry.cc + filecatalog.cc + filepanel.cc + filethumbnailbuttonset.cc + filmsimulation.cc + filterpanel.cc + flatcurveeditorsubgroup.cc + flatfield.cc + gradient.cc + guiutils.cc + histogrampanel.cc + history.cc + hsvequalizer.cc + icmpanel.cc + ilabel.cc + imagearea.cc + imageareapanel.cc + impulsedenoise.cc + indclippedpanel.cc + inspector.cc + iptcpanel.cc + labcurve.cc + lensgeom.cc + lensprofile.cc + lockablecolorpicker.cc + lwbutton.cc + lwbuttonset.cc + main.cc + multilangmgr.cc + mycurve.cc + mydiagonalcurve.cc + myflatcurve.cc + navigator.cc + options.cc + paramsedited.cc + partialpastedlg.cc + pathutils.cc + pcvignette.cc + perspective.cc + placesbrowser.cc + popupbutton.cc + popupcommon.cc + popuptogglebutton.cc + preferences.cc + preprocess.cc + previewhandler.cc + previewloader.cc + previewmodepanel.cc + previewwindow.cc + profilepanel.cc + profilestorecombobox.cc + prsharpening.cc + rawcacorrection.cc + rawexposure.cc + recentbrowser.cc + renamedlg.cc + resize.cc + retinex.cc + rgbcurves.cc + rotate.cc + rtimage.cc + rtwindow.cc + saveasdlg.cc + saveformatpanel.cc + sensorbayer.cc + sensorxtrans.cc + shadowshighlights.cc + sharpenedge.cc + sharpening.cc + sharpenmicro.cc + shcselector.cc + soundman.cc + splash.cc + spot.cc + threadutils.cc + thresholdadjuster.cc + thresholdselector.cc + thumbbrowserbase.cc + thumbbrowserentrybase.cc + thumbimageupdater.cc + thumbnail.cc + tonecurve.cc + toolbar.cc + toolpanel.cc + toolpanelcoord.cc + vibrance.cc + vignetting.cc + wavelet.cc + whitebalance.cc + xtransprocess.cc + xtransrawexposure.cc + zoompanel.cc + ) + +include_directories(BEFORE "${CMAKE_CURRENT_BINARY_DIR}") + +if(APPLE) + 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/... + set(EXTRA_LIB_RTGUI ${MacIntegration_LIBRARIES}) + set(EXTRA_INCDIR ${EXTRA_INCDIR} ${MacIntegration_INCLUDE_DIRS}) +endif() + +if(WIN32) + set(EXTRA_SRC_CLI myicon.rc) + set(EXTRA_SRC_NONCLI myicon.rc windirmonitor.cc) + set(EXTRA_LIB_RTGUI winmm) + include_directories(${EXTRA_INCDIR} + ${GIOMM_INCLUDE_DIRS} + ${GIO_INCLUDE_DIRS} + ${GLIB2_INCLUDE_DIRS} + ${GLIBMM_INCLUDE_DIRS} + ${GTKMM_INCLUDE_DIRS} + ${GTK_INCLUDE_DIRS} + ) + link_directories(. "${PROJECT_SOURCE_DIR}/rtexif" + ${EXTRA_LIBDIR} + ${GIOMM_LIBRARY_DIRS} + ${GIO_LIBRARY_DIRS} + ${GLIB2_LIBRARY_DIRS} + ${GLIBMM_LIBRARY_DIRS} + ${GTKMM_LIBRARY_DIRS} + ${GTK_LIBRARY_DIRS} + ) +else() + include_directories(${EXTRA_INCDIR} + ${CANBERRA-GTK_INCLUDE_DIRS} + ${EXPAT_INCLUDE_DIRS} + ${FFTW3F_LIBRARY_DIRS} + ${GIOMM_INCLUDE_DIRS} + ${GIO_INCLUDE_DIRS} + ${GLIB2_INCLUDE_DIRS} + ${GLIBMM_INCLUDE_DIRS} + ${GOBJECT_INCLUDE_DIRS} + ${GTHREAD_INCLUDE_DIRS} + ${GTKMM_INCLUDE_DIRS} + ${GTK_INCLUDE_DIRS} + ${IPTCDATA_INCLUDE_DIRS} + ${LCMS_INCLUDE_DIRS} + ) + link_directories(${EXTRA_LIBDIR} + ${CANBERRA-GTK_LIBRARY_DIRS} + ${EXPAT_LIBRARY_DIRS} + ${FFTW3F_LIBRARY_DIRS} + ${GIOMM_LIBRARY_DIRS} + ${GIO_LIBRARY_DIRS} + ${GLIB2_LIBRARY_DIRS} + ${GLIBMM_LIBRARY_DIRS} + ${GOBJECT_LIBRARY_DIRS} + ${GTHREAD_LIBRARY_DIRS} + ${GTKMM_LIBRARY_DIRS} + ${GTK_LIBRARY_DIRS} + ${IPTCDATA_LIBRARY_DIRS} + ${LCMS_LIBRARY_DIRS} + ) +endif() + +# Create config.h which defines where data are stored +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h") + +# Create new executables targets +add_executable(rth ${EXTRA_SRC_NONCLI} ${NONCLISOURCEFILES}) +add_executable(rth-cli ${EXTRA_SRC_CLI} ${CLISOURCEFILES}) + +# Add dependencies to executables targets +add_dependencies(rth UpdateInfo) +add_dependencies(rth-cli UpdateInfo) + +# Set executables targets properties, i.e. output filename and compile flags +# for "Debug" builds, open a console in all cases for Windows version +if((WIN32) AND NOT(UPPER_CMAKE_BUILD_TYPE STREQUAL "DEBUG")) + set_target_properties(rth PROPERTIES LINK_FLAGS "-mwindows") +endif() +set_target_properties(rth PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS}" OUTPUT_NAME rawtherapee) +set_target_properties(rth-cli PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -DRAWTHERAPEE_CLI" OUTPUT_NAME rawtherapee-cli) + +# Add linked libraries dependencies to executables targets +target_link_libraries(rth rtengine + ${CANBERRA-GTK_LIBRARIES} + ${EXPAT_LIBRARIES} + ${EXTRA_LIB_RTGUI} + ${FFTW3F_LIBRARIES} + ${GIOMM_LIBRARIES} + ${GIO_LIBRARIES} + ${GLIB2_LIBRARIES} + ${GLIBMM_LIBRARIES} + ${GOBJECT_LIBRARIES} + ${GTHREAD_LIBRARIES} + ${GTKMM_LIBRARIES} + ${GTK_LIBRARIES} + ${IPTCDATA_LIBRARIES} + ${JPEG_LIBRARIES} + ${LCMS_LIBRARIES} + ${PNG_LIBRARIES} + ${TIFF_LIBRARIES} + ${ZLIB_LIBRARIES} + ) + +target_link_libraries(rth-cli rtengine + ${CAIROMM_LIBRARIES} + ${EXPAT_LIBRARIES} + ${EXTRA_LIB_RTGUI} + ${FFTW3F_LIBRARIES} + ${GIOMM_LIBRARIES} + ${GIO_LIBRARIES} + ${GLIB2_LIBRARIES} + ${GLIBMM_LIBRARIES} + ${GOBJECT_LIBRARIES} + ${GTHREAD_LIBRARIES} + ${IPTCDATA_LIBRARIES} + ${JPEG_LIBRARIES} + ${LCMS_LIBRARIES} + ${PNG_LIBRARIES} + ${TIFF_LIBRARIES} + ${ZLIB_LIBRARIES} + ) + +# Install executables +install(TARGETS rth DESTINATION ${BINDIR}) +install(TARGETS rth-cli DESTINATION ${BINDIR}) diff --git a/rtgui/addsetids.h b/rtgui/addsetids.h index 580874e5a..898ef9528 100644 --- a/rtgui/addsetids.h +++ b/rtgui/addsetids.h @@ -115,6 +115,7 @@ enum { ADDSET_RETI_VART, ADDSET_RETI_GAM, ADDSET_RETI_SLO, + ADDSET_WB_TEMPBIAS, ADDSET_PARAM_NUM // THIS IS USED AS A DELIMITER!! }; diff --git a/rtgui/adjuster.cc b/rtgui/adjuster.cc index aba977d0d..a4f57499d 100644 --- a/rtgui/adjuster.cc +++ b/rtgui/adjuster.cc @@ -35,12 +35,26 @@ static double one2one(double val) Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep, double vdefault, Gtk::Image *imgIcon1, Gtk::Image *imgIcon2, double2double_fun slider2value_, double2double_fun value2slider_) { + set_hexpand(true); + set_vexpand(false); label = nullptr; adjusterListener = nullptr; afterReset = false; blocked = false; automatic = nullptr; eventPending = false; + grid = NULL; + imageIcon1 = imgIcon1; + + if (imageIcon1) { + setExpandAlignProperties(imageIcon1, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + } + + imageIcon2 = imgIcon2; + + if (imageIcon2) { + setExpandAlignProperties(imageIcon2, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + } slider2value = slider2value_ ? slider2value_ : one2one; value2slider = value2slider_ ? value2slider_ : one2one; @@ -51,78 +65,74 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep delay = options.adjusterMinDelay; - set_border_width (0); - set_spacing (0); - - hbox = Gtk::manage (new Gtk::HBox ()); - hbox->set_border_width(0); - hbox->set_spacing(2); + set_column_spacing(0); + set_column_homogeneous(false); + set_row_spacing(0); + set_row_homogeneous(false); editedCheckBox = nullptr; if (!vlabel.empty()) { adjustmentName = vlabel; - label = Gtk::manage (new Gtk::Label (adjustmentName, Gtk::ALIGN_LEFT)); + label = Gtk::manage (new Gtk::Label (adjustmentName)); + setExpandAlignProperties(label, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); } reset = Gtk::manage (new Gtk::Button ()); reset->add (*Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png"))); + setExpandAlignProperties(reset, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); reset->set_relief (Gtk::RELIEF_NONE); - reset->set_border_width (0); reset->set_tooltip_text (M("ADJUSTER_RESET_TO_DEFAULT")); + reset->get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); reset->set_can_focus(false); spin = Gtk::manage (new MySpinButton ()); - spin->set_has_frame(false); - spin->set_name("FramelessSpinButton"); + setExpandAlignProperties(spin, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + spin->set_input_purpose(Gtk::INPUT_PURPOSE_DIGITS); reset->set_size_request (-1, spin->get_height() > MIN_RESET_BUTTON_HEIGHT ? spin->get_height() : MIN_RESET_BUTTON_HEIGHT); slider = Gtk::manage (new MyHScale ()); + setExpandAlignProperties(slider, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); slider->set_draw_value (false); - - pack_start (*hbox, true, true); + //slider->set_has_origin(false); // ------------------ This will remove the colored part on the left of the slider's knob if (vlabel.empty()) { - // No label, everything goes in hbox - if (imgIcon1) { - hbox->pack_start (*imgIcon1, Gtk::PACK_SHRINK, 0); + // No label, everything goes in a single row + attach_next_to(*slider, Gtk::POS_LEFT, 1, 1); + + if (imageIcon1) { + attach_next_to(*imageIcon1, *slider, Gtk::POS_LEFT, 1, 1); } - hbox->pack_start (*slider, Gtk::PACK_EXPAND_WIDGET, 0); - - if (imgIcon2) { - hbox->pack_start (*imgIcon2, Gtk::PACK_SHRINK, 0); + if (imageIcon2) { + attach_next_to(*imageIcon2, *slider, Gtk::POS_RIGHT, 1, 1); + attach_next_to(*spin, *imageIcon2, Gtk::POS_RIGHT, 1, 1); + } else { + attach_next_to(*spin, *slider, Gtk::POS_RIGHT, 1, 1); } - hbox->pack_end (*reset, Gtk::PACK_SHRINK, 0); - hbox->pack_end (*spin, Gtk::PACK_SHRINK, 0); + attach_next_to(*reset, *spin, Gtk::POS_RIGHT, 1, 1); } else { // A label is provided, spreading the widgets in 2 rows - hbox->pack_start (*label); - hbox->pack_end (*reset, Gtk::PACK_SHRINK, 0); - hbox->pack_end (*spin, Gtk::PACK_SHRINK, 0); + attach_next_to(*label, Gtk::POS_LEFT, 1, 1); + attach_next_to(*spin, Gtk::POS_RIGHT, 1, 1); + // A second HBox is necessary + grid = Gtk::manage(new Gtk::Grid()); + grid->attach_next_to(*slider, Gtk::POS_LEFT, 1, 1); - if (!imgIcon1 || !imgIcon2) { - pack_start (*slider, true, true); - } else { - Gtk::HBox *hbox2 = nullptr; - - // A second HBox is necessary - hbox2 = Gtk::manage (new Gtk::HBox()); - - if (imgIcon1) { - hbox2->pack_start (*imgIcon1, Gtk::PACK_SHRINK, 0); - } - - hbox2->pack_start (*slider, true, true); - - if (imgIcon2) { - hbox2->pack_start (*imgIcon2, Gtk::PACK_SHRINK, 0); - } - - pack_start (*hbox2, true, true); + if (imageIcon1) { + grid->attach_next_to(*imageIcon1, *slider, Gtk::POS_LEFT, 1, 1); } + + if (imageIcon2) { + grid->attach_next_to(*imageIcon2, Gtk::POS_RIGHT, 1, 1); + grid->attach_next_to(*reset, *imageIcon2, Gtk::POS_RIGHT, 1, 1); + } else { + grid->attach_next_to(*reset, *slider, Gtk::POS_RIGHT, 1, 1); + } + + attach_next_to(*grid, *label, Gtk::POS_BOTTOM, 2, 1); } setLimits (vmin, vmax, vstep, vdefault); @@ -135,7 +145,6 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep sliderChange = slider->signal_value_changed().connect( sigc::mem_fun(*this, &Adjuster::sliderChanged) ); spinChange = spin->signal_value_changed().connect ( sigc::mem_fun(*this, &Adjuster::spinChanged), true); reset->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &Adjuster::resetPressed) ); - slider->set_update_policy (Gtk::UPDATE_CONTINUOUS); show_all (); } @@ -158,19 +167,24 @@ void Adjuster::addAutoButton (Glib::ustring tooltip) if (!automatic) { automatic = new Gtk::CheckButton (); //automatic->add (*Gtk::manage (new RTImage ("processing.png"))); - automatic->set_border_width (0); automatic->set_tooltip_markup(tooltip.length() ? Glib::ustring::compose("%1\n\n%2", M("GENERAL_AUTO"), tooltip) : M("GENERAL_AUTO")); + setExpandAlignProperties(automatic, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); autoChange = automatic->signal_toggled().connect( sigc::mem_fun(*this, &Adjuster::autoToggled) ); - hbox->pack_end (*automatic, Gtk::PACK_SHRINK, 0); - hbox->reorder_child (*automatic, 0); + if (grid) { + // Hombre, adding the checbox next to the reset button because adding it next to the spin button (as before) + // would diminish the available size for the label and would require a much heavier reorganization of the grid ! + grid->attach_next_to(*automatic, *reset, Gtk::POS_RIGHT, 1, 1); + } else { + attach_next_to(*automatic, *reset, Gtk::POS_RIGHT, 1, 1); + } } } void Adjuster::delAutoButton () { if (automatic) { - removeIfThere(hbox, automatic); + removeIfThere(grid, automatic); delete automatic; automatic = nullptr; } @@ -524,13 +538,30 @@ void Adjuster::showEditedCB () { if (label) { - removeIfThere(hbox, label, false); + removeIfThere(this, label, false); } if (!editedCheckBox) { editedCheckBox = Gtk::manage(new Gtk::CheckButton (adjustmentName)); - hbox->pack_start (*editedCheckBox, Gtk::PACK_SHRINK, 2); - hbox->reorder_child (*editedCheckBox, 0); + editedCheckBox->set_vexpand(false); + + if (grid) { + editedCheckBox->set_hexpand(true); + editedCheckBox->set_halign(Gtk::ALIGN_START); + editedCheckBox->set_valign(Gtk::ALIGN_CENTER); + attach_next_to(*editedCheckBox, *spin, Gtk::POS_LEFT, 1, 1); + } else { + editedCheckBox->set_hexpand(false); + editedCheckBox->set_halign(Gtk::ALIGN_START); + editedCheckBox->set_valign(Gtk::ALIGN_CENTER); + + if (imageIcon1) { + attach_next_to(*editedCheckBox, *imageIcon1, Gtk::POS_LEFT, 1, 1); + } else { + attach_next_to(*editedCheckBox, *slider, Gtk::POS_LEFT, 1, 1); + } + } + editedChange = editedCheckBox->signal_toggled().connect( sigc::mem_fun(*this, &Adjuster::editedToggled) ); editedCheckBox->show(); } @@ -539,7 +570,7 @@ void Adjuster::showEditedCB () void Adjuster::refreshLabelStyle () { - /* Glib::RefPtr style = label->get_style (); + /* Glib::RefPtr style = label->get_style_context (); Pango::FontDescription fd = style->get_font (); fd.set_weight (editedState==Edited ? Pango::WEIGHT_BOLD : Pango::WEIGHT_NORMAL); style->set_font (fd); @@ -557,38 +588,23 @@ void Adjuster::editedToggled () eventPending = false; } -double Adjuster::trimValue (double val) +void Adjuster::trimValue (double &val) { - if (val > vMax) { - val = vMax; // shapeValue(vMax) ? - } else if (val < vMin) { - val = vMin; // shapeValue(vMin) ? - } + val = rtengine::LIM(val, vMin, vMax); - return val; } -int Adjuster::trimValue (int val) +void Adjuster::trimValue (int &val) { - if (val > (int)vMax) { - val = (int)vMax; // shapeValue(vMax) ? - } else if (val < (int)vMin) { - val = (int)vMin; // shapeValue(vMin) ? - } + val = rtengine::LIM(val, static_cast(vMin), static_cast(vMax)); - return val; } -float Adjuster::trimValue (float val) +void Adjuster::trimValue (float &val) { - if (val > (float)vMax) { - val = (float)vMax; // shapeValue(vMax) ? - } else if (val < (float)vMin) { - val = (float)vMin; // shapeValue(vMin) ? - } + val = rtengine::LIM(val, static_cast(vMin), static_cast(vMax)); - return val; } diff --git a/rtgui/adjuster.h b/rtgui/adjuster.h index 782139f05..768406a33 100644 --- a/rtgui/adjuster.h +++ b/rtgui/adjuster.h @@ -35,13 +35,15 @@ public: typedef double(*double2double_fun)(double val); -class Adjuster : public Gtk::VBox +class Adjuster : public Gtk::Grid { protected: Glib::ustring adjustmentName; - Gtk::HBox* hbox; + Gtk::Grid* grid; Gtk::Label* label; + Gtk::Image *imageIcon1; + Gtk::Image *imageIcon2; MyHScale* slider; MySpinButton* spin; Gtk::Button* reset; @@ -54,13 +56,11 @@ protected: sigc::connection autoChange; sigc::connection buttonReleaseSlider; sigc::connection buttonReleaseSpin; - bool listenerReady; double defaultVal; // current default value (it can change when switching from ADD or SET mode) double ctorDefaultVal; // default value at construction time EditedState editedState; EditedState defEditedState; EditedState autoState; - EditedState defAutoState; int digits; Gtk::CheckButton* editedCheckBox; bool afterReset; @@ -144,6 +144,7 @@ public: void setNbDisplayedChars (int nbr) { spin->set_width_chars(nbr); + spin->set_max_width_chars(nbr); } void setEditedState (EditedState eState); EditedState getEditedState (); @@ -169,9 +170,9 @@ public: void resetValue (bool toInitial); void resetPressed (GdkEventButton* event); void editedToggled (); - double trimValue (double val); - float trimValue (float val); - int trimValue (int val); + void trimValue (double &val); + void trimValue (float &val); + void trimValue (int &val); }; #endif diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index b4a2ad37f..da042347d 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -19,10 +19,10 @@ #include #include #include +#include #include "../rtengine/rt_math.h" #include -#include #include #include #include @@ -35,6 +35,7 @@ #include "guiutils.h" #include "rtimage.h" #include + using namespace std; using namespace rtengine; @@ -52,31 +53,27 @@ BatchQueue::BatchQueue (FileCatalog* aFileCatalog) : processing(nullptr), fileCa pmenu.attach (*Gtk::manage(new Gtk::SeparatorMenuItem ()), 0, 1, p, p + 1); p++; - pmenu.attach (*Gtk::manage(head = new Gtk::ImageMenuItem (M("FILEBROWSER_POPUPMOVEHEAD"))), 0, 1, p, p + 1); + pmenu.attach (*Gtk::manage(head = new MyImageMenuItem (M("FILEBROWSER_POPUPMOVEHEAD"), "toleftend.png")), 0, 1, p, p + 1); p++; - head->set_image(*Gtk::manage(new RTImage ("toleftend.png"))); - pmenu.attach (*Gtk::manage(tail = new Gtk::ImageMenuItem (M("FILEBROWSER_POPUPMOVEEND"))), 0, 1, p, p + 1); + pmenu.attach (*Gtk::manage(tail = new MyImageMenuItem (M("FILEBROWSER_POPUPMOVEEND"), "torightend.png")), 0, 1, p, p + 1); p++; - tail->set_image(*Gtk::manage(new RTImage ("torightend.png"))); pmenu.attach (*Gtk::manage(new Gtk::SeparatorMenuItem ()), 0, 1, p, p + 1); p++; - pmenu.attach (*Gtk::manage(cancel = new Gtk::ImageMenuItem (M("FILEBROWSER_POPUPCANCELJOB"))), 0, 1, p, p + 1); - p++; - cancel->set_image(*Gtk::manage(new RTImage ("gtk-close.png"))); + pmenu.attach (*Gtk::manage(cancel = new MyImageMenuItem (M("FILEBROWSER_POPUPCANCELJOB"), "gtk-close.png")), 0, 1, p, p + 1); pmenu.show_all (); // Accelerators pmaccelgroup = Gtk::AccelGroup::create (); pmenu.set_accel_group (pmaccelgroup); - open->add_accelerator ("activate", pmaccelgroup, GDK_e, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); - selall->add_accelerator ("activate", pmaccelgroup, GDK_a, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); - head->add_accelerator ("activate", pmaccelgroup, GDK_Home, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); - tail->add_accelerator ("activate", pmaccelgroup, GDK_End, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); - cancel->add_accelerator ("activate", pmaccelgroup, GDK_Delete, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); + open->add_accelerator ("activate", pmaccelgroup, GDK_KEY_e, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); + selall->add_accelerator ("activate", pmaccelgroup, GDK_KEY_a, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); + head->add_accelerator ("activate", pmaccelgroup, GDK_KEY_Home, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); + tail->add_accelerator ("activate", pmaccelgroup, GDK_KEY_End, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); + cancel->add_accelerator ("activate", pmaccelgroup, GDK_KEY_Delete, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); open->signal_activate().connect(sigc::mem_fun(*this, &BatchQueue::openLastSelectedItemInEditor)); cancel->signal_activate().connect (std::bind (&BatchQueue::cancelItems, this, std::ref (selected))); @@ -89,6 +86,8 @@ BatchQueue::BatchQueue (FileCatalog* aFileCatalog) : processing(nullptr), fileCa BatchQueue::~BatchQueue () { + idle_register.destroy(); + MYWRITERLOCK(l, entryRW); // The listener merges parameters with old values, so delete afterwards @@ -147,19 +146,19 @@ bool BatchQueue::keyPressed (GdkEventKey* event) { bool ctrl = event->state & GDK_CONTROL_MASK; - if ((event->keyval == GDK_A || event->keyval == GDK_a) && ctrl) { + if ((event->keyval == GDK_KEY_A || event->keyval == GDK_KEY_a) && ctrl) { selectAll (); return true; - } else if ((event->keyval == GDK_E || event->keyval == GDK_e) && ctrl) { + } else if ((event->keyval == GDK_KEY_E || event->keyval == GDK_KEY_e) && ctrl) { openLastSelectedItemInEditor(); return true; - } else if (event->keyval == GDK_Home) { + } else if (event->keyval == GDK_KEY_Home) { headItems (selected); return true; - } else if (event->keyval == GDK_End) { + } else if (event->keyval == GDK_KEY_End) { tailItems (selected); return true; - } else if (event->keyval == GDK_Delete) { + } else if (event->keyval == GDK_KEY_Delete) { cancelItems (selected); return true; } @@ -229,7 +228,7 @@ bool BatchQueue::saveBatchQueue () // The column's header is mandatory (the first line will be skipped when loaded) file << "input image full path|param file full path|output image full path|file format|jpeg quality|jpeg subsampling|" - << "png bit depth|png compression|tiff bit depth|uncompressed tiff|save output params|force format options|" + << "png bit depth|png compression|tiff bit depth|uncompressed tiff|save output params|force format options|fast export|" << std::endl; // method is already running with entryLock, so no need to lock again @@ -239,11 +238,17 @@ bool BatchQueue::saveBatchQueue () const auto& saveFormat = entry->saveFormat; // Warning: for code's simplicity in loadBatchQueue, each field must end by the '|' character, safer than ';' or ',' since it can't be used in paths +#ifdef WIN32 + // on windows it crashes if we don't use c_str() and filename etc. contain special (e.g. chinese) characters, see issue 3387 + file << entry->filename.c_str() << '|' << entry->savedParamsFile.c_str() << '|' << entry->outFileName.c_str() << '|' << saveFormat.format << '|' +#else file << entry->filename << '|' << entry->savedParamsFile << '|' << entry->outFileName << '|' << saveFormat.format << '|' +#endif << saveFormat.jpegQuality << '|' << saveFormat.jpegSubSamp << '|' << saveFormat.pngBits << '|' << saveFormat.pngCompression << '|' << saveFormat.tiffBits << '|' << saveFormat.tiffUncompressed << '|' << saveFormat.saveParams << '|' << entry->forceFormatOpts << '|' + << entry->job->fastPipeline() << '|' << std::endl; } } @@ -310,6 +315,7 @@ bool BatchQueue::loadBatchQueue () const auto tiffUncompressed = nextIntOr (options.saveFormat.tiffUncompressed); const auto saveParams = nextIntOr (options.saveFormat.saveParams); const auto forceFormatOpts = nextIntOr (options.forceFormatOpts); + const auto fast = nextIntOr(false); rtengine::procparams::ProcParams pparams; @@ -321,7 +327,7 @@ bool BatchQueue::loadBatchQueue () if (!thumb) continue; - auto job = rtengine::ProcessingJob::create (source, thumb->getType () == FT_Raw, pparams); + auto job = rtengine::ProcessingJob::create (source, thumb->getType () == FT_Raw, pparams, fast); auto prevh = getMaxThumbnailHeight (); auto prevw = prevh; @@ -387,16 +393,6 @@ Glib::ustring BatchQueue::getTempFilenameForParams( const Glib::ustring &filenam return savedParamPath; } -int cancelItemUI (void* data) -{ - const auto bqe = static_cast(data); - - g_remove (bqe->savedParamsFile.c_str ()); - delete bqe; - - return 0; -} - void BatchQueue::cancelItems (const std::vector& items) { { @@ -421,7 +417,16 @@ void BatchQueue::cancelItems (const std::vector& items) if (entry->thumbnail) entry->thumbnail->imageRemovedFromQueue (); - g_idle_add (cancelItemUI, entry); + const auto func = [](gpointer data) -> gboolean { + const BatchQueueEntry* const bqe = static_cast(data); + + ::g_remove(bqe->savedParamsFile.c_str()); + delete bqe; + + return FALSE; + }; + + idle_register.add(func, entry); } for (const auto entry : fd) @@ -780,7 +785,7 @@ Glib::ustring BatchQueue::calcAutoFileNameBase (const Glib::ustring& origFileNam if (options.savePathTemplate[ix] == 'p') { ix++; - int i = options.savePathTemplate[ix] - '0'; + unsigned int i = options.savePathTemplate[ix] - '0'; if (i < pa.size()) { path = path + pa[pa.size() - i - 1] + '/'; @@ -789,7 +794,7 @@ Glib::ustring BatchQueue::calcAutoFileNameBase (const Glib::ustring& origFileNam ix++; } else if (options.savePathTemplate[ix] == 'd') { ix++; - int i = options.savePathTemplate[ix] - '0'; + unsigned i = options.savePathTemplate[ix] - '0'; if (i < da.size()) { path = path + da[da.size() - i - 1]; @@ -881,12 +886,6 @@ Glib::ustring BatchQueue::autoCompleteFileName (const Glib::ustring& fileName, c return ""; } -int setProgressUI (void* p) -{ - (static_cast(p))->redraw(); - return 0; -} - void BatchQueue::setProgress (double p) { @@ -895,7 +894,12 @@ void BatchQueue::setProgress (double p) } // No need to acquire the GUI, setProgressUI will do it - g_idle_add (setProgressUI, this); + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->redraw(); + return FALSE; + }; + + idle_register.add(func, this); } void BatchQueue::buttonPressed (LWButton* button, int actionCode, void* actionData) @@ -923,7 +927,6 @@ struct NLParams { int bqnotifylistenerUI (void* data) { - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected NLParams* params = static_cast(data); params->listener->queueSizeChanged (params->qsize, params->queueEmptied, params->queueError, params->queueErrorMessage); delete params; @@ -942,7 +945,7 @@ void BatchQueue::notifyListener (bool queueEmptied) } params->queueEmptied = queueEmptied; params->queueError = false; - g_idle_add (bqnotifylistenerUI, params); + idle_register.add(bqnotifylistenerUI, params); } } @@ -972,6 +975,6 @@ void BatchQueue::error (Glib::ustring msg) params->queueEmptied = false; params->queueError = true; params->queueErrorMessage = msg; - g_idle_add (bqnotifylistenerUI, params); + idle_register.add(bqnotifylistenerUI, params); } } diff --git a/rtgui/batchqueue.h b/rtgui/batchqueue.h index fad2b6a25..68373838e 100644 --- a/rtgui/batchqueue.h +++ b/rtgui/batchqueue.h @@ -36,37 +36,12 @@ public: }; class FileCatalog; -class BatchQueue : public ThumbBrowserBase, + +class BatchQueue final : + public ThumbBrowserBase, public rtengine::BatchProcessingListener, public LWButtonListener { - -protected: - int getMaxThumbnailHeight() const; - void saveThumbnailHeight (int height); - int getThumbnailHeight (); - - BatchQueueEntry* processing; // holds the currently processed image - FileCatalog* fileCatalog; - int sequence; // holds the current sequence index - - Glib::ustring nameTemplate; - - Gtk::ImageMenuItem* cancel; - Gtk::ImageMenuItem* head; - Gtk::ImageMenuItem* tail; - Gtk::MenuItem* selall; - Gtk::MenuItem* open; - Glib::RefPtr pmaccelgroup; - Gtk::Menu pmenu; - - BatchQueueListener* listener; - - Glib::ustring autoCompleteFileName (const Glib::ustring& fileName, const Glib::ustring& format); - Glib::ustring getTempFilenameForParams( const Glib::ustring &filename ); - bool saveBatchQueue (); - void notifyListener (bool queueEmptied); - public: explicit BatchQueue (FileCatalog* aFileCatalog); ~BatchQueue (); @@ -106,6 +81,34 @@ public: static Glib::ustring calcAutoFileNameBase (const Glib::ustring& origFileName, int sequence = 0); static int calcMaxThumbnailHeight(); + +protected: + int getMaxThumbnailHeight() const; + void saveThumbnailHeight (int height); + int getThumbnailHeight (); + + Glib::ustring autoCompleteFileName (const Glib::ustring& fileName, const Glib::ustring& format); + Glib::ustring getTempFilenameForParams( const Glib::ustring &filename ); + bool saveBatchQueue (); + void notifyListener (bool queueEmptied); + + BatchQueueEntry* processing; // holds the currently processed image + FileCatalog* fileCatalog; + int sequence; // holds the current sequence index + + Glib::ustring nameTemplate; + + MyImageMenuItem* cancel; + MyImageMenuItem* head; + MyImageMenuItem* tail; + Gtk::MenuItem* selall; + Gtk::MenuItem* open; + Glib::RefPtr pmaccelgroup; + Gtk::Menu pmenu; + + BatchQueueListener* listener; + + IdleRegister idle_register; }; #endif diff --git a/rtgui/batchqueuebuttonset.cc b/rtgui/batchqueuebuttonset.cc index 1f8bc7ac8..fefcdf3c9 100644 --- a/rtgui/batchqueuebuttonset.cc +++ b/rtgui/batchqueuebuttonset.cc @@ -21,8 +21,6 @@ #include "multilangmgr.h" #include "rtimage.h" -extern Glib::ustring argv0; - bool BatchQueueButtonSet::iconsLoaded = false; Cairo::RefPtr BatchQueueButtonSet::cancelIcon; diff --git a/rtgui/batchqueueentry.cc b/rtgui/batchqueueentry.cc index f8f9e4627..8386a8ee6 100644 --- a/rtgui/batchqueueentry.cc +++ b/rtgui/batchqueueentry.cc @@ -32,7 +32,7 @@ Glib::RefPtr BatchQueueEntry::savedAsIcon; BatchQueueEntry::BatchQueueEntry (rtengine::ProcessingJob* pjob, const rtengine::procparams::ProcParams& pparams, Glib::ustring fname, int prevw, int prevh, Thumbnail* thm) : ThumbBrowserEntryBase(fname), opreview(nullptr), origpw(prevw), origph(prevh), opreviewDone(false), - job(pjob), progress(0), outFileName(""), sequence(0), forceFormatOpts(false), params(pparams) + job(pjob), params(pparams), progress(0), outFileName(""), sequence(0), forceFormatOpts(false) { thumbnail = thm; @@ -98,7 +98,7 @@ void BatchQueueEntry::calcThumbnailSize () } -void BatchQueueEntry::drawProgressBar (Glib::RefPtr win, Glib::RefPtr gc, const Gdk::Color& foregr, const Gdk::Color& backgr, int x, int w, int y, int h) +void BatchQueueEntry::drawProgressBar (Glib::RefPtr win, const Gdk::RGBA& foregr, const Gdk::RGBA& backgr, int x, int w, int y, int h) { if (processing) { @@ -112,19 +112,19 @@ void BatchQueueEntry::drawProgressBar (Glib::RefPtr win, Glib::RefP cr->line_to (px + pw, py); cr->set_line_width (ph); cr->set_line_cap (Cairo::LINE_CAP_ROUND); - cr->set_source_rgb (foregr.get_red_p(), foregr.get_green_p(), foregr.get_blue_p()); + cr->set_source_rgb (foregr.get_red(), foregr.get_green(), foregr.get_blue()); cr->stroke (); cr->move_to (px, py); cr->line_to (px + pw, py); cr->set_line_width (ph * 3.0 / 4.0); - cr->set_source_rgb (backgr.get_red_p(), backgr.get_green_p(), backgr.get_blue_p()); + cr->set_source_rgb (backgr.get_red(), backgr.get_green(), backgr.get_blue()); cr->stroke (); cr->move_to (px, py); cr->line_to (px + pw * progress, py); cr->set_line_width (ph / 2.0); - cr->set_source_rgb (foregr.get_red_p(), foregr.get_green_p(), foregr.get_blue_p()); + cr->set_source_rgb (foregr.get_red(), foregr.get_green(), foregr.get_blue()); cr->stroke (); } } diff --git a/rtgui/batchqueueentry.h b/rtgui/batchqueueentry.h index c2651a3ca..384e12e80 100644 --- a/rtgui/batchqueueentry.h +++ b/rtgui/batchqueueentry.h @@ -60,7 +60,7 @@ public: void refreshThumbnailImage (); void calcThumbnailSize (); - void drawProgressBar (Glib::RefPtr win, Glib::RefPtr gc, const Gdk::Color& foregr, const Gdk::Color& backgr, int x, int w, int y, int h); + void drawProgressBar (Glib::RefPtr win, const Gdk::RGBA& foregr, const Gdk::RGBA& backgr, int x, int w, int y, int h); void removeButtonSet (); diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc index 15f0b88ad..fcccdf08a 100644 --- a/rtgui/batchqueuepanel.cc +++ b/rtgui/batchqueuepanel.cc @@ -24,14 +24,6 @@ #include "soundman.h" #include "rtimage.h" -int processLoadedBatchQueueUIThread (void* data) -{ - - BatchQueue* bq = static_cast(data); - bq->resizeLoadedQueue(); - return 0; -} - static Glib::ustring makeFolderLabel(Glib::ustring path) { if (!Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) { @@ -49,15 +41,17 @@ static Glib::ustring makeFolderLabel(Glib::ustring path) return path; } -BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) +BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) : parent(nullptr) { batchQueue = Gtk::manage( new BatchQueue(aFileCatalog) ); // construct batch queue panel with the extra "start" and "stop" button Gtk::VBox* batchQueueButtonBox = Gtk::manage (new Gtk::VBox); - start = Gtk::manage (new Gtk::ToggleButton (M("FILEBROWSER_STARTPROCESSING"))); - stop = Gtk::manage (new Gtk::ToggleButton (M("FILEBROWSER_STOPPROCESSING"))); + batchQueueButtonBox->set_name("BatchQueueButtons"); + + start = Gtk::manage (new Gtk::ToggleButton ()); + stop = Gtk::manage (new Gtk::ToggleButton ()); autoStart = Gtk::manage (new Gtk::CheckButton (M("BATCHQUEUE_AUTOSTART"))); start->set_tooltip_markup (M("FILEBROWSER_STARTPROCESSINGHINT")); stop->set_tooltip_markup (M("FILEBROWSER_STOPPROCESSINGHINT")); @@ -67,8 +61,10 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) autoStart->set_active (options.procQueueEnabled); start->set_image (*Gtk::manage (new RTImage ("gtk-media-play.png"))); + start->get_style_context()->add_class("BIG"); startConnection = start->signal_toggled().connect (sigc::mem_fun(*this, &BatchQueuePanel::startBatchProc)); stop->set_image (*Gtk::manage (new RTImage ("gtk-media-stop.png"))); + stop->get_style_context()->add_class("BIG"); stopConnection = stop->signal_toggled().connect (sigc::mem_fun(*this, &BatchQueuePanel::stopBatchProc)); batchQueueButtonBox->pack_start (*start, Gtk::PACK_SHRINK, 4); batchQueueButtonBox->pack_start (*stop, Gtk::PACK_SHRINK, 4); @@ -77,7 +73,6 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) // Output directory selection fdir = Gtk::manage (new Gtk::Frame (M("PREFERENCES_OUTDIR"))); Gtk::VBox* odvb = Gtk::manage (new Gtk::VBox ()); - odvb->set_border_width (4); Gtk::HBox* hb2 = Gtk::manage (new Gtk::HBox ()); useTemplate = Gtk::manage (new Gtk::RadioButton (M("PREFERENCES_OUTDIRTEMPLATE") + ":")); hb2->pack_start (*useTemplate, Gtk::PACK_SHRINK, 4); @@ -90,7 +85,7 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) useFolder = Gtk::manage (new Gtk::RadioButton (M("PREFERENCES_OUTDIRFOLDER") + ":")); hb3->pack_start (*useFolder, Gtk::PACK_SHRINK, 4); -#if defined(__APPLE__) || defined(__linux__) +#if 0 //defined(__APPLE__) || defined(__linux__) // At the time of writing (2013-11-11) the gtkmm FileChooserButton with ACTION_SELECT_FOLDER // is so buggy on these platforms (OS X and Linux) that we rather employ this ugly button hack. // When/if GTKMM gets fixed we can go back to use the FileChooserButton, like we do on Windows. @@ -100,18 +95,20 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) outdirFolderButton->signal_pressed().connect( sigc::mem_fun(*this, &BatchQueuePanel::pathFolderButtonPressed) ); outdirFolderButton->set_tooltip_markup (M("PREFERENCES_OUTDIRFOLDERHINT")); outdirFolderButton->set_label(makeFolderLabel(options.savePathFolder)); - Gtk::Image* folderImg = Gtk::manage (new Gtk::Image (Gtk::Stock::DIRECTORY, Gtk::ICON_SIZE_MENU)); + Gtk::Image* folderImg = Gtk::manage (new RTImage ("gtk-directory.png")); folderImg->show (); outdirFolderButton->set_image (*folderImg); outdirFolder = nullptr; #else outdirFolder = Gtk::manage (new MyFileChooserButton (M("PREFERENCES_OUTDIRFOLDER"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); hb3->pack_start (*outdirFolder); - outdirFolder->signal_current_folder_changed().connect (sigc::mem_fun(*this, &BatchQueuePanel::pathFolderChanged)); + outdirFolder->signal_selection_changed().connect (sigc::mem_fun(*this, &BatchQueuePanel::pathFolderChanged)); outdirFolder->set_tooltip_markup (M("PREFERENCES_OUTDIRFOLDERHINT")); if (Glib::file_test (options.savePathFolder, Glib::FILE_TEST_IS_DIR)) { outdirFolder->set_current_folder (options.savePathFolder); + } else { + outdirFolder->set_current_folder (Glib::get_home_dir()); } outdirFolderButton = 0; @@ -126,9 +123,9 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) // Output file format selection fformat = Gtk::manage (new Gtk::Frame (M("PREFERENCES_FILEFORMAT"))); saveFormatPanel = Gtk::manage (new SaveFormatPanel ()); + setExpandAlignProperties(saveFormatPanel, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); fformat->add (*saveFormatPanel); - saveFormatPanel->init (options.saveFormatBatch); outdirTemplate->set_text (options.savePathTemplate); useTemplate->set_active (options.saveUsePathTemplate); useFolder->set_active (!options.saveUsePathTemplate); @@ -142,10 +139,11 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) // setup button bar topBox = Gtk::manage (new Gtk::HBox ()); pack_start (*topBox, Gtk::PACK_SHRINK); + topBox->set_name("BatchQueueButtonsMainContainer"); topBox->pack_start (*batchQueueButtonBox, Gtk::PACK_SHRINK, 4); - topBox->pack_start (*fdir); - topBox->pack_start (*fformat, Gtk::PACK_SHRINK, 4); + topBox->pack_start (*fdir, Gtk::PACK_EXPAND_WIDGET, 4); + topBox->pack_start (*fformat, Gtk::PACK_EXPAND_WIDGET, 4); // add middle browser area pack_start (*batchQueue); @@ -179,11 +177,29 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) show_all (); - if (batchQueue->loadBatchQueue ()) { - g_idle_add_full (G_PRIORITY_LOW, processLoadedBatchQueueUIThread, batchQueue, nullptr); + if (batchQueue->loadBatchQueue()) { + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->resizeLoadedQueue(); + + return FALSE; + }; + + idle_register.add(func, batchQueue, G_PRIORITY_LOW); } } +BatchQueuePanel::~BatchQueuePanel() +{ + idle_register.destroy(); +} + +void BatchQueuePanel::init (RTWindow *parent) +{ + this->parent = parent; + + saveFormatPanel->init (options.saveFormatBatch); +} + // it is expected to have a non null forceOrientation value on Preferences update only. In this case, qsize is ingored and computed automatically void BatchQueuePanel::updateTab (int qsize, int forceOrientation) { @@ -193,45 +209,47 @@ void BatchQueuePanel::updateTab (int qsize, int forceOrientation) qsize = batchQueue->getEntries().size(); } + Gtk::Grid* grid = Gtk::manage (new Gtk::Grid ()); if ((forceOrientation == 0 && options.mainNBVertical) || (forceOrientation == 2)) { - Gtk::VBox* vbb = Gtk::manage (new Gtk::VBox ()); Gtk::Label* l; if(!qsize ) { - vbb->pack_start (*Gtk::manage (new RTImage ("processing.png"))); + grid->attach_next_to(*Gtk::manage (new RTImage ("processing.png")), Gtk::POS_TOP, 1, 1); l = Gtk::manage (new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_BATCHQUEUE")) ); } else if( start->get_active () ) { - vbb->pack_start (*Gtk::manage (new RTImage ("processing-play.png"))); + grid->attach_next_to(*Gtk::manage (new RTImage ("processing-play.png")), Gtk::POS_TOP, 1, 1); l = Gtk::manage (new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_BATCHQUEUE") + " [" + Glib::ustring::format( qsize ) + "]")); } else { - vbb->pack_start (*Gtk::manage (new RTImage ("processing-pause.png"))); + grid->attach_next_to(*Gtk::manage (new RTImage ("processing-pause.png")), Gtk::POS_TOP, 1, 1); l = Gtk::manage (new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_BATCHQUEUE") + " [" + Glib::ustring::format( qsize ) + "]" )); } l->set_angle (90); - vbb->pack_start (*l); - vbb->set_spacing (2); - vbb->set_tooltip_markup (M("MAIN_FRAME_BATCHQUEUE_TOOLTIP")); - vbb->show_all (); - nb->set_tab_label(*this, *vbb); - } else { - Gtk::HBox* hbb = Gtk::manage (new Gtk::HBox ()); + grid->attach_next_to(*l, Gtk::POS_TOP, 1, 1); + grid->set_tooltip_markup (M("MAIN_FRAME_BATCHQUEUE_TOOLTIP")); + grid->show_all (); + if (nb) { + nb->set_tab_label(*this, *grid); + } + } else { if (!qsize ) { - hbb->pack_start (*Gtk::manage (new RTImage ("processing.png"))); - hbb->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE") ))); + grid->attach_next_to(*Gtk::manage (new RTImage ("processing.png")), Gtk::POS_RIGHT, 1, 1); + grid->attach_next_to(*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE") )), Gtk::POS_RIGHT, 1, 1); } else if ( start->get_active () ) { - hbb->pack_start (*Gtk::manage (new RTImage ("processing-play.png"))); - hbb->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE") + " [" + Glib::ustring::format( qsize ) + "]" ))); + grid->attach_next_to(*Gtk::manage (new RTImage ("processing-play.png")), Gtk::POS_RIGHT, 1, 1); + grid->attach_next_to(*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE") + " [" + Glib::ustring::format( qsize ) + "]" )), Gtk::POS_RIGHT, 1, 1); } else { - hbb->pack_start (*Gtk::manage (new RTImage ("processing-pause.png"))); - hbb->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE") + " [" + Glib::ustring::format( qsize ) + "]" ))); + grid->attach_next_to(*Gtk::manage (new RTImage ("processing-pause.png")), Gtk::POS_RIGHT, 1, 1); + grid->attach_next_to(*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE") + " [" + Glib::ustring::format( qsize ) + "]" )), Gtk::POS_RIGHT, 1, 1); } - hbb->set_spacing (2); - hbb->set_tooltip_markup (M("MAIN_FRAME_BATCHQUEUE_TOOLTIP")); - hbb->show_all (); - nb->set_tab_label(*this, *hbb); + grid->set_tooltip_markup (M("MAIN_FRAME_BATCHQUEUE_TOOLTIP")); + grid->show_all (); + + if (nb) { + nb->set_tab_label(*this, *grid); + } } } @@ -321,8 +339,8 @@ void BatchQueuePanel::pathFolderButtonPressed () { Gtk::FileChooserDialog fc (getToplevelWindow (this), M("PREFERENCES_OUTDIRFOLDER"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER ); - fc.add_button( Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL); - fc.add_button( Gtk::StockID("gtk-ok"), Gtk::RESPONSE_OK); + fc.add_button( "_Cancel", Gtk::RESPONSE_CANCEL); // STOCKICON WAS THERE + fc.add_button( "_OK", Gtk::RESPONSE_OK); // STOCKICON WAS THERE fc.set_filename(options.savePathFolder); fc.set_transient_for(*parent); int result = fc.run(); @@ -356,7 +374,7 @@ bool BatchQueuePanel::handleShortcutKey (GdkEventKey* event) if (ctrl) { switch(event->keyval) { - case GDK_s: + case GDK_KEY_s: if (start->get_active()) { stopBatchProc(); } else { diff --git a/rtgui/batchqueuepanel.h b/rtgui/batchqueuepanel.h index 675745b8a..a4d6ed244 100644 --- a/rtgui/batchqueuepanel.h +++ b/rtgui/batchqueuepanel.h @@ -53,14 +53,13 @@ class BatchQueuePanel : public Gtk::VBox, Gtk::HBox* bottomBox; Gtk::HBox* topBox; + IdleRegister idle_register; + public: - explicit BatchQueuePanel (FileCatalog* aFileCatalog); + ~BatchQueuePanel(); - void setParent (RTWindow* p) - { - parent = p; - } + void init (RTWindow* parent); void addBatchQueueJobs (std::vector &entries , bool head = false); diff --git a/rtgui/batchtoolpanelcoord.cc b/rtgui/batchtoolpanelcoord.cc index 2caa61187..e85ee8523 100644 --- a/rtgui/batchtoolpanelcoord.cc +++ b/rtgui/batchtoolpanelcoord.cc @@ -152,7 +152,7 @@ void BatchToolPanelCoordinator::initSession () toneCurve->setAdjusterBehavior (false, false, false, false, false, false, false, false); lcurve->setAdjusterBehavior (false, false, false); - whitebalance->setAdjusterBehavior (false, false, false); + whitebalance->setAdjusterBehavior (false, false, false, false); vibrance->setAdjusterBehavior (false, false); vignetting->setAdjusterBehavior (false, false, false, false); colorappearance->setAdjusterBehavior (false, false, false, false, false, false, false, false, false, false, false, false, false); @@ -171,7 +171,7 @@ void BatchToolPanelCoordinator::initSession () blackwhite->setAdjusterBehavior (false, false); colortoning->setAdjusterBehavior (false, false, false, false, false); filmSimulation->setAdjusterBehavior(false); - retinex->setAdjusterBehavior (false, false, false, false, false, false, false, false); + retinex->setAdjusterBehavior (false, false, false, false, false, false, false); shadowshighlights->setAdjusterBehavior (false, false, false); dirpyrequalizer->setAdjusterBehavior (false, false, false); @@ -191,7 +191,7 @@ void BatchToolPanelCoordinator::initSession () toneCurve->setAdjusterBehavior (options.baBehav[ADDSET_TC_EXPCOMP], options.baBehav[ADDSET_TC_HLCOMPAMOUNT], options.baBehav[ADDSET_TC_HLCOMPTHRESH], options.baBehav[ADDSET_TC_BRIGHTNESS], options.baBehav[ADDSET_TC_BLACKLEVEL], options.baBehav[ADDSET_TC_SHCOMP], options.baBehav[ADDSET_TC_CONTRAST], options.baBehav[ADDSET_TC_SATURATION]); lcurve->setAdjusterBehavior (options.baBehav[ADDSET_LC_BRIGHTNESS], options.baBehav[ADDSET_LC_CONTRAST], options.baBehav[ADDSET_LC_CHROMATICITY]); - whitebalance->setAdjusterBehavior (options.baBehav[ADDSET_WB_TEMPERATURE], options.baBehav[ADDSET_WB_GREEN], options.baBehav[ADDSET_WB_EQUAL]); + whitebalance->setAdjusterBehavior (options.baBehav[ADDSET_WB_TEMPERATURE], options.baBehav[ADDSET_WB_GREEN], options.baBehav[ADDSET_WB_EQUAL], options.baBehav[ADDSET_WB_TEMPBIAS]); vibrance->setAdjusterBehavior (options.baBehav[ADDSET_VIBRANCE_PASTELS], options.baBehav[ADDSET_VIBRANCE_SATURATED]); vignetting->setAdjusterBehavior (options.baBehav[ADDSET_VIGN_AMOUNT], options.baBehav[ADDSET_VIGN_RADIUS], options.baBehav[ADDSET_VIGN_STRENGTH], options.baBehav[ADDSET_VIGN_CENTER]); colorappearance->setAdjusterBehavior (options.baBehav[ADDSET_CAT_DEGREE], options.baBehav[ADDSET_CAT_ADAPTSCENE], options.baBehav[ADDSET_CAT_ADAPTVIEWING], options.baBehav[ADDSET_CAT_BADPIX], options.baBehav[ADDSET_CAT_LIGHT], options.baBehav[ADDSET_CAT_CHROMA], options.baBehav[ADDSET_CAT_CONTRAST], options.baBehav[ADDSET_CAT_RSTPRO], options.baBehav[ADDSET_CAT_BRIGHT], options.baBehav[ADDSET_CAT_CONTRAST_Q], options.baBehav[ADDSET_CAT_CHROMA_S], options.baBehav[ADDSET_CAT_CHROMA_M], options.baBehav[ADDSET_CAT_HUE]); @@ -208,7 +208,7 @@ void BatchToolPanelCoordinator::initSession () // colortoning->setAdjusterBehavior (options.baBehav[ADDSET_COLORTONING_SPLIT], options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD], options.baBehav[ADDSET_COLORTONING_SATOPACITY], options.baBehav[ADDSET_COLORTONING_STRPROTECT], options.baBehav[ADDSET_COLORTONING_BALANCE]); colortoning->setAdjusterBehavior (options.baBehav[ADDSET_COLORTONING_SPLIT], options.baBehav[ADDSET_COLORTONING_SATTHRESHOLD], options.baBehav[ADDSET_COLORTONING_SATOPACITY], options.baBehav[ADDSET_COLORTONING_STRENGTH], options.baBehav[ADDSET_COLORTONING_BALANCE]); filmSimulation->setAdjusterBehavior(options.baBehav[ADDSET_FILMSIMULATION_STRENGTH]); - retinex->setAdjusterBehavior (options.baBehav[ADDSET_RETI_STR], options.baBehav[ADDSET_RETI_NEIGH], options.baBehav[ADDSET_RETI_LIMD], options.baBehav[ADDSET_RETI_GAIN], options.baBehav[ADDSET_RETI_OFFS], options.baBehav[ADDSET_RETI_VART], options.baBehav[ADDSET_RETI_GAM], options.baBehav[ADDSET_RETI_SLO]); + retinex->setAdjusterBehavior (options.baBehav[ADDSET_RETI_STR], options.baBehav[ADDSET_RETI_NEIGH], options.baBehav[ADDSET_RETI_LIMD], options.baBehav[ADDSET_RETI_OFFS], options.baBehav[ADDSET_RETI_VART], options.baBehav[ADDSET_RETI_GAM], options.baBehav[ADDSET_RETI_SLO]); chmixer->setAdjusterBehavior (options.baBehav[ADDSET_CHMIXER] ); blackwhite->setAdjusterBehavior (options.baBehav[ADDSET_BLACKWHITE_HUES], options.baBehav[ADDSET_BLACKWHITE_GAMMA]); @@ -325,6 +325,10 @@ void BatchToolPanelCoordinator::initSession () pparams.wb.equal = 0; } + if (options.baBehav[ADDSET_WB_TEMPBIAS]) { + pparams.wb.tempBias = 0; + } + if (options.baBehav[ADDSET_VIBRANCE_PASTELS]) { pparams.vibrance.pastels = 0; } @@ -598,10 +602,6 @@ void BatchToolPanelCoordinator::initSession () pparams.retinex.limd = 0; } - if (options.baBehav[ADDSET_RETI_GAIN]) { - pparams.retinex.gain = 0; - } - if (options.baBehav[ADDSET_RETI_OFFS]) { pparams.retinex.offs = 0; } @@ -856,11 +856,11 @@ void BatchToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const G } } -void BatchToolPanelCoordinator::getAutoWB (double& temp, double& green, double equal) +void BatchToolPanelCoordinator::getAutoWB (double& temp, double& green, double equal, double tempBias) { if (!selected.empty()) { - selected[0]->getAutoWB (temp, green, equal); + selected[0]->getAutoWB (temp, green, equal, tempBias); } } diff --git a/rtgui/batchtoolpanelcoord.h b/rtgui/batchtoolpanelcoord.h index c96a1a329..4efcea6fa 100644 --- a/rtgui/batchtoolpanelcoord.h +++ b/rtgui/batchtoolpanelcoord.h @@ -60,7 +60,7 @@ public: void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr); // wbprovider interface - void getAutoWB (double& temp, double& green, double equal); + void getAutoWB (double& temp, double& green, double equal, double tempBias); void getCamWB (double& temp, double& green); // thumbnaillistener interface diff --git a/rtgui/bayerprocess.cc b/rtgui/bayerprocess.cc index 14c542172..d5a728a97 100644 --- a/rtgui/bayerprocess.cc +++ b/rtgui/bayerprocess.cc @@ -22,6 +22,7 @@ using namespace rtengine; using namespace rtengine::procparams; + BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RAW_LABEL"), true) { Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ()); @@ -29,7 +30,7 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA method = Gtk::manage (new MyComboBoxText ()); for( size_t i = 0; i < procparams::RAWParams::BayerSensor::numMethods; i++) { - method->append_text(procparams::RAWParams::BayerSensor::methodstring[i]); + method->append(M("TP_RAW_" + Glib::ustring(procparams::RAWParams::BayerSensor::methodstring[i]).uppercase())); } method->set_active(0); @@ -38,8 +39,31 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA hb1->pack_end (*method, Gtk::PACK_EXPAND_WIDGET, 4); pack_start( *hb1, Gtk::PACK_SHRINK, 4); + imageNumberBox = Gtk::manage (new Gtk::HBox ()); + imageNumberBox->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_IMAGENUM") + ": ")), Gtk::PACK_SHRINK, 4); + imageNumber = Gtk::manage (new MyComboBoxText ()); + imageNumber->append("1"); + imageNumber->append("2"); + imageNumber->append("3"); + imageNumber->append("4"); + imageNumber->set_active(0); + imageNumberBox->set_tooltip_text(M("TP_RAW_IMAGENUM_TOOLTIP")); + imageNumberBox->pack_end (*imageNumber, Gtk::PACK_EXPAND_WIDGET, 4); + pack_start( *imageNumberBox, Gtk::PACK_SHRINK, 4); + + pack_start( *Gtk::manage( new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0 ); + ccSteps = Gtk::manage (new Adjuster (M("TP_RAW_FALSECOLOR"), 0, 5, 1, 0 )); + ccSteps->setAdjusterListener (this); + + if (ccSteps->delay < options.adjusterMaxDelay) { + ccSteps->delay = options.adjusterMaxDelay; + } + + ccSteps->show(); + pack_start( *ccSteps, Gtk::PACK_SHRINK, 4); + + dcbOptions = Gtk::manage (new Gtk::VBox ()); - dcbOptions->set_border_width(4); dcbIterations = Gtk::manage (new Adjuster (M("TP_RAW_DCBITERATIONS"), 0, 5, 1, 2)); dcbIterations->setAdjusterListener (this); @@ -49,13 +73,13 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA } dcbIterations->show(); - dcbEnhance = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_DCBENHANCE"))); + dcbEnhance = Gtk::manage (new CheckBox(M("TP_RAW_DCBENHANCE"), multiImage)); + dcbEnhance->setCheckBoxListener (this); dcbOptions->pack_start(*dcbIterations); dcbOptions->pack_start(*dcbEnhance); pack_start( *dcbOptions, Gtk::PACK_SHRINK, 4); lmmseOptions = Gtk::manage (new Gtk::VBox ()); - lmmseOptions->set_border_width(4); lmmseIterations = Gtk::manage (new Adjuster (M("TP_RAW_LMMSEITERATIONS"), 0, 6, 1, 2)); lmmseIterations->setAdjusterListener (this); @@ -69,93 +93,421 @@ BayerProcess::BayerProcess () : FoldableToolPanel(this, "bayerprocess", M("TP_RA lmmseOptions->pack_start(*lmmseIterations); pack_start( *lmmseOptions, Gtk::PACK_SHRINK, 4); - pack_start( *Gtk::manage( new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0 ); - ccSteps = Gtk::manage (new Adjuster (M("TP_RAW_FALSECOLOR"), 0, 5, 1, 0 )); - ccSteps->setAdjusterListener (this); + pixelShiftFrame = Gtk::manage (new Gtk::VBox ()); + pixelShiftFrame->set_border_width(0); - if (ccSteps->delay < options.adjusterMaxDelay) { - ccSteps->delay = options.adjusterMaxDelay; + pixelShiftEqualBright = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTEQUALBRIGHT"), multiImage)); + pixelShiftEqualBright->setCheckBoxListener (this); + pixelShiftEqualBright->set_tooltip_text (M("TP_RAW_PIXELSHIFTEQUALBRIGHT_TOOLTIP")); + pixelShiftFrame->pack_start(*pixelShiftEqualBright); + + pixelShiftEqualBrightChannel = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL"), multiImage)); + pixelShiftEqualBrightChannel->setCheckBoxListener (this); + pixelShiftEqualBrightChannel->set_tooltip_text (M("TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP")); + pixelShiftFrame->pack_start(*pixelShiftEqualBrightChannel); + + Gtk::HBox* hb3 = Gtk::manage (new Gtk::HBox ()); + hb3->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_PIXELSHIFTMOTIONMETHOD") + ": ")), Gtk::PACK_SHRINK, 4); + pixelShiftMotionMethod = Gtk::manage (new MyComboBoxText ()); + pixelShiftMotionMethod->append(M("TP_RAW_PIXELSHIFTMM_OFF")); + pixelShiftMotionMethod->append(M("TP_RAW_PIXELSHIFTMM_AUTO")); + pixelShiftMotionMethod->append(M("TP_RAW_PIXELSHIFTMM_CUSTOM")); + pixelShiftMotionMethod->set_active(RAWParams::BayerSensor::ePSMotionCorrectionMethod::Automatic); + pixelShiftMotionMethod->show(); + hb3->pack_start(*pixelShiftMotionMethod); + pixelShiftFrame->pack_start(*hb3); + + pixelShiftOptions = Gtk::manage (new Gtk::VBox ()); + pixelShiftOptions->set_border_width(0); + + pixelShiftShowMotion = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTSHOWMOTION"), multiImage)); + pixelShiftShowMotion->setCheckBoxListener (this); + pixelShiftShowMotion->set_tooltip_text (M("TP_RAW_PIXELSHIFTSHOWMOTION_TOOLTIP")); + pixelShiftFrame->pack_start(*pixelShiftShowMotion); + + pixelShiftShowMotionMaskOnly = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY"), multiImage)); + pixelShiftShowMotionMaskOnly->setCheckBoxListener (this); + pixelShiftShowMotionMaskOnly->set_tooltip_text (M("TP_RAW_PIXELSHIFTSHOWMOTIONMASKONLY_TOOLTIP")); + pixelShiftFrame->pack_start(*pixelShiftShowMotionMaskOnly); + +#ifdef PIXELSHIFTDEV + pixelShiftAutomatic = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTADAPTIVE"), multiImage)); + pixelShiftAutomatic->setCheckBoxListener (this); + pixelShiftOptions->pack_start(*pixelShiftAutomatic); +#endif + pixelShiftGreen = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTGREEN"), multiImage)); + pixelShiftGreen->setCheckBoxListener (this); + pixelShiftOptions->pack_start(*pixelShiftGreen); + + pixelShiftNonGreenCross = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTNONGREENCROSS"), multiImage)); + pixelShiftNonGreenCross->setCheckBoxListener (this); + pixelShiftOptions->pack_start(*pixelShiftNonGreenCross); + + pixelShiftHoleFill = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTHOLEFILL"), multiImage)); + pixelShiftHoleFill->setCheckBoxListener (this); + pixelShiftHoleFill->set_tooltip_text (M("TP_RAW_PIXELSHIFTHOLEFILL_TOOLTIP")); + pixelShiftOptions->pack_start(*pixelShiftHoleFill); + + pixelShiftBlur = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTBLUR"), multiImage)); + pixelShiftBlur->setCheckBoxListener (this); + pixelShiftBlur->set_tooltip_text (M("TP_RAW_PIXELSHIFTSIGMA_TOOLTIP")); + pixelShiftOptions->pack_start(*pixelShiftBlur); + + pixelShiftSigma = Gtk::manage (new Adjuster (M("TP_RAW_PIXELSHIFTSIGMA"), 0.5, 25, 0.1, 1.0)); + pixelShiftSigma->set_tooltip_text (M("TP_RAW_PIXELSHIFTSIGMA_TOOLTIP")); + pixelShiftSigma->setAdjusterListener (this); + + if (pixelShiftSigma->delay < options.adjusterMaxDelay) { + pixelShiftSigma->delay = options.adjusterMaxDelay; } - ccSteps->show(); - pack_start( *ccSteps, Gtk::PACK_SHRINK, 4); + pixelShiftSigma->show(); + pixelShiftOptions->pack_start(*pixelShiftSigma); - //pack_start( *Gtk::manage( new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0 ); - //allOptions = Gtk::manage (new Gtk::VBox ()); - //allOptions->set_border_width(2); - //allEnhance = Gtk::manage (new Gtk::CheckButton(M("TP_RAW_ALLENHANCE"))); - //allOptions->pack_start(*allEnhance); - //pack_start( *allOptions, Gtk::PACK_SHRINK, 4); - methodconn = method->signal_changed().connect( sigc::mem_fun(*this, &BayerProcess::methodChanged) ); - dcbEnhconn = dcbEnhance->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::dcbEnhanceChanged), true); - //allEnhconn = allEnhance->signal_toggled().connect ( sigc::mem_fun(*this, &BayerProcess::allEnhanceChanged), true); + pixelShiftSmooth = Gtk::manage (new Adjuster (M("TP_RAW_PIXELSHIFTSMOOTH"), 0, 1, 0.05, 0.7)); + pixelShiftSmooth->set_tooltip_text (M("TP_RAW_PIXELSHIFTSMOOTH_TOOLTIP")); + pixelShiftSmooth->setAdjusterListener (this); + + if (pixelShiftSmooth->delay < options.adjusterMaxDelay) { + pixelShiftSmooth->delay = options.adjusterMaxDelay; + } + + pixelShiftSmooth->show(); + pixelShiftOptions->pack_start(*pixelShiftSmooth); + + pixelShiftEperIso = Gtk::manage (new Adjuster (M("TP_RAW_PIXELSHIFTEPERISO"), -5.0, 5.0, 0.05, 0.0)); + pixelShiftEperIso->set_tooltip_text(M("TP_RAW_PIXELSHIFTEPERISO_TOOLTIP")); + pixelShiftEperIso->setAdjusterListener (this); + + if (pixelShiftEperIso->delay < options.adjusterMaxDelay) { + pixelShiftEperIso->delay = options.adjusterMaxDelay; + } + + pixelShiftEperIso->show(); + pixelShiftOptions->pack_start(*pixelShiftEperIso); + + + pixelShiftMedian = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTMEDIAN"), multiImage)); + pixelShiftMedian->setCheckBoxListener (this); + pixelShiftMedian->set_tooltip_text (M("TP_RAW_PIXELSHIFTMEDIAN_TOOLTIP")); + pixelShiftOptions->pack_start(*pixelShiftMedian); + + +#ifdef PIXELSHIFTDEV + pixelShiftMedian3 = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTMEDIAN3"), multiImage)); + pixelShiftMedian3->setCheckBoxListener (this); + pixelShiftMedian3->set_tooltip_text (M("TP_RAW_PIXELSHIFTMEDIAN3_TOOLTIP")); + pixelShiftOptions->pack_start(*pixelShiftMedian3); + + pixelShiftNonGreenCross2 = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTNONGREENCROSS2"), multiImage)); + pixelShiftNonGreenCross2->setCheckBoxListener (this); + pixelShiftOptions->pack_start(*pixelShiftNonGreenCross2); + + pixelShiftNonGreenAmaze = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTNONGREENAMAZE"), multiImage)); + pixelShiftNonGreenAmaze->setCheckBoxListener (this); + pixelShiftOptions->pack_start(*pixelShiftNonGreenAmaze); + + pixelShiftNonGreenHorizontal = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTNONGREENHORIZONTAL"), multiImage)); + pixelShiftNonGreenHorizontal->setCheckBoxListener (this); + pixelShiftOptions->pack_start(*pixelShiftNonGreenHorizontal); + + pixelShiftNonGreenVertical = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTNONGREENVERTICAL"), multiImage)); + pixelShiftNonGreenVertical->setCheckBoxListener (this); + pixelShiftOptions->pack_start(*pixelShiftNonGreenVertical); + + pixelShiftExp0 = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTEXP0"), multiImage)); + pixelShiftExp0->setCheckBoxListener (this); + pixelShiftOptions->pack_start(*pixelShiftExp0); +#endif + pixelShiftLmmse = Gtk::manage (new CheckBox(M("TP_RAW_PIXELSHIFTLMMSE"), multiImage)); + pixelShiftLmmse->setCheckBoxListener (this); + pixelShiftLmmse->set_tooltip_text (M("TP_RAW_PIXELSHIFTLMMSE_TOOLTIP")); + pixelShiftOptions->pack_start(*pixelShiftLmmse); + +#ifdef PIXELSHIFTDEV + pixelShiftMotion = Gtk::manage (new Adjuster (M("TP_RAW_PIXELSHIFTMOTION"), 0, 100, 1, 70)); + pixelShiftMotion->setAdjusterListener (this); + pixelShiftMotion->set_tooltip_text (M("TP_RAW_PIXELSHIFTMOTION_TOOLTIP")); + + if (pixelShiftMotion->delay < options.adjusterMaxDelay) { + pixelShiftMotion->delay = options.adjusterMaxDelay; + } + pixelShiftMotion->show(); + pixelShiftOptions->pack_start(*pixelShiftMotion); + + Gtk::HBox* hb2 = Gtk::manage (new Gtk::HBox ()); + hb2->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_RAW_PIXELSHIFTMOTIONCORRECTION") + ": ")), Gtk::PACK_SHRINK, 0); + pixelShiftMotionCorrection = Gtk::manage (new MyComboBoxText ()); + pixelShiftMotionCorrection->append("1x1"); + pixelShiftMotionCorrection->append("1x2"); + pixelShiftMotionCorrection->append("3x3"); + pixelShiftMotionCorrection->append("5x5"); + pixelShiftMotionCorrection->append("7x7"); + pixelShiftMotionCorrection->append("3x3 new"); + pixelShiftMotionCorrection->set_active(0); + pixelShiftMotionCorrection->show(); + hb2->pack_start(*pixelShiftMotionCorrection); + pixelShiftOptions->pack_start(*hb2); + pixelShiftStddevFactorGreen = Gtk::manage (new Adjuster (M("TP_RAW_PIXELSHIFTSTDDEVFACTORGREEN"), 2, 8, 0.1, 5)); + pixelShiftStddevFactorGreen->setAdjusterListener (this); + + if (pixelShiftStddevFactorGreen->delay < options.adjusterMaxDelay) { + pixelShiftStddevFactorGreen->delay = options.adjusterMaxDelay; + } + + pixelShiftStddevFactorGreen->show(); + pixelShiftOptions->pack_start(*pixelShiftStddevFactorGreen); + + pixelShiftStddevFactorRed = Gtk::manage (new Adjuster (M("TP_RAW_PIXELSHIFTSTDDEVFACTORRED"), 1, 8, 0.1, 5)); + pixelShiftStddevFactorRed->setAdjusterListener (this); + + if (pixelShiftStddevFactorRed->delay < options.adjusterMaxDelay) { + pixelShiftStddevFactorRed->delay = options.adjusterMaxDelay; + } + + pixelShiftStddevFactorRed->show(); + pixelShiftOptions->pack_start(*pixelShiftStddevFactorRed); + + pixelShiftStddevFactorBlue = Gtk::manage (new Adjuster (M("TP_RAW_PIXELSHIFTSTDDEVFACTORBLUE"), 1, 8, 0.1, 5)); + pixelShiftStddevFactorBlue->setAdjusterListener (this); + + if (pixelShiftStddevFactorBlue->delay < options.adjusterMaxDelay) { + pixelShiftStddevFactorBlue->delay = options.adjusterMaxDelay; + } + + pixelShiftStddevFactorBlue->show(); + pixelShiftOptions->pack_start(*pixelShiftStddevFactorBlue); +#endif + +#ifdef PIXELSHIFTDEV + pixelShiftNreadIso = Gtk::manage (new Adjuster (M("TP_RAW_PIXELSHIFTNREADISO"), -2.0, 2.0, 0.05, 0.0)); + pixelShiftNreadIso->setAdjusterListener (this); + + if (pixelShiftNreadIso->delay < options.adjusterMaxDelay) { + pixelShiftNreadIso->delay = options.adjusterMaxDelay; + } + + pixelShiftNreadIso->show(); + pixelShiftOptions->pack_start(*pixelShiftNreadIso); + + + pixelShiftPrnu = Gtk::manage (new Adjuster (M("TP_RAW_PIXELSHIFTPRNU"), 0.3, 2.0, 0.1, 1.0)); + pixelShiftPrnu->setAdjusterListener (this); + + if (pixelShiftPrnu->delay < options.adjusterMaxDelay) { + pixelShiftPrnu->delay = options.adjusterMaxDelay; + } + + pixelShiftPrnu->show(); + pixelShiftOptions->pack_start(*pixelShiftPrnu); + + pixelShiftSum = Gtk::manage (new Adjuster (M("TP_RAW_PIXELSHIFTMASKTHRESHOLD"), 1.0, 8.0, 0.1, 3.0)); + pixelShiftSum->setAdjusterListener (this); + + if (pixelShiftSum->delay < options.adjusterMaxDelay) { + pixelShiftSum->delay = options.adjusterMaxDelay; + } + + pixelShiftSum->show(); + pixelShiftOptions->pack_start(*pixelShiftSum); + + pixelShiftRedBlueWeight = Gtk::manage (new Adjuster (M("TP_RAW_PIXELSHIFTREDBLUEWEIGHT"), 0.1, 1.0, 0.1, 0.7)); + pixelShiftRedBlueWeight->setAdjusterListener (this); + + if (pixelShiftRedBlueWeight->delay < options.adjusterMaxDelay) { + pixelShiftRedBlueWeight->delay = options.adjusterMaxDelay; + } + + pixelShiftRedBlueWeight->show(); + pixelShiftOptions->pack_start(*pixelShiftRedBlueWeight); +#endif + + pixelShiftFrame->pack_start(*pixelShiftOptions); + pixelShiftOptions->hide(); + + pack_start( *pixelShiftFrame, Gtk::PACK_SHRINK, 4); + + method->connect(method->signal_changed().connect( sigc::mem_fun(*this, &BayerProcess::methodChanged) )); + imageNumber->connect(imageNumber->signal_changed().connect( sigc::mem_fun(*this, &BayerProcess::imageNumberChanged) )); + pixelShiftMotionMethod->connect(pixelShiftMotionMethod->signal_changed().connect( sigc::mem_fun(*this, &BayerProcess::pixelShiftMotionMethodChanged) )); +#ifdef PIXELSHIFTDEV + pixelShiftMotionCorrection->connect(pixelShiftMotionCorrection->signal_changed().connect( sigc::mem_fun(*this, &BayerProcess::psMotionCorrectionChanged) )); +#endif } void BayerProcess::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { disableListener (); - methodconn.block (true); - dcbEnhconn.block (true); + method->block (true); + imageNumber->block (true); //allEnhconn.block (true); +#ifdef PIXELSHIFTDEV + pixelShiftMotionCorrection->block (true); +#endif method->set_active(procparams::RAWParams::BayerSensor::numMethods); + imageNumber->set_active(pp->raw.bayersensor.imageNum); - for( size_t i = 0; i < procparams::RAWParams::BayerSensor::numMethods; i++) + for( size_t i = 0; i < procparams::RAWParams::BayerSensor::numMethods; i++) { if( pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[i]) { method->set_active(i); - oldSelection = i; + oldMethod = i; break; } - - if(pedited ) { - ccSteps->setEditedState (pedited->raw.bayersensor.ccSteps ? Edited : UnEdited); - dcbIterations->setEditedState ( pedited->raw.bayersensor.dcbIterations ? Edited : UnEdited); - dcbEnhance->set_inconsistent(!pedited->raw.bayersensor.dcbEnhance); - //allEnhance->set_inconsistent(!pedited->raw.bayersensor.allEnhance); - lmmseIterations->setEditedState ( pedited->raw.bayersensor.lmmseIterations ? Edited : UnEdited); - - if( !pedited->raw.bayersensor.method ) { - method->set_active(procparams::RAWParams::BayerSensor::numMethods); // No name - } } //allEnhance->set_active(pp->raw.bayersensor.all_enhance); dcbIterations->setValue (pp->raw.bayersensor.dcb_iterations); - dcbEnhance->set_active(pp->raw.bayersensor.dcb_enhance); + dcbEnhance->setValue (pp->raw.bayersensor.dcb_enhance); + pixelShiftShowMotion->setValue (pp->raw.bayersensor.pixelShiftShowMotion); + if (!batchMode) { + pixelShiftShowMotionMaskOnly->set_sensitive (pp->raw.bayersensor.pixelShiftShowMotion); + } + pixelShiftShowMotionMaskOnly->setValue (pp->raw.bayersensor.pixelShiftShowMotionMaskOnly); + pixelShiftHoleFill->setValue (pp->raw.bayersensor.pixelShiftHoleFill); + pixelShiftMedian->setValue (pp->raw.bayersensor.pixelShiftMedian); + pixelShiftGreen->setValue (pp->raw.bayersensor.pixelShiftGreen); + pixelShiftBlur->setValue (pp->raw.bayersensor.pixelShiftBlur); + if (!batchMode) { + pixelShiftSmooth->set_sensitive (pp->raw.bayersensor.pixelShiftBlur); + } + pixelShiftSmooth->setValue (pp->raw.bayersensor.pixelShiftSmoothFactor); + pixelShiftLmmse->setValue (pp->raw.bayersensor.pixelShiftLmmse); + pixelShiftEqualBright->setValue (pp->raw.bayersensor.pixelShiftEqualBright); + pixelShiftEqualBrightChannel->set_sensitive (pp->raw.bayersensor.pixelShiftEqualBright); + pixelShiftEqualBrightChannel->setValue (pp->raw.bayersensor.pixelShiftEqualBrightChannel); + pixelShiftNonGreenCross->setValue (pp->raw.bayersensor.pixelShiftNonGreenCross); ccSteps->setValue (pp->raw.bayersensor.ccSteps); - - if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::dcb] || - method->get_active_row_number() == procparams::RAWParams::BayerSensor::numMethods) { - dcbOptions->show(); - } else { - dcbOptions->hide(); - } - lmmseIterations->setValue (pp->raw.bayersensor.lmmse_iterations); + pixelShiftMotionMethod->set_active ((int)pp->raw.bayersensor.pixelShiftMotionCorrectionMethod); + pixelShiftEperIso->setValue (pp->raw.bayersensor.pixelShiftEperIso); + pixelShiftSigma->setValue (pp->raw.bayersensor.pixelShiftSigma); + if (!batchMode) { + pixelShiftSigma->set_sensitive (pp->raw.bayersensor.pixelShiftBlur); + } +#ifdef PIXELSHIFTDEV + pixelShiftStddevFactorGreen->setValue (pp->raw.bayersensor.pixelShiftStddevFactorGreen); + pixelShiftStddevFactorRed->setValue (pp->raw.bayersensor.pixelShiftStddevFactorRed); + pixelShiftStddevFactorBlue->setValue (pp->raw.bayersensor.pixelShiftStddevFactorBlue); + pixelShiftSum->setValue (pp->raw.bayersensor.pixelShiftSum); + pixelShiftMedian3->setValue (pp->raw.bayersensor.pixelShiftMedian3); + if (!batchMode) { + pixelShiftMedian3->set_sensitive (pixelShiftMedian->getValue() != CheckValue::off); + } + pixelShiftAutomatic->setValue (pp->raw.bayersensor.pixelShiftAutomatic); + pixelShiftNonGreenHorizontal->setValue (pp->raw.bayersensor.pixelShiftNonGreenHorizontal); + pixelShiftNonGreenVertical->setValue (pp->raw.bayersensor.pixelShiftNonGreenVertical); + pixelShiftExp0->setValue (pp->raw.bayersensor.pixelShiftExp0); + pixelShiftNonGreenCross2->setValue (pp->raw.bayersensor.pixelShiftNonGreenCross2); + pixelShiftNonGreenAmaze->setValue (pp->raw.bayersensor.pixelShiftNonGreenAmaze); + pixelShiftMotion->setValue (pp->raw.bayersensor.pixelShiftMotion); + pixelShiftMotionCorrection->set_active ((int)pp->raw.bayersensor.pixelShiftMotionCorrection); + if (!batchMode) { + pixelShiftHoleFill->set_sensitive (pixelShiftAutomatic->getValue () != CheckValue::off && pixelShiftMotionCorrection->get_active_row_number() == 5); + pixelShiftBlur->set_sensitive(pixelShiftAutomatic->getValue () != CheckValue::off && pixelShiftMotionCorrection->get_active_row_number() == 5); + pixelShiftSmooth->set_sensitive(pixelShiftAutomatic->getValue () != CheckValue::off && pixelShiftMotionCorrection->get_active_row_number() == 5 && pixelShiftBlur->getValue() != CheckValue::off); + } + pixelShiftNreadIso->setValue (pp->raw.bayersensor.pixelShiftNreadIso); + pixelShiftPrnu->setValue (pp->raw.bayersensor.pixelShiftPrnu); + pixelShiftRedBlueWeight->setValue (pp->raw.bayersensor.pixelShiftRedBlueWeight); +#endif - if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::lmmse] || - method->get_active_row_number() == procparams::RAWParams::BayerSensor::numMethods) { - lmmseOptions->show(); - } else { - lmmseOptions->hide(); + if(pedited) { + ccSteps->setEditedState (pedited->raw.bayersensor.ccSteps ? Edited : UnEdited); + dcbIterations->setEditedState ( pedited->raw.bayersensor.dcbIterations ? Edited : UnEdited); + dcbEnhance->setEdited (pedited->raw.bayersensor.dcbEnhance); + pixelShiftShowMotion->setEdited (pedited->raw.bayersensor.pixelShiftShowMotion); + pixelShiftShowMotionMaskOnly->setEdited (pedited->raw.bayersensor.pixelShiftShowMotionMaskOnly); + pixelShiftHoleFill->setEdited (pedited->raw.bayersensor.pixelShiftHoleFill); + pixelShiftMedian->setEdited(pedited->raw.bayersensor.pixelShiftMedian); + pixelShiftGreen->setEdited (pedited->raw.bayersensor.pixelShiftGreen); + pixelShiftBlur->setEdited (pedited->raw.bayersensor.pixelShiftBlur); + pixelShiftSmooth->setEditedState ( pedited->raw.bayersensor.pixelShiftSmooth ? Edited : UnEdited); + pixelShiftLmmse->setEdited (pedited->raw.bayersensor.pixelShiftLmmse); + pixelShiftEqualBright->setEdited (pedited->raw.bayersensor.pixelShiftEqualBright); + pixelShiftEqualBrightChannel->setEdited (pedited->raw.bayersensor.pixelShiftEqualBrightChannel); + pixelShiftNonGreenCross->setEdited (pedited->raw.bayersensor.pixelShiftNonGreenCross); + lmmseIterations->setEditedState ( pedited->raw.bayersensor.lmmseIterations ? Edited : UnEdited); + pixelShiftEperIso->setEditedState ( pedited->raw.bayersensor.pixelShiftEperIso ? Edited : UnEdited); + pixelShiftSigma->setEditedState ( pedited->raw.bayersensor.pixelShiftSigma ? Edited : UnEdited); +#ifdef PIXELSHIFTDEV + pixelShiftNreadIso->setEditedState ( pedited->raw.bayersensor.pixelShiftNreadIso ? Edited : UnEdited); + pixelShiftPrnu->setEditedState ( pedited->raw.bayersensor.pixelShiftPrnu ? Edited : UnEdited); + pixelShiftStddevFactorGreen->setEditedState ( pedited->raw.bayersensor.pixelShiftStddevFactorGreen ? Edited : UnEdited); + pixelShiftStddevFactorRed->setEditedState ( pedited->raw.bayersensor.pixelShiftStddevFactorRed ? Edited : UnEdited); + pixelShiftStddevFactorBlue->setEditedState ( pedited->raw.bayersensor.pixelShiftStddevFactorBlue ? Edited : UnEdited); + pixelShiftSum->setEditedState ( pedited->raw.bayersensor.pixelShiftSum ? Edited : UnEdited); + pixelShiftAutomatic->setEdited (pedited->raw.bayersensor.pixelShiftAutomatic); + pixelShiftNonGreenHorizontal->setEdited (pedited->raw.bayersensor.pixelShiftNonGreenHorizontal); + pixelShiftNonGreenVertical->setEdited (pedited->raw.bayersensor.pixelShiftNonGreenVertical); + pixelShiftMedian3->setEdited (pedited->raw.bayersensor.pixelShiftMedian3); + pixelShiftExp0->setEdited (pedited->raw.bayersensor.pixelShiftExp0); + pixelShiftNonGreenCross2->setEdited (pedited->raw.bayersensor.pixelShiftNonGreenCross2); + pixelShiftNonGreenAmaze->setEdited (pedited->raw.bayersensor.pixelShiftNonGreenAmaze); + pixelShiftMotion->setEditedState ( pedited->raw.bayersensor.pixelShiftMotion ? Edited : UnEdited); + pixelShiftRedBlueWeight->setEditedState ( pedited->raw.bayersensor.pixelShiftRedBlueWeight ? Edited : UnEdited); +#endif + + if(!pedited->raw.bayersensor.method) { + method->set_active(procparams::RAWParams::BayerSensor::numMethods); // No name + } + if(!pedited->raw.bayersensor.imageNum) { + imageNumber->set_active_text(M("GENERAL_UNCHANGED")); + } +#ifdef PIXELSHIFTDEV + if(!pedited->raw.bayersensor.pixelShiftMotionCorrection) { + pixelShiftMotionCorrection->set_active_text(M("GENERAL_UNCHANGED")); + } +#endif + if(!pedited->raw.bayersensor.pixelShiftMotionCorrectionMethod) { + pixelShiftMotionMethod->set_active_text(M("GENERAL_UNCHANGED")); + } } - // Flase color suppression is applied to all demozaicing method, so don't hide anything - /*if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::eahd] || - pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::hphd] || - pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::vng4]) - ccSteps->show(); - else - ccSteps->hide();*/ + if (!batchMode) { + if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::dcb] || + method->get_active_row_number() == procparams::RAWParams::BayerSensor::numMethods) { + dcbOptions->show(); + } else { + dcbOptions->hide(); + } + if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::lmmse] || + method->get_active_row_number() == procparams::RAWParams::BayerSensor::numMethods) { + lmmseOptions->show(); + } else { + lmmseOptions->hide(); + } + if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::pixelshift] || + method->get_active_row_number() == procparams::RAWParams::BayerSensor::numMethods) { + if(pp->raw.bayersensor.pixelShiftMotionCorrectionMethod == RAWParams::BayerSensor::Custom) { + pixelShiftOptions->show(); + } else { + pixelShiftOptions->hide(); + } + pixelShiftFrame->show(); + } else { + pixelShiftFrame->hide(); + } + + // Flase color suppression is applied to all demozaicing method, so don't hide anything + /*if (pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::eahd] || + pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::hphd] || + pp->raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::vng4]) + ccSteps->show(); + else + ccSteps->hide();*/ + } - lastDCBen = pp->raw.bayersensor.dcb_enhance; //lastALLen = pp->raw.bayersensor.all_enhance; - methodconn.block (false); - dcbEnhconn.block (false); + method->block (false); +#ifdef PIXELSHIFTDEV + pixelShiftMotionCorrection->block (false); +#endif + imageNumber->block (false); //allEnhconn.block (false); enableListener (); @@ -165,52 +517,175 @@ void BayerProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pe { pp->raw.bayersensor.ccSteps = ccSteps->getIntValue(); pp->raw.bayersensor.dcb_iterations = dcbIterations->getIntValue(); - pp->raw.bayersensor.dcb_enhance = dcbEnhance->get_active(); - //pp->raw.bayersensor.all_enhance = allEnhance->get_active(); + pp->raw.bayersensor.dcb_enhance = dcbEnhance->getLastActive (); + //pp->raw.bayersensor.all_enhance = allEnhance->getLastActive (); pp->raw.bayersensor.lmmse_iterations = lmmseIterations->getIntValue(); + pp->raw.bayersensor.pixelShiftMotionCorrectionMethod = (RAWParams::BayerSensor::ePSMotionCorrectionMethod)pixelShiftMotionMethod->get_active_row_number(); + pp->raw.bayersensor.pixelShiftEperIso = pixelShiftEperIso->getValue(); + pp->raw.bayersensor.pixelShiftSigma = pixelShiftSigma->getValue(); + pp->raw.bayersensor.pixelShiftShowMotion = pixelShiftShowMotion->getLastActive (); + pp->raw.bayersensor.pixelShiftShowMotionMaskOnly = pixelShiftShowMotionMaskOnly->getLastActive (); + pp->raw.bayersensor.pixelShiftHoleFill = pixelShiftHoleFill->getLastActive (); + pp->raw.bayersensor.pixelShiftMedian = pixelShiftMedian->getLastActive (); + pp->raw.bayersensor.pixelShiftGreen = pixelShiftGreen->getLastActive (); + pp->raw.bayersensor.pixelShiftBlur = pixelShiftBlur->getLastActive (); + pp->raw.bayersensor.pixelShiftSmoothFactor = pixelShiftSmooth->getValue(); + pp->raw.bayersensor.pixelShiftLmmse = pixelShiftLmmse->getLastActive (); + pp->raw.bayersensor.pixelShiftEqualBright = pixelShiftEqualBright->getLastActive (); + pp->raw.bayersensor.pixelShiftEqualBrightChannel = pixelShiftEqualBrightChannel->getLastActive (); + pp->raw.bayersensor.pixelShiftNonGreenCross = pixelShiftNonGreenCross->getLastActive (); +#ifdef PIXELSHIFTDEV + pp->raw.bayersensor.pixelShiftStddevFactorGreen = pixelShiftStddevFactorGreen->getValue(); + pp->raw.bayersensor.pixelShiftStddevFactorRed = pixelShiftStddevFactorRed->getValue(); + pp->raw.bayersensor.pixelShiftStddevFactorBlue = pixelShiftStddevFactorBlue->getValue(); + pp->raw.bayersensor.pixelShiftSum = pixelShiftSum->getValue(); + pp->raw.bayersensor.pixelShiftMedian3 = pixelShiftMedian3->getLastActive (); + pp->raw.bayersensor.pixelShiftMotion = pixelShiftMotion->getIntValue(); + pp->raw.bayersensor.pixelShiftMotionCorrection = (RAWParams::BayerSensor::ePSMotionCorrection)pixelShiftMotionCorrection->get_active_row_number(); + pp->raw.bayersensor.pixelShiftAutomatic = pixelShiftAutomatic->getLastActive (); + pp->raw.bayersensor.pixelShiftNonGreenHorizontal = pixelShiftNonGreenHorizontal->getLastActive (); + pp->raw.bayersensor.pixelShiftNonGreenVertical = pixelShiftNonGreenVertical->getLastActive (); + pp->raw.bayersensor.pixelShiftExp0 = pixelShiftExp0->getLastActive (); + pp->raw.bayersensor.pixelShiftNonGreenCross2 = pixelShiftNonGreenCross2->getLastActive (); + pp->raw.bayersensor.pixelShiftNonGreenAmaze = pixelShiftNonGreenAmaze->getLastActive (); + pp->raw.bayersensor.pixelShiftNreadIso = pixelShiftNreadIso->getValue(); + pp->raw.bayersensor.pixelShiftPrnu = pixelShiftPrnu->getValue(); + pp->raw.bayersensor.pixelShiftRedBlueWeight = pixelShiftRedBlueWeight->getValue(); +#endif int currentRow = method->get_active_row_number(); - if( currentRow >= 0 && currentRow < procparams::RAWParams::BayerSensor::numMethods) { pp->raw.bayersensor.method = procparams::RAWParams::BayerSensor::methodstring[currentRow]; } + currentRow = imageNumber->get_active_row_number(); + if (currentRow < 4) { + pp->raw.bayersensor.imageNum = currentRow; + } + + if (pedited) { pedited->raw.bayersensor.ccSteps = ccSteps->getEditedState (); pedited->raw.bayersensor.method = method->get_active_row_number() != procparams::RAWParams::BayerSensor::numMethods; + pedited->raw.bayersensor.imageNum = imageNumber->get_active_text() != M("GENERAL_UNCHANGED"); pedited->raw.bayersensor.dcbIterations = dcbIterations->getEditedState (); pedited->raw.bayersensor.dcbEnhance = !dcbEnhance->get_inconsistent(); //pedited->raw.bayersensor.allEnhance = !allEnhance->get_inconsistent(); pedited->raw.bayersensor.lmmseIterations = lmmseIterations->getEditedState (); - + pedited->raw.bayersensor.pixelShiftMotionCorrectionMethod = pixelShiftMotionMethod->get_active_text() != M("GENERAL_UNCHANGED"); + pedited->raw.bayersensor.pixelShiftEperIso = pixelShiftEperIso->getEditedState (); + pedited->raw.bayersensor.pixelShiftSigma = pixelShiftSigma->getEditedState (); + pedited->raw.bayersensor.pixelShiftShowMotion = !pixelShiftShowMotion->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftShowMotionMaskOnly = !pixelShiftShowMotionMaskOnly->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftHoleFill = !pixelShiftHoleFill->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftMedian = !pixelShiftMedian->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftGreen = !pixelShiftGreen->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftBlur = !pixelShiftBlur->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftSmooth = pixelShiftSmooth->getEditedState(); + pedited->raw.bayersensor.pixelShiftLmmse = !pixelShiftLmmse->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftEqualBright = !pixelShiftEqualBright->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftEqualBrightChannel = !pixelShiftEqualBrightChannel->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftNonGreenCross = !pixelShiftNonGreenCross->get_inconsistent(); +#ifdef PIXELSHIFTDEV + pedited->raw.bayersensor.pixelShiftStddevFactorGreen = pixelShiftStddevFactorGreen->getEditedState (); + pedited->raw.bayersensor.pixelShiftStddevFactorRed = pixelShiftStddevFactorRed->getEditedState (); + pedited->raw.bayersensor.pixelShiftStddevFactorBlue = pixelShiftStddevFactorBlue->getEditedState (); + pedited->raw.bayersensor.pixelShiftSum = pixelShiftSum->getEditedState (); + pedited->raw.bayersensor.pixelShiftMedian3 = !pixelShiftMedian3->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftMotion = pixelShiftMotion->getEditedState (); + pedited->raw.bayersensor.pixelShiftMotionCorrection = pixelShiftMotionCorrection->get_active_text() != M("GENERAL_UNCHANGED"); + pedited->raw.bayersensor.pixelShiftAutomatic = !pixelShiftAutomatic->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftNonGreenHorizontal = !pixelShiftNonGreenHorizontal->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftNonGreenVertical = !pixelShiftNonGreenVertical->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftExp0 = !pixelShiftExp0->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftNonGreenCross2 = !pixelShiftNonGreenCross2->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftNonGreenAmaze = !pixelShiftNonGreenAmaze->get_inconsistent(); + pedited->raw.bayersensor.pixelShiftNreadIso = pixelShiftNreadIso->getEditedState (); + pedited->raw.bayersensor.pixelShiftPrnu = pixelShiftPrnu->getEditedState (); + pedited->raw.bayersensor.pixelShiftRedBlueWeight = pixelShiftRedBlueWeight->getEditedState (); +#endif } } void BayerProcess::setBatchMode(bool batchMode) { - method->append_text (M("GENERAL_UNCHANGED")); + method->append (M("GENERAL_UNCHANGED")); method->set_active(procparams::RAWParams::BayerSensor::numMethods); // No name - dcbOptions->hide(); - lmmseOptions->hide(); +#ifdef PIXELSHIFTDEV + pixelShiftMotionCorrection->append (M("GENERAL_UNCHANGED")); + pixelShiftMotionCorrection->set_active_text (M("GENERAL_UNCHANGED")); +#endif + pixelShiftMotionMethod->append (M("GENERAL_UNCHANGED")); + pixelShiftMotionMethod->set_active_text (M("GENERAL_UNCHANGED")); + imageNumber->append (M("GENERAL_UNCHANGED")); + imageNumber->set_active_text (M("GENERAL_UNCHANGED")); ToolPanel::setBatchMode (batchMode); ccSteps->showEditedCB (); dcbIterations->showEditedCB (); lmmseIterations->showEditedCB (); +#ifdef PIXELSHIFTDEV + pixelShiftMotion->showEditedCB (); + pixelShiftSum->showEditedCB (); + pixelShiftStddevFactorGreen->showEditedCB (); + pixelShiftStddevFactorRed->showEditedCB (); + pixelShiftStddevFactorBlue->showEditedCB (); + pixelShiftNreadIso->showEditedCB (); + pixelShiftPrnu->showEditedCB (); + pixelShiftRedBlueWeight->showEditedCB (); +#endif + pixelShiftEperIso->showEditedCB (); + pixelShiftSigma->showEditedCB (); } void BayerProcess::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited) { dcbIterations->setDefault( defParams->raw.bayersensor.dcb_iterations); lmmseIterations->setDefault( defParams->raw.bayersensor.lmmse_iterations); +#ifdef PIXELSHIFTDEV + pixelShiftMotion->setDefault( defParams->raw.bayersensor.pixelShiftMotion); + pixelShiftSum->setDefault( defParams->raw.bayersensor.pixelShiftSum); + pixelShiftStddevFactorGreen->setDefault( defParams->raw.bayersensor.pixelShiftStddevFactorGreen); + pixelShiftStddevFactorRed->setDefault( defParams->raw.bayersensor.pixelShiftStddevFactorRed); + pixelShiftStddevFactorBlue->setDefault( defParams->raw.bayersensor.pixelShiftStddevFactorBlue); + pixelShiftNreadIso->setDefault( defParams->raw.bayersensor.pixelShiftNreadIso); + pixelShiftPrnu->setDefault( defParams->raw.bayersensor.pixelShiftPrnu); + pixelShiftRedBlueWeight->setDefault( defParams->raw.bayersensor.pixelShiftRedBlueWeight); +#endif + pixelShiftEperIso->setDefault( defParams->raw.bayersensor.pixelShiftEperIso); + pixelShiftSigma->setDefault( defParams->raw.bayersensor.pixelShiftSigma); ccSteps->setDefault (defParams->raw.bayersensor.ccSteps); if (pedited) { dcbIterations->setDefaultEditedState( pedited->raw.bayersensor.dcbIterations ? Edited : UnEdited); lmmseIterations->setDefaultEditedState( pedited->raw.bayersensor.lmmseIterations ? Edited : UnEdited); +#ifdef PIXELSHIFTDEV + pixelShiftMotion->setDefaultEditedState( pedited->raw.bayersensor.pixelShiftMotion ? Edited : UnEdited); + pixelShiftSum->setDefaultEditedState( pedited->raw.bayersensor.pixelShiftSum ? Edited : UnEdited); + pixelShiftStddevFactorGreen->setDefaultEditedState( pedited->raw.bayersensor.pixelShiftStddevFactorGreen ? Edited : UnEdited); + pixelShiftStddevFactorRed->setDefaultEditedState( pedited->raw.bayersensor.pixelShiftStddevFactorRed ? Edited : UnEdited); + pixelShiftStddevFactorBlue->setDefaultEditedState( pedited->raw.bayersensor.pixelShiftStddevFactorBlue ? Edited : UnEdited); + pixelShiftNreadIso->setDefaultEditedState( pedited->raw.bayersensor.pixelShiftNreadIso ? Edited : UnEdited); + pixelShiftPrnu->setDefaultEditedState( pedited->raw.bayersensor.pixelShiftPrnu ? Edited : UnEdited); + pixelShiftRedBlueWeight->setDefaultEditedState( pedited->raw.bayersensor.pixelShiftRedBlueWeight ? Edited : UnEdited); +#endif + pixelShiftEperIso->setDefaultEditedState( pedited->raw.bayersensor.pixelShiftEperIso ? Edited : UnEdited); + pixelShiftSigma->setDefaultEditedState( pedited->raw.bayersensor.pixelShiftSigma ? Edited : UnEdited); ccSteps->setDefaultEditedState(pedited->raw.bayersensor.ccSteps ? Edited : UnEdited); } else { dcbIterations->setDefaultEditedState( Irrelevant ); lmmseIterations->setDefaultEditedState( Irrelevant ); +#ifdef PIXELSHIFTDEV + pixelShiftMotion->setDefaultEditedState( Irrelevant ); + pixelShiftSum->setDefaultEditedState( Irrelevant ); + pixelShiftStddevFactorGreen->setDefaultEditedState( Irrelevant ); + pixelShiftStddevFactorRed->setDefaultEditedState( Irrelevant ); + pixelShiftStddevFactorBlue->setDefaultEditedState( Irrelevant ); + pixelShiftNreadIso->setDefaultEditedState( Irrelevant ); + pixelShiftPrnu->setDefaultEditedState( Irrelevant ); + pixelShiftRedBlueWeight->setDefaultEditedState( Irrelevant ); +#endif + pixelShiftEperIso->setDefaultEditedState( Irrelevant ); + pixelShiftSigma->setDefaultEditedState( Irrelevant ); ccSteps->setDefaultEditedState(Irrelevant ); } } @@ -224,24 +699,82 @@ void BayerProcess::adjusterChanged (Adjuster* a, double newval) listener->panelChanged (EvDemosaicFalseColorIter, a->getTextValue() ); } else if (a == lmmseIterations) { listener->panelChanged (EvDemosaicLMMSEIter, a->getTextValue() ); +#ifdef PIXELSHIFTDEV + } else if (a == pixelShiftMotion) { + listener->panelChanged (EvPixelShiftMotion, a->getTextValue() ); + } else if (a == pixelShiftSum) { + listener->panelChanged (EvPixelShiftSum, a->getTextValue() ); + } else if (a == pixelShiftStddevFactorGreen) { + listener->panelChanged (EvPixelShiftStddevFactorGreen, a->getTextValue() ); + } else if (a == pixelShiftStddevFactorRed) { + listener->panelChanged (EvPixelShiftStddevFactorRed, a->getTextValue() ); + } else if (a == pixelShiftStddevFactorBlue) { + listener->panelChanged (EvPixelShiftStddevFactorBlue, a->getTextValue() ); + } else if (a == pixelShiftNreadIso) { + listener->panelChanged (EvPixelShiftNreadIso, a->getTextValue() ); + } else if (a == pixelShiftPrnu) { + listener->panelChanged (EvPixelShiftPrnu, a->getTextValue() ); + } else if (a == pixelShiftRedBlueWeight) { + listener->panelChanged (EvPixelShiftRedBlueWeight, a->getTextValue() ); +#endif + } else if (a == pixelShiftEperIso) { + listener->panelChanged (EvPixelShiftEperIso, a->getTextValue() ); + } else if (a == pixelShiftSigma) { + listener->panelChanged (EvPixelShiftSigma, a->getTextValue() ); + } else if (a == pixelShiftSmooth) { + listener->panelChanged (EvPixelShiftSmooth, a->getTextValue() ); } } } +#ifdef PIXELSHIFTDEV +void BayerProcess::psMotionCorrectionChanged () +{ + if (!batchMode) { + if(pixelShiftMotionCorrection->get_active_row_number() == 5) { + pixelShiftBlur->set_sensitive(true); + pixelShiftHoleFill->set_sensitive(true); + pixelShiftSmooth->set_sensitive(pixelShiftBlur->getValue() != CheckValue::off); + } else { + pixelShiftBlur->set_sensitive(false); + pixelShiftHoleFill->set_sensitive(false); + pixelShiftSmooth->set_sensitive(false); + } + } + + if (listener) { + listener->panelChanged (EvPixelShiftMotionCorrection, pixelShiftMotionCorrection->get_active_text()); + } +} +#endif + void BayerProcess::methodChanged () { int curSelection = method->get_active_row_number(); - if ( curSelection == procparams::RAWParams::BayerSensor::dcb) { - dcbOptions->show(); - } else { - dcbOptions->hide(); - } + if (!batchMode) { + if ( curSelection == procparams::RAWParams::BayerSensor::dcb) { + dcbOptions->show(); + } else { + dcbOptions->hide(); + } - if ( curSelection == procparams::RAWParams::BayerSensor::lmmse) { - lmmseOptions->show(); - } else { - lmmseOptions->hide(); + if ( curSelection == procparams::RAWParams::BayerSensor::lmmse) { + lmmseOptions->show(); + } else { + lmmseOptions->hide(); + } + + if ( curSelection == procparams::RAWParams::BayerSensor::pixelshift) { + if(pixelShiftMotionMethod->get_active_row_number() == 2) { + pixelShiftOptions->show(); + } else { + pixelShiftOptions->hide(); + } + pixelShiftFrame->show(); + } else { + pixelShiftFrame->hide(); + } } Glib::ustring methodName = ""; @@ -250,52 +783,215 @@ void BayerProcess::methodChanged () if( curSelection >= 0 && curSelection < procparams::RAWParams::BayerSensor::numMethods) { methodName = procparams::RAWParams::BayerSensor::methodstring[curSelection]; - if (curSelection == procparams::RAWParams::BayerSensor::mono || oldSelection == procparams::RAWParams::BayerSensor::mono) { + if (curSelection == procparams::RAWParams::BayerSensor::mono || oldMethod == procparams::RAWParams::BayerSensor::mono) { ppreq = true; } } - oldSelection = curSelection; + oldMethod = curSelection; if (listener) { listener->panelChanged (ppreq ? EvDemosaicMethodPreProc : EvDemosaicMethod, methodName); } } -void BayerProcess::dcbEnhanceChanged () +void BayerProcess::imageNumberChanged () { - if (batchMode) { - if (dcbEnhance->get_inconsistent()) { - dcbEnhance->set_inconsistent (false); - dcbEnhconn.block (true); - dcbEnhance->set_active (false); - dcbEnhconn.block (false); - } else if (lastDCBen) { - dcbEnhance->set_inconsistent (true); - } - - lastDCBen = dcbEnhance->get_active (); - } - if (listener) { - listener->panelChanged (EvDemosaicDCBEnhanced, dcbEnhance->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + listener->panelChanged (EvRawImageNum, imageNumber->get_active_text()); } } -/*void BayerProcess::allEnhanceChanged () +void BayerProcess::checkBoxToggled (CheckBox* c, CheckValue newval) { - if (batchMode) { - if (allEnhance->get_inconsistent()) { - allEnhance->set_inconsistent (false); - allEnhconn.block (true); - allEnhance->set_active (false); - allEnhconn.block (false); + if (c == dcbEnhance) { + if (listener) { + listener->panelChanged (EvDemosaicDCBEnhanced, dcbEnhance->getValueAsStr ()); + } + } else if (c == pixelShiftShowMotion) { + if (!batchMode) { + pixelShiftShowMotionMaskOnly->set_sensitive(newval != CheckValue::off); + } + if (listener) { + listener->panelChanged (EvPixelshiftShowMotion, pixelShiftShowMotion->getValueAsStr ()); + } + } else if (c == pixelShiftShowMotionMaskOnly) { + if (listener) { + listener->panelChanged (EvPixelshiftShowMotionMaskOnly, pixelShiftShowMotionMaskOnly->getValueAsStr ()); + } + } else if (c == pixelShiftHoleFill) { + if (listener) { + listener->panelChanged (EvPixelShiftHoleFill, pixelShiftHoleFill->getValueAsStr ()); + } + } else if (c == pixelShiftMedian) { +#ifdef PIXELSHIFTDEV + if (!batchMode) { + pixelShiftMedian3->set_sensitive(newval != CheckValue::off); + } +#endif + if (listener) { + listener->panelChanged (EvPixelShiftMedian, pixelShiftMedian->getValueAsStr ()); + } + } else if (c == pixelShiftGreen) { + if (listener) { + listener->panelChanged (EvPixelShiftGreen, pixelShiftGreen->getValueAsStr ()); + } + } else if (c == pixelShiftBlur) { + if (!batchMode) { + pixelShiftSmooth->set_sensitive(newval != CheckValue::off); + pixelShiftSigma->set_sensitive(newval != CheckValue::off); + } + if (listener) { + listener->panelChanged (EvPixelShiftBlur, pixelShiftBlur->getValueAsStr ()); + } + } else if (c == pixelShiftLmmse) { + if (listener) { + listener->panelChanged (EvPixelShiftLmmse, pixelShiftLmmse->getValueAsStr ()); + } + } else if (c == pixelShiftEqualBright) { + if (!batchMode) { + pixelShiftEqualBrightChannel->set_sensitive(newval != CheckValue::off); + } + if (listener) { + listener->panelChanged (EvPixelShiftEqualBright, pixelShiftEqualBright->getValueAsStr ()); + } + } else if (c == pixelShiftEqualBrightChannel) { + if (listener) { + listener->panelChanged (EvPixelShiftEqualBrightChannel, pixelShiftEqualBrightChannel->getValueAsStr ()); + } + } else if (c == pixelShiftNonGreenCross) { + if (listener) { + listener->panelChanged (EvPixelShiftNonGreenCross, pixelShiftNonGreenCross->getValueAsStr ()); } - else if (lastALLen) - allEnhance->set_inconsistent (true); - - lastALLen = allEnhance->get_active (); } - if (listener) - listener->panelChanged (EvDemosaicALLEnhanced, allEnhance->get_active()?M("GENERAL_ENABLED"):M("GENERAL_DISABLED")); -}*/ +#ifdef PIXELSHIFTDEV + else if (c == pixelShiftAutomatic) { + if (!batchMode) { + pixelShiftMotion->set_sensitive(newval != CheckValue::off); + pixelShiftEperIso->set_sensitive(newval != CheckValue::off); + pixelShiftNreadIso->set_sensitive(newval != CheckValue::off); + pixelShiftPrnu->set_sensitive(newval != CheckValue::off); + pixelShiftSigma->set_sensitive(newval != CheckValue::off); + pixelShiftSum->set_sensitive(newval != CheckValue::off); + pixelShiftRedBlueWeight->set_sensitive(newval != CheckValue::off); + pixelShiftStddevFactorGreen->set_sensitive(newval != CheckValue::off); + pixelShiftStddevFactorRed->set_sensitive(newval != CheckValue::off); + pixelShiftStddevFactorBlue->set_sensitive(newval != CheckValue::off); + pixelShiftNonGreenHorizontal->set_sensitive(newval != CheckValue::off); + pixelShiftNonGreenVertical->set_sensitive(newval != CheckValue::off); + pixelShiftHoleFill->set_sensitive(newval != CheckValue::off && pixelShiftMotionCorrection->get_active_row_number() == 5); + pixelShiftMedian3->set_sensitive(newval != CheckValue::off && pixelShiftMedian->getValue () != CheckValue::off); + pixelShiftGreen->set_sensitive(newval != CheckValue::off); + pixelShiftBlur->set_sensitive(newval != CheckValue::off && pixelShiftMotionCorrection->get_active_row_number() == 5); + pixelShiftSmooth->set_sensitive(newval != CheckValue::off && pixelShiftMotionCorrection->get_active_row_number() == 5 && pixelShiftBlur->getValue () != CheckValue::off); + pixelShiftExp0->set_sensitive(newval != CheckValue::off); + pixelShiftNonGreenCross->set_sensitive(newval != CheckValue::off); + pixelShiftNonGreenCross2->set_sensitive(newval != CheckValue::off); + pixelShiftNonGreenAmaze->set_sensitive(newval != CheckValue::off); + } + + if (listener) { + listener->panelChanged (EvPixelShiftAutomatic, pixelShiftAutomatic->getValueAsStr ()); + } + } else if (c == pixelShiftNonGreenHorizontal) { + if (listener) { + listener->panelChanged (EvPixelShiftNonGreenHorizontal, pixelShiftNonGreenHorizontal->getValueAsStr ()); + } + } else if (c == pixelShiftNonGreenVertical) { + if (listener) { + listener->panelChanged (EvPixelShiftNonGreenVertical, pixelShiftNonGreenVertical->getValueAsStr ()); + } + } else if (c == pixelShiftMedian3) { + if (listener) { + listener->panelChanged (EvPixelShiftMedian3, pixelShiftMedian3->getValueAsStr ()); + } + } else if (c == pixelShiftExp0) { + if (listener) { + listener->panelChanged (EvPixelShiftExp0, pixelShiftExp0->getValueAsStr ()); + } + } else if (c == pixelShiftNonGreenCross2) { + if (listener) { + listener->panelChanged (EvPixelShiftGreenAmaze, pixelShiftNonGreenCross2->getValueAsStr ()); + } + } else if (c == pixelShiftNonGreenAmaze) { + if (listener) { + listener->panelChanged (EvPixelShiftNonGreenAmaze, pixelShiftNonGreenAmaze->getValueAsStr ()); + } + } +#endif +} + +void BayerProcess::pixelShiftMotionMethodChanged () +{ + if (!batchMode) { + if(pixelShiftMotionMethod->get_active_row_number() == 0) { + pixelShiftOptions->hide(); + pixelShiftShowMotion->hide(); + pixelShiftShowMotionMaskOnly->hide(); + } else if(pixelShiftMotionMethod->get_active_row_number() == 2) { + pixelShiftOptions->show(); + pixelShiftShowMotion->show(); + pixelShiftShowMotionMaskOnly->show(); + } else { + pixelShiftOptions->hide(); + pixelShiftShowMotion->show(); + pixelShiftShowMotionMaskOnly->show(); + } + } + if (listener) { + listener->panelChanged (EvPixelShiftMotionMethod, pixelShiftMotionMethod->get_active_text()); + } +} + +void BayerProcess::FrameCountChanged(int n, int frameNum) +{ + struct Data { + BayerProcess *me; + int n; + int frameNum; + }; + const auto func = [](gpointer data) -> gboolean { + Data *d = static_cast(data); + BayerProcess *me = d->me; + me->imageNumber->block (true); + int n = d->n; + int frameNum = d->frameNum; + + me->imageNumber->remove_all(); + me->imageNumber->append("1"); + for(int i = 2; i <= std::min(n, 4); ++i) { + std::ostringstream entry; + entry << i; + me->imageNumber->append(entry.str()); + } + me->imageNumber->set_active(std::min(frameNum, n - 1)); + if(n == 1) { + me->imageNumberBox->hide(); + } else { + me->imageNumberBox->show(); + } + me->imageNumber->block (false); + delete d; + return FALSE; + }; + + idle_register.add(func, new Data { this, n, frameNum }); + + // GThreadLock lock; + // imageNumber->block (true); + + // imageNumber->remove_all(); + // imageNumber->append("1"); + // for(int i = 2; i <= std::min(n, 4); ++i) { + // std::ostringstream entry; + // entry << i; + // imageNumber->append(entry.str()); + // } + // imageNumber->set_active(std::min(frameNum, n - 1)); + // if(n == 1) { + // imageNumberBox->hide(); + // } else { + // imageNumberBox->show(); + // } + // imageNumber->block (false); +} diff --git a/rtgui/bayerprocess.h b/rtgui/bayerprocess.h index b78002ea3..6d9dd6062 100644 --- a/rtgui/bayerprocess.h +++ b/rtgui/bayerprocess.h @@ -21,29 +21,61 @@ #include #include "adjuster.h" +#include "checkbox.h" #include "guiutils.h" #include "toolpanel.h" - -class BayerProcess : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel +class BayerProcess : public ToolParamBlock, public AdjusterListener, public CheckBoxListener, public FoldableToolPanel, public rtengine::FrameCountListener { protected: MyComboBoxText* method; + Gtk::HBox *imageNumberBox; + MyComboBoxText* imageNumber; Adjuster* ccSteps; Gtk::VBox *dcbOptions; Adjuster* dcbIterations; - Gtk::CheckButton* dcbEnhance; - //Gtk::VBox *allOptions; - //Gtk::CheckButton* allEnhance; + CheckBox* dcbEnhance; Gtk::VBox *lmmseOptions; Adjuster* lmmseIterations; + Gtk::VBox *pixelShiftFrame; + Gtk::VBox *pixelShiftOptions; + MyComboBoxText* pixelShiftMotionMethod; + CheckBox* pixelShiftShowMotion; + CheckBox* pixelShiftShowMotionMaskOnly; + CheckBox* pixelShiftNonGreenCross; + CheckBox* pixelShiftGreen; + CheckBox* pixelShiftBlur; + CheckBox* pixelShiftHoleFill; + CheckBox* pixelShiftMedian; + CheckBox* pixelShiftLmmse; + CheckBox* pixelShiftEqualBright; + CheckBox* pixelShiftEqualBrightChannel; + Adjuster* pixelShiftSmooth; + Adjuster* pixelShiftEperIso; + Adjuster* pixelShiftSigma; +#ifdef PIXELSHIFTDEV + Adjuster* pixelShiftSum; + Adjuster* pixelShiftMotion; + MyComboBoxText* pixelShiftMotionCorrection; + CheckBox* pixelShiftAutomatic; + CheckBox* pixelShiftNonGreenHorizontal; + CheckBox* pixelShiftNonGreenVertical; + CheckBox* pixelShiftNonGreenCross2; + CheckBox* pixelShiftNonGreenAmaze; + CheckBox* pixelShiftExp0; + CheckBox* pixelShiftMedian3; + Adjuster* pixelShiftStddevFactorGreen; + Adjuster* pixelShiftStddevFactorRed; + Adjuster* pixelShiftStddevFactorBlue; + Adjuster* pixelShiftNreadIso; + Adjuster* pixelShiftPrnu; + Adjuster* pixelShiftRedBlueWeight; +#endif + int oldMethod; - bool lastDCBen; - int oldSelection; - //bool lastALLen; - sigc::connection methodconn, dcbEnhconn; //,allEnhconn; + IdleRegister idle_register; public: BayerProcess (); @@ -54,9 +86,14 @@ public: void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); void methodChanged (); - void adjusterChanged (Adjuster* a, double newval); - void dcbEnhanceChanged(); - //void allEnhanceChanged(); + void imageNumberChanged (); + void adjusterChanged (Adjuster* a, double newval); + void checkBoxToggled (CheckBox* c, CheckValue newval); + void pixelShiftMotionMethodChanged(); + void FrameCountChanged(int n, int frameNum); +#ifdef PIXELSHIFTDEV + void psMotionCorrectionChanged (); +#endif }; #endif diff --git a/rtgui/bayerrawexposure.cc b/rtgui/bayerrawexposure.cc index ee9b4fc4d..2194d1639 100644 --- a/rtgui/bayerrawexposure.cc +++ b/rtgui/bayerrawexposure.cc @@ -18,7 +18,6 @@ */ #include "bayerrawexposure.h" #include "guiutils.h" -#include using namespace rtengine; using namespace rtengine::procparams; @@ -57,9 +56,9 @@ BayerRAWExposure::BayerRAWExposure () : FoldableToolPanel(this, "bayerrawexposur } PexBlack0->show(); - PextwoGreen = Gtk::manage(new Gtk::CheckButton((M("TP_RAWEXPOS_TWOGREEN"))));// two green + PextwoGreen = Gtk::manage(new CheckBox(M("TP_RAWEXPOS_TWOGREEN"), multiImage));// two green PextwoGreen->set_active (true); - greenconn = PextwoGreen->signal_toggled().connect ( sigc::mem_fun(*this, &BayerRAWExposure::GreenChanged)); + PextwoGreen->setCheckBoxListener (this); pack_start( *PexBlack1, Gtk::PACK_SHRINK, 0);//black R pack_start( *PexBlack0, Gtk::PACK_SHRINK, 0);//black G1 @@ -79,16 +78,13 @@ void BayerRAWExposure::read(const rtengine::procparams::ProcParams* pp, const Pa PexBlack3->setEditedState( pedited->raw.bayersensor.exBlack3 ? Edited : UnEdited ); } - greenconn.block (true); - PextwoGreen->set_active (pp->raw.bayersensor.twogreen); - greenconn.block (false); - lastPextwoGreen = pp->raw.bayersensor.twogreen; + PextwoGreen->setValue (pp->raw.bayersensor.twogreen); PexBlack0->setValue (pp->raw.bayersensor.black0);//black PexBlack1->setValue (pp->raw.bayersensor.black1);//black PexBlack2->setValue (pp->raw.bayersensor.black2);//black - if(!PextwoGreen->get_active()) { + if(!PextwoGreen->getLastActive()) { PexBlack3->setValue (pp->raw.bayersensor.black3); } else { PexBlack3->setValue (PexBlack0->getValue()); @@ -102,9 +98,9 @@ void BayerRAWExposure::write( rtengine::procparams::ProcParams* pp, ParamsEdited pp->raw.bayersensor.black0 = PexBlack0->getValue();// black pp->raw.bayersensor.black1 = PexBlack1->getValue();// black pp->raw.bayersensor.black2 = PexBlack2->getValue();// black - pp->raw.bayersensor.twogreen = PextwoGreen->get_active(); + pp->raw.bayersensor.twogreen = PextwoGreen->getLastActive(); - if(PextwoGreen->get_active()) { + if(PextwoGreen->getLastActive()) { pp->raw.bayersensor.black3 = pp->raw.bayersensor.black0; // active or desactive 2 green together } else { pp->raw.bayersensor.black3 = PexBlack3->getValue(); @@ -126,7 +122,7 @@ void BayerRAWExposure::adjusterChanged (Adjuster* a, double newval) Glib::ustring value = a->getTextValue(); if (a == PexBlack0) { - if(!PextwoGreen->get_active()) { + if(!PextwoGreen->getLastActive()) { listener->panelChanged (EvPreProcessExpBlackzero, value ); } else { listener->panelChanged (EvPreProcessExpBlackzero, value ); @@ -137,7 +133,7 @@ void BayerRAWExposure::adjusterChanged (Adjuster* a, double newval) } else if (a == PexBlack2) { listener->panelChanged (EvPreProcessExpBlacktwo, value ); } else if (a == PexBlack3) { - if(!PextwoGreen->get_active()) { + if(!PextwoGreen->getLastActive()) { listener->panelChanged (EvPreProcessExpBlackthree, value ); } else { listener->panelChanged (EvPreProcessExpBlackthree, value ); @@ -146,33 +142,17 @@ void BayerRAWExposure::adjusterChanged (Adjuster* a, double newval) } } } -void BayerRAWExposure::GreenChanged() + +void BayerRAWExposure::checkBoxToggled (CheckBox* c, CheckValue newval) { - if (batchMode) { - if (PextwoGreen->get_inconsistent()) { - PextwoGreen->set_inconsistent (false); - greenconn.block (true); - PextwoGreen->set_active (false); - greenconn.block (false); - } else if (lastPextwoGreen) { - PextwoGreen->set_inconsistent (true); + if (c == PextwoGreen) { + if (listener) { + listener->panelChanged (EvPreProcessExptwoGreen, PextwoGreen->getLastActive() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); + if (PextwoGreen->getLastActive()) { + PexBlack3->setValue (PexBlack0->getValue());//two green together + } } - - lastPextwoGreen = PextwoGreen->get_active (); } - - if (listener) { - if (PextwoGreen->get_active()) { - listener->panelChanged (EvPreProcessExptwoGreen, M("GENERAL_ENABLED")); - PexBlack3->setValue (PexBlack0->getValue());//two green together - } - - else { - listener->panelChanged (EvPreProcessExptwoGreen, M("GENERAL_DISABLED")); - } - - } - } void BayerRAWExposure::setBatchMode(bool batchMode) diff --git a/rtgui/bayerrawexposure.h b/rtgui/bayerrawexposure.h index 733aafc25..5d51babbb 100644 --- a/rtgui/bayerrawexposure.h +++ b/rtgui/bayerrawexposure.h @@ -21,10 +21,10 @@ #include #include "adjuster.h" +#include "checkbox.h" #include "toolpanel.h" -#include "../rtengine/rawimage.h" -class BayerRAWExposure : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel +class BayerRAWExposure : public ToolParamBlock, public AdjusterListener, public CheckBoxListener, public FoldableToolPanel { protected: @@ -32,12 +32,8 @@ protected: Adjuster* PexBlack1; Adjuster* PexBlack2; Adjuster* PexBlack3; - bool lastPextwoGreen; - sigc::connection greenconn; - Gtk::CheckButton* PextwoGreen; + CheckBox* PextwoGreen; -private: -// Gtk::CheckButton* PextwoGreen; public: BayerRAWExposure (); @@ -46,8 +42,8 @@ public: void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setBatchMode (bool batchMode); void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); - void GreenChanged() ; void adjusterChanged (Adjuster* a, double newval); + void checkBoxToggled (CheckBox* c, CheckValue newval); void setAdjusterBehavior (bool pexblackadd); void trimValues (rtengine::procparams::ProcParams* pp); }; diff --git a/rtgui/blackwhite.cc b/rtgui/blackwhite.cc index 832c4c8ef..efa960a81 100644 --- a/rtgui/blackwhite.cc +++ b/rtgui/blackwhite.cc @@ -39,14 +39,13 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB //----------- Method combobox ------------------------------ Gtk::HBox* metHBox = Gtk::manage (new Gtk::HBox ()); - metHBox->set_border_width (0); metHBox->set_spacing (2); Gtk::Label* metLabel = Gtk::manage (new Gtk::Label (M("TP_BWMIX_MET") + ":")); metHBox->pack_start (*metLabel, Gtk::PACK_SHRINK); method = Gtk::manage (new MyComboBoxText ()); - method->append_text (M("TP_BWMIX_MET_DESAT")); - method->append_text (M("TP_BWMIX_MET_LUMEQUAL")); - method->append_text (M("TP_BWMIX_MET_CHANMIX")); + method->append (M("TP_BWMIX_MET_DESAT")); + method->append (M("TP_BWMIX_MET_LUMEQUAL")); + method->append (M("TP_BWMIX_MET_CHANMIX")); method->set_active (0); metHBox->pack_start (*method); @@ -86,19 +85,15 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB pack_start (*mixerFrame, Gtk::PACK_SHRINK, 0); mixerVBox = Gtk::manage (new Gtk::VBox ()); - mixerVBox->set_border_width(4); mixerVBox->set_spacing(4); autoHBox = Gtk::manage (new Gtk::HBox ()); - autoHBox->set_border_width (2); autoch = Gtk::manage (new Gtk::ToggleButton (M("TP_BWMIX_AUTOCH"))); autoch->set_tooltip_markup (M("TP_BWMIX_AUTOCH_TIP")); autoconn = autoch->signal_toggled().connect( sigc::mem_fun(*this, &BlackWhite::autoch_toggled) ); neutral = Gtk::manage (new Gtk::Button (M("TP_BWMIX_NEUTRAL"))); - RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); - neutral->set_image(*resetImg); neutral->set_tooltip_text (M("TP_BWMIX_NEUTRAL_TIP")); neutralconn = neutral->signal_pressed().connect( sigc::mem_fun(*this, &BlackWhite::neutral_pressed) ); neutral->show(); @@ -113,28 +108,27 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB mixerVBox->pack_start (*Gtk::manage (new Gtk::HSeparator())); settingHBox = Gtk::manage (new Gtk::HBox ()); - settingHBox->set_border_width (0); settingHBox->set_spacing (2); settingHBox->set_tooltip_markup (M("TP_BWMIX_SETTING_TOOLTIP")); Gtk::Label *settingLabel = Gtk::manage (new Gtk::Label (M("TP_BWMIX_SETTING") + ":")); settingHBox->pack_start (*settingLabel, Gtk::PACK_SHRINK); setting = Gtk::manage (new MyComboBoxText ()); - setting->append_text (M("TP_BWMIX_SET_NORMCONTAST")); - setting->append_text (M("TP_BWMIX_SET_HIGHCONTAST")); - setting->append_text (M("TP_BWMIX_SET_LUMINANCE")); - setting->append_text (M("TP_BWMIX_SET_LANDSCAPE")); - setting->append_text (M("TP_BWMIX_SET_PORTRAIT")); - setting->append_text (M("TP_BWMIX_SET_LOWSENSIT")); - setting->append_text (M("TP_BWMIX_SET_HIGHSENSIT")); - setting->append_text (M("TP_BWMIX_SET_PANCHRO")); - setting->append_text (M("TP_BWMIX_SET_HYPERPANCHRO")); - setting->append_text (M("TP_BWMIX_SET_ORTHOCHRO")); - setting->append_text (M("TP_BWMIX_SET_RGBABS")); - setting->append_text (M("TP_BWMIX_SET_RGBREL")); - setting->append_text (M("TP_BWMIX_SET_ROYGCBPMABS")); - setting->append_text (M("TP_BWMIX_SET_ROYGCBPMREL")); - setting->append_text (M("TP_BWMIX_SET_INFRARED")); + setting->append (M("TP_BWMIX_SET_NORMCONTAST")); + setting->append (M("TP_BWMIX_SET_HIGHCONTAST")); + setting->append (M("TP_BWMIX_SET_LUMINANCE")); + setting->append (M("TP_BWMIX_SET_LANDSCAPE")); + setting->append (M("TP_BWMIX_SET_PORTRAIT")); + setting->append (M("TP_BWMIX_SET_LOWSENSIT")); + setting->append (M("TP_BWMIX_SET_HIGHSENSIT")); + setting->append (M("TP_BWMIX_SET_PANCHRO")); + setting->append (M("TP_BWMIX_SET_HYPERPANCHRO")); + setting->append (M("TP_BWMIX_SET_ORTHOCHRO")); + setting->append (M("TP_BWMIX_SET_RGBABS")); + setting->append (M("TP_BWMIX_SET_RGBREL")); + setting->append (M("TP_BWMIX_SET_ROYGCBPMABS")); + setting->append (M("TP_BWMIX_SET_ROYGCBPMREL")); + setting->append (M("TP_BWMIX_SET_INFRARED")); setting->set_active (0); settingHBox->pack_start (*setting); @@ -165,21 +159,20 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB mixerVBox->pack_start (*filterSep); filterHBox = Gtk::manage (new Gtk::HBox ()); - filterHBox->set_border_width (0); filterHBox->set_spacing (2); filterHBox->set_tooltip_markup (M("TP_BWMIX_FILTER_TOOLTIP")); Gtk::Label *filterLabel = Gtk::manage (new Gtk::Label (M("TP_BWMIX_FILTER") + ":")); filterHBox->pack_start (*filterLabel, Gtk::PACK_SHRINK); filter = Gtk::manage (new MyComboBoxText ()); - filter->append_text (M("TP_BWMIX_FILTER_NONE")); - filter->append_text (M("TP_BWMIX_FILTER_RED")); - filter->append_text (M("TP_BWMIX_FILTER_REDYELLOW")); - filter->append_text (M("TP_BWMIX_FILTER_YELLOW")); - filter->append_text (M("TP_BWMIX_FILTER_GREENYELLOW")); - filter->append_text (M("TP_BWMIX_FILTER_GREEN")); - filter->append_text (M("TP_BWMIX_FILTER_BLUEGREEN")); - filter->append_text (M("TP_BWMIX_FILTER_BLUE")); - filter->append_text (M("TP_BWMIX_FILTER_PURPLE")); + filter->append (M("TP_BWMIX_FILTER_NONE")); + filter->append (M("TP_BWMIX_FILTER_RED")); + filter->append (M("TP_BWMIX_FILTER_REDYELLOW")); + filter->append (M("TP_BWMIX_FILTER_YELLOW")); + filter->append (M("TP_BWMIX_FILTER_GREENYELLOW")); + filter->append (M("TP_BWMIX_FILTER_GREEN")); + filter->append (M("TP_BWMIX_FILTER_BLUEGREEN")); + filter->append (M("TP_BWMIX_FILTER_BLUE")); + filter->append (M("TP_BWMIX_FILTER_PURPLE")); filter->set_active (0); filterHBox->pack_start (*filter); @@ -228,7 +221,6 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB mixerVBox->pack_start (*filterSep2); algoHBox = Gtk::manage (new Gtk::HBox ()); - algoHBox->set_border_width (0); algoHBox->set_spacing (2); algoHBox->set_tooltip_markup (M("TP_BWMIX_ALGO_TOOLTIP")); @@ -236,8 +228,8 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB algoHBox->pack_start (*alLabel, Gtk::PACK_SHRINK); algo = Gtk::manage (new MyComboBoxText ()); - algo->append_text (M("TP_BWMIX_ALGO_LI")); - algo->append_text (M("TP_BWMIX_ALGO_SP")); + algo->append (M("TP_BWMIX_ALGO_LI")); + algo->append (M("TP_BWMIX_ALGO_SP")); algo->set_active (1); algoHBox->pack_start (*algo); mixerVBox->pack_start(*algoHBox); @@ -287,7 +279,6 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB Gtk::VBox *gammaVBox = Gtk::manage (new Gtk::VBox()); gammaVBox->set_spacing(4); - gammaVBox->set_border_width(4); gammaRed = Gtk::manage(new Adjuster (/*M("TP_BWMIX_GAM_RED")*/"", -100, 100, 1, 0, imgIcon[8])); @@ -320,10 +311,10 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB bottomMilestonesbw.push_back( GradientMilestone(1., 1., 1., 1.) ); beforeCurveMode = Gtk::manage (new MyComboBoxText ()); - beforeCurveMode->append_text (M("TP_BWMIX_TCMODE_STANDARD")); - beforeCurveMode->append_text (M("TP_BWMIX_TCMODE_WEIGHTEDSTD")); - beforeCurveMode->append_text (M("TP_BWMIX_TCMODE_FILMLIKE")); - beforeCurveMode->append_text (M("TP_BWMIX_TCMODE_SATANDVALBLENDING")); + beforeCurveMode->append (M("TP_BWMIX_TCMODE_STANDARD")); + beforeCurveMode->append (M("TP_BWMIX_TCMODE_WEIGHTEDSTD")); + beforeCurveMode->append (M("TP_BWMIX_TCMODE_FILMLIKE")); + beforeCurveMode->append (M("TP_BWMIX_TCMODE_SATANDVALBLENDING")); beforeCurveMode->set_active (0); beforeCurveCEG = new CurveEditorGroup (options.lastBWCurvesDir, M("TP_BWMIX_CURVEEDITOR1")); @@ -345,8 +336,8 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB //----------- Curve 2 ------------------------------ /* afterCurveMode = Gtk::manage (new MyComboBoxText ()); - afterCurveMode->append_text (M("TP_BWMIX_TCMODE_STANDARD")); - // afterCurveMode->append_text (M("TP_BWMIX_TCMODE_WEIGHTEDSTD")); + afterCurveMode->append (M("TP_BWMIX_TCMODE_STANDARD")); + // afterCurveMode->append (M("TP_BWMIX_TCMODE_WEIGHTEDSTD")); afterCurveMode->set_active (0); */ afterCurveCEG = new CurveEditorGroup (options.lastBWCurvesDir, M("TP_BWMIX_CURVEEDITOR2")); @@ -373,24 +364,25 @@ BlackWhite::BlackWhite (): FoldableToolPanel(this, "blackwhite", M("TP_BWMIX_LAB } BlackWhite::~BlackWhite () { + idle_register.destroy(); + delete luminanceCEG; delete beforeCurveCEG; delete afterCurveCEG; } -int BWChangedUI (void* data) -{ - GThreadLock lock; - (static_cast(data))->BWComputed_ (); - return 0; -} - void BlackWhite::BWChanged (double redbw, double greenbw, double bluebw) { nextredbw = redbw; nextgreenbw = greenbw; nextbluebw = bluebw; - g_idle_add (BWChangedUI, this); + + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->BWComputed_(); + return FALSE; + }; + + idle_register.add(func, this); } bool BlackWhite::BWComputed_ () @@ -894,7 +886,9 @@ void BlackWhite::neutral_pressed () updateRGBLabel(); - listener->panelChanged (EvNeutralBW, M("ADJUSTER_RESET_TO_DEFAULT")); + if(listener) { + listener->panelChanged (EvNeutralBW, M("ADJUSTER_RESET_TO_DEFAULT")); + } } void BlackWhite::enabledcc_toggled () @@ -1210,17 +1204,17 @@ void BlackWhite::setBatchMode (bool batchMode) gammaRed->showEditedCB (); gammaGreen->showEditedCB (); gammaBlue->showEditedCB (); - method->append_text (M("GENERAL_UNCHANGED")); - filter->append_text (M("GENERAL_UNCHANGED")); - setting->append_text (M("GENERAL_UNCHANGED")); + method->append (M("GENERAL_UNCHANGED")); + filter->append (M("GENERAL_UNCHANGED")); + setting->append (M("GENERAL_UNCHANGED")); luminanceCEG->setBatchMode (batchMode); beforeCurveCEG->setBatchMode (batchMode); beforeCurveCEG->show(); - beforeCurveMode->append_text (M("GENERAL_UNCHANGED")); + beforeCurveMode->append (M("GENERAL_UNCHANGED")); afterCurveCEG->setBatchMode (batchMode); afterCurveCEG->show(); -// afterCurveMode->append_text (M("GENERAL_UNCHANGED")); - algo->append_text (M("GENERAL_UNCHANGED")); +// afterCurveMode->append (M("GENERAL_UNCHANGED")); + algo->append (M("GENERAL_UNCHANGED")); showLuminance(); showFilter(); diff --git a/rtgui/blackwhite.h b/rtgui/blackwhite.h index e38258b04..5f0ffec44 100644 --- a/rtgui/blackwhite.h +++ b/rtgui/blackwhite.h @@ -28,10 +28,64 @@ #include "mycurve.h" #include "colorprovider.h" -class BlackWhite : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel, public rtengine::AutoBWListener, public CurveListener, public ColorProvider +class BlackWhite final : + public ToolParamBlock, + public AdjusterListener, + public FoldableToolPanel, + public rtengine::AutoBWListener, + public CurveListener, + public ColorProvider { +public: + + BlackWhite (); + ~BlackWhite (); + + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); + void setBatchMode (bool batchMode); + void autoOpenCurve (); + void setEditProvider (EditDataProvider *provider); + + void autoch_toggled (); + void neutral_pressed (); + + void updateRGBLabel (); + void adjusterChanged (Adjuster* a, double newval); + void setAdjusterBehavior (bool bwadd, bool bwgadd); + void trimValues (rtengine::procparams::ProcParams* pp); + void enabledcc_toggled (); + void enabledChanged (); + void methodChanged (); + void filterChanged (); + void settingChanged (); + virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller); + void BWChanged (double redbw, double greenbw, double bluebw); + bool BWComputed_ (); + void curveChanged (CurveEditor* ce); + void curveMode1Changed (); + bool curveMode1Changed_ (); + void curveMode1Changed2 (); + bool curveMode1Changed2_ (); + void algoChanged (); + + Glib::ustring getSettingString (); + Glib::ustring getFilterString (); + Glib::ustring getalgoString (); + +private: + void showLuminance(); + void hideLuminance(); + void showFilter(); + void hideFilter(); + void showEnabledCC(); + void hideEnabledCC(); + void showMixer(int nChannels, bool RGBIsSensitive = true); + void hideMixer(); + void showGamma(); + void hideGamma(); -protected: FlatCurveEditor* luminanceCurve; Gtk::HSeparator* luminanceSep; CurveEditorGroup* luminanceCEG; @@ -85,55 +139,7 @@ protected: double nextgreenbw; double nextbluebw; - void showLuminance(); - void hideLuminance(); - void showFilter(); - void hideFilter(); - void showEnabledCC(); - void hideEnabledCC(); - void showMixer(int nChannels, bool RGBIsSensitive = true); - void hideMixer(); - void showGamma(); - void hideGamma(); - -public: - - BlackWhite (); - ~BlackWhite (); - - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); - void setBatchMode (bool batchMode); - void autoOpenCurve (); - void setEditProvider (EditDataProvider *provider); - - void autoch_toggled (); - void neutral_pressed (); - - void updateRGBLabel (); - void adjusterChanged (Adjuster* a, double newval); - void setAdjusterBehavior (bool bwadd, bool bwgadd); - void trimValues (rtengine::procparams::ProcParams* pp); - void enabledcc_toggled (); - void enabledChanged (); - void methodChanged (); - void filterChanged (); - void settingChanged (); - virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller); - void BWChanged (double redbw, double greenbw, double bluebw); - bool BWComputed_ (); - void curveChanged (CurveEditor* ce); - void curveMode1Changed (); - bool curveMode1Changed_ (); - void curveMode1Changed2 (); - bool curveMode1Changed2_ (); - void algoChanged (); - - Glib::ustring getSettingString (); - Glib::ustring getFilterString (); - Glib::ustring getalgoString (); - + IdleRegister idle_register; }; #endif diff --git a/rtgui/bqentryupdater.cc b/rtgui/bqentryupdater.cc index 37ce4c0ef..1bb7e4257 100644 --- a/rtgui/bqentryupdater.cc +++ b/rtgui/bqentryupdater.cc @@ -120,11 +120,11 @@ void BatchQueueEntryUpdater::processThread () int prevh = img->getHeight(); #ifndef NDEBUG - if (current.ow != img->getW() || current.oh != img->getH()) { - printf("WARNING! Expected image size: %dx%d ; image size is: %dx%d\n", current.ow, current.oh, img->getW(), img->getH()); + if (current.ow != img->getWidth() || current.oh != img->getHeight()) { + printf("WARNING! Expected image size: %dx%d ; image size is: %dx%d\n", current.ow, current.oh, img->getWidth(), img->getHeight()); } - assert ((current.ow + 1)*current.oh >= img->getW()*img->getH()); + assert ((current.ow + 1)*current.oh >= img->getWidth()*img->getHeight()); #endif current.ow = prevw; current.oh = prevh; diff --git a/rtgui/browserfilter.cc b/rtgui/browserfilter.cc index 3d43400ba..ab4c843a4 100644 --- a/rtgui/browserfilter.cc +++ b/rtgui/browserfilter.cc @@ -18,11 +18,12 @@ */ #include "browserfilter.h" -BrowserFilter::BrowserFilter () : exifFilterEnabled (false), +BrowserFilter::BrowserFilter () : showTrash (true), showNotTrash (true), showOriginal (false), - multiselect (false) + multiselect (false), + exifFilterEnabled (false) { for (int i = 0; i < 6; i++) { showRanked[i] = true; diff --git a/rtgui/cacheimagedata.cc b/rtgui/cacheimagedata.cc index 220dcb2e8..34983d46a 100644 --- a/rtgui/cacheimagedata.cc +++ b/rtgui/cacheimagedata.cc @@ -203,7 +203,7 @@ int CacheImageData::save (const Glib::ustring& fname) } catch (Glib::Error&) {} keyFile.set_string ("General", "MD5", md5); - keyFile.set_string ("General", "Version", VERSION); // Application's version + keyFile.set_string ("General", "Version", RTVERSION); keyFile.set_boolean ("General", "Supported", supported); keyFile.set_integer ("General", "Format", format); keyFile.set_boolean ("General", "RecentlySaved", recentlySaved); diff --git a/rtgui/cachemanager.cc b/rtgui/cachemanager.cc index 7421711eb..5b18d5d33 100644 --- a/rtgui/cachemanager.cc +++ b/rtgui/cachemanager.cc @@ -19,6 +19,7 @@ #include "cachemanager.h" #include +#include #include #include @@ -35,8 +36,8 @@ namespace { -constexpr auto cacheDirMode = 511; -constexpr auto cacheDirs = { "profiles", "images", "aehistograms", "embprofiles", "data" }; +constexpr int cacheDirMode = 0777; +constexpr const char* cacheDirs[] = { "profiles", "images", "aehistograms", "embprofiles", "data" }; } @@ -296,38 +297,36 @@ void CacheManager::deleteFiles (const Glib::ustring& fname, const std::string& m std::string CacheManager::getMD5 (const Glib::ustring& fname) { - auto file = Gio::File::create_for_path (fname); - - if (file && file->query_exists ()) { - #ifdef WIN32 - std::unique_ptr wfname (reinterpret_cast(g_utf8_to_utf16 (fname.c_str (), -1, NULL, NULL, NULL)), g_free); + std::unique_ptr wfname(reinterpret_cast(g_utf8_to_utf16 (fname.c_str (), -1, NULL, NULL, NULL)), g_free); - WIN32_FILE_ATTRIBUTE_DATA fileAttr; - if (GetFileAttributesExW (wfname.get (), GetFileExInfoStandard, &fileAttr)) { - // We use name, size and creation time to identify a file. - const auto identifier = Glib::ustring::compose ("%1-%2-%3-%4", fileAttr.nFileSizeLow, fileAttr.ftCreationTime.dwHighDateTime, fileAttr.ftCreationTime.dwLowDateTime, fname); - return Glib::Checksum::compute_checksum (Glib::Checksum::CHECKSUM_MD5, identifier); - } + WIN32_FILE_ATTRIBUTE_DATA fileAttr; + if (GetFileAttributesExW(wfname.get(), GetFileExInfoStandard, &fileAttr)) { + // We use name, size and creation time to identify a file. + const auto identifier = Glib::ustring::compose("%1-%2-%3-%4", fileAttr.nFileSizeLow, fileAttr.ftCreationTime.dwHighDateTime, fileAttr.ftCreationTime.dwLowDateTime, fname); + return Glib::Checksum::compute_checksum(Glib::Checksum::CHECKSUM_MD5, identifier); + } #else + const auto file = Gio::File::create_for_path(fname); + if (file) { + try { - - if (auto info = file->query_info ()) { + const auto info = file->query_info("standard::*"); + if (info) { // We only use name and size to identify a file. - const auto identifier = Glib::ustring::compose ("%1%2", fname, info->get_size ()); - return Glib::Checksum::compute_checksum (Glib::Checksum::CHECKSUM_MD5, identifier); + const auto identifier = Glib::ustring::compose("%1%2", fname, info->get_size()); + return Glib::Checksum::compute_checksum(Glib::Checksum::CHECKSUM_MD5, identifier); } } catch(Gio::Error&) {} + } #endif - } - return {}; } diff --git a/rtgui/checkbox.cc b/rtgui/checkbox.cc new file mode 100644 index 000000000..1e3c2b61e --- /dev/null +++ b/rtgui/checkbox.cc @@ -0,0 +1,155 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2017 Jean-Christophe FRISCH + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#include + +#include "multilangmgr.h" +#include "checkbox.h" +#include "guiutils.h" + +CheckBox::CheckBox (Glib::ustring label, bool const& multiImageVal) + : Gtk::CheckButton (label) + , listener (nullptr) + , lastActive (false) + , multiImage (multiImageVal) +{ + conn = signal_toggled().connect( sigc::mem_fun(*this, &CheckBox::buttonToggled) ); +} + +void CheckBox::buttonToggled () +{ + + CheckValue newValue = CheckValue::unchanged; + + if (multiImage) { + if (get_inconsistent()) { + set_inconsistent (false); + ConnectionBlocker bloker (conn); + set_active (false); + newValue = CheckValue::off; + } else if (getLastActive()) { + set_inconsistent (true); + newValue = CheckValue::unchanged; + } + } else { + newValue = get_active () ? CheckValue::on : CheckValue::off; + } + setLastActive(); + + if (listener) { + listener->checkBoxToggled(this, newValue); + } +} + +void CheckBox::setLastActive() +{ + lastActive = get_active(); +} + +// return the actual bool value, ignoring the inconsistent state +bool CheckBox::getLastActive () +{ + return lastActive; +} + +void CheckBox::setValue (CheckValue newValue) +{ + + ConnectionBlocker blocker (conn); + switch (newValue) { + case CheckValue::on: + set_inconsistent (false); + set_active(true); + lastActive = true; + break; + case CheckValue::off: + set_inconsistent (false); + set_active(true); + lastActive = false; + break; + case CheckValue::unchanged: + set_inconsistent (true); + break; + default: + break; + } +} + +void CheckBox::setValue (bool active) +{ + + ConnectionBlocker blocker (conn); + set_inconsistent (false); + set_active(active); + lastActive = active; +} + +CheckValue CheckBox::getValue () +{ + return (get_inconsistent() ? CheckValue::unchanged : get_active() ? CheckValue::on : CheckValue::off); +} + +Glib::ustring CheckBox::getValueAsStr () +{ + if (get_inconsistent()) { + return M("GENERAL_UNCHANGED"); + } else if (get_active ()) { + return M("GENERAL_ENABLED"); + } else { + return M("GENERAL_DISABLED"); + } +} + +/* +void CheckBox::set_sensitive (bool isSensitive) +{ + Gtk::CheckButton::set_sensitive(isSensitive); +} + +void CheckBox::set_tooltip_text (const Glib::ustring& tooltip) +{ + Gtk::CheckButton::set_tooltip_text (tooltip); +} + +void CheckBox::set_tooltip_markup (const Glib::ustring& tooltip) +{ + Gtk::CheckButton::set_tooltip_markup (tooltip); +} +*/ + +void CheckBox::setEdited (bool edited) +{ + + ConnectionBlocker blocker (conn); + set_inconsistent (!edited); + if (edited) { + set_active (lastActive); + } +} + +bool CheckBox::getEdited () +{ + + return !get_inconsistent (); +} + +void CheckBox::setCheckBoxListener (CheckBoxListener* cblistener) +{ + listener = cblistener; +} diff --git a/rtgui/checkbox.h b/rtgui/checkbox.h new file mode 100644 index 000000000..5b3088704 --- /dev/null +++ b/rtgui/checkbox.h @@ -0,0 +1,77 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2017 Jean-Christophe FRISCH + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ +#ifndef _CHECKBOX_H_ +#define _CHECKBOX_H_ + +#include +#include "editedstate.h" +#include "guiutils.h" + +class CheckBox; + +enum class CheckValue { + on, + off, + unchanged +}; + +class CheckBoxListener +{ + +public: + virtual ~CheckBoxListener() {}; + virtual void checkBoxToggled (CheckBox* c, CheckValue newval) {} +}; + + +/** + * @brief subclass of Gtk::CheckButton for convenience + */ +class CheckBox : public Gtk::CheckButton // Should ideally be private, but in this case build fail on the instantiation +{ + + CheckBoxListener *listener; + bool lastActive; + bool const& multiImage; + sigc::connection conn; + void buttonToggled (); + void setLastActive(); + +public: + //using CheckButton::CheckButton; + explicit CheckBox (Glib::ustring label, bool const& multiImageVal); + bool getLastActive(); + void setValue (CheckValue newValue); + void setValue (bool active); + CheckValue getValue (); + void setEdited (bool edited); + bool getEdited (); + Glib::ustring getValueAsStr (); + + void setCheckBoxListener (CheckBoxListener* cblistener); + + /* Used if the Gtk::CheckButton parent class can be private + * + void set_sensitive (bool isSensitive = true); + void set_tooltip_text (const Glib::ustring& tooltip); + void set_tooltip_markup (const Glib::ustring& tooltip); + */ +}; + +#endif diff --git a/rtgui/chmixer.cc b/rtgui/chmixer.cc index 356a274e8..7d71da9a9 100644 --- a/rtgui/chmixer.cc +++ b/rtgui/chmixer.cc @@ -37,7 +37,7 @@ ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL")) Gtk::Label* rlabel = Gtk::manage (new Gtk::Label ()); rlabel->set_markup (Glib::ustring("\t") + M("TP_CHMIXER_RED") + Glib::ustring(":")); - rlabel->set_alignment(Gtk::ALIGN_LEFT); + rlabel->set_alignment(Gtk::ALIGN_START); red[0] = Gtk::manage (new Adjuster ("", -200, 200, 1, 100, imgIcon[0])); red[1] = Gtk::manage (new Adjuster ("", -200, 200, 1, 0, imgIcon[1])); @@ -55,7 +55,7 @@ ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL")) Gtk::Label* glabel = Gtk::manage (new Gtk::Label ()); glabel->set_markup (Glib::ustring("\t") + M("TP_CHMIXER_GREEN") + Glib::ustring(":")); - glabel->set_alignment(Gtk::ALIGN_LEFT); + glabel->set_alignment(Gtk::ALIGN_START); green[0] = Gtk::manage (new Adjuster ("", -200, 200, 1, 0, imgIcon[3])); @@ -74,7 +74,7 @@ ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL")) Gtk::Label* blabel = Gtk::manage (new Gtk::Label ()); blabel->set_markup (Glib::ustring("\t") + M("TP_CHMIXER_BLUE") + Glib::ustring(":")); - blabel->set_alignment(Gtk::ALIGN_LEFT); + blabel->set_alignment(Gtk::ALIGN_START); blue[0] = Gtk::manage (new Adjuster ("", -200, 200, 1, 0, imgIcon[6])); blue[1] = Gtk::manage (new Adjuster ("", -200, 200, 1, 0, imgIcon[7])); blue[2] = Gtk::manage (new Adjuster ("", -200, 200, 1, 100, imgIcon[8])); diff --git a/rtgui/clipboard.cc b/rtgui/clipboard.cc index a1b94a615..dfd78cdd1 100644 --- a/rtgui/clipboard.cc +++ b/rtgui/clipboard.cc @@ -20,7 +20,7 @@ Clipboard clipboard; -Clipboard::Clipboard () : partProfile (false), _hasIPTC(false), hasDiagonalCurveDataType(DCT_Empty), hasFlatCurveDataType(FCT_Empty) {} +Clipboard::Clipboard () : _hasIPTC(false), partProfile (false), hasDiagonalCurveDataType(DCT_Empty), hasFlatCurveDataType(FCT_Empty) {} Clipboard::~Clipboard () { diff --git a/rtgui/coarsepanel.cc b/rtgui/coarsepanel.cc index 63a9251fb..a201b1f7f 100644 --- a/rtgui/coarsepanel.cc +++ b/rtgui/coarsepanel.cc @@ -22,7 +22,7 @@ using namespace rtengine; using namespace rtengine::procparams; -CoarsePanel::CoarsePanel () : ToolPanel () +CoarsePanel::CoarsePanel () : ToolPanel (), oldhflip(false), oldvflip(false) { degree = 0; diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index 356020906..91f58f42e 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -21,15 +21,192 @@ #include "guiutils.h" #include "../rtengine/color.h" +#define MINTEMP0 1500 //1200 +#define MAXTEMP0 12000 //12000 +#define CENTERTEMP0 5000 +#define MINGREEN0 0.8 +#define MAXGREEN0 1.2 + +#define MINLA0 0.01 +#define MAXLA0 16384 +#define CENTERLA0 500 + using namespace rtengine; using namespace rtengine::procparams; -ColorAppearance::ColorAppearance () : FoldableToolPanel(this, "colorappearance", M("TP_COLORAPP_LABEL"), false, true) +static double wbSlider2Temp (double sval) { - CurveListener::setMulti(true); + + // slider range: 0 - 10000 + double temp; + + if (sval <= 5000) { + // linear below center-temp + temp = MINTEMP0 + (sval / 5000.0) * (CENTERTEMP0 - MINTEMP0); + } else { + const double slope = (double) (CENTERTEMP0 - MINTEMP0) / (MAXTEMP0 - CENTERTEMP0); + double x = (sval - 5000) / 5000; // x 0..1 + double y = x * slope + (1.0 - slope) * pow (x, 4.0); + //double y = pow(x, 4.0); + temp = CENTERTEMP0 + y * (MAXTEMP0 - CENTERTEMP0); + } + + if (temp < MINTEMP0) { + temp = MINTEMP0; + } + + if (temp > MAXTEMP0) { + temp = MAXTEMP0; + } + + return temp; +} + +static double wbSlider2la (double sval) +{ + + // slider range: 0 - 10000 + double la; + + if (sval <= 500) { + // linear below center-temp + la = MINLA0 + (sval / 500.0) * (CENTERLA0 - MINLA0); + } else { + const double slope = (double) (CENTERLA0 - MINLA0) / (MAXLA0 - CENTERLA0); + double x = (sval - 500) / 500; // x 0..1 + double y = x * slope + (1.0 - slope) * pow (x, 4.0); + //double y = pow(x, 4.0); + la = CENTERLA0 + y * (MAXLA0 - CENTERLA0); + } + + if (la < MINLA0) { + la = MINLA0; + } + + if (la > MAXLA0) { + la = MAXLA0; + } + + return la; +} + +static double wbla2Slider (double la) +{ + + double sval; + + if (la <= CENTERLA0) { + sval = ((la - MINLA0) / (CENTERLA0 - MINLA0)) * 500.0; + } else { + const double slope = (double) (CENTERLA0 - MINLA0) / (MAXLA0 - CENTERLA0); + const double y = (la - CENTERLA0) / (MAXLA0 - CENTERLA0); + double x = pow (y, 0.25); // rough guess of x, will be a little lower + double k = 0.1; + bool add = true; + + // the y=f(x) function is a mess to invert, therefore we have this trial-refinement loop instead. + // from tests, worst case is about 20 iterations, ie no problem + for (;;) { + double y1 = x * slope + (1.0 - slope) * pow (x, 4.0); + + if (500 * fabs (y1 - y) < 0.1) { + break; + } + + if (y1 < y) { + if (!add) { + k /= 2; + } + + x += k; + add = true; + } else { + if (add) { + k /= 2; + } + + x -= k; + add = false; + } + } + + sval = 500.0 + x * 500.0; + } + + if (sval < 0) { + sval = 0; + } + + if (sval > 16384.) { + sval = 16384.; + } + + return sval; +} + + + +static double wbTemp2Slider (double temp) +{ + + double sval; + + if (temp <= CENTERTEMP0) { + sval = ((temp - MINTEMP0) / (CENTERTEMP0 - MINTEMP0)) * 5000.0; + } else { + const double slope = (double) (CENTERTEMP0 - MINTEMP0) / (MAXTEMP0 - CENTERTEMP0); + const double y = (temp - CENTERTEMP0) / (MAXTEMP0 - CENTERTEMP0); + double x = pow (y, 0.25); // rough guess of x, will be a little lower + double k = 0.1; + bool add = true; + + // the y=f(x) function is a mess to invert, therefore we have this trial-refinement loop instead. + // from tests, worst case is about 20 iterations, ie no problem + for (;;) { + double y1 = x * slope + (1.0 - slope) * pow (x, 4.0); + + if (5000 * fabs (y1 - y) < 0.1) { + break; + } + + if (y1 < y) { + if (!add) { + k /= 2; + } + + x += k; + add = true; + } else { + if (add) { + k /= 2; + } + + x -= k; + add = false; + } + } + + sval = 5000.0 + x * 5000.0; + } + + if (sval < 0) { + sval = 0; + } + + if (sval > 10000) { + sval = 10000; + } + + return sval; +} + + +ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance", M ("TP_COLORAPP_LABEL"), false, true) +{ + CurveListener::setMulti (true); std::vector milestones; - milestones.push_back( GradientMilestone(0., 0., 0., 0.) ); - milestones.push_back( GradientMilestone(1., 1., 1., 1.) ); + milestones.push_back ( GradientMilestone (0., 0., 0., 0.) ); + milestones.push_back ( GradientMilestone (1., 1., 1., 1.) ); // ------------------------ Process #1: Converting to CIECAM @@ -40,54 +217,97 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel(this, "colorappearance", // Vertical box container for the content of the Process 1 frame Gtk::VBox *p1VBox; - p1Frame = Gtk::manage (new Gtk::Frame(M("TP_COLORAPP_LABEL_SCENE")) ); - p1Frame->set_border_width(0); - p1Frame->set_label_align(0.025, 0.5); + p1Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_SCENE")) ); + p1Frame->set_label_align (0.025, 0.5); p1VBox = Gtk::manage ( new Gtk::VBox()); - p1VBox->set_border_width(4); - p1VBox->set_spacing(2); + p1VBox->set_spacing (2); - degree = Gtk::manage (new Adjuster (M("TP_COLORAPP_CIECAT_DEGREE"), 0., 100., 1., 100.)); + degree = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CIECAT_DEGREE"), 0., 100., 1., 100.)); if (degree->delay < options.adjusterMaxDelay) { degree->delay = options.adjusterMaxDelay; } degree->throwOnButtonRelease(); - degree->addAutoButton(M("TP_COLORAPP_DEGREE_AUTO_TOOLTIP")); - degree->set_tooltip_markup (M("TP_COLORAPP_DEGREE_TOOLTIP")); + degree->addAutoButton (M ("TP_COLORAPP_DEGREE_AUTO_TOOLTIP")); + degree->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); p1VBox->pack_start (*degree); - surrsource = Gtk::manage (new Gtk::CheckButton (M("TP_COLORAPP_SURSOURCE"))); - surrsource->set_tooltip_markup (M("TP_COLORAPP_SURSOURCE_TOOLTIP")); - p1VBox->pack_start (*surrsource, Gtk::PACK_SHRINK); + // surrsource = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_SURSOURCE"))); + // surrsource->set_tooltip_markup (M ("TP_COLORAPP_SURSOURCE_TOOLTIP")); + + + Gtk::HBox* surrHBox1 = Gtk::manage (new Gtk::HBox ()); + surrHBox1->set_spacing (2); + surrHBox1->set_tooltip_markup (M ("TP_COLORAPP_SURROUND_TOOLTIP")); + Gtk::Label* surrLabel1 = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_SURROUND") + ":")); + surrHBox1->pack_start (*surrLabel1, Gtk::PACK_SHRINK); + surrsrc = Gtk::manage (new MyComboBoxText ()); + surrsrc->append (M ("TP_COLORAPP_SURROUND_AVER")); + surrsrc->append (M ("TP_COLORAPP_SURROUND_DIM")); + surrsrc->append (M ("TP_COLORAPP_SURROUND_DARK")); + surrsrc->append (M ("TP_COLORAPP_SURROUND_EXDARK")); + surrsrc->set_active (0); + surrHBox1->pack_start (*surrsrc); + p1VBox->pack_start (*surrHBox1); + +// p1VBox->pack_start (*surrsource, Gtk::PACK_SHRINK); Gtk::HBox* wbmHBox = Gtk::manage (new Gtk::HBox ()); - wbmHBox->set_border_width (0); wbmHBox->set_spacing (2); - wbmHBox->set_tooltip_markup (M("TP_COLORAPP_MODEL_TOOLTIP")); - Gtk::Label* wbmLab = Gtk::manage (new Gtk::Label (M("TP_COLORAPP_MODEL") + ":")); + wbmHBox->set_tooltip_markup (M ("TP_COLORAPP_MODEL_TOOLTIP")); + Gtk::Label* wbmLab = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_MODEL") + ":")); wbmHBox->pack_start (*wbmLab, Gtk::PACK_SHRINK); wbmodel = Gtk::manage (new MyComboBoxText ()); - wbmodel->append_text (M("TP_COLORAPP_WBRT")); - wbmodel->append_text (M("TP_COLORAPP_WBCAM")); + wbmodel->append (M ("TP_COLORAPP_WBRT")); + wbmodel->append (M ("TP_COLORAPP_WBCAM")); + wbmodel->append (M ("TP_COLORAPP_FREE")); + wbmodel->set_active (0); wbmHBox->pack_start (*wbmodel); p1VBox->pack_start (*wbmHBox); - adapscen = Gtk::manage (new Adjuster (M("TP_COLORAPP_ADAPTSCENE"), 0.001, 16384., 0.001, 2000.));// EV -7 ==> EV 17 + Gtk::Image* itempL = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* itempR = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* igreenL = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + + + tempsc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempL, itempR, &wbSlider2Temp, &wbTemp2Slider)); + greensc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenL, igreenR)); + tempsc->set_tooltip_markup (M ("TP_COLORAPP_TEMP_TOOLTIP")); + + tempsc->show(); + greensc->show(); + p1VBox->pack_start (*tempsc); + p1VBox->pack_start (*greensc); + + +// adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), 0.01, 16384., 0.001, 2000.)); // EV -7 ==> EV 17 + adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), MINLA0, MAXLA0, 0.01, 1997.4, NULL, NULL, &wbSlider2la, &wbla2Slider)); if (adapscen->delay < options.adjusterMaxDelay) { adapscen->delay = options.adjusterMaxDelay; } adapscen->throwOnButtonRelease(); - adapscen->addAutoButton(M("TP_COLORAPP_ADAP_AUTO_TOOLTIP")); - adapscen->set_tooltip_markup (M("TP_COLORAPP_ADAPTSCENE_TOOLTIP")); + adapscen->addAutoButton (M ("TP_COLORAPP_ADAP_AUTO_TOOLTIP")); + adapscen->set_tooltip_markup (M ("TP_COLORAPP_ADAPTSCENE_TOOLTIP")); p1VBox->pack_start (*adapscen); - p1Frame->add(*p1VBox); + ybscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YBSCENE"), 1, 90, 1, 18)); + + if (ybscen->delay < options.adjusterMaxDelay) { + ybscen->delay = options.adjusterMaxDelay; + } + + ybscen->throwOnButtonRelease(); + ybscen->addAutoButton (M ("TP_COLORAPP_ADAP_AUTO_TOOLTIP")); + ybscen->set_tooltip_markup (M ("TP_COLORAPP_YBSCENE_TOOLTIP")); + p1VBox->pack_start (*ybscen); + + p1Frame->add (*p1VBox); pack_start (*p1Frame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -95,130 +315,134 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel(this, "colorappearance", // Process 1 frame - Gtk::Frame *p2Frame; - // Vertical box container for the content of the Process 1 frame + + expadjust = Gtk::manage (new MyExpander (false, M ("TP_COLORAPP_LABEL_CAM02"))); + setExpandAlignProperties (expadjust, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + expadjust->signal_button_release_event().connect_notify ( sigc::bind ( sigc::mem_fun (this, &ColorAppearance::foldAllButMe), expadjust) ); + /* + Gtk::Frame *p2Frame; + // Vertical box container for the content of the Process 1 frame + Gtk::VBox *p2VBox; + + p2Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_CAM02")) ); + p2Frame->set_label_align (0.025, 0.5); + */ Gtk::VBox *p2VBox; - p2Frame = Gtk::manage (new Gtk::Frame(M("TP_COLORAPP_LABEL_CAM02")) ); - p2Frame->set_border_width(0); - p2Frame->set_label_align(0.025, 0.5); - p2VBox = Gtk::manage ( new Gtk::VBox()); - p2VBox->set_border_width(4); - p2VBox->set_spacing(2); + p2VBox->set_spacing (2); Gtk::HBox* alHBox = Gtk::manage (new Gtk::HBox ()); - alHBox->set_border_width (0); alHBox->set_spacing (2); - alHBox->set_tooltip_markup (M("TP_COLORAPP_ALGO_TOOLTIP")); - Gtk::Label* alLabel = Gtk::manage (new Gtk::Label (M("TP_COLORAPP_ALGO") + ":")); + alHBox->set_tooltip_markup (M ("TP_COLORAPP_ALGO_TOOLTIP")); + Gtk::Label* alLabel = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_ALGO") + ":")); alHBox->pack_start (*alLabel, Gtk::PACK_SHRINK); algo = Gtk::manage (new MyComboBoxText ()); - algo->append_text (M("TP_COLORAPP_ALGO_JC")); - algo->append_text (M("TP_COLORAPP_ALGO_JS")); - algo->append_text (M("TP_COLORAPP_ALGO_QM")); - algo->append_text (M("TP_COLORAPP_ALGO_ALL")); + algo->append (M ("TP_COLORAPP_ALGO_JC")); + algo->append (M ("TP_COLORAPP_ALGO_JS")); + algo->append (M ("TP_COLORAPP_ALGO_QM")); + algo->append (M ("TP_COLORAPP_ALGO_ALL")); algo->set_active (0); alHBox->pack_start (*algo); p2VBox->pack_start (*alHBox); p2VBox->pack_start (*Gtk::manage (new Gtk::HSeparator()), Gtk::PACK_EXPAND_WIDGET, 4); - jlight = Gtk::manage (new Adjuster (M("TP_COLORAPP_LIGHT"), -100.0, 100.0, 0.1, 0.)); + jlight = Gtk::manage (new Adjuster (M ("TP_COLORAPP_LIGHT"), -100.0, 100.0, 0.1, 0.)); if (jlight->delay < options.adjusterMaxDelay) { jlight->delay = options.adjusterMaxDelay; } jlight->throwOnButtonRelease(); - jlight->set_tooltip_markup (M("TP_COLORAPP_LIGHT_TOOLTIP")); + jlight->set_tooltip_markup (M ("TP_COLORAPP_LIGHT_TOOLTIP")); p2VBox->pack_start (*jlight); - qbright = Gtk::manage (new Adjuster (M("TP_COLORAPP_BRIGHT"), -100.0, 100.0, 0.1, 0.)); + qbright = Gtk::manage (new Adjuster (M ("TP_COLORAPP_BRIGHT"), -100.0, 100.0, 0.1, 0.)); if (qbright->delay < options.adjusterMaxDelay) { qbright->delay = options.adjusterMaxDelay; } qbright->throwOnButtonRelease(); - qbright->set_tooltip_markup (M("TP_COLORAPP_BRIGHT_TOOLTIP")); + qbright->set_tooltip_markup (M ("TP_COLORAPP_BRIGHT_TOOLTIP")); p2VBox->pack_start (*qbright); - chroma = Gtk::manage (new Adjuster (M("TP_COLORAPP_CHROMA"), -100.0, 100.0, 0.1, 0.)); + chroma = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CHROMA"), -100.0, 100.0, 0.1, 0.)); if (chroma->delay < options.adjusterMaxDelay) { chroma->delay = options.adjusterMaxDelay; } chroma->throwOnButtonRelease(); - chroma->set_tooltip_markup (M("TP_COLORAPP_CHROMA_TOOLTIP")); + chroma->set_tooltip_markup (M ("TP_COLORAPP_CHROMA_TOOLTIP")); p2VBox->pack_start (*chroma); - schroma = Gtk::manage (new Adjuster (M("TP_COLORAPP_CHROMA_S"), -100.0, 100.0, 0.1, 0.)); + schroma = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CHROMA_S"), -100.0, 100.0, 0.1, 0.)); if (schroma->delay < options.adjusterMaxDelay) { schroma->delay = options.adjusterMaxDelay; } schroma->throwOnButtonRelease(); - schroma->set_tooltip_markup (M("TP_COLORAPP_CHROMA_S_TOOLTIP")); + schroma->set_tooltip_markup (M ("TP_COLORAPP_CHROMA_S_TOOLTIP")); p2VBox->pack_start (*schroma); - mchroma = Gtk::manage (new Adjuster (M("TP_COLORAPP_CHROMA_M"), -100.0, 100.0, 0.1, 0.)); + mchroma = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CHROMA_M"), -100.0, 100.0, 0.1, 0.)); if (mchroma->delay < options.adjusterMaxDelay) { mchroma->delay = options.adjusterMaxDelay; } mchroma->throwOnButtonRelease(); - mchroma->set_tooltip_markup (M("TP_COLORAPP_CHROMA_M_TOOLTIP")); + mchroma->set_tooltip_markup (M ("TP_COLORAPP_CHROMA_M_TOOLTIP")); p2VBox->pack_start (*mchroma); - rstprotection = Gtk::manage ( new Adjuster (M("TP_COLORAPP_RSTPRO"), 0., 100., 0.1, 0.) ); + rstprotection = Gtk::manage ( new Adjuster (M ("TP_COLORAPP_RSTPRO"), 0., 100., 0.1, 0.) ); if (rstprotection->delay < options.adjusterMaxDelay) { rstprotection->delay = options.adjusterMaxDelay; } rstprotection->throwOnButtonRelease(); - rstprotection->set_tooltip_markup (M("TP_COLORAPP_RSTPRO_TOOLTIP")); + rstprotection->set_tooltip_markup (M ("TP_COLORAPP_RSTPRO_TOOLTIP")); p2VBox->pack_start (*rstprotection); - contrast = Gtk::manage (new Adjuster (M("TP_COLORAPP_CONTRAST"), -100.0, 100.0, 0.1, 0.)); + contrast = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CONTRAST"), -100.0, 100.0, 0.1, 0.)); if (contrast->delay < options.adjusterMaxDelay) { contrast->delay = options.adjusterMaxDelay; } contrast->throwOnButtonRelease(); - contrast->set_tooltip_markup (M("TP_COLORAPP_CONTRAST_TOOLTIP")); + contrast->set_tooltip_markup (M ("TP_COLORAPP_CONTRAST_TOOLTIP")); p2VBox->pack_start (*contrast); - qcontrast = Gtk::manage (new Adjuster (M("TP_COLORAPP_CONTRAST_Q"), -100.0, 100.0, 0.1, 0.)); + qcontrast = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CONTRAST_Q"), -100.0, 100.0, 0.1, 0.)); if (qcontrast->delay < options.adjusterMaxDelay) { qcontrast->delay = options.adjusterMaxDelay; } qcontrast->throwOnButtonRelease(); - qcontrast->set_tooltip_markup (M("TP_COLORAPP_CONTRAST_Q_TOOLTIP")); + qcontrast->set_tooltip_markup (M ("TP_COLORAPP_CONTRAST_Q_TOOLTIP")); p2VBox->pack_start (*qcontrast); - colorh = Gtk::manage (new Adjuster (M("TP_COLORAPP_HUE"), -100.0, 100.0, 0.1, 0.)); + colorh = Gtk::manage (new Adjuster (M ("TP_COLORAPP_HUE"), -100.0, 100.0, 0.1, 0.)); if (colorh->delay < options.adjusterMaxDelay) { colorh->delay = options.adjusterMaxDelay; } colorh->throwOnButtonRelease(); - colorh->set_tooltip_markup (M("TP_COLORAPP_HUE_TOOLTIP")); + colorh->set_tooltip_markup (M ("TP_COLORAPP_HUE_TOOLTIP")); p2VBox->pack_start (*colorh); - tonecie = Gtk::manage (new Gtk::CheckButton (M("TP_COLORAPP_TONECIE"))); - tonecie->set_tooltip_markup (M("TP_COLORAPP_TONECIE_TOOLTIP")); - tonecieconn = tonecie->signal_toggled().connect( sigc::mem_fun(*this, &ColorAppearance::tonecie_toggled) ); + tonecie = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_TONECIE"))); + tonecie->set_tooltip_markup (M ("TP_COLORAPP_TONECIE_TOOLTIP")); + tonecieconn = tonecie->signal_toggled().connect ( sigc::mem_fun (*this, &ColorAppearance::tonecie_toggled) ); p2VBox->pack_start (*tonecie); /* sharpcie = Gtk::manage (new Gtk::CheckButton (M("TP_COLORAPP_SHARPCIE"))); @@ -229,52 +453,52 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel(this, "colorappearance", p2VBox->pack_start (*Gtk::manage (new Gtk::HSeparator()), Gtk::PACK_EXPAND_WIDGET, 4); toneCurveMode = Gtk::manage (new MyComboBoxText ()); - toneCurveMode->append_text (M("TP_COLORAPP_TCMODE_LIGHTNESS")); - toneCurveMode->append_text (M("TP_COLORAPP_TCMODE_BRIGHTNESS")); + toneCurveMode->append (M ("TP_COLORAPP_TCMODE_LIGHTNESS")); + toneCurveMode->append (M ("TP_COLORAPP_TCMODE_BRIGHTNESS")); toneCurveMode->set_active (0); - toneCurveMode->set_tooltip_text(M("TP_COLORAPP_TCMODE_LABEL1")); + toneCurveMode->set_tooltip_text (M ("TP_COLORAPP_TCMODE_LABEL1")); - curveEditorG = new CurveEditorGroup (options.lastToneCurvesDir, M("TP_COLORAPP_CURVEEDITOR1")); + curveEditorG = new CurveEditorGroup (options.lastToneCurvesDir, M ("TP_COLORAPP_CURVEEDITOR1")); curveEditorG->setCurveListener (this); - curveEditorG->setTooltip(M("TP_COLORAPP_CURVEEDITOR1_TOOLTIP")); + curveEditorG->setTooltip (M ("TP_COLORAPP_CURVEEDITOR1_TOOLTIP")); - shape = static_cast(curveEditorG->addCurve(CT_Diagonal, "", toneCurveMode)); + shape = static_cast (curveEditorG->addCurve (CT_Diagonal, "", toneCurveMode)); - tcmodeconn = toneCurveMode->signal_changed().connect( sigc::mem_fun(*this, &ColorAppearance::curveMode1Changed), true ); + tcmodeconn = toneCurveMode->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::curveMode1Changed), true ); toneCurveMode2 = Gtk::manage (new MyComboBoxText ()); - toneCurveMode2->append_text (M("TP_COLORAPP_TCMODE_LIGHTNESS")); - toneCurveMode2->append_text (M("TP_COLORAPP_TCMODE_BRIGHTNESS")); + toneCurveMode2->append (M ("TP_COLORAPP_TCMODE_LIGHTNESS")); + toneCurveMode2->append (M ("TP_COLORAPP_TCMODE_BRIGHTNESS")); toneCurveMode2->set_active (0); - toneCurveMode2->set_tooltip_text(M("TP_COLORAPP_TCMODE_LABEL2")); + toneCurveMode2->set_tooltip_text (M ("TP_COLORAPP_TCMODE_LABEL2")); - curveEditorG2 = new CurveEditorGroup (options.lastToneCurvesDir, M("TP_COLORAPP_CURVEEDITOR2")); + curveEditorG2 = new CurveEditorGroup (options.lastToneCurvesDir, M ("TP_COLORAPP_CURVEEDITOR2")); curveEditorG2->setCurveListener (this); - shape2 = static_cast(curveEditorG2->addCurve(CT_Diagonal, "", toneCurveMode2)); + shape2 = static_cast (curveEditorG2->addCurve (CT_Diagonal, "", toneCurveMode2)); - tcmode2conn = toneCurveMode2->signal_changed().connect( sigc::mem_fun(*this, &ColorAppearance::curveMode2Changed), true ); + tcmode2conn = toneCurveMode2->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::curveMode2Changed), true ); toneCurveMode3 = Gtk::manage (new MyComboBoxText ()); - toneCurveMode3->append_text (M("TP_COLORAPP_TCMODE_CHROMA")); - toneCurveMode3->append_text (M("TP_COLORAPP_TCMODE_SATUR")); - toneCurveMode3->append_text (M("TP_COLORAPP_TCMODE_COLORF")); + toneCurveMode3->append (M ("TP_COLORAPP_TCMODE_CHROMA")); + toneCurveMode3->append (M ("TP_COLORAPP_TCMODE_SATUR")); + toneCurveMode3->append (M ("TP_COLORAPP_TCMODE_COLORF")); toneCurveMode3->set_active (0); - toneCurveMode3->set_tooltip_text(M("TP_COLORAPP_TCMODE_LABEL3")); + toneCurveMode3->set_tooltip_text (M ("TP_COLORAPP_TCMODE_LABEL3")); - curveEditorG3 = new CurveEditorGroup (options.lastToneCurvesDir, M("TP_COLORAPP_CURVEEDITOR3")); + curveEditorG3 = new CurveEditorGroup (options.lastToneCurvesDir, M ("TP_COLORAPP_CURVEEDITOR3")); curveEditorG3->setCurveListener (this); - shape3 = static_cast(curveEditorG3->addCurve(CT_Diagonal, "", toneCurveMode3)); - shape3->setRangeLabels( - M("TP_LABCURVE_CURVEEDITOR_CC_RANGE1"), M("TP_LABCURVE_CURVEEDITOR_CC_RANGE2"), - M("TP_LABCURVE_CURVEEDITOR_CC_RANGE3"), M("TP_LABCURVE_CURVEEDITOR_CC_RANGE4") + shape3 = static_cast (curveEditorG3->addCurve (CT_Diagonal, "", toneCurveMode3)); + shape3->setRangeLabels ( + M ("TP_LABCURVE_CURVEEDITOR_CC_RANGE1"), M ("TP_LABCURVE_CURVEEDITOR_CC_RANGE2"), + M ("TP_LABCURVE_CURVEEDITOR_CC_RANGE3"), M ("TP_LABCURVE_CURVEEDITOR_CC_RANGE4") ); - shape3->setBottomBarColorProvider(this, 1); - shape3->setLeftBarColorProvider(this, 1); - shape3->setRangeDefaultMilestones(0.05, 0.2, 0.58); + shape3->setBottomBarColorProvider (this, 1); + shape3->setLeftBarColorProvider (this, 1); + shape3->setRangeDefaultMilestones (0.05, 0.2, 0.58); // shape3->setBottomBarColorProvider(this, 2); @@ -284,54 +508,56 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel(this, "colorappearance", // The milestones are still the same than those define above //milestones.push_back( GradientMilestone(0., 0., 0., 0.) ); //milestones.push_back( GradientMilestone(1., 1., 1., 1.) ); - shape->setBottomBarBgGradient(milestones); - shape->setLeftBarBgGradient(milestones); - shape2->setBottomBarBgGradient(milestones); - shape2->setLeftBarBgGradient(milestones); + shape->setBottomBarBgGradient (milestones); + shape->setLeftBarBgGradient (milestones); + shape2->setBottomBarBgGradient (milestones); + shape2->setLeftBarBgGradient (milestones); std::vector shape3Milestones; float R, G, B; for (int i = 0; i < 7; i++) { - float x = float(i) * (1.0f / 6.0); - Color::hsv2rgb01(x, 0.5f, 0.5f, R, G, B); - shape3Milestones.push_back( GradientMilestone(double(x), double(R), double(G), double(B)) ); + float x = float (i) * (1.0f / 6.0); + Color::hsv2rgb01 (x, 0.5f, 0.5f, R, G, B); + shape3Milestones.push_back ( GradientMilestone (double (x), double (R), double (G), double (B)) ); } - shape3->setBottomBarBgGradient(shape3Milestones); - shape3->setLeftBarBgGradient(shape3Milestones); + shape3->setBottomBarBgGradient (shape3Milestones); + shape3->setLeftBarBgGradient (shape3Milestones); - shape3->setRangeDefaultMilestones(0.05, 0.2, 0.58); + shape3->setRangeDefaultMilestones (0.05, 0.2, 0.58); curveEditorG->curveListComplete(); curveEditorG2->curveListComplete(); - curveEditorG2->setTooltip(M("TP_COLORAPP_CURVEEDITOR2_TOOLTIP")); + curveEditorG2->setTooltip (M ("TP_COLORAPP_CURVEEDITOR2_TOOLTIP")); curveEditorG3->curveListComplete(); - curveEditorG3->setTooltip(M("TP_COLORAPP_CURVEEDITOR3_TOOLTIP")); - tcmode3conn = toneCurveMode3->signal_changed().connect( sigc::mem_fun(*this, &ColorAppearance::curveMode3Changed), true ); + curveEditorG3->setTooltip (M ("TP_COLORAPP_CURVEEDITOR3_TOOLTIP")); + tcmode3conn = toneCurveMode3->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::curveMode3Changed), true ); - p2VBox->pack_start( *curveEditorG, Gtk::PACK_SHRINK, 2); - p2VBox->pack_start( *curveEditorG2, Gtk::PACK_SHRINK, 2); - p2VBox->pack_start( *curveEditorG3, Gtk::PACK_SHRINK, 2); + p2VBox->pack_start ( *curveEditorG, Gtk::PACK_SHRINK, 2); + p2VBox->pack_start ( *curveEditorG2, Gtk::PACK_SHRINK, 2); + p2VBox->pack_start ( *curveEditorG3, Gtk::PACK_SHRINK, 2); // ------------------------ Choice CIECAM data - datacie = Gtk::manage (new Gtk::CheckButton (M("TP_COLORAPP_DATACIE"))); - datacie->set_tooltip_markup (M("TP_COLORAPP_DATACIE_TOOLTIP")); - datacieconn = datacie->signal_toggled().connect( sigc::mem_fun(*this, &ColorAppearance::datacie_toggled) ); + datacie = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_DATACIE"))); + datacie->set_tooltip_markup (M ("TP_COLORAPP_DATACIE_TOOLTIP")); + datacieconn = datacie->signal_toggled().connect ( sigc::mem_fun (*this, &ColorAppearance::datacie_toggled) ); p2VBox->pack_start (*datacie); //------------------------- - p2Frame->add(*p2VBox); +// p2Frame->add (*p2VBox); + expadjust->add (*p2VBox, false); + expadjust->setLevel (2); + pack_start (*expadjust); - - pack_start (*p2Frame, Gtk::PACK_EXPAND_WIDGET, 4); +// pack_start (*p2Frame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -343,49 +569,82 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel(this, "colorappearance", // Vertical box container for the content of the Process 3 frame Gtk::VBox *p3VBox; - p3Frame = Gtk::manage (new Gtk::Frame(M("TP_COLORAPP_LABEL_VIEWING")) ); // "Editing viewing conditions" ??? - p3Frame->set_border_width(0); - p3Frame->set_label_align(0.025, 0.5); + p3Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_VIEWING")) ); // "Editing viewing conditions" ??? + p3Frame->set_label_align (0.025, 0.5); p3VBox = Gtk::manage ( new Gtk::VBox()); - p3VBox->set_border_width(4); - p3VBox->set_spacing(2); + p3VBox->set_spacing (2); - adaplum = Gtk::manage (new Adjuster (M("TP_COLORAPP_ADAPTVIEWING"), 0.1, 1000., 0.1, 16.)); + Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); +// adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 16384., 0.1, 16.)); + adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), MINLA0, MAXLA0, 0.01, 16, NULL, NULL, &wbSlider2la, &wbla2Slider)); if (adaplum->delay < options.adjusterMaxDelay) { adaplum->delay = options.adjusterMaxDelay; } adaplum->throwOnButtonRelease(); - adaplum->set_tooltip_markup (M("TP_COLORAPP_ADAPTVIEWING_TOOLTIP")); + adaplum->set_tooltip_markup (M ("TP_COLORAPP_ADAPTVIEWING_TOOLTIP")); p3VBox->pack_start (*adaplum); +// Gtk::Image* iblueredL = Gtk::manage (new RTImage ("ajd-wb-bluered1.png")); +// Gtk::Image* iblueredR = Gtk::manage (new RTImage ("ajd-wb-bluered2.png")); + + degreeout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CIECAT_DEGREE"), 0., 100., 1., 100.)); + + if (degreeout->delay < options.adjusterMaxDelay) { + degreeout->delay = options.adjusterMaxDelay; + } + + degreeout->throwOnButtonRelease(); + degreeout->addAutoButton (M ("TP_COLORAPP_DEGREE_AUTO_TOOLTIP")); + degreeout->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); + p3VBox->pack_start (*degreeout); + /* + Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + */ + tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider)); + 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_YB"), 5, 90, 1, 18)); + tempout->set_tooltip_markup (M ("TP_COLORAPP_TEMP_TOOLTIP")); + + tempout->show(); + greenout->show(); + ybout->show(); + p3VBox->pack_start (*tempout); + p3VBox->pack_start (*greenout); + p3VBox->pack_start (*ybout); + Gtk::HBox* surrHBox = Gtk::manage (new Gtk::HBox ()); - surrHBox->set_border_width (0); surrHBox->set_spacing (2); - surrHBox->set_tooltip_markup(M("TP_COLORAPP_SURROUND_TOOLTIP")); - Gtk::Label* surrLabel = Gtk::manage (new Gtk::Label (M("TP_COLORAPP_SURROUND") + ":")); + surrHBox->set_tooltip_markup (M ("TP_COLORAPP_SURROUND_TOOLTIP")); + Gtk::Label* surrLabel = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_SURROUND") + ":")); surrHBox->pack_start (*surrLabel, Gtk::PACK_SHRINK); surround = Gtk::manage (new MyComboBoxText ()); - surround->append_text (M("TP_COLORAPP_SURROUND_AVER")); - surround->append_text (M("TP_COLORAPP_SURROUND_DIM")); - surround->append_text (M("TP_COLORAPP_SURROUND_DARK")); - surround->append_text (M("TP_COLORAPP_SURROUND_EXDARK")); + surround->append (M ("TP_COLORAPP_SURROUND_AVER")); + surround->append (M ("TP_COLORAPP_SURROUND_DIM")); + surround->append (M ("TP_COLORAPP_SURROUND_DARK")); + surround->append (M ("TP_COLORAPP_SURROUND_EXDARK")); surround->set_active (1); surrHBox->pack_start (*surround); p3VBox->pack_start (*surrHBox); - p3Frame->add(*p3VBox); + p3Frame->add (*p3VBox); pack_start (*p3Frame, Gtk::PACK_EXPAND_WIDGET, 4); // ------------------------ Lab Gamut control - gamut = Gtk::manage (new Gtk::CheckButton (M("TP_COLORAPP_GAMUT"))); - gamut->set_tooltip_markup (M("TP_COLORAPP_GAMUT_TOOLTIP")); - gamutconn = gamut->signal_toggled().connect( sigc::mem_fun(*this, &ColorAppearance::gamut_toggled) ); + gamut = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_GAMUT"))); + gamut->set_tooltip_markup (M ("TP_COLORAPP_GAMUT_TOOLTIP")); + gamutconn = gamut->signal_toggled().connect ( sigc::mem_fun (*this, &ColorAppearance::gamut_toggled) ); pack_start (*gamut, Gtk::PACK_SHRINK); // ------------------------ Bad pixel control @@ -396,26 +655,44 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel(this, "colorappearance", badpixconn = badpix->signal_toggled().connect( sigc::mem_fun(*this, &ColorAppearance::badpix_toggled) ); pack_start (*badpix, Gtk::PACK_SHRINK); */ - badpixsl = Gtk::manage (new Adjuster (M("TP_COLORAPP_BADPIXSL"), 0, 2, 1, 0)); + badpixsl = Gtk::manage (new Adjuster (M ("TP_COLORAPP_BADPIXSL"), 0, 2, 1, 0)); if (badpixsl->delay < options.adjusterMaxDelay) { badpixsl->delay = options.adjusterMaxDelay; } badpixsl->throwOnButtonRelease(); - badpixsl->set_tooltip_markup (M("TP_COLORAPP_BADPIXSL_TOOLTIP")); + badpixsl->set_tooltip_markup (M ("TP_COLORAPP_BADPIXSL_TOOLTIP")); pack_start (*badpixsl, Gtk::PACK_SHRINK); + + //reset button + neutral = Gtk::manage (new Gtk::Button (M ("TP_COLORAPP_NEUTRAL"))); + setExpandAlignProperties (neutral, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); + setExpandAlignProperties (resetImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + neutral->set_image (*resetImg); + neutral->set_tooltip_text (M ("TP_COLORAPP_NEUTRAL_TIP")); + neutralconn = neutral->signal_pressed().connect ( sigc::mem_fun (*this, &ColorAppearance::neutral_pressed) ); + neutral->show(); + + //------------- + + pack_start (*neutral); + // ------------------------ Listening events - surrconn = surrsource->signal_toggled().connect( sigc::mem_fun(*this, &ColorAppearance::surrsource_toggled) ); - wbmodelconn = wbmodel->signal_changed().connect ( sigc::mem_fun(*this, &ColorAppearance::wbmodelChanged) ); - algoconn = algo->signal_changed().connect ( sigc::mem_fun(*this, &ColorAppearance::algoChanged) ); - surroundconn = surround->signal_changed().connect ( sigc::mem_fun(*this, &ColorAppearance::surroundChanged) ); +// surrconn = surrsource->signal_toggled().connect ( sigc::mem_fun (*this, &ColorAppearance::surrsource_toggled) ); + wbmodelconn = wbmodel->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::wbmodelChanged) ); + algoconn = algo->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::algoChanged) ); + surroundconn = surround->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::surroundChanged) ); + surrsrcconn = surrsrc->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::surrsrcChanged) ); degree->setAdjusterListener (this); + degreeout->setAdjusterListener (this); adapscen->setAdjusterListener (this); + ybscen->setAdjusterListener (this); adaplum->setAdjusterListener (this); badpixsl->setAdjusterListener (this); jlight->setAdjusterListener (this); @@ -427,25 +704,87 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel(this, "colorappearance", contrast->setAdjusterListener (this); qcontrast->setAdjusterListener (this); rstprotection->setAdjusterListener (this); + tempout->setAdjusterListener (this); + greenout->setAdjusterListener (this); + ybout->setAdjusterListener (this); + tempsc->setAdjusterListener (this); + greensc->setAdjusterListener (this); + show_all(); } ColorAppearance::~ColorAppearance () { + idle_register.destroy(); + delete curveEditorG; delete curveEditorG2; delete curveEditorG3; } +void ColorAppearance::foldAllButMe (GdkEventButton* event, MyExpander *expander) +{ + if (event->button == 3) { + expadjust->set_expanded (expadjust == expander); + } +} +void ColorAppearance::writeOptions (std::vector &tpOpen) +{ + tpOpen.push_back (expadjust->get_expanded ()); +} -bool ColorAppearance::bgTTipQuery(int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip) +void ColorAppearance::updateToolState (std::vector &tpOpen) +{ + if (tpOpen.size() >= 1) { + expadjust->set_expanded (tpOpen.at (0)); + } +} + +void ColorAppearance::neutral_pressed () +{ + 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); +} + +bool ColorAppearance::bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip) { return true; } -bool ColorAppearance::srTTipQuery(int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip) +bool ColorAppearance::srTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip) { return true; } @@ -454,20 +793,22 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) { disableListener (); - tcmodeconn.block(true); - tcmode2conn.block(true); - tcmode3conn.block(true); + tcmodeconn.block (true); + tcmode2conn.block (true); + tcmode3conn.block (true); shape->setCurve (pp->colorappearance.curve); shape2->setCurve (pp->colorappearance.curve2); shape3->setCurve (pp->colorappearance.curve3); - toneCurveMode->set_active(pp->colorappearance.curveMode); - toneCurveMode2->set_active(pp->colorappearance.curveMode2); - toneCurveMode3->set_active(pp->colorappearance.curveMode3); + toneCurveMode->set_active (pp->colorappearance.curveMode); + toneCurveMode2->set_active (pp->colorappearance.curveMode2); + toneCurveMode3->set_active (pp->colorappearance.curveMode3); curveMode3Changed(); // This will set the correct sensitive state of depending Adjusters if (pedited) { degree->setEditedState (pedited->colorappearance.degree ? Edited : UnEdited); + degreeout->setEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited); adapscen->setEditedState (pedited->colorappearance.adapscen ? Edited : UnEdited); + ybscen->setEditedState (pedited->colorappearance.ybscen ? Edited : UnEdited); adaplum->setEditedState (pedited->colorappearance.adaplum ? Edited : UnEdited); badpixsl->setEditedState (pedited->colorappearance.badpixsl ? Edited : UnEdited); jlight->setEditedState (pedited->colorappearance.jlight ? Edited : UnEdited); @@ -476,10 +817,15 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) schroma->setEditedState (pedited->colorappearance.schroma ? Edited : UnEdited); mchroma->setEditedState (pedited->colorappearance.mchroma ? Edited : UnEdited); rstprotection->setEditedState (pedited->colorappearance.rstprotection ? Edited : UnEdited); + tempout->setEditedState (pedited->colorappearance.tempout ? Edited : UnEdited); + greenout->setEditedState (pedited->colorappearance.greenout ? Edited : UnEdited); + ybout->setEditedState (pedited->colorappearance.ybout ? Edited : UnEdited); + tempsc->setEditedState (pedited->colorappearance.tempsc ? Edited : UnEdited); + greensc->setEditedState (pedited->colorappearance.greensc ? Edited : UnEdited); contrast->setEditedState (pedited->colorappearance.contrast ? Edited : UnEdited); qcontrast->setEditedState (pedited->colorappearance.qcontrast ? Edited : UnEdited); colorh->setEditedState (pedited->colorappearance.colorh ? Edited : UnEdited); - surrsource->set_inconsistent (!pedited->colorappearance.surrsource); +// surrsource->set_inconsistent (!pedited->colorappearance.surrsource); gamut->set_inconsistent (!pedited->colorappearance.gamut); // badpix->set_inconsistent (!pedited->colorappearance.badpix); datacie->set_inconsistent (!pedited->colorappearance.datacie); @@ -487,7 +833,9 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // sharpcie->set_inconsistent (!pedited->colorappearance.sharpcie); degree->setAutoInconsistent (multiImage && !pedited->colorappearance.autodegree); + degreeout->setAutoInconsistent (multiImage && !pedited->colorappearance.autodegreeout); adapscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoadapscen); + ybscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoybscen); set_inconsistent (multiImage && !pedited->colorappearance.enabled); shape->setUnChanged (!pedited->colorappearance.curve); @@ -495,23 +843,42 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) shape3->setUnChanged (!pedited->colorappearance.curve3); if (!pedited->colorappearance.curveMode) { - toneCurveMode->set_active(2); + toneCurveMode->set_active (2); } if (!pedited->colorappearance.curveMode2) { - toneCurveMode2->set_active(2); + toneCurveMode2->set_active (2); } if (!pedited->colorappearance.curveMode3) { - toneCurveMode3->set_active(3); + toneCurveMode3->set_active (3); } } - setEnabled(pp->colorappearance.enabled); + setEnabled (pp->colorappearance.enabled); - surroundconn.block(true); + surrsrcconn.block (true); + + if (pedited && !pedited->colorappearance.surrsrc) { + surrsrc->set_active (4); + } else if (pp->colorappearance.surrsrc == "Average") { + surrsrc->set_active (0); + } else if (pp->colorappearance.surrsrc == "Dim") { + surrsrc->set_active (1); + } else if (pp->colorappearance.surrsrc == "Dark") { + surrsrc->set_active (2); + } else if (pp->colorappearance.surrsrc == "ExtremelyDark") { + surrsrc->set_active (3); + } + + surrsrcconn.block (false); + // Have to be manually called to handle initial state update + surrsrcChanged(); + + + surroundconn.block (true); if (pedited && !pedited->colorappearance.surround) { surround->set_active (4); @@ -525,25 +892,29 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) surround->set_active (3); } - surroundconn.block(false); + surroundconn.block (false); // Have to be manually called to handle initial state update surroundChanged(); - wbmodelconn.block(true); + + + wbmodelconn.block (true); if (pedited && !pedited->colorappearance.wbmodel) { - wbmodel->set_active (2); + wbmodel->set_active (3); } else if (pp->colorappearance.wbmodel == "RawT") { wbmodel->set_active (0); } else if (pp->colorappearance.wbmodel == "RawTCAT02") { wbmodel->set_active (1); + } else if (pp->colorappearance.wbmodel == "free") { + wbmodel->set_active (2); } - wbmodelconn.block(false); + wbmodelconn.block (false); // Have to be manually called to handle initial state update wbmodelChanged(); - algoconn.block(true); + algoconn.block (true); if (pedited && !pedited->colorappearance.algo) { algo->set_active (4); @@ -557,13 +928,13 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) algo->set_active (3); } - algoconn.block(false); + algoconn.block (false); // Have to be manually called to handle initial state update algoChanged(); - surrconn.block (true); - surrsource->set_active (pp->colorappearance.surrsource); - surrconn.block (false); + // surrconn.block (true); + // surrsource->set_active (pp->colorappearance.surrsource); + // surrconn.block (false); gamutconn.block (true); gamut->set_active (pp->colorappearance.gamut); gamutconn.block (false); @@ -580,7 +951,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // sharpcie->set_active (pp->colorappearance.sharpcie); // sharpcieconn.block (false); - lastsurr = pp->colorappearance.surrsource; +// lastsurr = pp->colorappearance.surrsource; lastgamut = pp->colorappearance.gamut; // lastbadpix=pp->colorappearance.badpix; lastdatacie = pp->colorappearance.datacie; @@ -589,11 +960,17 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) lastAutoDegree = pp->colorappearance.autodegree; lastAutoAdapscen = pp->colorappearance.autoadapscen; + lastAutoDegreeout = pp->colorappearance.autodegreeout; + lastAutoybscen = pp->colorappearance.autoybscen; degree->setValue (pp->colorappearance.degree); - degree->setAutoValue(pp->colorappearance.autodegree); + degree->setAutoValue (pp->colorappearance.autodegree); adapscen->setValue (pp->colorappearance.adapscen); adapscen->setAutoValue (pp->colorappearance.autoadapscen); + degreeout->setValue (pp->colorappearance.degreeout); + degreeout->setAutoValue (pp->colorappearance.autodegreeout); + ybscen->setValue (pp->colorappearance.ybscen); + ybscen->setAutoValue (pp->colorappearance.autoybscen); adaplum->setValue (pp->colorappearance.adaplum); badpixsl->setValue (pp->colorappearance.badpixsl); @@ -606,10 +983,15 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) contrast->setValue (pp->colorappearance.contrast); qcontrast->setValue (pp->colorappearance.qcontrast); colorh->setValue (pp->colorappearance.colorh); + tempout->setValue (pp->colorappearance.tempout); + greenout->setValue (pp->colorappearance.greenout); + ybout->setValue (pp->colorappearance.ybout); + tempsc->setValue (pp->colorappearance.tempsc); + greensc->setValue (pp->colorappearance.greensc); - tcmode3conn.block(false); - tcmode2conn.block(false); - tcmodeconn.block(false); + tcmode3conn.block (false); + tcmode2conn.block (false); + tcmodeconn.block (false); enableListener (); } void ColorAppearance::autoOpenCurve () @@ -626,9 +1008,13 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.degree = degree->getValue (); pp->colorappearance.autodegree = degree->getAutoValue (); + pp->colorappearance.degreeout = degreeout->getValue (); + pp->colorappearance.autodegreeout = degreeout->getAutoValue (); pp->colorappearance.enabled = getEnabled(); pp->colorappearance.adapscen = adapscen->getValue (); pp->colorappearance.autoadapscen = adapscen->getAutoValue (); + pp->colorappearance.ybscen = ybscen->getValue (); + pp->colorappearance.autoybscen = ybscen->getAutoValue (); pp->colorappearance.adaplum = adaplum->getValue (); pp->colorappearance.badpixsl = badpixsl->getValue (); pp->colorappearance.jlight = jlight->getValue (); @@ -640,7 +1026,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.qcontrast = qcontrast->getValue (); pp->colorappearance.colorh = colorh->getValue (); pp->colorappearance.rstprotection = rstprotection->getValue (); - pp->colorappearance.surrsource = surrsource->get_active(); + // pp->colorappearance.surrsource = surrsource->get_active(); pp->colorappearance.gamut = gamut->get_active(); // pp->colorappearance.badpix = badpix->get_active(); pp->colorappearance.datacie = datacie->get_active(); @@ -649,6 +1035,11 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.curve = shape->getCurve (); pp->colorappearance.curve2 = shape2->getCurve (); pp->colorappearance.curve3 = shape3->getCurve (); + pp->colorappearance.tempout = tempout->getValue (); + pp->colorappearance.greenout = greenout->getValue (); + pp->colorappearance.ybout = ybout->getValue (); + pp->colorappearance.tempsc = tempsc->getValue (); + pp->colorappearance.greensc = greensc->getValue (); int tcMode = toneCurveMode->get_active_row_number(); @@ -678,8 +1069,10 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) if (pedited) { pedited->colorappearance.degree = degree->getEditedState (); + pedited->colorappearance.degreeout = degreeout->getEditedState (); pedited->colorappearance.adapscen = adapscen->getEditedState (); pedited->colorappearance.adaplum = adaplum->getEditedState (); + pedited->colorappearance.ybscen = ybscen->getEditedState (); pedited->colorappearance.badpixsl = badpixsl->getEditedState (); pedited->colorappearance.jlight = jlight->getEditedState (); pedited->colorappearance.qbright = qbright->getEditedState (); @@ -691,12 +1084,15 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.colorh = colorh->getEditedState (); pedited->colorappearance.rstprotection = rstprotection->getEditedState (); pedited->colorappearance.autodegree = !degree->getAutoInconsistent(); + pedited->colorappearance.autodegreeout = !degreeout->getAutoInconsistent(); pedited->colorappearance.autoadapscen = !adapscen->getAutoInconsistent(); + pedited->colorappearance.autoybscen = !ybscen->getAutoInconsistent(); pedited->colorappearance.enabled = !get_inconsistent(); - pedited->colorappearance.surround = surround->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->colorappearance.wbmodel = wbmodel->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->colorappearance.algo = algo->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->colorappearance.surrsource = !surrsource->get_inconsistent(); + pedited->colorappearance.surround = surround->get_active_text() != M ("GENERAL_UNCHANGED"); + pedited->colorappearance.surrsrc = surrsrc->get_active_text() != M ("GENERAL_UNCHANGED"); + pedited->colorappearance.wbmodel = wbmodel->get_active_text() != M ("GENERAL_UNCHANGED"); + pedited->colorappearance.algo = algo->get_active_text() != M ("GENERAL_UNCHANGED"); + // pedited->colorappearance.surrsource = !surrsource->get_inconsistent(); pedited->colorappearance.gamut = !gamut->get_inconsistent(); // pedited->colorappearance.badpix = !badpix->get_inconsistent(); pedited->colorappearance.datacie = !datacie->get_inconsistent(); @@ -708,8 +1104,25 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.curveMode = toneCurveMode->get_active_row_number() != 2; pedited->colorappearance.curveMode2 = toneCurveMode2->get_active_row_number() != 2; pedited->colorappearance.curveMode3 = toneCurveMode3->get_active_row_number() != 3; + pedited->colorappearance.tempout = tempout->getEditedState (); + pedited->colorappearance.greenout = greenout->getEditedState (); + pedited->colorappearance.ybout = ybout->getEditedState (); + pedited->colorappearance.tempsc = tempsc->getEditedState (); + pedited->colorappearance.greensc = greensc->getEditedState (); + } + if (surrsrc->get_active_row_number() == 0) { + pp->colorappearance.surrsrc = "Average"; + } else if (surrsrc->get_active_row_number() == 1) { + pp->colorappearance.surrsrc = "Dim"; + } else if (surrsrc->get_active_row_number() == 2) { + pp->colorappearance.surrsrc = "Dark"; + } else if (surrsrc->get_active_row_number() == 3) { + pp->colorappearance.surrsrc = "ExtremelyDark"; + } + + if (surround->get_active_row_number() == 0) { pp->colorappearance.surround = "Average"; } else if (surround->get_active_row_number() == 1) { @@ -724,6 +1137,9 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.wbmodel = "RawT"; } else if (wbmodel->get_active_row_number() == 1) { pp->colorappearance.wbmodel = "RawTCAT02"; + } else if (wbmodel->get_active_row_number() == 2) { + pp->colorappearance.wbmodel = "free"; + } if (algo->get_active_row_number() == 0) { @@ -742,11 +1158,11 @@ void ColorAppearance::curveChanged (CurveEditor* ce) if (listener) { if (ce == shape) { - listener->panelChanged (EvCATCurve1, M("HISTORY_CUSTOMCURVE")); + listener->panelChanged (EvCATCurve1, M ("HISTORY_CUSTOMCURVE")); } else if (ce == shape2) { - listener->panelChanged (EvCATCurve2, M("HISTORY_CUSTOMCURVE")); + listener->panelChanged (EvCATCurve2, M ("HISTORY_CUSTOMCURVE")); } else if (ce == shape3) { - listener->panelChanged (EvCATCurve3, M("HISTORY_CUSTOMCURVE")); + listener->panelChanged (EvCATCurve3, M ("HISTORY_CUSTOMCURVE")); } } } @@ -754,7 +1170,7 @@ void ColorAppearance::curveChanged (CurveEditor* ce) void ColorAppearance::curveMode1Changed () { if (listener) { - Glib::signal_idle().connect (sigc::mem_fun(*this, &ColorAppearance::curveMode1Changed_)); + Glib::signal_idle().connect (sigc::mem_fun (*this, &ColorAppearance::curveMode1Changed_)); } } @@ -770,7 +1186,7 @@ bool ColorAppearance::curveMode1Changed_ () void ColorAppearance::curveMode2Changed () { if (listener) { - Glib::signal_idle().connect (sigc::mem_fun(*this, &ColorAppearance::curveMode2Changed_)); + Glib::signal_idle().connect (sigc::mem_fun (*this, &ColorAppearance::curveMode2Changed_)); } } @@ -788,18 +1204,18 @@ void ColorAppearance::curveMode3Changed () int tcMode3 = toneCurveMode3->get_active_row_number(); if (tcMode3 == 0) { - chroma->set_sensitive(true); - schroma->set_sensitive(true); + chroma->set_sensitive (true); + schroma->set_sensitive (true); } else if (tcMode3 == 2) { - chroma->set_sensitive(false); - schroma->set_sensitive(false); + chroma->set_sensitive (false); + schroma->set_sensitive (false); } else if (tcMode3 == 1) { - chroma->set_sensitive(false); - schroma->set_sensitive(true); + chroma->set_sensitive (false); + schroma->set_sensitive (true); } if (listener) { - Glib::signal_idle().connect (sigc::mem_fun(*this, &ColorAppearance::curveMode3Changed_)); + Glib::signal_idle().connect (sigc::mem_fun (*this, &ColorAppearance::curveMode3Changed_)); } } @@ -811,7 +1227,7 @@ bool ColorAppearance::curveMode3Changed_ () return false; } - +/* void ColorAppearance::surrsource_toggled () { @@ -830,13 +1246,13 @@ void ColorAppearance::surrsource_toggled () if (listener) { if (surrsource->get_active ()) { - listener->panelChanged (EvCATsurr, M("GENERAL_ENABLED")); + listener->panelChanged (EvCATsurr, M ("GENERAL_ENABLED")); } else { - listener->panelChanged (EvCATsurr, M("GENERAL_DISABLED")); + listener->panelChanged (EvCATsurr, M ("GENERAL_DISABLED")); } } } - +*/ void ColorAppearance::gamut_toggled () { @@ -855,9 +1271,9 @@ void ColorAppearance::gamut_toggled () if (listener) { if (gamut->get_active ()) { - listener->panelChanged (EvCATgamut, M("GENERAL_ENABLED")); + listener->panelChanged (EvCATgamut, M ("GENERAL_ENABLED")); } else { - listener->panelChanged (EvCATgamut, M("GENERAL_DISABLED")); + listener->panelChanged (EvCATgamut, M ("GENERAL_DISABLED")); } } @@ -906,9 +1322,9 @@ void ColorAppearance::datacie_toggled () if (listener) { if (datacie->get_active ()) { - listener->panelChanged (EvCATdatacie, M("GENERAL_ENABLED")); + listener->panelChanged (EvCATdatacie, M ("GENERAL_ENABLED")); } else { - listener->panelChanged (EvCATdatacie, M("GENERAL_DISABLED")); + listener->panelChanged (EvCATdatacie, M ("GENERAL_DISABLED")); } } } @@ -930,9 +1346,9 @@ void ColorAppearance::tonecie_toggled () if (listener) { if (tonecie->get_active ()) { - listener->panelChanged (EvCATtonecie, M("GENERAL_ENABLED")); + listener->panelChanged (EvCATtonecie, M ("GENERAL_ENABLED")); } else { - listener->panelChanged (EvCATtonecie, M("GENERAL_DISABLED")); + listener->panelChanged (EvCATtonecie, M ("GENERAL_DISABLED")); } } @@ -966,7 +1382,9 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit { degree->setDefault (defParams->colorappearance.degree); + degreeout->setDefault (defParams->colorappearance.degreeout); adapscen->setDefault (defParams->colorappearance.adapscen); + ybscen->setDefault (defParams->colorappearance.ybscen); adaplum->setDefault (defParams->colorappearance.adaplum); badpixsl->setDefault (defParams->colorappearance.badpixsl); jlight->setDefault (defParams->colorappearance.jlight); @@ -978,10 +1396,17 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit contrast->setDefault (defParams->colorappearance.contrast); qcontrast->setDefault (defParams->colorappearance.qcontrast); colorh->setDefault (defParams->colorappearance.colorh); + tempout->setDefault (defParams->colorappearance.tempout); + greenout->setDefault (defParams->colorappearance.greenout); + ybout->setDefault (defParams->colorappearance.ybout); + tempsc->setDefault (defParams->colorappearance.tempsc); + greensc->setDefault (defParams->colorappearance.greensc); if (pedited) { degree->setDefaultEditedState (pedited->colorappearance.degree ? Edited : UnEdited); + degreeout->setDefaultEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited); adapscen->setDefaultEditedState (pedited->colorappearance.adapscen ? Edited : UnEdited); + ybscen->setDefaultEditedState (pedited->colorappearance.ybscen ? Edited : UnEdited); adaplum->setDefaultEditedState (pedited->colorappearance.adaplum ? Edited : UnEdited); badpixsl->setDefaultEditedState (pedited->colorappearance.badpixsl ? Edited : UnEdited); jlight->setDefaultEditedState (pedited->colorappearance.jlight ? Edited : UnEdited); @@ -993,10 +1418,17 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit contrast->setDefaultEditedState (pedited->colorappearance.contrast ? Edited : UnEdited); qcontrast->setDefaultEditedState (pedited->colorappearance.qcontrast ? Edited : UnEdited); colorh->setDefaultEditedState (pedited->colorappearance.colorh ? Edited : UnEdited); + tempout->setDefaultEditedState (pedited->colorappearance.tempout ? Edited : UnEdited); + greenout->setDefaultEditedState (pedited->colorappearance.greenout ? Edited : UnEdited); + ybout->setDefaultEditedState (pedited->colorappearance.ybout ? Edited : UnEdited); + tempsc->setDefaultEditedState (pedited->colorappearance.tempsc ? Edited : UnEdited); + greensc->setDefaultEditedState (pedited->colorappearance.greensc ? Edited : UnEdited); } else { degree->setDefaultEditedState (Irrelevant); + degreeout->setDefaultEditedState (Irrelevant); adapscen->setDefaultEditedState (Irrelevant); + ybscen->setDefaultEditedState (Irrelevant); adaplum->setDefaultEditedState (Irrelevant); badpixsl->setDefaultEditedState (Irrelevant); jlight->setDefaultEditedState (Irrelevant); @@ -1008,19 +1440,26 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit qcontrast->setDefaultEditedState (Irrelevant); rstprotection->setDefaultEditedState (Irrelevant); colorh->setDefaultEditedState (Irrelevant); + tempout->setDefaultEditedState (Irrelevant); + greenout->setDefaultEditedState (Irrelevant); + ybout->setDefaultEditedState (Irrelevant); + tempsc->setDefaultEditedState (Irrelevant); + greensc->setDefaultEditedState (Irrelevant); } } -int autoCamChangedUI (void* data) -{ - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected - (static_cast(data))->autoCamComputed_ (); - return 0; -} -void ColorAppearance::autoCamChanged (double ccam) + +void ColorAppearance::autoCamChanged (double ccam, double ccamout) { nextCcam = ccam; - g_idle_add (autoCamChangedUI, this); + nextCcamout = ccamout; + + const auto func = [] (gpointer data) -> gboolean { + static_cast (data)->autoCamComputed_(); + return FALSE; + }; + + idle_register.add (func, this); } bool ColorAppearance::autoCamComputed_ () @@ -1029,20 +1468,22 @@ bool ColorAppearance::autoCamComputed_ () disableListener (); // degree->setEnabled (true); degree->setValue (nextCcam); + degreeout->setValue (nextCcamout); enableListener (); return false; } -int adapCamChangedUI (void* data) -{ - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected - (static_cast(data))->adapCamComputed_ (); - return 0; -} + void ColorAppearance::adapCamChanged (double cadap) { nextCadap = cadap; - g_idle_add (adapCamChangedUI, this); + + const auto func = [] (gpointer data) -> gboolean { + static_cast (data)->adapCamComputed_(); + return FALSE; + }; + + idle_register.add (func, this); } bool ColorAppearance::adapCamComputed_ () @@ -1051,16 +1492,40 @@ bool ColorAppearance::adapCamComputed_ () disableListener (); // degree->setEnabled (true); adapscen->setValue (nextCadap); +// ybscen->setValue (nextYbscn); enableListener (); return false; } +void ColorAppearance::ybCamChanged (int ybsc) +{ + nextYbscn = ybsc; + + const auto func = [] (gpointer data) -> gboolean { + static_cast (data)->ybCamComputed_(); + return FALSE; + }; + + idle_register.add (func, this); +} + +bool ColorAppearance::ybCamComputed_ () +{ + + disableListener (); +// degree->setEnabled (true); +// adapscen->setValue (nextCadap); + ybscen->setValue (nextYbscn); + enableListener (); + + return false; +} void ColorAppearance::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (elemType == ColorCaller::CCET_VERTICAL_BAR) { valY = 0.5; @@ -1068,47 +1533,62 @@ void ColorAppearance::colorForValue (double valX, double valY, enum ColorCaller: if (callerId == 1) { // cc - bottom bar - float value = (1.f - 0.7f) * float(valX) + 0.7f; + float value = (1.f - 0.7f) * float (valX) + 0.7f; // whole hue range // Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before) - Color::hsv2rgb01(float(valY), float(valX), value, R, G, B); + Color::hsv2rgb01 (float (valY), float (valX), value, R, G, B); } - caller->ccRed = double(R); - caller->ccGreen = double(G); - caller->ccBlue = double(B); + caller->ccRed = double (R); + caller->ccGreen = double (G); + caller->ccBlue = double (B); } void ColorAppearance::adjusterChanged (Adjuster* a, double newval) { if (listener && (multiImage || getEnabled()) ) { - if(a == degree) { + if (a == degree) { listener->panelChanged (EvCATDegree, a->getTextValue()); - } else if(a == adapscen) { + } else if (a == degreeout) { + listener->panelChanged (EvCATDegreeout, a->getTextValue()); + } else if (a == adapscen) { listener->panelChanged (EvCATAdapscen, a->getTextValue()); - } else if(a == adaplum) { + } else if (a == ybscen) { + listener->panelChanged (EvCATybscen, a->getTextValue()); + } else if (a == adaplum) { listener->panelChanged (EvCATAdapLum, a->getTextValue()); - } else if(a == badpixsl) { + } else if (a == badpixsl) { listener->panelChanged (EvCATbadpix, a->getTextValue()); - } else if(a == jlight) { + } else if (a == jlight) { listener->panelChanged (EvCATJLight, a->getTextValue()); - } else if(a == qbright) { + } else if (a == qbright) { listener->panelChanged (EvCATQbright, a->getTextValue()); - } else if(a == chroma) { + } else if (a == chroma) { listener->panelChanged (EvCATChroma, a->getTextValue()); - } else if(a == schroma) { + } else if (a == schroma) { listener->panelChanged (EvCATSChroma, a->getTextValue()); - } else if(a == mchroma) { + } else if (a == mchroma) { listener->panelChanged (EvCATMChroma, a->getTextValue()); - } else if(a == rstprotection) { + } else if (a == rstprotection) { listener->panelChanged (EvCATRstpro, a->getTextValue()); - } else if(a == contrast) { + } else if (a == contrast) { listener->panelChanged (EvCATContrast, a->getTextValue()); - } else if(a == colorh) { + } else if (a == colorh) { listener->panelChanged (EvCAThue, a->getTextValue()); - } else if(a == qcontrast) { + } else if (a == qcontrast) { listener->panelChanged (EvCATQContrast, a->getTextValue()); + } else if (a == tempout) { + listener->panelChanged (EvCATtempout, a->getTextValue()); + } else if (a == greenout) { + listener->panelChanged (EvCATgreenout, a->getTextValue()); + } else if (a == ybout) { + listener->panelChanged (EvCATybout, a->getTextValue()); + } else if (a == tempsc) { + listener->panelChanged (EvCATtempsc, a->getTextValue()); + } else if (a == greensc) { + listener->panelChanged (EvCATgreensc, a->getTextValue()); + } } @@ -1119,44 +1599,83 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) if (multiImage) { if (degree->getAutoInconsistent()) { - degree->setAutoInconsistent(false); - degree->setAutoValue(false); + degree->setAutoInconsistent (false); + degree->setAutoValue (false); } else if (lastAutoDegree) { - degree->setAutoInconsistent(true); + degree->setAutoInconsistent (true); } lastAutoDegree = degree->getAutoValue(); + if (degreeout->getAutoInconsistent()) { + degreeout->setAutoInconsistent (false); + degreeout->setAutoValue (false); + } else if (lastAutoDegreeout) { + degreeout->setAutoInconsistent (true); + } + + lastAutoDegreeout = degreeout->getAutoValue(); + if (adapscen->getAutoInconsistent()) { - adapscen->setAutoInconsistent(false); - adapscen->setAutoValue(false); + adapscen->setAutoInconsistent (false); + adapscen->setAutoValue (false); } else if (lastAutoAdapscen) { - adapscen->setAutoInconsistent(true); + adapscen->setAutoInconsistent (true); } lastAutoAdapscen = adapscen->getAutoValue(); + if (ybscen->getAutoInconsistent()) { + ybscen->setAutoInconsistent (false); + ybscen->setAutoValue (false); + } else if (lastAutoybscen) { + ybscen->setAutoInconsistent (true); + } + + lastAutoybscen = ybscen->getAutoValue(); + } if (listener && (multiImage || getEnabled()) ) { - if(a == degree) { + if (a == degree) { if (degree->getAutoInconsistent()) { - listener->panelChanged (EvCATAutoDegree, M("GENERAL_UNCHANGED")); + listener->panelChanged (EvCATAutoDegree, M ("GENERAL_UNCHANGED")); } else if (degree->getAutoValue()) { - listener->panelChanged (EvCATAutoDegree, M("GENERAL_ENABLED")); + listener->panelChanged (EvCATAutoDegree, M ("GENERAL_ENABLED")); } else { - listener->panelChanged (EvCATAutoDegree, M("GENERAL_DISABLED")); + listener->panelChanged (EvCATAutoDegree, M ("GENERAL_DISABLED")); } } - if(a == adapscen) { - if (adapscen->getAutoInconsistent()) { - listener->panelChanged (EvCATAutoAdap, M("GENERAL_UNCHANGED")); - } else if (adapscen->getAutoValue()) { - listener->panelChanged (EvCATAutoAdap, M("GENERAL_ENABLED")); + if (a == degreeout) { + if (degreeout->getAutoInconsistent()) { + listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_UNCHANGED")); + } else if (degreeout->getAutoValue()) { + listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_ENABLED")); } else { - listener->panelChanged (EvCATAutoAdap, M("GENERAL_DISABLED")); + listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_DISABLED")); + } + } + + + if (a == adapscen) { + if (adapscen->getAutoInconsistent()) { + listener->panelChanged (EvCATAutoAdap, M ("GENERAL_UNCHANGED")); + } else if (adapscen->getAutoValue()) { + listener->panelChanged (EvCATAutoAdap, M ("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvCATAutoAdap, M ("GENERAL_DISABLED")); + } + } + + if (a == ybscen) { + if (ybscen->getAutoInconsistent()) { + listener->panelChanged (EvCATAutoyb, M ("GENERAL_UNCHANGED")); + } else if (ybscen->getAutoValue()) { + listener->panelChanged (EvCATAutoyb, M ("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvCATAutoyb, M ("GENERAL_DISABLED")); } } @@ -1168,17 +1687,26 @@ void ColorAppearance::enabledChanged () if (listener) { if (get_inconsistent()) { - listener->panelChanged (EvCATEnabled, M("GENERAL_UNCHANGED")); + listener->panelChanged (EvCATEnabled, M ("GENERAL_UNCHANGED")); } else if (getEnabled()) { - listener->panelChanged (EvCATEnabled, M("GENERAL_ENABLED")); + listener->panelChanged (EvCATEnabled, M ("GENERAL_ENABLED")); curveEditorG->set_sensitive (true); toneCurveMode->set_sensitive (true); } else { - listener->panelChanged (EvCATEnabled, M("GENERAL_DISABLED")); + listener->panelChanged (EvCATEnabled, M ("GENERAL_DISABLED")); } } } +void ColorAppearance::surrsrcChanged () +{ + + if (listener && (multiImage || getEnabled()) ) { + listener->panelChanged (EvCATsurr, surrsrc->get_active_text ()); + } +} + + void ColorAppearance::surroundChanged () { @@ -1189,6 +1717,15 @@ void ColorAppearance::surroundChanged () void ColorAppearance::wbmodelChanged () { + if (wbmodel->get_active_row_number() == 0 || wbmodel->get_active_row_number() == 1) { + tempsc->hide(); + greensc->hide(); + } + + if (wbmodel->get_active_row_number() == 2) { + tempsc->show(); + greensc->show(); + } if (listener && (multiImage || getEnabled()) ) { listener->panelChanged (EvCATMethodWB, wbmodel->get_active_text ()); @@ -1274,8 +1811,10 @@ void ColorAppearance::setBatchMode (bool batchMode) ToolPanel::setBatchMode (batchMode); degree->showEditedCB (); + degreeout->showEditedCB (); adapscen->showEditedCB (); adaplum->showEditedCB (); + ybscen->showEditedCB (); badpixsl->showEditedCB (); jlight->showEditedCB (); qbright->showEditedCB (); @@ -1286,13 +1825,19 @@ void ColorAppearance::setBatchMode (bool batchMode) contrast->showEditedCB (); qcontrast->showEditedCB (); colorh->showEditedCB (); + tempout->showEditedCB (); + greenout->showEditedCB (); + ybout->showEditedCB (); + tempsc->showEditedCB (); + greensc->showEditedCB (); - surround->append_text (M("GENERAL_UNCHANGED")); - wbmodel->append_text (M("GENERAL_UNCHANGED")); - algo->append_text (M("GENERAL_UNCHANGED")); - toneCurveMode->append_text (M("GENERAL_UNCHANGED")); - toneCurveMode2->append_text (M("GENERAL_UNCHANGED")); - toneCurveMode3->append_text (M("GENERAL_UNCHANGED")); + surround->append (M ("GENERAL_UNCHANGED")); + surrsrc->append (M ("GENERAL_UNCHANGED")); + wbmodel->append (M ("GENERAL_UNCHANGED")); + algo->append (M ("GENERAL_UNCHANGED")); + toneCurveMode->append (M ("GENERAL_UNCHANGED")); + toneCurveMode2->append (M ("GENERAL_UNCHANGED")); + toneCurveMode3->append (M ("GENERAL_UNCHANGED")); curveEditorG->setBatchMode (batchMode); curveEditorG2->setBatchMode (batchMode); @@ -1311,35 +1856,43 @@ void ColorAppearance::updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu void ColorAppearance::setAdjusterBehavior (bool degreeadd, bool adapscenadd, bool adaplumadd, bool badpixsladd, bool jlightadd, bool chromaadd, bool contrastadd, bool rstprotectionadd, bool qbrightadd, bool qcontrastadd, bool schromaadd, bool mchromaadd, bool colorhadd) { - degree->setAddMode(degreeadd); - adapscen->setAddMode(adapscenadd); - adaplum->setAddMode(adaplumadd); - badpixsl->setAddMode(badpixsladd); - jlight->setAddMode(jlightadd); - qbright->setAddMode(qbrightadd); - chroma->setAddMode(chromaadd); - schroma->setAddMode(schromaadd); - mchroma->setAddMode(mchromaadd); - rstprotection->setAddMode(rstprotectionadd); - contrast->setAddMode(contrastadd); - qcontrast->setAddMode(qcontrastadd); - colorh->setAddMode(colorhadd); + degree->setAddMode (degreeadd); + adapscen->setAddMode (adapscenadd); + adaplum->setAddMode (adaplumadd); + badpixsl->setAddMode (badpixsladd); + jlight->setAddMode (jlightadd); + qbright->setAddMode (qbrightadd); + chroma->setAddMode (chromaadd); + schroma->setAddMode (schromaadd); + mchroma->setAddMode (mchromaadd); + rstprotection->setAddMode (rstprotectionadd); + contrast->setAddMode (contrastadd); + qcontrast->setAddMode (qcontrastadd); + colorh->setAddMode (colorhadd); } void ColorAppearance::trimValues (rtengine::procparams::ProcParams* pp) { - degree->trimValue(pp->colorappearance.degree); - adapscen->trimValue(pp->colorappearance.adapscen); - adaplum->trimValue(pp->colorappearance.adaplum); - badpixsl->trimValue(pp->colorappearance.badpixsl); - jlight->trimValue(pp->colorappearance.jlight); - qbright->trimValue(pp->colorappearance.qbright); - chroma->trimValue(pp->colorappearance.chroma); - schroma->trimValue(pp->colorappearance.schroma); - mchroma->trimValue(pp->colorappearance.mchroma); - rstprotection->trimValue(pp->colorappearance.rstprotection); - contrast->trimValue(pp->colorappearance.contrast); - qcontrast->trimValue(pp->colorappearance.qcontrast); - colorh->trimValue(pp->colorappearance.colorh); + degree->trimValue (pp->colorappearance.degree); + degreeout->trimValue (pp->colorappearance.degreeout); + adapscen->trimValue (pp->colorappearance.adapscen); + ybscen->trimValue (pp->colorappearance.ybscen); + adaplum->trimValue (pp->colorappearance.adaplum); + badpixsl->trimValue (pp->colorappearance.badpixsl); + jlight->trimValue (pp->colorappearance.jlight); + qbright->trimValue (pp->colorappearance.qbright); + chroma->trimValue (pp->colorappearance.chroma); + schroma->trimValue (pp->colorappearance.schroma); + mchroma->trimValue (pp->colorappearance.mchroma); + rstprotection->trimValue (pp->colorappearance.rstprotection); + contrast->trimValue (pp->colorappearance.contrast); + qcontrast->trimValue (pp->colorappearance.qcontrast); + colorh->trimValue (pp->colorappearance.colorh); + tempout->trimValue (pp->colorappearance.tempout); + greenout->trimValue (pp->colorappearance.greenout); + ybout->trimValue (pp->colorappearance.ybout); + tempsc->trimValue (pp->colorappearance.tempsc); + greensc->trimValue (pp->colorappearance.greensc); + } diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index 1560e275e..3829475ae 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -28,70 +28,15 @@ #include "guiutils.h" #include "colorprovider.h" -class ColorAppearance : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel, public rtengine::AutoCamListener, public CurveListener, public ColorProvider +class ColorAppearance final : + public ToolParamBlock, + public AdjusterListener, + public FoldableToolPanel, + public rtengine::AutoCamListener, + public CurveListener, + public ColorProvider { - -protected: - Glib::RefPtr bgTTips; - Glib::RefPtr srTTips; - Glib::RefPtr bgPixbuf; - Glib::RefPtr srPixbuf; - - Adjuster* degree; - Adjuster* adapscen; - Adjuster* adaplum; - Adjuster* badpixsl; - Adjuster* jlight; - Adjuster* qbright; - Adjuster* chroma; - Adjuster* schroma; - Adjuster* mchroma; - Adjuster* rstprotection; - Adjuster* contrast; - Adjuster* qcontrast; - Adjuster* colorh; - MyComboBoxText* toneCurveMode; - MyComboBoxText* toneCurveMode2; - MyComboBoxText* toneCurveMode3; - - //Adjuster* edge; - Gtk::CheckButton* surrsource; - Gtk::CheckButton* gamut; -// Gtk::CheckButton* badpix; - Gtk::CheckButton* datacie; - Gtk::CheckButton* tonecie; - // Gtk::CheckButton* sharpcie; - - MyComboBoxText* surround; - sigc::connection surroundconn; - MyComboBoxText* wbmodel; - sigc::connection wbmodelconn; - MyComboBoxText* algo; - sigc::connection algoconn; - sigc::connection surrconn; - sigc::connection gamutconn, datacieconn, tonecieconn /*,badpixconn , sharpcieconn*/; - sigc::connection tcmodeconn, tcmode2conn, tcmode3conn; - CurveEditorGroup* curveEditorG; - CurveEditorGroup* curveEditorG2; - CurveEditorGroup* curveEditorG3; - - DiagonalCurveEditor* shape; - DiagonalCurveEditor* shape2; - DiagonalCurveEditor* shape3; - double nextCcam, nextCadap; - bool lastAutoDegree; - bool lastAutoAdapscen; - bool lastsurr; - bool lastgamut; -// bool lastbadpix; - bool lastdatacie; - bool lasttonecie; -// bool lastsharpcie; - bool bgTTipQuery(int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip); - bool srTTipQuery(int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip); - public: - ColorAppearance (); ~ColorAppearance (); @@ -104,6 +49,7 @@ public: // void adjusterAdapToggled (Adjuster* a, bool newval); void enabledChanged (); void surroundChanged (); + void surrsrcChanged (); void wbmodelChanged (); void algoChanged (); void surrsource_toggled (); @@ -112,10 +58,12 @@ public: void datacie_toggled (); void tonecie_toggled (); // void sharpcie_toggled (); - void autoCamChanged (double ccam); + void autoCamChanged (double ccam, double ccamout); bool autoCamComputed_ (); void adapCamChanged (double cadap); bool adapCamComputed_ (); + void ybCamChanged (int yb); + bool ybCamComputed_ (); void curveChanged (CurveEditor* ce); void curveMode1Changed (); @@ -124,6 +72,7 @@ public: bool curveMode2Changed_ (); void curveMode3Changed (); bool curveMode3Changed_ (); + void neutral_pressed (); void expandCurve (bool isExpanded); bool isCurveExpanded (); @@ -133,6 +82,85 @@ public: void trimValues (rtengine::procparams::ProcParams* pp); void updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histLRETI); virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller); + void updateToolState (std::vector &tpOpen); + void writeOptions (std::vector &tpOpen); + +private: + bool bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip); + bool srTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip); + void foldAllButMe (GdkEventButton* event, MyExpander *expander); + + Glib::RefPtr bgTTips; + Glib::RefPtr srTTips; + Glib::RefPtr bgPixbuf; + Glib::RefPtr srPixbuf; + + Adjuster* degree; + Adjuster* adapscen; + Adjuster* ybscen; + Adjuster* adaplum; + Adjuster* degreeout; + Adjuster* badpixsl; + Adjuster* jlight; + Adjuster* qbright; + Adjuster* chroma; + Adjuster* schroma; + Adjuster* mchroma; + Adjuster* rstprotection; + Adjuster* contrast; + Adjuster* qcontrast; + Adjuster* colorh; + Adjuster* tempout; + Adjuster* greenout; + Adjuster* ybout; + Adjuster* tempsc; + Adjuster* greensc; + + MyExpander* expadjust; + + MyComboBoxText* toneCurveMode; + MyComboBoxText* toneCurveMode2; + MyComboBoxText* toneCurveMode3; + + //Adjuster* edge; + Gtk::CheckButton* surrsource; + Gtk::CheckButton* gamut; +// Gtk::CheckButton* badpix; + Gtk::CheckButton* datacie; + Gtk::CheckButton* tonecie; + // Gtk::CheckButton* sharpcie; + Gtk::Button* neutral; + MyComboBoxText* surrsrc; + sigc::connection surrsrcconn; + + MyComboBoxText* surround; + sigc::connection surroundconn; + MyComboBoxText* wbmodel; + sigc::connection wbmodelconn; + MyComboBoxText* algo; + sigc::connection algoconn; + sigc::connection surrconn; + sigc::connection gamutconn, datacieconn, tonecieconn /*,badpixconn , sharpcieconn*/; + sigc::connection tcmodeconn, tcmode2conn, tcmode3conn, neutralconn; + CurveEditorGroup* curveEditorG; + CurveEditorGroup* curveEditorG2; + CurveEditorGroup* curveEditorG3; + + DiagonalCurveEditor* shape; + DiagonalCurveEditor* shape2; + DiagonalCurveEditor* shape3; + double nextCcam, nextCcamout, nextCadap; + int nextYbscn; + bool lastAutoDegree; + bool lastAutoAdapscen; + bool lastAutoDegreeout; + bool lastAutoybscen; + bool lastsurr; + bool lastgamut; + bool lastdatacie; + bool lasttonecie; + + IdleRegister idle_register; }; #endif diff --git a/rtgui/coloredbar.cc b/rtgui/coloredbar.cc index c6a8ec730..7d623949e 100644 --- a/rtgui/coloredbar.cc +++ b/rtgui/coloredbar.cc @@ -18,6 +18,7 @@ */ #include "coloredbar.h" +#include "../rtengine/utils.h" ColoredBar::ColoredBar (eRTOrientation orient) { @@ -26,49 +27,69 @@ ColoredBar::ColoredBar (eRTOrientation orient) this->x = this->y = this->w = this->h = 0; } +bool ColoredBar::setDrawRectangle(int newX, int newY, int newW, int newH, bool updateBackBufferSize) +{ + return BackBuffer::setDrawRectangle(Cairo::FORMAT_ARGB32, newX, newY, newW, newH, updateBackBufferSize); +} + /* * Redraw the bar to a Cairo::ImageSurface */ -void ColoredBar::expose(Cairo::RefPtr destSurface) +void ColoredBar::expose(Gtk::DrawingArea &drawingArea, Cairo::RefPtr destSurface) { // look out if the Surface has to be redrawn if (!surfaceCreated() || !destSurface) { return; } - draw(); - copySurface(destSurface); + updateBackBuffer(drawingArea); + Gdk::Rectangle rect(x, y, w, h); + copySurface(destSurface, &rect); } /* * Redraw the bar to a Gdk::Window */ -void ColoredBar::expose(Glib::RefPtr destWindow) +void ColoredBar::expose(Gtk::DrawingArea &drawingArea, Glib::RefPtr destWindow) { // look out if the Surface has to be redrawn if (!surfaceCreated() || !destWindow) { return; } - draw(); - copySurface(destWindow); + updateBackBuffer(drawingArea); + Gdk::Rectangle rect(x, y, w, h); + copySurface(destWindow, &rect); +} + +void ColoredBar::expose(Gtk::DrawingArea &drawingArea, const Cairo::RefPtr< Cairo::Context> &cr) +{ + // look out if the Surface has to be redrawn + if (!surfaceCreated()) { + return; + } + + updateBackBuffer(drawingArea); + Gdk::Rectangle rect(x, y, w, h); + copySurface(cr, &rect); } /* * Redraw the bar to a Gdk::Window */ -void ColoredBar::expose(BackBuffer *backBuffer) +void ColoredBar::expose(Gtk::DrawingArea &drawingArea, BackBuffer *backBuffer) { // look out if the Surface has to be redrawn if (!surfaceCreated() || !backBuffer) { return; } - draw(); - copySurface(backBuffer); + updateBackBuffer(drawingArea); + Gdk::Rectangle rect(x, y, w, h); + copySurface(backBuffer, &rect); } -void ColoredBar::draw() +void ColoredBar::updateBackBuffer(Gtk::DrawingArea &drawingArea) { if (isDirty()) { Cairo::RefPtr cr = getContext(); @@ -110,53 +131,57 @@ void ColoredBar::draw() } else { // ask the ColorProvider to provide colors :) for each pixels if (colorProvider) { + surface->flush(); + + unsigned char *surfaceData = surface->get_data(); + cr->set_antialias(Cairo::ANTIALIAS_NONE); cr->set_line_width(1.); switch (orientation) { case (RTO_Left2Right): - for (int x = 0; x < w; x++) { - for (int y = 0; y < h; y++) { - double x_ = double( x); - double y_ = double((h - 1) - y); - double x01 = x_ / double(w - 1); - double y01 = double(y) / double(h - 1); + for (int py = 0; py < h; ++py) { + for (int px = 0; px < w; ++px) { + unsigned char *pixel = surfaceData + (py * w + px) * 4; + double x_ = double( px); + //double y_ = double((h-1)-py); unused + double x01 = x_ / double(w - 1); + double y01 = double(py) / double(h - 1); colorProvider->colorForValue (x01, y01, CCET_BACKGROUND, colorCallerId, this); - cr->set_source_rgb(ccRed, ccGreen, ccBlue); - cr->rectangle(x_, y_, 1., 1.); - cr->fill(); + + rtengine::poke01_d(pixel, ccRed, ccGreen, ccBlue); } } break; case (RTO_Right2Left): - for (int x = 0; x < w; x++) { - for (int y = 0; y < h; y++) { - double x_ = double((w - 1) - x); - double y_ = double((h - 1) - y); - double x01 = double(x) / double(w - 1); - double y01 = double(y) / double(h - 1); + for (int py = 0; py < h; ++py) { + for (int px = 0; px < w; ++px) { + unsigned char *pixel = surfaceData + (py * w + px) * 4; + //double x_ = double((w-1)-px); unused + //double y_ = double((h-1)-py); unused + double x01 = double(px) / double(w - 1); + double y01 = double(py) / double(h - 1); colorProvider->colorForValue (x01, y01, CCET_BACKGROUND, colorCallerId, this); - cr->set_source_rgb(ccRed, ccGreen, ccBlue); - cr->rectangle(x_, y_, 1., 1.); - cr->fill(); + + rtengine::poke01_d(pixel, ccRed, ccGreen, ccBlue); } } break; case (RTO_Bottom2Top): - for (int x = 0; x < w; x++) { - for (int y = 0; y < h; y++) { - double x_ = double((w - 1) - x); - double y_ = double((h - 1) - y); - double x01 = double(x) / double(w - 1); - double y01 = double(y) / double(h - 1); + for (int py = 0; py < h; ++py) { + for (int px = 0; px < w; ++px) { + unsigned char *pixel = surfaceData + (py * w + px) * 4; + //double x_ = double((w-1)-px); unused + //double y_ = double((h-1)-py); unused + double x01 = double(px) / double(w - 1); + double y01 = double(py) / double(h - 1); colorProvider->colorForValue (y01, x01, CCET_BACKGROUND, colorCallerId, this); - cr->set_source_rgb(ccRed, ccGreen, ccBlue); - cr->rectangle(x_, y_, 1., 1.); - cr->fill(); + + rtengine::poke01_d(pixel, ccRed, ccGreen, ccBlue); } } @@ -164,21 +189,23 @@ void ColoredBar::draw() case (RTO_Top2Bottom): default: - for (int x = 0; x < w; x++) { - for (int y = 0; y < h; y++) { - double x_ = double( x); - double y_ = double( y); + for (int py = 0; py < h; ++py) { + for (int px = 0; px < w; ++px) { + unsigned char *pixel = surfaceData + (py * w + px) * 4; + double x_ = double( px); + double y_ = double( py); double x01 = x_ / double(w - 1); double y01 = y_ / double(h - 1); colorProvider->colorForValue (y01, x01, CCET_BACKGROUND, colorCallerId, this); - cr->set_source_rgb(ccRed, ccGreen, ccBlue); - cr->rectangle(x_, y_, 1., 1.); - cr->fill(); + + rtengine::poke01_d(pixel, ccRed, ccGreen, ccBlue); } } break; } + + surface->mark_dirty(); } } diff --git a/rtgui/coloredbar.h b/rtgui/coloredbar.h index 237cd8595..010d0dcb6 100644 --- a/rtgui/coloredbar.h +++ b/rtgui/coloredbar.h @@ -25,12 +25,17 @@ /* * Parent class for all colored bar type; a ColorProvider has to be set * thanks to "setColorProvider" to be able to display colors inside the bar + * + * WARNING: If the color has no gradient defined or can't get colors from the provider, + * the bar will have undefined data, and the calling class will have to draw + * the bar itself, i.e. use render_background (depending on its Gtk::Style) + * */ -class ColoredBar : public BackBuffer, public ColorCaller +class ColoredBar : private BackBuffer, public ColorCaller { private: - void draw(); + void updateBackBuffer(Gtk::DrawingArea &drawingArea); protected: eRTOrientation orientation; @@ -38,10 +43,12 @@ protected: public: explicit ColoredBar (eRTOrientation orient); + bool setDrawRectangle(int newX, int newY, int newW, int newH, bool updateBackBufferSize = true); - void expose(Glib::RefPtr destWindow); - void expose(Cairo::RefPtr destSurface); - void expose(BackBuffer *backBuffer); + void expose(Gtk::DrawingArea &drawingArea, Glib::RefPtr destWindow); + void expose(Gtk::DrawingArea &drawingArea, Cairo::RefPtr destSurface); + void expose(Gtk::DrawingArea &drawingArea, BackBuffer *backBuffer); + void expose(Gtk::DrawingArea &drawingArea, const Cairo::RefPtr< Cairo::Context> &cr); bool canGetColors(); @@ -50,6 +57,10 @@ public: // by clearing the gradient, the ColorProvider will have to provide colors on a per pixel basis if a ColorProvider // has been set, through ColorProvider::colorForValue on next ColoredBar::expose void clearBgGradient (); + + void setDirty(bool isDirty) { + BackBuffer::setDirty(isDirty); + } }; #endif diff --git a/rtgui/colortoning.cc b/rtgui/colortoning.cc index a4d28c104..786030a73 100644 --- a/rtgui/colortoning.cc +++ b/rtgui/colortoning.cc @@ -16,11 +16,11 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR //---------------method method = Gtk::manage (new MyComboBoxText ()); - method->append_text (M("TP_COLORTONING_LAB")); - method->append_text (M("TP_COLORTONING_RGBSLIDERS")); - method->append_text (M("TP_COLORTONING_RGBCURVES")); - method->append_text (M("TP_COLORTONING_SPLITCOCO")); - method->append_text (M("TP_COLORTONING_SPLITLR")); + method->append (M("TP_COLORTONING_LAB")); + method->append (M("TP_COLORTONING_RGBSLIDERS")); + method->append (M("TP_COLORTONING_RGBCURVES")); + method->append (M("TP_COLORTONING_SPLITCOCO")); + method->append (M("TP_COLORTONING_SPLITLR")); method->set_active (0); method->set_tooltip_text (M("TP_COLORTONING_METHOD_TOOLTIP")); @@ -72,10 +72,10 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR //----------------------red green blue yellow colours twocolor = Gtk::manage (new MyComboBoxText ()); - twocolor->append_text (M("TP_COLORTONING_TWOSTD")); - twocolor->append_text (M("TP_COLORTONING_TWOALL")); - twocolor->append_text (M("TP_COLORTONING_TWOBY")); - twocolor->append_text (M("TP_COLORTONING_TWO2")); + twocolor->append (M("TP_COLORTONING_TWOSTD")); + twocolor->append (M("TP_COLORTONING_TWOALL")); + twocolor->append (M("TP_COLORTONING_TWOBY")); + twocolor->append (M("TP_COLORTONING_TWO2")); twocolor->set_tooltip_text (M("TP_COLORTONING_TWOCOLOR_TOOLTIP")); twocolor->set_active (0); @@ -187,11 +187,9 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR // Vertical box container for the content of the Process 1 frame Gtk::VBox *p1VBox; p1Frame = Gtk::manage (new Gtk::Frame(M("TP_COLORTONING_SA")) ); - p1Frame->set_border_width(0); p1Frame->set_label_align(0.025, 0.5); p1VBox = Gtk::manage ( new Gtk::VBox()); - p1VBox->set_border_width(4); p1VBox->set_spacing(2); autosat = Gtk::manage (new Gtk::CheckButton (M("TP_COLORTONING_AUTOSAT"))); @@ -287,11 +285,8 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR //--------------------- Reset sliders --------------------------- neutrHBox = Gtk::manage (new Gtk::HBox ()); - neutrHBox->set_border_width (2); neutral = Gtk::manage (new Gtk::Button (M("TP_COLORTONING_NEUTRAL"))); - RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); - neutral->set_image(*resetImg); neutral->set_tooltip_text (M("TP_COLORTONING_NEUTRAL_TIP")); neutralconn = neutral->signal_pressed().connect( sigc::mem_fun(*this, &ColorToning::neutral_pressed) ); neutral->show(); @@ -329,6 +324,8 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR ColorToning::~ColorToning() { + idle_register.destroy(); + delete colorCurveEditorG; delete opacityCurveEditorG; delete clCurveEditorG; @@ -655,20 +652,18 @@ void ColorToning::adjusterChanged (ThresholdAdjuster* a, double newBottom, doubl Glib::ustring::compose(Glib::ustring(M("TP_COLORTONING_HUE") + ": %1" + "\n" + M("TP_COLORTONING_STRENGTH") + ": %2"), int(newTop), int(newBottom))); } -int CTChanged_UI (void* data) -{ - GThreadLock lock; - (static_cast(data))->CTComp_ (); - return 0; -} - - void ColorToning::autoColorTonChanged(int bwct, int satthres, int satprot) { nextbw = bwct; nextsatth = satthres; nextsatpr = satprot; - g_idle_add (CTChanged_UI, this); + + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->CTComp_(); + return FALSE; + }; + + idle_register.add(func, this); } bool ColorToning::CTComp_ () @@ -957,7 +952,7 @@ void ColorToning::autoOpenCurve () void ColorToning::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (callerId == 1) { // ch - main curve Color::hsv2rgb01(float(valY), 1.0f, 0.5f, R, G, B); @@ -1084,8 +1079,8 @@ void ColorToning::trimValues (rtengine::procparams::ProcParams* pp) void ColorToning::setBatchMode (bool batchMode) { ToolPanel::setBatchMode (batchMode); - method->append_text (M("GENERAL_UNCHANGED")); - twocolor->append_text (M("GENERAL_UNCHANGED")); + method->append (M("GENERAL_UNCHANGED")); + twocolor->append (M("GENERAL_UNCHANGED")); hlColSat->showEditedCB (); shadowsColSat->showEditedCB (); redlow->showEditedCB (); diff --git a/rtgui/colortoning.h b/rtgui/colortoning.h index e34447301..347cfd126 100644 --- a/rtgui/colortoning.h +++ b/rtgui/colortoning.h @@ -13,13 +13,44 @@ #include "thresholdadjuster.h" #include "colorprovider.h" -class ColorToning : public ToolParamBlock, public FoldableToolPanel, public rtengine::AutoColorTonListener, public CurveListener, public ColorProvider, - public ThresholdAdjusterListener, public AdjusterListener +class ColorToning final : + public ToolParamBlock, + public FoldableToolPanel, + public rtengine::AutoColorTonListener, + public CurveListener, + public ColorProvider, + public ThresholdAdjusterListener, + public AdjusterListener { +public: + ColorToning (); + ~ColorToning(); + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setBatchMode (bool batchMode); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); + void trimValues (rtengine::procparams::ProcParams* pp); + void adjusterChanged (Adjuster* a, double newval); + void adjusterChanged (ThresholdAdjuster* a, double newBottom, double newTop); + void setAdjusterBehavior (bool splitAdd, bool satThresholdAdd, bool satOpacityAdd, bool strprotectAdd, bool balanceAdd); + void neutral_pressed (); + //void neutralCurves_pressed (); + void autoColorTonChanged (int bwct, int satthres, int satprot); + bool CTComp_ (); -protected: - //Gtk::HSeparator* splitSep; - Gtk::HSeparator* satLimiterSep; + void enabledChanged (); + void curveChanged (CurveEditor* ce); + void autosatChanged (); + void autoOpenCurve (); + void methodChanged (); + void twocolorChanged (bool changedbymethod); + void twoColorChangedByGui (); + void lumamodeChanged (); + + void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller); + +private: + //Gtk::HSeparator* satLimiterSep; Gtk::HSeparator* colorSep; CurveEditorGroup* colorCurveEditorG; CurveEditorGroup* opacityCurveEditorG; @@ -52,21 +83,16 @@ protected: Adjuster* satProtectionThreshold; Adjuster* saturatedOpacity; Adjuster* strength; - Gtk::Image* itot; Gtk::Image* iby; Gtk::Image* irg; Gtk::Button* neutral; - //Gtk::Button* neutralCurves; Gtk::HBox* neutrHBox; - Gtk::HBox* chromaHbox; - Gtk::Label* chroLabel; int nextbw; int nextsatth; int nextsatpr; Glib::ustring nextbalcolor; Glib::ustring balcolor; - bool lasttwocolor; sigc::connection neutralconn, twocconn; //, neutralcurvesconn; bool lastautosat; sigc::connection autosatConn; @@ -75,32 +101,7 @@ protected: bool lastLumamode; sigc::connection lumamodeConn; -public: - ColorToning (); - ~ColorToning(); - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); - void setBatchMode (bool batchMode); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); - void trimValues (rtengine::procparams::ProcParams* pp); - void adjusterChanged (Adjuster* a, double newval); - void adjusterChanged (ThresholdAdjuster* a, double newBottom, double newTop); - void setAdjusterBehavior (bool splitAdd, bool satThresholdAdd, bool satOpacityAdd, bool strprotectAdd, bool balanceAdd); - void neutral_pressed (); - //void neutralCurves_pressed (); - void autoColorTonChanged (int bwct, int satthres, int satprot); - bool CTComp_ (); - - void enabledChanged (); - void curveChanged (CurveEditor* ce); - void autosatChanged (); - void autoOpenCurve (); - void methodChanged (); - void twocolorChanged (bool changedbymethod); - void twoColorChangedByGui (); - void lumamodeChanged (); - - void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller); + IdleRegister idle_register; }; #endif diff --git a/rtgui/coordinateadjuster.cc b/rtgui/coordinateadjuster.cc index a9c0d2f2d..c91ced052 100644 --- a/rtgui/coordinateadjuster.cc +++ b/rtgui/coordinateadjuster.cc @@ -40,15 +40,11 @@ void Axis::setValues(Glib::ustring label, unsigned int decimal, double increment this->rangeUpperBound = valMax; } -CoordinateAdjuster::AxisAdjuster::AxisAdjuster(CoordinateAdjuster *parent, const Axis *axis, char index) : idx(index), parent(parent) +CoordinateAdjuster::AxisAdjuster::AxisAdjuster(CoordinateAdjuster *parent, const Axis *axis, char index) : idx(index), parent(parent), rangeLowerBound(0.f), rangeUpperBound(0.f) { - label = Gtk::manage( new Gtk::Label(axis->label) ); - spinButton = Gtk::manage( new Gtk::SpinButton() ); - label = Gtk::manage (new Gtk::Label(axis->label)); - //label->set_alignment(Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); - - spinButton = Gtk::manage (new Gtk::SpinButton()); + label = Gtk::manage(new Gtk::Label(axis->label)); + spinButton = Gtk::manage(new Gtk::SpinButton()); spinButton->set_name("AxisAdjuster"); spinButton->set_digits(axis->decimal); spinButton->set_increments(axis->increment, axis->pageIncrement); @@ -122,18 +118,24 @@ void CoordinateAdjuster::createWidgets(const std::vector &axis) axisAdjusters.resize(axis.size()); - set_spacing(3); - for (unsigned int i = 0; i < count; ++i) { - AxisAdjuster *currAdjuster = nullptr; const Axis *currAxis = &(axis.at(i)); axisAdjusters.at(i) = new AxisAdjuster(this, currAxis, i); - currAdjuster = axisAdjusters.at(i); + AxisAdjuster *currAdjuster = axisAdjusters.at(i); currAdjuster->rangeLowerBound = currAxis->rangeLowerBound; currAdjuster->rangeUpperBound = currAxis->rangeUpperBound; - pack_start(*(currAdjuster->label), Gtk::PACK_SHRINK, 0); - pack_start(*(currAdjuster->spinButton), Gtk::PACK_SHRINK, 0); + Gtk::Grid *box = Gtk::manage (new Gtk::Grid()); + box->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + box->set_column_spacing(3); + + setExpandAlignProperties(currAdjuster->label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + setExpandAlignProperties(currAdjuster->spinButton, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + + box->attach_next_to(*(currAdjuster->spinButton), Gtk::POS_LEFT, 1, 1); + box->attach_next_to(*(currAdjuster->label), Gtk::POS_LEFT, 1, 1); + + add(*box); } } diff --git a/rtgui/coordinateadjuster.h b/rtgui/coordinateadjuster.h index bcb5b6bf1..e6e16b7a2 100644 --- a/rtgui/coordinateadjuster.h +++ b/rtgui/coordinateadjuster.h @@ -70,7 +70,7 @@ public: * * The position of the Axis in the vector will be used in the communication between the Adjuster and the Provider to identify the Axis */ -class CoordinateAdjuster : public Gtk::HBox +class CoordinateAdjuster : public Gtk::FlowBox { public: diff --git a/rtgui/crop.cc b/rtgui/crop.cc index ab8a7a8cc..4b9e22fd2 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -25,6 +25,9 @@ using namespace rtengine::procparams; extern Options options; +namespace +{ + class RefreshSpinHelper { @@ -35,7 +38,23 @@ public: : crop(_crop), notify(_notify) {} }; -Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true) +int refreshSpinsUI (void* data) +{ + RefreshSpinHelper* rsh = static_cast(data); + rsh->crop->refreshSpins (rsh->notify); + delete rsh; + return 0; +} + +int notifyListenerUI (void* data) +{ + static_cast(data)->notifyListener(); + return 0; +} + +} + +Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true), opt(0), wDirty(true), hDirty(true), xDirty(true), yDirty(true), lastFixRatio(true) { clistener = nullptr; @@ -189,31 +208,31 @@ Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true) // populate the combobox for (int i = 0; i < NumberOfCropRatios; i++) { - ratio->append_text (cropratio[i].label); + ratio->append (cropratio[i].label); } ratio->set_active (0); - orientation->append_text (M("GENERAL_LANDSCAPE")); - orientation->append_text (M("GENERAL_PORTRAIT")); - orientation->append_text (M("GENERAL_ASIMAGE")); + orientation->append (M("GENERAL_LANDSCAPE")); + orientation->append (M("GENERAL_PORTRAIT")); + orientation->append (M("GENERAL_ASIMAGE")); orientation->set_active (2); - guide->append_text (M("TP_CROP_GTNONE")); - guide->append_text (M("TP_CROP_GTFRAME")); - guide->append_text (M("TP_CROP_GTRULETHIRDS")); - guide->append_text (M("TP_CROP_GTDIAGONALS")); - guide->append_text (M("TP_CROP_GTHARMMEANS")); - guide->append_text (M("TP_CROP_GTGRID")); - guide->append_text (M("TP_CROP_GTTRIANGLE1")); - guide->append_text (M("TP_CROP_GTTRIANGLE2")); - guide->append_text (M("TP_CROP_GTEPASSPORT")); + guide->append (M("TP_CROP_GTNONE")); + guide->append (M("TP_CROP_GTFRAME")); + guide->append (M("TP_CROP_GTRULETHIRDS")); + guide->append (M("TP_CROP_GTDIAGONALS")); + guide->append (M("TP_CROP_GTHARMMEANS")); + guide->append (M("TP_CROP_GTGRID")); + guide->append (M("TP_CROP_GTTRIANGLE1")); + guide->append (M("TP_CROP_GTTRIANGLE2")); + guide->append (M("TP_CROP_GTEPASSPORT")); guide->set_active (0); - w->set_range (0, maxw); - h->set_range (0, maxh); - x->set_range (0, maxw); - y->set_range (0, maxh); + w->set_range (1, maxw); + h->set_range (1, maxh); + x->set_range (0, maxw - 1); + y->set_range (0, maxh - 1); x->set_digits (0); x->set_increments (1, 100); @@ -252,6 +271,11 @@ Crop::Crop (): FoldableToolPanel(this, "crop", M("TP_CROP_LABEL"), false, true) show_all (); } +Crop::~Crop() +{ + idle_register.destroy(); +} + void Crop::writeOptions () { @@ -326,10 +350,10 @@ void Crop::read (const ProcParams* pp, const ParamsEdited* pedited) guide->set_active (8); } - x->set_value (pp->crop.x); - y->set_value (pp->crop.y); - w->set_value (pp->crop.w); - h->set_value (pp->crop.h); + x->set_value(pp->crop.x); + y->set_value(pp->crop.y); + w->set_value(std::max(pp->crop.w, 1)); + h->set_value(std::max(pp->crop.h, 1)); nx = pp->crop.x; ny = pp->crop.y; @@ -508,34 +532,18 @@ void Crop::enabledChanged () } } -int notifyListenerUI (void* data) -{ - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected - (static_cast(data))->notifyListener (); - return 0; -} - -int refreshSpinsUI (void* data) -{ - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected - RefreshSpinHelper* rsh = static_cast(data); - rsh->crop->refreshSpins (rsh->notify); - delete rsh; - return 0; -} - void Crop::hFlipCrop () { nx = maxw - nx - nw; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); } void Crop::vFlipCrop () { ny = maxh - ny - nh; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); } void Crop::rotateCrop (int deg, bool hflip, bool vflip) @@ -575,7 +583,7 @@ void Crop::rotateCrop (int deg, bool hflip, bool vflip) } lastRotationDeg = deg; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); } void Crop::positionChanged () @@ -589,7 +597,7 @@ void Crop::positionChanged () int W = nw; int H = nh; cropMoved (X, Y, W, H); - g_idle_add (notifyListenerUI, this); + idle_register.add(notifyListenerUI, this); } void Crop::widthChanged () @@ -602,7 +610,7 @@ void Crop::widthChanged () int W = (int)w->get_value (); int H = nh; cropWidth2Resized (X, Y, W, H); - g_idle_add (notifyListenerUI, this); + idle_register.add(notifyListenerUI, this); } void Crop::heightChanged () @@ -615,7 +623,7 @@ void Crop::heightChanged () int W = nw; int H = (int)h->get_value (); cropHeight2Resized (X, Y, W, H); - g_idle_add (notifyListenerUI, this); + idle_register.add(notifyListenerUI, this); } // Fixed ratio toggle button @@ -667,7 +675,7 @@ void Crop::adjustCropToRatio() } // This will save the options - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, true)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, true)); } void Crop::refreshSize () @@ -706,10 +714,10 @@ void Crop::setDimensions (int mw, int mh) bool wconnWasBlocked = wconn.block (true); bool hconnWasBlocked = hconn.block (true); - w->set_range (0, maxw); - h->set_range (0, maxh); - x->set_range (0, maxw); - y->set_range (0, maxh); + w->set_range (1, maxw); + h->set_range (1, maxh); + x->set_range (0, maxw - 1); + y->set_range (0, maxh - 1); if (!xconnWasBlocked) { xconn.block (false); @@ -739,29 +747,28 @@ void Crop::setDimensions (int mw, int mh) refreshSize (); } -struct setdimparams { - Crop* crop; - int x; - int y; -}; - -int sizeChangedUI (void* data) -{ - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected - setdimparams* params = static_cast(data); - params->crop->setDimensions (params->x, params->y); - delete params; - return 0; -} - void Crop::sizeChanged (int x, int y, int ow, int oh) { + struct Params { + Crop* crop; + int x; + int y; + }; - setdimparams* params = new setdimparams; - params->x = x; - params->y = y; - params->crop = this; - g_idle_add (sizeChangedUI, params); + Params* const params = new Params{ + this, + x, + y + }; + + const auto func = [](gpointer data) -> gboolean { + Params* const params = static_cast(data); + params->crop->setDimensions(params->x, params->y); + delete params; + return FALSE; + }; + + idle_register.add(func, params); } bool Crop::refreshSpins (bool notify) @@ -825,11 +832,11 @@ void Crop::cropMoved (int &X, int &Y, int &W, int &H) nw = W; nh = H; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); // Glib::signal_idle().connect (sigc::mem_fun(*this, &Crop::refreshSpins)); } -void Crop::cropWidth1Resized (int &X, int &Y, int &W, int &H) +void Crop::cropWidth1Resized (int &X, int &Y, int &W, int &H, float custom_ratio) { int oldXR = nx + nw; @@ -842,8 +849,8 @@ void Crop::cropWidth1Resized (int &X, int &Y, int &W, int &H) W = oldXR; } - if (fixr->get_active()) { - double r = getRatio(); + if (fixr->get_active() || custom_ratio > 0) { + double r = custom_ratio > 0 ? custom_ratio : getRatio(); H = (int)round(W / r); int Hmax = min(ny + nh, maxh - ny); @@ -869,10 +876,10 @@ void Crop::cropWidth1Resized (int &X, int &Y, int &W, int &H) nw = W; nh = H; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); } -void Crop::cropWidth2Resized (int &X, int &Y, int &W, int &H) +void Crop::cropWidth2Resized (int &X, int &Y, int &W, int &H, float custom_ratio) { if (W < 0) { @@ -883,8 +890,8 @@ void Crop::cropWidth2Resized (int &X, int &Y, int &W, int &H) W = maxw - nx; } - if (fixr->get_active()) { - double r = getRatio(); + if (fixr->get_active() || custom_ratio > 0) { + double r = custom_ratio > 0 ? custom_ratio : getRatio(); H = (int)round(W / r); int Hmax = min(ny + nh, maxh - ny); @@ -909,10 +916,10 @@ void Crop::cropWidth2Resized (int &X, int &Y, int &W, int &H) nw = W; nh = H; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); } -void Crop::cropHeight1Resized (int &X, int &Y, int &W, int &H) +void Crop::cropHeight1Resized (int &X, int &Y, int &W, int &H, float custom_ratio) { int oldYB = ny + nh; @@ -925,8 +932,8 @@ void Crop::cropHeight1Resized (int &X, int &Y, int &W, int &H) H = oldYB; } - if (fixr->get_active()) { - double r = getRatio(); + if (fixr->get_active() || custom_ratio > 0) { + double r = custom_ratio > 0 ? custom_ratio : getRatio(); W = (int)round(H * r); int Wmax = min(nx + nw, maxw - nx); @@ -952,10 +959,10 @@ void Crop::cropHeight1Resized (int &X, int &Y, int &W, int &H) nw = W; nh = H; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); } -void Crop::cropHeight2Resized (int &X, int &Y, int &W, int &H) +void Crop::cropHeight2Resized (int &X, int &Y, int &W, int &H, float custom_ratio) { if (H < 0) { @@ -966,8 +973,8 @@ void Crop::cropHeight2Resized (int &X, int &Y, int &W, int &H) H = maxh - ny; } - if (fixr->get_active()) { - double r = getRatio(); + if (fixr->get_active() || custom_ratio > 0) { + double r = custom_ratio > 0 ? custom_ratio : getRatio(); W = (int)round(H * r); int Wmax = min(nx + nw, maxw - nx); @@ -992,10 +999,10 @@ void Crop::cropHeight2Resized (int &X, int &Y, int &W, int &H) nw = W; nh = H; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); } -void Crop::cropTopLeftResized (int &X, int &Y, int &W, int &H) +void Crop::cropTopLeftResized (int &X, int &Y, int &W, int &H, float custom_ratio) { int oldXR = nx + nw; // right side @@ -1017,8 +1024,8 @@ void Crop::cropTopLeftResized (int &X, int &Y, int &W, int &H) H = oldYB; } - if (fixr->get_active()) { - double r = getRatio(); + if (fixr->get_active() || custom_ratio > 0) { + double r = custom_ratio > 0 ? custom_ratio : getRatio(); W = (int)round(H * r); if (W > oldXR) { @@ -1034,10 +1041,10 @@ void Crop::cropTopLeftResized (int &X, int &Y, int &W, int &H) nw = W; nh = H; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); } -void Crop::cropTopRightResized (int &X, int &Y, int &W, int &H) +void Crop::cropTopRightResized (int &X, int &Y, int &W, int &H, float custom_ratio) { int oldYB = ny + nh; @@ -1058,8 +1065,8 @@ void Crop::cropTopRightResized (int &X, int &Y, int &W, int &H) H = oldYB; } - if (fixr->get_active()) { - double r = getRatio(); + if (fixr->get_active() || custom_ratio > 0) { + double r = custom_ratio > 0 ? custom_ratio : getRatio(); W = (int)round(H * r); if (W > maxw - nx) { @@ -1074,10 +1081,10 @@ void Crop::cropTopRightResized (int &X, int &Y, int &W, int &H) nw = W; nh = H; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); } -void Crop::cropBottomLeftResized (int &X, int &Y, int &W, int &H) +void Crop::cropBottomLeftResized (int &X, int &Y, int &W, int &H, float custom_ratio) { int oldXR = nx + nw; @@ -1098,8 +1105,8 @@ void Crop::cropBottomLeftResized (int &X, int &Y, int &W, int &H) H = maxh - ny; } - if (fixr->get_active()) { - double r = getRatio(); + if (fixr->get_active() || custom_ratio > 0) { + double r = custom_ratio > 0 ? custom_ratio : getRatio(); W = (int)round(H * r); if (W > oldXR) { @@ -1114,10 +1121,10 @@ void Crop::cropBottomLeftResized (int &X, int &Y, int &W, int &H) nw = W; nh = H; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); } -void Crop::cropBottomRightResized (int &X, int &Y, int &W, int &H) +void Crop::cropBottomRightResized (int &X, int &Y, int &W, int &H, float custom_ratio) { if (W < 0) { @@ -1136,8 +1143,8 @@ void Crop::cropBottomRightResized (int &X, int &Y, int &W, int &H) H = maxh - ny; } - if (fixr->get_active()) { - double r = getRatio(); + if (fixr->get_active() || custom_ratio > 0) { + double r = custom_ratio > 0 ? custom_ratio : getRatio(); W = (int)round(H * r); if (W > maxw - nx) { @@ -1151,7 +1158,7 @@ void Crop::cropBottomRightResized (int &X, int &Y, int &W, int &H) nw = W; nh = H; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); } void Crop::cropInit (int &x, int &y, int &w, int &h) @@ -1212,10 +1219,6 @@ void Crop::cropResized (int &x, int &y, int& x2, int& y2) W = maxw; } - if (H > maxh) { - H = maxh; - } - if (fixr->get_active()) { double r = getRatio (); @@ -1269,13 +1272,12 @@ void Crop::cropResized (int &x, int &y, int& x2, int& y2) nw = W; nh = H; - g_idle_add (refreshSpinsUI, new RefreshSpinHelper (this, false)); + idle_register.add(refreshSpinsUI, new RefreshSpinHelper(this, false)); } void Crop::cropManipReady () { - - g_idle_add (notifyListenerUI, this); + idle_register.add(notifyListenerUI, this); } double Crop::getRatio () @@ -1308,8 +1310,8 @@ void Crop::setBatchMode (bool batchMode) ToolPanel::setBatchMode (batchMode); - ratio->append_text (M("GENERAL_UNCHANGED")); - orientation->append_text (M("GENERAL_UNCHANGED")); - guide->append_text (M("GENERAL_UNCHANGED")); + ratio->append (M("GENERAL_UNCHANGED")); + orientation->append (M("GENERAL_UNCHANGED")); + guide->append (M("GENERAL_UNCHANGED")); removeIfThere (this, ppibox); } diff --git a/rtgui/crop.h b/rtgui/crop.h index 61eff4bd7..4c2d7a209 100644 --- a/rtgui/crop.h +++ b/rtgui/crop.h @@ -27,23 +27,73 @@ class CropPanelListener { - public: - virtual void cropSelectRequested () {} + virtual ~CropPanelListener() = default; + + virtual void cropSelectRequested() = 0; }; -class CropRatio -{ - -public: +struct CropRatio { Glib::ustring label; double value; }; -class Crop : public ToolParamBlock, public CropGUIListener, public FoldableToolPanel, public rtengine::SizeListener +class Crop final : + public ToolParamBlock, + public CropGUIListener, + public FoldableToolPanel, + public rtengine::SizeListener { +public: + Crop(); + ~Crop(); -protected: + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setBatchMode (bool batchMode); + + void ratioChanged (); + void ratioFixedChanged (); // The toggle button + void refreshSize (); + void selectPressed (); + void setDimensions (int mw, int mh); + void enabledChanged (); + void positionChanged (); + void widthChanged (); + void heightChanged (); + bool refreshSpins (bool notify = false); + void notifyListener (); + void sizeChanged (int w, int h, int ow, int oh); + void trim (rtengine::procparams::ProcParams* pp, int ow, int oh); + void readOptions (); + void writeOptions (); + + void cropMoved (int &x, int &y, int &w, int &h); + void cropWidth1Resized (int &x, int &y, int &w, int &h, float custom_ratio=0.f); + void cropWidth2Resized (int &x, int &y, int &w, int &h, float custom_ratio=0.f); + void cropHeight1Resized (int &x, int &y, int &w, int &h, float custom_ratio=0.f); + void cropHeight2Resized (int &x, int &y, int &w, int &h, float custom_ratio=0.f); + void cropTopLeftResized (int &x, int &y, int &w, int &h, float custom_ratio=0.f); + void cropTopRightResized (int &x, int &y, int &w, int &h, float custom_ratio=0.f); + void cropBottomLeftResized (int &x, int &y, int &w, int &h, float custom_ratio=0.f); + void cropBottomRightResized (int &x, int &y, int &w, int &h, float custom_ratio=0.f); + void cropInit (int &x, int &y, int &w, int &h); + void cropResized (int &x, int &y, int& x2, int& y2); + void cropManipReady (); + bool inImageArea (int x, int y); + double getRatio (); + + void setCropPanelListener (CropPanelListener* cl) + { + clistener = cl; + } + + void resizeScaleChanged (double rsc); + void hFlipCrop (); + void vFlipCrop (); + void rotateCrop (int deg, bool hflip, bool vflip); + +private: Gtk::CheckButton* fixr; MyComboBoxText* ratio; MyComboBoxText* orientation; @@ -69,54 +119,7 @@ protected: void adjustCropToRatio(); std::vector cropratio; -public: - - Crop (); - - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); - void setBatchMode (bool batchMode); - - void ratioChanged (); - void ratioFixedChanged (); // The toggle button - void refreshSize (); - void selectPressed (); - void setDimensions (int mw, int mh); - void enabledChanged (); - void positionChanged (); - void widthChanged (); - void heightChanged (); - bool refreshSpins (bool notify = false); - void notifyListener (); - void sizeChanged (int w, int h, int ow, int oh); - void trim (rtengine::procparams::ProcParams* pp, int ow, int oh); - void readOptions (); - void writeOptions (); - - void cropMoved (int &x, int &y, int &w, int &h); - void cropWidth1Resized (int &x, int &y, int &w, int &h); - void cropWidth2Resized (int &x, int &y, int &w, int &h); - void cropHeight1Resized (int &x, int &y, int &w, int &h); - void cropHeight2Resized (int &x, int &y, int &w, int &h); - void cropTopLeftResized (int &x, int &y, int &w, int &h); - void cropTopRightResized (int &x, int &y, int &w, int &h); - void cropBottomLeftResized (int &x, int &y, int &w, int &h); - void cropBottomRightResized (int &x, int &y, int &w, int &h); - void cropInit (int &x, int &y, int &w, int &h); - void cropResized (int &x, int &y, int& x2, int& y2); - void cropManipReady (); - bool inImageArea (int x, int y); - double getRatio (); - - void setCropPanelListener (CropPanelListener* cl) - { - clistener = cl; - } - - void resizeScaleChanged (double rsc); - void hFlipCrop (); - void vFlipCrop (); - void rotateCrop (int deg, bool hflip, bool vflip); + IdleRegister idle_register; }; #endif diff --git a/rtgui/cropguilistener.h b/rtgui/cropguilistener.h index 5124ece5f..239e9d002 100644 --- a/rtgui/cropguilistener.h +++ b/rtgui/cropguilistener.h @@ -25,14 +25,14 @@ class CropGUIListener public: virtual ~CropGUIListener() {} virtual void cropMoved (int &x, int &y, int &w, int &h) = 0; - virtual void cropWidth1Resized (int &x, int &y, int &w, int &h) = 0; - virtual void cropWidth2Resized (int &x, int &y, int &w, int &h) = 0; - virtual void cropHeight1Resized (int &x, int &y, int &w, int &h) = 0; - virtual void cropHeight2Resized (int &x, int &y, int &w, int &h) = 0; - virtual void cropTopLeftResized (int &x, int &y, int &w, int &h) = 0; - virtual void cropTopRightResized (int &x, int &y, int &w, int &h) = 0; - virtual void cropBottomLeftResized (int &x, int &y, int &w, int &h) = 0; - virtual void cropBottomRightResized (int &x, int &y, int &w, int &h) = 0; + virtual void cropWidth1Resized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0; + virtual void cropWidth2Resized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0; + virtual void cropHeight1Resized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0; + virtual void cropHeight2Resized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0; + virtual void cropTopLeftResized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0; + virtual void cropTopRightResized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0; + virtual void cropBottomLeftResized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0; + virtual void cropBottomRightResized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0; virtual void cropInit (int &x, int &y, int &w, int &h) = 0; virtual void cropResized (int &x, int &y, int& x2, int& y2) = 0; virtual void cropManipReady () = 0; diff --git a/rtgui/crophandler.cc b/rtgui/crophandler.cc index c22b5b529..f6ff83a7d 100644 --- a/rtgui/crophandler.cc +++ b/rtgui/crophandler.cc @@ -30,7 +30,7 @@ using namespace rtengine; CropHandler::CropHandler () - : zoom(10), ww(0), wh(0), imx(-1), imy(-1), imw(0), imh(0), cax(-1), cay(-1), + : zoom(100), ww(0), wh(0), cax(-1), cay(-1), cx(0), cy(0), cw(0), ch(0), cropX(0), cropY(0), cropW(0), cropH(0), enabled(false), cropimg(nullptr), cropimgtrue(nullptr), cropimg_width(0), cropimg_height(0), cix(0), ciy(0), ciw(0), cih(0), cis(1), @@ -38,14 +38,15 @@ CropHandler::CropHandler () displayHandler(nullptr) { - chi = new CropHandlerIdleHelper; - chi->destroyed = false; - chi->pending = 0; - chi->cropHandler = this; + idle_helper = new IdleHelper; + idle_helper->destroyed = false; + idle_helper->pending = 0; + idle_helper->cropHandler = this; } CropHandler::~CropHandler () { + idle_register.destroy(); if (ipc) { ipc->delSizeListener (this); @@ -61,10 +62,10 @@ CropHandler::~CropHandler () cimg.lock (); - if (chi->pending) { - chi->destroyed = true; + if (idle_helper->pending) { + idle_helper->destroyed = true; } else { - delete chi; + delete idle_helper; } cimg.unlock (); @@ -144,8 +145,8 @@ void CropHandler::setZoom (int z, int centerx, int centery) assert (ipc); int oldZoom = zoom; - float oldScale = zoom >= 1000 ? float(zoom / 1000) : 1.f / float(zoom); - float newScale = z >= 1000 ? float(z / 1000) : 1.f / float(z); + float oldScale = zoom >= 1000 ? float(zoom / 1000) : 10.f / float(zoom); + float newScale = z >= 1000 ? float(z / 1000) : 10.f / float(z); int oldcax = cax; int oldcay = cay; @@ -175,8 +176,8 @@ void CropHandler::setZoom (int z, int centerx, int centery) cw = ww * 1000 / zoom; ch = wh * 1000 / zoom; } else { - cw = ww * zoom; - ch = wh * zoom; + cw = ww * (zoom / 10); + ch = wh * (zoom / 10); } cx = cax - cw / 2; @@ -205,7 +206,7 @@ float CropHandler::getZoomFactor () if (zoom >= 1000) { return zoom / 1000; } else { - return 1.f / (float)zoom; + return 10.f / (float)zoom; } } @@ -220,8 +221,8 @@ void CropHandler::setWSize (int w, int h) cw = ww * 1000 / zoom; ch = wh * 1000 / zoom; } else { - cw = ww * zoom; - ch = wh * zoom; + cw = ww * (zoom / 10); + ch = wh * (zoom / 10); } compDim (); @@ -292,85 +293,6 @@ void CropHandler::getPosition (int& x, int& y) } -int createpixbufs (void* data) -{ - - GThreadLock lock; - - CropHandlerIdleHelper* chi = static_cast(data); - - if (chi->destroyed) { - if (chi->pending == 1) { - delete chi; - } else { - chi->pending--; - } - - return 0; - } - - CropHandler* ch = chi->cropHandler; - - ch->cimg.lock (); - ch->cropPixbuf.clear (); - - if (!ch->enabled) { - delete [] ch->cropimg; - ch->cropimg = nullptr; - delete [] ch->cropimgtrue; - ch->cropimgtrue = nullptr; - ch->cimg.unlock (); - return 0; - } - - if (ch->cropimg) { - if (ch->cix == ch->cropX && ch->ciy == ch->cropY && ch->ciw == ch->cropW && ch->cih == ch->cropH && ch->cis == (ch->zoom >= 1000 ? 1 : ch->zoom)) { - // calculate final image size - int czoom = ch->zoom < 1000 ? 1000 : ch->zoom; - int imw = ch->cropimg_width * czoom / 1000; - int imh = ch->cropimg_height * czoom / 1000; - - if (imw > ch->ww) { - imw = ch->ww; - } - - if (imh > ch->wh) { - imh = ch->wh; - } - - Glib::RefPtr tmpPixbuf = Gdk::Pixbuf::create_from_data (ch->cropimg, Gdk::COLORSPACE_RGB, false, 8, ch->cropimg_width, 2 * ch->cropimg_height, 3 * ch->cropimg_width); - ch->cropPixbuf = Gdk::Pixbuf::create (Gdk::COLORSPACE_RGB, false, 8, imw, imh); - tmpPixbuf->scale (ch->cropPixbuf, 0, 0, imw, imh, 0, 0, czoom / 1000.0, czoom / 1000.0, Gdk::INTERP_NEAREST); - tmpPixbuf.clear (); - - Glib::RefPtr tmpPixbuftrue = Gdk::Pixbuf::create_from_data (ch->cropimgtrue, Gdk::COLORSPACE_RGB, false, 8, ch->cropimg_width, 2 * ch->cropimg_height, 3 * ch->cropimg_width); - ch->cropPixbuftrue = Gdk::Pixbuf::create (Gdk::COLORSPACE_RGB, false, 8, imw, imh); - tmpPixbuftrue->scale (ch->cropPixbuftrue, 0, 0, imw, imh, 0, 0, czoom / 1000.0, czoom / 1000.0, Gdk::INTERP_NEAREST); - tmpPixbuftrue.clear (); - } - - delete [] ch->cropimg; - ch->cropimg = nullptr; - delete [] ch->cropimgtrue; - ch->cropimgtrue = nullptr; - } - - ch->cimg.unlock (); - - if (ch->displayHandler) { - ch->displayHandler->cropImageUpdated (); - - if (ch->initial) { - ch->displayHandler->initialImageArrived (); - ch->initial = false; - } - } - - chi->pending--; - - return 0; -} - void CropHandler::setDetailedCrop (IImage8* im, IImage8* imtrue, rtengine::procparams::ColorManagementParams cmp, rtengine::procparams::CropParams cp, int ax, int ay, int aw, int ah, int askip) { @@ -398,7 +320,7 @@ void CropHandler::setDetailedCrop (IImage8* im, IImage8* imtrue, rtengine::procp cropimgtrue = nullptr; - if (ax == cropX && ay == cropY && aw == cropW && ah == cropH && askip == (zoom >= 1000 ? 1 : zoom)) { + if (ax == cropX && ay == cropY && aw == cropW && ah == cropH && askip == (zoom >= 1000 ? 1 : zoom / 10)) { cropimg_width = im->getWidth (); cropimg_height = im->getHeight (); cropimg = new unsigned char [3 * cropimg_width * cropimg_height]; @@ -410,8 +332,86 @@ void CropHandler::setDetailedCrop (IImage8* im, IImage8* imtrue, rtengine::procp ciw = aw; cih = ah; cis = askip; - chi->pending++; - g_idle_add (createpixbufs, chi); + idle_helper->pending++; + + const auto func = [](gpointer data) -> gboolean { + IdleHelper* const idle_helper = static_cast(data); + + if (idle_helper->destroyed) { + if (idle_helper->pending == 1) { + delete idle_helper; + } else { + idle_helper->pending--; + } + + return FALSE; + } + + CropHandler* ch = idle_helper->cropHandler; + + ch->cimg.lock (); + ch->cropPixbuf.clear (); + + if (!ch->enabled) { + delete [] ch->cropimg; + ch->cropimg = nullptr; + delete [] ch->cropimgtrue; + ch->cropimgtrue = nullptr; + ch->cimg.unlock (); + return FALSE; + } + + if (ch->cropimg) { + if (ch->cix == ch->cropX && ch->ciy == ch->cropY && ch->ciw == ch->cropW && ch->cih == ch->cropH && ch->cis == (ch->zoom >= 1000 ? 1 : ch->zoom / 10)) { + // calculate final image size + float czoom = ch->zoom >= 1000 ? + ch->zoom / 1000.f : + float((ch->zoom/10) * 10) / float(ch->zoom); + int imw = ch->cropimg_width * czoom; + int imh = ch->cropimg_height * czoom; + + if (imw > ch->ww) { + imw = ch->ww; + } + + if (imh > ch->wh) { + imh = ch->wh; + } + + Glib::RefPtr tmpPixbuf = Gdk::Pixbuf::create_from_data (ch->cropimg, Gdk::COLORSPACE_RGB, false, 8, ch->cropimg_width, ch->cropimg_height, 3 * ch->cropimg_width); + ch->cropPixbuf = Gdk::Pixbuf::create (Gdk::COLORSPACE_RGB, false, 8, imw, imh); + tmpPixbuf->scale (ch->cropPixbuf, 0, 0, imw, imh, 0, 0, czoom, czoom, Gdk::INTERP_TILES); + tmpPixbuf.clear (); + + Glib::RefPtr tmpPixbuftrue = Gdk::Pixbuf::create_from_data (ch->cropimgtrue, Gdk::COLORSPACE_RGB, false, 8, ch->cropimg_width, ch->cropimg_height, 3 * ch->cropimg_width); + ch->cropPixbuftrue = Gdk::Pixbuf::create (Gdk::COLORSPACE_RGB, false, 8, imw, imh); + tmpPixbuftrue->scale (ch->cropPixbuftrue, 0, 0, imw, imh, 0, 0, czoom, czoom, Gdk::INTERP_TILES); + tmpPixbuftrue.clear (); + } + + delete [] ch->cropimg; + ch->cropimg = nullptr; + delete [] ch->cropimgtrue; + ch->cropimgtrue = nullptr; + } + + ch->cimg.unlock (); + + if (ch->displayHandler) { + ch->displayHandler->cropImageUpdated (); + + if (ch->initial) { + ch->displayHandler->initialImageArrived (); + ch->initial = false; + } + } + + idle_helper->pending--; + + return FALSE; + }; + + idle_register.add(func, idle_helper); } cimg.unlock (); @@ -434,7 +434,7 @@ bool CropHandler::getWindow (int& cwx, int& cwy, int& cww, int& cwh, int& cskip) cwh = 32; } - cskip = zoom >= 1000 ? 1 : zoom; + cskip = zoom >= 1000 ? 1 : zoom/10; return true; } @@ -545,6 +545,7 @@ void CropHandler::colorPick (const rtengine::Coord &pickerPos, float &r, float & } } + count = std::max(1u, count); // Averaging r = (float)r2 / (float)count / 255.f; g = (float)g2 / (float)count / 255.f; @@ -569,6 +570,8 @@ void CropHandler::colorPick (const rtengine::Coord &pickerPos, float &r, float & } } } + + count = std::max(1u, count); // Averaging rpreview = (float)r2 / (float)count / 255.f; gpreview = (float)g2 / (float)count / 255.f; @@ -617,12 +620,12 @@ void CropHandler::compDim () scaledCAX = cax * (zoom/1000); scaledCAY = cay * (zoom/1000); } else { - wwImgSpace = int(float(ww) * float(zoom) + 0.5f); - whImgSpace = int(float(wh) * float(zoom) + 0.5f); + wwImgSpace = int(float(ww) * (float(zoom)/10.f) + 0.5f); + whImgSpace = int(float(wh) * (float(zoom)/10.f) + 0.5f); //scaledFullW = fullW / zoom; //scaledFullH = fullH / zoom; - scaledCAX = cax / zoom; - scaledCAY = cay / zoom; + scaledCAX = int(float(cax) / (float(zoom)/10.f)); + scaledCAY = int(float(cay) / (float(zoom)/10.f)); } imgX = ww / 2 - scaledCAX; diff --git a/rtgui/crophandler.h b/rtgui/crophandler.h index 3bf7e58da..1e7a9202b 100644 --- a/rtgui/crophandler.h +++ b/rtgui/crophandler.h @@ -36,56 +36,15 @@ public: virtual void setDisplayPosition (int x, int y) {} }; -class CropHandler; -struct CropHandlerIdleHelper { - CropHandler* cropHandler; - bool destroyed; - int pending; -}; - /** * This class handle the displayed part of the image, ask for the initial data and process it so it can display it. * Its position on the preview is handled not set by this class but by the CropHandlerListener (i.e. CropWindow) with which it works closely. */ -class CropHandler : public rtengine::DetailedCropListener, public rtengine::SizeListener +class CropHandler final : + public rtengine::DetailedCropListener, + public rtengine::SizeListener { - - friend int createpixbufs (void* data); - -protected: - int zoom; // scale factor (e.g. 5 if 1:5 scale) ; if 1:1 scale and bigger, factor is multiplied by 1000 (i.e. 1000 for 1:1 scale, 2000 for 2:1, etc...) - int ww, wh; // size of the crop's canvas on the screen ; might be bigger than the displayed image, but not smaller - int imx, imy, imw, imh; // this is a copy of the cropwindow's parameters - int cax, cay; // clamped crop anchor's coordinate, i.e. point of the image that coincide to the center of the display area, expressed in image coordinates; cannot be outside the image's bounds; but if cax==cay==-1, designate the center of the image - int cx, cy, cw, ch; // position and size of the requested crop ; position expressed in image coordinates, so cx and cy might be negative and cw and ch higher than the image's 1:1 size - int cropX, cropY, cropW, cropH; // cropPixbuf's displayed area (position and size), i.e. coordinates in 1:1 scale, i.e. cx, cy, cw & ch trimmed to the image's bounds - bool enabled; - unsigned char* cropimg; - unsigned char* cropimgtrue; - int cropimg_width, cropimg_height, cix, ciy, ciw, cih, cis; - bool initial; - bool isLowUpdatePriority; - - rtengine::StagedImageProcessor* ipc; - rtengine::DetailedCrop* crop; - - CropDisplayHandler* displayHandler; - CropHandlerIdleHelper* chi; - - void compDim (); - public: - - void update (); - - - rtengine::procparams::CropParams cropParams; - rtengine::procparams::ColorManagementParams colorParams; - Glib::RefPtr cropPixbuf; - Glib::RefPtr cropPixbuftrue; - - MyMutex cimg; - CropHandler (); ~CropHandler (); @@ -127,6 +86,45 @@ public: bool getWindow (int& cwx, int& cwy, int& cww, int& cwh, int& cskip); // SizeListener interface void sizeChanged (int w, int h, int ow, int oh); + + void update (); + + + rtengine::procparams::CropParams cropParams; + rtengine::procparams::ColorManagementParams colorParams; + Glib::RefPtr cropPixbuf; + Glib::RefPtr cropPixbuftrue; + + MyMutex cimg; + +private: + struct IdleHelper { + CropHandler* cropHandler; + bool destroyed; + int pending; + }; + + void compDim (); + + int zoom; // scale factor (e.g. 5 if 1:5 scale) ; if 1:1 scale and bigger, factor is multiplied by 1000 (i.e. 1000 for 1:1 scale, 2000 for 2:1, etc...) + int ww, wh; // size of the crop's canvas on the screen ; might be bigger than the displayed image, but not smaller + int cax, cay; // clamped crop anchor's coordinate, i.e. point of the image that coincide to the center of the display area, expressed in image coordinates; cannot be outside the image's bounds; but if cax==cay==-1, designate the center of the image + int cx, cy, cw, ch; // position and size of the requested crop ; position expressed in image coordinates, so cx and cy might be negative and cw and ch higher than the image's 1:1 size + int cropX, cropY, cropW, cropH; // cropPixbuf's displayed area (position and size), i.e. coordinates in 1:1 scale, i.e. cx, cy, cw & ch trimmed to the image's bounds + bool enabled; + unsigned char* cropimg; + unsigned char* cropimgtrue; + int cropimg_width, cropimg_height, cix, ciy, ciw, cih, cis; + bool initial; + bool isLowUpdatePriority; + + rtengine::StagedImageProcessor* ipc; + rtengine::DetailedCrop* crop; + + CropDisplayHandler* displayHandler; + IdleHelper* idle_helper; + + IdleRegister idle_register; }; #endif diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 0fc3359bc..8af0541fe 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -34,46 +34,17 @@ using namespace rtengine; -struct ZoomStep { - Glib::ustring label; - double zoom; - int czoom; -}; - -ZoomStep zoomSteps[] = { - {" 1%", 0.01, 100}, - {" 2%", 0.02, 50}, - {" 5%", 0.05, 20}, - {"6.7%", 1.0 / 15.0, 15}, - {" 8%", 1.0 / 12.0, 12}, - {" 10%", 0.1, 10}, - {"12.5%", 0.125, 8}, - {" 14%", 1.0 / 7.0, 7}, - {"16.6%", 1.0 / 6.0, 6}, - {" 20%", 0.2, 5}, - {" 25%", 0.25, 4}, - {" 33%", 1.0 / 3.0, 3}, - {" 50%", 0.5, 2}, - {"100%", 1.0, 1000}, - {"200%", 2.0, 2000}, - {"300%", 3.0, 3000}, - {"400%", 4.0, 4000}, - {"500%", 5.0, 5000}, - {"600%", 6.0, 6000}, - {"700%", 7.0, 7000}, - {"800%", 8.0, 8000} -}; -#define MAXZOOMSTEPS 20 -#define ZOOM11INDEX 13 - CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDetailWindow) : ObjectMOBuffer(parent), state(SNormal), press_x(0), press_y(0), action_x(0), action_y(0), pickedObject(-1), pickModifierKey(0), rot_deg(0), onResizeArea(false), deleted(false), - fitZoomEnabled(true), fitZoom(false), isLowUpdatePriority(isLowUpdatePriority_), hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")), + fitZoomEnabled(true), fitZoom(false), cursor_type(CSArrow), /*isLowUpdatePriority(isLowUpdatePriority_),*/ hoveredPicker(nullptr), cropLabel(Glib::ustring("100%")), backColor(options.bgcolor), decorated(true), isFlawnOver(false), titleHeight(30), sideBorderWidth(3), lowerBorderWidth(3), upperBorderWidth(1), sepWidth(2), xpos(30), ypos(30), width(0), height(0), imgAreaX(0), imgAreaY(0), imgAreaW(0), imgAreaH(0), imgX(-1), imgY(-1), imgW(1), imgH(1), iarea(parent), cropZoom(0), zoomVersion(0), exposeVersion(0), cropgl(nullptr), - pmlistener(nullptr), pmhlistener(nullptr), observedCropWin(nullptr) + pmlistener(nullptr), pmhlistener(nullptr), observedCropWin(nullptr), + crop_custom_ratio(0.f) { + initZoomSteps(); + Glib::RefPtr context = parent->get_pango_context () ; Pango::FontDescription fontd = context->get_font_description (); fontd.set_weight (Pango::WEIGHT_BOLD); @@ -97,7 +68,7 @@ CropWindow::CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDet buttonSet.add (bZoom100); buttonSet.add (bClose); - buttonSet.setColors (Gdk::Color("black"), Gdk::Color("white")); + buttonSet.setColors (Gdk::RGBA("black"), Gdk::RGBA("white")); buttonSet.setButtonListener (this); int bsw, bsh; @@ -120,6 +91,29 @@ CropWindow::~CropWindow () } } + +void CropWindow::initZoomSteps() +{ + zoomSteps.push_back(ZoomStep(" 1%", 0.01, 999, true)); + zoomSteps.push_back(ZoomStep(" 2%", 0.02, 500, true)); + zoomSteps.push_back(ZoomStep(" 5%", 0.05, 200, true)); + zoomSteps.push_back(ZoomStep(" 6%", 1.0/15.0, 150, true)); + zoomSteps.push_back(ZoomStep(" 8%", 1.0/12.0, 120, true)); + char lbl[64]; + for (int s = 100; s >= 11; --s) { + float z = 10./float(s); + sprintf(lbl, "% 2d%%", int(z * 100)); + bool is_major = (s == s/10 * 10); + zoomSteps.push_back(ZoomStep(lbl, z, s, is_major)); + } + zoom11index = zoomSteps.size(); + for (int s = 1; s <= 8; ++s) { + sprintf(lbl, "%d00%%", s); + zoomSteps.push_back(ZoomStep(lbl, s, s * 1000, true)); + } + zoomSteps.push_back(ZoomStep("1600%", 16, 16000, true)); +} + void CropWindow::enable() { cropHandler.setEnabled (true); @@ -316,7 +310,7 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) state = SNormal; zoomVersion = exposeVersion; screenCoordToImage (x, y, action_x, action_y); - changeZoom (ZOOM11INDEX, true, action_x, action_y); + changeZoom (zoom11index, true, action_x, action_y); fitZoom = false; } else { zoomFit (); @@ -344,6 +338,11 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) press_y = height; } else { if (onArea (CropImage, x, y)) { // events inside of the image domain + crop_custom_ratio = 0.f; + if ((bstate & GDK_SHIFT_MASK) && cropHandler.cropParams.w > 0 && cropHandler.cropParams.h > 0) { + crop_custom_ratio = float(cropHandler.cropParams.w) / float(cropHandler.cropParams.h); + } + if (iarea->getToolMode () == TMColorPicker) { if (hoveredPicker) { if ((bstate & GDK_CONTROL_MASK) && !(bstate & GDK_SHIFT_MASK)) { @@ -445,8 +444,8 @@ void CropWindow::buttonPress (int button, int type, int bstate, int x, int y) cropgl->cropInit (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h); } else if (iarea->getToolMode () == TMHand) { if (editSubscriber) { - needRedraw = editSubscriber->button1Pressed(bstate); if ((cropgl && cropgl->inImageArea(iarea->posImage.x, iarea->posImage.y) && (editSubscriber->getEditingType() == ET_PIPETTE && (bstate & GDK_CONTROL_MASK))) || editSubscriber->getEditingType() == ET_OBJECTS) { + needRedraw = editSubscriber->button1Pressed(bstate); if (editSubscriber->isDragging()) { state = SEditDrag1; } else if (editSubscriber->isPicking()) { @@ -814,21 +813,21 @@ void CropWindow::pointerMoved (int bstate, int x, int y) int oy = cropHandler.cropParams.y; cropHandler.cropParams.y = action_y + (y - press_y) / zoomSteps[cropZoom].zoom; cropHandler.cropParams.h += oy - cropHandler.cropParams.y; - cropgl->cropHeight1Resized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h); + cropgl->cropHeight1Resized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio); iarea->redraw (); } else if (state == SResizeH2 && cropgl) { cropHandler.cropParams.h = action_y + (y - press_y) / zoomSteps[cropZoom].zoom; - cropgl->cropHeight2Resized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h); + cropgl->cropHeight2Resized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio); iarea->redraw (); } else if (state == SResizeW1 && cropgl) { int ox = cropHandler.cropParams.x; cropHandler.cropParams.x = action_x + (x - press_x) / zoomSteps[cropZoom].zoom; cropHandler.cropParams.w += ox - cropHandler.cropParams.x; - cropgl->cropWidth1Resized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h); + cropgl->cropWidth1Resized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio); iarea->redraw (); } else if (state == SResizeW2 && cropgl) { cropHandler.cropParams.w = action_x + (x - press_x) / zoomSteps[cropZoom].zoom; - cropgl->cropWidth2Resized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h); + cropgl->cropWidth2Resized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio); iarea->redraw (); } else if (state == SResizeTL && cropgl) { int ox = cropHandler.cropParams.x; @@ -837,26 +836,26 @@ void CropWindow::pointerMoved (int bstate, int x, int y) int oy = cropHandler.cropParams.y; cropHandler.cropParams.y = action_y + (y - press_y) / zoomSteps[cropZoom].zoom; cropHandler.cropParams.h += oy - cropHandler.cropParams.y; - cropgl->cropTopLeftResized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h); + cropgl->cropTopLeftResized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio); iarea->redraw (); } else if (state == SResizeTR && cropgl) { cropHandler.cropParams.w = action_x + (x - press_x) / zoomSteps[cropZoom].zoom; int oy = cropHandler.cropParams.y; cropHandler.cropParams.y = action_y + (y - press_y) / zoomSteps[cropZoom].zoom; cropHandler.cropParams.h += oy - cropHandler.cropParams.y; - cropgl->cropTopRightResized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h); + cropgl->cropTopRightResized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio); iarea->redraw (); } else if (state == SResizeBL && cropgl) { int ox = cropHandler.cropParams.x; cropHandler.cropParams.x = action_x + (x - press_x) / zoomSteps[cropZoom].zoom; cropHandler.cropParams.w += ox - cropHandler.cropParams.x; cropHandler.cropParams.h = action_y + (y - press_y) / zoomSteps[cropZoom].zoom; - cropgl->cropBottomLeftResized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h); + cropgl->cropBottomLeftResized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio); iarea->redraw (); } else if (state == SResizeBR && cropgl) { cropHandler.cropParams.w = action_x + (x - press_x) / zoomSteps[cropZoom].zoom; cropHandler.cropParams.h = action_y + (y - press_y) / zoomSteps[cropZoom].zoom; - cropgl->cropBottomRightResized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h); + cropgl->cropBottomRightResized (cropHandler.cropParams.x, cropHandler.cropParams.y, cropHandler.cropParams.w, cropHandler.cropParams.h, crop_custom_ratio); iarea->redraw (); } else if (state == SCropMove && cropgl) { cropHandler.cropParams.x = action_x + (x - press_x) / zoomSteps[cropZoom].zoom; @@ -896,7 +895,7 @@ void CropWindow::pointerMoved (int bstate, int x, int y) } else if (state == SDragPicker) { Coord imgPos; action_x = x - press_x; - action_x = y - press_y; + action_y = y - press_y; screenCoordToImage (x, y, imgPos.x, imgPos.y); if (imgPos.x < 0) { imgPos.x = 0; @@ -1027,6 +1026,12 @@ void CropWindow::pointerMoved (int bstate, int x, int y) cropHandler.cimg.lock (); int vx = x - xpos - imgX; int vy = y - ypos - imgY; + + if(decorated) { + vx -= sideBorderWidth; + vy -= (titleHeight + upperBorderWidth + sepWidth); + } + // guint8* pix = cropHandler.cropPixbuf->get_pixels() + vy*cropHandler.cropPixbuf->get_rowstride() + vx*3; // if (vx < cropHandler.cropPixbuf->get_width() && vy < cropHandler.cropPixbuf->get_height()) // pmlistener->pointerMoved (true, mx, my, pix[0], pix[1], pix[2]); @@ -1034,9 +1039,21 @@ void CropWindow::pointerMoved (int bstate, int x, int y) int imheight = cropHandler.cropPixbuf->get_height(); guint8* pix = cropHandler.cropPixbuftrue->get_pixels() + vy * cropHandler.cropPixbuf->get_rowstride() + vx * 3; + int rval = pix[0]; + int gval = pix[1]; + int bval = pix[2]; if (vx < imwidth && vy < imheight) { + rtengine::StagedImageProcessor* ipc = iarea->getImProcCoordinator(); + if(ipc) { + procparams::ProcParams params; + ipc->getParams(¶ms); + if(params.raw.bayersensor.method == RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::none] || params.raw.xtranssensor.method == RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::none]) { + ImageSource *isrc = static_cast(ipc->getInitialImage()); + isrc->getRawValues(mx, my, params.coarse.rotate, rval, gval, bval); + } + } // pmlistener->pointerMoved (true, cropHandler.colorParams.working, mx, my, pix[0], pix[1], pix[2]); - pmlistener->pointerMoved (true, cropHandler.colorParams.output, cropHandler.colorParams.working, mx, my, pix[0], pix[1], pix[2]); + pmlistener->pointerMoved (true, cropHandler.colorParams.output, cropHandler.colorParams.working, mx, my, rval, gval, bval); if (pmhlistener) // pmhlistener->pointerMoved (true, cropHandler.colorParams.working, mx, my, pix[0], pix[1], pix[2]); @@ -1186,27 +1203,29 @@ void CropWindow::updateCursor (int x, int y) EditSubscriber *editSubscriber = iarea->getCurrSubscriber(); ToolMode tm = iarea->getToolMode (); + CursorShape newType = cursor_type; + if (state == SNormal) { if (onArea (CropWinButtons, x, y)) { - cursorManager.setCursor (iarea->get_window(), CSArrow); + newType = CSArrow; } else if (onArea (CropToolBar, x, y)) { - cursorManager.setCursor (iarea->get_window(), CSMove); + newType = CSMove; } else if (onArea (CropResize, x, y)) { - cursorManager.setCursor (iarea->get_window(), CSResizeDiagonal); + newType = CSResizeDiagonal; } else if (tm == TMColorPicker && hoveredPicker) { - cursorManager.setCursor (iarea->get_window(), CSMove); + newType = CSMove; } else if (tm == TMHand && (onArea (CropTopLeft, x, y))) { - cursorManager.setCursor (iarea->get_window(), CSResizeTopLeft); + newType = CSResizeTopLeft; } else if (tm == TMHand && (onArea (CropTopRight, x, y))) { - cursorManager.setCursor (iarea->get_window(), CSResizeTopRight); + newType = CSResizeTopRight; } else if (tm == TMHand && (onArea (CropBottomLeft, x, y))) { - cursorManager.setCursor (iarea->get_window(), CSResizeBottomLeft); + newType = CSResizeBottomLeft; } else if (tm == TMHand && (onArea (CropBottomRight, x, y))) { - cursorManager.setCursor (iarea->get_window(), CSResizeBottomRight); + newType = CSResizeBottomRight; } else if (tm == TMHand && (onArea (CropTop, x, y) || onArea (CropBottom, x, y))) { - cursorManager.setCursor (iarea->get_window(), CSResizeHeight); + newType = CSResizeHeight; } else if (tm == TMHand && (onArea (CropLeft, x, y) || onArea (CropRight, x, y))) { - cursorManager.setCursor (iarea->get_window(), CSResizeWidth); + newType = CSResizeWidth; } else if (onArea (CropImage, x, y)) { int objectID = -1; @@ -1217,21 +1236,21 @@ void CropWindow::updateCursor (int x, int y) } if (objectID > -1) { - cursorManager.setCursor (iarea->get_window(), editSubscriber->getCursor(objectID)); + newType = editSubscriber->getCursor(objectID); } else if (tm == TMHand) { if (onArea (CropObserved, x, y)) { - cursorManager.setCursor (iarea->get_window(), CSMove); + newType = CSMove; } else { - cursorManager.setCursor (iarea->get_window(), CSOpenHand); + newType = CSOpenHand; } } else if (tm == TMSpotWB) { - cursorManager.setCursor (iarea->get_window(), CSSpotWB); + newType = CSSpotWB; } else if (tm == TMCropSelect) { - cursorManager.setCursor (iarea->get_window(), CSCropSelect); + newType = CSCropSelect; } else if (tm == TMStraighten) { - cursorManager.setCursor (iarea->get_window(), CSStraighten); + newType = CSStraighten; } else if (tm == TMColorPicker) { - cursorManager.setCursor (iarea->get_window(), CSAddColPicker); + newType = CSAddColPicker; } } else { int objectID = -1; @@ -1243,36 +1262,42 @@ void CropWindow::updateCursor (int x, int y) } if (objectID > -1) { - cursorManager.setCursor (iarea->get_window(), editSubscriber->getCursor(objectID)); + newType = editSubscriber->getCursor(objectID); } else { - cursorManager.setCursor (iarea->get_window(), CSArrow); + newType = CSArrow; } } } else if (state == SCropSelecting) { - cursorManager.setCursor (iarea->get_window(), CSCropSelect); + newType = CSCropSelect; } else if (state == SRotateSelecting) { - cursorManager.setCursor (iarea->get_window(), CSStraighten); + newType = CSStraighten; } else if (state == SCropMove || state == SCropWinMove || state == SObservedMove) { - cursorManager.setCursor (iarea->get_window(), CSMove); + newType = CSMove; } else if (state == SHandMove || state == SCropImgMove) { - cursorManager.setCursor (iarea->get_window(), CSClosedHand); + newType = CSClosedHand; } else if (state == SResizeW1 || state == SResizeW2) { - cursorManager.setCursor (iarea->get_window(), CSResizeWidth); + newType = CSResizeWidth; } else if (state == SResizeH1 || state == SResizeH2) { - cursorManager.setCursor (iarea->get_window(), CSResizeHeight); + newType = CSResizeHeight; } else if (state == SResizeTL) { - cursorManager.setCursor (iarea->get_window(), CSResizeTopLeft); + newType = CSResizeTopLeft; } else if (state == SResizeTR) { - cursorManager.setCursor (iarea->get_window(), CSResizeTopRight); + newType = CSResizeTopRight; } else if (state == SResizeBL) { - cursorManager.setCursor (iarea->get_window(), CSResizeBottomLeft); + newType = CSResizeBottomLeft; } else if (state == SResizeBR) { - cursorManager.setCursor (iarea->get_window(), CSResizeBottomRight); + newType = CSResizeBottomRight; } else if (state == SCropWinResize) { - cursorManager.setCursor (iarea->get_window(), CSResizeDiagonal); + newType = CSResizeDiagonal; } else if (state == SDragPicker) { - cursorManager.setCursor (iarea->get_window(), CSMove2D); + newType = CSMove2D; } + + if (newType != cursor_type) { + cursor_type = newType; + CursorManager::setWidgetCursor(iarea->get_window(), cursor_type); + } + } void CropWindow::expose (Cairo::RefPtr cr) @@ -1289,23 +1314,24 @@ void CropWindow::expose (Cairo::RefPtr cr) // draw the background backColor = iarea->previewModePanel->GetbackColor(); + Glib::RefPtr style = iarea->get_style_context(); options.bgcolor = backColor; if (backColor == 0) { - Gdk::Color cback = iarea->get_style()->get_bg(Gtk::STATE_NORMAL); - cr->set_source_rgb (cback.get_red_p(), cback.get_green_p(), cback.get_blue_p()); - } else if (backColor == 1) { - cr->set_source_rgb (0, 0, 0); - } else if (backColor == 2) { - cr->set_source_rgb (1, 1, 1); + style->render_background(cr, x + imgAreaX, y + imgAreaY, imgAreaW, imgAreaH); + } else { + if (backColor == 1) { + cr->set_source_rgb (0, 0, 0); + } else if (backColor == 2) { + cr->set_source_rgb (1, 1, 1); + } + + cr->set_line_width (0.); + cr->rectangle (x + imgAreaX, y + imgAreaY, imgAreaW, imgAreaH); + cr->stroke_preserve (); + cr->fill (); } - cr->set_line_width (0.); - cr->rectangle (x + imgAreaX, y + imgAreaY, imgAreaW, imgAreaH); - cr->stroke_preserve (); - cr->fill (); - - // draw image if (state == SCropImgMove || state == SCropWinResize) { // draw a rough image @@ -1315,7 +1341,11 @@ void CropWindow::expose (Cairo::RefPtr cr) Glib::RefPtr rough = iarea->getPreviewHandler()->getRoughImage (cropX, cropY, imgAreaW, imgAreaH, zoomSteps[cropZoom].zoom); if (rough) { - iarea->get_window()->draw_pixbuf (iarea->get_style()->get_base_gc(Gtk::STATE_NORMAL), rough, 0, 0, x + imgAreaX + imgX, y + imgAreaY + imgY, rtengine::min (rough->get_width (), imgAreaW-imgX), rtengine::min (rough->get_height (), imgAreaH-imgY), Gdk::RGB_DITHER_NORMAL, 0, 0); + int posX = x + imgAreaX + imgX; + int posY = y + imgAreaY + imgY; + Gdk::Cairo::set_source_pixbuf(cr, rough, posX, posY); + cr->rectangle(posX, posY, rtengine::min (rough->get_width (), imgAreaW-imgX), rtengine::min (rough->get_height (), imgAreaH-imgY)); + cr->fill(); // if (cropHandler.cropParams.enabled) // drawCrop (cr, x+imgX, y+imgY, imgW, imgH, cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams); } @@ -1589,8 +1619,8 @@ void CropWindow::expose (Cairo::RefPtr cr) const int hlThreshold = options.highlightThreshold; const int shThreshold = options.shadowThreshold; - const float ShawdowFac = 64 / (options.shadowThreshold + 1); - const float HighlightFac = 64 / (256 - options.highlightThreshold); + const float ShawdowFac = 64.f / (options.shadowThreshold + 1); + const float HighlightFac = 64.f / (256 - options.highlightThreshold); const bool showclippedAny = (!showR && !showG && !showB && !showL); // will show clipping if any of RGB chanels is clipped #ifdef _OPENMP @@ -1609,7 +1639,7 @@ void CropWindow::expose (Cairo::RefPtr cr) int delta = 0; // for efficiency, pre-calculate currWS_L as it may be needed in both // if (showch) and if (showcs) branches - int currWS_L; + int currWS_L = 0; if (showL && (showch || showcs)) { currWS_L = (int)(0.299f * currWS[0] + 0.587f * currWS[1] + 0.114f * currWS[2]); @@ -1720,9 +1750,17 @@ void CropWindow::expose (Cairo::RefPtr cr) } } - iarea->get_window()->draw_pixbuf (iarea->get_style()->get_base_gc(Gtk::STATE_NORMAL), tmp, 0, 0, x + imgAreaX + imgX, y + imgAreaY + imgY, rtengine::min (tmp->get_width (), imgAreaW-imgX), rtengine::min (tmp->get_height (), imgAreaH-imgY), Gdk::RGB_DITHER_NORMAL, 0, 0); + int posX = x + imgAreaX + imgX; + int posY = y + imgAreaY + imgY; + Gdk::Cairo::set_source_pixbuf(cr, tmp, posX, posY); + cr->rectangle(posX, posY, rtengine::min (tmp->get_width (), imgAreaW-imgX), rtengine::min (tmp->get_height (), imgAreaH-imgY)); + cr->fill(); } else { - iarea->get_window()->draw_pixbuf (iarea->get_style()->get_base_gc(Gtk::STATE_NORMAL), cropHandler.cropPixbuf, 0, 0, x + imgAreaX + imgX, y + imgAreaY + imgY, rtengine::min (cropHandler.cropPixbuf->get_width (), imgAreaW-imgX), rtengine::min (cropHandler.cropPixbuf->get_height (), imgAreaH-imgY), Gdk::RGB_DITHER_NORMAL, 0, 0); + int posX = x + imgAreaX + imgX; + int posY = y + imgAreaY + imgY; + Gdk::Cairo::set_source_pixbuf(cr, cropHandler.cropPixbuf, posX, posY); + cr->rectangle(posX, posY, rtengine::min (cropHandler.cropPixbuf->get_width (), imgAreaW-imgX), rtengine::min (cropHandler.cropPixbuf->get_height (), imgAreaH-imgY)); + cr->fill(); } if (cropHandler.cropParams.enabled) { @@ -1802,7 +1840,11 @@ void CropWindow::expose (Cairo::RefPtr cr) Glib::RefPtr rough = iarea->getPreviewHandler()->getRoughImage (cropX, cropY, imgAreaW, imgAreaH, zoomSteps[cropZoom].zoom); if (rough) { - iarea->get_window()->draw_pixbuf (iarea->get_style()->get_base_gc(Gtk::STATE_NORMAL), rough, 0, 0, x + imgAreaX + imgX, y + imgAreaY + imgY, rtengine::min (rough->get_width (), imgAreaW-imgX), rtengine::min (rough->get_height (), imgAreaH-imgY), Gdk::RGB_DITHER_NORMAL, 0, 0); + int posX = x + imgAreaX + imgX; + int posY = y + imgAreaY + imgY; + Gdk::Cairo::set_source_pixbuf(cr, rough, posX, posY); + cr->rectangle(posX, posY, rtengine::min (rough->get_width (), imgAreaW-imgX), rtengine::min (rough->get_height (), imgAreaH-imgY)); + cr->fill(); if (cropHandler.cropParams.enabled) { drawCrop (cr, x + imgAreaX + imgX, y + imgAreaY + imgY, rough->get_width(), rough->get_height(), cropX, cropY, zoomSteps[cropZoom].zoom, cropHandler.cropParams, (this == iarea->mainCropWindow), true, cropHandler.isFullDisplay ()); @@ -1829,6 +1871,8 @@ void CropWindow::expose (Cairo::RefPtr cr) } } + style->render_frame (cr, x + imgAreaX, y + imgAreaY, imgAreaW, imgAreaH); + if ((state == SNormal || state == SDragPicker) && isPreviewImg && iarea->showColorPickers()) { for (auto colorPicker : colorPickers) { colorPicker->draw(cr); @@ -1900,7 +1944,11 @@ void CropWindow::zoomIn (bool toCursor, int cursorX, int cursorY) } } - changeZoom (cropZoom + 1, true, x, y); + int z = cropZoom + 1; + while (z < int(zoomSteps.size()) && !zoomSteps[z].is_major) { + ++z; + } + changeZoom (z, true, x, y); fitZoom = false; } @@ -1913,10 +1961,16 @@ void CropWindow::zoomOut (bool toCursor, int cursorX, int cursorY) if (toCursor) { x = cursorX; y = cursorY; + } else { + screenCoordToImage(xpos + imgX + imgW / 2, ypos + imgY + imgH / 2, x, y); } zoomVersion = exposeVersion; - changeZoom (cropZoom - 1, true, x, y); + int z = cropZoom - 1; + while (z >= 0 && !zoomSteps[z].is_major) { + --z; + } + changeZoom (z, true, x, y); fitZoom = false; } @@ -1938,9 +1992,11 @@ void CropWindow::zoom11 () } zoomVersion = exposeVersion; + } else { + screenCoordToImage(xpos + imgX + imgW / 2, ypos + imgY + imgH / 2, x, y); } - changeZoom (ZOOM11INDEX, true, x, y); + changeZoom (zoom11index, true, x, y); fitZoom = false; } @@ -1957,17 +2013,17 @@ bool CropWindow::isMinZoom () bool CropWindow::isMaxZoom () { - return cropZoom >= MAXZOOMSTEPS; + return cropZoom >= int(zoomSteps.size())-1; } void CropWindow::setZoom (double zoom) { - int cz = MAXZOOMSTEPS; + int cz = int(zoomSteps.size())-1; if (zoom < zoomSteps[0].zoom) { cz = 0; } else - for (int i = 0; i < MAXZOOMSTEPS; i++) + for (int i = 0; i < int(zoomSteps.size())-1; i++) if (zoomSteps[i].zoom <= zoom && zoomSteps[i + 1].zoom > zoom) { cz = i; break; @@ -1979,12 +2035,12 @@ void CropWindow::setZoom (double zoom) double CropWindow::getZoomFitVal () { double z = cropHandler.getFitZoom (); - int cz = MAXZOOMSTEPS; + int cz = int(zoomSteps.size())-1; if (z < zoomSteps[0].zoom) { cz = 0; } else - for (int i = 0; i < MAXZOOMSTEPS; i++) + for (int i = 0; i < int(zoomSteps.size())-1; i++) if (zoomSteps[i].zoom <= z && zoomSteps[i + 1].zoom > z) { cz = i; break; @@ -1998,12 +2054,12 @@ void CropWindow::zoomFit () { double z = cropHandler.getFitZoom (); - int cz = MAXZOOMSTEPS; + int cz = int(zoomSteps.size())-1; if (z < zoomSteps[0].zoom) { cz = 0; } else - for (int i = 0; i < MAXZOOMSTEPS; i++) + for (int i = 0; i < int(zoomSteps.size())-1; i++) if (zoomSteps[i].zoom <= z && zoomSteps[i + 1].zoom > z) { cz = i; break; @@ -2018,12 +2074,12 @@ void CropWindow::zoomFitCrop () { if(cropHandler.cropParams.enabled) { double z = cropHandler.getFitCropZoom (); - int cz = MAXZOOMSTEPS; + int cz = int(zoomSteps.size())-1; if (z < zoomSteps[0].zoom) { cz = 0; } else - for (int i = 0; i < MAXZOOMSTEPS; i++) + for (int i = 0; i < int(zoomSteps.size())-1; i++) if (zoomSteps[i].zoom <= z && zoomSteps[i + 1].zoom > z) { cz = i; break; @@ -2036,6 +2092,8 @@ void CropWindow::zoomFitCrop () setCropAnchorPosition(centerX, centerY); changeZoom (cz, true, centerX, centerY); fitZoom = false; + } else { + zoomFit(); } } @@ -2098,8 +2156,8 @@ void CropWindow::changeZoom (int zoom, bool notify, int centerx, int centery) if (zoom < 0) { zoom = 0; - } else if (zoom > MAXZOOMSTEPS) { - zoom = MAXZOOMSTEPS; + } else if (zoom > int(zoomSteps.size())-1) { + zoom = int(zoomSteps.size())-1; } cropZoom = zoom; @@ -2162,6 +2220,10 @@ void CropWindow::screenCoordToCropBuffer (int phyx, int phyy, int& cropx, int& c if (zoomSteps[cropZoom].zoom > 1.) { cropx = int(double(cropx) / zoomSteps[cropZoom].zoom); cropy = int(double(cropy) / zoomSteps[cropZoom].zoom); + } else { + float czoom = float((zoomSteps[cropZoom].czoom/10) * 10) / float(zoomSteps[cropZoom].czoom); + cropx = cropx / czoom; + cropy = cropy / czoom; } cropx += crop->getLeftBorder(); @@ -2293,7 +2355,7 @@ void CropWindow::drawStraightenGuide (Cairo::RefPtr cr) if (action_x != press_x || action_y != press_y) { double arg = (press_x - action_x) / sqrt(double((press_x - action_x) * (press_x - action_x) + (press_y - action_y) * (press_y - action_y))); double sol1, sol2; - double pi = M_PI; + double pi = rtengine::RT_PI; if (press_y > action_y) { sol1 = acos(arg) * 180 / pi; diff --git a/rtgui/cropwindow.h b/rtgui/cropwindow.h index eec1b812a..c1d7c59cc 100644 --- a/rtgui/cropwindow.h +++ b/rtgui/cropwindow.h @@ -28,6 +28,7 @@ #include #include "cropguilistener.h" #include "pointermotionlistener.h" +#include "cursormanager.h" #include "edit.h" class CropWindow; @@ -57,7 +58,8 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed bool deleted; bool fitZoomEnabled; bool fitZoom; - bool isLowUpdatePriority; + //bool isLowUpdatePriority; + CursorShape cursor_type; // color pickers std::vector colorPickers; @@ -95,6 +97,8 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed CropWindow* observedCropWin; // Pointer to the currently active detail CropWindow + float crop_custom_ratio; + bool onArea (CursorArea a, int x, int y); void updateCursor (int x, int y); void drawDecoration (Cairo::RefPtr cr); @@ -112,6 +116,21 @@ class CropWindow : public LWButtonListener, public CropDisplayHandler, public Ed // Used by the mainCropWindow only void getObservedFrameArea (int& x, int& y, int& w, int& h, int rw = 0, int rh = 0); + struct ZoomStep { + Glib::ustring label; + double zoom; + int czoom; + bool is_major; + + explicit ZoomStep(const Glib::ustring &l="", double z=0.0, + int cz=0, bool m=false): + label(l), zoom(z), czoom(cz), is_major(m) {} + }; + std::vector zoomSteps; + size_t zoom11index; + + void initZoomSteps(); + public: CropHandler cropHandler; CropWindow (ImageArea* parent, bool isLowUpdatePriority_, bool isDetailWindow); diff --git a/rtgui/cursormanager.cc b/rtgui/cursormanager.cc index 78e2513a5..29d0990ff 100644 --- a/rtgui/cursormanager.cc +++ b/rtgui/cursormanager.cc @@ -21,25 +21,35 @@ #include "options.h" #include "rtimage.h" -CursorManager cursorManager; +CursorManager mainWindowCursorManager; +CursorManager editWindowCursorManager; -void CursorManager::init (Glib::RefPtr mainWin) +void CursorManager::init (Glib::RefPtr mainWindow) { - cResizeWidth = new Gdk::Cursor (Gdk::SB_H_DOUBLE_ARROW); - cResizeHeight = new Gdk::Cursor (Gdk::SB_V_DOUBLE_ARROW); - cResizeDiag = new Gdk::Cursor (Gdk::BOTTOM_RIGHT_CORNER); - cResizeTopLeft = new Gdk::Cursor (Gdk::TOP_LEFT_CORNER); - cResizeTopRight = new Gdk::Cursor (Gdk::TOP_RIGHT_CORNER); - cResizeBottomLeft = new Gdk::Cursor (Gdk::BOTTOM_LEFT_CORNER); - cResizeBottomRight = new Gdk::Cursor (Gdk::BOTTOM_RIGHT_CORNER); - cCropMove = new Gdk::Cursor (Gdk::FLEUR); - cCropMoving = new Gdk::Cursor (Gdk::HAND2); - cCropSelection = new Gdk::Cursor (Gdk::CROSSHAIR); - cLeftTanMove = new Gdk::Cursor (Gdk::SB_LEFT_ARROW); - cRightTanMove = new Gdk::Cursor (Gdk::SB_RIGHT_ARROW); - cAdd = new Gdk::Cursor (Gdk::PLUS); - cWait = new Gdk::Cursor (Gdk::CLOCK); + display = Gdk::Display::get_default (); +#ifndef NDEBUG + + if (!display) { + printf("Error: no default display!\n"); + } + +#endif + + cResizeWidth = Gdk::Cursor::create (display, Gdk::SB_H_DOUBLE_ARROW); + cResizeHeight = Gdk::Cursor::create (display, Gdk::SB_V_DOUBLE_ARROW); + cResizeDiag = Gdk::Cursor::create (display, Gdk::BOTTOM_RIGHT_CORNER); + cResizeTopLeft = Gdk::Cursor::create (display, Gdk::TOP_LEFT_CORNER); + cResizeTopRight = Gdk::Cursor::create (display, Gdk::TOP_RIGHT_CORNER); + cResizeBottomLeft = Gdk::Cursor::create (display, Gdk::BOTTOM_LEFT_CORNER); + cResizeBottomRight = Gdk::Cursor::create (display, Gdk::BOTTOM_RIGHT_CORNER); + cCropMove = Gdk::Cursor::create (display, Gdk::FLEUR); + cCropMoving = Gdk::Cursor::create (display, Gdk::HAND2); + cCropSelection = Gdk::Cursor::create (display, Gdk::CROSSHAIR); + cLeftTanMove = Gdk::Cursor::create (display, Gdk::SB_LEFT_ARROW); + cRightTanMove = Gdk::Cursor::create (display, Gdk::SB_RIGHT_ARROW); + cAdd = Gdk::Cursor::create (display, Gdk::PLUS); + cWait = Gdk::Cursor::create (display, Gdk::CLOCK); Glib::RefPtr hand = RTImage::createFromFile ("cross.png"); Glib::RefPtr close_hand = RTImage::createFromFile ("closedhand.png"); @@ -51,17 +61,17 @@ void CursorManager::init (Glib::RefPtr mainWin) Glib::RefPtr move1DV = RTImage::createFromFile ("move-1D-v.png"); Glib::RefPtr moveRotate = RTImage::createFromFile ("move-rotate.png"); - cHand = hand ? new Gdk::Cursor (cAdd->get_display(), hand, 10, 10) : new Gdk::Cursor (Gdk::HAND2); - cClosedHand = close_hand ? new Gdk::Cursor (cAdd->get_display(), close_hand, 10, 10) : new Gdk::Cursor (Gdk::HAND2); - cWB = wbpick ? new Gdk::Cursor (cAdd->get_display(), wbpick, 3, 15) : new Gdk::Cursor (Gdk::ARROW); - cAddPicker = cpick ? new Gdk::Cursor (cAdd->get_display(), cpick, 3, 18) : new Gdk::Cursor (Gdk::ARROW); - cHidden = empty ? new Gdk::Cursor (cAdd->get_display(), empty, 12, 12) : new Gdk::Cursor (Gdk::FLEUR); - cMove2D = move2D ? new Gdk::Cursor (cAdd->get_display(), move2D, 11, 11) : new Gdk::Cursor (Gdk::FLEUR); - cMove1DH = move1DH ? new Gdk::Cursor (cAdd->get_display(), move1DH, 11, 11) : new Gdk::Cursor (Gdk::FLEUR); - cMove1DV = move1DV ? new Gdk::Cursor (cAdd->get_display(), move1DV, 11, 11) : new Gdk::Cursor (Gdk::FLEUR); - cMoveRotate = moveRotate ? new Gdk::Cursor (cAdd->get_display(), moveRotate, 11, 11) : new Gdk::Cursor (Gdk::CIRCLE); + cHand = hand ? Gdk::Cursor::create (cAdd->get_display(), hand, 10, 10) : Gdk::Cursor::create (cAdd->get_display(), Gdk::HAND2); + cClosedHand = close_hand ? Gdk::Cursor::create (cAdd->get_display(), close_hand, 10, 10) : Gdk::Cursor::create (cAdd->get_display(), Gdk::HAND2); + cWB = wbpick ? Gdk::Cursor::create (cAdd->get_display(), wbpick, 3, 15) : Gdk::Cursor::create (cAdd->get_display(), Gdk::ARROW); + cAddPicker = cpick ? Gdk::Cursor::create (cAdd->get_display(), cpick, 3, 18) : Gdk::Cursor::create (cAdd->get_display(), Gdk::ARROW); + cHidden = empty ? Gdk::Cursor::create (cAdd->get_display(), empty, 12, 12) : Gdk::Cursor::create (cAdd->get_display(), Gdk::FLEUR); + cMove2D = move2D ? Gdk::Cursor::create (cAdd->get_display(), move2D, 11, 11) : Gdk::Cursor::create (cAdd->get_display(), Gdk::FLEUR); + cMove1DH = move1DH ? Gdk::Cursor::create (cAdd->get_display(), move1DH, 11, 11) : Gdk::Cursor::create (cAdd->get_display(), Gdk::FLEUR); + cMove1DV = move1DV ? Gdk::Cursor::create (cAdd->get_display(), move1DV, 11, 11) : Gdk::Cursor::create (cAdd->get_display(), Gdk::FLEUR); + cMoveRotate = moveRotate ? Gdk::Cursor::create (cAdd->get_display(), moveRotate, 11, 11) : Gdk::Cursor::create (cAdd->get_display(), Gdk::CIRCLE); - mainWindow = mainWin; + window = mainWindow; } /* Set the cursor of the given window */ @@ -73,57 +83,89 @@ void CursorManager::setCursor (Glib::RefPtr window, CursorShape sha { window->set_cursor (); } else if (shape == CSOpenHand) { - window->set_cursor (*cHand); + window->set_cursor (cHand); } else if (shape == CSClosedHand) { - window->set_cursor (*cClosedHand); + window->set_cursor (cClosedHand); } else if (shape == CSMove) { - window->set_cursor (*cCropMove); + window->set_cursor (cCropMove); } else if (shape == CSResizeWidth) { - window->set_cursor (*cResizeWidth); + window->set_cursor (cResizeWidth); } else if (shape == CSResizeHeight) { - window->set_cursor (*cResizeHeight); + window->set_cursor (cResizeHeight); } else if (shape == CSResizeDiagonal) { - window->set_cursor (*cResizeDiag); + window->set_cursor (cResizeDiag); } else if (shape == CSResizeTopLeft) { - window->set_cursor (*cResizeTopLeft); + window->set_cursor (cResizeTopLeft); } else if (shape == CSResizeTopRight) { - window->set_cursor (*cResizeTopRight); + window->set_cursor (cResizeTopRight); } else if (shape == CSResizeBottomLeft) { - window->set_cursor (*cResizeBottomLeft); + window->set_cursor (cResizeBottomLeft); } else if (shape == CSResizeBottomRight) { - window->set_cursor (*cResizeBottomRight); + window->set_cursor (cResizeBottomRight); } else if (shape == CSMove2D) { - window->set_cursor (*cMove2D); + window->set_cursor (cMove2D); } else if (shape == CSMove1DH) { - window->set_cursor (*cMove1DH); + window->set_cursor (cMove1DH); } else if (shape == CSMove1DV) { - window->set_cursor (*cMove1DV); + window->set_cursor (cMove1DV); } else if (shape == CSMoveRotate) { - window->set_cursor (*cMoveRotate); + window->set_cursor (cMoveRotate); } else if (shape == CSSpotWB) { - window->set_cursor (*cWB); + window->set_cursor (cWB); } else if (shape == CSAddColPicker) { - window->set_cursor (*cAddPicker); + window->set_cursor (cAddPicker); } else if (shape == CSCropSelect) { - window->set_cursor (*cHand); + window->set_cursor (cHand); } else if (shape == CSMoveLeft) { - window->set_cursor (*cLeftTanMove); + window->set_cursor (cLeftTanMove); } else if (shape == CSMoveRight) { - window->set_cursor (*cRightTanMove); + window->set_cursor (cRightTanMove); } else if (shape == CSStraighten) { - window->set_cursor (*cHand); + window->set_cursor (cHand); } else if (shape == CSWait) { - window->set_cursor (*cWait); + window->set_cursor (cWait); } else if (shape == CSPlus) { - window->set_cursor (*cAdd); + window->set_cursor (cAdd); } else if (shape == CSEmpty) { - window->set_cursor (*cHidden); + window->set_cursor (cHidden); } } +void CursorManager::setWidgetCursor (Glib::RefPtr window, CursorShape shape) +{ + if (window->get_display() == mainWindowCursorManager.display) { + mainWindowCursorManager.setCursor(window, shape); + } else if (window->get_display() == editWindowCursorManager.display) { + editWindowCursorManager.setCursor(window, shape); + } + +#ifndef NDEBUG + else { + printf("CursorManager::setWidgetCursor / Error: Display not found!\n"); + } + +#endif +} + +void CursorManager::setCursorOfMainWindow (Glib::RefPtr window, CursorShape shape) +{ + if (window->get_display() == mainWindowCursorManager.display) { + mainWindowCursorManager.setCursor(shape); + } else if (window->get_display() == editWindowCursorManager.display) { + editWindowCursorManager.setCursor(shape); + } + +#ifndef NDEBUG + else { + printf("CursorManager::setCursorOfMainWindow / Error: Display not found!\n"); + } + +#endif +} + /* Set the cursor of the main window */ void CursorManager::setCursor (CursorShape shape) { - setCursor(mainWindow, shape); + setCursor (window, shape); } diff --git a/rtgui/cursormanager.h b/rtgui/cursormanager.h index f256415c1..fcd856509 100644 --- a/rtgui/cursormanager.h +++ b/rtgui/cursormanager.h @@ -22,7 +22,7 @@ #include enum CursorShape { - CSArrow, CSOpenHand, CSClosedHand, CSMove, CSMoveLeft, + CSUndefined, CSArrow, CSOpenHand, CSClosedHand, CSMove, CSMoveLeft, CSMoveRight, CSResizeWidth, CSResizeHeight, CSResizeDiagonal, CSResizeTopLeft, CSResizeTopRight, CSResizeBottomLeft, CSResizeBottomRight, CSMove2D, CSMove1DH, CSMove1DV, CSMoveRotate, @@ -32,40 +32,46 @@ enum CursorShape { class CursorManager { -protected: - Gdk::Cursor* cResizeWidth; - Gdk::Cursor* cResizeHeight; - Gdk::Cursor* cResizeDiag; - Gdk::Cursor* cResizeTopLeft; - Gdk::Cursor* cResizeTopRight; - Gdk::Cursor* cResizeBottomLeft; - Gdk::Cursor* cResizeBottomRight; - Gdk::Cursor* cCropMove; - Gdk::Cursor* cCropMoving; - Gdk::Cursor* cLeftTanMove; - Gdk::Cursor* cRightTanMove; - Gdk::Cursor* cNormal; - Gdk::Cursor* cCropSelection; - Gdk::Cursor* cAdd; - Gdk::Cursor* cWait; - Gdk::Cursor* cHand; - Gdk::Cursor* cClosedHand; - Gdk::Cursor* cWB; - Gdk::Cursor* cAddPicker; - Gdk::Cursor* cHidden; - Gdk::Cursor* cMove2D; - Gdk::Cursor* cMove1DH; - Gdk::Cursor* cMove1DV; - Gdk::Cursor* cMoveRotate; - Glib::RefPtr mainWindow; +private: + Glib::RefPtr cResizeWidth; + Glib::RefPtr cResizeHeight; + Glib::RefPtr cResizeDiag; + Glib::RefPtr cResizeTopLeft; + Glib::RefPtr cResizeTopRight; + Glib::RefPtr cResizeBottomLeft; + Glib::RefPtr cResizeBottomRight; + Glib::RefPtr cCropMove; + Glib::RefPtr cCropMoving; + Glib::RefPtr cLeftTanMove; + Glib::RefPtr cRightTanMove; + Glib::RefPtr cNormal; + Glib::RefPtr cCropSelection; + Glib::RefPtr cAdd; + Glib::RefPtr cWait; + Glib::RefPtr cHand; + Glib::RefPtr cClosedHand; + Glib::RefPtr cWB; + Glib::RefPtr cAddPicker; + Glib::RefPtr cHidden; + Glib::RefPtr cMove2D; + Glib::RefPtr cMove1DH; + Glib::RefPtr cMove1DV; + Glib::RefPtr cMoveRotate; + + Glib::RefPtr display; + Glib::RefPtr window; + + void setCursor (CursorShape shape); + void setCursor (Glib::RefPtr window, CursorShape shape); public: - void init (Glib::RefPtr mainWin); - void setCursor (Glib::RefPtr window, CursorShape shape); - void setCursor (CursorShape shape); + void init (Glib::RefPtr mainWindow); + static void setWidgetCursor (Glib::RefPtr window, CursorShape shape); + static void setCursorOfMainWindow (Glib::RefPtr window, CursorShape shape); }; -extern CursorManager cursorManager; +extern CursorManager mainWindowCursorManager; +extern CursorManager editWindowCursorManager; #endif diff --git a/rtgui/curveeditor.cc b/rtgui/curveeditor.cc index 117051b2a..9f2dbffab 100644 --- a/rtgui/curveeditor.cc +++ b/rtgui/curveeditor.cc @@ -197,8 +197,11 @@ CurveEditor::CurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEd remoteDrag = false; selected = DCT_Linear; bottomBarCP = nullptr; + bottomBarCId = 0; leftBarCP = nullptr; + leftBarCId = 0; curveCP = nullptr; + curveCId = 0; relatedWidget = nullptr; expandRelatedWidget = true; @@ -214,7 +217,7 @@ CurveEditor::CurveEditor (Glib::ustring text, CurveEditorGroup* ceGroup, CurveEd curveType->set_tooltip_text(M("CURVEEDITOR_TYPE")); // TODO: Does this signal have to be blocked when on curve type change ? curveType->signal_toggled().connect ( sigc::mem_fun(*this, &CurveEditor::curveTypeToggled) ); - typeconn = curveType->signal_changed().connect (sigc::mem_fun(*this, &CurveEditor::typeSelectionChanged) ); + typeconn = curveType->signal_item_selected().connect (sigc::mem_fun(*this, &CurveEditor::typeSelectionChanged) ); } void CurveEditor::setCurve (const std::vector& p) diff --git a/rtgui/curveeditorgroup.cc b/rtgui/curveeditorgroup.cc index aad30ac37..e8f636f8b 100644 --- a/rtgui/curveeditorgroup.cc +++ b/rtgui/curveeditorgroup.cc @@ -26,12 +26,13 @@ #include "multilangmgr.h" #include "rtimage.h" -CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel) : curveDir(curveDir), curve_reset(nullptr), +CurveEditorGroup::CurveEditorGroup (Glib::ustring& curveDir, Glib::ustring groupLabel) : curveDir(curveDir), line(0), curve_reset(nullptr), displayedCurve(nullptr), flatSubGroup(nullptr), diagonalSubGroup(nullptr), cl(nullptr), numberOfPackedCurve(0) { // We set the label to the one provided as parameter, even if it's an empty string - curveGroupLabel = Gtk::manage (new Gtk::Label (groupLabel + ":", Gtk::ALIGN_LEFT)); + curveGroupLabel = Gtk::manage (new Gtk::Label (groupLabel + ":", Gtk::ALIGN_START)); + setExpandAlignProperties(curveGroupLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); } CurveEditorGroup::~CurveEditorGroup() @@ -117,44 +118,55 @@ void CurveEditorGroup::newLine() { if (curveEditors.size() > numberOfPackedCurve) { - Gtk::HBox* headerBox = Gtk::manage (new Gtk::HBox ()); + Gtk::Grid* currLine = Gtk::manage (new Gtk::Grid ()); + setExpandAlignProperties(currLine, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + bool isHeader = false; + int x = 0; if (!numberOfPackedCurve) { - headerBox->pack_start(*curveGroupLabel, Gtk::PACK_SHRINK, 2); - - curve_reset = Gtk::manage (new Gtk::Button ()); - curve_reset->add (*Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png"))); - curve_reset->set_relief (Gtk::RELIEF_NONE); - curve_reset->set_border_width (0); - curve_reset->set_tooltip_text (M("CURVEEDITOR_TOOLTIPLINEAR")); - curve_reset->signal_clicked().connect( sigc::mem_fun(*this, &CurveEditorGroup::curveResetPressed) ); - - headerBox->pack_end (*curve_reset, Gtk::PACK_SHRINK, 0); + isHeader = true; + currLine->attach(*curveGroupLabel, x++, 0, 1, 1); } - int j = numberOfPackedCurve; - bool rwe = false; - for (int i = (int)(curveEditors.size()) - 1; i >= j; i--) { + for (int i = numberOfPackedCurve; i < (int)(curveEditors.size()); ++i) { if (curveEditors[i]->relatedWidget != nullptr && curveEditors[i]->expandRelatedWidget) { rwe = true; } } - for (int i = (int)(curveEditors.size()) - 1; i >= j; i--) { + for (int i = numberOfPackedCurve; i < (int)(curveEditors.size()); ++i) { + setExpandAlignProperties(curveEditors[i]->curveType->buttonGroup, !rwe, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + currLine->attach(*curveEditors[i]->curveType->buttonGroup, x++, 0, 1, 1); + if (curveEditors[i]->relatedWidget != nullptr) { - headerBox->pack_end (*curveEditors[i]->relatedWidget, curveEditors[i]->expandRelatedWidget ? Gtk::PACK_EXPAND_WIDGET : Gtk::PACK_SHRINK, 2); + setExpandAlignProperties(curveEditors[i]->relatedWidget, curveEditors[i]->expandRelatedWidget, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + currLine->attach(*curveEditors[i]->relatedWidget, x++, 0, 1, 1); } - headerBox->pack_end (*curveEditors[i]->curveType->buttonGroup, rwe ? Gtk::PACK_SHRINK : Gtk::PACK_EXPAND_WIDGET, 2); numberOfPackedCurve++; } - pack_start (*headerBox, Gtk::PACK_SHRINK, 2); + if (isHeader) { + curve_reset = Gtk::manage (new Gtk::Button ()); + setExpandAlignProperties(curve_reset, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); + curve_reset->add (*Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png"))); + curve_reset->set_relief (Gtk::RELIEF_NONE); + curve_reset->set_tooltip_text (M("CURVEEDITOR_TOOLTIPLINEAR")); + curve_reset->signal_clicked().connect( sigc::mem_fun(*this, &CurveEditorGroup::curveResetPressed) ); + + currLine->attach(*curve_reset, x++, 0, 1, 1); + } + + attach(*currLine, 0, line++, 1, 1); } +} - +void CurveEditorGroup::attachCurve (Gtk::Grid* curve) +{ + attach(*curve, 0, line, 1, 1); } /* @@ -182,7 +194,7 @@ void CurveEditorGroup::curveListComplete() */ void CurveEditorGroup::typeSelectionChanged (CurveEditor* ce, int n) { - // Same type : do nothing + // Same curve and same type : do nothing if (ce == displayedCurve && n == (int)ce->selected) { return; } @@ -383,7 +395,7 @@ void CurveEditorGroup::setUnChanged (bool uc, CurveEditor* ce) } } -CurveEditorSubGroup::CurveEditorSubGroup(Glib::ustring& curveDir) : curveDir(curveDir), lastFilename(""), valLinear(0), valUnchanged(0), parent(nullptr), curveBBoxPos(0) +CurveEditorSubGroup::CurveEditorSubGroup(Glib::ustring& curveDir) : curveDir(curveDir), lastFilename(""), valLinear(0), valUnchanged(0), parent(nullptr) { leftBar = nullptr; bottomBar = nullptr; @@ -400,6 +412,32 @@ CurveEditorSubGroup::~CurveEditorSubGroup() } } +void CurveEditorSubGroup::initButton (Gtk::Button &button, const Glib::ustring &iconName, Gtk::Align align, bool separatorButton, const Glib::ustring &tooltip) +{ + bool hExpand, vExpand; + if (separatorButton) { + hExpand = vExpand = true; + } else { + vExpand = options.curvebboxpos == 0 || options.curvebboxpos == 2; + hExpand = !vExpand; + } + Gtk::Align hAlign, vAlign; + if (align == Gtk::ALIGN_START) { + hAlign = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::ALIGN_START : Gtk::ALIGN_FILL; + vAlign = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::ALIGN_FILL : Gtk::ALIGN_START; + } else { + hAlign = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::ALIGN_END : Gtk::ALIGN_FILL; + vAlign = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::ALIGN_FILL : Gtk::ALIGN_END; + } + + button.add (*Gtk::manage (new RTImage (iconName))); + button.get_style_context()->add_class(GTK_STYLE_CLASS_FLAT); + if (!tooltip.empty()) { + button.set_tooltip_text(M(tooltip)); + } + setExpandAlignProperties(&button, hExpand, vExpand, hAlign, vAlign); +} + void CurveEditorSubGroup::updateEditButton(CurveEditor* curve, Gtk::ToggleButton *button, sigc::connection &connection) { if (!curve->getEditProvider() || curve->getEditID() == EUID_None) { @@ -427,17 +465,17 @@ Glib::ustring CurveEditorSubGroup::outputFile () bindCurrentFolder (dialog, curveDir); dialog.set_current_name (lastFilename); - dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL); - dialog.add_button(Gtk::StockID("gtk-save"), Gtk::RESPONSE_APPLY); + dialog.add_button(M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); + dialog.add_button(M("GENERAL_SAVE"), Gtk::RESPONSE_APPLY); - Gtk::FileFilter filter_pp; - filter_pp.set_name(M("FILECHOOSER_FILTER_CURVE")); - filter_pp.add_pattern("*.rtc"); + Glib::RefPtr filter_pp = Gtk::FileFilter::create(); + filter_pp->set_name(M("FILECHOOSER_FILTER_CURVE")); + filter_pp->add_pattern("*.rtc"); dialog.add_filter(filter_pp); - Gtk::FileFilter filter_any; - filter_any.set_name(M("FILECHOOSER_FILTER_ANY")); - filter_any.add_pattern("*"); + Glib::RefPtr filter_any = Gtk::FileFilter::create(); + filter_any->set_name(M("FILECHOOSER_FILTER_ANY")); + filter_any->add_pattern("*"); dialog.add_filter(filter_any); //dialog.set_do_overwrite_confirmation (true); @@ -471,17 +509,17 @@ Glib::ustring CurveEditorSubGroup::inputFile () Gtk::FileChooserDialog dialog (getToplevelWindow (parent), M("CURVEEDITOR_LOADDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN); bindCurrentFolder (dialog, curveDir); - dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL); - dialog.add_button(Gtk::StockID("gtk-apply"), Gtk::RESPONSE_APPLY); + dialog.add_button(M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); + dialog.add_button(M("GENERAL_APPLY"), Gtk::RESPONSE_APPLY); - Gtk::FileFilter filter_pp; - filter_pp.set_name(M("FILECHOOSER_FILTER_CURVE")); - filter_pp.add_pattern("*.rtc"); + Glib::RefPtr filter_pp = Gtk::FileFilter::create(); + filter_pp->set_name(M("FILECHOOSER_FILTER_CURVE")); + filter_pp->add_pattern("*.rtc"); dialog.add_filter(filter_pp); - Gtk::FileFilter filter_any; - filter_any.set_name(M("FILECHOOSER_FILTER_ANY")); - filter_any.add_pattern("*"); + Glib::RefPtr filter_any = Gtk::FileFilter::create(); + filter_any->set_name(M("FILECHOOSER_FILTER_ANY")); + filter_any->add_pattern("*"); dialog.add_filter(filter_any); int result = dialog.run(); diff --git a/rtgui/curveeditorgroup.h b/rtgui/curveeditorgroup.h index 097bfd3e3..ffd522fae 100644 --- a/rtgui/curveeditorgroup.h +++ b/rtgui/curveeditorgroup.h @@ -39,7 +39,7 @@ class FlatCurveEditorSubGroup; * - to start a new line of curve button, use the 'newLine' method * - if you add more than one curve, you must add a "CurveEditor* ce" parameter to your listener */ -class CurveEditorGroup : public Gtk::VBox, public CurveListener +class CurveEditorGroup : public Gtk::Grid, public CurveListener { friend class CurveEditor; @@ -49,6 +49,7 @@ class CurveEditorGroup : public Gtk::VBox, public CurveListener private: Glib::ustring& curveDir; + int line; protected: Gtk::Label* curveGroupLabel; @@ -86,6 +87,7 @@ public: } //void on_realize (); CurveEditor* addCurve(CurveType cType, Glib::ustring curveLabel, Gtk::Widget *relatedWidget = nullptr, bool expandRelatedWidget = true, bool periodic = true); + void attachCurve (Gtk::Grid* curve); protected: //void curveTypeToggled (); @@ -115,11 +117,12 @@ protected: int valLinear; int valUnchanged; CurveEditorGroup *parent; - int curveBBoxPos; // 0=above, 1=right, 2=below, 3=left ColoredBar* leftBar; ColoredBar* bottomBar; + void initButton (Gtk::Button &button, const Glib::ustring &iconName, Gtk::Align align, bool separatorButton, const Glib::ustring &tooltip = {}); + public: virtual ~CurveEditorSubGroup(); diff --git a/rtgui/darkframe.cc b/rtgui/darkframe.cc index 1e01b4b95..83bad565a 100644 --- a/rtgui/darkframe.cc +++ b/rtgui/darkframe.cc @@ -25,7 +25,7 @@ using namespace rtengine; using namespace rtengine::procparams; -DarkFrame::DarkFrame () : FoldableToolPanel(this, "darkframe", M("TP_DARKFRAME_LABEL")) +DarkFrame::DarkFrame () : FoldableToolPanel(this, "darkframe", M("TP_DARKFRAME_LABEL")), dfChanged(false), lastDFauto(false), dfp(nullptr), israw(true) { hbdf = Gtk::manage(new Gtk::HBox()); hbdf->set_spacing(4); @@ -51,19 +51,19 @@ DarkFrame::DarkFrame () : FoldableToolPanel(this, "darkframe", M("TP_DARKFRAME_L // Set filename filters b_filter_asCurrent = false; - Gtk::FileFilter *filter_any = Gtk::manage(new Gtk::FileFilter); + Glib::RefPtr filter_any = Gtk::FileFilter::create(); filter_any->add_pattern("*"); filter_any->set_name(M("FILECHOOSER_FILTER_ANY")); - darkFrameFile->add_filter (*filter_any); + darkFrameFile->add_filter (filter_any); // filters for all supported non-raw extensions for (size_t i = 0; i < options.parseExtensions.size(); i++) { if (options.parseExtensionsEnabled[i] && options.parseExtensions[i].uppercase() != "JPG" && options.parseExtensions[i].uppercase() != "JPEG" && options.parseExtensions[i].uppercase() != "PNG" && options.parseExtensions[i].uppercase() != "TIF" && options.parseExtensions[i].uppercase() != "TIFF" ) { - Gtk::FileFilter *filter_df = Gtk::manage(new Gtk::FileFilter); + Glib::RefPtr filter_df = Gtk::FileFilter::create(); filter_df->add_pattern("*." + options.parseExtensions[i]); filter_df->add_pattern("*." + options.parseExtensions[i].uppercase()); filter_df->set_name(options.parseExtensions[i].uppercase()); - darkFrameFile->add_filter (*filter_df); + darkFrameFile->add_filter (filter_df); //printf("adding filter %s \n",options.parseExtensions[i].uppercase().c_str()); } } @@ -113,8 +113,8 @@ void DarkFrame::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi if (b_filter_asCurrent) { //First, remove last filter_asCurrent if it was set for a raw file - std::vector filters = darkFrameFile->list_filters(); - darkFrameFile->remove_filter(**(filters.end() - 1)); + std::vector< Glib::RefPtr > filters = darkFrameFile->list_filters(); + darkFrameFile->remove_filter(*(filters.end() - 1)); b_filter_asCurrent = false; } @@ -133,11 +133,11 @@ void DarkFrame::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi //exclude non-raw if (israw) { b_filter_asCurrent = true; - Gtk::FileFilter *filter_asCurrent = Gtk::manage(new Gtk::FileFilter); + Glib::RefPtr filter_asCurrent = Gtk::FileFilter::create(); filter_asCurrent->add_pattern("*." + filetype); filter_asCurrent->set_name(M("FILECHOOSER_FILTER_SAME") + " (" + filetype + ")"); - darkFrameFile->add_filter (*filter_asCurrent); - darkFrameFile->set_filter (*filter_asCurrent); + darkFrameFile->add_filter (filter_asCurrent); + darkFrameFile->set_filter (filter_asCurrent); } } } diff --git a/rtgui/defringe.cc b/rtgui/defringe.cc index 8d7287ac1..5f70925e7 100644 --- a/rtgui/defringe.cc +++ b/rtgui/defringe.cc @@ -58,7 +58,6 @@ Defringe::Defringe () : FoldableToolPanel(this, "defringe", M("TP_DEFRINGE_LABEL pack_start (*curveEditorPF, Gtk::PACK_SHRINK, 4); - show (); } Defringe::~Defringe () @@ -69,7 +68,7 @@ Defringe::~Defringe () void Defringe::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (elemType == ColorCaller::CCET_VERTICAL_BAR) { valY = 0.5; diff --git a/rtgui/diagonalcurveeditorsubgroup.cc b/rtgui/diagonalcurveeditorsubgroup.cc index e3e83e153..b64034b96 100644 --- a/rtgui/diagonalcurveeditorsubgroup.cc +++ b/rtgui/diagonalcurveeditorsubgroup.cc @@ -38,7 +38,8 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, editedAdjuster = nullptr; editedAdjusterValue = 0; - curveBBoxPos = options.curvebboxpos; + Gtk::PositionType sideStart = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_LEFT : Gtk::POS_TOP; + Gtk::PositionType sideEnd = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_RIGHT : Gtk::POS_BOTTOM; valLinear = (int)DCT_Linear; valUnchanged = (int)DCT_Unchanged; @@ -47,72 +48,66 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, activeParamControl = -1; // custom curve - customCurveBox = new Gtk::VBox (); - customCurveBox->set_spacing(4); - Gtk::HBox* customCurveAndButtons = Gtk::manage (new Gtk::HBox ()); - customCurveAndButtons->set_spacing(4); + customCurveGrid = new Gtk::Grid (); + customCurveGrid->set_orientation(Gtk::ORIENTATION_VERTICAL); + customCurveGrid->set_row_spacing(2); + customCurveGrid->set_column_spacing(2); + customCurve = Gtk::manage (new MyDiagonalCurve ()); - customCurve->set_size_request (GRAPH_SIZE + 2 * RADIUS, GRAPH_SIZE + 2 * RADIUS); customCurve->setType (DCT_Spline); - Gtk::Box* custombbox; // curvebboxpos 0=above, 1=right, 2=below, 3=left + Gtk::Grid* custombbox = Gtk::manage (new Gtk::Grid ()); // curvebboxpos 0=above, 1=right, 2=below, 3=left - if (options.curvebboxpos == 1 || options.curvebboxpos == 3) { - custombbox = Gtk::manage (new Gtk::VBox ()); + if (options.curvebboxpos == 0 || options.curvebboxpos == 2) { + custombbox->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + setExpandAlignProperties(custombbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); } else { - custombbox = Gtk::manage (new Gtk::HBox ()); + custombbox->set_orientation(Gtk::ORIENTATION_VERTICAL); + setExpandAlignProperties(custombbox, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); } - custombbox->set_spacing(4); - - pasteCustom = Gtk::manage (new Gtk::Button ()); - pasteCustom->add (*Gtk::manage (new RTImage ("edit-paste.png"))); - copyCustom = Gtk::manage (new Gtk::Button ()); - copyCustom->add (*Gtk::manage (new RTImage ("edit-copy.png"))); - saveCustom = Gtk::manage (new Gtk::Button ()); - saveCustom->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); - loadCustom = Gtk::manage (new Gtk::Button ()); - loadCustom->add (*Gtk::manage (new RTImage ("gtk-open.png"))); editPointCustom = Gtk::manage (new Gtk::ToggleButton ()); - editPointCustom->add (*Gtk::manage (new RTImage ("gtk-edit.png"))); - editPointCustom->set_tooltip_text(M("CURVEEDITOR_EDITPOINT_HINT")); + initButton(*editPointCustom, Glib::ustring("gtk-edit.png"), Gtk::ALIGN_START, false, Glib::ustring(M("CURVEEDITOR_EDITPOINT_HINT"))); editCustom = Gtk::manage (new Gtk::ToggleButton()); - editCustom->add (*Gtk::manage (new RTImage ("editmodehand.png"))); - editCustom->set_tooltip_text(M("EDIT_PIPETTE_TOOLTIP")); + initButton(*editCustom, Glib::ustring("editmodehand.png"), Gtk::ALIGN_START, false, Glib::ustring(M("EDIT_PIPETTE_TOOLTIP"))); editCustom->hide(); + copyCustom = Gtk::manage (new Gtk::Button ()); + initButton(*copyCustom, Glib::ustring("edit-copy.png"), Gtk::ALIGN_END, true); + pasteCustom = Gtk::manage (new Gtk::Button ()); + initButton(*pasteCustom, Glib::ustring("edit-paste.png"), Gtk::ALIGN_END, false); + loadCustom = Gtk::manage (new Gtk::Button ()); + initButton(*loadCustom, Glib::ustring("gtk-open.png"), Gtk::ALIGN_END, false); + saveCustom = Gtk::manage (new Gtk::Button ()); + initButton(*saveCustom, Glib::ustring("gtk-save-large.png"), Gtk::ALIGN_END, false); - custombbox->pack_end (*pasteCustom, Gtk::PACK_SHRINK, 0); - custombbox->pack_end (*copyCustom, Gtk::PACK_SHRINK, 0); - custombbox->pack_end (*saveCustom, Gtk::PACK_SHRINK, 0); - custombbox->pack_end (*loadCustom, Gtk::PACK_SHRINK, 0); - custombbox->pack_start(*editPointCustom, Gtk::PACK_SHRINK, 0); - custombbox->pack_start(*editCustom, Gtk::PACK_SHRINK, 0); - - customCurveAndButtons->pack_start (*customCurve, Gtk::PACK_EXPAND_WIDGET, 0); - customCurveAndButtons->pack_start (*custombbox, Gtk::PACK_SHRINK, 0); - customCurveBox->pack_start (*customCurveAndButtons, Gtk::PACK_EXPAND_WIDGET); - - if (options.curvebboxpos == 0) { - removeIfThere (customCurveAndButtons, custombbox, false); - customCurveBox->pack_start (*custombbox); - customCurveBox->reorder_child(*custombbox, 0); - } else if (options.curvebboxpos == 2) { - removeIfThere (customCurveAndButtons, custombbox, false); - customCurveBox->pack_start (*custombbox); - } else if (options.curvebboxpos == 3) { - customCurveAndButtons->reorder_child(*custombbox, 0); - } + custombbox->attach_next_to(*editPointCustom, sideStart, 1, 1); + custombbox->attach_next_to(*editCustom, sideStart, 1, 1); + custombbox->attach_next_to(*copyCustom, sideEnd, 1, 1); + custombbox->attach_next_to(*pasteCustom, sideEnd, 1, 1); + custombbox->attach_next_to(*loadCustom, sideEnd, 1, 1); + custombbox->attach_next_to(*saveCustom, sideEnd, 1, 1); customCoordAdjuster = Gtk::manage (new CoordinateAdjuster(customCurve, this)); - customCurveBox->pack_start(*customCoordAdjuster, Gtk::PACK_SHRINK, 0); - if (options.curvebboxpos == 2) { - customCurveBox->reorder_child(*customCoordAdjuster, 2); + // Button box position: 0=above, 1=right, 2=below, 3=left + customCurveGrid->add(*customCurve); + customCurve->set_hexpand(true); + + if (options.curvebboxpos == 0) { + customCurveGrid->attach_next_to(*custombbox, *customCurve, Gtk::POS_TOP, 1, 1); + customCurveGrid->attach_next_to(*customCoordAdjuster, *customCurve, Gtk::POS_BOTTOM, 1, 1); + } else if (options.curvebboxpos == 1) { + customCurveGrid->attach_next_to(*custombbox, *customCurve, Gtk::POS_RIGHT, 1, 1); + customCurveGrid->attach_next_to(*customCoordAdjuster, *customCurve, Gtk::POS_BOTTOM, 2, 1); + } else if (options.curvebboxpos == 2) { + customCurveGrid->attach_next_to(*customCoordAdjuster, *customCurve, Gtk::POS_BOTTOM, 1, 1); + customCurveGrid->attach_next_to(*custombbox, *customCoordAdjuster, Gtk::POS_BOTTOM, 1, 1); + } else if (options.curvebboxpos == 3) { + customCurveGrid->attach_next_to(*custombbox, *customCurve, Gtk::POS_LEFT, 1, 1); + customCurveGrid->attach_next_to(*customCoordAdjuster, *custombbox, Gtk::POS_BOTTOM, 2, 1); } - customCoordAdjuster->show_all(); - - customCurveBox->show_all (); + customCurveGrid->show_all (); customCoordAdjuster->hide(); saveCustom->signal_clicked().connect( sigc::mem_fun(*this, &DiagonalCurveEditorSubGroup::savePressed) ); @@ -130,71 +125,66 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, // NURBS curve - NURBSCurveBox = new Gtk::VBox (); - NURBSCurveBox->set_spacing(4); - Gtk::HBox* NURBSCurveAndButtons = Gtk::manage (new Gtk::HBox ()); - NURBSCurveAndButtons->set_spacing(4); + NURBSCurveGrid = new Gtk::Grid (); + NURBSCurveGrid->set_row_spacing(4); + NURBSCurveGrid->set_column_spacing(4); + NURBSCurveGrid->set_orientation(Gtk::ORIENTATION_VERTICAL); + NURBSCurve = Gtk::manage (new MyDiagonalCurve ()); - NURBSCurve->set_size_request (GRAPH_SIZE + 2 * RADIUS, GRAPH_SIZE + 2 * RADIUS); NURBSCurve->setType (DCT_NURBS); - Gtk::Box* NURBSbbox; + Gtk::Grid* NURBSbbox = Gtk::manage (new Gtk::Grid ()); - if (options.curvebboxpos == 1 || options.curvebboxpos == 3) { - NURBSbbox = Gtk::manage (new Gtk::VBox ()); + if (options.curvebboxpos == 0 || options.curvebboxpos == 2) { + NURBSbbox->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + setExpandAlignProperties(NURBSbbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); } else { - NURBSbbox = Gtk::manage (new Gtk::HBox ()); + NURBSbbox->set_orientation(Gtk::ORIENTATION_VERTICAL); + setExpandAlignProperties(NURBSbbox, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); } - NURBSbbox->set_spacing(4); - - pasteNURBS = Gtk::manage (new Gtk::Button ()); - pasteNURBS->add (*Gtk::manage (new RTImage ("edit-paste.png"))); - copyNURBS = Gtk::manage (new Gtk::Button ()); - copyNURBS->add (*Gtk::manage (new RTImage ("edit-copy.png"))); - saveNURBS = Gtk::manage (new Gtk::Button ()); - saveNURBS->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); - loadNURBS = Gtk::manage (new Gtk::Button ()); - loadNURBS->add (*Gtk::manage (new RTImage ("gtk-open.png"))); editPointNURBS = Gtk::manage (new Gtk::ToggleButton ()); - editPointNURBS->add (*Gtk::manage (new RTImage ("gtk-edit.png"))); - editPointNURBS->set_tooltip_text(M("CURVEEDITOR_EDITPOINT_HINT")); + initButton(*editPointNURBS, Glib::ustring("gtk-edit.png"), Gtk::ALIGN_START, false, Glib::ustring(M("CURVEEDITOR_EDITPOINT_HINT"))); editNURBS = Gtk::manage (new Gtk::ToggleButton()); - editNURBS->add (*Gtk::manage (new RTImage ("editmodehand.png"))); - editNURBS->set_tooltip_text(M("EDIT_PIPETTE_TOOLTIP")); + initButton(*editNURBS, Glib::ustring("editmodehand.png"), Gtk::ALIGN_START, false, Glib::ustring(M("EDIT_PIPETTE_TOOLTIP"))); editNURBS->hide(); - NURBSbbox->pack_end (*pasteNURBS, Gtk::PACK_SHRINK, 0); - NURBSbbox->pack_end (*copyNURBS, Gtk::PACK_SHRINK, 0); - NURBSbbox->pack_end (*saveNURBS, Gtk::PACK_SHRINK, 0); - NURBSbbox->pack_end (*loadNURBS, Gtk::PACK_SHRINK, 0); - NURBSbbox->pack_start(*editPointNURBS, Gtk::PACK_SHRINK, 0); - NURBSbbox->pack_start(*editNURBS, Gtk::PACK_SHRINK, 0); + copyNURBS = Gtk::manage (new Gtk::Button ()); + initButton(*copyNURBS, Glib::ustring("edit-copy.png"), Gtk::ALIGN_END, true); + pasteNURBS = Gtk::manage (new Gtk::Button ()); + initButton(*pasteNURBS, Glib::ustring("edit-paste.png"), Gtk::ALIGN_END, false); + loadNURBS = Gtk::manage (new Gtk::Button ()); + initButton(*loadNURBS, Glib::ustring("gtk-open.png"), Gtk::ALIGN_END, false); + saveNURBS = Gtk::manage (new Gtk::Button ()); + initButton(*saveNURBS, Glib::ustring("gtk-save-large.png"), Gtk::ALIGN_END, false); - NURBSCurveAndButtons->pack_start (*NURBSCurve, Gtk::PACK_EXPAND_WIDGET, 0); - NURBSCurveAndButtons->pack_start (*NURBSbbox, Gtk::PACK_SHRINK, 0); - NURBSCurveBox->pack_start (*NURBSCurveAndButtons, Gtk::PACK_EXPAND_WIDGET); - - if (options.curvebboxpos == 0) { - removeIfThere (NURBSCurveAndButtons, NURBSbbox, false); - NURBSCurveBox->pack_start (*NURBSbbox); - NURBSCurveBox->reorder_child(*NURBSbbox, 0); - } else if (options.curvebboxpos == 2) { - removeIfThere (NURBSCurveAndButtons, NURBSbbox, false); - NURBSCurveBox->pack_start (*NURBSbbox); - } else if (options.curvebboxpos == 3) { - NURBSCurveAndButtons->reorder_child(*NURBSbbox, 0); - } + NURBSbbox->attach_next_to(*editPointNURBS, sideStart, 1, 1); + NURBSbbox->attach_next_to(*editNURBS, sideStart, 1, 1); + NURBSbbox->attach_next_to(*copyNURBS, sideEnd, 1, 1); + NURBSbbox->attach_next_to(*pasteNURBS, sideEnd, 1, 1); + NURBSbbox->attach_next_to(*loadNURBS, sideEnd, 1, 1); + NURBSbbox->attach_next_to(*saveNURBS, sideEnd, 1, 1); NURBSCoordAdjuster = Gtk::manage (new CoordinateAdjuster(NURBSCurve, this)); - NURBSCurveBox->pack_start(*NURBSCoordAdjuster, Gtk::PACK_SHRINK, 0); - if (options.curvebboxpos == 2) { - NURBSCurveBox->reorder_child(*NURBSCoordAdjuster, 2); + // Button box position: 0=above, 1=right, 2=below, 3=left + NURBSCurveGrid->add(*NURBSCurve); + NURBSCurve->set_hexpand(true); + + if (options.curvebboxpos == 0) { + NURBSCurveGrid->attach_next_to(*NURBSbbox, *NURBSCurve, Gtk::POS_TOP, 1, 1); + NURBSCurveGrid->attach_next_to(*NURBSCoordAdjuster, *NURBSCurve, Gtk::POS_BOTTOM, 1, 1); + } else if (options.curvebboxpos == 1) { + NURBSCurveGrid->attach_next_to(*NURBSbbox, *NURBSCurve, Gtk::POS_RIGHT, 1, 1); + NURBSCurveGrid->attach_next_to(*NURBSCoordAdjuster, *NURBSCurve, Gtk::POS_BOTTOM, 2, 1); + } else if (options.curvebboxpos == 2) { + NURBSCurveGrid->attach_next_to(*NURBSCoordAdjuster, *NURBSCurve, Gtk::POS_BOTTOM, 1, 1); + NURBSCurveGrid->attach_next_to(*NURBSbbox, *NURBSCoordAdjuster, Gtk::POS_BOTTOM, 1, 1); + } else if (options.curvebboxpos == 3) { + NURBSCurveGrid->attach_next_to(*NURBSbbox, *NURBSCurve, Gtk::POS_LEFT, 1, 1); + NURBSCurveGrid->attach_next_to(*NURBSCoordAdjuster, *NURBSbbox, Gtk::POS_BOTTOM, 2, 1); } - NURBSCoordAdjuster->show_all(); - - NURBSCurveBox->show_all (); + NURBSCurveGrid->show_all (); NURBSCoordAdjuster->hide(); saveNURBS->signal_clicked().connect( sigc::mem_fun(*this, &DiagonalCurveEditorSubGroup::savePressed) ); @@ -212,46 +202,44 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, // parametric curve - paramCurveBox = new Gtk::VBox (); - paramCurveBox->set_spacing(4); - Gtk::HBox* paramCurveAndButtons = Gtk::manage (new Gtk::HBox ()); - paramCurveAndButtons->set_spacing(4); - Gtk::VBox* paramCurveAndShcVBox = Gtk::manage (new Gtk::VBox ()); + paramCurveGrid = new Gtk::Grid (); + paramCurveGrid->set_row_spacing(4); + paramCurveGrid->set_column_spacing(4); + paramCurveGrid->set_orientation(Gtk::ORIENTATION_VERTICAL); + paramCurve = Gtk::manage (new MyDiagonalCurve ()); - paramCurve->set_size_request (GRAPH_SIZE + 2 * RADIUS, GRAPH_SIZE + 2 * RADIUS); paramCurve->setType (DCT_Parametric); - Gtk::Box* parambbox; + Gtk::Grid* parambbox = Gtk::manage (new Gtk::Grid ()); - if (options.curvebboxpos == 1 || options.curvebboxpos == 3) { - parambbox = Gtk::manage (new Gtk::VBox ()); + if (options.curvebboxpos == 0 || options.curvebboxpos == 2) { + parambbox->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + setExpandAlignProperties(parambbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); } else { - parambbox = Gtk::manage (new Gtk::HBox ()); + parambbox->set_orientation(Gtk::ORIENTATION_VERTICAL); + setExpandAlignProperties(parambbox, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); } - parambbox->set_spacing(4); - shcSelector = Gtk::manage (new SHCSelector ()); - shcSelector->set_size_request (GRAPH_SIZE - 100, 10); // width, height - //* shcSelector->set_size_request ((GRAPH_SIZE+2*RADIUS)-20, 20); + shcSelector->set_name("CurveSHCSelector"); // To handle the 4px gap between the SHCSelector and the curve through CSS - pasteParam = Gtk::manage (new Gtk::Button ()); - pasteParam->add (*Gtk::manage (new RTImage ("edit-paste.png"))); - copyParam = Gtk::manage (new Gtk::Button ()); - copyParam->add (*Gtk::manage (new RTImage ("edit-copy.png"))); - saveParam = Gtk::manage (new Gtk::Button ()); - saveParam->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); - loadParam = Gtk::manage (new Gtk::Button ()); - loadParam->add (*Gtk::manage (new RTImage ("gtk-open.png"))); editParam = Gtk::manage (new Gtk::ToggleButton()); - editParam->add (*Gtk::manage (new RTImage ("editmodehand.png"))); - editParam->set_tooltip_text(M("EDIT_PIPETTE_TOOLTIP")); + initButton(*editParam, Glib::ustring("editmodehand.png"), Gtk::ALIGN_START, false, Glib::ustring(M("EDIT_PIPETTE_TOOLTIP"))); editParam->hide(); - parambbox->pack_end (*pasteParam, Gtk::PACK_SHRINK, 0); - parambbox->pack_end (*copyParam, Gtk::PACK_SHRINK, 0); - parambbox->pack_end (*saveParam, Gtk::PACK_SHRINK, 0); - parambbox->pack_end (*loadParam, Gtk::PACK_SHRINK, 0); - parambbox->pack_start(*editParam, Gtk::PACK_SHRINK, 0); + copyParam = Gtk::manage (new Gtk::Button ()); + initButton(*copyParam, Glib::ustring("edit-copy.png"), Gtk::ALIGN_END, true); + pasteParam = Gtk::manage (new Gtk::Button ()); + initButton(*pasteParam, Glib::ustring("edit-paste.png"), Gtk::ALIGN_END, false); + loadParam = Gtk::manage (new Gtk::Button ()); + initButton(*loadParam, Glib::ustring("gtk-open.png"), Gtk::ALIGN_END, false); + saveParam = Gtk::manage (new Gtk::Button ()); + initButton(*saveParam, Glib::ustring("gtk-save-large.png"), Gtk::ALIGN_END, false); + + parambbox->attach_next_to(*editParam, sideStart, 1, 1); + parambbox->attach_next_to(*copyParam, sideEnd, 1, 1); + parambbox->attach_next_to(*pasteParam, sideEnd, 1, 1); + parambbox->attach_next_to(*loadParam, sideEnd, 1, 1); + parambbox->attach_next_to(*saveParam, sideEnd, 1, 1); saveParam->signal_clicked().connect( sigc::mem_fun(*this, &DiagonalCurveEditorSubGroup::savePressed) ); loadParam->signal_clicked().connect( sigc::mem_fun(*this, &DiagonalCurveEditorSubGroup::loadPressed) ); @@ -280,41 +268,46 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, evshadows->add (*shadows); // paramCurveSliderBox needed to set vspacing(4) between curve+shc and sliders without vspacing between each slider - Gtk::VBox* paramCurveSliderBox = Gtk::manage (new Gtk::VBox ()); - paramCurveSliderBox->set_spacing(4); + Gtk::Grid* paramCurveSliderBox = Gtk::manage (new Gtk::Grid()); + paramCurveSliderBox->set_orientation(Gtk::ORIENTATION_VERTICAL); + paramCurveSliderBox->set_column_spacing(2); + paramCurveSliderBox->set_row_spacing(2); - paramCurveSliderBox->pack_start (*evhighlights); - paramCurveSliderBox->pack_start (*evlights); - paramCurveSliderBox->pack_start (*evdarks); - paramCurveSliderBox->pack_start (*evshadows); + paramCurveSliderBox->attach_next_to(*evhighlights, Gtk::POS_TOP, 1, 1); + paramCurveSliderBox->attach_next_to(*evlights, Gtk::POS_TOP, 1, 1); + paramCurveSliderBox->attach_next_to(*evdarks, Gtk::POS_TOP, 1, 1); + paramCurveSliderBox->attach_next_to(*evshadows, Gtk::POS_TOP, 1, 1); - paramCurveBox->show_all (); + paramCurveGrid->show_all (); - paramCurveAndShcVBox->pack_start (*paramCurve, Gtk::PACK_EXPAND_WIDGET); - paramCurveAndShcVBox->pack_start (*shcSelector, Gtk::PACK_EXPAND_WIDGET); - paramCurveAndButtons->pack_start (*paramCurveAndShcVBox); - paramCurveAndButtons->pack_start (*parambbox, Gtk::PACK_SHRINK); - paramCurveBox->pack_start (*paramCurveAndButtons); - paramCurveBox->pack_start (*paramCurveSliderBox); + // Button box position: 0=above, 1=right, 2=below, 3=left + paramCurveGrid->add(*paramCurve); + paramCurve->set_hexpand(true); if (options.curvebboxpos == 0) { - removeIfThere (paramCurveAndButtons, parambbox, false); - paramCurveBox->pack_start (*parambbox); - paramCurveBox->reorder_child(*parambbox, 0); + paramCurveGrid->attach_next_to(*parambbox, *paramCurve, Gtk::POS_TOP, 1, 1); + paramCurveGrid->attach_next_to(*shcSelector, *paramCurve, Gtk::POS_BOTTOM, 1, 1); + paramCurveGrid->attach_next_to(*paramCurveSliderBox, *shcSelector, Gtk::POS_BOTTOM, 1, 1); + } else if (options.curvebboxpos == 1) { + paramCurveGrid->attach_next_to(*shcSelector, *paramCurve, Gtk::POS_BOTTOM, 1, 1); + paramCurveGrid->attach_next_to(*parambbox, *paramCurve, Gtk::POS_RIGHT, 1, 2); + paramCurveGrid->attach_next_to(*paramCurveSliderBox, *shcSelector, Gtk::POS_BOTTOM, 2, 1); } else if (options.curvebboxpos == 2) { - removeIfThere (paramCurveAndButtons, parambbox, false); - paramCurveBox->pack_start (*parambbox); - //paramCurveBox->reorder_child(*parambbox, 1); + paramCurveGrid->attach_next_to(*shcSelector, *paramCurve, Gtk::POS_BOTTOM, 1, 1); + paramCurveGrid->attach_next_to(*parambbox, *shcSelector, Gtk::POS_BOTTOM, 1, 1); + paramCurveGrid->attach_next_to(*paramCurveSliderBox, *parambbox, Gtk::POS_BOTTOM, 1, 1); } else if (options.curvebboxpos == 3) { - paramCurveAndButtons->reorder_child(*parambbox, 0); + paramCurveGrid->attach_next_to(*shcSelector, *paramCurve, Gtk::POS_BOTTOM, 1, 1); + paramCurveGrid->attach_next_to(*parambbox, *paramCurve, Gtk::POS_LEFT, 1, 2); + paramCurveGrid->attach_next_to(*paramCurveSliderBox, *parambbox, Gtk::POS_BOTTOM, 2, 1); } - paramCurveBox->show_all (); + paramCurveGrid->show_all (); // parametric curve end - customCurveBox->reference (); - paramCurveBox->reference (); + customCurveGrid->reference (); + paramCurveGrid->reference (); customCurve->setCurveListener (parent); // Send the message directly to the parent NURBSCurve->setCurveListener (parent); @@ -342,9 +335,9 @@ DiagonalCurveEditorSubGroup::DiagonalCurveEditorSubGroup (CurveEditorGroup* prt, DiagonalCurveEditorSubGroup::~DiagonalCurveEditorSubGroup() { - delete customCurveBox; - delete paramCurveBox; - delete NURBSCurveBox; + delete customCurveGrid; + delete paramCurveGrid; + delete NURBSCurveGrid; } /* @@ -532,7 +525,8 @@ void DiagonalCurveEditorSubGroup::pipetteDrag(EditDataProvider *provider, int mo case (DCT_Parametric): if (editedAdjuster) { - int trimmedValue = editedAdjuster->trimValue(editedAdjusterValue - (provider->deltaScreen.y / 2)); + int trimmedValue = editedAdjusterValue - (provider->deltaScreen.y / 2); + editedAdjuster->trimValue(trimmedValue); if (trimmedValue != editedAdjuster->getIntValue()) { editedAdjuster->setValue(trimmedValue); @@ -610,7 +604,7 @@ void DiagonalCurveEditorSubGroup::switchGUI() if (dCurve) { - // Initializing GUI values + repacking the appropriated widget + // Initializing GUI values + attaching the appropriated widget //dCurve->typeconn.block(true); // first we update the colored bar @@ -627,7 +621,9 @@ void DiagonalCurveEditorSubGroup::switchGUI() } else { // dCurve ave a ColorProvider or a background gradient defined, so we create/update the object if (!leftBar) { - leftBar = new ColoredBar(RTO_Bottom2Top); + leftBar = new ColoredBar(RTO_Bottom2Top); + + } if (barColorProvider) { @@ -670,10 +666,10 @@ void DiagonalCurveEditorSubGroup::switchGUI() customCurve->setPoints (dCurve->customCurveEd); customCurve->setColorProvider(dCurve->getCurveColorProvider(), dCurve->getCurveCallerId()); customCurve->setColoredBar(leftBar, bottomBar); - customCurve->forceResize(); + customCurve->queue_resize_no_redraw(); updateEditButton(dCurve, editCustom, editCustomConn); - parent->pack_start (*customCurveBox); - customCurveBox->check_resize(); + parent->attachCurve (customCurveGrid); + customCurveGrid->check_resize(); break; case (DCT_Parametric): { @@ -697,13 +693,13 @@ void DiagonalCurveEditorSubGroup::switchGUI() darks->setLabel(label[1]); shadows->setValue (dCurve->paramCurveEd.at(7)); shadows->setLabel(label[0]); - shcSelector->setColorProvider(barColorProvider, dCurve->getBottomBarCallerId()); - shcSelector->setBgGradient(bgGradient); - shcSelector->setMargins( (leftBar ? MyCurve::getBarWidth() + CBAR_MARGIN : RADIUS), RADIUS ); + shcSelector->coloredBar.setColorProvider(barColorProvider, dCurve->getBottomBarCallerId()); + shcSelector->coloredBar.setBgGradient(bgGradient); + shcSelector->setMargins( (leftBar ? CBAR_WIDTH + CBAR_MARGIN : RADIUS), RADIUS ); paramCurve->setColoredBar(leftBar, nullptr); - paramCurve->forceResize(); + paramCurve->queue_resize_no_redraw(); updateEditButton(dCurve, editParam, editParamConn); - parent->pack_start (*paramCurveBox); + parent->attachCurve (paramCurveGrid); break; } @@ -711,10 +707,10 @@ void DiagonalCurveEditorSubGroup::switchGUI() NURBSCurve->setPoints (dCurve->NURBSCurveEd); NURBSCurve->setColorProvider(dCurve->getCurveColorProvider(), dCurve->getCurveCallerId()); NURBSCurve->setColoredBar(leftBar, bottomBar); - NURBSCurve->forceResize(); + NURBSCurve->queue_resize_no_redraw(); updateEditButton(dCurve, editNURBS, editNURBSConn); - parent->pack_start (*NURBSCurveBox); - NURBSCurveBox->check_resize(); + parent->attachCurve (NURBSCurveGrid); + NURBSCurveGrid->check_resize(); break; default: // (DCT_Linear, DCT_Unchanged) @@ -1100,9 +1096,9 @@ const std::vector DiagonalCurveEditorSubGroup::getCurveFromGUI (int type */ void DiagonalCurveEditorSubGroup::removeEditor () { - removeIfThere (parent, customCurveBox, false); - removeIfThere (parent, paramCurveBox, false); - removeIfThere (parent, NURBSCurveBox, false); + removeIfThere (parent, customCurveGrid, false); + removeIfThere (parent, paramCurveGrid, false); + removeIfThere (parent, NURBSCurveGrid, false); } bool DiagonalCurveEditorSubGroup::curveReset(CurveEditor *ce) diff --git a/rtgui/diagonalcurveeditorsubgroup.h b/rtgui/diagonalcurveeditorsubgroup.h index 5b6d845d5..1e3c3bf13 100644 --- a/rtgui/diagonalcurveeditorsubgroup.h +++ b/rtgui/diagonalcurveeditorsubgroup.h @@ -30,9 +30,9 @@ class DiagonalCurveEditorSubGroup : public CurveEditorSubGroup, public SHCListen friend class DiagonalCurveEditor; protected: - Gtk::VBox* customCurveBox; - Gtk::VBox* NURBSCurveBox; - Gtk::VBox* paramCurveBox; + Gtk::Grid* customCurveGrid; + Gtk::Grid* NURBSCurveGrid; + Gtk::Grid* paramCurveGrid; MyDiagonalCurve* customCurve; MyDiagonalCurve* NURBSCurve; diff --git a/rtgui/dirbrowser.cc b/rtgui/dirbrowser.cc index 8d220e452..23d1259ba 100644 --- a/rtgui/dirbrowser.cc +++ b/rtgui/dirbrowser.cc @@ -18,9 +18,11 @@ */ #include "dirbrowser.h" +#include #include -#ifdef WIN32 +#ifdef _WIN32_WINNT +#undef _WIN32_WINNT #define _WIN32_WINNT 0x0600 #include #endif @@ -80,6 +82,7 @@ DirBrowser::DirBrowser () : dirTreeModel(), dirtree = Gtk::manage ( new Gtk::TreeView() ); scrolledwindow4 = Gtk::manage ( new Gtk::ScrolledWindow() ); + crt.property_ellipsize() = Pango::ELLIPSIZE_END; // dirtree->set_flags(Gtk::CAN_FOCUS); dirtree->set_headers_visible(); @@ -87,8 +90,7 @@ DirBrowser::DirBrowser () : dirTreeModel(), dirtree->set_rules_hint(false); dirtree->set_reorderable(false); dirtree->set_enable_search(false); - scrolledwindow4->set_flags(Gtk::CAN_FOCUS); - scrolledwindow4->set_border_width(2); + scrolledwindow4->set_can_focus(true); scrolledwindow4->set_shadow_type(Gtk::SHADOW_NONE); scrolledwindow4->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); scrolledwindow4->property_window_placement().set_value(Gtk::CORNER_TOP_LEFT); @@ -99,6 +101,11 @@ DirBrowser::DirBrowser () : dirTreeModel(), scrolledwindow4->show (); } +DirBrowser::~DirBrowser() +{ + idle_register.destroy(); +} + void DirBrowser::fillDirTree () { @@ -226,16 +233,16 @@ int updateVolumesUI (void* br) (static_cast(br))->updateVolumes (); return 1; } -int updateDirTreeUI (void* br) -{ - (static_cast(br))->updateDirTreeRoot (); - return 0; -} void DirBrowser::winDirChanged () { + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->updateDirTreeRoot(); - g_idle_add (updateDirTreeUI, this); + return FALSE; + }; + + idle_register.add(func, this); } #endif @@ -347,7 +354,7 @@ void DirBrowser::updateDir (const Gtk::TreeModel::iterator& iter) auto dir = Gio::File::create_for_path (iter->get_value (dtColumns.dirname)); auto subDirs = listSubDirs (dir, options.fbShowHidden); - for (int i = 0; i < subDirs.size(); i++) { + for (size_t i = 0; i < subDirs.size(); i++) { bool found = false; for (Gtk::TreeModel::iterator it = iter->children().begin(); it != iter->children().end() && !found ; ++it) { @@ -387,7 +394,7 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath) { Gtk::TreeModel::Path path; - path.append_index(0); + path.push_back(0); char* dcpy = strdup (absDirPath.c_str()); char* dir = strtok (dcpy, "/\\"); @@ -397,9 +404,9 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath) #ifndef WIN32 Gtk::TreeModel::iterator j = dirTreeModel->get_iter (path); path.up (); - path.append_index (0); + path.push_back (0); row_expanded(j, path); - path.append_index (0); + path.push_back (0); #endif while (dir) { @@ -425,13 +432,13 @@ Gtk::TreePath DirBrowser::expandToDir (const Glib::ustring& absDirPath) if (str == dirstr) { #endif path.up (); - path.append_index (ix); + path.push_back (ix); row_expanded(i, path); - path.append_index (0); + path.push_back (0); break; } - ix++; + ++ix; ++i; } diff --git a/rtgui/dirbrowser.h b/rtgui/dirbrowser.h index 850a9fa78..e8eefdd36 100644 --- a/rtgui/dirbrowser.h +++ b/rtgui/dirbrowser.h @@ -25,6 +25,8 @@ #include "windirmonitor.h" #endif +#include "guiutils.h" + class DirBrowser : public Gtk::VBox #ifdef WIN32 , public WinDirChangeListener @@ -95,8 +97,11 @@ private: Gtk::TreePath expandToDir (const Glib::ustring& dirName); void updateDir (const Gtk::TreeModel::iterator& iter); + IdleRegister idle_register; + public: DirBrowser (); + ~DirBrowser(); void fillDirTree (); void on_sort_column_changed() const; diff --git a/rtgui/dirpyrdenoise.cc b/rtgui/dirpyrdenoise.cc index 3cee199f8..168a9df03 100644 --- a/rtgui/dirpyrdenoise.cc +++ b/rtgui/dirpyrdenoise.cc @@ -26,7 +26,7 @@ using namespace rtengine; using namespace rtengine::procparams; extern Options options; -DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP_DIRPYRDENOISE_LABEL"), true, true), lastenhance(false) +DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP_DIRPYRDENOISE_LABEL"), true, true), lastmedian(false) { std::vector milestones; CurveListener::setMulti(true); @@ -39,11 +39,9 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP std::vector defaultCurve; Gtk::Frame* lumaFrame = Gtk::manage (new Gtk::Frame (M("TP_DIRPYRDENOISE_LUMAFR")) ); - lumaFrame->set_border_width(0); lumaFrame->set_label_align(0.025, 0.5); Gtk::VBox * lumaVBox = Gtk::manage ( new Gtk::VBox()); - lumaVBox->set_border_width(4); lumaVBox->set_spacing(2); @@ -53,8 +51,8 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP ctboxL->pack_start (*labmL, Gtk::PACK_SHRINK, 1); Lmethod = Gtk::manage (new MyComboBoxText ()); - Lmethod->append_text (M("TP_DIRPYRDENOISE_CUR")); - Lmethod->append_text (M("TP_DIRPYRDENOISE_SLI")); + Lmethod->append (M("TP_DIRPYRDENOISE_CUR")); + Lmethod->append (M("TP_DIRPYRDENOISE_SLI")); Lmethod->set_active(0); Lmethodconn = Lmethod->signal_changed().connect ( sigc::mem_fun(*this, &DirPyrDenoise::LmethodChanged) ); @@ -80,16 +78,10 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP NoiscurveEditorG->show(); Gtk::Frame* chromaFrame = Gtk::manage (new Gtk::Frame (M("TP_DIRPYRDENOISE_CHROMAFR")) ); - chromaFrame->set_border_width(0); chromaFrame->set_label_align(0.025, 0.5); Gtk::VBox *chromaVBox = Gtk::manage ( new Gtk::VBox()); chromaVBox->set_spacing(2); - chromaVBox->set_border_width(4); - - autochroma = Gtk::manage (new Gtk::CheckButton (M("TP_DIRPYRDENOISE_AUTO"))); - autochroma->set_active (true); - autochroma->set_tooltip_text (M("TP_DIRPYRDENOISE_AUTO_TOOLTIP")); ctboxC = Gtk::manage (new Gtk::HBox ()); Gtk::Label* labmC = Gtk::manage (new Gtk::Label (M("TP_DIRPYRDENOISE_CTYPE") + ":")); @@ -97,10 +89,10 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP ctboxC->set_tooltip_markup (M("TP_DIRPYRDENOISE_CTYPE_TOOLTIP")); Cmethod = Gtk::manage (new MyComboBoxText ()); - Cmethod->append_text (M("TP_DIRPYRDENOISE_MAN")); - Cmethod->append_text (M("TP_DIRPYRDENOISE_AUT")); - Cmethod->append_text (M("TP_DIRPYRDENOISE_PON")); - Cmethod->append_text (M("TP_DIRPYRDENOISE_PRE")); + Cmethod->append (M("TP_DIRPYRDENOISE_MAN")); + Cmethod->append (M("TP_DIRPYRDENOISE_AUT")); + Cmethod->append (M("TP_DIRPYRDENOISE_PON")); + Cmethod->append (M("TP_DIRPYRDENOISE_PRE")); Cmethod->set_active(0); Cmethodconn = Cmethod->signal_changed().connect ( sigc::mem_fun(*this, &DirPyrDenoise::CmethodChanged) ); @@ -110,9 +102,9 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP ctboxC2->set_tooltip_markup (M("TP_DIRPYRDENOISE_C2TYPE_TOOLTIP")); C2method = Gtk::manage (new MyComboBoxText ()); - C2method->append_text (M("TP_DIRPYRDENOISE_MANU")); - C2method->append_text (M("TP_DIRPYRDENOISE_AUTO")); - C2method->append_text (M("TP_DIRPYRDENOISE_PREV")); + C2method->append (M("TP_DIRPYRDENOISE_MANU")); + C2method->append (M("TP_DIRPYRDENOISE_AUTO")); + C2method->append (M("TP_DIRPYRDENOISE_PREV")); C2method->set_active(0); C2methodconn = C2method->signal_changed().connect ( sigc::mem_fun(*this, &DirPyrDenoise::C2methodChanged) ); @@ -136,8 +128,8 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP hb1->set_tooltip_markup (M("TP_DIRPYRDENOISE_METHOD_TOOLTIP")); dmethod = Gtk::manage (new MyComboBoxText ()); - dmethod->append_text (M("TP_DIRPYRDENOISE_LAB")); - dmethod->append_text (M("TP_DIRPYRDENOISE_RGB")); + dmethod->append (M("TP_DIRPYRDENOISE_LAB")); + dmethod->append (M("TP_DIRPYRDENOISE_RGB")); dmethod->set_active(0); hb1->pack_end (*dmethod, Gtk::PACK_EXPAND_WIDGET, 4); pack_start( *hb1, Gtk::PACK_SHRINK, 4); @@ -171,7 +163,6 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP luma->hide(); Ldetail->show(); -// autochroma->show(); NoiseLabels->show(); TileLabels->show(); PrevLabels->show(); @@ -182,53 +173,44 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP gamma->show(); // perform->set_active (true); - enhance = Gtk::manage (new Gtk::CheckButton (M("TP_DIRPYRDENOISE_ENH"))); - enhance->set_active (false); - enhance->set_tooltip_text (M("TP_DIRPYRDENOISE_ENH_TOOLTIP")); // ---- Median FIltering ---- Gtk::Frame* medianFrame = Gtk::manage (new Gtk::Frame ()); - medianFrame->set_border_width(0); medianFrame->set_label_align(0.025, 0.5); Gtk::VBox *medianVBox = Gtk::manage ( new Gtk::VBox()); medianVBox->set_spacing(2); - medianVBox->set_border_width(4); median = Gtk::manage (new Gtk::CheckButton (M("TP_DIRPYRDENOISE_MED") + ":")); median->set_active (true); medianFrame->set_label_widget(*median); - - Gtk::HSeparator *hsep2 = Gtk::manage (new Gtk::HSeparator()); - hsep2->show (); - methodmed = Gtk::manage (new MyComboBoxText ()); - methodmed->append_text (M("TP_DIRPYRDENOISE_LM")); - methodmed->append_text (M("TP_DIRPYRDENOISE_ABM")); - methodmed->append_text (M("TP_DIRPYRDENOISE_LPLABM")); - methodmed->append_text (M("TP_DIRPYRDENOISE_LABM")); - methodmed->append_text (M("TP_DIRPYRDENOISE_RGBM")); + methodmed->append (M("TP_DIRPYRDENOISE_LM")); + methodmed->append (M("TP_DIRPYRDENOISE_ABM")); + methodmed->append (M("TP_DIRPYRDENOISE_LPLABM")); + methodmed->append (M("TP_DIRPYRDENOISE_LABM")); + methodmed->append (M("TP_DIRPYRDENOISE_RGBM")); methodmed->set_active (0); methodmed->set_tooltip_text (M("TP_DIRPYRDENOISE_METM_TOOLTIP")); methodmedconn = methodmed->signal_changed().connect ( sigc::mem_fun(*this, &DirPyrDenoise::methodmedChanged) ); rgbmethod = Gtk::manage (new MyComboBoxText ()); - rgbmethod->append_text (M("TP_DIRPYRDENOISE_3X3_SOFT")); - rgbmethod->append_text (M("TP_DIRPYRDENOISE_3X3")); - rgbmethod->append_text (M("TP_DIRPYRDENOISE_5X5_SOFT")); + rgbmethod->append (M("TP_DIRPYRDENOISE_3X3_SOFT")); + rgbmethod->append (M("TP_DIRPYRDENOISE_3X3")); + rgbmethod->append (M("TP_DIRPYRDENOISE_5X5_SOFT")); rgbmethod->set_active (0); rgbmethod->set_tooltip_text (M("TP_DIRPYRDENOISE_MET_TOOLTIP")); rgbmethodconn = rgbmethod->signal_changed().connect ( sigc::mem_fun(*this, &DirPyrDenoise::rgbmethodChanged) ); medmethod = Gtk::manage (new MyComboBoxText ()); - medmethod->append_text (M("TP_DIRPYRDENOISE_3X3_SOFT")); - medmethod->append_text (M("TP_DIRPYRDENOISE_3X3")); - medmethod->append_text (M("TP_DIRPYRDENOISE_5X5_SOFT")); - medmethod->append_text (M("TP_DIRPYRDENOISE_5X5")); - medmethod->append_text (M("TP_DIRPYRDENOISE_7X7")); - medmethod->append_text (M("TP_DIRPYRDENOISE_9X9")); + medmethod->append (M("TP_DIRPYRDENOISE_3X3_SOFT")); + medmethod->append (M("TP_DIRPYRDENOISE_3X3")); + medmethod->append (M("TP_DIRPYRDENOISE_5X5_SOFT")); + medmethod->append (M("TP_DIRPYRDENOISE_5X5")); + medmethod->append (M("TP_DIRPYRDENOISE_7X7")); + medmethod->append (M("TP_DIRPYRDENOISE_9X9")); medmethod->set_active (0); medmethod->set_tooltip_text (M("TP_DIRPYRDENOISE_MET_TOOLTIP")); medmethodconn = medmethod->signal_changed().connect ( sigc::mem_fun(*this, &DirPyrDenoise::medmethodChanged) ); @@ -254,11 +236,11 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP hb11->set_tooltip_markup (M("TP_DIRPYRDENOISE_METHOD11_TOOLTIP")); smethod = Gtk::manage (new MyComboBoxText ()); - smethod->append_text (M("TP_DIRPYRDENOISE_SHAL")); -// smethod->append_text (M("TP_DIRPYRDENOISE_SHBI")); - smethod->append_text (M("TP_DIRPYRDENOISE_SHALBI")); -// smethod->append_text (M("TP_DIRPYRDENOISE_SHALAL")); -// smethod->append_text (M("TP_DIRPYRDENOISE_SHBIBI")); + smethod->append (M("TP_DIRPYRDENOISE_SHAL")); +// smethod->append (M("TP_DIRPYRDENOISE_SHBI")); + smethod->append (M("TP_DIRPYRDENOISE_SHALBI")); +// smethod->append (M("TP_DIRPYRDENOISE_SHALAL")); +// smethod->append (M("TP_DIRPYRDENOISE_SHBIBI")); smethod->set_active(1); hb11->pack_start (*smethod, Gtk::PACK_EXPAND_WIDGET, 4); pack_start( *hb11, Gtk::PACK_SHRINK, 4); @@ -298,12 +280,10 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP pack_start (*gamma); - //pack_start (*enhance); pack_start (*hsep4); // pack_start( *hb11, Gtk::PACK_SHRINK, 4); -// pack_start (*hsep2); // pack_start (*median); ctboxm->pack_start (*methodmed); @@ -324,8 +304,6 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP // pack_start (*perform); - enhanConn = enhance->signal_toggled().connect( sigc::mem_fun(*this, &DirPyrDenoise::enhanceChanged) ); - autochromaConn = autochroma->signal_toggled().connect( sigc::mem_fun(*this, &DirPyrDenoise::autochromaChanged) ); medianConn = median->signal_toggled().connect( sigc::mem_fun(*this, &DirPyrDenoise::medianChanged) ); ctboxrgb->hide(); @@ -333,23 +311,24 @@ DirPyrDenoise::DirPyrDenoise () : FoldableToolPanel(this, "dirpyrdenoise", M("TP DirPyrDenoise::~DirPyrDenoise () { + idle_register.destroy(); + delete NoiscurveEditorG; delete CCcurveEditorG; +} -} -int chromaChangedUI (void* data) -{ - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected - (static_cast(data))->chromaComputed_ (); - return 0; -} void DirPyrDenoise::chromaChanged (double autchroma, double autred, double autblue) { nextchroma = autchroma; -// printf("CHROM=%f\n",nextchroma); nextred = autred; nextblue = autblue; - g_idle_add (chromaChangedUI, this); + + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->chromaComputed_(); + return false; + }; + + idle_register.add(func, this); } bool DirPyrDenoise::chromaComputed_ () @@ -363,13 +342,6 @@ bool DirPyrDenoise::chromaComputed_ () updateNoiseLabel (); return false; } -int TilePrevChangedUI (void* data) -{ - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected - (static_cast(data))->TilePrevComputed_ (); - return 0; -} - void DirPyrDenoise::noiseTilePrev (int tileX, int tileY, int prevX, int prevY, int sizeT, int sizeP) { @@ -380,10 +352,14 @@ void DirPyrDenoise::noiseTilePrev (int tileX, int tileY, int prevX, int prevY, i nextsizeT = sizeT; nextsizeP = sizeP; - g_idle_add (TilePrevChangedUI, this); - + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->TilePrevComputed_(); + return false; + }; + idle_register.add(func, this); } + bool DirPyrDenoise::TilePrevComputed_ () { @@ -393,6 +369,7 @@ bool DirPyrDenoise::TilePrevComputed_ () updatePrevLabel (); return false; } + void DirPyrDenoise::updateTileLabel () { if (!batchMode) { @@ -430,20 +407,17 @@ void DirPyrDenoise::updatePrevLabel () } } - -int noiseChangedUI (void* data) -{ - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected - (static_cast(data))->noiseComputed_ (); - return 0; -} - - void DirPyrDenoise::noiseChanged (double nresid, double highresid) { nextnresid = nresid; nexthighresid = highresid; - g_idle_add (noiseChangedUI, this); + + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->noiseComputed_(); + return false; + }; + + idle_register.add(func, this); } bool DirPyrDenoise::noiseComputed_ () @@ -485,13 +459,11 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) Cmethodconn.block(true); C2methodconn.block(true); smethodconn.block(true); - autochromaConn.block(true); medmethodconn.block(true); rgbmethodconn.block(true); methodmedconn.block(true); - autochromaChanged (); dmethod->set_active (0); if (pp->dirpyrDenoise.dmethod == "Lab") { @@ -651,7 +623,6 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) gamma->setEditedState (pedited->dirpyrDenoise.gamma ? Edited : UnEdited); passes->setEditedState (pedited->dirpyrDenoise.passes ? Edited : UnEdited); set_inconsistent (multiImage && !pedited->dirpyrDenoise.enabled); - enhance->set_inconsistent (!pedited->dirpyrDenoise.enhance); median->set_inconsistent (!pedited->dirpyrDenoise.median); ccshape->setUnChanged (!pedited->dirpyrDenoise.cccurve); @@ -660,15 +631,11 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) // perfconn.block (true); setEnabled(pp->dirpyrDenoise.enabled); - enhance->set_active (pp->dirpyrDenoise.enhance); // perform->set_active (pp->dirpyrDenoise.perform); median->set_active (pp->dirpyrDenoise.median); - autochroma->set_active (pp->dirpyrDenoise.autochroma); // perfconn.block (false); lastmedian = pp->dirpyrDenoise.median; - lastautochroma = pp->dirpyrDenoise.autochroma; - lastenhance = pp->dirpyrDenoise.enhance; // lastperform = pp->dirpyrDenoise.perform; luma->setValue (pp->dirpyrDenoise.luma); Ldetail->setValue (pp->dirpyrDenoise.Ldetail); @@ -681,7 +648,6 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) lshape->setCurve (pp->dirpyrDenoise.lcurve); ccshape->setCurve (pp->dirpyrDenoise.cccurve); - autochromaConn.block(false); dmethodconn.block(false); Lmethodconn.block(false); @@ -718,10 +684,8 @@ void DirPyrDenoise::write (ProcParams* pp, ParamsEdited* pedited) pp->dirpyrDenoise.gamma = gamma->getValue (); pp->dirpyrDenoise.passes = passes->getValue (); pp->dirpyrDenoise.enabled = getEnabled(); - pp->dirpyrDenoise.enhance = enhance->get_active(); // pp->dirpyrDenoise.perform = perform->get_active(); pp->dirpyrDenoise.median = median->get_active(); - pp->dirpyrDenoise.autochroma = autochroma->get_active(); pp->dirpyrDenoise.lcurve = lshape->getCurve (); pp->dirpyrDenoise.cccurve = ccshape->getCurve (); @@ -742,9 +706,7 @@ void DirPyrDenoise::write (ProcParams* pp, ParamsEdited* pedited) pedited->dirpyrDenoise.gamma = gamma->getEditedState (); pedited->dirpyrDenoise.passes = passes->getEditedState (); pedited->dirpyrDenoise.enabled = !get_inconsistent(); - pedited->dirpyrDenoise.enhance = !enhance->get_inconsistent(); pedited->dirpyrDenoise.median = !median->get_inconsistent(); - pedited->dirpyrDenoise.autochroma = !autochroma->get_inconsistent(); pedited->dirpyrDenoise.lcurve = !lshape->isUnChanged (); pedited->dirpyrDenoise.cccurve = !ccshape->isUnChanged (); @@ -1096,32 +1058,6 @@ void DirPyrDenoise::enabledChanged () } } -void DirPyrDenoise::enhanceChanged () -{ - - if (batchMode) { - if (enhance->get_inconsistent()) { - enhance->set_inconsistent (false); - enhanConn.block (true); - enhance->set_active (false); - enhanConn.block (false); - } else if (lastenhance) { - enhance->set_inconsistent (true); - } - - lastenhance = enhance->get_active (); - } - - if (listener) { - - if (enhance->get_active ()) { - listener->panelChanged (EvDPDNenhance, M("GENERAL_ENABLED")); - } else { - listener->panelChanged (EvDPDNenhance, M("GENERAL_DISABLED")); - } - } -} - void DirPyrDenoise::medianChanged () { @@ -1148,49 +1084,6 @@ void DirPyrDenoise::medianChanged () } } -void DirPyrDenoise::autochromaChanged () -{ -// printf("Autochroma\n"); - if (batchMode) { - if (autochroma->get_inconsistent()) { - autochroma->set_inconsistent (false); - autochromaConn.block (true); - autochroma->set_active (false); - autochromaConn.block (false); - } else if (lastautochroma) { - autochroma->set_inconsistent (true); - } - - lastautochroma = autochroma->get_active (); - } - - if (autochroma->get_active ()) { - chroma->set_sensitive(false); - redchro->set_sensitive(false); - bluechro->set_sensitive(false); - } else { - chroma->set_sensitive(true); - redchro->set_sensitive(true); - bluechro->set_sensitive(true); - } - - if (listener) { - if (autochroma->get_active ()) { - listener->panelChanged (EvDPDNautochroma, M("GENERAL_ENABLED")); - // chroma->set_sensitive(false); - // redchro->set_sensitive(false); - // bluechro->set_sensitive(false); - } else { - listener->panelChanged (EvDPDNautochroma, M("GENERAL_DISABLED")); - //chroma->set_sensitive(true); - //redchro->set_sensitive(true); - //bluechro->set_sensitive(true); - } - - - } -} - /* void DirPyrDenoise::perform_toggled () { @@ -1231,14 +1124,14 @@ void DirPyrDenoise::setBatchMode (bool batchMode) NoiscurveEditorG->setBatchMode (batchMode); CCcurveEditorG->setBatchMode (batchMode); - dmethod->append_text (M("GENERAL_UNCHANGED")); - Lmethod->append_text (M("GENERAL_UNCHANGED")); - Cmethod->append_text (M("GENERAL_UNCHANGED")); - C2method->append_text (M("GENERAL_UNCHANGED")); - smethod->append_text (M("GENERAL_UNCHANGED")); - medmethod->append_text (M("GENERAL_UNCHANGED")); - methodmed->append_text (M("GENERAL_UNCHANGED")); - rgbmethod->append_text (M("GENERAL_UNCHANGED")); + dmethod->append (M("GENERAL_UNCHANGED")); + Lmethod->append (M("GENERAL_UNCHANGED")); + Cmethod->append (M("GENERAL_UNCHANGED")); + C2method->append (M("GENERAL_UNCHANGED")); + smethod->append (M("GENERAL_UNCHANGED")); + medmethod->append (M("GENERAL_UNCHANGED")); + methodmed->append (M("GENERAL_UNCHANGED")); + rgbmethod->append (M("GENERAL_UNCHANGED")); } @@ -1257,7 +1150,7 @@ void DirPyrDenoise::setAdjusterBehavior (bool lumaadd, bool lumdetadd, bool chro void DirPyrDenoise::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (elemType == ColorCaller::CCET_VERTICAL_BAR) { valY = 0.5; diff --git a/rtgui/dirpyrdenoise.h b/rtgui/dirpyrdenoise.h index e81bf263e..cc9a2b5bd 100644 --- a/rtgui/dirpyrdenoise.h +++ b/rtgui/dirpyrdenoise.h @@ -28,10 +28,56 @@ #include "guiutils.h" #include "options.h" -class DirPyrDenoise : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel, public rtengine::AutoChromaListener, public CurveListener, public ColorProvider +class DirPyrDenoise final : + public ToolParamBlock, + public AdjusterListener, + public FoldableToolPanel, + public rtengine::AutoChromaListener, + public CurveListener, + public ColorProvider { +public: + DirPyrDenoise (); + ~DirPyrDenoise (); -protected: + void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); + void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); + void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); + void setBatchMode (bool batchMode); + void curveChanged (CurveEditor* ce); + void setEditProvider (EditDataProvider *provider); + void autoOpenCurve (); + + void adjusterChanged (Adjuster* a, double newval); + void enabledChanged (); + void medianChanged (); + void chromaChanged (double autchroma, double autred, double autblue); + bool chromaComputed_ (); + void noiseChanged (double nresid, double highresid); + bool noiseComputed_ (); + void noiseTilePrev (int tileX, int tileY, int prevX, int prevY, int sizeT, int sizeP); + bool TilePrevComputed_ (); + +// void perform_toggled (); + void updateNoiseLabel (); + void LmethodChanged (); + void CmethodChanged (); + void C2methodChanged (); + void updateTileLabel (); + void updatePrevLabel (); + + void dmethodChanged (); + void medmethodChanged (); + void methodmedChanged (); + void rgbmethodChanged (); + void smethodChanged (); + virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller); + + void setAdjusterBehavior (bool lumaadd, bool lumdetadd, bool chromaadd, bool chromaredadd, bool chromablueadd, bool gammaadd, bool passesadd); + void trimValues (rtengine::procparams::ProcParams* pp); + Glib::ustring getSettingString (); + +private: CurveEditorGroup* NoiscurveEditorG; CurveEditorGroup* CCcurveEditorG; Adjuster* luma; @@ -44,13 +90,9 @@ protected: FlatCurveEditor* lshape; FlatCurveEditor* ccshape; - Gtk::CheckButton* enhance; - bool lastenhance; - sigc::connection enhanConn, medianConn, autochromaConn; + sigc::connection medianConn; Gtk::CheckButton* median; bool lastmedian; - Gtk::CheckButton* autochroma; - bool lastautochroma; Gtk::Label* NoiseLabels; Gtk::Label* TileLabels; Gtk::Label* PrevLabels; @@ -92,50 +134,7 @@ protected: int nextsizeT; int nextsizeP; -public: - - DirPyrDenoise (); - ~DirPyrDenoise (); - - void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); - void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); - void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); - void setBatchMode (bool batchMode); - void curveChanged (CurveEditor* ce); - void setEditProvider (EditDataProvider *provider); - void autoOpenCurve (); - - void adjusterChanged (Adjuster* a, double newval); - void enabledChanged (); - void enhanceChanged (); - void medianChanged (); - void autochromaChanged (); - void chromaChanged (double autchroma, double autred, double autblue); - bool chromaComputed_ (); - void noiseChanged (double nresid, double highresid); - bool noiseComputed_ (); - void noiseTilePrev (int tileX, int tileY, int prevX, int prevY, int sizeT, int sizeP); - bool TilePrevComputed_ (); - -// void perform_toggled (); - void updateNoiseLabel (); - void LmethodChanged (); - void CmethodChanged (); - void C2methodChanged (); - void updateTileLabel (); - void updatePrevLabel (); - - void dmethodChanged (); - void medmethodChanged (); - void methodmedChanged (); - void rgbmethodChanged (); - void smethodChanged (); - virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller); - - void setAdjusterBehavior (bool lumaadd, bool lumdetadd, bool chromaadd, bool chromaredadd, bool chromablueadd, bool gammaadd, bool passesadd); - void trimValues (rtengine::procparams::ProcParams* pp); - Glib::ustring getSettingString (); - + IdleRegister idle_register; }; #endif diff --git a/rtgui/dirpyrequalizer.cc b/rtgui/dirpyrequalizer.cc index 262f0f448..69d3af198 100644 --- a/rtgui/dirpyrequalizer.cc +++ b/rtgui/dirpyrequalizer.cc @@ -60,8 +60,8 @@ DirPyrEqualizer::DirPyrEqualizer () : FoldableToolPanel(this, "dirpyrequalizer", cdbox->pack_start (*labmcd, Gtk::PACK_SHRINK, 1); cbdlMethod = Gtk::manage (new MyComboBoxText ()); - cbdlMethod->append_text (M("TP_CBDL_BEF")); - cbdlMethod->append_text (M("TP_CBDL_AFT")); + cbdlMethod->append (M("TP_CBDL_BEF")); + cbdlMethod->append (M("TP_CBDL_AFT")); cbdlMethod->set_active(0); cbdlMethodConn = cbdlMethod->signal_changed().connect ( sigc::mem_fun(*this, &DirPyrEqualizer::cbdlMethodChanged) ); cbdlMethod->set_tooltip_markup (M("TP_CBDL_METHOD_TOOLTIP")); @@ -115,7 +115,6 @@ DirPyrEqualizer::DirPyrEqualizer () : FoldableToolPanel(this, "dirpyrequalizer", pack_start(*separator4, Gtk::PACK_SHRINK, 2); /* algoHBox = Gtk::manage (new Gtk::HBox ()); - algoHBox->set_border_width (0); algoHBox->set_spacing (2); algoHBox->set_tooltip_markup (M("TP_DIRPYREQUALIZER_ALGO_TOOLTIP")); */ @@ -123,8 +122,8 @@ DirPyrEqualizer::DirPyrEqualizer () : FoldableToolPanel(this, "dirpyrequalizer", // algoHBox->pack_start (*alLabel, Gtk::PACK_SHRINK); /* algo = Gtk::manage (new MyComboBoxText ()); - algo->append_text (M("TP_DIRPYREQUALIZER_ALGO_FI")); - algo->append_text (M("TP_DIRPYREQUALIZER_ALGO_LA")); + algo->append (M("TP_DIRPYREQUALIZER_ALGO_FI")); + algo->append (M("TP_DIRPYREQUALIZER_ALGO_LA")); algo->set_active (1); // algoHBox->pack_start (*algo); // pack_start(*algoHBox); @@ -317,7 +316,7 @@ void DirPyrEqualizer::setBatchMode (bool batchMode) threshold->showEditedCB(); skinprotect->showEditedCB(); hueskin->showEditedCB (); -// algo->append_text (M("GENERAL_UNCHANGED")); +// algo->append (M("GENERAL_UNCHANGED")); } void DirPyrEqualizer::cbdlMethodChanged() diff --git a/rtgui/distortion.cc b/rtgui/distortion.cc index 91ad00ae9..1fadec9d9 100644 --- a/rtgui/distortion.cc +++ b/rtgui/distortion.cc @@ -27,8 +27,9 @@ Distortion::Distortion (): FoldableToolPanel(this, "distortion", M("TP_DISTORTIO { rlistener = nullptr; - autoDistor = Gtk::manage (new Gtk::Button (M("TP_DISTORTION_AUTO"))); + autoDistor = Gtk::manage (new Gtk::Button (M("GENERAL_AUTO"))); autoDistor->set_image (*Gtk::manage (new RTImage ("distortion-auto.png"))); + autoDistor->set_alignment(0.5f, 0.5f); autoDistor->set_tooltip_text (M("TP_DISTORTION_AUTO_TIP")); idConn = autoDistor->signal_pressed().connect( sigc::mem_fun(*this, &Distortion::idPressed) ); autoDistor->show(); diff --git a/rtgui/dynamicprofilepanel.cc b/rtgui/dynamicprofilepanel.cc new file mode 100644 index 000000000..db3a19ed0 --- /dev/null +++ b/rtgui/dynamicprofilepanel.cc @@ -0,0 +1,558 @@ +/* -*- C++ -*- + * This file is part of RawTherapee. + * + * Copyright (c) 2017 Alberto Griggio + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#include "dynamicprofilepanel.h" +#include "multilangmgr.h" +#include "../rtengine/profilestore.h" +#include "../rtengine/rtengine.h" +#include "../rtengine/dynamicprofile.h" +#include +#include + + +//----------------------------------------------------------------------------- +// DynamicProfilePanel::EditDialog +//----------------------------------------------------------------------------- + +DynamicProfilePanel::EditDialog::EditDialog (const Glib::ustring &title, Gtk::Window &parent): + Gtk::Dialog (title, parent) +{ + profilepath_ = Gtk::manage (new ProfileStoreComboBox()); + Gtk::HBox *hb = Gtk::manage (new Gtk::HBox()); + hb->pack_start (*Gtk::manage (new Gtk::Label (M ("DYNPROFILEEDITOR_PROFILE"))), false, false, 4); + hb->pack_start (*profilepath_, true, true, 2); + get_content_area()->pack_start (*hb, Gtk::PACK_SHRINK, 4); + + add_optional (M ("EXIFFILTER_CAMERA"), has_camera_, camera_); + add_optional (M ("EXIFFILTER_LENS"), has_lens_, lens_); + + add_range (M ("EXIFFILTER_ISO"), iso_min_, iso_max_); + add_range (M ("EXIFFILTER_APERTURE"), fnumber_min_, fnumber_max_); + add_range (M ("EXIFFILTER_FOCALLEN"), focallen_min_, focallen_max_); + add_range (M ("EXIFFILTER_SHUTTER"), shutterspeed_min_, shutterspeed_max_); + add_range (M ("EXIFFILTER_EXPOSURECOMPENSATION"), expcomp_min_, expcomp_max_); + + add_button (M ("GENERAL_OK"), 1); + add_button (M ("GENERAL_CANCEL"), 2); + + set_ranges(); + + show_all_children(); +} + + +void DynamicProfilePanel::EditDialog::set_rule ( + const DynamicProfileRule &rule) +{ + iso_min_->set_value (rule.iso.min); + iso_max_->set_value (rule.iso.max); + + fnumber_min_->set_value (rule.fnumber.min); + fnumber_max_->set_value (rule.fnumber.max); + + focallen_min_->set_value (rule.focallen.min); + focallen_max_->set_value (rule.focallen.max); + + shutterspeed_min_->set_value (rule.shutterspeed.min); + shutterspeed_max_->set_value (rule.shutterspeed.max); + + expcomp_min_->set_value (rule.expcomp.min); + expcomp_max_->set_value (rule.expcomp.max); + + has_camera_->set_active (rule.camera.enabled); + camera_->set_text (rule.camera.value); + + has_lens_->set_active (rule.lens.enabled); + lens_->set_text (rule.lens.value); + + profilepath_->updateProfileList(); + + if (!profilepath_->setActiveRowFromFullPath (rule.profilepath)) { + profilepath_->setInternalEntry(); + } +} + +DynamicProfileRule DynamicProfilePanel::EditDialog::get_rule() +{ + DynamicProfileRule ret; + ret.iso.min = iso_min_->get_value_as_int(); + ret.iso.max = iso_max_->get_value_as_int(); + + ret.fnumber.min = fnumber_min_->get_value(); + ret.fnumber.max = fnumber_max_->get_value(); + + ret.focallen.min = focallen_min_->get_value(); + ret.focallen.max = focallen_max_->get_value(); + + ret.shutterspeed.min = shutterspeed_min_->get_value(); + ret.shutterspeed.max = shutterspeed_max_->get_value(); + + ret.expcomp.min = expcomp_min_->get_value(); + ret.expcomp.max = expcomp_max_->get_value(); + + ret.camera.enabled = has_camera_->get_active(); + ret.camera.value = camera_->get_text(); + + ret.lens.enabled = has_lens_->get_active(); + ret.lens.value = lens_->get_text(); + + ret.profilepath = profilepath_->getFullPathFromActiveRow(); + + return ret; +} + +void DynamicProfilePanel::EditDialog::set_ranges() +{ + DynamicProfileRule default_rule; + iso_min_->set_digits (0); + iso_max_->set_digits (0); + iso_min_->set_increments (1, 10); + iso_max_->set_increments (1, 10); + iso_min_->set_range (default_rule.iso.min, default_rule.iso.max); + iso_max_->set_range (default_rule.iso.min, default_rule.iso.max); + iso_min_->set_value (default_rule.iso.min); + iso_max_->set_value (default_rule.iso.max); + +#define DOIT_(name) \ + name ## _min_->set_digits(1); \ + name ## _max_->set_digits(1); \ + name ## _min_->set_increments(0.1, 1); \ + name ## _max_->set_increments(0.1, 1); \ + name ## _min_->set_range(default_rule. name .min, \ + default_rule. name .max); \ + name ## _max_->set_range(default_rule. name .min, \ + default_rule. name .max); \ + name ## _min_->set_value(default_rule. name .min); \ + name ## _max_->set_value(default_rule. name .max) + + DOIT_ (fnumber); + DOIT_ (focallen); + DOIT_ (shutterspeed); + DOIT_ (expcomp); +#undef DOIT_ + shutterspeed_min_->set_digits (4); + shutterspeed_max_->set_digits (4); + + profilepath_->setInternalEntry(); +} + + +void DynamicProfilePanel::EditDialog::add_range (const Glib::ustring &name, + Gtk::SpinButton *&from, Gtk::SpinButton *&to) +{ + Gtk::HBox *hb = Gtk::manage (new Gtk::HBox()); + hb->pack_start (*Gtk::manage (new Gtk::Label (name)), false, false, 4); + from = Gtk::manage (new Gtk::SpinButton()); + to = Gtk::manage (new Gtk::SpinButton()); + from->set_numeric (true); + to->set_numeric (true); + hb->pack_start (*from, true, true, 2); + hb->pack_start (*Gtk::manage (new Gtk::Label (" - ")), false, false, 4); + hb->pack_start (*to, true, true, 2); + get_content_area()->pack_start (*hb, Gtk::PACK_SHRINK, 4); +} + +void DynamicProfilePanel::EditDialog::add_optional (const Glib::ustring &name, Gtk::CheckButton *&check, Gtk::Entry *&field) +{ + check = Gtk::manage (new Gtk::CheckButton (name)); + Gtk::HBox *hb = Gtk::manage (new Gtk::HBox()); + hb->pack_start (*check, Gtk::PACK_SHRINK, 4); + field = Gtk::manage (new Gtk::Entry()); + hb->pack_start (*field, true, true, 2); + get_content_area()->pack_start (*hb, Gtk::PACK_SHRINK, 4); + field->set_tooltip_text (M ("DYNPROFILEEDITOR_ENTRY_TOOLTIP")); +} + + +//----------------------------------------------------------------------------- +// DynamicProfilePanel +//----------------------------------------------------------------------------- + +DynamicProfilePanel::DynamicProfilePanel(): + vbox_ (Gtk::ORIENTATION_VERTICAL), + button_up_ (M ("DYNPROFILEEDITOR_MOVE_UP")), + button_down_ (M ("DYNPROFILEEDITOR_MOVE_DOWN")), + button_new_ (M ("DYNPROFILEEDITOR_NEW")), + button_edit_ (M ("DYNPROFILEEDITOR_EDIT")), + button_delete_ (M ("DYNPROFILEEDITOR_DELETE")) +{ + add (vbox_); + + treeview_.set_grid_lines (Gtk::TREE_VIEW_GRID_LINES_VERTICAL); + scrolledwindow_.add (treeview_); + + scrolledwindow_.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); + + vbox_.pack_start (scrolledwindow_); + vbox_.pack_start (buttonbox_, Gtk::PACK_SHRINK); + + buttonbox_.pack_start (button_new_, Gtk::PACK_SHRINK); + buttonbox_.pack_start (button_edit_, Gtk::PACK_SHRINK); + buttonbox_.pack_start (button_delete_, Gtk::PACK_SHRINK); + buttonbox_.pack_start (button_up_, Gtk::PACK_SHRINK); + buttonbox_.pack_start (button_down_, Gtk::PACK_SHRINK); + buttonbox_.set_border_width (5); + buttonbox_.set_layout (Gtk::BUTTONBOX_END); + button_up_.signal_clicked().connect ( + sigc::mem_fun (*this, &DynamicProfilePanel::on_button_up)); + button_down_.signal_clicked().connect ( + sigc::mem_fun (*this, &DynamicProfilePanel::on_button_down)); + button_new_.signal_clicked().connect ( + sigc::mem_fun (*this, &DynamicProfilePanel::on_button_new)); + button_edit_.signal_clicked().connect ( + sigc::mem_fun (*this, &DynamicProfilePanel::on_button_edit)); + button_delete_.signal_clicked().connect ( + sigc::mem_fun (*this, &DynamicProfilePanel::on_button_delete)); + + treemodel_ = Gtk::ListStore::create (columns_); + treeview_.set_model (treemodel_); + + auto cell = Gtk::manage (new Gtk::CellRendererText()); + int cols_count = treeview_.append_column ( M ("DYNPROFILEEDITOR_PROFILE"), *cell); + auto col = treeview_.get_column (cols_count - 1); + + if (col) { + col->set_cell_data_func ( + *cell, sigc::mem_fun ( + *this, &DynamicProfilePanel::render_profilepath)); + } + + cell = Gtk::manage (new Gtk::CellRendererText()); + cols_count = treeview_.append_column ( + M ("EXIFFILTER_CAMERA"), *cell); + col = treeview_.get_column (cols_count - 1); + + if (col) { + col->set_cell_data_func ( + *cell, sigc::mem_fun ( + *this, &DynamicProfilePanel::render_camera)); + } + + cell = Gtk::manage (new Gtk::CellRendererText()); + cols_count = treeview_.append_column (M ("EXIFFILTER_LENS"), *cell); + col = treeview_.get_column (cols_count - 1); + + if (col) { + col->set_cell_data_func ( + *cell, sigc::mem_fun ( + *this, &DynamicProfilePanel::render_lens)); + } + + cell = Gtk::manage (new Gtk::CellRendererText()); + cols_count = treeview_.append_column (M ("EXIFFILTER_ISO"), *cell); + col = treeview_.get_column (cols_count - 1); + + if (col) { + col->set_cell_data_func ( + *cell, sigc::mem_fun ( + *this, &DynamicProfilePanel::render_iso)); + } + + cell = Gtk::manage (new Gtk::CellRendererText()); + cols_count = treeview_.append_column (M ("EXIFFILTER_APERTURE"), *cell); + col = treeview_.get_column (cols_count - 1); + + if (col) { + col->set_cell_data_func ( + *cell, sigc::mem_fun ( + *this, &DynamicProfilePanel::render_fnumber)); + } + + cell = Gtk::manage (new Gtk::CellRendererText()); + cols_count = treeview_.append_column (M ("EXIFFILTER_FOCALLEN"), *cell); + col = treeview_.get_column (cols_count - 1); + + if (col) { + col->set_cell_data_func ( + *cell, sigc::mem_fun ( + *this, &DynamicProfilePanel::render_focallen)); + } + + cell = Gtk::manage (new Gtk::CellRendererText()); + cols_count = treeview_.append_column (M ("EXIFFILTER_SHUTTER"), *cell); + col = treeview_.get_column (cols_count - 1); + + if (col) { + col->set_cell_data_func ( + *cell, sigc::mem_fun ( + *this, &DynamicProfilePanel::render_shutterspeed)); + } + + cell = Gtk::manage (new Gtk::CellRendererText()); + cols_count = treeview_.append_column ( + M ("EXIFFILTER_EXPOSURECOMPENSATION"), *cell); + col = treeview_.get_column (cols_count - 1); + + if (col) { + col->set_cell_data_func ( + *cell, sigc::mem_fun ( + *this, &DynamicProfilePanel::render_expcomp)); + } + + show_all_children(); + + for (auto &r : ProfileStore::getInstance()->getRules()) { + add_rule (r); + } +} + + +void DynamicProfilePanel::update_rule (Gtk::TreeModel::Row row, + const DynamicProfileRule &rule) +{ + row[columns_.iso] = rule.iso; + row[columns_.fnumber] = rule.fnumber; + row[columns_.focallen] = rule.focallen; + row[columns_.shutterspeed] = rule.shutterspeed; + row[columns_.expcomp] = rule.expcomp; + row[columns_.camera] = rule.camera; + row[columns_.lens] = rule.lens; + row[columns_.profilepath] = rule.profilepath; +} + +void DynamicProfilePanel::add_rule (const DynamicProfileRule &rule) +{ + auto row = * (treemodel_->append()); + update_rule (row, rule); +} + + +DynamicProfileRule DynamicProfilePanel::to_rule (Gtk::TreeModel::Row row, + int serial) +{ + DynamicProfileRule ret; + ret.serial_number = serial; + ret.iso = row[columns_.iso]; + ret.fnumber = row[columns_.fnumber]; + ret.focallen = row[columns_.focallen]; + ret.shutterspeed = row[columns_.shutterspeed]; + ret.expcomp = row[columns_.expcomp]; + ret.camera = row[columns_.camera]; + ret.lens = row[columns_.lens]; + ret.profilepath = row[columns_.profilepath]; + return ret; +} + + +void DynamicProfilePanel::render_profilepath ( + Gtk::CellRenderer *cell, const Gtk::TreeModel::iterator &iter) +{ + auto row = *iter; + Gtk::CellRendererText *ct = static_cast (cell); + auto value = row[columns_.profilepath]; + auto pse = ProfileStore::getInstance()->findEntryFromFullPath (value); + + if (pse != nullptr) { + ct->property_text() = pse->label; + } else { + ct->property_text() = value; + } +} + + +#define RENDER_RANGE_(tp, name, tostr) \ + auto row = *iter; \ + Gtk::CellRendererText *ct = static_cast(cell); \ + DynamicProfileRule::Range r = row[columns_. name]; \ + DynamicProfileRule dflt; \ + if (r.min > dflt.name.min || r.max < dflt.name.max) { \ + auto value = tostr(r.min) + " - " + tostr(r.max); \ + ct->property_text() = value; \ + } else { \ + ct->property_text() = ""; \ + } + + +namespace +{ + +template +Glib::ustring to_str (V n, int precision = 1) +{ + std::ostringstream buf; + buf << std::setprecision (precision) << std::fixed << n; + return buf.str(); +} + +} // namespace + +void DynamicProfilePanel::render_iso ( + Gtk::CellRenderer *cell, const Gtk::TreeModel::iterator &iter) +{ + RENDER_RANGE_ (int, iso, to_str); +} + + +void DynamicProfilePanel::render_fnumber ( + Gtk::CellRenderer *cell, const Gtk::TreeModel::iterator &iter) +{ + RENDER_RANGE_ (double, fnumber, + [] (double f) { + return std::string ("f/") + + rtengine::ImageMetaData::apertureToString (f); + }); +} + + +void DynamicProfilePanel::render_focallen ( + Gtk::CellRenderer *cell, const Gtk::TreeModel::iterator &iter) +{ + RENDER_RANGE_ (double, focallen, to_str); +} + + +void DynamicProfilePanel::render_shutterspeed ( + Gtk::CellRenderer *cell, const Gtk::TreeModel::iterator &iter) +{ + RENDER_RANGE_ (double, shutterspeed, + rtengine::ImageMetaData::shutterToString); +} + + +void DynamicProfilePanel::render_expcomp ( + Gtk::CellRenderer *cell, const Gtk::TreeModel::iterator &iter) +{ + RENDER_RANGE_ (double, expcomp, to_str); +} + +#undef RENDER_RANGE_ + +#define RENDER_OPTIONAL_(name) \ + auto row = *iter; \ + Gtk::CellRendererText *ct = static_cast(cell); \ + DynamicProfileRule::Optional o = row[columns_. name]; \ + if (o.enabled) { \ + ct->property_text() = o.value; \ + } else { \ + ct->property_text() = ""; \ + } + +void DynamicProfilePanel::render_camera ( + Gtk::CellRenderer *cell, const Gtk::TreeModel::iterator &iter) +{ + RENDER_OPTIONAL_ (camera); +} + + +void DynamicProfilePanel::render_lens ( + Gtk::CellRenderer *cell, const Gtk::TreeModel::iterator &iter) +{ + RENDER_OPTIONAL_ (lens); +} + +#undef RENDER_OPTIONAL_ + +void DynamicProfilePanel::on_button_up() +{ + auto s = treeview_.get_selection(); + + if (!s->count_selected_rows()) { + return; + } + + auto it = s->get_selected(); + + if (it != treemodel_->children().begin()) { + auto it2 = it; + --it2; + treemodel_->iter_swap (it, it2); + } +} + +void DynamicProfilePanel::on_button_down() +{ + auto s = treeview_.get_selection(); + + if (!s->count_selected_rows()) { + return; + } + + auto it = s->get_selected(); + auto it2 = it; + ++it2; + + if (it2 != treemodel_->children().end()) { + treemodel_->iter_swap (it, it2); + } +} + + +void DynamicProfilePanel::on_button_delete() +{ + auto s = treeview_.get_selection(); + + if (!s->count_selected_rows()) { + return; + } + + auto it = s->get_selected(); + treemodel_->erase (it); +} + + +void DynamicProfilePanel::on_button_new() +{ + EditDialog d (M ("DYNPROFILEEDITOR_NEW_RULE"), + static_cast (*get_toplevel())); + int status = d.run(); + + if (status == 1) { + DynamicProfileRule rule = d.get_rule(); + add_rule (rule); + } +} + + +void DynamicProfilePanel::on_button_edit() +{ + auto s = treeview_.get_selection(); + + if (!s->count_selected_rows()) { + return; + } + + EditDialog d (M ("DYNPROFILEEDITOR_EDIT_RULE"), + static_cast (*get_toplevel())); + Gtk::TreeModel::Row row = * (s->get_selected()); + d.set_rule (to_rule (row)); + int status = d.run(); + + if (status == 1) { + update_rule (row, d.get_rule()); + } +} + + +void DynamicProfilePanel::save() +{ + std::vector rules; + int serial = 1; + + for (auto row : treemodel_->children()) { + rules.emplace_back (to_rule (row, serial++)); + } + + ProfileStore::getInstance()->setRules (rules); + + if (!ProfileStore::getInstance()->storeRules()) { + printf ("Error in saving dynamic profile rules\n"); + } else if (options.rtSettings.verbose) { + printf ("Saved %d dynamic profile rules\n", int (rules.size())); + } +} diff --git a/rtgui/dynamicprofilepanel.h b/rtgui/dynamicprofilepanel.h new file mode 100644 index 000000000..dca62f1e6 --- /dev/null +++ b/rtgui/dynamicprofilepanel.h @@ -0,0 +1,132 @@ +/* -*- C++ -*- + * This file is part of RawTherapee. + * + * Copyright (c) 2017 Alberto Griggio + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ +#ifndef _DYNAMICPROFILEPANEL_H_ +#define _DYNAMICPROFILEPANEL_H_ + +#include +#include "../rtengine/dynamicprofile.h" +#include "profilestorecombobox.h" + +class DynamicProfilePanel: public Gtk::VBox +{ +public: + DynamicProfilePanel(); + void save(); + +private: + void update_rule (Gtk::TreeModel::Row row, const DynamicProfileRule &rule); + void add_rule (const DynamicProfileRule &rule); + DynamicProfileRule to_rule (Gtk::TreeModel::Row row, int serial = 0); + + void on_button_quit(); + void on_button_up(); + void on_button_down(); + void on_button_new(); + void on_button_edit(); + void on_button_delete(); + + class DynamicProfileColumns: public Gtk::TreeModel::ColumnRecord + { + public: + DynamicProfileColumns() + { + add (iso); + add (fnumber); + add (focallen); + add (shutterspeed); + add (expcomp); + add (camera); + add (lens); + add (profilepath); + } + + Gtk::TreeModelColumn> iso; + Gtk::TreeModelColumn> fnumber; + Gtk::TreeModelColumn> focallen; + Gtk::TreeModelColumn> shutterspeed; + Gtk::TreeModelColumn> expcomp; + Gtk::TreeModelColumn camera; + Gtk::TreeModelColumn lens; + Gtk::TreeModelColumn profilepath; + }; + + // cell renderers + void render_iso (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter); + void render_fnumber (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter); + void render_focallen (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter); + void render_shutterspeed (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter); + void render_expcomp (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter); + void render_camera (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter); + void render_lens (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter); + void render_profilepath (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter); + + class EditDialog: public Gtk::Dialog + { + public: + EditDialog (const Glib::ustring &title, Gtk::Window &parent); + void set_rule (const DynamicProfileRule &rule); + DynamicProfileRule get_rule(); + + private: + void set_ranges(); + void add_range (const Glib::ustring &name, Gtk::SpinButton *&from, Gtk::SpinButton *&to); + void add_optional (const Glib::ustring &name, Gtk::CheckButton *&check, Gtk::Entry *&field); + + Gtk::SpinButton *iso_min_; + Gtk::SpinButton *iso_max_; + + Gtk::SpinButton *fnumber_min_; + Gtk::SpinButton *fnumber_max_; + + Gtk::SpinButton *focallen_min_; + Gtk::SpinButton *focallen_max_; + + Gtk::SpinButton *shutterspeed_min_; + Gtk::SpinButton *shutterspeed_max_; + + Gtk::SpinButton *expcomp_min_; + Gtk::SpinButton *expcomp_max_; + + Gtk::CheckButton *has_camera_; + Gtk::Entry *camera_; + + Gtk::CheckButton *has_lens_; + Gtk::Entry *lens_; + + ProfileStoreComboBox *profilepath_; + }; + + DynamicProfileColumns columns_; + + //Child widgets: + Gtk::Box vbox_; + + Gtk::ScrolledWindow scrolledwindow_; + Gtk::TreeView treeview_; + Glib::RefPtr treemodel_; + + Gtk::ButtonBox buttonbox_; + Gtk::Button button_up_; + Gtk::Button button_down_; + Gtk::Button button_new_; + Gtk::Button button_edit_; + Gtk::Button button_delete_; +}; + +#endif // _DYNAMICPROFILEPANEL_H_ diff --git a/rtgui/edit.cc b/rtgui/edit.cc index 58d856bb5..9ee0d63ba 100644 --- a/rtgui/edit.cc +++ b/rtgui/edit.cc @@ -18,7 +18,7 @@ */ #include "edit.h" -#include "rtimage.h" +#include "../rtengine/icons.h" ObjectMOBuffer::ObjectMOBuffer(EditDataProvider *dataProvider) : objectMap(nullptr), objectMode(OM_255), dataProvider(dataProvider) {} @@ -191,7 +191,7 @@ void Circle::drawOuterGeometry(Cairo::RefPtr &cr, ObjectMOBuffer center_ += objectBuffer->getDataProvider()->posScreen + objectBuffer->getDataProvider()->deltaScreen; } - cr->arc(center_.x + 0.5, center_.y + 0.5, radius_, 0., 2.*M_PI); + cr->arc(center_.x + 0.5, center_.y + 0.5, radius_, 0., 2.*rtengine::RT_PI); cr->stroke(); } } @@ -225,7 +225,7 @@ void Circle::drawInnerGeometry(Cairo::RefPtr &cr, ObjectMOBuffer } if (filled && state != INSENSITIVE) { - cr->arc(center_.x + 0.5, center_.y + 0.5, radius_, 0., 2.*M_PI); + cr->arc(center_.x + 0.5, center_.y + 0.5, radius_, 0., 2.*rtengine::RT_PI); if (innerLineWidth > 0.) { cr->fill_preserve(); @@ -234,7 +234,7 @@ void Circle::drawInnerGeometry(Cairo::RefPtr &cr, ObjectMOBuffer cr->fill(); } } else if (innerLineWidth > 0.) { - cr->arc(center_.x + 0.5, center_.y + 0.5, radius_, 0., 2.*M_PI); + cr->arc(center_.x + 0.5, center_.y + 0.5, radius_, 0., 2.*rtengine::RT_PI); if (state == INSENSITIVE) { std::valarray ds(1); @@ -274,7 +274,7 @@ void Circle::drawToMOChannel (Cairo::RefPtr &cr, unsigned short } else { cr->set_source_rgba (0., 0., 0., (id + 1) / 65535.); } - cr->arc(center_.x + 0.5, center_.y + 0.5, radius_, 0, 2.*M_PI); + cr->arc(center_.x + 0.5, center_.y + 0.5, radius_, 0, 2.*rtengine::RT_PI); if (filled) { if (innerLineWidth > 0.) { @@ -822,7 +822,7 @@ OPIcon::OPIcon(const Cairo::RefPtr &normal, } if (dragged) { - draggedImg = active; + draggedImg = dragged; } if (insensitive) { @@ -834,23 +834,23 @@ OPIcon::OPIcon(Glib::ustring normalImage, Glib::ustring activeImage, Glib::ustri Glib::ustring draggedImage, Glib::ustring insensitiveImage, DrivenPoint drivenPoint) : drivenPoint(drivenPoint) { if (!normalImage.empty()) { - normalImg = Cairo::ImageSurface::create_from_png( RTImage::findIconAbsolutePath(normalImage) ); + normalImg = Cairo::ImageSurface::create_from_png( rtengine::findIconAbsolutePath(normalImage) ); } if (!prelightImage.empty()) { - prelightImg = Cairo::ImageSurface::create_from_png( RTImage::findIconAbsolutePath(prelightImage) ); + prelightImg = Cairo::ImageSurface::create_from_png( rtengine::findIconAbsolutePath(prelightImage) ); } if (!activeImage.empty()) { - activeImg = Cairo::ImageSurface::create_from_png( RTImage::findIconAbsolutePath(activeImage) ); + activeImg = Cairo::ImageSurface::create_from_png( rtengine::findIconAbsolutePath(activeImage) ); } if (!draggedImage.empty()) { - draggedImg = Cairo::ImageSurface::create_from_png( RTImage::findIconAbsolutePath(draggedImage) ); + draggedImg = Cairo::ImageSurface::create_from_png( rtengine::findIconAbsolutePath(draggedImage) ); } if (!insensitiveImage.empty()) { - insensitiveImg = Cairo::ImageSurface::create_from_png( RTImage::findIconAbsolutePath(insensitiveImage) ); + insensitiveImg = Cairo::ImageSurface::create_from_png( rtengine::findIconAbsolutePath(insensitiveImage) ); } } diff --git a/rtgui/edit.h b/rtgui/edit.h index e28a6acec..eeeca694d 100644 --- a/rtgui/edit.h +++ b/rtgui/edit.h @@ -409,10 +409,8 @@ private: Cairo::RefPtr draggedImg; Cairo::RefPtr insensitiveImg; - static void setPaths(Options &opt); static void updateImages(); void changeImage(Glib::ustring &newImage); - static Glib::ustring findIconAbsolutePath(const Glib::ustring &iconFName); void drawImage (const Cairo::RefPtr &img, Cairo::RefPtr &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem); void drawMOImage (const Cairo::RefPtr &img, Cairo::RefPtr &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem); void drivenPointToRectangle(const rtengine::Coord &pos, rtengine::Coord &topLeft, rtengine::Coord &bottomRight, int W, int H); diff --git a/rtgui/editorpanel.cc b/rtgui/editorpanel.cc index 4ba581ddd..8d2d6251a 100644 --- a/rtgui/editorpanel.cc +++ b/rtgui/editorpanel.cc @@ -35,43 +35,155 @@ using namespace rtengine::procparams; +namespace +{ + +struct spparams { + double val; + Glib::ustring str; + MyProgressBar *pProgress; + Glib::RefPtr cssProvider; +}; + +int setprogressStrUI ( void *p ) +{ + spparams *s = static_cast (p); + + if ( ! s->str.empty() ) { + s->pProgress->set_text ( M (s->str) ); + } + + if ( s->val >= 0 ) { + s->pProgress->set_fraction ( s->val ); + + if (s->cssProvider) { + if ( s->val < 1.0 ) { + s->cssProvider->load_from_data ("ProgressBar { background-color: red }"); + } else { + s->cssProvider->load_from_data ("ProgressBar { background-color: grey }"); + } + + s->pProgress->get_style_context()->set_background (s->pProgress->get_window()); + } + } + + delete s; + return FALSE; +} + + +bool find_default_monitor_profile(GdkWindow *rootwin, Glib::ustring &defprof, Glib::ustring &defprofname) +{ +#ifdef WIN32 + HDC hDC = GetDC(nullptr); + + if (hDC != nullptr) { + if (SetICMMode(hDC, ICM_ON)) { + char profileName[MAX_PATH + 1]; + DWORD profileLength = MAX_PATH; + + if (GetICMProfileA(hDC, &profileLength, profileName)) { + defprof = Glib::ustring(profileName); + defprofname = Glib::path_get_basename(defprof); + size_t pos = defprofname.rfind("."); + + if (pos != Glib::ustring::npos) { + defprofname = defprofname.substr(0, pos); + } + defprof = Glib::ustring("file:") + defprof; + return true; + } + + // might fail if e.g. the monitor has no profile + } + + ReleaseDC(NULL, hDC); + } +#elif !defined(__APPLE__) + // taken from geeqie (image.c) and adapted + // Originally licensed as GPL v2+, with the following copyright: + // * Copyright (C) 2006 John Ellis + // * Copyright (C) 2008 - 2016 The Geeqie Team + // + guchar *prof = nullptr; + gint proflen; + GdkAtom type = GDK_NONE; + gint format = 0; + if (gdk_property_get(rootwin, gdk_atom_intern("_ICC_PROFILE", FALSE), GDK_NONE, 0, 64 * 1024 * 1024, FALSE, &type, &format, &proflen, &prof) && proflen > 0) { + cmsHPROFILE p = cmsOpenProfileFromMem(prof, proflen); + if (p) { + defprofname = "from GDK"; + defprof = Glib::build_filename(Options::rtdir, "GDK_ICC_PROFILE.icc"); + if (cmsSaveProfileToFile(p, defprof.c_str())) { + cmsCloseProfile(p); + if (prof) { + g_free(prof); + } + defprof = Glib::ustring("file:") + defprof; + return true; + } + } + } + if (prof) { + g_free(prof); + } +#endif + return false; +} + + +} + class EditorPanel::ColorManagementToolbar { private: +#if !defined(__APPLE__) // monitor profile not supported on apple MyComboBoxText profileBox; +#endif PopUpButton intentBox; Gtk::ToggleButton softProof; Gtk::ToggleButton spGamutCheck; - sigc::connection profileConn, intentConn; + sigc::connection profileConn, intentConn, softproofConn; + bool canSProof; + Glib::ustring defprof; rtengine::StagedImageProcessor* const& processor; private: +#if !defined(__APPLE__) // monitor profile not supported on apple void prepareProfileBox () { - profileBox.set_size_request (100, -1); + profileBox.setPreferredWidth(70, 200); + setExpandAlignProperties (&profileBox, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); - profileBox.append_text (M("PREFERENCES_PROFILE_NONE")); -#ifdef WIN32 - profileBox.append_text (M("MONITOR_PROFILE_SYSTEM") + " (" + rtengine::iccStore->getDefaultMonitorProfileName() + ")"); - profileBox.set_active (options.rtSettings.autoMonitorProfile ? 1 : 0); -#else - profileBox.set_active (0); -#endif - - const std::vector profiles = rtengine::iccStore->getProfiles (true); - for (std::vector::const_iterator iterator = profiles.begin (); iterator != profiles.end (); ++iterator) { - profileBox.append_text (*iterator); + profileBox.append (M ("PREFERENCES_PROFILE_NONE")); + Glib::ustring defprofname; + if (find_default_monitor_profile(profileBox.get_root_window()->gobj(), defprof, defprofname)) { + profileBox.append (M ("MONITOR_PROFILE_SYSTEM") + " (" + defprofname + ")"); + if (options.rtSettings.autoMonitorProfile) { + rtengine::ICCStore::getInstance()->setDefaultMonitorProfileName(defprof); + profileBox.set_active(1); + } else { + profileBox.set_active(0); + } + } else { + profileBox.set_active (0); + } + const std::vector profiles = rtengine::ICCStore::getInstance()->getProfiles (rtengine::ICCStore::ProfileType::MONITOR); + for (const auto profile: profiles) { + profileBox.append (profile); } profileBox.set_tooltip_text (profileBox.get_active_text ()); } +#endif void prepareIntentBox () { // same order as the enum - intentBox.addEntry("intent-perceptual.png", M("PREFERENCES_INTENT_PERCEPTUAL")); + intentBox.addEntry ("intent-perceptual.png", M ("PREFERENCES_INTENT_PERCEPTUAL")); intentBox.addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); - intentBox.addEntry("intent-absolute.png", M("PREFERENCES_INTENT_ABSOLUTE")); + intentBox.addEntry ("intent-absolute.png", M ("PREFERENCES_INTENT_ABSOLUTE")); + setExpandAlignProperties (intentBox.buttonGroup, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); intentBox.setSelected(1); intentBox.show (); @@ -86,6 +198,7 @@ private: softProof.set_tooltip_markup(M("SOFTPROOF_TOOLTIP")); softProof.set_active(false); + softProof.set_sensitive(canSProof); softProof.show (); Gtk::Image *spGamutCheckImage = Gtk::manage (new RTImage ("spGamutCheck.png")); @@ -99,10 +212,12 @@ private: spGamutCheck.show (); } +#if !defined(__APPLE__) void profileBoxChanged () { updateParameters (); } +#endif void intentBoxChanged (int) { @@ -121,30 +236,33 @@ private: void updateParameters (bool noEvent = false) { +#if !defined(__APPLE__) // monitor profile not supported on apple ConnectionBlocker profileBlocker (profileConn); +#endif ConnectionBlocker intentBlocker (intentConn); Glib::ustring profile; -#ifdef WIN32 - if (profileBox.get_active_row_number () == 1) { - profile = rtengine::iccStore->getDefaultMonitorProfileName (); +#if !defined(__APPLE__) // monitor profile not supported on apple + if (!defprof.empty() && profileBox.get_active_row_number () == 1) { + profile = defprof; if (profile.empty ()) { profile = options.rtSettings.monitorProfile; } if (profile.empty ()) { profile = "sRGB IEC61966-2.1"; } - } else if (profileBox.get_active_row_number () > 1) { + } else if (profileBox.get_active_row_number () > 0) { profile = profileBox.get_active_text (); } #else - profile = profileBox.get_active_row_number () > 0 ? profileBox.get_active_text () : Glib::ustring (); + profile = "RT_sRGB"; #endif +#if !defined(__APPLE__) // monitor profile not supported on apple if (profileBox.get_active_row_number () == 0) { - profile.clear(); + profile.clear (); intentBox.set_sensitive (false); intentBox.setSelected (1); @@ -154,7 +272,7 @@ private: profileBox.set_tooltip_text (""); } else { - const uint8_t supportedIntents = rtengine::iccStore->getProofIntents (profile); + const uint8_t supportedIntents = rtengine::ICCStore::getInstance()->getProofIntents (profile); const bool supportsRelativeColorimetric = supportedIntents & 1 << INTENT_RELATIVE_COLORIMETRIC; const bool supportsPerceptual = supportedIntents & 1 << INTENT_PERCEPTUAL; const bool supportsAbsoluteColorimetric = supportedIntents & 1 << INTENT_ABSOLUTE_COLORIMETRIC; @@ -164,8 +282,8 @@ private: intentBox.setItemSensitivity(0, supportsPerceptual); intentBox.setItemSensitivity(1, supportsRelativeColorimetric); intentBox.setItemSensitivity(2, supportsAbsoluteColorimetric); - softProof.set_sensitive(true); - spGamutCheck.set_sensitive(true); + softProof.set_sensitive(canSProof); + spGamutCheck.set_sensitive(canSProof); } else { intentBox.setItemSensitivity(0, true); intentBox.setItemSensitivity(1, true); @@ -178,16 +296,18 @@ private: profileBox.set_tooltip_text (profileBox.get_active_text ()); } - +#endif rtengine::RenderingIntent intent; switch (intentBox.getSelected ()) { default: case 0: intent = rtengine::RI_PERCEPTUAL; break; + case 1: intent = rtengine::RI_RELATIVE; break; + case 2: intent = rtengine::RI_ABSOLUTE; break; @@ -209,42 +329,70 @@ private: void updateSoftProofParameters (bool noEvent = false) { - spGamutCheck.set_sensitive(softProof.get_active()); - - if (profileBox.get_active_row_number () > 0) { - if (!noEvent) { - processor->beginUpdateParams (); - } - processor->setSoftProofing (softProof.get_sensitive() && softProof.get_active(), spGamutCheck.get_sensitive() && spGamutCheck.get_active()); - if (!noEvent) { - processor->endUpdateParams (rtengine::EvMonitorTransform); - } + if (!canSProof) { + ConnectionBlocker profileBlocker (softproofConn); + softProof.set_active(false); + softProof.set_sensitive(false); +#if !defined(__APPLE__) // monitor profile not supported on apple + } else { + softProof.set_sensitive(profileBox.get_active_row_number () > 0); +#endif } + spGamutCheck.set_sensitive(softProof.get_sensitive() && softProof.get_active()); + +#if !defined(__APPLE__) // monitor profile not supported on apple + if (profileBox.get_active_row_number () > 0) { +#endif + if (processor) { + if (!noEvent) { + processor->beginUpdateParams (); + } + processor->setSoftProofing (softProof.get_sensitive() && softProof.get_active(), spGamutCheck.get_sensitive() && spGamutCheck.get_active()); + if (!noEvent) { + processor->endUpdateParams (rtengine::EvMonitorTransform); + } + } +#if !defined(__APPLE__) // monitor profile not supported on apple + } +#endif } public: explicit ColorManagementToolbar (rtengine::StagedImageProcessor* const& ipc) : intentBox (Glib::ustring (), true), + canSProof(!options.rtSettings.printerProfile.empty() && options.rtSettings.printerProfile != "None"), // assuming the printer profile exist! processor (ipc) { +#if !defined(__APPLE__) // monitor profile not supported on apple prepareProfileBox (); +#endif prepareIntentBox (); prepareSoftProofingBox (); reset (); - softProof.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::softProofToggled)); - spGamutCheck.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::spGamutCheckToggled));; + softproofConn = softProof.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::softProofToggled)); + spGamutCheck.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::spGamutCheckToggled)); +#if !defined(__APPLE__) // monitor profile not supported on apple profileConn = profileBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::profileBoxChanged)); +#endif intentConn = intentBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::intentBoxChanged)); } - void pack_end_in (Gtk::Box* box) + void pack_right_in (Gtk::Grid* grid) { - box->pack_end (spGamutCheck, Gtk::PACK_SHRINK, 0); - box->pack_end (softProof, Gtk::PACK_SHRINK, 0); - box->pack_end (*intentBox.buttonGroup, Gtk::PACK_SHRINK, 0); - box->pack_end (profileBox, Gtk::PACK_SHRINK, 0); +#if !defined(__APPLE__) // monitor profile not supported on apple + grid->attach_next_to (profileBox, Gtk::POS_RIGHT, 1, 1); +#endif + grid->attach_next_to (*intentBox.buttonGroup, Gtk::POS_RIGHT, 1, 1); + grid->attach_next_to (softProof, Gtk::POS_RIGHT, 1, 1); + grid->attach_next_to (spGamutCheck, Gtk::POS_RIGHT, 1, 1); + } + + void canSoftProof(bool canSP) + { + canSProof = canSP; + updateSoftProofParameters(); } void updateProcessor() @@ -256,28 +404,27 @@ public: void reset () { - ConnectionBlocker profileBlocker (profileConn); ConnectionBlocker intentBlocker (intentConn); +#if !defined(__APPLE__) // monitor profile not supported on apple + ConnectionBlocker profileBlocker (profileConn); -#ifdef WIN32 - if (options.rtSettings.autoMonitorProfile) { - setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 1); + if (!defprof.empty() && options.rtSettings.autoMonitorProfile) { + profileBox.set_active(1); } else { setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0); } -#else - setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0); #endif - switch (options.rtSettings.monitorIntent) - { + switch (options.rtSettings.monitorIntent) { default: case rtengine::RI_PERCEPTUAL: intentBox.setSelected (0); break; + case rtengine::RI_RELATIVE: intentBox.setSelected (1); break; + case rtengine::RI_ABSOLUTE: intentBox.setSelected (2); break; @@ -286,10 +433,27 @@ public: updateParameters (); } + void defaultMonitorProfileChanged(const Glib::ustring &profile_name, bool auto_monitor_profile) + { + ConnectionBlocker profileBlocker (profileConn); + + if (auto_monitor_profile && !defprof.empty()) { + rtengine::ICCStore::getInstance()->setDefaultMonitorProfileName(defprof); +#ifndef __APPLE__ + profileBox.set_active(1); +#endif + } else { + rtengine::ICCStore::getInstance()->setDefaultMonitorProfileName(profile_name); +#ifndef __APPLE__ + setActiveTextOrIndex(profileBox, profile_name, 0); +#endif + } + } + }; EditorPanel::EditorPanel (FilePanel* filePanel) - : realized(false), iHistoryShow(nullptr), iHistoryHide(nullptr), iTopPanel_1_Show(nullptr), iTopPanel_1_Hide(nullptr), iRightPanel_1_Show(nullptr), iRightPanel_1_Hide(nullptr), iBeforeLockON(nullptr), iBeforeLockOFF(nullptr), beforePreviewHandler(nullptr), beforeIarea(nullptr), beforeBox(nullptr), afterBox(nullptr), afterHeaderBox(nullptr), parent(nullptr), openThm(nullptr), ipc(nullptr), beforeIpc(nullptr), isProcessing(false), catalogPane(nullptr) + : catalogPane(nullptr), realized(false), tbBeforeLock(nullptr), iHistoryShow(nullptr), iHistoryHide(nullptr), iTopPanel_1_Show(nullptr), iTopPanel_1_Hide(nullptr), iRightPanel_1_Show(nullptr), iRightPanel_1_Hide(nullptr), iBeforeLockON(nullptr), iBeforeLockOFF(nullptr), previewHandler(nullptr), beforePreviewHandler(nullptr), beforeIarea(nullptr), beforeBox(nullptr), afterBox(nullptr), beforeLabel(nullptr), afterLabel(nullptr), beforeHeaderBox(nullptr), afterHeaderBox(nullptr), parent(nullptr), parentWindow(nullptr), openThm(nullptr), isrc(nullptr), ipc(nullptr), beforeIpc(nullptr), err(0), isProcessing(false) { epih = new EditorPanelIdleHelper; @@ -307,15 +471,15 @@ EditorPanel::EditorPanel (FilePanel* filePanel) // build left side panel leftbox = new Gtk::VBox (); - leftbox->set_border_width (2); - leftbox->set_size_request(100, 250); + leftbox->set_size_request (230, 250); histogramPanel = nullptr; profilep = Gtk::manage (new ProfilePanel ()); ppframe = new Gtk::Frame (); + ppframe->set_name("ProfilePanel"); ppframe->add (*profilep); - ppframe->set_label (M("PROFILEPANEL_LABEL")); + ppframe->set_label (M ("PROFILEPANEL_LABEL")); //leftbox->pack_start (*ppframe, Gtk::PACK_SHRINK, 4); navigator = Gtk::manage (new Navigator ()); @@ -333,14 +497,14 @@ EditorPanel::EditorPanel (FilePanel* filePanel) info = Gtk::manage (new Gtk::ToggleButton ()); Gtk::Image* infoimg = Gtk::manage (new RTImage ("info.png")); info->add (*infoimg); - info->set_relief(Gtk::RELIEF_NONE); - info->set_tooltip_markup (M("MAIN_TOOLTIP_QINFO")); + info->set_relief (Gtk::RELIEF_NONE); + info->set_tooltip_markup (M ("MAIN_TOOLTIP_QINFO")); beforeAfter = Gtk::manage (new Gtk::ToggleButton ()); Gtk::Image* beforeAfterIcon = Gtk::manage (new RTImage ("beforeafter.png")); - beforeAfter->add(*beforeAfterIcon); - beforeAfter->set_relief(Gtk::RELIEF_NONE); - beforeAfter->set_tooltip_markup (M("MAIN_TOOLTIP_TOGGLE")); + beforeAfter->add (*beforeAfterIcon); + beforeAfter->set_relief (Gtk::RELIEF_NONE); + beforeAfter->set_tooltip_markup (M ("MAIN_TOOLTIP_TOGGLE")); iBeforeLockON = new RTImage ("lock-on.png"); iBeforeLockOFF = new RTImage ("lock-off.png"); @@ -355,9 +519,9 @@ EditorPanel::EditorPanel (FilePanel* filePanel) iHistoryShow = new RTImage ("panel-to-right.png"); iHistoryHide = new RTImage ("panel-to-left.png"); - hidehp->set_relief(Gtk::RELIEF_NONE); + hidehp->set_relief (Gtk::RELIEF_NONE); hidehp->set_active (options.showHistory); - hidehp->set_tooltip_markup (M("MAIN_TOOLTIP_HIDEHP")); + hidehp->set_tooltip_markup (M ("MAIN_TOOLTIP_HIDEHP")); if (options.showHistory) { hidehp->set_image (*iHistoryHide); @@ -371,30 +535,26 @@ EditorPanel::EditorPanel (FilePanel* filePanel) tbTopPanel_1 = new Gtk::ToggleButton (); iTopPanel_1_Show = new RTImage ("panel-to-bottom.png"); iTopPanel_1_Hide = new RTImage ("panel-to-top.png"); - tbTopPanel_1->set_relief(Gtk::RELIEF_NONE); + tbTopPanel_1->set_relief (Gtk::RELIEF_NONE); tbTopPanel_1->set_active (true); - tbTopPanel_1->set_tooltip_markup (M("MAIN_TOOLTIP_SHOWHIDETP1")); + tbTopPanel_1->set_tooltip_markup (M ("MAIN_TOOLTIP_SHOWHIDETP1")); tbTopPanel_1->set_image (*iTopPanel_1_Hide); } - tbRightPanel_1 = new Gtk::ToggleButton (); - iRightPanel_1_Show = new RTImage ("panel-to-left.png"); - iRightPanel_1_Hide = new RTImage ("panel-to-right.png"); - tbRightPanel_1->set_relief(Gtk::RELIEF_NONE); - tbRightPanel_1->set_active (true); - tbRightPanel_1->set_tooltip_markup (M("MAIN_TOOLTIP_SHOWHIDERP1")); - tbRightPanel_1->set_image (*iRightPanel_1_Hide); - Gtk::VSeparator* vsepcl = Gtk::manage (new Gtk::VSeparator ()); Gtk::VSeparator* vsepz2 = Gtk::manage (new Gtk::VSeparator ()); Gtk::VSeparator* vsepz3 = Gtk::manage (new Gtk::VSeparator ()); Gtk::VSeparator* vsepz4 = Gtk::manage (new Gtk::VSeparator ()); + Gtk::VSeparator* vsep1 = Gtk::manage (new Gtk::VSeparator ()); + Gtk::VSeparator* vsep2 = Gtk::manage (new Gtk::VSeparator ()); + iareapanel = new ImageAreaPanel (); - tpc->setEditProvider(iareapanel->imageArea); + tpc->setEditProvider (iareapanel->imageArea); tpc->getToolBar()->setLockablePickerToolListener(iareapanel->imageArea); Gtk::HBox* toolBarPanel = Gtk::manage (new Gtk::HBox ()); + toolBarPanel->set_name ("EditorTopPanel"); toolBarPanel->pack_start (*hidehp, Gtk::PACK_SHRINK, 1); toolBarPanel->pack_start (*vseph, Gtk::PACK_SHRINK, 2); toolBarPanel->pack_start (*info, Gtk::PACK_SHRINK, 1); @@ -404,9 +564,9 @@ EditorPanel::EditorPanel (FilePanel* filePanel) toolBarPanel->pack_start (*vsept, Gtk::PACK_SHRINK, 2); if (tbTopPanel_1) { + Gtk::VSeparator* vsep = Gtk::manage (new Gtk::VSeparator ()); toolBarPanel->pack_end (*tbTopPanel_1, Gtk::PACK_SHRINK, 1); - Gtk::VSeparator* vsep1 = Gtk::manage (new Gtk::VSeparator ()); - toolBarPanel->pack_end (*vsep1, Gtk::PACK_SHRINK, 2); + toolBarPanel->pack_end (*vsep, Gtk::PACK_SHRINK, 2); } toolBarPanel->pack_end (*tpc->coarse, Gtk::PACK_SHRINK, 2); @@ -420,125 +580,150 @@ EditorPanel::EditorPanel (FilePanel* filePanel) afterBox->pack_start (*iareapanel); beforeAfterBox = Gtk::manage (new Gtk::HBox()); + beforeAfterBox->set_name("BeforeAfterContainer"); beforeAfterBox->pack_start (*afterBox); - editbox->pack_start (*toolBarPanel, Gtk::PACK_SHRINK, 0); + editbox->pack_start (*toolBarPanel, Gtk::PACK_SHRINK, 2); editbox->pack_start (*beforeAfterBox); // build right side panel vboxright = new Gtk::VBox (false, 0); - vboxright->set_size_request(100, 250); - - vboxright->set_border_width (2); + vboxright->set_size_request (300, 250); vboxright->pack_start (*ppframe, Gtk::PACK_SHRINK, 2); // main notebook vboxright->pack_start (*tpc->toolPanelNotebook); // Save buttons - Gtk::HBox* iops = Gtk::manage (new Gtk::HBox ()); - iops->set_spacing(2); + Gtk::Grid *iops = new Gtk::Grid (); + iops->set_name ("IopsPanel"); + iops->set_orientation (Gtk::ORIENTATION_HORIZONTAL); + iops->set_row_spacing (2); + iops->set_column_spacing (2); - //Gtk::Image *saveButtonImage = Gtk::manage (new Gtk::Image (Gtk::StockID("gtk-save"), Gtk::ICON_SIZE_BUTTON)); Gtk::Image *saveButtonImage = Gtk::manage (new RTImage ("gtk-save-large.png")); saveimgas = Gtk::manage (new Gtk::Button ()); - saveimgas->add(*saveButtonImage); - saveimgas->set_tooltip_markup(M("MAIN_BUTTON_SAVE_TOOLTIP")); + saveimgas->add (*saveButtonImage); + saveimgas->set_tooltip_markup (M ("MAIN_BUTTON_SAVE_TOOLTIP")); + setExpandAlignProperties (saveimgas, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); Gtk::Image *queueButtonImage = Gtk::manage (new RTImage ("processing.png")); queueimg = Gtk::manage (new Gtk::Button ()); - queueimg->add(*queueButtonImage); - queueimg->set_tooltip_markup(M("MAIN_BUTTON_PUTTOQUEUE_TOOLTIP")); + queueimg->add (*queueButtonImage); + queueimg->set_tooltip_markup (M ("MAIN_BUTTON_PUTTOQUEUE_TOOLTIP")); + setExpandAlignProperties (queueimg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); Gtk::Image *sendToEditorButtonImage = Gtk::manage (new RTImage ("image-editor.png")); sendtogimp = Gtk::manage (new Gtk::Button ()); - sendtogimp->add(*sendToEditorButtonImage); - sendtogimp->set_tooltip_markup(M("MAIN_BUTTON_SENDTOEDITOR_TOOLTIP")); - - iops->pack_start (*saveimgas, Gtk::PACK_SHRINK); - - if(!simpleEditor) { - iops->pack_start (*queueimg, Gtk::PACK_SHRINK); - } - - iops->pack_start (*sendtogimp, Gtk::PACK_SHRINK); + sendtogimp->add (*sendToEditorButtonImage); + sendtogimp->set_tooltip_markup (M ("MAIN_BUTTON_SENDTOEDITOR_TOOLTIP")); + setExpandAlignProperties (sendtogimp, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); // Status box - statusBox = Gtk::manage (new Gtk::HBox ()); - progressLabel = Gtk::manage (new Gtk::ProgressBar()); - progressLabel->set_fraction(0.0); - //progressLabel->modify_bg( Gtk::STATE_NORMAL,Gdk::Color("grey") ); // Disable, because in single mode this is may be permanent red without processing - - statusBox->pack_start (*progressLabel); - iops->pack_start(*statusBox, Gtk::PACK_SHRINK, 2); + progressLabel = Gtk::manage (new MyProgressBar (300)); + progressLabel->set_show_text (true); + setExpandAlignProperties (progressLabel, true, false, Gtk::ALIGN_START, Gtk::ALIGN_FILL); + progressLabel->set_fraction (0.0); // tbRightPanel_1 - iops->pack_end (*tbRightPanel_1, Gtk::PACK_SHRINK, 0); + tbRightPanel_1 = new Gtk::ToggleButton (); + iRightPanel_1_Show = new RTImage ("panel-to-left.png"); + iRightPanel_1_Hide = new RTImage ("panel-to-right.png"); + tbRightPanel_1->set_relief (Gtk::RELIEF_NONE); + tbRightPanel_1->set_active (true); + tbRightPanel_1->set_tooltip_markup (M ("MAIN_TOOLTIP_SHOWHIDERP1")); + tbRightPanel_1->set_image (*iRightPanel_1_Hide); + setExpandAlignProperties (tbRightPanel_1, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); // ShowHideSidePanels tbShowHideSidePanels = new Gtk::ToggleButton (); iShowHideSidePanels = new RTImage ("crossed-arrows-out.png"); iShowHideSidePanels_exit = new RTImage ("crossed-arrows-in.png"); - tbShowHideSidePanels->set_relief(Gtk::RELIEF_NONE); + tbShowHideSidePanels->set_relief (Gtk::RELIEF_NONE); tbShowHideSidePanels->set_active (false); - tbShowHideSidePanels->set_tooltip_markup (M("MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP")); + tbShowHideSidePanels->set_tooltip_markup (M ("MAIN_BUTTON_SHOWHIDESIDEPANELS_TOOLTIP")); tbShowHideSidePanels->set_image (*iShowHideSidePanels); - iops->pack_end (*tbShowHideSidePanels, Gtk::PACK_SHRINK, 0); - iops->pack_end (*vsepz2, Gtk::PACK_SHRINK, 1); - - // Zoom panel - iops->pack_end (*iareapanel->imageArea->zoomPanel, Gtk::PACK_SHRINK, 1); - iops->pack_end (*vsepz3, Gtk::PACK_SHRINK, 2); + setExpandAlignProperties (tbShowHideSidePanels, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); navPrev = navNext = navSync = nullptr; if (!simpleEditor && !options.tabbedUI) { // Navigation buttons Gtk::Image *navPrevImage = Gtk::manage (new RTImage ("nav-prev.png")); - navPrevImage->set_padding(0, 0); + navPrevImage->set_padding (0, 0); navPrev = Gtk::manage (new Gtk::Button ()); - navPrev->add(*navPrevImage); - navPrev->set_relief(Gtk::RELIEF_NONE); - navPrev->set_tooltip_markup(M("MAIN_BUTTON_NAVPREV_TOOLTIP")); + navPrev->add (*navPrevImage); + navPrev->set_relief (Gtk::RELIEF_NONE); + navPrev->set_tooltip_markup (M ("MAIN_BUTTON_NAVPREV_TOOLTIP")); + setExpandAlignProperties (navPrev, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); Gtk::Image *navNextImage = Gtk::manage (new RTImage ("nav-next.png")); - navNextImage->set_padding(0, 0); + navNextImage->set_padding (0, 0); navNext = Gtk::manage (new Gtk::Button ()); - navNext->add(*navNextImage); - navNext->set_relief(Gtk::RELIEF_NONE); - navNext->set_tooltip_markup(M("MAIN_BUTTON_NAVNEXT_TOOLTIP")); + navNext->add (*navNextImage); + navNext->set_relief (Gtk::RELIEF_NONE); + navNext->set_tooltip_markup (M ("MAIN_BUTTON_NAVNEXT_TOOLTIP")); + setExpandAlignProperties (navNext, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); Gtk::Image *navSyncImage = Gtk::manage (new RTImage ("nav-sync.png")); - navSyncImage->set_padding(0, 0); + navSyncImage->set_padding (0, 0); navSync = Gtk::manage (new Gtk::Button ()); - navSync->add(*navSyncImage); - navSync->set_relief(Gtk::RELIEF_NONE); - navSync->set_tooltip_markup(M("MAIN_BUTTON_NAVSYNC_TOOLTIP")); - - iops->pack_end (*Gtk::manage(new Gtk::VSeparator()), Gtk::PACK_SHRINK, 0); - iops->pack_end (*navNext, Gtk::PACK_SHRINK, 0); - iops->pack_end (*navSync, Gtk::PACK_SHRINK, 0); - iops->pack_end (*navPrev, Gtk::PACK_SHRINK, 0); + navSync->add (*navSyncImage); + navSync->set_relief (Gtk::RELIEF_NONE); + navSync->set_tooltip_markup (M ("MAIN_BUTTON_NAVSYNC_TOOLTIP")); + setExpandAlignProperties (navSync, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); + } + + // ================== PACKING THE BOTTOM WIDGETS ================= + + // Adding widgets from center to the left, on the left side (using Gtk::POS_LEFT) + iops->attach_next_to (*vsep2, Gtk::POS_LEFT, 1, 1); + iops->attach_next_to (*progressLabel, Gtk::POS_LEFT, 1, 1); + iops->attach_next_to (*vsep1, Gtk::POS_LEFT, 1, 1); + if (!gimpPlugin) { + iops->attach_next_to (*sendtogimp, Gtk::POS_LEFT, 1, 1); + } + + if (!gimpPlugin && !simpleEditor) { + iops->attach_next_to (*queueimg, Gtk::POS_LEFT, 1, 1); + } + + if (!gimpPlugin) { + iops->attach_next_to (*saveimgas, Gtk::POS_LEFT, 1, 1); } - iops->pack_end (*Gtk::manage(new Gtk::VSeparator()), Gtk::PACK_SHRINK, 0); // Color management toolbar colorMgmtToolBar.reset (new ColorManagementToolbar (ipc)); - colorMgmtToolBar->pack_end_in (iops); + colorMgmtToolBar->pack_right_in (iops); + + if (!simpleEditor && !options.tabbedUI) { + Gtk::VSeparator* vsep3 = Gtk::manage (new Gtk::VSeparator ()); + iops->attach_next_to (*vsep3, Gtk::POS_RIGHT, 1, 1); + iops->attach_next_to (*navPrev, Gtk::POS_RIGHT, 1, 1); + iops->attach_next_to (*navSync, Gtk::POS_RIGHT, 1, 1); + iops->attach_next_to (*navNext, Gtk::POS_RIGHT, 1, 1); + } + + iops->attach_next_to (*vsepz2, Gtk::POS_RIGHT, 1, 1); + iops->attach_next_to (*iareapanel->imageArea->zoomPanel, Gtk::POS_RIGHT, 1, 1); + iops->attach_next_to (*vsepz3, Gtk::POS_RIGHT, 1, 1); + iops->attach_next_to (*tbShowHideSidePanels, Gtk::POS_RIGHT, 1, 1); + iops->attach_next_to (*tbRightPanel_1, Gtk::POS_RIGHT, 1, 1); - editbox->pack_start (*Gtk::manage(new Gtk::HSeparator()), Gtk::PACK_SHRINK, 0); editbox->pack_start (*iops, Gtk::PACK_SHRINK, 0); editbox->show_all (); // build screen - hpanedl = Gtk::manage (new Gtk::HPaned()); - hpanedr = Gtk::manage (new Gtk::HPaned()); + hpanedl = Gtk::manage (new Gtk::Paned(Gtk::ORIENTATION_HORIZONTAL)); + hpanedl->set_name("EditorLeftPaned"); + hpanedr = Gtk::manage (new Gtk::Paned(Gtk::ORIENTATION_HORIZONTAL)); + hpanedr->set_name("EditorRightPaned"); leftbox->reference (); vboxright->reference (); if (options.showHistory) { - hpanedl->pack1(*leftbox, false, true); + hpanedl->pack1 (*leftbox, false, false); hpanedl->set_position (options.historyPanelWidth); } @@ -546,23 +731,19 @@ EditorPanel::EditorPanel (FilePanel* filePanel) Gtk::VPaned * viewpaned = Gtk::manage (new Gtk::VPaned()); fPanel = filePanel; - if(filePanel) { + if (filePanel) { catalogPane = new Gtk::Paned(); - viewpaned->pack1(*catalogPane, false, true); + viewpaned->pack1 (*catalogPane, false, true); } - viewpaned->pack2(*editbox, true, true); + viewpaned->pack2 (*editbox, true, true); + hpanedl->pack2 (*viewpaned, true, true); - Gtk::Frame* vbfr = Gtk::manage (new Gtk::Frame ()); - vbfr->add (*viewpaned); - vbfr->set_size_request(100, 250); - hpanedl->pack2(*vbfr, true, true); - - hpanedr->pack1(*hpanedl, true, true); - hpanedr->pack2(*vboxright, false, true); - hpanedl->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &EditorPanel::leftPaneButtonReleased) ); - hpanedr->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &EditorPanel::rightPaneButtonReleased) ); + hpanedr->pack1 (*hpanedl, true, false); + hpanedr->pack2 (*vboxright, false, false); + hpanedl->signal_button_release_event().connect_notify ( sigc::mem_fun (*this, &EditorPanel::leftPaneButtonReleased) ); + hpanedr->signal_button_release_event().connect_notify ( sigc::mem_fun (*this, &EditorPanel::rightPaneButtonReleased) ); pack_start (*hpanedr); @@ -594,35 +775,36 @@ EditorPanel::EditorPanel (FilePanel* filePanel) tpc->readOptions (); // connect event handlers - info->signal_toggled().connect( sigc::mem_fun(*this, &EditorPanel::info_toggled) ); - beforeAfter->signal_toggled().connect( sigc::mem_fun(*this, &EditorPanel::beforeAfterToggled) ); - hidehp->signal_toggled().connect( sigc::mem_fun(*this, &EditorPanel::hideHistoryActivated) ); - tbRightPanel_1->signal_toggled().connect( sigc::mem_fun(*this, &EditorPanel::tbRightPanel_1_toggled) ); - saveimgas->signal_pressed().connect( sigc::mem_fun(*this, &EditorPanel::saveAsPressed) ); - queueimg->signal_pressed().connect( sigc::mem_fun(*this, &EditorPanel::queueImgPressed) ); - sendtogimp->signal_pressed().connect( sigc::mem_fun(*this, &EditorPanel::sendToGimpPressed) ); + info->signal_toggled().connect ( sigc::mem_fun (*this, &EditorPanel::info_toggled) ); + beforeAfter->signal_toggled().connect ( sigc::mem_fun (*this, &EditorPanel::beforeAfterToggled) ); + hidehp->signal_toggled().connect ( sigc::mem_fun (*this, &EditorPanel::hideHistoryActivated) ); + tbRightPanel_1->signal_toggled().connect ( sigc::mem_fun (*this, &EditorPanel::tbRightPanel_1_toggled) ); + saveimgas->signal_pressed().connect ( sigc::mem_fun (*this, &EditorPanel::saveAsPressed) ); + queueimg->signal_pressed().connect ( sigc::mem_fun (*this, &EditorPanel::queueImgPressed) ); + sendtogimp->signal_pressed().connect ( sigc::mem_fun (*this, &EditorPanel::sendToGimpPressed) ); - if(navPrev) { - navPrev->signal_pressed().connect( sigc::mem_fun(*this, &EditorPanel::openPreviousEditorImage) ); + if (navPrev) { + navPrev->signal_pressed().connect ( sigc::mem_fun (*this, &EditorPanel::openPreviousEditorImage) ); } - if(navNext) { - navNext->signal_pressed().connect( sigc::mem_fun(*this, &EditorPanel::openNextEditorImage) ); + if (navNext) { + navNext->signal_pressed().connect ( sigc::mem_fun (*this, &EditorPanel::openNextEditorImage) ); } - if(navSync) { - navSync->signal_pressed().connect( sigc::mem_fun(*this, &EditorPanel::syncFileBrowser) ); + if (navSync) { + navSync->signal_pressed().connect ( sigc::mem_fun (*this, &EditorPanel::syncFileBrowser) ); } - ShowHideSidePanelsconn = tbShowHideSidePanels->signal_toggled().connect ( sigc::mem_fun(*this, &EditorPanel::toggleSidePanels), true); + ShowHideSidePanelsconn = tbShowHideSidePanels->signal_toggled().connect ( sigc::mem_fun (*this, &EditorPanel::toggleSidePanels), true); if (tbTopPanel_1) { - tbTopPanel_1->signal_toggled().connect( sigc::mem_fun(*this, &EditorPanel::tbTopPanel_1_toggled) ); + tbTopPanel_1->signal_toggled().connect ( sigc::mem_fun (*this, &EditorPanel::tbTopPanel_1_toggled) ); } } EditorPanel::~EditorPanel () { + idle_register.destroy(); history->setHistoryBeforeLineListener (nullptr); // the order is important! @@ -665,7 +847,7 @@ EditorPanel::~EditorPanel () delete vboxright; //delete saveAsDialog; - if(catalogPane) { + if (catalogPane) { delete catalogPane; } @@ -685,24 +867,24 @@ EditorPanel::~EditorPanel () delete iHistoryHide; } - if(iBeforeLockON) { + if (iBeforeLockON) { delete iBeforeLockON; } - if(iBeforeLockOFF) { + if (iBeforeLockOFF) { delete iBeforeLockOFF; } - if(iRightPanel_1_Show) { + if (iRightPanel_1_Show) { delete iRightPanel_1_Show; } - if(iRightPanel_1_Hide) { + if (iRightPanel_1_Hide) { delete iRightPanel_1_Hide; } } -void EditorPanel::leftPaneButtonReleased(GdkEventButton *event) +void EditorPanel::leftPaneButtonReleased (GdkEventButton *event) { if (event->button == 1) { // Button 1 released : it's a resize @@ -713,11 +895,11 @@ void EditorPanel::leftPaneButtonReleased(GdkEventButton *event) }*/ } -void EditorPanel::rightPaneButtonReleased(GdkEventButton *event) +void EditorPanel::rightPaneButtonReleased (GdkEventButton *event) { if (event->button == 1) { int winW, winH; - parent->get_size(winW, winH); + parentWindow->get_size (winW, winH); // Button 1 released : it's a resize options.toolPanelWidth = winW - hpanedr->get_position(); } @@ -737,19 +919,19 @@ void EditorPanel::writeOptions() } } -void EditorPanel::showTopPanel(bool show) +void EditorPanel::showTopPanel (bool show) { if (tbTopPanel_1->get_active() != show) { - tbTopPanel_1->set_active(show); + tbTopPanel_1->set_active (show); } } void EditorPanel::setAspect () { int winW, winH; - parent->get_size(winW, winH); - hpanedl->set_position(options.historyPanelWidth); - hpanedr->set_position(winW - options.toolPanelWidth); + parentWindow->get_size (winW, winH); + hpanedl->set_position (options.historyPanelWidth); + hpanedr->set_position (winW - options.toolPanelWidth); // initialize components if (info->get_active() != options.showInfo) { @@ -762,7 +944,7 @@ void EditorPanel::on_realize () realized = true; Gtk::VBox::on_realize (); // This line is needed to avoid autoexpansion of the window :-/ - vboxright->set_size_request (options.toolPanelWidth, -1); + //vboxright->set_size_request (options.toolPanelWidth, -1); tpc->updateToolState(); } @@ -798,10 +980,10 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) navigator->previewWindow->setImageArea (iareapanel->imageArea); rtengine::ImageSource* is = isrc->getImageSource(); - is->setProgressListener( this ); + is->setProgressListener ( this ); // try to load the last saved parameters from the cache or from the paramfile file - ProcParams* ldprof = openThm->createProcParamsForUpdate(true, false); // will be freed by initProfile + ProcParams* ldprof = openThm->createProcParamsForUpdate (true, false); // will be freed by initProfile // initialize profile Glib::ustring defProf = openThm->getType() == FT_Raw ? options.defProfRaw : options.defProfImg; @@ -819,7 +1001,7 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) // If in single tab mode, the main crop window is not constructed the very first time // since there was no resize event if (iareapanel->imageArea->mainCropWindow) { - iareapanel->imageArea->mainCropWindow->cropHandler.newImage(ipc, false); + iareapanel->imageArea->mainCropWindow->cropHandler.newImage (ipc, false); iareapanel->imageArea->mainCropWindow->initialImageArrived(); // In single tab mode, the image is not always updated between switches @@ -830,7 +1012,7 @@ void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) // } } else { Gtk::Allocation alloc; - iareapanel->imageArea->on_resized(alloc); + iareapanel->imageArea->on_resized (alloc); } history->resetSnapShotNumber(); @@ -917,73 +1099,42 @@ void EditorPanel::procParamsChanged (rtengine::procparams::ProcParams* params, r // saveLabel->set_markup (Glib::ustring("") + M("MAIN_BUTTON_SAVE") + ""); } -struct spsparams { - bool inProcessing; - EditorPanelIdleHelper* epih; -}; - -int setProgressStateUIThread (void* data) -{ - - spsparams* p = static_cast(data); - - if (p->epih->destroyed) { - if (p->epih->pending == 1) { - delete p->epih; - } else { - p->epih->pending--; - } - - delete p; - - return 0; - } - - p->epih->epanel->refreshProcessingState (p->inProcessing); - p->epih->pending--; - delete p; - - return 0; -} - void EditorPanel::setProgressState (bool inProcessing) { + struct spsparams { + bool inProcessing; + EditorPanelIdleHelper* epih; + }; epih->pending++; spsparams* p = new spsparams; p->inProcessing = inProcessing; p->epih = epih; - g_idle_add (setProgressStateUIThread, p); -} -struct spparams { - double val; - Glib::ustring str; - Gtk::ProgressBar *pProgress; -}; + const auto func = [](gpointer data) -> gboolean { + spsparams* const p = static_cast(data); -int setprogressStrUI( void *p ) -{ - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected - spparams *s = static_cast(p); + if (p->epih->destroyed) { + if (p->epih->pending == 1) { + delete p->epih; + } else { + p->epih->pending--; + } - if( ! s->str.empty() ) { - s->pProgress->set_text( M(s->str) ); - } + delete p; - if( s->val >= 0 ) { - s->pProgress->set_fraction( s->val ); - - if( s->val < 1.0 ) { - s->pProgress->modify_bg( Gtk::STATE_NORMAL, Gdk::Color("red") ); - } else { - s->pProgress->modify_bg( Gtk::STATE_NORMAL, Gdk::Color("grey") ); + return 0; } - } - delete s; - return 0; + p->epih->epanel->refreshProcessingState (p->inProcessing); + p->epih->pending--; + delete p; + + return FALSE; + }; + + idle_register.add(func, p); } void EditorPanel::setProgress (double p) @@ -991,7 +1142,7 @@ void EditorPanel::setProgress (double p) spparams *s = new spparams; s->val = p; s->pProgress = progressLabel; - g_idle_add (setprogressStrUI, s); + idle_register.add(setprogressStrUI, s); } void EditorPanel::setProgressStr (Glib::ustring str) @@ -1000,7 +1151,7 @@ void EditorPanel::setProgressStr (Glib::ustring str) s->str = str; s->val = -1; s->pProgress = progressLabel; - g_idle_add (setprogressStrUI, s); + idle_register.add(setprogressStrUI, s); } // This is only called from the ThreadUI, so within the gtk thread @@ -1015,7 +1166,7 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) } s->str = "PROGRESSBAR_PROCESSING"; - s->val = 0.0; + s->val = 1.0; } else { // Set proc params of thumbnail. It saves it into the cache and updates the file browser. if (ipc && openThm && tpc->getChangedState()) { @@ -1028,8 +1179,8 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) if (processingStartedTime != 0) { time_t curTime = ::time(nullptr); - if (::difftime(curTime, processingStartedTime) > options.sndLngEditProcDoneSecs) { - SoundManager::playSoundAsync(options.sndLngEditProcDone); + if (::difftime (curTime, processingStartedTime) > options.sndLngEditProcDoneSecs) { + SoundManager::playSoundAsync (options.sndLngEditProcDone); } processingStartedTime = 0; @@ -1037,12 +1188,12 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) // Set progress bar "done" s->str = "PROGRESSBAR_READY"; - s->val = 1.0; + s->val = 0.0; #ifdef WIN32 // Maybe accessing "parent", which is a Gtk object, can justify to get the Gtk lock... - if (!firstProcessingDone && static_cast(parent)->getIsFullscreen()) { + if (!firstProcessingDone && static_cast (parent)->getIsFullscreen()) { parent->fullscreen(); } @@ -1052,15 +1203,9 @@ void EditorPanel::refreshProcessingState (bool inProcessingP) isProcessing = inProcessingP; - setprogressStrUI(s); + setprogressStrUI (s); } -struct errparams { - Glib::ustring descr; - Glib::ustring title; - EditorPanelIdleHelper* epih; -}; - void EditorPanel::displayError (Glib::ustring title, Glib::ustring descr) { GtkWidget* msgd = gtk_message_dialog_new_with_markup (nullptr, @@ -1069,45 +1214,50 @@ void EditorPanel::displayError (Glib::ustring title, Glib::ustring descr) GTK_BUTTONS_OK, "%s", descr.data()); - gtk_window_set_title((GtkWindow*)msgd, title.data()); + gtk_window_set_title ((GtkWindow*)msgd, title.data()); g_signal_connect_swapped (msgd, "response", G_CALLBACK (gtk_widget_destroy), msgd); gtk_widget_show_all (msgd); } -int disperrorUI (void* data) -{ - errparams* p = static_cast(data); - - if (p->epih->destroyed) { - if (p->epih->pending == 1) { - delete p->epih; - } else { - p->epih->pending--; - } - - delete p; - - return 0; - } - - p->epih->epanel->displayError (p->title, p->descr); - p->epih->pending--; - delete p; - - return 0; -} - void EditorPanel::error (Glib::ustring title, Glib::ustring descr) { + struct errparams { + Glib::ustring descr; + Glib::ustring title; + EditorPanelIdleHelper* epih; + }; epih->pending++; - errparams* p = new errparams; + errparams* const p = new errparams; p->descr = descr; p->title = title; p->epih = epih; - g_idle_add (disperrorUI, p); + + const auto func = [](gpointer data) -> gboolean { + errparams* const p = static_cast (data); + + if (p->epih->destroyed) { + if (p->epih->pending == 1) { + delete p->epih; + } else { + p->epih->pending--; + } + + delete p; + + return 0; + } + + p->epih->epanel->displayError (p->title, p->descr); + p->epih->pending--; + delete p; + + return FALSE; + }; + + idle_register.add(func, p); } void EditorPanel::info_toggled () @@ -1128,35 +1278,35 @@ void EditorPanel::info_toggled () if (idata && idata->hasExif()) { infoString1 = Glib::ustring::compose ("%1 + %2", - Glib::ustring(idata->getMake() + " " + idata->getModel()), - Glib::ustring(idata->getLens())); + Glib::ustring (idata->getMake() + " " + idata->getModel()), + Glib::ustring (idata->getLens())); infoString2 = Glib::ustring::compose ("f/%1 %2s %3%4 %5mm", - Glib::ustring(idata->apertureToString(idata->getFNumber())), - Glib::ustring(idata->shutterToString(idata->getShutterSpeed())), - M("QINFO_ISO"), idata->getISOSpeed(), - Glib::ustring::format(std::setw(3), std::fixed, std::setprecision(2), idata->getFocalLen())); + Glib::ustring (idata->apertureToString (idata->getFNumber())), + Glib::ustring (idata->shutterToString (idata->getShutterSpeed())), + M ("QINFO_ISO"), idata->getISOSpeed(), + Glib::ustring::format (std::setw (3), std::fixed, std::setprecision (2), idata->getFocalLen())); - expcomp = Glib::ustring(idata->expcompToString(idata->getExpComp(), true)); // maskZeroexpcomp + expcomp = Glib::ustring (idata->expcompToString (idata->getExpComp(), true)); // maskZeroexpcomp if (expcomp != "") { - infoString2 = Glib::ustring::compose("%1 %2EV", - infoString2, - expcomp /*Glib::ustring(idata->expcompToString(idata->getExpComp()))*/); + infoString2 = Glib::ustring::compose ("%1 %2EV", + infoString2, + expcomp /*Glib::ustring(idata->expcompToString(idata->getExpComp()))*/); } infoString3 = Glib::ustring::compose ("%1%2", - escapeHtmlChars(Glib::path_get_dirname(openThm->getFileName())) + G_DIR_SEPARATOR_S, - escapeHtmlChars(Glib::path_get_basename(openThm->getFileName())) ); + escapeHtmlChars (Glib::path_get_dirname (openThm->getFileName())) + G_DIR_SEPARATOR_S, + escapeHtmlChars (Glib::path_get_basename (openThm->getFileName())) ); int ww = ipc->getFullWidth(); int hh = ipc->getFullHeight(); //megapixels - infoString4 = Glib::ustring::compose ("%1 MP (%2x%3)", Glib::ustring::format(std::setw(4), std::fixed, std::setprecision(1), (float)ww * hh / 1000000), ww, hh); + infoString4 = Glib::ustring::compose ("%1 MP (%2x%3)", Glib::ustring::format (std::setw (4), std::fixed, std::setprecision (1), (float)ww * hh / 1000000), ww, hh); infoString = Glib::ustring::compose ("%1\n%2\n%3\n%4", infoString1, infoString2, infoString3, infoString4); } else { - infoString = M("QINFO_NOEXIF"); + infoString = M ("QINFO_NOEXIF"); } iareapanel->imageArea->setInfoText (infoString); @@ -1169,7 +1319,7 @@ void EditorPanel::hideHistoryActivated () removeIfThere (hpanedl, leftbox, false); if (hidehp->get_active()) { - hpanedl->pack1 (*leftbox, false, true); + hpanedl->pack1 (*leftbox, false, false); } options.showHistory = hidehp->get_active(); @@ -1259,8 +1409,8 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) #endif // Editor Layout - switch(event->keyval) { - case GDK_L: + switch (event->keyval) { + case GDK_KEY_L: if (tbTopPanel_1) { tbTopPanel_1->set_active (!tbTopPanel_1->get_active()); // toggle top panel } @@ -1276,7 +1426,7 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) return true; break; - case GDK_l: + case GDK_KEY_l: if (!shift && !alt /*&& !ctrl*/) { hidehp->set_active (!hidehp->get_active()); // toggle History (left panel) return true; @@ -1295,7 +1445,7 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) break; - case GDK_m: // Maximize preview panel: hide top AND right AND history panels + case GDK_KEY_m: // Maximize preview panel: hide top AND right AND history panels if (!ctrl && !alt) { toggleSidePanels(); return true; @@ -1303,7 +1453,7 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) break; - case GDK_M: // Maximize preview panel: hide top AND right AND history panels AND (fit image preview) + case GDK_KEY_M: // Maximize preview panel: hide top AND right AND history panels AND (fit image preview) if (!ctrl && !alt) { toggleSidePanelsZoomFit(); return true; @@ -1331,94 +1481,94 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) if (!alt) { if (!ctrl) { // Normal - switch(event->keyval) { - case GDK_bracketright: + switch (event->keyval) { + case GDK_KEY_bracketright: tpc->coarse->rotateRight(); return true; - case GDK_bracketleft: + case GDK_KEY_bracketleft: tpc->coarse->rotateLeft(); return true; - case GDK_i: - case GDK_I: + case GDK_KEY_i: + case GDK_KEY_I: info->set_active (!info->get_active()); return true; - case GDK_B: + case GDK_KEY_B: beforeAfter->set_active (!beforeAfter->get_active()); return true; - case GDK_plus: - case GDK_equal: - case GDK_KP_Add: + case GDK_KEY_plus: + case GDK_KEY_equal: + case GDK_KEY_KP_Add: iareapanel->imageArea->zoomPanel->zoomInClicked(); return true; - case GDK_minus: - case GDK_underscore: - case GDK_KP_Subtract: + case GDK_KEY_minus: + case GDK_KEY_underscore: + case GDK_KEY_KP_Subtract: iareapanel->imageArea->zoomPanel->zoomOutClicked(); return true; - case GDK_z://GDK_1 + case GDK_KEY_z://GDK_1 iareapanel->imageArea->zoomPanel->zoom11Clicked(); return true; /* #ifndef __WIN32__ - case GDK_9: // toggle background color of the preview + case GDK_KEY_9: // toggle background color of the preview iareapanel->imageArea->previewModePanel->togglebackColor(); return true; #endif */ - case GDK_r: //preview mode Red + case GDK_KEY_r: //preview mode Red iareapanel->imageArea->previewModePanel->toggleR(); return true; - case GDK_g: //preview mode Green + case GDK_KEY_g: //preview mode Green iareapanel->imageArea->previewModePanel->toggleG(); return true; - case GDK_b: //preview mode Blue + case GDK_KEY_b: //preview mode Blue iareapanel->imageArea->previewModePanel->toggleB(); return true; - case GDK_v: //preview mode Luminosity + case GDK_KEY_v: //preview mode Luminosity iareapanel->imageArea->previewModePanel->toggleL(); return true; - case GDK_F: //preview mode Focus Mask + case GDK_KEY_F: //preview mode Focus Mask iareapanel->imageArea->previewModePanel->toggleFocusMask(); return true; - case GDK_f: + case GDK_KEY_f: iareapanel->imageArea->zoomPanel->zoomFitClicked(); return true; - case GDK_less: - iareapanel->imageArea->indClippedPanel->toggleClipped(true); + case GDK_KEY_less: + iareapanel->imageArea->indClippedPanel->toggleClipped (false); return true; - case GDK_greater: - iareapanel->imageArea->indClippedPanel->toggleClipped(false); + case GDK_KEY_greater: + iareapanel->imageArea->indClippedPanel->toggleClipped (true); return true; - case GDK_F5: - openThm->openDefaultViewer((event->state & GDK_SHIFT_MASK) ? 2 : 1); + case GDK_KEY_F5: + openThm->openDefaultViewer ((event->state & GDK_SHIFT_MASK) ? 2 : 1); return true; - case GDK_y: // synchronize filebrowser with image in Editor + case GDK_KEY_y: // synchronize filebrowser with image in Editor if (!simpleEditor && fPanel && !fname.empty()) { - fPanel->fileCatalog->selectImage(fname, false); + fPanel->fileCatalog->selectImage (fname, false); return true; } break; // to avoid gcc complain - case GDK_x: // clear filters and synchronize filebrowser with image in Editor + case GDK_KEY_x: // clear filters and synchronize filebrowser with image in Editor if (!simpleEditor && fPanel && !fname.empty()) { - fPanel->fileCatalog->selectImage(fname, true); + fPanel->fileCatalog->selectImage (fname, true); return true; } @@ -1427,36 +1577,40 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) } else { // With control switch (event->keyval) { - case GDK_S: + case GDK_KEY_S: saveProfile(); - setProgressStr(M("PROGRESSBAR_PROCESSING_PROFILESAVED")); + setProgressStr (M ("PROGRESSBAR_PROCESSING_PROFILESAVED")); return true; - case GDK_s: - saveAsPressed(); + case GDK_KEY_s: + if (!gimpPlugin) { + saveAsPressed(); + } return true; - case GDK_b: - if (!simpleEditor) { + case GDK_KEY_b: + if (!gimpPlugin && !simpleEditor) { queueImgPressed(); } return true; - case GDK_e: - sendToGimpPressed(); + case GDK_KEY_e: + if (!gimpPlugin) { + sendToGimpPressed(); + } return true; - case GDK_z: + case GDK_KEY_z: history->undo (); return true; - case GDK_Z: + case GDK_KEY_Z: history->redo (); return true; - case GDK_F5: - openThm->openDefaultViewer(3); + case GDK_KEY_F5: + openThm->openDefaultViewer (3); return true; } } //if (!ctrl) @@ -1464,12 +1618,12 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) if (alt) { switch (event->keyval) { - case GDK_s: + case GDK_KEY_s: history->addBookmarkPressed (); - setProgressStr(M("PROGRESSBAR_SNAPSHOT_ADDED")); + setProgressStr (M ("PROGRESSBAR_SNAPSHOT_ADDED")); return true; - case GDK_f: + case GDK_KEY_f: iareapanel->imageArea->zoomPanel->zoomFitCropClicked(); return true; } @@ -1477,7 +1631,7 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) if (shift) { switch (event->keyval) { - case GDK_F3: // open Previous image from Editor's perspective + case GDK_KEY_F3: // open Previous image from Editor's perspective if (!simpleEditor && fPanel && !fname.empty()) { EditorPanel::openPreviousEditorImage(); return true; @@ -1485,7 +1639,7 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) break; // to avoid gcc complain - case GDK_F4: // open next image from Editor's perspective + case GDK_KEY_F4: // open next image from Editor's perspective if (!simpleEditor && fPanel && !fname.empty()) { EditorPanel::openNextEditorImage(); return true; @@ -1495,16 +1649,16 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) } } - if(tpc->getToolBar() && tpc->getToolBar()->handleShortcutKey(event)) { + if (tpc->getToolBar() && tpc->getToolBar()->handleShortcutKey (event)) { return true; } - if(tpc->handleShortcutKey(event)) { + if (tpc->handleShortcutKey (event)) { return true; } if (!simpleEditor && fPanel) { - if (fPanel->handleShortcutKey(event)) { + if (fPanel->handleShortcutKey (event)) { return true; } } @@ -1516,10 +1670,10 @@ void EditorPanel::procParamsChanged (Thumbnail* thm, int whoChangedIt) { if (whoChangedIt != EDITOR) { - PartialProfile pp(true); - pp.set(true); - *(pp.pparams) = openThm->getProcParams(); - tpc->profileChange (&pp, rtengine::EvProfileChangeNotification, M("PROGRESSDLG_PROFILECHANGEDINBROWSER")); + PartialProfile pp (true); + pp.set (true); + * (pp.pparams) = openThm->getProcParams(); + tpc->profileChange (&pp, rtengine::EvProfileChangeNotification, M ("PROGRESSDLG_PROFILECHANGEDINBROWSER")); pp.deleteInstance(); } } @@ -1529,39 +1683,41 @@ bool EditorPanel::idle_saveImage (ProgressConnector *pc, Gl rtengine::IImage16* img = pc->returnValue(); delete pc; - if( img ) { - setProgressStr(M("GENERAL_SAVE")); - setProgress(0.9f); + if ( img ) { + setProgressStr (M ("GENERAL_SAVE")); + setProgress (0.9f); ProgressConnector *ld = new ProgressConnector(); img->setSaveProgressListener (parent->getProgressListener()); if (sf.format == "tif") - ld->startFunc (sigc::bind(sigc::mem_fun(img, &rtengine::IImage16::saveAsTIFF), fname, sf.tiffBits, sf.tiffUncompressed), - sigc::bind(sigc::mem_fun(*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf)); + ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsTIFF), fname, sf.tiffBits, sf.tiffUncompressed), + sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf)); else if (sf.format == "png") - ld->startFunc (sigc::bind(sigc::mem_fun(img, &rtengine::IImage16::saveAsPNG), fname, sf.pngCompression, sf.pngBits), - sigc::bind(sigc::mem_fun(*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf)); + ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsPNG), fname, sf.pngCompression, sf.pngBits), + sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf)); else if (sf.format == "jpg") - ld->startFunc (sigc::bind(sigc::mem_fun(img, &rtengine::IImage16::saveAsJPEG), fname, sf.jpegQuality, sf.jpegSubSamp), - sigc::bind(sigc::mem_fun(*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf)); + ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsJPEG), fname, sf.jpegQuality, sf.jpegSubSamp), + sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_imageSaved), ld, img, fname, sf)); + else + delete ld; } else { - Glib::ustring msg_ = Glib::ustring("") + fname + ": Error during image processing\n"; + Glib::ustring msg_ = Glib::ustring ("") + fname + ": Error during image processing\n"; Gtk::MessageDialog msgd (*parent, msg_, true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); msgd.run (); - saveimgas->set_sensitive(true); - sendtogimp->set_sensitive(true); + saveimgas->set_sensitive (true); + sendtogimp->set_sensitive (true); isProcessing = false; } rtengine::ImageSource* imgsrc = isrc->getImageSource (); - imgsrc->setProgressListener(this); + imgsrc->setProgressListener (this); return false; } -bool EditorPanel::idle_imageSaved(ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf) +bool EditorPanel::idle_imageSaved (ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf) { img->free (); @@ -1578,19 +1734,19 @@ bool EditorPanel::idle_imageSaved(ProgressConnector *pc, rtengine::IImage16 pparams.save (fname + ".out" + paramFileExtension); } } else { - error(M("MAIN_MSG_CANNOTSAVE"), fname); + error (M ("MAIN_MSG_CANNOTSAVE"), fname); } - saveimgas->set_sensitive(true); - sendtogimp->set_sensitive(true); + saveimgas->set_sensitive (true); + sendtogimp->set_sensitive (true); - parent->setProgressStr(""); - parent->setProgress(0.); + parent->setProgressStr (""); + parent->setProgress (0.); - setProgressState(false); + setProgressState (false); delete pc; - SoundManager::playSoundAsync(options.sndBatchQueueDone); + SoundManager::playSoundAsync (options.sndBatchQueueDone); isProcessing = false; return false; } @@ -1603,9 +1759,9 @@ BatchQueueEntry* EditorPanel::createBatchQueueEntry () //rtengine::ProcessingJob* job = rtengine::ProcessingJob::create (ipc->getInitialImage(), pparams); rtengine::ProcessingJob* job = rtengine::ProcessingJob::create (openThm->getFileName (), openThm->getType() == FT_Raw, pparams); int fullW = 0, fullH = 0; - isrc->getImageSource()->getFullSize(fullW, fullH, pparams.coarse.rotate == 90 || pparams.coarse.rotate == 270 ? TR_R90 : TR_NONE); + isrc->getImageSource()->getFullSize (fullW, fullH, pparams.coarse.rotate == 90 || pparams.coarse.rotate == 270 ? TR_R90 : TR_NONE); int prevh = BatchQueue::calcMaxThumbnailHeight(); - int prevw = int((size_t)fullW * (size_t)prevh / (size_t)fullH); + int prevw = int ((size_t)fullW * (size_t)prevh / (size_t)fullH); return new BatchQueueEntry (job, pparams, openThm->getFileName(), prevw, prevh, openThm); } @@ -1621,11 +1777,12 @@ void EditorPanel::saveAsPressed () Glib::ustring fnameOut; SaveAsDialog* saveAsDialog; + auto toplevel = static_cast (get_toplevel ()); if (Glib::file_test (options.lastSaveAsPath, Glib::FILE_TEST_IS_DIR)) { - saveAsDialog = new SaveAsDialog (options.lastSaveAsPath); + saveAsDialog = new SaveAsDialog (options.lastSaveAsPath, toplevel); } else { - saveAsDialog = new SaveAsDialog (PlacesBrowser::userPicturesDir ()); + saveAsDialog = new SaveAsDialog (PlacesBrowser::userPicturesDir (), toplevel); } saveAsDialog->set_default_size (options.saveAsDialogWidth, options.saveAsDialogHeight); @@ -1654,7 +1811,7 @@ void EditorPanel::saveAsPressed () if (saveAsDialog->getImmediately ()) { // separate filename and the path to the destination directory Glib::ustring dstdir = Glib::path_get_dirname (fnameOut); - Glib::ustring dstfname = Glib::path_get_basename (removeExtension(fnameOut)); + Glib::ustring dstfname = Glib::path_get_basename (removeExtension (fnameOut)); Glib::ustring dstext = getExtension (fnameOut); if (saveAsDialog->getAutoSuffix()) { @@ -1689,10 +1846,10 @@ void EditorPanel::saveAsPressed () rtengine::ProcessingJob* job = rtengine::ProcessingJob::create (ipc->getInitialImage(), pparams); ProgressConnector *ld = new ProgressConnector(); - ld->startFunc(sigc::bind(sigc::ptr_fun(&rtengine::processImage), job, err, parent->getProgressListener(), options.tunnelMetaData, false ), - sigc::bind(sigc::mem_fun( *this, &EditorPanel::idle_saveImage ), ld, fnameOut, sf )); - saveimgas->set_sensitive(false); - sendtogimp->set_sensitive(false); + ld->startFunc (sigc::bind (sigc::ptr_fun (&rtengine::processImage), job, err, parent->getProgressListener(), options.tunnelMetaData, false ), + sigc::bind (sigc::mem_fun ( *this, &EditorPanel::idle_saveImage ), ld, fnameOut, sf )); + saveimgas->set_sensitive (false); + sendtogimp->set_sensitive (false); } } else { BatchQueueEntry* bqe = createBatchQueueEntry (); @@ -1733,35 +1890,59 @@ void EditorPanel::sendToGimpPressed () ipc->getParams (&pparams); rtengine::ProcessingJob* job = rtengine::ProcessingJob::create (ipc->getInitialImage(), pparams); ProgressConnector *ld = new ProgressConnector(); - ld->startFunc(sigc::bind(sigc::ptr_fun(&rtengine::processImage), job, err, parent->getProgressListener(), options.tunnelMetaData, false ), - sigc::bind(sigc::mem_fun( *this, &EditorPanel::idle_sendToGimp ), ld, openThm->getFileName() )); - saveimgas->set_sensitive(false); - sendtogimp->set_sensitive(false); + ld->startFunc (sigc::bind (sigc::ptr_fun (&rtengine::processImage), job, err, parent->getProgressListener(), options.tunnelMetaData, false ), + sigc::bind (sigc::mem_fun ( *this, &EditorPanel::idle_sendToGimp ), ld, openThm->getFileName() )); + saveimgas->set_sensitive (false); + sendtogimp->set_sensitive (false); +} + + +bool EditorPanel::saveImmediately(const Glib::ustring &filename, const SaveFormat &sf) +{ + rtengine::procparams::ProcParams pparams; + ipc->getParams (&pparams); + rtengine::ProcessingJob *job = rtengine::ProcessingJob::create(ipc->getInitialImage(), pparams); + + // save immediately + rtengine::IImage16 *img = rtengine::processImage(job, err, nullptr, options.tunnelMetaData, false); + + int err = 0; + if (sf.format == "tif") { + err = img->saveAsTIFF(filename, sf.tiffBits, sf.tiffUncompressed); + } else if (sf.format == "png") { + err = img->saveAsPNG(filename, sf.pngCompression, sf.pngBits); + } else if (sf.format == "jpg") { + err = img->saveAsJPEG(filename, sf.jpegQuality, sf.jpegSubSamp); + } else { + err = 1; + } + img->free(); + return !err; } void EditorPanel::openPreviousEditorImage() { if (!simpleEditor && fPanel && !fname.empty()) { - fPanel->fileCatalog->openNextPreviousEditorImage(fname, false, NAV_PREVIOUS); + fPanel->fileCatalog->openNextPreviousEditorImage (fname, false, NAV_PREVIOUS); } } void EditorPanel::openNextEditorImage() { if (!simpleEditor && fPanel && !fname.empty()) { - fPanel->fileCatalog->openNextPreviousEditorImage(fname, false, NAV_NEXT); + fPanel->fileCatalog->openNextPreviousEditorImage (fname, false, NAV_NEXT); } } void EditorPanel::syncFileBrowser() // synchronize filebrowser with image in Editor { if (!simpleEditor && fPanel && !fname.empty()) { - fPanel->fileCatalog->selectImage(fname, false); + fPanel->fileCatalog->selectImage (fname, false); } } -bool EditorPanel::idle_sendToGimp( ProgressConnector *pc, Glib::ustring fname) +bool EditorPanel::idle_sendToGimp ( ProgressConnector *pc, Glib::ustring fname) { rtengine::IImage16* img = pc->returnValue(); @@ -1781,6 +1962,7 @@ bool EditorPanel::idle_sendToGimp( ProgressConnector *pc, G Glib::ustring fileName = Glib::ustring::compose ("%1.%2", fname, sf.format); + // TODO: Just list all file with a suitable name instead of brute force... int tries = 1; while (Glib::file_test (fileName, Glib::FILE_TEST_EXISTS) && tries < 1000) { @@ -1795,30 +1977,30 @@ bool EditorPanel::idle_sendToGimp( ProgressConnector *pc, G ProgressConnector *ld = new ProgressConnector(); img->setSaveProgressListener (parent->getProgressListener()); - ld->startFunc (sigc::bind(sigc::mem_fun(img, &rtengine::IImage16::saveAsTIFF), fileName, sf.tiffBits, sf.tiffUncompressed), - sigc::bind(sigc::mem_fun(*this, &EditorPanel::idle_sentToGimp), ld, img, fileName)); + ld->startFunc (sigc::bind (sigc::mem_fun (img, &rtengine::IImage16::saveAsTIFF), fileName, sf.tiffBits, sf.tiffUncompressed), + sigc::bind (sigc::mem_fun (*this, &EditorPanel::idle_sentToGimp), ld, img, fileName)); } else { - Glib::ustring msg_ = Glib::ustring(" Error during image processing\n"); + Glib::ustring msg_ = Glib::ustring (" Error during image processing\n"); Gtk::MessageDialog msgd (*parent, msg_, true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); msgd.run (); - saveimgas->set_sensitive(true); - sendtogimp->set_sensitive(true); + saveimgas->set_sensitive (true); + sendtogimp->set_sensitive (true); } return false; } -bool EditorPanel::idle_sentToGimp(ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring filename) +bool EditorPanel::idle_sentToGimp (ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring filename) { img->free (); int errore = pc->returnValue(); delete pc; if (!errore) { - saveimgas->set_sensitive(true); - sendtogimp->set_sensitive(true); - parent->setProgressStr(""); - parent->setProgress(0.); + saveimgas->set_sensitive (true); + sendtogimp->set_sensitive (true); + parent->setProgressStr (""); + parent->setProgress (0.); bool success = false; if (options.editorToSendTo == 1) { @@ -1853,7 +2035,7 @@ void EditorPanel::historyBeforeLineChanged (const rtengine::procparams::ProcPara void EditorPanel::beforeAfterToggled () { - if(!ipc) { + if (!ipc) { return; } @@ -1889,7 +2071,7 @@ void EditorPanel::beforeAfterToggled () int errorCode = 0; rtengine::InitialImage *beforeImg = rtengine::InitialImage::load ( isrc->getImageSource ()->getFileName(), openThm->getType() == FT_Raw , &errorCode, nullptr); - if( !beforeImg || errorCode ) { + if ( !beforeImg || errorCode ) { return; } @@ -1898,26 +2080,26 @@ void EditorPanel::beforeAfterToggled () int HeaderBoxHeight = 17; beforeLabel = Gtk::manage (new Gtk::Label ()); - beforeLabel->set_markup (Glib::ustring("") + M("GENERAL_BEFORE") + ""); + beforeLabel->set_markup (Glib::ustring ("") + M ("GENERAL_BEFORE") + ""); tbBeforeLock = Gtk::manage (new Gtk::ToggleButton ()); - tbBeforeLock->set_tooltip_markup (M("MAIN_TOOLTIP_BEFOREAFTERLOCK")); - tbBeforeLock->signal_toggled().connect( sigc::mem_fun(*this, &EditorPanel::tbBeforeLock_toggled) ); + tbBeforeLock->set_tooltip_markup (M ("MAIN_TOOLTIP_BEFOREAFTERLOCK")); + tbBeforeLock->signal_toggled().connect ( sigc::mem_fun (*this, &EditorPanel::tbBeforeLock_toggled) ); beforeHeaderBox = Gtk::manage (new Gtk::HBox ()); beforeHeaderBox->pack_end (*tbBeforeLock, Gtk::PACK_SHRINK, 2); beforeHeaderBox->pack_end (*beforeLabel, Gtk::PACK_SHRINK, 2); - beforeHeaderBox->set_size_request(0, HeaderBoxHeight); + beforeHeaderBox->set_size_request (0, HeaderBoxHeight); history->blistenerLock ? tbBeforeLock->set_image (*iBeforeLockON) : tbBeforeLock->set_image (*iBeforeLockOFF); - tbBeforeLock->set_active(history->blistenerLock); + tbBeforeLock->set_active (history->blistenerLock); beforeBox = Gtk::manage (new Gtk::VBox ()); beforeBox->pack_start (*beforeHeaderBox, Gtk::PACK_SHRINK, 2); beforeBox->pack_start (*beforeIarea); afterLabel = Gtk::manage (new Gtk::Label ()); - afterLabel->set_markup (Glib::ustring("") + M("GENERAL_AFTER") + ""); + afterLabel->set_markup (Glib::ustring ("") + M ("GENERAL_AFTER") + ""); afterHeaderBox = Gtk::manage (new Gtk::HBox ()); - afterHeaderBox->set_size_request(0, HeaderBoxHeight); + afterHeaderBox->set_size_request (0, HeaderBoxHeight); afterHeaderBox->pack_end (*afterLabel, Gtk::PACK_SHRINK, 2); afterBox->pack_start (*afterHeaderBox, Gtk::PACK_SHRINK, 2); afterBox->reorder_child (*afterHeaderBox, 0); @@ -1934,8 +2116,8 @@ void EditorPanel::beforeAfterToggled () beforeIarea->imageArea->setPreviewHandler (beforePreviewHandler); beforeIarea->imageArea->setImProcCoordinator (beforeIpc); - beforeIarea->imageArea->setPreviewModePanel(iareapanel->imageArea->previewModePanel); - beforeIarea->imageArea->setIndicateClippedPanel(iareapanel->imageArea->indClippedPanel); + beforeIarea->imageArea->setPreviewModePanel (iareapanel->imageArea->previewModePanel); + beforeIarea->imageArea->setIndicateClippedPanel (iareapanel->imageArea->indClippedPanel); iareapanel->imageArea->iLinkedImageArea = beforeIarea->imageArea; iareapanel->setBeforeAfterViews (beforeIarea, iareapanel); @@ -2017,6 +2199,11 @@ void EditorPanel::tbShowHideSidePanels_managestate() ShowHideSidePanelsconn.block (false); } +void EditorPanel::updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC) +{ + colorMgmtToolBar->canSoftProof(!printerProfile.empty() && printerProfile != "None"); +} + void EditorPanel::updateTPVScrollbar (bool hide) { tpc->updateTPVScrollbar (hide); @@ -2036,12 +2223,6 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition) // No histogram if (!oldPosition) { // An histogram actually exist, we delete it - if (oldPosition == 1) { - removeIfThere(leftbox, histogramPanel, false); - } else if (oldPosition == 2) { - removeIfThere(vboxright, histogramPanel, false); - } - delete histogramPanel; histogramPanel = nullptr; } @@ -2059,13 +2240,13 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition) } else if (oldPosition == 2) { // The histogram was on the right side, so we move it to the left histogramPanel->reference(); - removeIfThere(vboxright, histogramPanel, false); + removeIfThere (vboxright, histogramPanel, false); leftbox->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); histogramPanel->unreference(); } - histogramPanel->reorder(Gtk::ALIGN_LEFT); - leftbox->reorder_child(*histogramPanel, 0); + histogramPanel->reorder (Gtk::POS_LEFT); + leftbox->reorder_child (*histogramPanel, 0); break; case 2: @@ -2079,15 +2260,22 @@ void EditorPanel::updateHistogramPosition (int oldPosition, int newPosition) } else if (oldPosition == 1) { // The histogram was on the left side, so we move it to the right histogramPanel->reference(); - removeIfThere(leftbox, histogramPanel, false); + removeIfThere (leftbox, histogramPanel, false); vboxright->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 2); histogramPanel->unreference(); } - histogramPanel->reorder(Gtk::ALIGN_RIGHT); - vboxright->reorder_child(*histogramPanel, 0); + histogramPanel->reorder (Gtk::POS_RIGHT); + vboxright->reorder_child (*histogramPanel, 0); break; } iareapanel->imageArea->setPointerMotionHListener (histogramPanel); } + + +void EditorPanel::defaultMonitorProfileChanged(const Glib::ustring &profile_name, bool auto_monitor_profile) +{ + colorMgmtToolBar->defaultMonitorProfileChanged(profile_name, auto_monitor_profile); +} + diff --git a/rtgui/editorpanel.h b/rtgui/editorpanel.h index ac2be9566..d3d0eeaf7 100644 --- a/rtgui/editorpanel.h +++ b/rtgui/editorpanel.h @@ -36,6 +36,8 @@ #include "filepanel.h" class EditorPanel; +class MyProgressBar; + struct EditorPanelIdleHelper { EditorPanel* epanel; bool destroyed; @@ -43,117 +45,37 @@ struct EditorPanelIdleHelper { }; class RTWindow; -class EditorPanel : public Gtk::VBox, +class EditorPanel final : + public Gtk::VBox, public PParamsChangeListener, public rtengine::ProgressListener, public ThumbnailListener, public HistoryBeforeLineListener, public rtengine::HistogramListener { -private: - - Glib::ustring lastSaveAsFileName; - bool realized; - -protected: - Gtk::ProgressBar *progressLabel; - Gtk::ToggleButton* info; - Gtk::ToggleButton* hidehp; - Gtk::ToggleButton* tbShowHideSidePanels; - Gtk::ToggleButton* tbTopPanel_1; - Gtk::ToggleButton* tbRightPanel_1; - Gtk::ToggleButton* tbBeforeLock; - //bool bAllSidePanelsVisible; - Gtk::ToggleButton* beforeAfter; - Gtk::HPaned* hpanedl; - Gtk::HPaned* hpanedr; - Gtk::HBox* statusBox; - Gtk::Image *iHistoryShow, *iHistoryHide; - Gtk::Image *iTopPanel_1_Show, *iTopPanel_1_Hide; - Gtk::Image *iRightPanel_1_Show, *iRightPanel_1_Hide; - Gtk::Image *iShowHideSidePanels; - Gtk::Image *iShowHideSidePanels_exit; - Gtk::Image *iBeforeLockON, *iBeforeLockOFF; - Gtk::VBox *leftbox; - Gtk::VBox *vboxright; - - Gtk::Button* queueimg; - Gtk::Button* saveimgas; - Gtk::Button* sendtogimp; - Gtk::Button* navSync; - Gtk::Button* navNext; - Gtk::Button* navPrev; - - class ColorManagementToolbar; - std::unique_ptr colorMgmtToolBar; - - ImageAreaPanel* iareapanel; - PreviewHandler* previewHandler; - PreviewHandler* beforePreviewHandler; // for the before-after view - Navigator* navigator; - ImageAreaPanel* beforeIarea; // for the before-after view - Gtk::VBox* beforeBox; - Gtk::VBox* afterBox; - Gtk::Label* beforeLabel; - Gtk::Label* afterLabel; - Gtk::HBox* beforeAfterBox; - Gtk::HBox* beforeHeaderBox; - Gtk::HBox* afterHeaderBox; - - Gtk::Frame* ppframe; - ProfilePanel* profilep; - History* history; - HistogramPanel* histogramPanel; - ToolPanelCoordinator* tpc; - RTWindow* parent; - //SaveAsDialog* saveAsDialog; - BatchToolPanelCoordinator* btpCoordinator; - FilePanel* fPanel; - - bool firstProcessingDone; - - Thumbnail* openThm; // may get invalid on external delete event - Glib::ustring fname; // must be saved separately - - rtengine::InitialImage* isrc; - rtengine::StagedImageProcessor* ipc; - rtengine::StagedImageProcessor* beforeIpc; // for the before-after view - - EditorPanelIdleHelper* epih; - - void close (); - - BatchQueueEntry* createBatchQueueEntry (); - bool idle_imageSaved(ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf); - bool idle_saveImage(ProgressConnector *pc, Glib::ustring fname, SaveFormat sf); - bool idle_sendToGimp( ProgressConnector *pc, Glib::ustring fname); - bool idle_sentToGimp(ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring filename); - int err; - - time_t processingStartedTime; - - sigc::connection ShowHideSidePanelsconn; - - bool isProcessing; - - public: explicit EditorPanel (FilePanel* filePanel = nullptr); - virtual ~EditorPanel (); + ~EditorPanel (); void open (Thumbnail* tmb, rtengine::InitialImage* isrc); void setAspect (); void on_realize (); - void leftPaneButtonReleased(GdkEventButton *event); - void rightPaneButtonReleased(GdkEventButton *event); + void leftPaneButtonReleased (GdkEventButton *event); + void rightPaneButtonReleased (GdkEventButton *event); void setParent (RTWindow* p) { parent = p; } + + void setParentWindow (Gtk::Window* p) + { + parentWindow = p; + } + void writeOptions(); - void showTopPanel(bool show); + void showTopPanel (bool show); bool isRealized() { return realized; @@ -208,11 +130,102 @@ public: { return isProcessing; } + void updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC); void updateTPVScrollbar (bool hide); void updateTabsUsesIcons (bool useIcons); void updateHistogramPosition (int oldPosition, int newPosition); - Gtk::Paned *catalogPane; + void defaultMonitorProfileChanged(const Glib::ustring &profile_name, bool auto_monitor_profile); + + bool saveImmediately(const Glib::ustring &filename, const SaveFormat &sf); + + Gtk::Paned* catalogPane; + +private: + void close (); + + BatchQueueEntry* createBatchQueueEntry (); + bool idle_imageSaved (ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring fname, SaveFormat sf); + bool idle_saveImage (ProgressConnector *pc, Glib::ustring fname, SaveFormat sf); + bool idle_sendToGimp ( ProgressConnector *pc, Glib::ustring fname); + bool idle_sentToGimp (ProgressConnector *pc, rtengine::IImage16* img, Glib::ustring filename); + + Glib::ustring lastSaveAsFileName; + bool realized; + + MyProgressBar *progressLabel; + Gtk::ToggleButton* info; + Gtk::ToggleButton* hidehp; + Gtk::ToggleButton* tbShowHideSidePanels; + Gtk::ToggleButton* tbTopPanel_1; + Gtk::ToggleButton* tbRightPanel_1; + Gtk::ToggleButton* tbBeforeLock; + //bool bAllSidePanelsVisible; + Gtk::ToggleButton* beforeAfter; + Gtk::Paned* hpanedl; + Gtk::Paned* hpanedr; + Gtk::Image *iHistoryShow, *iHistoryHide; + Gtk::Image *iTopPanel_1_Show, *iTopPanel_1_Hide; + Gtk::Image *iRightPanel_1_Show, *iRightPanel_1_Hide; + Gtk::Image *iShowHideSidePanels; + Gtk::Image *iShowHideSidePanels_exit; + Gtk::Image *iBeforeLockON, *iBeforeLockOFF; + Gtk::VBox *leftbox; + Gtk::VBox *vboxright; + + Gtk::Button* queueimg; + Gtk::Button* saveimgas; + Gtk::Button* sendtogimp; + Gtk::Button* navSync; + Gtk::Button* navNext; + Gtk::Button* navPrev; + + class ColorManagementToolbar; + std::unique_ptr colorMgmtToolBar; + + ImageAreaPanel* iareapanel; + PreviewHandler* previewHandler; + PreviewHandler* beforePreviewHandler; // for the before-after view + Navigator* navigator; + ImageAreaPanel* beforeIarea; // for the before-after view + Gtk::VBox* beforeBox; + Gtk::VBox* afterBox; + Gtk::Label* beforeLabel; + Gtk::Label* afterLabel; + Gtk::HBox* beforeAfterBox; + Gtk::HBox* beforeHeaderBox; + Gtk::HBox* afterHeaderBox; + + Gtk::Frame* ppframe; + ProfilePanel* profilep; + History* history; + HistogramPanel* histogramPanel; + ToolPanelCoordinator* tpc; + RTWindow* parent; + Gtk::Window* parentWindow; + //SaveAsDialog* saveAsDialog; + FilePanel* fPanel; + + bool firstProcessingDone; + + Thumbnail* openThm; // may get invalid on external delete event + Glib::ustring fname; // must be saved separately + + rtengine::InitialImage* isrc; + rtengine::StagedImageProcessor* ipc; + rtengine::StagedImageProcessor* beforeIpc; // for the before-after view + + EditorPanelIdleHelper* epih; + + int err; + + time_t processingStartedTime; + + sigc::connection ShowHideSidePanelsconn; + + bool isProcessing; + + IdleRegister idle_register; }; #endif diff --git a/rtgui/editwindow.cc b/rtgui/editwindow.cc index 3115d9c1f..f42bf4739 100644 --- a/rtgui/editwindow.cc +++ b/rtgui/editwindow.cc @@ -23,15 +23,16 @@ #include #include "rtimage.h" #include "threadutils.h" +#include "../rtengine/icons.h" // Check if the system has more than one display and option is set bool EditWindow::isMultiDisplayEnabled() { - return options.multiDisplayMode > 0 && Gdk::Screen::get_default()->get_n_monitors () > 1; + return options.multiDisplayMode > 0 && Gdk::Screen::get_default()->get_n_monitors() > 1; } // Should only be created once, auto-creates window on correct display -EditWindow* EditWindow::getInstance(RTWindow* p) +EditWindow* EditWindow::getInstance(RTWindow* p, bool restore) { struct EditWindowInstance { @@ -39,27 +40,21 @@ EditWindow* EditWindow::getInstance(RTWindow* p) explicit EditWindowInstance(RTWindow* p) : editWnd(p) { - // Determine the other display and maximize the window on that - const Glib::RefPtr< Gdk::Window >& wnd = p->get_window(); - int monNo = p->get_screen()->get_monitor_at_window (wnd); - - Gdk::Rectangle lMonitorRect; - editWnd.get_screen()->get_monitor_geometry(isMultiDisplayEnabled() ? (monNo == 0 ? 1 : 0) : monNo, lMonitorRect); - editWnd.move(lMonitorRect.get_x(), lMonitorRect.get_y()); - editWnd.maximize(); } }; static EditWindowInstance instance_(p); - instance_.editWnd.show_all(); + if(restore) { + instance_.editWnd.restoreWindow(); + } return &instance_.editWnd; } -EditWindow::EditWindow (RTWindow* p) : parent(p) , isFullscreen(false) +EditWindow::EditWindow (RTWindow* p) : parent(p) , isFullscreen(false), isClosed(true) { - Glib::ustring fName = "rt-logo.png"; - Glib::ustring fullPath = RTImage::findIconAbsolutePath(fName); + Glib::ustring fName = "rt-logo-tiny.png"; + Glib::ustring fullPath = rtengine::findIconAbsolutePath(fName); try { set_default_icon_from_file (fullPath); @@ -68,12 +63,11 @@ EditWindow::EditWindow (RTWindow* p) : parent(p) , isFullscreen(false) } set_title_decorated(""); - property_allow_shrink() = true; set_modal(false); set_resizable(true); + set_default_size(options.meowWidth, options.meowHeight); property_destroy_with_parent().set_value(false); - signal_window_state_event().connect( sigc::mem_fun(*this, &EditWindow::on_window_state_event) ); mainNB = Gtk::manage (new Gtk::Notebook ()); mainNB->set_scrollable (true); @@ -85,33 +79,83 @@ EditWindow::EditWindow (RTWindow* p) : parent(p) , isFullscreen(false) mainBox->pack_start (*mainNB); add (*mainBox); - show_all (); + +} + +void EditWindow::restoreWindow() { + + if(isClosed) { + int meowMonitor = 0; + if(isMultiDisplayEnabled()) { + if(options.meowMonitor >= 0) { // use display from last session if available + meowMonitor = std::min(options.meowMonitor, Gdk::Screen::get_default()->get_n_monitors() - 1); + } else { // Determine the other display + const Glib::RefPtr< Gdk::Window >& wnd = parent->get_window(); + meowMonitor = parent->get_screen()->get_monitor_at_window(wnd) == 0 ? 1 : 0; + } + } + + Gdk::Rectangle lMonitorRect; + get_screen()->get_monitor_geometry(meowMonitor, lMonitorRect); + if(options.meowMaximized) { + move(lMonitorRect.get_x(), lMonitorRect.get_y()); + maximize(); + } else { + resize(options.meowWidth, options.meowHeight); + if(options.meowX <= lMonitorRect.get_x() + lMonitorRect.get_width() && options.meowY <= lMonitorRect.get_y() + lMonitorRect.get_height()) { + move(options.meowX, options.meowY); + } else { + move(lMonitorRect.get_x(), lMonitorRect.get_y()); + } + } + show_all(); + + isFullscreen = options.meowFullScreen; + + if(isFullscreen) { + fullscreen(); + } + + isClosed = false; + } + } void EditWindow::on_realize () { Gtk::Window::on_realize (); - cursorManager.init (get_window()); + editWindowCursorManager.init (get_window()); } -bool EditWindow::on_window_state_event(GdkEventWindowState* event) +bool EditWindow::on_configure_event(GdkEventConfigure* event) { - if (!event->new_window_state) { - // Window mode - options.windowMaximized = false; - } else if (event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN)) { - // Fullscreen mode - options.windowMaximized = true; + if (get_realized() && is_visible()) { + if(!is_maximized()) { + get_position(options.meowX, options.meowY); + get_size(options.meowWidth, options.meowHeight); + } + options.meowMaximized = is_maximized(); } - return true; + return Gtk::Widget::on_configure_event(event); } -void EditWindow::on_mainNB_switch_page(GtkNotebookPage* page, guint page_num) +/* HOMBRE: Disabling this since it's maximized when opened anyway. + * Someday, the EditorWindow migh save it own position and state, so it'll have to be uncommented +bool EditWindow::on_window_state_event(GdkEventWindowState* event) +{ + if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) { + options.windowMaximized = event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED; + } + + return Gtk::Widget::on_window_state_event(event); +}*/ + +void EditWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num) { //if (page_num > 1) { - EditorPanel *ep = static_cast(mainNB->get_nth_page(page_num)); + EditorPanel *ep = static_cast(widget); if (mainNB->get_n_pages() > 1 && page_num <= (filesEdited.size() - 1)) { set_title_decorated(ep->getFileName()); @@ -124,6 +168,7 @@ void EditWindow::on_mainNB_switch_page(GtkNotebookPage* page, guint page_num) void EditWindow::addEditorPanel (EditorPanel* ep, const std::string &name) { ep->setParent (parent); + ep->setParentWindow(this); // construct closeable tab for the image Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); @@ -134,12 +179,10 @@ void EditWindow::addEditorPanel (EditorPanel* ep, const std::string &name) closeb->set_image (*Gtk::manage(new RTImage ("gtk-close.png"))); closeb->set_relief (Gtk::RELIEF_NONE); closeb->set_focus_on_click (false); - // make the button as small as possible - Glib::RefPtr style = Gtk::RcStyle::create (); - style->set_xthickness (0); - style->set_ythickness (0); - closeb->modify_style (style); + // make the button as small as possible thanks via css + closeb->set_name("notebook_close_button"); + closeb->signal_clicked().connect( sigc::bind (sigc::mem_fun(*this, &EditWindow::remEditorPanel) , ep)); hb->pack_end (*closeb); hb->set_spacing (2); @@ -192,16 +235,24 @@ bool EditWindow::selectEditorPanel(const std::string &name) return false; } +void EditWindow::toFront () +{ + // when using the secondary window on the same monitor as the primary window we need to present the secondary window. + // If we don't, it will stay in background when opening 2nd, 3rd... editor, which is annoying + // It will also deiconify the window + present(); +} + bool EditWindow::keyPressed (GdkEventKey* event) { bool ctrl = event->state & GDK_CONTROL_MASK; - if(event->keyval == GDK_F11) { + if(event->keyval == GDK_KEY_F11) { toggleFullscreen(); return true; } else { if(mainNB->get_n_pages () > 0) { //pass the handling for the editor panels, if there are any - if (event->keyval == GDK_w && ctrl) { //remove editor panel + if (event->keyval == GDK_KEY_w && ctrl) { //remove editor panel EditorPanel* ep = static_cast(mainNB->get_nth_page (mainNB->get_current_page())); remEditorPanel (ep); return true; @@ -219,22 +270,70 @@ bool EditWindow::keyPressed (GdkEventKey* event) void EditWindow::toggleFullscreen () { isFullscreen ? unfullscreen() : fullscreen(); - isFullscreen = !isFullscreen; + options.meowFullScreen = isFullscreen = !isFullscreen; } +void EditWindow::writeOptions() { + + if(is_visible()) { + if(isMultiDisplayEnabled()) { + options.meowMonitor = get_screen()->get_monitor_at_window(get_window()); + } + + options.meowMaximized = is_maximized(); + get_position(options.meowX, options.meowY); + get_size(options.meowWidth,options.meowHeight); + } +} bool EditWindow::on_delete_event(GdkEventAny* event) { - // Check if any editor is still processing, and do NOT quit if so. Otherwise crashes and inconsistent caches - bool isProcessing = false; - for ( std::set ::iterator iter = filesEdited.begin(); iter != filesEdited.end() && !isProcessing; ++iter ) { + if (!closeOpenEditors()) { + return true; + } + + writeOptions(); + hide(); + isClosed = true; + + return false; +} + +bool EditWindow::isProcessing () +{ + for ( std::set ::iterator iter = filesEdited.begin(); iter != filesEdited.end(); ++iter ) { if (epanels[*iter]->getIsProcessing()) { - isProcessing = true; + return true; } } - if (isProcessing) { - return true; + return false; +} + +bool EditWindow::closeOpenEditors() +{ + // Check if any editor is still processing, and do NOT quit if so. Otherwise crashes and inconsistent caches + if (isProcessing()) { + return false; + } + + if (epanels.size()) { + int page = mainNB->get_current_page(); + Gtk::Widget *w = mainNB->get_nth_page(page); + bool optionsWritten = false; + + for (std::map::iterator i = epanels.begin(); i != epanels.end(); ++i) { + if (i->second == w) { + i->second->writeOptions(); + optionsWritten = true; + } + } + + if (!optionsWritten) { + // fallback solution: save the options of the first editor panel + std::map::iterator i = epanels.begin(); + i->second->writeOptions(); + } } for ( std::set ::iterator iter = filesEdited.begin(); iter != filesEdited.end(); ++iter ) { @@ -242,12 +341,10 @@ bool EditWindow::on_delete_event(GdkEventAny* event) } epanels.clear(); - filesEdited.clear(); parent->fpanel->refreshEditedState (filesEdited); - hide (); - return false; + return true; } void EditWindow::set_title_decorated(Glib::ustring fname) diff --git a/rtgui/editwindow.h b/rtgui/editwindow.h index 9315b0eb9..8cf93dbf8 100644 --- a/rtgui/editwindow.h +++ b/rtgui/editwindow.h @@ -33,27 +33,33 @@ private: std::map epanels; bool isFullscreen; + bool isClosed; void toggleFullscreen (); + void restoreWindow(); public: // Check if the system has more than one display and option is set static bool isMultiDisplayEnabled(); // Should only be created once, auto-creates window on correct display - static EditWindow* getInstance(RTWindow* p); + static EditWindow* getInstance(RTWindow* p, bool restore = true); explicit EditWindow (RTWindow* p); + void writeOptions(); void addEditorPanel (EditorPanel* ep, const std::string &name); void remEditorPanel (EditorPanel* ep); bool selectEditorPanel(const std::string &name); + bool closeOpenEditors(); + bool isProcessing(); + void toFront(); bool keyPressed (GdkEventKey* event); + bool on_configure_event(GdkEventConfigure* event); bool on_delete_event(GdkEventAny* event); - bool on_window_state_event(GdkEventWindowState* event); - void on_mainNB_switch_page(GtkNotebookPage* page, guint page_num); + //bool on_window_state_event(GdkEventWindowState* event); + void on_mainNB_switch_page(Gtk::Widget* page, guint page_num); void set_title_decorated(Glib::ustring fname); - void on_realize (); }; diff --git a/rtgui/epd.cc b/rtgui/epd.cc index 15f15f607..d7848aee0 100644 --- a/rtgui/epd.cc +++ b/rtgui/epd.cc @@ -30,8 +30,8 @@ EdgePreservingDecompositionUI::EdgePreservingDecompositionUI () : FoldableToolPa 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.)); - 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.3)); + edgeStopping = Gtk::manage(new Adjuster (M("TP_EPD_EDGESTOPPING"), 0.1, 4.0, 0.01, 0.5)); + scale = Gtk::manage(new Adjuster (M("TP_EPD_SCALE"), 0.1, 10.0, 0.01, 0.1)); reweightingIterates = Gtk::manage(new Adjuster (M("TP_EPD_REWEIGHTINGITERATES"), 0, 9, 1, 0)); strength->setAdjusterListener(this); diff --git a/rtgui/exiffiltersettings.h b/rtgui/exiffiltersettings.h index f462ddc30..d692eb510 100644 --- a/rtgui/exiffiltersettings.h +++ b/rtgui/exiffiltersettings.h @@ -36,8 +36,8 @@ public: double shutterTo; double focalFrom; double focalTo; - int isoFrom; - int isoTo; + unsigned isoFrom; + unsigned isoTo; bool filterFNumber; bool filterShutter; diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index 2decd48eb..34cb2c064 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -38,7 +38,6 @@ ExifPanel::ExifPanel () : idata(nullptr) exifTree->set_reorderable(false); exifTree->set_enable_search(true); exifTree->get_selection()->set_mode (Gtk::SELECTION_MULTIPLE); - scrolledWindow->set_border_width(2); scrolledWindow->set_shadow_type(Gtk::SHADOW_NONE); scrolledWindow->set_policy(Gtk::POLICY_ALWAYS, Gtk::POLICY_ALWAYS); scrolledWindow->property_window_placement().set_value(Gtk::CORNER_TOP_LEFT); @@ -54,10 +53,16 @@ ExifPanel::ExifPanel () : idata(nullptr) Gtk::TreeView::Column *viewcol = Gtk::manage(new Gtk::TreeView::Column ("Field Name")); Gtk::CellRendererPixbuf* render_pb = Gtk::manage(new Gtk::CellRendererPixbuf ()); Gtk::CellRendererText *render_txt = Gtk::manage(new Gtk::CellRendererText()); + render_txt->property_ellipsize() = Pango::ELLIPSIZE_END; viewcol->pack_start (*render_pb, false); viewcol->pack_start (*render_txt, true); viewcol->add_attribute (*render_pb, "pixbuf", exifColumns.icon); viewcol->add_attribute (*render_txt, "markup", exifColumns.field); + viewcol->set_expand(true); + viewcol->set_resizable (true); + viewcol->set_fixed_width(35); + viewcol->set_min_width(35); + viewcol->set_sizing(Gtk::TREE_VIEW_COLUMN_AUTOSIZE); render_pb->property_ypad() = 0; render_txt->property_ypad() = 0; @@ -68,8 +73,14 @@ ExifPanel::ExifPanel () : idata(nullptr) Gtk::TreeView::Column *viewcolv = Gtk::manage(new Gtk::TreeView::Column ("Value")); Gtk::CellRendererText *render_txtv = Gtk::manage(new Gtk::CellRendererText()); + render_txtv->property_ellipsize() = Pango::ELLIPSIZE_END; viewcolv->pack_start (*render_txtv, true); viewcolv->add_attribute (*render_txtv, "markup", exifColumns.value); + viewcolv->set_expand(true); + viewcolv->set_resizable (true); + viewcol->set_fixed_width(35); + viewcolv->set_min_width(35); + viewcolv->set_sizing(Gtk::TREE_VIEW_COLUMN_AUTOSIZE); render_txtv->property_ypad() = 0; @@ -77,33 +88,49 @@ ExifPanel::ExifPanel () : idata(nullptr) pack_start (*scrolledWindow); - Gtk::HBox* buttons1 = Gtk::manage(new Gtk::HBox ()); - Gtk::HBox* buttons2 = Gtk::manage(new Gtk::HBox ()); + Gtk::Grid* buttons1 = Gtk::manage(new Gtk::Grid()); + buttons1->set_row_homogeneous(true); + buttons1->set_column_homogeneous(true); + setExpandAlignProperties(buttons1, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Grid* buttons2 = Gtk::manage(new Gtk::Grid()); + buttons2->set_row_homogeneous(true); + buttons2->set_column_homogeneous(true); + setExpandAlignProperties(buttons2, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - remove = Gtk::manage(new Gtk::Button (M("EXIFPANEL_REMOVE"))); + remove = Gtk::manage(new Gtk::Button ()); // M("EXIFPANEL_REMOVE") remove->set_image (*Gtk::manage(new Gtk::Image (delicon))); remove->set_tooltip_text (M("EXIFPANEL_REMOVEHINT")); - buttons1->pack_start (*remove); + remove->get_style_context()->add_class("Left"); + setExpandAlignProperties(remove, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + buttons1->attach_next_to(*remove, Gtk::POS_LEFT, 1, 1); - keep = Gtk::manage(new Gtk::Button (M("EXIFPANEL_KEEP"))); + keep = Gtk::manage(new Gtk::Button ()); // M("EXIFPANEL_KEEP") keep->set_image (*Gtk::manage(new Gtk::Image (keepicon))); keep->set_tooltip_text (M("EXIFPANEL_KEEPHINT")); - buttons1->pack_start (*keep); + keep->get_style_context()->add_class("MiddleH"); + setExpandAlignProperties(keep, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + buttons1->attach_next_to(*keep, Gtk::POS_RIGHT, 1, 1); - add = Gtk::manage(new Gtk::Button (M("EXIFPANEL_ADDEDIT"))); + add = Gtk::manage(new Gtk::Button ()); // M("EXIFPANEL_ADDEDIT") add->set_image (*Gtk::manage(new Gtk::Image (editicon))); add->set_tooltip_text (M("EXIFPANEL_ADDEDITHINT")); - buttons1->pack_start (*add); + add->get_style_context()->add_class("Right"); + setExpandAlignProperties(add, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + buttons1->attach_next_to(*add, Gtk::POS_RIGHT, 1, 1); - reset = Gtk::manage(new Gtk::Button (M("EXIFPANEL_RESET"))); + reset = Gtk::manage(new Gtk::Button ()); // M("EXIFPANEL_RESET") reset->set_image (*Gtk::manage(new RTImage ("gtk-undo-ltr.png", "gtk-undo-rtl.png"))); reset->set_tooltip_text (M("EXIFPANEL_RESETHINT")); - buttons2->pack_start (*reset); + reset->get_style_context()->add_class("Left"); + setExpandAlignProperties(reset, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + buttons2->attach_next_to(*reset, Gtk::POS_LEFT, 1, 1); - resetAll = Gtk::manage(new Gtk::Button (M("EXIFPANEL_RESETALL"))); + resetAll = Gtk::manage(new Gtk::Button ()); // M("EXIFPANEL_RESETALL") resetAll->set_image (*Gtk::manage(new RTImage ("gtk-undoall-ltr.png", "gtk-undoall-rtl.png"))); resetAll->set_tooltip_text (M("EXIFPANEL_RESETALLHINT")); - buttons2->pack_start (*resetAll); + resetAll->get_style_context()->add_class("Right"); + setExpandAlignProperties(resetAll, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + buttons2->attach_next_to(*resetAll, Gtk::POS_RIGHT, 1, 1); pack_end (*buttons2, Gtk::PACK_SHRINK); pack_end (*buttons1, Gtk::PACK_SHRINK); @@ -156,18 +183,6 @@ void ExifPanel::setImageData (const ImageMetaData* id) idata = id; exifTreeModel->clear (); - const std::vector defTags = ExifManager::getDefaultTIFFTags (nullptr); - - for (size_t i = 0; i < defTags.size(); i++) { - Tag* defTag = defTags[i]; - if (defTag->nameToString() == "ImageWidth" || defTag->nameToString() == "ImageHeight" || defTag->nameToString() == "BitsPerSample") { - addTag (exifTreeModel->children(), defTag->nameToString(), "?", AC_SYSTEM, false); - } else { - addTag (exifTreeModel->children(), defTag->nameToString(), defTag->valueToString(), AC_SYSTEM, false); - } - delete defTag; - } - if (id && id->getExifData ()) { // id->getExifData ()->printAll (); addDirectory (id->getExifData (), exifTreeModel->children()); @@ -400,7 +415,7 @@ void ExifPanel::resetAllPressed () void ExifPanel::addPressed () { - Gtk::Dialog* dialog = new Gtk::Dialog (M("EXIFPANEL_ADDTAGDLG_TITLE"), *((Gtk::Window*)get_toplevel()), true, true); + Gtk::Dialog* dialog = new Gtk::Dialog (M("EXIFPANEL_ADDTAGDLG_TITLE"), *((Gtk::Window*)get_toplevel()), true); dialog->add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK); dialog->add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); @@ -410,10 +425,10 @@ void ExifPanel::addPressed () Gtk::Label* tlabel = new Gtk::Label (M("EXIFPANEL_ADDTAGDLG_SELECTTAG") + ":"); MyComboBoxText* tcombo = new MyComboBoxText (); - tcombo->append_text ("Artist"); - tcombo->append_text ("Copyright"); - tcombo->append_text ("ImageDescription"); - tcombo->append_text ("Exif.UserComment"); + tcombo->append ("Artist"); + tcombo->append ("Copyright"); + tcombo->append ("ImageDescription"); + tcombo->append ("Exif.UserComment"); hb1->pack_start (*tlabel, Gtk::PACK_SHRINK, 4); hb1->pack_start (*tcombo); @@ -431,7 +446,7 @@ void ExifPanel::addPressed () tcombo->set_active_text (sel); if (!tcombo->get_active ()) { - tcombo->append_text (sel); + tcombo->append (sel); tcombo->set_active_text (sel); } @@ -440,8 +455,8 @@ void ExifPanel::addPressed () ventry->set_activates_default (true); dialog->set_default_response (Gtk::RESPONSE_OK); - dialog->get_vbox()->pack_start (*hb1, Gtk::PACK_SHRINK); - dialog->get_vbox()->pack_start (*hb2, Gtk::PACK_SHRINK, 4); + dialog->get_content_area()->pack_start (*hb1, Gtk::PACK_SHRINK); + dialog->get_content_area()->pack_start (*hb2, Gtk::PACK_SHRINK, 4); tlabel->show (); tcombo->show (); vlabel->show (); diff --git a/rtgui/exifpanel.h b/rtgui/exifpanel.h index fd797ff56..6244c1a4f 100644 --- a/rtgui/exifpanel.h +++ b/rtgui/exifpanel.h @@ -27,8 +27,6 @@ class ExifPanel : public Gtk::VBox, public ToolPanel private: const rtengine::ImageMetaData* idata; - int fullw, fullh, cx, cy, cw, ch; - bool crenabled; rtengine::procparams::ExifPairs changeList; rtengine::procparams::ExifPairs defChangeList; bool recursiveOp; diff --git a/rtgui/exportpanel.cc b/rtgui/exportpanel.cc index 394230855..72cf30fdd 100644 --- a/rtgui/exportpanel.cc +++ b/rtgui/exportpanel.cc @@ -28,8 +28,6 @@ using namespace rtengine::procparams; ExportPanel::ExportPanel () : listener (nullptr) { - set_border_width (4); - /*enabled = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_ENABLE")) ); pack_start(*enabled, Gtk::PACK_SHRINK, 4); pack_start (*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 2);*/ @@ -37,10 +35,15 @@ ExportPanel::ExportPanel () : listener (nullptr) Gtk::Label* labExportTitle = Gtk::manage ( new Gtk::Label (M("EXPORT_FASTEXPORTOPTIONS")) ); labExportTitle->set_use_markup (true); labExportTitle->set_tooltip_text (M("EXPORT_INSTRUCTIONS")); - labExportTitle->set_alignment(Gtk::ALIGN_LEFT); + labExportTitle->set_alignment(Gtk::ALIGN_START); pack_start(*labExportTitle, Gtk::PACK_SHRINK, 4); + Gtk::RadioButton::Group pipeline_group; + use_fast_pipeline = Gtk::manage ( new Gtk::RadioButton (pipeline_group, M("EXPORT_USE_FAST_PIPELINE"))); + use_normal_pipeline = Gtk::manage ( new Gtk::RadioButton (pipeline_group, M("EXPORT_USE_NORMAL_PIPELINE"))); + bypass_box = Gtk::manage(new Gtk::VBox()); bypass_ALL = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_ALL"))); + use_fast_pipeline->set_tooltip_text(M("EXPORT_USE_FAST_PIPELINE_TIP")); bypass_sharpening = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_SHARPENING"))); bypass_sharpenEdge = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_SHARPENEDGE"))); bypass_sharpenMicro = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_SHARPENMICRO"))); @@ -66,7 +69,7 @@ ExportPanel::ExportPanel () : listener (nullptr) raw_bayer_method = Gtk::manage (new MyComboBoxText ()); for( size_t i = 0; i < procparams::RAWParams::BayerSensor::numMethods; i++) { - raw_bayer_method->append_text(procparams::RAWParams::BayerSensor::methodstring[i]); + raw_bayer_method->append(procparams::RAWParams::BayerSensor::methodstring[i]); } raw_bayer_method->set_active(0); @@ -89,7 +92,7 @@ ExportPanel::ExportPanel () : listener (nullptr) raw_xtrans_method = Gtk::manage (new MyComboBoxText ()); for( size_t i = 0; i < procparams::RAWParams::XTransSensor::numMethods; i++) { - raw_xtrans_method->append_text(procparams::RAWParams::XTransSensor::methodstring[i]); + raw_xtrans_method->append(procparams::RAWParams::XTransSensor::methodstring[i]); } raw_xtrans_method->set_active(0); @@ -98,18 +101,28 @@ ExportPanel::ExportPanel () : listener (nullptr) // ---------------------------------------------------------------- // start global packing - pack_start(*bypass_ALL , Gtk::PACK_SHRINK, 4); - pack_start(*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 4); - pack_start(*bypass_sharpening , Gtk::PACK_SHRINK, 4); - pack_start(*bypass_sharpenEdge , Gtk::PACK_SHRINK, 4); - pack_start(*bypass_sharpenMicro , Gtk::PACK_SHRINK, 4); + Gtk::HBox* lblbox = Gtk::manage (new Gtk::HBox ()); + lblbox->pack_start (*Gtk::manage (new Gtk::Label (M("EXPORT_PIPELINE"))), Gtk::PACK_SHRINK, 4); + pack_start (*lblbox, Gtk::PACK_SHRINK, 4); + pack_start(*use_fast_pipeline , Gtk::PACK_SHRINK, 4); + pack_start(*use_normal_pipeline , Gtk::PACK_SHRINK, 4); + + bypass_box->pack_start(*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 4); + lblbox = Gtk::manage (new Gtk::HBox ()); + lblbox->pack_start (*Gtk::manage (new Gtk::Label (M("EXPORT_BYPASS"))), Gtk::PACK_SHRINK, 4); + bypass_box->pack_start (*lblbox, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_ALL , Gtk::PACK_SHRINK, 4); + // bypass_box->pack_start(*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_sharpening , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_sharpenEdge , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_sharpenMicro , Gtk::PACK_SHRINK, 4); //pack_start(*bypass_lumaDenoise , Gtk::PACK_SHRINK, 4); //pack_start(*bypass_colorDenoise , Gtk::PACK_SHRINK, 4); - pack_start(*bypass_defringe , Gtk::PACK_SHRINK, 4); - pack_start(*bypass_dirpyrDenoise, Gtk::PACK_SHRINK, 4); - pack_start(*bypass_sh_hq , Gtk::PACK_SHRINK, 4); - pack_start(*bypass_dirpyrequalizer , Gtk::PACK_SHRINK, 4); - pack_start(*bypass_wavelet , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_defringe , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_dirpyrDenoise, Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_sh_hq , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_dirpyrequalizer , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_wavelet , Gtk::PACK_SHRINK, 4); bayerFrameVBox->pack_start(*hb_raw_bayer_method, Gtk::PACK_SHRINK, 4); //bayerFrameVBox->pack_start(*bypass_raw_all_enhance , Gtk::PACK_SHRINK, 4); @@ -123,12 +136,14 @@ ExportPanel::ExportPanel () : listener (nullptr) xtransFrameVBox->pack_start(*hb_raw_xtrans_method, Gtk::PACK_SHRINK, 4); xtransFrame->add(*xtransFrameVBox); - pack_start(*bypass_raw_ccSteps , Gtk::PACK_SHRINK, 4); - pack_start(*bypass_raw_ca , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_raw_ccSteps , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_raw_ca , Gtk::PACK_SHRINK, 4); - pack_start(*bypass_raw_df , Gtk::PACK_SHRINK, 4); - pack_start(*bypass_raw_ff , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_raw_df , Gtk::PACK_SHRINK, 4); + bypass_box->pack_start(*bypass_raw_ff , Gtk::PACK_SHRINK, 4); + pack_start(*bypass_box, Gtk::PACK_SHRINK); + pack_start (*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 2); // Resize options @@ -149,17 +164,22 @@ ExportPanel::ExportPanel () : listener (nullptr) pack_start (*hbox, Gtk::PACK_SHRINK, 4); MaxWidth->set_digits (0); + MaxWidth->set_width_chars(5); + MaxWidth->set_max_width_chars(5); MaxWidth->set_increments (1, 100); MaxWidth->set_value (options.fastexport_resize_width); MaxWidth->set_range (32, 10000); MaxHeight->set_digits (0); + MaxHeight->set_width_chars(5); + MaxHeight->set_max_width_chars(5); MaxHeight->set_increments (1, 100); MaxHeight->set_value (options.fastexport_resize_height); MaxHeight->set_range (32, 10000); // Buttons - btnFastExport = Gtk::manage ( new Gtk::Button (M("EXPORT_PUTTOQUEUEFAST")) ); + btnFastExport = Gtk::manage ( new Gtk::Button () ); + btnFastExport->set_tooltip_text(M("EXPORT_PUTTOQUEUEFAST")); btnFastExport->set_image (*Gtk::manage (new RTImage ("processing.png"))); pack_start(*btnFastExport, Gtk::PACK_SHRINK, 4); @@ -173,6 +193,7 @@ ExportPanel::ExportPanel () : listener (nullptr) pack_start(*vboxpe, Gtk::PACK_SHRINK, 0); + use_fast_pipeline->signal_toggled().connect(sigc::mem_fun(*this, &ExportPanel::use_fast_pipeline_toggled)); btnFastExport->signal_clicked().connect( sigc::mem_fun(*this, &ExportPanel::FastExportPressed) ); //btnExportLoadSettings->signal_clicked().connect( sigc::mem_fun(*this, &ExportPanel::LoadSettings) ); //btnExportSaveSettings->signal_clicked().connect( sigc::mem_fun(*this, &ExportPanel::SaveSettings) ); @@ -221,40 +242,48 @@ void ExportPanel::FastExportPressed () void ExportPanel::SaveSettingsAsDefault() { + bool changed = false; +#define FE_OPT_STORE_(n, v) \ + do { \ + if (n != v) { \ + n = v; \ + changed = true; \ + } \ + } while (false) // Save fast export settings to options - options.fastexport_bypass_sharpening = bypass_sharpening->get_active (); - options.fastexport_bypass_sharpenEdge = bypass_sharpenEdge->get_active (); - options.fastexport_bypass_sharpenMicro = bypass_sharpenMicro->get_active (); + FE_OPT_STORE_(options.fastexport_bypass_sharpening, bypass_sharpening->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_sharpenEdge, bypass_sharpenEdge->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_sharpenMicro, bypass_sharpenMicro->get_active ()); //options.fastexport_bypass_lumaDenoise = bypass_lumaDenoise->get_active (); //options.fastexport_bypass_colorDenoise = bypass_colorDenoise->get_active (); - options.fastexport_bypass_defringe = bypass_defringe->get_active (); - options.fastexport_bypass_dirpyrDenoise = bypass_dirpyrDenoise->get_active (); - options.fastexport_bypass_sh_hq = bypass_sh_hq->get_active (); - options.fastexport_bypass_dirpyrequalizer = bypass_dirpyrequalizer->get_active (); - options.fastexport_bypass_wavelet = bypass_wavelet->get_active (); + FE_OPT_STORE_(options.fastexport_bypass_defringe, bypass_defringe->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_dirpyrDenoise, bypass_dirpyrDenoise->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_sh_hq, bypass_sh_hq->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_dirpyrequalizer, bypass_dirpyrequalizer->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_wavelet, bypass_wavelet->get_active ()); //options.fastexport_bypass_raw_bayer_all_enhance = bypass_raw_all_enhance->get_active (); - options.fastexport_bypass_raw_bayer_dcb_iterations = bypass_raw_bayer_dcb_iterations->get_active (); - options.fastexport_bypass_raw_bayer_dcb_enhance = bypass_raw_bayer_dcb_enhance->get_active (); - options.fastexport_bypass_raw_bayer_lmmse_iterations = bypass_raw_bayer_lmmse_iterations->get_active(); - options.fastexport_bypass_raw_bayer_linenoise = bypass_raw_bayer_linenoise->get_active (); - options.fastexport_bypass_raw_bayer_greenthresh = bypass_raw_bayer_greenthresh->get_active (); - options.fastexport_bypass_raw_ccSteps = bypass_raw_ccSteps->get_active (); - options.fastexport_bypass_raw_ca = bypass_raw_ca->get_active (); - options.fastexport_bypass_raw_df = bypass_raw_df->get_active (); - options.fastexport_bypass_raw_ff = bypass_raw_ff->get_active (); + FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_dcb_iterations, bypass_raw_bayer_dcb_iterations->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_dcb_enhance, bypass_raw_bayer_dcb_enhance->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_lmmse_iterations, bypass_raw_bayer_lmmse_iterations->get_active()); + FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_linenoise, bypass_raw_bayer_linenoise->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_raw_bayer_greenthresh, bypass_raw_bayer_greenthresh->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_raw_ccSteps, bypass_raw_ccSteps->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_raw_ca, bypass_raw_ca->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_raw_df, bypass_raw_df->get_active ()); + FE_OPT_STORE_(options.fastexport_bypass_raw_ff, bypass_raw_ff->get_active ()); //saving Bayer demosaic_method int currentRow = raw_bayer_method->get_active_row_number(); if( currentRow >= 0 && currentRow < procparams::RAWParams::BayerSensor::numMethods) { - options.fastexport_raw_bayer_method = procparams::RAWParams::BayerSensor::methodstring[currentRow]; + FE_OPT_STORE_(options.fastexport_raw_bayer_method, procparams::RAWParams::BayerSensor::methodstring[currentRow]); } //saving X-Trans demosaic_method currentRow = raw_xtrans_method->get_active_row_number(); if( currentRow >= 0 && currentRow < procparams::RAWParams::XTransSensor::numMethods) { - options.fastexport_raw_xtrans_method = procparams::RAWParams::XTransSensor::methodstring[currentRow]; + FE_OPT_STORE_(options.fastexport_raw_xtrans_method, procparams::RAWParams::XTransSensor::methodstring[currentRow]); } // options.fastexport_icm_input = icm_input ; @@ -266,9 +295,16 @@ void ExportPanel::SaveSettingsAsDefault() // options.fastexport_resize_appliesTo = resize_appliesTo; // options.fastexport_resize_dataspec = resize_dataspec ; - options.fastexport_resize_method = "Lanczos"; - options.fastexport_resize_width = MaxWidth->get_value_as_int (); - options.fastexport_resize_height = MaxHeight->get_value_as_int (); + FE_OPT_STORE_(options.fastexport_resize_method, "Lanczos"); + FE_OPT_STORE_(options.fastexport_resize_width, MaxWidth->get_value_as_int ()); + FE_OPT_STORE_(options.fastexport_resize_height, MaxHeight->get_value_as_int ()); + + FE_OPT_STORE_(options.fastexport_use_fast_pipeline, use_fast_pipeline->get_active()); +#undef FE_OPT_STORE_ + + if (changed) { + Options::save(); + } } void ExportPanel::LoadDefaultSettings() @@ -324,6 +360,13 @@ void ExportPanel::LoadDefaultSettings() MaxWidth->set_value(options.fastexport_resize_width); MaxHeight->set_value(options.fastexport_resize_height); + + if (options.fastexport_use_fast_pipeline) { + use_fast_pipeline->set_active(true); + bypass_box->set_sensitive(false); + } else { + use_normal_pipeline->set_active(true); + } } void ExportPanel::LoadSettings() @@ -405,6 +448,11 @@ void ExportPanel::bypassALL_Toggled() bypass_raw_ffConn.block (false); } +void ExportPanel::use_fast_pipeline_toggled() +{ + bypass_box->set_sensitive(!use_fast_pipeline->get_active()); +} + /* fastexport_bypass_sharpening fastexport_bypass_sharpenEdge diff --git a/rtgui/exportpanel.h b/rtgui/exportpanel.h index 840a4638d..be6c9b4e3 100644 --- a/rtgui/exportpanel.h +++ b/rtgui/exportpanel.h @@ -36,7 +36,10 @@ class ExportPanel : public Gtk::VBox protected: + Gtk::VBox *bypass_box; //Gtk::CheckButton* enabled; + Gtk::RadioButton* use_fast_pipeline; + Gtk::RadioButton* use_normal_pipeline; Gtk::CheckButton* bypass_ALL; Gtk::CheckButton* bypass_sharpenEdge; Gtk::CheckButton* bypass_sharpenMicro; @@ -73,8 +76,6 @@ protected: MyComboBoxText* raw_xtrans_method; Gtk::Button* btnFastExport; - Gtk::Button* btnExportLoadSettings; - Gtk::Button* btnExportSaveSettings; MySpinButton* MaxWidth; MySpinButton* MaxHeight; @@ -105,6 +106,7 @@ protected: ExportPanelListener* listener; void bypassALL_Toggled(); + void use_fast_pipeline_toggled(); void SaveSettingsAsDefault(); void LoadDefaultSettings(); void LoadSettings(); diff --git a/rtgui/extprog.cc b/rtgui/extprog.cc index d0cf44151..33424fac9 100644 --- a/rtgui/extprog.cc +++ b/rtgui/extprog.cc @@ -244,8 +244,7 @@ bool ExtProgStore::openInGimp (const Glib::ustring& fileName) #if defined WIN32 auto executable = Glib::build_filename (options.gimpDir, "bin", "gimp-win-remote"); - auto cmdLine = Glib::ustring::compose ("\"%1\" gimp-2.4.exe \"%2\"", executable, fileName); - auto success = spawnCommandAsync (cmdLine); + auto success = ShellExecute( NULL, "open", executable.c_str(), fileName.c_str(), NULL, SW_SHOWNORMAL ); #elif defined __APPLE__ @@ -262,19 +261,25 @@ bool ExtProgStore::openInGimp (const Glib::ustring& fileName) #endif +#ifdef WIN32 + if ((uintptr_t)success > 32) { + return true; + } +#else if (success) { return true; } +#endif + #ifdef WIN32 for (auto ver = 12; ver >= 0; --ver) { executable = Glib::build_filename (options.gimpDir, "bin", Glib::ustring::compose (Glib::ustring("gimp-2.%1.exe"), ver)); - cmdLine = Glib::ustring::compose ("\"%1\" \"%2\"", executable, fileName); - success = spawnCommandAsync (cmdLine); + auto success = ShellExecute( NULL, "open", executable.c_str(), fileName.c_str(), NULL, SW_SHOWNORMAL ); - if (success) { + if ((uintptr_t)success > 32) { return true; } } @@ -318,17 +323,20 @@ bool ExtProgStore::openInCustomEditor (const Glib::ustring& fileName) { #if defined WIN32 - const auto cmdLine = Glib::ustring("\"") + options.customEditorProg + Glib::ustring("\" \"") + fileName + Glib::ustring("\""); + const auto cmdLine = Glib::ustring("\"") + options.customEditorProg + Glib::ustring("\""); + auto success = ShellExecute( NULL, "open", cmdLine.c_str(), ('"' + fileName + '"').c_str(), NULL, SW_SHOWNORMAL ); + return (uintptr_t)success > 32; #elif defined __APPLE__ const auto cmdLine = options.customEditorProg + Glib::ustring(" \"") + fileName + Glib::ustring("\""); + return spawnCommandAsync (cmdLine); #else const auto cmdLine = Glib::ustring("\"") + options.customEditorProg + Glib::ustring("\" \"") + fileName + Glib::ustring("\""); + return spawnCommandAsync (cmdLine); #endif - return spawnCommandAsync (cmdLine); } diff --git a/rtgui/favoritbrowser.cc b/rtgui/favoritbrowser.cc index 658390391..29b82f510 100644 --- a/rtgui/favoritbrowser.cc +++ b/rtgui/favoritbrowser.cc @@ -49,10 +49,22 @@ FavoritBrowser::FavoritBrowser () : listener (NULL), lastSelectedDir ("") treeView->set_tooltip_column (2); treeView->get_selection()->signal_changed().connect(sigc::mem_fun(*this, &FavoritBrowser::selectionChanged)); - add = Gtk::manage (new Gtk::Button (M("MAIN_FRAME_PLACES_ADD"))); - del = Gtk::manage (new Gtk::Button (M("MAIN_FRAME_PLACES_DEL"))); + add = Gtk::manage (new Gtk::Button ()); + add->set_tooltip_text(M("MAIN_FRAME_PLACES_ADD")); + add->set_hexpand(true); + add->set_vexpand(false); + add->set_halign(Gtk::ALIGN_FILL); + add->set_valign(Gtk::ALIGN_START); add->set_image (*Gtk::manage (new RTImage ("gtk-add.png"))); + add->get_style_context()->add_class("Left"); + del = Gtk::manage (new Gtk::Button ()); + del->set_tooltip_text(M("MAIN_FRAME_PLACES_DEL")); + del->set_hexpand(true); + del->set_vexpand(false); + del->set_halign(Gtk::ALIGN_FILL); + del->set_valign(Gtk::ALIGN_START); del->set_image (*Gtk::manage (new RTImage ("list-remove.png"))); + del->get_style_context()->add_class("Right"); Gtk::HBox* buttonBox = Gtk::manage (new Gtk::HBox ()); buttonBox->pack_start (*add); buttonBox->pack_start (*del); diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index b11361db2..10d4809ed 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -125,25 +125,33 @@ void findOriginalEntries (const std::vector& entries) } -FileBrowser::FileBrowser () - : tbl(nullptr), numFiltered(0), partialPasteDlg(M("PARTIALPASTE_DIALOGLABEL")) +FileBrowser::FileBrowser () : + menuLabel(nullptr), + selectDF(nullptr), + thisIsDF(nullptr), + autoDF(nullptr), + selectFF(nullptr), + thisIsFF(nullptr), + autoFF(nullptr), + clearFromCache(nullptr), + clearFromCacheFull(nullptr), + colorLabel_actionData(nullptr), + bppcl(nullptr), + tbl(nullptr), + numFiltered(0), + exportPanel(nullptr) { + session_id_ = 0; - fbih = new FileBrowserIdleHelper; - fbih->fbrowser = this; - fbih->destroyed = false; - fbih->pending = 0; - - profileStore.addListener(this); + ProfileStore::getInstance()->addListener(this); int p = 0; pmenu = new Gtk::Menu (); pmenu->attach (*Gtk::manage(open = new Gtk::MenuItem (M("FILEBROWSER_POPUPOPEN"))), 0, 1, p, p + 1); p++; - pmenu->attach (*Gtk::manage(develop = new Gtk::ImageMenuItem (M("FILEBROWSER_POPUPPROCESS"))), 0, 1, p, p + 1); + pmenu->attach (*Gtk::manage(develop = new MyImageMenuItem (M("FILEBROWSER_POPUPPROCESS"), "processing.png")), 0, 1, p, p + 1); p++; - develop->set_image(*Gtk::manage(new RTImage ("processing.png"))); - pmenu->attach (*Gtk::manage(developfast = new Gtk::ImageMenuItem (M("FILEBROWSER_POPUPPROCESSFAST"))), 0, 1, p, p + 1); + pmenu->attach (*Gtk::manage(developfast = new Gtk::MenuItem (M("FILEBROWSER_POPUPPROCESSFAST"))), 0, 1, p, p + 1); p++; pmenu->attach (*Gtk::manage(new Gtk::SeparatorMenuItem ()), 0, 1, p, p + 1); @@ -196,7 +204,7 @@ FileBrowser::FileBrowser () Gtk::Menu* submenuLabel = Gtk::manage (new Gtk::Menu ()); for (int i = 0; i <= 5; i++) { - submenuLabel->attach (*Gtk::manage(colorlabel[i] = new Gtk::ImageMenuItem (M(Glib::ustring::compose("%1%2", "FILEBROWSER_POPUPCOLORLABEL", i)))), 0, 1, p, p + 1); + submenuLabel->attach (*Gtk::manage(colorlabel[i] = new MyImageMenuItem (M(Glib::ustring::compose("%1%2", "FILEBROWSER_POPUPCOLORLABEL", i)), i == 0 ? "cglabel0.png" : Glib::ustring::compose("%1%2%3", "clabel", i, ".png"))), 0, 1, p, p + 1); p++; } @@ -204,18 +212,11 @@ FileBrowser::FileBrowser () menuLabel->set_submenu (*submenuLabel); } else { for (int i = 0; i <= 5; i++) { - pmenu->attach (*Gtk::manage(colorlabel[i] = new Gtk::ImageMenuItem (M(Glib::ustring::compose("%1%2", "FILEBROWSER_POPUPCOLORLABEL", i)))), 0, 1, p, p + 1); + pmenu->attach (*Gtk::manage(colorlabel[i] = new MyImageMenuItem (M(Glib::ustring::compose("%1%2", "FILEBROWSER_POPUPCOLORLABEL", i)), i == 0 ? "cglabel0.png" : Glib::ustring::compose("%1%2%3", "clabel", i, ".png"))), 0, 1, p, p + 1); p++; } } - //set color label images - colorlabel[0]->set_image(*Gtk::manage(new RTImage ("cglabel0.png"))); - - for (int i = 1; i <= 5; i++) { - colorlabel[i]->set_image(*Gtk::manage(new RTImage (Glib::ustring::compose("%1%2%3", "clabel", i, ".png")))); - } - pmenu->attach (*Gtk::manage(new Gtk::SeparatorMenuItem ()), 0, 1, p, p + 1); p++; @@ -333,9 +334,8 @@ FileBrowser::FileBrowser () * Profile Operations * *********************/ if (options.menuGroupProfileOperations) { - pmenu->attach (*Gtk::manage(menuProfileOperations = new Gtk::ImageMenuItem (M("FILEBROWSER_POPUPPROFILEOPERATIONS"))), 0, 1, p, p + 1); + pmenu->attach (*Gtk::manage(menuProfileOperations = new MyImageMenuItem (M("FILEBROWSER_POPUPPROFILEOPERATIONS"), "logoicon-wind.png")), 0, 1, p, p + 1); p++; - menuProfileOperations->set_image(*Gtk::manage(new RTImage ("logoicon-wind.png"))); Gtk::Menu* submenuProfileOperations = Gtk::manage (new Gtk::Menu ()); @@ -349,7 +349,7 @@ FileBrowser::FileBrowser () p++; submenuProfileOperations->attach (*Gtk::manage(applypartprof = new Gtk::MenuItem (M("FILEBROWSER_APPLYPROFILE_PARTIAL"))), 0, 1, p, p + 1); p++; - submenuProfileOperations->attach (*Gtk::manage(execcustprof = new Gtk::MenuItem (M("FILEBROWSER_EXEC_CPB"))), 0, 1, p, p + 1); + submenuProfileOperations->attach (*Gtk::manage(resetdefaultprof = new Gtk::MenuItem (M("FILEBROWSER_RESETDEFAULTPROFILE"))), 0, 1, p, p + 1); p++; submenuProfileOperations->attach (*Gtk::manage(clearprof = new Gtk::MenuItem (M("FILEBROWSER_CLEARPROFILE"))), 0, 1, p, p + 1); p++; @@ -367,7 +367,7 @@ FileBrowser::FileBrowser () p++; pmenu->attach (*Gtk::manage(applypartprof = new Gtk::MenuItem (M("FILEBROWSER_APPLYPROFILE_PARTIAL"))), 0, 1, p, p + 1); p++; - pmenu->attach (*Gtk::manage(execcustprof = new Gtk::MenuItem (M("FILEBROWSER_EXEC_CPB"))), 0, 1, p, p + 1); + pmenu->attach (*Gtk::manage(resetdefaultprof = new Gtk::MenuItem (M("FILEBROWSER_RESETDEFAULTPROFILE"))), 0, 1, p, p + 1); p++; pmenu->attach (*Gtk::manage(clearprof = new Gtk::MenuItem (M("FILEBROWSER_CLEARPROFILE"))), 0, 1, p, p + 1); p++; @@ -384,7 +384,6 @@ FileBrowser::FileBrowser () pmenu->attach (*Gtk::manage(new Gtk::SeparatorMenuItem ()), 0, 1, p, p + 1); p++; pmenu->attach (*Gtk::manage(cachemenu = new Gtk::MenuItem (M("FILEBROWSER_CACHE"))), 0, 1, p, p + 1); - p++; pmenu->show_all (); @@ -393,14 +392,15 @@ FileBrowser::FileBrowser () * *********************/ pmaccelgroup = Gtk::AccelGroup::create (); pmenu->set_accel_group (pmaccelgroup); - selall->add_accelerator ("activate", pmenu->get_accel_group(), GDK_a, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); - trash->add_accelerator ("activate", pmenu->get_accel_group(), GDK_Delete, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); - untrash->add_accelerator ("activate", pmenu->get_accel_group(), GDK_Delete, Gdk::SHIFT_MASK, Gtk::ACCEL_VISIBLE); - open->add_accelerator ("activate", pmenu->get_accel_group(), GDK_Return, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); - develop->add_accelerator ("activate", pmenu->get_accel_group(), GDK_B, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); - copyprof->add_accelerator ("activate", pmenu->get_accel_group(), GDK_C, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); - pasteprof->add_accelerator ("activate", pmenu->get_accel_group(), GDK_V, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); - partpasteprof->add_accelerator ("activate", pmenu->get_accel_group(), GDK_V, Gdk::CONTROL_MASK | Gdk::SHIFT_MASK, Gtk::ACCEL_VISIBLE); + selall->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_a, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); + trash->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_Delete, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); + untrash->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_Delete, Gdk::SHIFT_MASK, Gtk::ACCEL_VISIBLE); + open->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_Return, (Gdk::ModifierType)0, Gtk::ACCEL_VISIBLE); + develop->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_B, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); + developfast->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_B, Gdk::CONTROL_MASK | Gdk::SHIFT_MASK, Gtk::ACCEL_VISIBLE); + copyprof->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_C, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); + pasteprof->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_V, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE); + partpasteprof->add_accelerator ("activate", pmenu->get_accel_group(), GDK_KEY_V, Gdk::CONTROL_MASK | Gdk::SHIFT_MASK, Gtk::ACCEL_VISIBLE); // Bind to event handlers open->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), open)); @@ -413,7 +413,7 @@ FileBrowser::FileBrowser () colorlabel[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), colorlabel[i])); } - for (int i = 0; i < mMenuExtProgs.size(); i++) { + for (size_t i = 0; i < mMenuExtProgs.size(); i++) { amiExtProg[i]->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), amiExtProg[i])); } @@ -436,7 +436,7 @@ FileBrowser::FileBrowser () partpasteprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), partpasteprof)); applyprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), applyprof)); applypartprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), applypartprof)); - execcustprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), execcustprof)); + resetdefaultprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), resetdefaultprof)); clearprof->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), clearprof)); cachemenu->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &FileBrowser::menuItemActivated), cachemenu)); @@ -447,17 +447,10 @@ FileBrowser::FileBrowser () pmenuColorLabels = new Gtk::Menu (); for (int i = 0; i <= 5; i++) { - pmenuColorLabels->attach (*Gtk::manage(colorlabel_pop[i] = new Gtk::ImageMenuItem (M(Glib::ustring::compose("%1%2", "FILEBROWSER_POPUPCOLORLABEL", i)))), 0, 1, c, c + 1); + pmenuColorLabels->attach (*Gtk::manage(colorlabel_pop[i] = new MyImageMenuItem (M(Glib::ustring::compose("%1%2", "FILEBROWSER_POPUPCOLORLABEL", i)), i == 0 ? "cglabel0.png" : Glib::ustring::compose("%1%2%3", "clabel", i, ".png"))), 0, 1, c, c + 1); c++; } - //set color label images - colorlabel_pop[0]->set_image(*Gtk::manage(new RTImage ("cglabel0.png"))); - - for (int i = 1; i <= 5; i++) { - colorlabel_pop[i]->set_image(*Gtk::manage(new RTImage (Glib::ustring::compose("%1%2%3", "clabel", i, ".png")))); - } - pmenuColorLabels->show_all (); // Has to be located after creation of applyprof and applypartprof @@ -471,7 +464,9 @@ FileBrowser::FileBrowser () FileBrowser::~FileBrowser () { - profileStore.removeListener(this); + idle_register.destroy(); + + ProfileStore::getInstance()->removeListener(this); delete pmenu; delete pmenuColorLabels; delete[] amiExtProg; @@ -557,51 +552,38 @@ void FileBrowser::doubleClicked (ThumbBrowserEntryBase* entry) } } -struct addparams { - FileBrowserIdleHelper* fbih; - FileBrowserEntry* entry; -}; - -int AddEntryUIThread (void* data) -{ - - addparams* ap = static_cast(data); - FileBrowserIdleHelper* fbih = ap->fbih; - - if (fbih->destroyed) { - if (fbih->pending == 1) { - delete fbih; - } else { - fbih->pending--; - } - - delete ap->entry; - delete ap; - - return 0; - } - - ap->fbih->fbrowser->addEntry_ (ap->entry); - delete ap; - fbih->pending--; - - return 0; -} - void FileBrowser::addEntry (FileBrowserEntry* entry) { + struct addparams { + FileBrowser *browser; + FileBrowserEntry *entry; + unsigned int session_id; + }; - fbih->pending++; + addparams* const ap = new addparams; entry->setParent (this); - addparams* ap = new addparams; - ap->fbih = fbih; + ap->browser = this; ap->entry = entry; - g_idle_add (AddEntryUIThread, ap); + ap->session_id = session_id(); + + const auto func = [](gpointer data) -> gboolean { + addparams* const ap = static_cast(data); + if (ap->session_id != ap->browser->session_id()) { + delete ap->entry; + delete ap; + } else { + ap->browser->addEntry_(ap->entry); + delete ap; + } + + return FALSE; + }; + + idle_register.add(func, ap); } void FileBrowser::addEntry_ (FileBrowserEntry* entry) { - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected entry->selected = false; entry->drawable = false; entry->framed = editedFiles.find (entry->filename) != editedFiles.end(); @@ -618,20 +600,22 @@ void FileBrowser::addEntry_ (FileBrowserEntry* entry) { MYWRITERLOCK(l, entryRW); - std::vector::iterator i = fd.begin(); - - while (i != fd.end() && *entry < * ((FileBrowserEntry*)*i)) { - ++i; - } - - fd.insert (i, entry); + fd.insert( + std::lower_bound( + fd.begin(), + fd.end(), + entry, + [](const ThumbBrowserEntryBase* a, const ThumbBrowserEntryBase* b) + { + return *a < *b; + } + ), + entry + ); initEntry (entry); } redraw (); - - // newly added item might have been already trashed in a previous session - trash_changed().emit(); } FileBrowserEntry* FileBrowser::delEntry (const Glib::ustring& fname) @@ -670,16 +654,7 @@ FileBrowserEntry* FileBrowser::delEntry (const Glib::ustring& fname) void FileBrowser::close () { - if (fbih->pending) { - fbih->destroyed = true; - } else { - delete fbih; - } - - fbih = new FileBrowserIdleHelper; - fbih->fbrowser = this; - fbih->destroyed = false; - fbih->pending = 0; + ++session_id_; { MYWRITERLOCK(l, entryRW); @@ -746,14 +721,14 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) return; } - for (int j = 0; j < mMenuExtProgs.size(); j++) { + for (size_t j = 0; j < mMenuExtProgs.size(); j++) { if (m == amiExtProg[j]) { const auto pAct = mMenuExtProgs[m->get_label()]; // Build vector of all file names std::vector selFileNames; - for (int i = 0; i < mselected.size(); i++) { + for (size_t i = 0; i < mselected.size(); i++) { Glib::ustring fn = mselected[i]->thumbnail->getFileName(); // Maybe batch processed version @@ -784,6 +759,12 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) else if (m == develop) { tbl->developRequested (mselected, false); } else if (m == developfast) { + if (exportPanel) { + // force saving export panel settings + exportPanel->setExportPanelListener(nullptr); + exportPanel->FastExportPressed(); + exportPanel->setExportPanelListener(this); + } tbl->developRequested (mselected, true); } @@ -833,8 +814,8 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[0]->thumbnail->getProcParams(); Gtk::FileChooserDialog fc (getToplevelWindow (this), "Dark Frame", Gtk::FILE_CHOOSER_ACTION_OPEN ); bindCurrentFolder (fc, options.lastDarkframeDir); - fc.add_button( Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL); - fc.add_button( Gtk::StockID("gtk-apply"), Gtk::RESPONSE_APPLY); + fc.add_button( M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); + fc.add_button( M("GENERAL_APPLY"), Gtk::RESPONSE_APPLY); if(!pp.raw.dark_frame.empty()) { fc.set_filename( pp.raw.dark_frame ); @@ -909,8 +890,8 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) rtengine::procparams::ProcParams pp = mselected[0]->thumbnail->getProcParams(); Gtk::FileChooserDialog fc (getToplevelWindow (this), "Flat Field", Gtk::FILE_CHOOSER_ACTION_OPEN ); bindCurrentFolder (fc, options.lastFlatfieldDir); - fc.add_button( Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL); - fc.add_button( Gtk::StockID("gtk-apply"), Gtk::RESPONSE_APPLY); + fc.add_button( M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); + fc.add_button( M("GENERAL_APPLY"), Gtk::RESPONSE_APPLY); if(!pp.raw.ff_file.empty()) { fc.set_filename( pp.raw.ff_file ); @@ -977,7 +958,7 @@ void FileBrowser::menuItemActivated (Gtk::MenuItem* m) } queue_draw (); - } else if (m == execcustprof) { + } else if (m == resetdefaultprof) { if (!mselected.empty() && bppcl) { bppcl->beginBatchPParamsChange(mselected.size()); } @@ -1076,6 +1057,9 @@ void FileBrowser::partPasteProfile () return; } + auto toplevel = static_cast (get_toplevel ()); + PartialPasteDlg partialPasteDlg (M("PARTIALPASTE_DIALOGLABEL"), toplevel); + int i = partialPasteDlg.run (); if (i == Gtk::RESPONSE_OK) { @@ -1135,58 +1119,61 @@ bool FileBrowser::keyPressed (GdkEventKey* event) #ifdef __WIN32__ bool altgr = event->state & GDK_MOD2_MASK; #endif - if ((event->keyval == GDK_C || event->keyval == GDK_c || event->keyval == GDK_Insert) && ctrl) { + if ((event->keyval == GDK_KEY_C || event->keyval == GDK_KEY_c || event->keyval == GDK_KEY_Insert) && ctrl) { copyProfile (); return true; - } else if ((event->keyval == GDK_V || event->keyval == GDK_v) && ctrl && !shift) { + } else if ((event->keyval == GDK_KEY_V || event->keyval == GDK_KEY_v) && ctrl && !shift) { pasteProfile (); return true; - } else if (event->keyval == GDK_Insert && shift) { + } else if (event->keyval == GDK_KEY_Insert && shift) { pasteProfile (); return true; - } else if ((event->keyval == GDK_V || event->keyval == GDK_v) && ctrl && shift) { + } else if ((event->keyval == GDK_KEY_V || event->keyval == GDK_KEY_v) && ctrl && shift) { partPasteProfile (); return true; - } else if (event->keyval == GDK_Delete && !shift) { + } else if (event->keyval == GDK_KEY_Delete && !shift) { menuItemActivated (trash); return true; - } else if (event->keyval == GDK_Delete && shift) { + } else if (event->keyval == GDK_KEY_Delete && shift) { menuItemActivated (untrash); return true; - } else if ((event->keyval == GDK_B || event->keyval == GDK_b) && ctrl) { + } else if ((event->keyval == GDK_KEY_B || event->keyval == GDK_KEY_b) && ctrl && !shift) { menuItemActivated (develop); return true; - } else if ((event->keyval == GDK_A || event->keyval == GDK_a) && ctrl) { + } else if ((event->keyval == GDK_KEY_B || event->keyval == GDK_KEY_b) && ctrl && shift) { + menuItemActivated (developfast); + return true; + } else if ((event->keyval == GDK_KEY_A || event->keyval == GDK_KEY_a) && ctrl) { menuItemActivated (selall); return true; - } else if (event->keyval == GDK_F2 && !ctrl) { + } else if (event->keyval == GDK_KEY_F2 && !ctrl) { menuItemActivated (rename); return true; - } else if (event->keyval == GDK_F3 && !(ctrl || shift || alt)) { // open Previous image from FileBrowser perspective + } else if (event->keyval == GDK_KEY_F3 && !(ctrl || shift || alt)) { // open Previous image from FileBrowser perspective FileBrowser::openPrevImage (); return true; - } else if (event->keyval == GDK_F4 && !(ctrl || shift || alt)) { // open Next image from FileBrowser perspective + } else if (event->keyval == GDK_KEY_F4 && !(ctrl || shift || alt)) { // open Next image from FileBrowser perspective FileBrowser::openNextImage (); return true; - } else if (event->keyval == GDK_Left) { + } else if (event->keyval == GDK_KEY_Left) { selectPrev (1, shift); return true; - } else if (event->keyval == GDK_Right) { + } else if (event->keyval == GDK_KEY_Right) { selectNext (1, shift); return true; - } else if (event->keyval == GDK_Up) { + } else if (event->keyval == GDK_KEY_Up) { selectPrev (numOfCols, shift); return true; - } else if (event->keyval == GDK_Down) { + } else if (event->keyval == GDK_KEY_Down) { selectNext (numOfCols, shift); return true; - } else if (event->keyval == GDK_Home) { + } else if (event->keyval == GDK_KEY_Home) { selectFirst (shift); return true; - } else if (event->keyval == GDK_End) { + } else if (event->keyval == GDK_KEY_End) { selectLast (shift); return true; - } else if(event->keyval == GDK_Return || event->keyval == GDK_KP_Enter) { + } else if(event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_KP_Enter) { std::vector mselected; for (size_t i = 0; i < selected.size(); i++) { @@ -1194,7 +1181,7 @@ bool FileBrowser::keyPressed (GdkEventKey* event) } openRequested(mselected); - } else if (event->keyval == GDK_F5) { + } else if (event->keyval == GDK_KEY_F5) { int dest = 1; if (event->state & GDK_SHIFT_MASK) { @@ -1205,10 +1192,10 @@ bool FileBrowser::keyPressed (GdkEventKey* event) openDefaultViewer (dest); return true; - } else if (event->keyval == GDK_Page_Up) { + } else if (event->keyval == GDK_KEY_Page_Up) { scrollPage(GDK_SCROLL_UP); return true; - } else if (event->keyval == GDK_Page_Down) { + } else if (event->keyval == GDK_KEY_Page_Down) { scrollPage(GDK_SCROLL_DOWN); return true; } @@ -1351,7 +1338,7 @@ void FileBrowser::applyMenuItemActivated (ProfileStoreLabel *label) { MYREADERLOCK(l, entryRW); - const rtengine::procparams::PartialProfile* partProfile = profileStore.getProfile (label->entry); + const rtengine::procparams::PartialProfile* partProfile = ProfileStore::getInstance()->getProfile (label->entry); if (partProfile->pparams && !selected.empty()) { if (bppcl) { @@ -1381,9 +1368,13 @@ void FileBrowser::applyPartialMenuItemActivated (ProfileStoreLabel *label) } } - const rtengine::procparams::PartialProfile* srcProfiles = profileStore.getProfile (label->entry); + const rtengine::procparams::PartialProfile* srcProfiles = ProfileStore::getInstance()->getProfile (label->entry); if (srcProfiles->pparams) { + + auto toplevel = static_cast (get_toplevel ()); + PartialPasteDlg partialPasteDlg (M("PARTIALPASTE_DIALOGLABEL"), toplevel); + if (partialPasteDlg.run() == Gtk::RESPONSE_OK) { MYREADERLOCK(l, entryRW); @@ -1505,11 +1496,11 @@ bool FileBrowser::checkFilter (ThumbBrowserEntryBase* entryb) // true -> entry int iFilenameMatch = 0; std::vector vFilterStrings = Glib::Regex::split_simple(",", decodedQueryFileName.uppercase()); - for(int i = 0; i < vFilterStrings.size(); i++) { + for(size_t i = 0; i < vFilterStrings.size(); i++) { // ignore empty vFilterStrings. Otherwise filter will always return true if // e.g. filter.queryFileName ends on "," and will stop being a filter if (!vFilterStrings.at(i).empty()) { - if (FileName.find(vFilterStrings.at(i)) != -1) { + if (FileName.find(vFilterStrings.at(i)) != Glib::ustring::npos) { iFilenameMatch++; } } @@ -1915,12 +1906,6 @@ void FileBrowser::openNextPreviousEditorImage (Glib::ustring fname, eRTNav nextP } } -int refreshThumbImagesUI (void* data) -{ - (static_cast(data))->_thumbRearrangementNeeded (); - return 0; -} - void FileBrowser::_thumbRearrangementNeeded () { refreshThumbImages (); // arrangeFiles is NOT enough @@ -1928,8 +1913,13 @@ void FileBrowser::_thumbRearrangementNeeded () void FileBrowser::thumbRearrangementNeeded () { - // refreshThumbImagesUI will handle thread safety itself - g_idle_add (refreshThumbImagesUI, this); + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->_thumbRearrangementNeeded(); + + return FALSE; + }; + + idle_register.add(func, this); } void FileBrowser::selectionChanged () @@ -1984,7 +1974,7 @@ void FileBrowser::updateProfileList () // submenu applmenu int p = 0; - const std::vector *profEntries = profileStore.getFileList(); // lock and get a pointer to the profiles' list + const std::vector *profEntries = ProfileStore::getInstance()->getFileList(); // lock and get a pointer to the profiles' list std::map subMenuList; // store the Gtk::Menu that Gtk::MenuItem will have to be attached to @@ -2069,7 +2059,7 @@ void FileBrowser::updateProfileList () applypartprof->set_submenu (*(subMenuList.at(0))); } - profileStore.releaseFileList(); + ProfileStore::getInstance()->releaseFileList(); subMenuList.clear(); } diff --git a/rtgui/filebrowser.h b/rtgui/filebrowser.h index e037363c9..4efdb7219 100644 --- a/rtgui/filebrowser.h +++ b/rtgui/filebrowser.h @@ -29,7 +29,7 @@ #include "partialpastedlg.h" #include "exportpanel.h" #include "extprog.h" -#include "profilestore.h" +#include "profilestorecombobox.h" class ProfileStoreLabel; class FileBrowser; @@ -53,12 +53,6 @@ public: } }; -struct FileBrowserIdleHelper { - FileBrowser* fbrowser; - bool destroyed; - int pending; -}; - /* * Class handling actions common to all thumbnails of the file browser */ @@ -67,17 +61,19 @@ class FileBrowser : public ThumbBrowserBase, public ExportPanelListener, public ProfileStoreListener { - +private: typedef sigc::signal type_trash_changed; -protected: + IdleRegister idle_register; + unsigned int session_id_; +protected: Gtk::MenuItem* rank[6]; - Gtk::ImageMenuItem* colorlabel[6]; + MyImageMenuItem* colorlabel[6]; Gtk::MenuItem* trash; Gtk::MenuItem* untrash; - Gtk::ImageMenuItem* develop; - Gtk::ImageMenuItem* developfast; + Gtk::MenuItem* develop; + Gtk::MenuItem* developfast; Gtk::MenuItem* rename; Gtk::MenuItem* remove; Gtk::MenuItem* removeInclProc; @@ -89,7 +85,7 @@ protected: Gtk::MenuItem* menuRank; Gtk::MenuItem* menuLabel; Gtk::MenuItem* menuFileOperations; - Gtk::ImageMenuItem* menuProfileOperations; + MyImageMenuItem* menuProfileOperations; Gtk::MenuItem* menuExtProg; Gtk::MenuItem** amiExtProg; Gtk::MenuItem* miOpenDefaultViewer; @@ -110,14 +106,14 @@ protected: Gtk::MenuItem* partpasteprof; Gtk::MenuItem* applyprof; Gtk::MenuItem* applypartprof; - Gtk::MenuItem* execcustprof; + Gtk::MenuItem* resetdefaultprof; Gtk::MenuItem* clearprof; Gtk::MenuItem* cachemenu; Gtk::MenuItem* clearFromCache; Gtk::MenuItem* clearFromCacheFull; Gtk::Menu* pmenu; - Gtk::ImageMenuItem* colorlabel_pop[6]; + MyImageMenuItem* colorlabel_pop[6]; Gtk::Menu* pmenuColorLabels; void* colorLabel_actionData; void menuColorlabelActivated (Gtk::MenuItem* m); // use only when menu is invoked via FileBrowser::buttonPressed to pass actionData @@ -128,8 +124,6 @@ protected: FileBrowserListener* tbl; BrowserFilter filter; int numFiltered; - PartialPasteDlg partialPasteDlg; - FileBrowserIdleHelper* fbih; void toTrashRequested (std::vector tbe); void fromTrashRequested (std::vector tbe); @@ -144,7 +138,6 @@ protected: type_trash_changed m_trash_changed; public: - FileBrowser (); ~FileBrowser (); @@ -153,6 +146,8 @@ public: FileBrowserEntry* delEntry (const Glib::ustring& fname); // return the entry if found here return NULL otherwise void close (); + unsigned int session_id() const { return session_id_; } + void setBatchPParamsChangeListener (BatchPParamsChangeListener* l) { bppcl = l; diff --git a/rtgui/filebrowserentry.cc b/rtgui/filebrowserentry.cc index 57deca4fd..d76870788 100644 --- a/rtgui/filebrowserentry.cc +++ b/rtgui/filebrowserentry.cc @@ -30,13 +30,15 @@ #define CROPRESIZEBORDER 4 +//extern Glib::Threads::Thread* mainThread; + bool FileBrowserEntry::iconsLoaded(false); Glib::RefPtr FileBrowserEntry::editedIcon; Glib::RefPtr FileBrowserEntry::recentlySavedIcon; Glib::RefPtr FileBrowserEntry::enqueuedIcon; FileBrowserEntry::FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname) - : ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(nullptr), cropgl(nullptr), state(SNormal) + : ThumbBrowserEntryBase (fname), wasInside(false), iatlistener(nullptr), press_x(0), press_y(0), action_x(0), action_y(0), rot_deg(0.0), landscape(true), cropgl(nullptr), state(SNormal), crop_custom_ratio(0.f) { thumbnail = thm; @@ -58,13 +60,12 @@ FileBrowserEntry::FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname) iconsLoaded = true; } - if (thm) { - thm->addThumbnailListener (this); - } + thumbnail->addThumbnailListener (this); } FileBrowserEntry::~FileBrowserEntry () { + idle_register.destroy(); // so jobs arriving now do nothing if (feih->pending) { @@ -174,39 +175,6 @@ void FileBrowserEntry::procParamsChanged (Thumbnail* thm, int whoChangedIt) } } -struct tiupdate { - FileBrowserEntryIdleHelper* feih; - rtengine::IImage8* img; - double scale; - rtengine::procparams::CropParams cropParams; -}; - -int updateImageUI (void* data) -{ - - tiupdate* params = static_cast(data); - FileBrowserEntryIdleHelper* feih = params->feih; - - if (feih->destroyed) { - if (feih->pending == 1) { - delete feih; - } else { - feih->pending--; - } - - params->img->free (); - delete params; - return 0; - } - - feih->fbentry->_updateImage (params->img, params->scale, params->cropParams); - feih->pending--; - - delete params; - - return 0; -} - void FileBrowserEntry::updateImage (rtengine::IImage8* img, double scale, rtengine::procparams::CropParams cropParams) { @@ -223,16 +191,47 @@ void FileBrowserEntry::updateImage (rtengine::IImage8* img, double scale, rtengi feih->pending++; } - tiupdate* param = new tiupdate (); - param->feih = feih; - param->img = img; - param->scale = scale; - param->cropParams = cropParams; -#if __GNUC__ == 4 && __GNUC_MINOR__ == 8 && defined( WIN32 ) && defined(__x86_64__) - g_idle_add_full (G_PRIORITY_DEFAULT, updateImageUI, param, NULL); -#else - g_idle_add_full (G_PRIORITY_LOW, updateImageUI, param, nullptr); -#endif + struct tiupdate { + FileBrowserEntryIdleHelper* feih; + rtengine::IImage8* img; + double scale; + rtengine::procparams::CropParams cropParams; + }; + + tiupdate* param = new tiupdate{ + feih, + img, + scale, + cropParams + }; + + const gint priority = G_PRIORITY_LOW; + + const auto func = [](gpointer data) -> gboolean { + tiupdate* const params = static_cast(data); + FileBrowserEntryIdleHelper* const feih = params->feih; + + if (feih->destroyed) { + if (feih->pending == 1) { + delete feih; + } else { + feih->pending--; + } + + params->img->free (); + delete params; + return 0; + } + + feih->fbentry->_updateImage (params->img, params->scale, params->cropParams); + feih->pending--; + + delete params; + + return FALSE; + }; + + idle_register.add(func, param, priority); } void FileBrowserEntry::_updateImage (rtengine::IImage8* img, double s, rtengine::procparams::CropParams cropParams) @@ -317,24 +316,24 @@ bool FileBrowserEntry::motionNotify (int x, int y) int oy = cropParams.y; cropParams.y = action_y + (y - press_y) / scale; cropParams.h += oy - cropParams.y; - cropgl->cropHeight1Resized (cropParams.x, cropParams.y, cropParams.w, cropParams.h); + cropgl->cropHeight1Resized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio); updateBackBuffer (); parent->redrawNeeded (this); } else if (state == SResizeH2 && cropgl) { cropParams.h = action_y + (y - press_y) / scale; - cropgl->cropHeight2Resized (cropParams.x, cropParams.y, cropParams.w, cropParams.h); + cropgl->cropHeight2Resized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio); updateBackBuffer (); parent->redrawNeeded (this); } else if (state == SResizeW1 && cropgl) { int ox = cropParams.x; cropParams.x = action_x + (x - press_x) / scale; cropParams.w += ox - cropParams.x; - cropgl->cropWidth1Resized (cropParams.x, cropParams.y, cropParams.w, cropParams.h); + cropgl->cropWidth1Resized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio); updateBackBuffer (); parent->redrawNeeded (this); } else if (state == SResizeW2 && cropgl) { cropParams.w = action_x + (x - press_x) / scale; - cropgl->cropWidth2Resized (cropParams.x, cropParams.y, cropParams.w, cropParams.h); + cropgl->cropWidth2Resized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio); updateBackBuffer (); parent->redrawNeeded (this); } else if (state == SResizeTL && cropgl) { @@ -344,7 +343,7 @@ bool FileBrowserEntry::motionNotify (int x, int y) int oy = cropParams.y; cropParams.y = action_y + (y - press_y) / scale; cropParams.h += oy - cropParams.y; - cropgl->cropTopLeftResized (cropParams.x, cropParams.y, cropParams.w, cropParams.h); + cropgl->cropTopLeftResized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio); updateBackBuffer (); parent->redrawNeeded (this); } else if (state == SResizeTR && cropgl) { @@ -352,7 +351,7 @@ bool FileBrowserEntry::motionNotify (int x, int y) int oy = cropParams.y; cropParams.y = action_y + (y - press_y) / scale; cropParams.h += oy - cropParams.y; - cropgl->cropTopRightResized (cropParams.x, cropParams.y, cropParams.w, cropParams.h); + cropgl->cropTopRightResized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio); updateBackBuffer (); parent->redrawNeeded (this); } else if (state == SResizeBL && cropgl) { @@ -360,13 +359,13 @@ bool FileBrowserEntry::motionNotify (int x, int y) cropParams.x = action_x + (x - press_x) / scale; cropParams.w += ox - cropParams.x; cropParams.h = action_y + (y - press_y) / scale; - cropgl->cropBottomLeftResized (cropParams.x, cropParams.y, cropParams.w, cropParams.h); + cropgl->cropBottomLeftResized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio); updateBackBuffer (); parent->redrawNeeded (this); } else if (state == SResizeBR && cropgl) { cropParams.w = action_x + (x - press_x) / scale; cropParams.h = action_y + (y - press_y) / scale; - cropgl->cropBottomRightResized (cropParams.x, cropParams.y, cropParams.w, cropParams.h); + cropgl->cropBottomRightResized (cropParams.x, cropParams.y, cropParams.w, cropParams.h, crop_custom_ratio); updateBackBuffer (); parent->redrawNeeded (this); } else if (state == SCropMove && cropgl) { @@ -416,8 +415,17 @@ bool FileBrowserEntry::pressNotify (int button, int type, int bstate, int x, i int ix = x - startx - ofsX; int iy = y - starty - ofsY; + if (tm == TMNone) { + return b; + } + + crop_custom_ratio = 0.f; + if (!b && selected && inside (x, y)) { if (button == 1 && type == GDK_BUTTON_PRESS && state == SNormal) { + if ((bstate & GDK_SHIFT_MASK) && cropParams.w > 0 && cropParams.h > 0) { + crop_custom_ratio = float(cropParams.w) / float(cropParams.h); + } if (onArea (CropTopLeft, ix, iy)) { state = SResizeTL; press_x = x; @@ -629,6 +637,7 @@ bool FileBrowserEntry::onArea (CursorArea a, int x, int y) y1 < cropParams.y + cropParams.h - 1 && x1 > cropParams.x && x1 < cropParams.x + cropParams.w - 1; + default: /* do nothing */ ; } return false; @@ -642,69 +651,72 @@ void FileBrowserEntry::updateCursor (int x, int y) return; } + CursorShape newCursor = CSUndefined; + ToolMode tm = iatlistener->getToolBar()->getTool (); Glib::RefPtr w = parent->getDrawingArea ()->get_window(); if (!selected) { - cursorManager.setCursor (w, CSArrow); - return; - } - - if (state == SNormal) { + newCursor = CSArrow; + } else if (state == SNormal) { if (tm == TMHand && (onArea (CropTop, x, y) || onArea (CropBottom, x, y))) { - cursorManager.setCursor (w, CSResizeHeight); + newCursor = CSResizeHeight; } else if (tm == TMHand && (onArea (CropLeft, x, y) || onArea (CropRight, x, y))) { - cursorManager.setCursor (w, CSResizeWidth); + newCursor = CSResizeWidth; } else if (tm == TMHand && (onArea (CropTopLeft, x, y))) { - cursorManager.setCursor (w, CSResizeTopLeft); + newCursor = CSResizeTopLeft; } else if (tm == TMHand && (onArea (CropTopRight, x, y))) { - cursorManager.setCursor (w, CSResizeTopRight); + newCursor = CSResizeTopRight; } else if (tm == TMHand && (onArea (CropBottomLeft, x, y))) { - cursorManager.setCursor (w, CSResizeBottomLeft); + newCursor = CSResizeBottomLeft; } else if (tm == TMHand && (onArea (CropBottomRight, x, y))) { - cursorManager.setCursor (w, CSResizeBottomRight); + newCursor = CSResizeBottomRight; } else if (onArea (CropImage, x, y)) { if (tm == TMHand) { - cursorManager.setCursor (w, CSArrow); + newCursor = CSArrow; } else if (tm == TMSpotWB) { - cursorManager.setCursor (w, CSSpotWB); + newCursor = CSSpotWB; } else if (tm == TMCropSelect) { - cursorManager.setCursor (w, CSCropSelect); + newCursor = CSCropSelect; } else if (tm == TMStraighten) { - cursorManager.setCursor (w, CSStraighten); + newCursor = CSStraighten; } } else { - cursorManager.setCursor (w, CSArrow); + newCursor = CSArrow; } } else if (state == SCropSelecting) { - cursorManager.setCursor (w, CSCropSelect); + newCursor = CSCropSelect; } else if (state == SRotateSelecting) { - cursorManager.setCursor (w, CSStraighten); + newCursor = CSStraighten; } else if (state == SCropMove) { - cursorManager.setCursor (w, CSMove); + newCursor = CSMove; } else if (state == SResizeW1 || state == SResizeW2) { - cursorManager.setCursor (w, CSResizeWidth); + newCursor = CSResizeWidth; } else if (state == SResizeH1 || state == SResizeH2) { - cursorManager.setCursor (w, CSResizeHeight); + newCursor = CSResizeHeight; } else if (state == SResizeTL) { - cursorManager.setCursor (w, CSResizeTopLeft); + newCursor = CSResizeTopLeft; } else if (state == SResizeTR) { - cursorManager.setCursor (w, CSResizeTopRight); + newCursor = CSResizeTopRight; } else if (state == SResizeBL) { - cursorManager.setCursor (w, CSResizeBottomLeft); + newCursor = CSResizeBottomLeft; } else if (state == SResizeBR) { - cursorManager.setCursor (w, CSResizeBottomRight); + newCursor = CSResizeBottomRight; + } + + if (newCursor != cursor_type) { + cursor_type = newCursor; + CursorManager::setCursorOfMainWindow (w, cursor_type); } } -void FileBrowserEntry::draw () +void FileBrowserEntry::draw (Cairo::RefPtr cc) { - ThumbBrowserEntryBase::draw (); + ThumbBrowserEntryBase::draw (cc); if (state == SRotateSelecting) { - Cairo::RefPtr cr = parent->getDrawingArea ()->get_window()->create_cairo_context(); - drawStraightenGuide (cr); + drawStraightenGuide (cc); } } @@ -714,7 +726,7 @@ void FileBrowserEntry::drawStraightenGuide (Cairo::RefPtr cr) if (action_x != press_x || action_y != press_y) { double arg = (press_x - action_x) / sqrt(double((press_x - action_x) * (press_x - action_x) + (press_y - action_y) * (press_y - action_y))); double sol1, sol2; - double pi = M_PI; + double pi = rtengine::RT_PI; if (press_y > action_y) { sol1 = acos(arg) * 180 / pi; diff --git a/rtgui/filebrowserentry.h b/rtgui/filebrowserentry.h index 8aaa54b1c..4c3d519ab 100644 --- a/rtgui/filebrowserentry.h +++ b/rtgui/filebrowserentry.h @@ -56,6 +56,9 @@ class FileBrowserEntry : public ThumbBrowserEntryBase, FileBrowserEntryIdleHelper* feih; ImgEditState state; + float crop_custom_ratio; + + IdleRegister idle_register; bool onArea (CursorArea a, int x, int y); void updateCursor (int x, int y); @@ -70,7 +73,7 @@ public: FileBrowserEntry (Thumbnail* thm, const Glib::ustring& fname); ~FileBrowserEntry (); - void draw (); + void draw (Cairo::RefPtr cc); void setImageAreaToolListener (ImageAreaToolListener* l) { diff --git a/rtgui/filecatalog.cc b/rtgui/filecatalog.cc index 97407fb1e..eafe32fcd 100644 --- a/rtgui/filecatalog.cc +++ b/rtgui/filecatalog.cc @@ -44,18 +44,25 @@ using namespace std; FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : filepanel(filepanel), selectedDirectoryId(1), + actionNextPrevious(NAV_NONE), listener(nullptr), fslistener(nullptr), + iatlistener(nullptr), hasValidCurrentEFS(false), filterPanel(nullptr), + exportPanel(nullptr), previewsToLoad(0), previewsLoaded(0), + modifierKey(0), coarsePanel(cp), toolBar(tb) { inTabMode = false; + set_name ("FileBrowser"); + set_spacing (2); + // construct and initialize thumbnail browsers fileBrowser = Gtk::manage( new FileBrowser() ); fileBrowser->setFileBrowserListener (this); @@ -65,7 +72,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : set_size_request(0, 250); // construct trash panel with the extra "empty trash" button trashButtonBox = Gtk::manage( new Gtk::VBox ); - Gtk::Button* emptyT = Gtk::manage( new Gtk::Button (M("FILEBROWSER_EMPTYTRASH"))); + Gtk::Button* emptyT = Gtk::manage( new Gtk::Button ()); emptyT->set_tooltip_markup (M("FILEBROWSER_EMPTYTRASHHINT")); emptyT->set_image (*Gtk::manage(new RTImage ("trash.png"))); emptyT->signal_pressed().connect (sigc::mem_fun(*this, &FileCatalog::emptyTrash)); @@ -102,6 +109,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : Query = Gtk::manage(new Gtk::Entry ()); // cannot use Gtk::manage here as FileCatalog::getFilter will fail on Query->get_text() Query->set_text(""); Query->set_width_chars (20); // TODO !!! add this value to options? + Query->set_max_width_chars (20); Query->set_tooltip_markup (M("FILEBROWSER_QUERYHINT")); Gtk::HBox* hbQuery = Gtk::manage(new Gtk::HBox ()); buttonQueryClear = Gtk::manage(new Gtk::Button ()); @@ -124,10 +132,9 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : // setup button bar buttonBar = Gtk::manage( new Gtk::HBox () ); + buttonBar->set_name ("ToolBarPanelFileBrowser"); pack_start (*buttonBar, Gtk::PACK_SHRINK); - buttonBar->pack_start (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK); - tbLeftPanel_1 = new Gtk::ToggleButton (); iLeftPanel_1_Show = new RTImage("panel-to-right.png"); iLeftPanel_1_Hide = new RTImage("panel-to-left.png"); @@ -139,8 +146,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : tbLeftPanel_1->signal_toggled().connect( sigc::mem_fun(*this, &FileCatalog::tbLeftPanel_1_toggled) ); buttonBar->pack_start (*tbLeftPanel_1, Gtk::PACK_SHRINK); - buttonBar->pack_start (*(new Gtk::VSeparator), Gtk::PACK_SHRINK); - + vSepiLeftPanel = new Gtk::VSeparator (); + buttonBar->pack_start (*vSepiLeftPanel, Gtk::PACK_SHRINK); iFilterClear = new RTImage ("filterclear.png"); igFilterClear = new RTImage ("filter.png"); @@ -410,6 +417,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : hBox = Gtk::manage( new Gtk::HBox () ); hBox->show (); hBox->pack_end (*fileBrowser); + hBox->set_name ("FilmstripPanel"); fileBrowser->applyFilter (getFilter()); // warning: can call this only after all objects used in getFilter (e.g. Query) are instantiated //printf("FileCatalog::FileCatalog fileBrowser->applyFilter (getFilter())\n"); pack_start (*hBox); @@ -431,6 +439,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) : FileCatalog::~FileCatalog() { + idle_register.destroy(); + for (int i = 0; i < 5; i++) { delete iranked[i]; delete igranked[i]; @@ -667,17 +677,11 @@ void FileCatalog::_refreshProgressBar () GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected Gtk::Notebook *nb = (Gtk::Notebook *)(filepanel->get_parent()); - Gtk::Box* hbb = nullptr; + Gtk::Grid* grid = Gtk::manage (new Gtk::Grid ()); Gtk::Label *label = nullptr; - if( options.mainNBVertical ) { - hbb = Gtk::manage (new Gtk::VBox ()); - } else { - hbb = Gtk::manage (new Gtk::HBox ()); - } - if (!previewsToLoad ) { - hbb->pack_start (*Gtk::manage (new Gtk::Image (Gtk::Stock::DIRECTORY, Gtk::ICON_SIZE_MENU))); + grid->attach_next_to(*Gtk::manage (new RTImage ("gtk-directory.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1); int filteredCount = min(fileBrowser->getNumFiltered(), previewsLoaded); label = Gtk::manage (new Gtk::Label (M("MAIN_FRAME_FILEBROWSER") + @@ -685,7 +689,7 @@ void FileCatalog::_refreshProgressBar () + Glib::ustring::format(previewsLoaded) + (filteredCount != previewsLoaded ? "]" : ")"))); } else { - hbb->pack_start (*Gtk::manage (new Gtk::Image (Gtk::Stock::FIND, Gtk::ICON_SIZE_MENU))); + grid->attach_next_to(*Gtk::manage (new RTImage ("gtk-find.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1); label = Gtk::manage (new Gtk::Label (M("MAIN_FRAME_FILEBROWSER") + " [" + Glib::ustring::format(std::fixed, std::setprecision(0), std::setw(3), (double)previewsLoaded / previewsToLoad * 100 ) + "%]" )); filepanel->loadingThumbs("", (double)previewsLoaded / previewsToLoad); } @@ -694,23 +698,25 @@ void FileCatalog::_refreshProgressBar () label->set_angle(90); } - hbb->pack_start (*label); - hbb->set_spacing (2); - hbb->set_tooltip_markup (M("MAIN_FRAME_FILEBROWSER_TOOLTIP")); - hbb->show_all (); - nb->set_tab_label(*filepanel, *hbb); - } -} + grid->attach_next_to(*label, options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1); + grid->set_tooltip_markup (M("MAIN_FRAME_FILEBROWSER_TOOLTIP")); + grid->show_all (); -int refreshProgressBarUI (void* data) -{ - (static_cast(data))->_refreshProgressBar (); - return 0; + if (nb) { + nb->set_tab_label(*filepanel, *grid); + } + } } void FileCatalog::filterApplied() { - g_idle_add (refreshProgressBarUI, this); + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->_refreshProgressBar(); + + return FALSE; + }; + + idle_register.add(func, this); } @@ -718,6 +724,7 @@ void FileCatalog::previewReady (int dir_id, FileBrowserEntry* fdn) { if ( dir_id != selectedDirectoryId ) { + delete fdn; return; } @@ -748,12 +755,12 @@ void FileCatalog::previewReady (int dir_id, FileBrowserEntry* fdn) dirEFS.shutterTo = cfs->shutter; } - if (cfs->iso > 0 && (int)cfs->iso < dirEFS.isoFrom) { - dirEFS.isoFrom = (int)cfs->iso; + if (cfs->iso > 0 && cfs->iso < dirEFS.isoFrom) { + dirEFS.isoFrom = cfs->iso; } - if (cfs->iso > 0 && (int)cfs->iso > dirEFS.isoTo) { - dirEFS.isoTo = (int)cfs->iso; + if (cfs->iso > 0 && cfs->iso > dirEFS.isoTo) { + dirEFS.isoTo = cfs->iso; } if (cfs->focalLen < dirEFS.focalFrom) { @@ -773,13 +780,7 @@ void FileCatalog::previewReady (int dir_id, FileBrowserEntry* fdn) previewsLoaded++; - g_idle_add (refreshProgressBarUI, this); -} - -int prevfinished (void* data) -{ - (static_cast(data))->previewsFinishedUI (); - return 0; + _refreshProgressBar(); } // Called within GTK UI thread @@ -824,6 +825,9 @@ void FileCatalog::previewsFinishedUI () refImageForOpen_fname = ""; actionNextPrevious = NAV_NONE; } + + // newly added item might have been already trashed in a previous session + trashChanged(); } void FileCatalog::previewsFinished (int dir_id) @@ -838,7 +842,13 @@ void FileCatalog::previewsFinished (int dir_id) currentEFS = dirEFS; } - g_idle_add (prevfinished, this); + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->previewsFinishedUI(); + + return FALSE; + }; + + idle_register.add(func, this); } void FileCatalog::setEnabled (bool e) @@ -920,7 +930,7 @@ void FileCatalog::openRequested (std::vector tmb) tmb[i]->increaseRef (); } - g_idle_add (openRequestedUI, params); + idle_register.add(openRequestedUI, params); } void FileCatalog::deleteRequested (std::vector tbe, bool inclBatchProcessed) @@ -983,8 +993,8 @@ void FileCatalog::copyMoveRequested (std::vector tbe, bool m } Gtk::FileChooserDialog fc (getToplevelWindow (this), fc_title, Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER ); - fc.add_button( Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL); - fc.add_button( Gtk::StockID("gtk-ok"), Gtk::RESPONSE_OK); + fc.add_button( M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); + fc.add_button( M("GENERAL_OK"), Gtk::RESPONSE_OK); // open dialog at the 1-st file's path fc.set_filename(tbe[0]->filename); //!!! TODO prevent dialog closing on "enter" key press @@ -1095,99 +1105,108 @@ void FileCatalog::developRequested (std::vector tbe, bool fas // and also those which effect is not pronounced after reducing the image size // TODO!!! could expose selections below via preferences if (fastmode) { - if (options.fastexport_bypass_sharpening ) { - params.sharpening.enabled = false; + if (!options.fastexport_use_fast_pipeline) { + if (options.fastexport_bypass_sharpening) { + params.sharpening.enabled = false; + } + + if (options.fastexport_bypass_sharpenEdge) { + params.sharpenEdge.enabled = false; + } + + if (options.fastexport_bypass_sharpenMicro) { + params.sharpenMicro.enabled = false; + } + + //if (options.fastexport_bypass_lumaDenoise) params.lumaDenoise.enabled = false; + //if (options.fastexport_bypass_colorDenoise) params.colorDenoise.enabled = false; + if (options.fastexport_bypass_defringe) { + params.defringe.enabled = false; + } + + if (options.fastexport_bypass_dirpyrDenoise) { + params.dirpyrDenoise.enabled = false; + } + + if (options.fastexport_bypass_sh_hq) { + params.sh.hq = false; + } + + if (options.fastexport_bypass_dirpyrequalizer) { + params.dirpyrequalizer.enabled = false; + } + + if (options.fastexport_bypass_wavelet) { + params.wavelet.enabled = false; + } + + //if (options.fastexport_bypass_raw_bayer_all_enhance) params.raw.bayersensor.all_enhance = false; + if (options.fastexport_bypass_raw_bayer_dcb_iterations) { + params.raw.bayersensor.dcb_iterations = 0; + } + + if (options.fastexport_bypass_raw_bayer_dcb_enhance) { + params.raw.bayersensor.dcb_enhance = false; + } + + if (options.fastexport_bypass_raw_bayer_lmmse_iterations) { + params.raw.bayersensor.lmmse_iterations = 0; + } + + if (options.fastexport_bypass_raw_bayer_linenoise) { + params.raw.bayersensor.linenoise = 0; + } + + if (options.fastexport_bypass_raw_bayer_greenthresh) { + params.raw.bayersensor.greenthresh = 0; + } + + if (options.fastexport_bypass_raw_ccSteps) { + params.raw.bayersensor.ccSteps = params.raw.xtranssensor.ccSteps = 0; + } + + if (options.fastexport_bypass_raw_ca) { + params.raw.ca_autocorrect = false; + params.raw.cared = 0; + params.raw.cablue = 0; + } + + if (options.fastexport_bypass_raw_df) { + params.raw.df_autoselect = false; + params.raw.dark_frame = ""; + } + + if (options.fastexport_bypass_raw_ff) { + params.raw.ff_AutoSelect = false; + params.raw.ff_file = ""; + } + + params.raw.bayersensor.method = options.fastexport_raw_bayer_method; + params.raw.xtranssensor.method = options.fastexport_raw_xtrans_method; + params.icm.input = options.fastexport_icm_input; + params.icm.working = options.fastexport_icm_working; + params.icm.output = options.fastexport_icm_output; + params.icm.outputIntent = options.fastexport_icm_outputIntent; + params.icm.outputBPC = options.fastexport_icm_outputBPC; + params.icm.gamma = options.fastexport_icm_gamma; } - if (options.fastexport_bypass_sharpenEdge ) { - params.sharpenEdge.enabled = false; + if (params.resize.enabled) { + params.resize.width = rtengine::min(params.resize.width, options.fastexport_resize_width); + params.resize.height = rtengine::min(params.resize.height, options.fastexport_resize_height); + } else { + params.resize.width = options.fastexport_resize_width; + params.resize.height = options.fastexport_resize_height; } - - if (options.fastexport_bypass_sharpenMicro ) { - params.sharpenMicro.enabled = false; - } - - //if (options.fastexport_bypass_lumaDenoise ) params.lumaDenoise.enabled = false; - //if (options.fastexport_bypass_colorDenoise ) params.colorDenoise.enabled = false; - if (options.fastexport_bypass_defringe ) { - params.defringe.enabled = false; - } - - if (options.fastexport_bypass_dirpyrDenoise ) { - params.dirpyrDenoise.enabled = false; - } - - if (options.fastexport_bypass_sh_hq ) { - params.sh.hq = false; - } - - if (options.fastexport_bypass_dirpyrequalizer ) { - params.dirpyrequalizer.enabled = false; - } - - if (options.fastexport_bypass_wavelet ) { - params.wavelet.enabled = false; - } - - //if (options.fastexport_bypass_raw_bayer_all_enhance ) params.raw.bayersensor.all_enhance = false; - if (options.fastexport_bypass_raw_bayer_dcb_iterations ) { - params.raw.bayersensor.dcb_iterations = 0; - } - - if (options.fastexport_bypass_raw_bayer_dcb_enhance ) { - params.raw.bayersensor.dcb_enhance = false; - } - - if (options.fastexport_bypass_raw_bayer_lmmse_iterations) { - params.raw.bayersensor.lmmse_iterations = 0; - } - - if (options.fastexport_bypass_raw_bayer_linenoise ) { - params.raw.bayersensor.linenoise = 0; - } - - if (options.fastexport_bypass_raw_bayer_greenthresh ) { - params.raw.bayersensor.greenthresh = 0; - } - - if (options.fastexport_bypass_raw_ccSteps ) { - params.raw.bayersensor.ccSteps = params.raw.xtranssensor.ccSteps = 0; - } - - if (options.fastexport_bypass_raw_ca ) { - params.raw.ca_autocorrect = false; - params.raw.cared = 0; - params.raw.cablue = 0; - } - - if (options.fastexport_bypass_raw_df ) { - params.raw.df_autoselect = false; - params.raw.dark_frame = ""; - } - - if (options.fastexport_bypass_raw_ff ) { - params.raw.ff_AutoSelect = false; - params.raw.ff_file = ""; - } - - params.raw.bayersensor.method = options.fastexport_raw_bayer_method ; - params.raw.xtranssensor.method = options.fastexport_raw_xtrans_method; - params.icm.input = options.fastexport_icm_input ; - params.icm.working = options.fastexport_icm_working ; - params.icm.output = options.fastexport_icm_output ; - params.icm.outputIntent = options.fastexport_icm_outputIntent ; - params.icm.outputBPC = options.fastexport_icm_outputBPC ; - params.icm.gamma = options.fastexport_icm_gamma ; - params.resize.enabled = options.fastexport_resize_enabled ; - params.resize.scale = options.fastexport_resize_scale ; - params.resize.appliesTo = options.fastexport_resize_appliesTo ; - params.resize.method = options.fastexport_resize_method ; - params.resize.dataspec = options.fastexport_resize_dataspec ; - params.resize.width = options.fastexport_resize_width ; - params.resize.height = options.fastexport_resize_height ; + + params.resize.enabled = options.fastexport_resize_enabled; + params.resize.scale = options.fastexport_resize_scale; + params.resize.appliesTo = options.fastexport_resize_appliesTo; + params.resize.method = options.fastexport_resize_method; + params.resize.dataspec = options.fastexport_resize_dataspec; } - rtengine::ProcessingJob* pjob = rtengine::ProcessingJob::create (fbe->filename, th->getType() == FT_Raw, params); + rtengine::ProcessingJob* pjob = rtengine::ProcessingJob::create (fbe->filename, th->getType() == FT_Raw, params, fastmode && options.fastexport_use_fast_pipeline); int pw; int ph = BatchQueue::calcMaxThumbnailHeight(); @@ -1744,15 +1763,16 @@ void FileCatalog::reparseDirectory () } #ifdef WIN32 -int winDirChangedUITread (void* cat) -{ - (static_cast(cat))->reparseDirectory (); - return 0; -} void FileCatalog::winDirChanged () { - g_idle_add(winDirChangedUITread, this); + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->reparseDirectory(); + + return FALSE; + }; + + idle_register.add(func, this); } #else @@ -1775,38 +1795,36 @@ void FileCatalog::on_dir_changed (const Glib::RefPtr& file, const Gli void FileCatalog::checkAndAddFile (Glib::RefPtr file) { - if (!file) { - return; - } - if (!file->query_exists()) { + if (!file) { return; } try { - auto info = file->query_info (); + const auto info = file->query_info("standard::*"); - if (!info || info->get_file_type () == Gio::FILE_TYPE_DIRECTORY) { + if (!info || info->get_file_type() == Gio::FILE_TYPE_DIRECTORY) { return; } - if (!options.fbShowHidden && info->is_hidden ()) { + if (!options.fbShowHidden && info->is_hidden()) { return; } Glib::ustring ext; - const auto lastdot = info->get_name ().find_last_of ('.'); + const auto lastdot = info->get_name().find_last_of('.'); + if (lastdot != Glib::ustring::npos) { - ext = info->get_name ().substr (lastdot + 1); + ext = info->get_name().substr(lastdot + 1); } - if (!options.is_extention_enabled (ext)) { + if (!options.is_extention_enabled(ext)) { return; } - previewLoader->add (selectedDirectoryId, file->get_parse_name (), this); + previewLoader->add(selectedDirectoryId, file->get_parse_name(), this); previewsToLoad++; } catch(Gio::Error&) {} @@ -1857,7 +1875,7 @@ void FileCatalog::addAndOpenFile (const Glib::ustring& fname) params->catalog = this; params->tmb.push_back (tmb); tmb->increaseRef (); - g_idle_add (openRequestedUI, params); + idle_register.add(openRequestedUI, params); } catch(Gio::Error&) {} } @@ -1970,7 +1988,7 @@ bool FileCatalog::Query_key_pressed (GdkEventKey *event) bool shift = event->state & GDK_SHIFT_MASK; switch (event->keyval) { - case GDK_Escape: + case GDK_KEY_Escape: // Clear Query if the Escape character is pressed within it if (!shift) { @@ -2059,7 +2077,7 @@ bool FileCatalog::BrowsePath_key_pressed (GdkEventKey *event) bool shift = event->state & GDK_SHIFT_MASK; switch (event->keyval) { - case GDK_Escape: + case GDK_KEY_Escape: // On Escape character Reset BrowsePath to selectedDirectory if (!shift) { @@ -2082,8 +2100,10 @@ void FileCatalog::tbLeftPanel_1_visible (bool visible) { if (visible) { tbLeftPanel_1->show(); + vSepiLeftPanel->show(); } else { tbLeftPanel_1->hide(); + vSepiLeftPanel->hide(); } } void FileCatalog::tbRightPanel_1_visible (bool visible) @@ -2230,7 +2250,7 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) // GUI Layout switch(event->keyval) { - case GDK_l: + case GDK_KEY_l: if (!alt) { tbLeftPanel_1->set_active (!tbLeftPanel_1->get_active()); // toggle left panel } @@ -2246,7 +2266,7 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) return true; - case GDK_m: + case GDK_KEY_m: if (!ctrl && !alt) { toggleSidePanels(); } @@ -2256,7 +2276,7 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) if (shift) { switch(event->keyval) { - case GDK_Escape: + case GDK_KEY_Escape: BrowsePath->set_text(selectedDirectory); // set focus on something neutral, this is useful to remove focus from BrowsePath and Query // when need to execute a shortcut, which otherwise will be typed into those fields @@ -2306,8 +2326,8 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) if (!alt && !shift) { switch(event->keyval) { - case GDK_Return: - case GDK_KP_Enter: + case GDK_KEY_Return: + case GDK_KEY_KP_Enter: if (BrowsePath->is_focus()) { FileCatalog::buttonBrowsePathPressed (); return true; @@ -2394,8 +2414,8 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) if (!alt && !shift) { switch(event->keyval) { - case GDK_Return: - case GDK_KP_Enter: + case GDK_KEY_Return: + case GDK_KEY_KP_Enter: if (BrowsePath->is_focus()) { FileCatalog::buttonBrowsePathPressed (); return true; @@ -2445,8 +2465,8 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) if (!ctrl && !alt) { switch(event->keyval) { - case GDK_d: - case GDK_D: + case GDK_KEY_d: + case GDK_KEY_D: categoryButtonToggled(bFilterClear, false); return true; } @@ -2455,26 +2475,26 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) if (!ctrl || (alt && !options.tabbedUI)) { switch(event->keyval) { - case GDK_bracketright: + case GDK_KEY_bracketright: coarsePanel->rotateRight(); return true; - case GDK_bracketleft: + case GDK_KEY_bracketleft: coarsePanel->rotateLeft(); return true; - case GDK_i: - case GDK_I: + case GDK_KEY_i: + case GDK_KEY_I: exifInfo->set_active (!exifInfo->get_active()); return true; - case GDK_plus: - case GDK_equal: + case GDK_KEY_plus: + case GDK_KEY_equal: zoomIn(); return true; - case GDK_minus: - case GDK_underscore: + case GDK_KEY_minus: + case GDK_KEY_underscore: zoomOut(); return true; } @@ -2482,18 +2502,18 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) if (ctrl && !alt) { switch (event->keyval) { - case GDK_o: + case GDK_KEY_o: BrowsePath->select_region(0, BrowsePath->get_text_length()); BrowsePath->grab_focus(); return true; - case GDK_f: + case GDK_KEY_f: Query->select_region(0, Query->get_text_length()); Query->grab_focus(); return true; - case GDK_t: - case GDK_T: + case GDK_KEY_t: + case GDK_KEY_T: modifierKey = 0; // HOMBRE: yet another hack.... otherwise the shortcut won't work categoryButtonToggled(bTrash, false); return true; @@ -2502,8 +2522,8 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) if (!ctrl && !alt && shift) { switch (event->keyval) { - case GDK_t: - case GDK_T: + case GDK_KEY_t: + case GDK_KEY_T: if (inTabMode) { if (options.showFilmStripToolBar) { hideToolBar(); @@ -2520,8 +2540,8 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) if (!ctrl && !alt && !shift) { switch (event->keyval) { - case GDK_t: - case GDK_T: + case GDK_KEY_t: + case GDK_KEY_T: if (inTabMode) { if (options.showFilmStripToolBar) { hideToolBar(); diff --git a/rtgui/filecatalog.h b/rtgui/filecatalog.h index eb23e65a6..29e4a370a 100644 --- a/rtgui/filecatalog.h +++ b/rtgui/filecatalog.h @@ -36,20 +36,6 @@ #include "multilangmgr.h" #include "threadutils.h" - -class DirEntry -{ - -public: - Glib::ustring fullName; - - explicit DirEntry (const Glib::ustring& n) : fullName (n) {} - - bool operator< (DirEntry& other) - { - return fullName.casefold() < other.fullName.casefold(); - } -}; class FilePanel; /* * Class: @@ -96,6 +82,8 @@ private: Gtk::HBox* fltrRecentlySavedBox; Gtk::VBox* fltrVbox2; + Gtk::VSeparator* vSepiLeftPanel; + Gtk::ToggleButton* tbLeftPanel_1; Gtk::ToggleButton* tbRightPanel_1; Gtk::ToggleButton* bFilterClear; @@ -159,6 +147,8 @@ private: WinDirMonitor* wdMonitor; #endif + IdleRegister idle_register; + void addAndOpenFile (const Glib::ustring& fname); void checkAndAddFile (Glib::RefPtr info); std::vector getFileList (); diff --git a/rtgui/filepanel.cc b/rtgui/filepanel.cc index a88a9d224..b3e3668c5 100644 --- a/rtgui/filepanel.cc +++ b/rtgui/filepanel.cc @@ -22,37 +22,40 @@ #include "inspector.h" #include "placesbrowser.h" -int FilePanelInitUI (void* data) -{ - (static_cast(data))->init (); - return 0; -} - -FilePanel::FilePanel () : parent(nullptr) +FilePanel::FilePanel () : parent(nullptr), error(0) { + // Contains everything except for the batch Tool Panel and tabs (Fast Export, Inspect, etc) dirpaned = Gtk::manage ( new Gtk::HPaned () ); dirpaned->set_position (options.dirBrowserWidth); + // The directory tree dirBrowser = Gtk::manage ( new DirBrowser () ); + // Places placesBrowser = Gtk::manage ( new PlacesBrowser () ); + // Recent Folders recentBrowser = Gtk::manage ( new RecentBrowser () ); + // The whole left panel. Contains Places, Recent Folders and Folders. placespaned = Gtk::manage ( new Gtk::VPaned () ); - placespaned->set_size_request(50, 100); + placespaned->set_name ("PlacesPaned"); + placespaned->set_size_request(250, 100); placespaned->set_position (options.dirBrowserHeight); Gtk::VBox* obox = Gtk::manage (new Gtk::VBox ()); + obox->get_style_context()->add_class ("plainback"); obox->pack_start (*recentBrowser, Gtk::PACK_SHRINK, 4); obox->pack_start (*dirBrowser); placespaned->pack1 (*placesBrowser, false, true); placespaned->pack2 (*obox, true, true); - dirpaned->pack1 (*placespaned, false, true); + dirpaned->pack1 (*placespaned, false, false); tpc = new BatchToolPanelCoordinator (this); + // Location bar fileCatalog = Gtk::manage ( new FileCatalog (tpc->coarse, tpc->getToolBar(), this) ); + // Holds the location bar and thumbnails ribbonPane = Gtk::manage ( new Gtk::Paned() ); ribbonPane->add(*fileCatalog); ribbonPane->set_size_request(50, 150); @@ -69,7 +72,7 @@ FilePanel::FilePanel () : parent(nullptr) fileCatalog->setFileSelectionListener (this); rightBox = Gtk::manage ( new Gtk::HBox () ); - rightBox->set_size_request(50, 100); + rightBox->set_size_request(350, 100); rightNotebook = Gtk::manage ( new Gtk::Notebook () ); rightNotebookSwitchConn = rightNotebook->signal_switch_page().connect_notify( sigc::mem_fun(*this, &FilePanel::on_NB_switch_page) ); //Gtk::VBox* taggingBox = Gtk::manage ( new Gtk::VBox () ); @@ -82,7 +85,6 @@ FilePanel::FilePanel () : parent(nullptr) Gtk::ScrolledWindow* sFilterPanel = Gtk::manage ( new Gtk::ScrolledWindow() ); filterPanel = Gtk::manage ( new FilterPanel () ); sFilterPanel->add (*filterPanel); - sFilterPanel->set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); inspectorPanel = new Inspector(); fileCatalog->setInspector(inspectorPanel); @@ -102,46 +104,61 @@ FilePanel::FilePanel () : parent(nullptr) rightNotebook->set_tab_pos (Gtk::POS_LEFT); Gtk::Label* devLab = Gtk::manage ( new Gtk::Label (M("MAIN_TAB_DEVELOP")) ); + devLab->set_name ("LabelRightNotebook"); devLab->set_angle (90); Gtk::Label* inspectLab = Gtk::manage ( new Gtk::Label (M("MAIN_TAB_INSPECT")) ); + inspectLab->set_name ("LabelRightNotebook"); inspectLab->set_angle (90); Gtk::Label* filtLab = Gtk::manage ( new Gtk::Label (M("MAIN_TAB_FILTER")) ); + filtLab->set_name ("LabelRightNotebook"); filtLab->set_angle (90); //Gtk::Label* tagLab = Gtk::manage ( new Gtk::Label (M("MAIN_TAB_TAGGING")) ); //tagLab->set_angle (90); Gtk::Label* exportLab = Gtk::manage ( new Gtk::Label (M("MAIN_TAB_EXPORT")) ); + exportLab->set_name ("LabelRightNotebook"); exportLab->set_angle (90); tpcPaned = Gtk::manage ( new Gtk::VPaned () ); tpcPaned->pack1 (*tpc->toolPanelNotebook, false, true); tpcPaned->pack2 (*history, true, true); - rightNotebook->append_page (*tpcPaned, *devLab); - rightNotebook->append_page (*inspectorPanel, *inspectLab); rightNotebook->append_page (*sFilterPanel, *filtLab); + rightNotebook->append_page (*inspectorPanel, *inspectLab); + rightNotebook->append_page (*tpcPaned, *devLab); //rightNotebook->append_page (*taggingBox, *tagLab); commented out: currently the tab is empty ... rightNotebook->append_page (*sExportPanel, *exportLab); + rightNotebook->set_name ("RightNotebook"); rightBox->pack_start (*rightNotebook); pack1(*dirpaned, true, true); - pack2(*rightBox, false, true); + pack2(*rightBox, false, false); fileCatalog->setFileSelectionChangeListener (tpc); fileCatalog->setFileSelectionListener (this); - g_idle_add (FilePanelInitUI, this); + + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->init(); + return FALSE; + }; + + idle_register.add(func, this); show_all (); } FilePanel::~FilePanel () { + idle_register.destroy(); + rightNotebookSwitchConn.disconnect(); if (inspectorPanel) { delete inspectorPanel; } + + delete tpc; } void FilePanel::on_realize () @@ -172,12 +189,15 @@ void FilePanel::setAspect () void FilePanel::init () { - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected dirBrowser->fillDirTree (); placesBrowser->refreshPlacesList (); - if (argv1 != "" && Glib::file_test (argv1, Glib::FILE_TEST_IS_DIR)) { - dirBrowser->open (argv1); + if (!argv1.empty() && Glib::file_test (argv1, Glib::FILE_TEST_EXISTS)) { + Glib::ustring d(argv1); + if (!Glib::file_test(d, Glib::FILE_TEST_IS_DIR)) { + d = Glib::path_get_dirname(d); + } + dirBrowser->open(d); } else { if (options.startupDir == STARTUPDIR_HOME) { dirBrowser->open (PlacesBrowser::userPicturesDir ()); @@ -194,7 +214,7 @@ void FilePanel::init () } } -void FilePanel::on_NB_switch_page(GtkNotebookPage* page, guint page_num) +void FilePanel::on_NB_switch_page(Gtk::Widget* page, guint page_num) { if (page_num == 1) { // switching the inspector "on" @@ -259,9 +279,23 @@ bool FilePanel::imageLoaded( Thumbnail* thm, ProgressConnector 0 && winGdiHandles <= 8500) // 0 means we don't have the rights to access the function, 8500 because the limit is 10000 and we need about 1500 free handles +#endif + { GThreadLock lock; // Acquiring the GUI... not sure that it's necessary, but it shouldn't harm epanel = Gtk::manage (new EditorPanel ()); parent->addEditorPanel (epanel, pl->thm->getFileName()); + } +#ifdef WIN32 + else { + Glib::ustring msg_ = Glib::ustring("") + M("MAIN_MSG_CANNOTLOAD") + " \"" + thm->getFileName() + "\" .\n" + M("MAIN_MSG_TOOMANYOPENEDITORS") + ""; + Gtk::MessageDialog msgd (msg_, true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); + msgd.run (); + goto MAXGDIHANDLESREACHED; + } +#endif } epanel->open(pl->thm, pl->pc->returnValue() ); @@ -281,7 +315,9 @@ bool FilePanel::imageLoaded( Thumbnail* thm, ProgressConnectorpc; { diff --git a/rtgui/filepanel.h b/rtgui/filepanel.h index 9d31628e4..d54f5f75a 100644 --- a/rtgui/filepanel.h +++ b/rtgui/filepanel.h @@ -33,38 +33,12 @@ #include "progressconnector.h" class RTWindow; -class FilePanel : public Gtk::HPaned, + +class FilePanel final : + public Gtk::HPaned, public FileSelectionListener, public PParamsChangeListener { - -protected: - //DirBrowser* dirBrowser; - PlacesBrowser* placesBrowser; - RecentBrowser* recentBrowser; - // FileCatalog* fileCatalog; // filecatalog is the file browser with the button bar above it - - Inspector* inspectorPanel; - Gtk::VPaned* tpcPaned; - BatchToolPanelCoordinator* tpc; - History* history; - //FilterPanel* filterPanel; - RTWindow* parent; - Gtk::Notebook* rightNotebook; - sigc::connection rightNotebookSwitchConn; - - struct pendingLoad { - bool complete; - ProgressConnector *pc; - Thumbnail *thm; - }; - MyMutex pendingLoadMutex; - std::vector pendingLoads; - - int error; - - void on_NB_switch_page(GtkNotebookPage* page, guint page_num); - public: FilePanel (); ~FilePanel (); @@ -107,6 +81,32 @@ public: bool handleShortcutKey (GdkEventKey* event); void updateTPVScrollbar (bool hide); void updateTabsUsesIcons (bool useIcons); + +private: + void on_NB_switch_page(Gtk::Widget* page, guint page_num); + + PlacesBrowser* placesBrowser; + RecentBrowser* recentBrowser; + + Inspector* inspectorPanel; + Gtk::VPaned* tpcPaned; + BatchToolPanelCoordinator* tpc; + History* history; + RTWindow* parent; + Gtk::Notebook* rightNotebook; + sigc::connection rightNotebookSwitchConn; + + struct pendingLoad { + bool complete; + ProgressConnector *pc; + Thumbnail *thm; + }; + MyMutex pendingLoadMutex; + std::vector pendingLoads; + + int error; + + IdleRegister idle_register; }; #endif diff --git a/rtgui/filmsimulation.cc b/rtgui/filmsimulation.cc index f916a5397..a1471f970 100644 --- a/rtgui/filmsimulation.cc +++ b/rtgui/filmsimulation.cc @@ -11,33 +11,45 @@ using namespace rtengine::procparams; namespace { +Glib::ustring stripPrefixDir(const Glib::ustring& filename, const Glib::ustring& dir) +{ + const Glib::ustring full_dir = + !Glib::str_has_suffix(dir, G_DIR_SEPARATOR_S) + ? dir + G_DIR_SEPARATOR_S + : dir; + return + Glib::str_has_prefix(filename, full_dir) + ? filename.substr(full_dir.size()) + : filename; +} + bool notifySlowParseDir (const std::chrono::system_clock::time_point& startedAt) { - static enum - { - Undecided, - Cancel, - Continue - } - decision = Undecided; + enum Decision { + UNDECIDED, + CANCEL, + CONTINUE + }; - if (decision == Cancel) { + static Decision decision = UNDECIDED; + + if (decision == CANCEL) { return false; - } else if (decision == Continue) { + } else if (decision == CONTINUE) { return true; } - const auto now = std::chrono::system_clock::now (); - if (now - startedAt < std::chrono::seconds (10)) { + const auto now = std::chrono::system_clock::now(); + if (now - startedAt < std::chrono::seconds(10)) { return true; } - Gtk::MessageDialog dialog (M ("TP_FILMSIMULATION_SLOWPARSEDIR"), false, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_YES_NO, true); - if (dialog.run () == Gtk::RESPONSE_YES) { - decision = Cancel; + Gtk::MessageDialog dialog(M("TP_FILMSIMULATION_SLOWPARSEDIR"), false, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_YES_NO, true); + if (dialog.run() == Gtk::RESPONSE_YES) { + decision = CANCEL; return false; } else { - decision = Continue; + decision = CONTINUE; return true; } } @@ -111,32 +123,41 @@ void FilmSimulation::read( const rtengine::procparams::ProcParams* pp, const Par { //copypasted from lensprofile.cc & sharpening.cc disableListener(); - updateDisable( true ); + updateDisable(true); - setEnabled (pp->filmSimulation.enabled); + setEnabled(pp->filmSimulation.enabled); - if ( !pp->filmSimulation.clutFilename.empty() ) { - m_clutComboBox->setSelectedClut( pp->filmSimulation.clutFilename ); + if (!pp->filmSimulation.clutFilename.empty()) { + m_clutComboBox->setSelectedClut( + !Glib::path_is_absolute(pp->filmSimulation.clutFilename) + ? Glib::ustring(Glib::build_filename(options.clutsDir, pp->filmSimulation.clutFilename)) + : pp->filmSimulation.clutFilename + ); + m_oldClutFilename = m_clutComboBox->getSelectedClut(); } - m_strength->setValue( pp->filmSimulation.strength ); + m_strength->setValue(pp->filmSimulation.strength); if (pedited) { set_inconsistent (multiImage && !pedited->filmSimulation.enabled); - m_strength->setEditedState (pedited->filmSimulation.strength ? Edited : UnEdited); + m_strength->setEditedState( + pedited->filmSimulation.strength + ? Edited + : UnEdited + ); - if ( !pedited->filmSimulation.clutFilename ) { + if (!pedited->filmSimulation.clutFilename) { m_clutComboBox->setSelectedClut("NULL"); } } - if ( !get_inconsistent() && !pp->filmSimulation.enabled ) { + if (!get_inconsistent() && !pp->filmSimulation.enabled) { if (options.clutCacheSize == 1) { CLUTStore::getInstance().clearCache(); } } - updateDisable( false ); + updateDisable(false); enableListener(); } @@ -147,17 +168,17 @@ void FilmSimulation::updateDisable( bool value ) void FilmSimulation::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited ) { - if ( pedited ) { - pedited->filmSimulation.enabled = !get_inconsistent(); - pedited->filmSimulation.strength = m_strength->getEditedState (); + if (pedited) { + pedited->filmSimulation.enabled = !get_inconsistent(); + pedited->filmSimulation.strength = m_strength->getEditedState(); pedited->filmSimulation.clutFilename = m_clutComboBox->getSelectedClut() != "NULL"; } pp->filmSimulation.enabled = getEnabled(); - Glib::ustring clutFName = m_clutComboBox->getSelectedClut(); + const Glib::ustring clutFName = m_clutComboBox->getSelectedClut(); - if ( clutFName != "NULL" ) { // We do not want to set "NULL" in clutFilename, even if "unedited" - pp->filmSimulation.clutFilename = clutFName; + if (clutFName != "NULL") { // We do not want to set "NULL" in clutFilename, even if "unedited" + pp->filmSimulation.clutFilename = stripPrefixDir(clutFName, options.clutsDir); } pp->filmSimulation.strength = m_strength->getValue(); @@ -170,7 +191,7 @@ void FilmSimulation::setAdjusterBehavior( bool strength ) void FilmSimulation::trimValues( rtengine::procparams::ProcParams* pp ) { - pp->filmSimulation.strength = m_strength->trimValue( pp->filmSimulation.strength ); + m_strength->trimValue( pp->filmSimulation.strength ); } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: diff --git a/rtgui/filterpanel.cc b/rtgui/filterpanel.cc index 483d292ea..a8691c1b3 100644 --- a/rtgui/filterpanel.cc +++ b/rtgui/filterpanel.cc @@ -26,8 +26,6 @@ using namespace rtengine; FilterPanel::FilterPanel () : listener (nullptr) { - set_border_width (4); - enabled = Gtk::manage (new Gtk::CheckButton (M("EXIFFILTER_METADATAFILTER"))); pack_start (*enabled, Gtk::PACK_SHRINK, 2); pack_start (*Gtk::manage(new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 2); @@ -213,7 +211,7 @@ void FilterPanel::setFilter (ExifFilterSettings& defefs, bool updateLists) curefs.expcomp.clear(); for (std::set::iterator i = defefs.expcomp.begin(); i != defefs.expcomp.end(); ++i) { - expcomp->append_text (*i); + expcomp->append (*i); curefs.expcomp.insert(*i); } @@ -223,7 +221,7 @@ void FilterPanel::setFilter (ExifFilterSettings& defefs, bool updateLists) curefs.lenses.clear(); for (std::set::iterator i = defefs.lenses.begin(); i != defefs.lenses.end(); ++i) { - lens->append_text (*i); + lens->append (*i); curefs.lenses.insert(*i); } @@ -233,7 +231,7 @@ void FilterPanel::setFilter (ExifFilterSettings& defefs, bool updateLists) curefs.cameras.clear(); for (std::set::iterator i = defefs.cameras.begin(); i != defefs.cameras.end(); ++i) { - camera->append_text(*i); + camera->append(*i); curefs.cameras.insert(*i); } @@ -243,7 +241,7 @@ void FilterPanel::setFilter (ExifFilterSettings& defefs, bool updateLists) curefs.filetypes.clear(); for (std::set::iterator i = defefs.filetypes.begin(); i != defefs.filetypes.end(); ++i) { - filetype->append_text(*i); + filetype->append(*i); curefs.filetypes.insert(*i); } diff --git a/rtgui/flatcurveeditorsubgroup.cc b/rtgui/flatcurveeditorsubgroup.cc index 1177e7cfe..2e690f32a 100644 --- a/rtgui/flatcurveeditorsubgroup.cc +++ b/rtgui/flatcurveeditorsubgroup.cc @@ -40,64 +40,47 @@ FlatCurveEditorSubGroup::FlatCurveEditorSubGroup (CurveEditorGroup* prt, Glib::u valUnchanged = (int)FCT_Unchanged; parent = prt; - curveBBoxPos = options.curvebboxpos; + Gtk::PositionType sideStart = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_LEFT : Gtk::POS_TOP; + Gtk::PositionType sideEnd = options.curvebboxpos == 0 || options.curvebboxpos == 2 ? Gtk::POS_RIGHT : Gtk::POS_BOTTOM; // ControlPoints curve - CPointsCurveBox = new Gtk::VBox (); - CPointsCurveBox->set_spacing(4); - Gtk::HBox* CPointsCurveAndButtons = Gtk::manage (new Gtk::HBox ()); - CPointsCurveAndButtons->set_spacing(4); + CPointsCurveGrid = new Gtk::Grid (); + CPointsCurveGrid->set_row_spacing(2); + CPointsCurveGrid->set_column_spacing(2); + CPointsCurveGrid->set_orientation(Gtk::ORIENTATION_VERTICAL); + CPointsCurve = Gtk::manage (new MyFlatCurve ()); - CPointsCurve->set_size_request (GRAPH_SIZE + 2 * RADIUS + 1, GRAPH_SIZE + 2 * RADIUS + 1); CPointsCurve->setType (FCT_MinMaxCPoints); - Gtk::Box* CPointsbbox; // curvebboxpos 0=above, 1=right, 2=below, 3=left + Gtk::Grid* CPointsbbox = Gtk::manage (new Gtk::Grid ()); // curvebboxpos 0=above, 1=right, 2=below, 3=left - if (options.curvebboxpos == 1 || options.curvebboxpos == 3) { - CPointsbbox = Gtk::manage (new Gtk::VBox ()); + if (options.curvebboxpos == 0 || options.curvebboxpos == 2) { + CPointsbbox->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + setExpandAlignProperties(CPointsbbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); } else { - CPointsbbox = Gtk::manage (new Gtk::HBox ()); + CPointsbbox->set_orientation(Gtk::ORIENTATION_VERTICAL); + setExpandAlignProperties(CPointsbbox, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); } - CPointsbbox->set_spacing(4); - - pasteCPoints = Gtk::manage (new Gtk::Button ()); - pasteCPoints->add (*Gtk::manage (new RTImage ("edit-paste.png"))); - copyCPoints = Gtk::manage (new Gtk::Button ()); - copyCPoints->add (*Gtk::manage (new RTImage ("edit-copy.png"))); - saveCPoints = Gtk::manage (new Gtk::Button ()); - saveCPoints->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); - loadCPoints = Gtk::manage (new Gtk::Button ()); - loadCPoints->add (*Gtk::manage (new RTImage ("gtk-open.png"))); editCPoints = Gtk::manage (new Gtk::ToggleButton()); + initButton(*editCPoints, Glib::ustring("editmodehand.png"), Gtk::ALIGN_START, false, Glib::ustring(M("EDIT_PIPETTE_TOOLTIP"))); editPointCPoints = Gtk::manage (new Gtk::ToggleButton ()); - editPointCPoints->add (*Gtk::manage (new RTImage ("gtk-edit.png"))); - editPointCPoints->set_tooltip_text(M("CURVEEDITOR_EDITPOINT_HINT")); - editCPoints->add (*Gtk::manage (new RTImage ("editmodehand.png"))); - editCPoints->set_tooltip_text(M("EDIT_PIPETTE_TOOLTIP")); - editCPoints->hide(); + initButton(*editPointCPoints, Glib::ustring("gtk-edit.png"), Gtk::ALIGN_START, false, Glib::ustring(M("CURVEEDITOR_EDITPOINT_HINT"))); + copyCPoints = Gtk::manage (new Gtk::Button ()); + initButton(*copyCPoints, Glib::ustring("edit-copy.png"), Gtk::ALIGN_END, true); + pasteCPoints = Gtk::manage (new Gtk::Button ()); + initButton(*pasteCPoints, Glib::ustring("edit-paste.png"), Gtk::ALIGN_END, false); + loadCPoints = Gtk::manage (new Gtk::Button ()); + initButton(*loadCPoints, Glib::ustring("gtk-open.png"), Gtk::ALIGN_END, false); + saveCPoints = Gtk::manage (new Gtk::Button ()); + initButton(*saveCPoints, Glib::ustring("gtk-save-large.png"), Gtk::ALIGN_END, false); - CPointsbbox->pack_end (*pasteCPoints, Gtk::PACK_SHRINK, 0); - CPointsbbox->pack_end (*copyCPoints, Gtk::PACK_SHRINK, 0); - CPointsbbox->pack_end (*saveCPoints, Gtk::PACK_SHRINK, 0); - CPointsbbox->pack_end (*loadCPoints, Gtk::PACK_SHRINK, 0); - CPointsbbox->pack_start(*editPointCPoints, Gtk::PACK_SHRINK, 0); - CPointsbbox->pack_start(*editCPoints, Gtk::PACK_SHRINK, 0); - - CPointsCurveAndButtons->pack_start (*CPointsCurve, Gtk::PACK_EXPAND_WIDGET, 0); - CPointsCurveAndButtons->pack_start (*CPointsbbox, Gtk::PACK_SHRINK, 0); - CPointsCurveBox->pack_start (*CPointsCurveAndButtons, Gtk::PACK_EXPAND_WIDGET); - - if (options.curvebboxpos == 0) { - removeIfThere (CPointsCurveAndButtons, CPointsbbox, false); - CPointsCurveBox->pack_start (*CPointsbbox); - CPointsCurveBox->reorder_child(*CPointsbbox, 0); - } else if (options.curvebboxpos == 2) { - removeIfThere (CPointsCurveAndButtons, CPointsbbox, false); - CPointsCurveBox->pack_start (*CPointsbbox); - } else if (options.curvebboxpos == 3) { - CPointsCurveAndButtons->reorder_child(*CPointsbbox, 0); - } + CPointsbbox->attach_next_to(*editPointCPoints, sideStart, 1, 1); + CPointsbbox->attach_next_to(*editCPoints, sideStart, 1, 1); + CPointsbbox->attach_next_to(*copyCPoints, sideEnd, 1, 1); + CPointsbbox->attach_next_to(*pasteCPoints, sideEnd, 1, 1); + CPointsbbox->attach_next_to(*loadCPoints, sideEnd, 1, 1); + CPointsbbox->attach_next_to(*saveCPoints, sideEnd, 1, 1); { std::vector axis; @@ -107,16 +90,27 @@ FlatCurveEditorSubGroup::FlatCurveEditorSubGroup (CurveEditorGroup* prt, Glib::u axis.at(2).setValues(M("CURVEEDITOR_AXIS_LEFT_TAN"), 5, 0.01, 0.1, 0., 1.); axis.at(3).setValues(M("CURVEEDITOR_AXIS_RIGHT_TAN"), 5, 0.01, 0.1, 0., 1.); CPointsCoordAdjuster = Gtk::manage (new CoordinateAdjuster(CPointsCurve, this, axis)); - CPointsCurveBox->pack_start(*CPointsCoordAdjuster, Gtk::PACK_SHRINK, 0); - - if (options.curvebboxpos == 2) { - CPointsCurveBox->reorder_child(*CPointsCoordAdjuster, 2); - } - - CPointsCoordAdjuster->show_all(); } - CPointsCurveBox->show_all (); + // Button box position: 0=above, 1=right, 2=below, 3=left + CPointsCurveGrid->add(*CPointsCurve); + CPointsCurve->set_hexpand(true); + + if (options.curvebboxpos == 0) { + CPointsCurveGrid->attach_next_to(*CPointsbbox, *CPointsCurve, Gtk::POS_TOP, 1, 1); + CPointsCurveGrid->attach_next_to(*CPointsCoordAdjuster, *CPointsCurve, Gtk::POS_BOTTOM, 1, 1); + } else if (options.curvebboxpos == 1) { + CPointsCurveGrid->attach_next_to(*CPointsbbox, *CPointsCurve, Gtk::POS_RIGHT, 1, 1); + CPointsCurveGrid->attach_next_to(*CPointsCoordAdjuster, *CPointsCurve, Gtk::POS_BOTTOM, 2, 1); + } else if (options.curvebboxpos == 2) { + CPointsCurveGrid->attach_next_to(*CPointsCoordAdjuster, *CPointsCurve, Gtk::POS_BOTTOM, 1, 1); + CPointsCurveGrid->attach_next_to(*CPointsbbox, *CPointsCoordAdjuster, Gtk::POS_BOTTOM, 1, 1); + } else if (options.curvebboxpos == 3) { + CPointsCurveGrid->attach_next_to(*CPointsbbox, *CPointsCurve, Gtk::POS_LEFT, 1, 1); + CPointsCurveGrid->attach_next_to(*CPointsCoordAdjuster, *CPointsbbox, Gtk::POS_BOTTOM, 2, 1); + } + + CPointsCurveGrid->show_all (); CPointsCoordAdjuster->hide(); saveCPoints->signal_clicked().connect( sigc::mem_fun(*this, &FlatCurveEditorSubGroup::savePressed) ); @@ -136,7 +130,7 @@ FlatCurveEditorSubGroup::FlatCurveEditorSubGroup (CurveEditorGroup* prt, Glib::u FlatCurveEditorSubGroup::~FlatCurveEditorSubGroup() { - delete CPointsCurveBox; + delete CPointsCurveGrid; } /* @@ -341,10 +335,10 @@ void FlatCurveEditorSubGroup::switchGUI() CPointsCurve->setPoints (dCurve->controlPointsCurveEd); CPointsCurve->setColorProvider(dCurve->getCurveColorProvider(), dCurve->getCurveCallerId()); CPointsCurve->setColoredBar(leftBar, bottomBar); - CPointsCurve->forceResize(); + CPointsCurve->queue_resize_no_redraw(); updateEditButton(dCurve, editCPoints, editCPointsConn); - parent->pack_start (*CPointsCurveBox); - CPointsCurveBox->check_resize(); + parent->attachCurve (CPointsCurveGrid); + CPointsCurveGrid->check_resize(); break; default: // (DCT_Linear, DCT_Unchanged) @@ -580,7 +574,7 @@ const std::vector FlatCurveEditorSubGroup::getCurveFromGUI (int type) */ void FlatCurveEditorSubGroup::removeEditor () { - removeIfThere (parent, CPointsCurveBox, false); + removeIfThere (parent, CPointsCurveGrid, false); } bool FlatCurveEditorSubGroup::curveReset(CurveEditor *ce) diff --git a/rtgui/flatcurveeditorsubgroup.h b/rtgui/flatcurveeditorsubgroup.h index 7772dcebd..0dc040cfe 100644 --- a/rtgui/flatcurveeditorsubgroup.h +++ b/rtgui/flatcurveeditorsubgroup.h @@ -30,7 +30,7 @@ class FlatCurveEditorSubGroup: public CurveEditorSubGroup friend class FlatCurveEditor; protected: - Gtk::VBox* CPointsCurveBox; + Gtk::Grid* CPointsCurveGrid; MyFlatCurve* CPointsCurve; diff --git a/rtgui/flatfield.cc b/rtgui/flatfield.cc index da78cda3c..aec6820a5 100644 --- a/rtgui/flatfield.cc +++ b/rtgui/flatfield.cc @@ -53,10 +53,10 @@ FlatField::FlatField () : FoldableToolPanel(this, "flatfield", M("TP_FLATFIELD_L hbffbt->pack_start (*Gtk::manage (new Gtk::Label ( M("TP_FLATFIELD_BLURTYPE") + ":"))); hbffbt->set_spacing(4); flatFieldBlurType = Gtk::manage (new MyComboBoxText ()); - flatFieldBlurType->append_text(M("TP_FLATFIELD_BT_AREA")); - flatFieldBlurType->append_text(M("TP_FLATFIELD_BT_VERTICAL")); - flatFieldBlurType->append_text(M("TP_FLATFIELD_BT_HORIZONTAL")); - flatFieldBlurType->append_text(M("TP_FLATFIELD_BT_VERTHORIZ")); + flatFieldBlurType->append(M("TP_FLATFIELD_BT_AREA")); + flatFieldBlurType->append(M("TP_FLATFIELD_BT_VERTICAL")); + flatFieldBlurType->append(M("TP_FLATFIELD_BT_HORIZONTAL")); + flatFieldBlurType->append(M("TP_FLATFIELD_BT_VERTHORIZ")); flatFieldBlurType->set_active(0); hbffbt->pack_end (*flatFieldBlurType); @@ -86,19 +86,19 @@ FlatField::FlatField () : FoldableToolPanel(this, "flatfield", M("TP_FLATFIELD_L // Set filename filters b_filter_asCurrent = false; - Gtk::FileFilter *filter_any = Gtk::manage(new Gtk::FileFilter); + Glib::RefPtr filter_any = Gtk::FileFilter::create(); filter_any->add_pattern("*"); filter_any->set_name(M("FILECHOOSER_FILTER_ANY")); - flatFieldFile->add_filter (*filter_any); + flatFieldFile->add_filter (filter_any); // filters for all supported non-raw extensions for (size_t i = 0; i < options.parseExtensions.size(); i++) { if (options.parseExtensionsEnabled[i] && options.parseExtensions[i].uppercase() != "JPG" && options.parseExtensions[i].uppercase() != "JPEG" && options.parseExtensions[i].uppercase() != "PNG" && options.parseExtensions[i].uppercase() != "TIF" && options.parseExtensions[i].uppercase() != "TIFF" ) { - Gtk::FileFilter *filter_ff = Gtk::manage(new Gtk::FileFilter); + Glib::RefPtr filter_ff = Gtk::FileFilter::create(); filter_ff->add_pattern("*." + options.parseExtensions[i]); filter_ff->add_pattern("*." + options.parseExtensions[i].uppercase()); filter_ff->set_name(options.parseExtensions[i].uppercase()); - flatFieldFile->add_filter (*filter_ff); + flatFieldFile->add_filter (filter_ff); //printf("adding filter %s \n",options.parseExtensions[i].uppercase().c_str()); } } @@ -174,8 +174,8 @@ void FlatField::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi if (b_filter_asCurrent) { //First, remove last filter_asCurrent if it was set for a raw file - std::vector filters = flatFieldFile->list_filters(); - flatFieldFile->remove_filter(**(filters.end() - 1)); + std::vector< Glib::RefPtr > filters = flatFieldFile->list_filters(); + flatFieldFile->remove_filter(*(filters.end() - 1)); b_filter_asCurrent = false; } @@ -194,11 +194,11 @@ void FlatField::read(const rtengine::procparams::ProcParams* pp, const ParamsEdi if (israw) { b_filter_asCurrent = true; //prevent re-adding this filter on every pp3 file read - Gtk::FileFilter *filter_asCurrent = Gtk::manage(new Gtk::FileFilter); + Glib::RefPtr filter_asCurrent = Gtk::FileFilter::create(); filter_asCurrent->add_pattern("*." + filetype); filter_asCurrent->set_name(M("FILECHOOSER_FILTER_SAME") + " (" + filetype + ")"); - flatFieldFile->add_filter (*filter_asCurrent); - flatFieldFile->set_filter (*filter_asCurrent); + flatFieldFile->add_filter (filter_asCurrent); + flatFieldFile->set_filter (filter_asCurrent); } } } diff --git a/rtgui/gradient.cc b/rtgui/gradient.cc index 50625251e..cbaa39066 100644 --- a/rtgui/gradient.cc +++ b/rtgui/gradient.cc @@ -424,7 +424,7 @@ bool Gradient::button1Pressed(const int modifierKey) draggedPoint = currPos - centerPos; // compute the projected value of the dragged point - draggedFeatherOffset = draggedPoint.radius * sin((draggedPoint.angle - degree->getValue()) / 180.*M_PI); + draggedFeatherOffset = draggedPoint.radius * sin((draggedPoint.angle - degree->getValue()) / 180.*rtengine::RT_PI); if (lastObject == 3) { draggedFeatherOffset = -draggedFeatherOffset; @@ -526,7 +526,7 @@ bool Gradient::drag1(const int modifierKey) currPos.y = p; draggedPoint = currPos - centerPos; - double currDraggedFeatherOffset = draggedPoint.radius * sin((draggedPoint.angle - degree->getValue()) / 180.*M_PI); + double currDraggedFeatherOffset = draggedPoint.radius * sin((draggedPoint.angle - degree->getValue()) / 180.*rtengine::RT_PI); if (lastObject == 2) // Dragging the upper feather bar diff --git a/rtgui/guiutils.cc b/rtgui/guiutils.cc index 241bd2963..989ff2758 100644 --- a/rtgui/guiutils.cc +++ b/rtgui/guiutils.cc @@ -15,17 +15,21 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ +#include #include "../rtengine/rt_math.h" #include "guiutils.h" #include "options.h" #include "../rtengine/rt_math.h" #include "../rtengine/utils.h" +#include "../rtengine/icons.h" #include "rtimage.h" #include "multilangmgr.h" #include +//extern Glib::Threads::Thread* mainThread; + using namespace std; Glib::RefPtr MyExpander::inconsistentPBuf; @@ -34,6 +38,103 @@ Glib::RefPtr MyExpander::disabledPBuf; Glib::RefPtr MyExpander::openedPBuf; Glib::RefPtr MyExpander::closedPBuf; +IdleRegister::~IdleRegister() +{ + destroy(); +} + +void IdleRegister::add(GSourceFunc function, gpointer data, gint priority) +{ + const auto dispatch = [](gpointer data) -> gboolean { + DataWrapper* const data_wrapper = static_cast(data); + + if (!data_wrapper->function(data_wrapper->data)) { + data_wrapper->self->mutex.lock(); + data_wrapper->self->ids.erase(data_wrapper); + data_wrapper->self->mutex.unlock(); + + delete data_wrapper; + return FALSE; + } + + return TRUE; + }; + + DataWrapper* const data_wrapper = new DataWrapper{ + this, + function, + data + }; + + mutex.lock(); + ids[data_wrapper] = gdk_threads_add_idle_full(priority, dispatch, data_wrapper, nullptr); + mutex.unlock(); +} + +void IdleRegister::destroy() +{ + mutex.lock(); + for (const auto& id : ids) { + g_source_remove(id.second); + delete id.first; + } + ids.clear(); + mutex.unlock(); +} + +/* +gboolean giveMeAGo(void* data) { + GThreadLock *threadMutex = static_cast(data); + printf("A\n"); + Glib::Threads::Mutex::Lock GUILock(threadMutex->GUI); + printf("B\n"); + { + Glib::Threads::Mutex::Lock operationLock(threadMutex->operation); + printf("C\n"); + + threadMutex->operationCond.signal(); + printf("D\n"); + operationLock.release(); // because we're not sure that "lock" destructor happens here... + } + threadMutex->GUICond.wait(threadMutex->GUI); + printf("E\n"); + + GUILock.release(); + + return false; +} + +GThreadLock::GThreadLock() : sameThread(false) { + if (Glib::Threads::Thread::self() == mainThread) { + sameThread = true; + return; + } + + printf("10\n"); + { + Glib::Threads::Mutex::Lock operationLock(operation); + + printf("20\n"); + gdk_threads_add_idle(giveMeAGo, this); + + printf("30\n"); + operationCond.wait(operation); + printf("40\n"); + operationLock.release(); + } +} + +GThreadLock::~GThreadLock() { + if (!sameThread) { + printf("50\n"); + Glib::Threads::Mutex::Lock lock(GUI); + printf("60\n"); + GUICond.signal(); + printf("Fin\n"); + } +} +*/ + Glib::ustring escapeHtmlChars(const Glib::ustring &src) { @@ -68,6 +169,14 @@ Glib::ustring escapeHtmlChars(const Glib::ustring &src) return dst; } +void setExpandAlignProperties(Gtk::Widget *widget, bool hExpand, bool vExpand, enum Gtk::Align hAlign, enum Gtk::Align vAlign) +{ + widget->set_hexpand(hExpand); + widget->set_vexpand(vExpand); + widget->set_halign(hAlign); + widget->set_valign(vAlign); +} + bool removeIfThere (Gtk::Container* cont, Gtk::Widget* w, bool increference) { @@ -98,34 +207,6 @@ void thumbInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, } } -Glib::ustring removeExtension (const Glib::ustring& filename) -{ - - Glib::ustring bname = Glib::path_get_basename(filename); - size_t lastdot = bname.find_last_of ('.'); - size_t lastwhitespace = bname.find_last_of (" \t\f\v\n\r"); - - if (lastdot != bname.npos && (lastwhitespace == bname.npos || lastdot > lastwhitespace)) { - return filename.substr (0, filename.size() - (bname.size() - lastdot)); - } else { - return filename; - } -} - -Glib::ustring getExtension (const Glib::ustring& filename) -{ - - Glib::ustring bname = Glib::path_get_basename(filename); - size_t lastdot = bname.find_last_of ('.'); - size_t lastwhitespace = bname.find_last_of (" \t\f\v\n\r"); - - if (lastdot != bname.npos && (lastwhitespace == bname.npos || lastdot > lastwhitespace)) { - return filename.substr (filename.size() - (bname.size() - lastdot) + 1, filename.npos); - } else { - return ""; - } -} - bool confirmOverwrite (Gtk::Window& parent, const std::string& filename) { bool safe = true; @@ -398,17 +479,15 @@ void drawCrop (Cairo::RefPtr cr, int imx, int imy, int imw, int cr->reset_clip (); } -bool ExpanderBox::on_expose_event(GdkEventExpose* event) -{ - bool retVal = Gtk::EventBox::on_expose_event(event); +/* +bool ExpanderBox::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) { if (!options.useSystemTheme) { Glib::RefPtr window = get_window(); - Glib::RefPtr style = get_style (); - Cairo::RefPtr cr = window->create_cairo_context(); + Glib::RefPtr style = get_style_context (); - int x_, y_, w_, h_, foo; - window->get_geometry(x_, y_, w_, h_, foo); + int x_, y_, w_, h_; + window->get_geometry(x_, y_, w_, h_); double x = 0.; double y = 0.; double w = double(w_); @@ -417,34 +496,42 @@ bool ExpanderBox::on_expose_event(GdkEventExpose* event) cr->set_antialias (Cairo::ANTIALIAS_NONE); // draw a frame + style->render_background(cr, x, y, w, h); + / * cr->set_line_width (1.0); - Gdk::Color c = style->get_fg (Gtk::STATE_NORMAL); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); - cr->move_to(x + 0.5, y + 0.5); - cr->line_to(x + w, y + 0.5); - cr->line_to(x + w, y + h); - cr->line_to(x + 0.5, y + h); - cr->line_to(x + 0.5, y + 0.5); + Gdk::RGBA c = style->get_color (Gtk::STATE_FLAG_NORMAL); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->move_to(x+0.5, y+0.5); + cr->line_to(x+w, y+0.5); + cr->line_to(x+w, y+h); + cr->line_to(x+0.5, y+h); + cr->line_to(x+0.5, y+0.5); cr->stroke (); + * / } - - return retVal; + return Gtk::EventBox::on_draw(cr); } +*/ ExpanderBox::ExpanderBox( Gtk::Container *p): pC(p) { set_name ("ExpanderBox"); - updateStyle(); +//GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + set_border_width(2); +#endif +//GTK318 } -void ExpanderBox::on_style_changed (const Glib::RefPtr& style) +void ExpanderBox::setLevel(int level) { - updateStyle(); -} - -void ExpanderBox::updateStyle() -{ - set_border_width(options.slimUI ? 2 : 8); // Outer space around the tool's frame 2:7 + if (level <= 1) { + set_name("ExpanderBox"); + } else if (level == 2) { + set_name("ExpanderBox2"); + } else if (level >= 3) { + set_name("ExpanderBox3"); + } } void ExpanderBox::show_all() @@ -465,11 +552,11 @@ void ExpanderBox::hideBox() void MyExpander::init() { - inconsistentPBuf = Gdk::Pixbuf::create_from_file(RTImage::findIconAbsolutePath("expanderInconsistent.png")); - enabledPBuf = Gdk::Pixbuf::create_from_file(RTImage::findIconAbsolutePath("expanderEnabled.png")); - disabledPBuf = Gdk::Pixbuf::create_from_file(RTImage::findIconAbsolutePath("expanderDisabled.png")); - openedPBuf = Gdk::Pixbuf::create_from_file(RTImage::findIconAbsolutePath("expanderOpened.png")); - closedPBuf = Gdk::Pixbuf::create_from_file(RTImage::findIconAbsolutePath("expanderClosed.png")); + inconsistentPBuf = Gdk::Pixbuf::create_from_file(rtengine::findIconAbsolutePath("expanderInconsistent.png")); + enabledPBuf = Gdk::Pixbuf::create_from_file(rtengine::findIconAbsolutePath("expanderEnabled.png")); + disabledPBuf = Gdk::Pixbuf::create_from_file(rtengine::findIconAbsolutePath("expanderDisabled.png")); + openedPBuf = Gdk::Pixbuf::create_from_file(rtengine::findIconAbsolutePath("expanderOpened.png")); + closedPBuf = Gdk::Pixbuf::create_from_file(rtengine::findIconAbsolutePath("expanderClosed.png")); } MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : @@ -477,12 +564,14 @@ MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : child(nullptr), headerWidget(nullptr), statusImage(nullptr), label(nullptr), useEnabled(useEnabled) { - set_spacing(options.slimUI ? 0 : 2); + set_spacing(0); set_name("MyExpander"); set_can_focus(false); + setExpandAlignProperties(this, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); headerHBox = Gtk::manage( new Gtk::HBox()); headerHBox->set_can_focus(false); + setExpandAlignProperties(headerHBox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); if (useEnabled) { statusImage = Gtk::manage(new Gtk::Image(disabledPBuf)); @@ -501,12 +590,14 @@ MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : statusImage->set_can_focus(false); if (titleWidget) { + setExpandAlignProperties(titleWidget, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); headerHBox->pack_start(*titleWidget, Gtk::PACK_EXPAND_WIDGET, 0); headerWidget = titleWidget; } titleEvBox = Gtk::manage(new Gtk::EventBox()); titleEvBox->set_name("MyExpanderTitle"); + titleEvBox->set_border_width(2); titleEvBox->add(*headerHBox); titleEvBox->set_above_child(false); // this is the key! By making it below the child, they will get the events first. titleEvBox->set_can_focus(false); @@ -514,6 +605,7 @@ MyExpander::MyExpander(bool useEnabled, Gtk::Widget* titleWidget) : pack_start(*titleEvBox, Gtk::PACK_EXPAND_WIDGET, 0); updateStyle(); + titleEvBox->signal_button_release_event().connect( sigc::mem_fun(this, & MyExpander::on_toggle) ); titleEvBox->signal_enter_notify_event().connect( sigc::mem_fun(this, & MyExpander::on_enter_leave_title), false); titleEvBox->signal_leave_notify_event().connect( sigc::mem_fun(this, & MyExpander::on_enter_leave_title), false); @@ -524,17 +616,20 @@ MyExpander::MyExpander(bool useEnabled, Glib::ustring titleLabel) : child(nullptr), headerWidget(nullptr), statusImage(nullptr), label(nullptr), useEnabled(useEnabled) { - set_spacing(options.slimUI ? 0 : 2); + set_spacing(0); set_name("MyExpander"); set_can_focus(false); + setExpandAlignProperties(this, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); headerHBox = Gtk::manage( new Gtk::HBox()); headerHBox->set_can_focus(false); + setExpandAlignProperties(headerHBox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); if (useEnabled) { statusImage = Gtk::manage(new Gtk::Image(disabledPBuf)); imageEvBox = Gtk::manage(new Gtk::EventBox()); + imageEvBox->set_name("MyExpanderStatus"); imageEvBox->add(*statusImage); imageEvBox->set_above_child(true); imageEvBox->signal_button_release_event().connect( sigc::mem_fun(this, & MyExpander::on_enabled_change) ); @@ -555,12 +650,13 @@ MyExpander::MyExpander(bool useEnabled, Glib::ustring titleLabel) : } label = Gtk::manage(new Gtk::Label()); - label->set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER); + setExpandAlignProperties(label, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); label->set_markup(Glib::ustring("") + escapeHtmlChars(titleLabel) + Glib::ustring("")); headerHBox->pack_start(*label, Gtk::PACK_EXPAND_WIDGET, 0); titleEvBox = Gtk::manage(new Gtk::EventBox()); titleEvBox->set_name("MyExpanderTitle"); + titleEvBox->set_border_width(2); titleEvBox->add(*headerHBox); titleEvBox->set_above_child(false); // this is the key! By make it below the child, they will get the events first. titleEvBox->set_can_focus(false); @@ -568,6 +664,7 @@ MyExpander::MyExpander(bool useEnabled, Glib::ustring titleLabel) : pack_start(*titleEvBox, Gtk::PACK_EXPAND_WIDGET, 0); updateStyle(); + titleEvBox->signal_button_release_event().connect( sigc::mem_fun(this, & MyExpander::on_toggle)); titleEvBox->signal_enter_notify_event().connect( sigc::mem_fun(this, & MyExpander::on_enter_leave_title), false); titleEvBox->signal_leave_notify_event().connect( sigc::mem_fun(this, & MyExpander::on_enter_leave_title), false); @@ -605,13 +702,31 @@ bool MyExpander::on_enter_leave_enable (GdkEventCrossing* event) void MyExpander::updateStyle() { - headerHBox->set_spacing(options.slimUI ? 2 : 5); - headerHBox->set_border_width(options.slimUI ? 1 : 2); - set_spacing(0); - set_border_width(options.slimUI ? 0 : 1); + updateVScrollbars(options.hideTPVScrollbar); +//GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + headerHBox->set_spacing(2); + headerHBox->set_border_width(1); + set_spacing(0); + set_border_width(0); +#endif +//GTK318 +} + +void MyExpander::updateVScrollbars(bool hide) +{ + if (hide) { + get_style_context()->remove_class("withScrollbar"); + } else { + get_style_context()->add_class("withScrollbar"); + } +} + +void MyExpander::setLevel (int level) +{ if (expBox) { - expBox->updateStyle(); + expBox->setLevel(level); } } @@ -734,13 +849,15 @@ bool MyExpander::get_expanded() return expBox ? expBox->get_visible() : false; } -void MyExpander::add (Gtk::Container& widget) +void MyExpander::add (Gtk::Container& widget, bool setChild) { - child = &widget; + if(setChild) { + child = &widget; + } expBox = Gtk::manage (new ExpanderBox (child)); - expBox->add (*child); + expBox->add (widget); pack_start(*expBox, Gtk::PACK_SHRINK, 0); - child->show(); + widget.show(); expBox->hideBox(); } @@ -774,11 +891,6 @@ bool MyExpander::on_toggle(GdkEventButton* event) return false; } -Gtk::Container* MyExpander::getChild() -{ - return child; -} - // used to connect a function to the enabled_toggled signal MyExpander::type_signal_enabled_toggled MyExpander::signal_enabled_toggled() { @@ -813,7 +925,6 @@ bool MyExpander::on_enabled_change(GdkEventButton* event) */ MyScrolledWindow::MyScrolledWindow () { - set_size_request(-1, 30); } bool MyScrolledWindow::on_scroll_event (GdkEventScroll* event) @@ -823,8 +934,8 @@ bool MyScrolledWindow::on_scroll_event (GdkEventScroll* event) return true; } - Gtk::Adjustment *adjust = get_vadjustment(); - Gtk::VScrollbar *scroll = get_vscrollbar(); + Glib::RefPtr adjust = get_vadjustment(); + Gtk::Scrollbar *scroll = get_vscrollbar(); if (adjust && scroll) { double upper = adjust->get_upper(); @@ -859,9 +970,21 @@ bool MyScrolledWindow::on_scroll_event (GdkEventScroll* event) return true; } -MyComboBoxText::MyComboBoxText () +void MyScrolledWindow::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const { - set_size_request(40, -1); + natural_height = minimum_height = 50; +} + +void MyScrolledWindow::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + natural_height = minimum_height = 50; +} + +MyComboBoxText::MyComboBoxText (bool has_entry) : Gtk::ComboBoxText(has_entry) +{ + minimumWidth = naturalWidth = 70; + Gtk::CellRendererText* cellRenderer = dynamic_cast(get_first_cell()); + cellRenderer->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE; } bool MyComboBoxText::on_scroll_event (GdkEventScroll* event) @@ -877,9 +1000,37 @@ bool MyComboBoxText::on_scroll_event (GdkEventScroll* event) return false; } +void MyComboBoxText::setPreferredWidth (int minimum_width, int natural_width) +{ + if (natural_width == -1 && minimum_width == -1) { + naturalWidth = minimumWidth = 70; + } else if (natural_width == -1) { + naturalWidth = minimumWidth = minimum_width; + } else if (minimum_width == -1) { + naturalWidth = natural_width; + minimumWidth = rtengine::max(naturalWidth / 2, 20); + minimumWidth = rtengine::min(naturalWidth, minimumWidth); + } else { + naturalWidth = natural_width; + minimumWidth = minimum_width; + } +} + +void MyComboBoxText::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + natural_width = rtengine::max(naturalWidth, 10); + minimum_width = rtengine::max(minimumWidth, 10); +} +void MyComboBoxText::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + natural_width = rtengine::max(naturalWidth, 10); + minimum_width = rtengine::max(minimumWidth, 10); +} + + MyComboBox::MyComboBox () { - set_size_request(40, -1); + minimumWidth = naturalWidth = 70; } bool MyComboBox::on_scroll_event (GdkEventScroll* event) @@ -895,17 +1046,44 @@ bool MyComboBox::on_scroll_event (GdkEventScroll* event) return false; } +void MyComboBox::setPreferredWidth (int minimum_width, int natural_width) +{ + if (natural_width == -1 && minimum_width == -1) { + naturalWidth = minimumWidth = 70; + } else if (natural_width == -1) { + naturalWidth = minimumWidth = minimum_width; + } else if (minimum_width == -1) { + naturalWidth = natural_width; + minimumWidth = rtengine::max(naturalWidth / 2, 20); + minimumWidth = rtengine::min(naturalWidth, minimumWidth); + } else { + naturalWidth = natural_width; + minimumWidth = minimum_width; + } +} + +void MyComboBox::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + natural_width = rtengine::max(naturalWidth, 10); + minimum_width = rtengine::max(minimumWidth, 10); +} +void MyComboBox::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + natural_width = rtengine::max(naturalWidth, 10); + minimum_width = rtengine::max(minimumWidth, 10); +} + MySpinButton::MySpinButton () { Gtk::Border border; - border.bottom = 0; - border.top = 0; - border.left = 3; - border.right = 3; + border.set_bottom(0); + border.set_top(0); + border.set_left(3); + border.set_right(3); set_inner_border(border); set_numeric(true); set_wrap(false); - set_alignment(Gtk::ALIGN_RIGHT); + set_alignment(Gtk::ALIGN_END); } void MySpinButton::updateSize() @@ -930,6 +1108,7 @@ void MySpinButton::updateSize() maxLen = digits + digits2 + (vMin < 0 ? 1 : 0) + (digits > 0 ? 1 : 0); set_max_length(maxLen); set_width_chars(maxLen); + set_max_width_chars(maxLen); } bool MySpinButton::on_key_press_event (GdkEventKey* event) @@ -945,7 +1124,7 @@ bool MySpinButton::on_key_press_event (GdkEventKey* event) return false; } else { if(event->string[0] == ',') { - event->keyval = GDK_period; + event->keyval = GDK_KEY_period; event->string[0] = '.'; } @@ -990,7 +1169,7 @@ bool MyHScale::on_key_press_event (GdkEventKey* event) MyFileChooserButton::MyFileChooserButton (const Glib::ustring& title, Gtk::FileChooserAction action) : Gtk::FileChooserButton(title, action) { - set_size_request(20, -1); + //set_size_request(35, -1); } // For an unknown reason (a bug ?), it doesn't work when action = FILE_CHOOSER_ACTION_SELECT_FOLDER ! @@ -1007,6 +1186,16 @@ bool MyFileChooserButton::on_scroll_event (GdkEventScroll* event) return false; } +void MyFileChooserButton::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + minimum_width = natural_width = 35; +} +void MyFileChooserButton::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + minimum_width = natural_width = 35; +} + + void bindCurrentFolder (Gtk::FileChooser& chooser, Glib::ustring& variable) { chooser.signal_selection_changed ().connect ([&]() @@ -1030,6 +1219,8 @@ TextOrIcon::TextOrIcon (Glib::ustring fname, Glib::ustring labelTx, Glib::ustrin labelText = labelTx; tooltipText = tooltipTx; + set_name("TextOrIcon"); + switchTo(type); } @@ -1078,7 +1269,63 @@ void TextOrIcon::switchTo(TOITypes type) show_all(); } +MyImageMenuItem::MyImageMenuItem(Glib::ustring label, Glib::ustring imageFileName) +{ + box = Gtk::manage (new Gtk::Grid()); + this->label = Gtk::manage( new Gtk::Label(label)); + box->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + + if (!imageFileName.empty()) { + image = Gtk::manage( new RTImage(imageFileName) ); + box->attach_next_to(*image, Gtk::POS_LEFT, 1, 1); + } else { + image = nullptr; + } + + box->attach_next_to(*this->label, Gtk::POS_RIGHT, 1, 1); + box->set_column_spacing(4); + box->set_row_spacing(0); + add(*box); +} + +const RTImage *MyImageMenuItem::getImage () const +{ + return image; +} + +const Gtk::Label* MyImageMenuItem::getLabel () const +{ + return label; +} + +MyProgressBar::MyProgressBar(int width) : w(rtengine::max(width, 10)) {} +MyProgressBar::MyProgressBar() : w(200) {} + +void MyProgressBar::setPreferredWidth(int width) +{ + w = rtengine::max(width, 10); +} + +void MyProgressBar::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + minimum_width = rtengine::max(w / 2, 50); + natural_width = rtengine::max(w, 50); +} + +void MyProgressBar::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + get_preferred_width_vfunc (minimum_width, natural_width); +} + BackBuffer::BackBuffer() : x(0), y(0), w(0), h(0), offset(0, 0), dirty(true) {} +BackBuffer::BackBuffer(int width, int height, Cairo::Format format) : x(0), y(0), w(width), h(height), offset(0, 0), dirty(true) +{ + if (w > 0 && h > 0) { + surface = Cairo::ImageSurface::create(format, w, h); + } else { + w = h = 0; + } +} void BackBuffer::setDestPosition(int x, int y) { @@ -1111,6 +1358,12 @@ void BackBuffer::getSrcOffset(rtengine::Coord &offset) offset = this->offset; } +// Note: newW & newH must be > 0 +bool BackBuffer::setDrawRectangle(Glib::RefPtr window, Gdk::Rectangle &rectangle, bool updateBackBufferSize) +{ + return setDrawRectangle(window, rectangle.get_x(), rectangle.get_y(), rectangle.get_width(), rectangle.get_height(), updateBackBufferSize); +} + // Note: newW & newH must be > 0 bool BackBuffer::setDrawRectangle(Glib::RefPtr window, int newX, int newY, int newW, int newH, bool updateBackBufferSize) { @@ -1128,7 +1381,7 @@ bool BackBuffer::setDrawRectangle(Glib::RefPtr window, int newX, in } // WARNING: we're assuming that the surface type won't change during all the execution time of RT. I guess it may be wrong when the user change the gfx card display settings!? - if (updateBackBufferSize && newSize && window) { + if (((updateBackBufferSize && newSize) || !surface) && window) { // allocate a new Surface surface.clear(); // ... don't know if this is necessary? surface = Cairo::ImageSurface::create(Cairo::FORMAT_RGB24, w, h); @@ -1138,6 +1391,12 @@ bool BackBuffer::setDrawRectangle(Glib::RefPtr window, int newX, in return dirty; } +// Note: newW & newH must be > 0 +bool BackBuffer::setDrawRectangle(Cairo::Format format, Gdk::Rectangle &rectangle, bool updateBackBufferSize) +{ + return setDrawRectangle(format, rectangle.get_x(), rectangle.get_y(), rectangle.get_width(), rectangle.get_height(), updateBackBufferSize); +} + // Note: newW & newH must be > 0 bool BackBuffer::setDrawRectangle(Cairo::Format format, int newX, int newY, int newW, int newH, bool updateBackBufferSize) { @@ -1155,7 +1414,7 @@ bool BackBuffer::setDrawRectangle(Cairo::Format format, int newX, int newY, int } // WARNING: we're assuming that the surface type won't change during all the execution time of RT. I guess it may be wrong when the user change the gfx card display settings!? - if (updateBackBufferSize && newSize) { + if ((updateBackBufferSize && newSize) || !surface) { // allocate a new Surface surface.clear(); // ... don't know if this is necessary? surface = Cairo::ImageSurface::create(format, w, h); @@ -1165,10 +1424,56 @@ bool BackBuffer::setDrawRectangle(Cairo::Format format, int newX, int newY, int return dirty; } +/* + * Copy uint8 RGB raw data to an ImageSurface. We're assuming that the source contains enough data for the given srcX, srcY, srcW, srcH -> no error checking! + */ +void BackBuffer::copyRGBCharData(const unsigned char *srcData, int srcX, int srcY, int srcW, int srcH, int srcRowStride, int dstX, int dstY) +{ + unsigned char r, g, b; + + if (!surface) { + return; + } + + //printf("copyRGBCharData: src: (X:%d Y:%d, W:%d H:%d) / dst: (X: %d Y:%d)\n", srcX, srcY, srcW, srcH, dstX, dstY); + + unsigned char *dstData = surface->get_data(); + int surfW = surface->get_width(); + int surfH = surface->get_height(); + + if (!srcData || dstX >= surfW || dstY >= surfH || srcW <= 0 || srcH <= 0 || srcX < 0 || srcY < 0) { + return; + } + + for (int i = 0; i < srcH; ++i) { + if (dstY + i >= surfH) { + break; + } + + const unsigned char *src = srcData + i * srcRowStride; + unsigned char *dst = dstData + ((dstY + i) * surfW + dstX) * 4; + + for (int j = 0; j < srcW; ++j) { + if (dstX + j >= surfW) { + break; + } + + r = *(src++); + g = *(src++); + b = *(src++); + + rtengine::poke255_uc(dst, r, g, b); + } + } + + surface->mark_dirty(); + +} + /* * Copy the backbuffer to a Gdk::Window */ -void BackBuffer::copySurface(Glib::RefPtr &window, GdkRectangle *rectangle) +void BackBuffer::copySurface(Glib::RefPtr window, Gdk::Rectangle *destRectangle) { if (surface && window) { // TODO: look out if window can be different on each call, and if not, store a reference to the window @@ -1181,13 +1486,20 @@ void BackBuffer::copySurface(Glib::RefPtr &window, GdkRectangle *re // now copy the off-screen Surface to the destination Surface Cairo::RefPtr crDest = Cairo::Context::create(destSurface); - crDest->set_source(surface, x - offsetX, y - offsetY); crDest->set_line_width(0.); - if (rectangle) { - crDest->rectangle(rectangle->x, rectangle->y, rectangle->width, rectangle->height); + if (destRectangle) { + crDest->set_source(surface, -offsetX + destRectangle->get_x(), -offsetY + destRectangle->get_y()); + int w_ = destRectangle->get_width() > 0 ? destRectangle->get_width() : w; + int h_ = destRectangle->get_height() > 0 ? destRectangle->get_height() : h; + //printf("BackBuffer::copySurface / rectangle1(%d, %d, %d, %d)\n", destRectangle->get_x(), destRectangle->get_y(), w_, h_); + crDest->rectangle(destRectangle->get_x(), destRectangle->get_y(), w_, h_); + //printf("BackBuffer::copySurface / rectangle1\n"); } else { + crDest->set_source(surface, -offsetX + x, -offsetY + y); + //printf("BackBuffer::copySurface / rectangle2(%d, %d, %d, %d)\n", x, y, w, h); crDest->rectangle(x, y, w, h); + //printf("BackBuffer::copySurface / rectangle2\n"); } crDest->fill(); @@ -1197,22 +1509,35 @@ void BackBuffer::copySurface(Glib::RefPtr &window, GdkRectangle *re /* * Copy the BackBuffer to another BackBuffer */ -void BackBuffer::copySurface(BackBuffer *destBackBuffer, GdkRectangle *rectangle) +void BackBuffer::copySurface(BackBuffer *destBackBuffer, Gdk::Rectangle *destRectangle) { if (surface && destBackBuffer) { + Cairo::RefPtr destSurface = destBackBuffer->getSurface(); + + if (!destSurface) { + return; + } + // compute the source offset int offsetX = rtengine::LIM(offset.x, 0, surface->get_width()); int offsetY = rtengine::LIM(offset.y, 0, surface->get_height()); // now copy the off-screen Surface to the destination Surface - Cairo::RefPtr crDest = Cairo::Context::create(destBackBuffer->getSurface()); - crDest->set_source(surface, x - offsetX, y - offsetY); + Cairo::RefPtr crDest = Cairo::Context::create(destSurface); crDest->set_line_width(0.); - if (rectangle) { - crDest->rectangle(rectangle->x, rectangle->y, rectangle->width, rectangle->height); + if (destRectangle) { + crDest->set_source(surface, -offsetX + destRectangle->get_x(), -offsetY + destRectangle->get_y()); + int w_ = destRectangle->get_width() > 0 ? destRectangle->get_width() : w; + int h_ = destRectangle->get_height() > 0 ? destRectangle->get_height() : h; + //printf("BackBuffer::copySurface / rectangle3(%d, %d, %d, %d)\n", destRectangle->get_x(), destRectangle->get_y(), w_, h_); + crDest->rectangle(destRectangle->get_x(), destRectangle->get_y(), w_, h_); + //printf("BackBuffer::copySurface / rectangle3\n"); } else { + crDest->set_source(surface, -offsetX + x, -offsetY + y); + //printf("BackBuffer::copySurface / rectangle4(%d, %d, %d, %d)\n", x, y, w, h); crDest->rectangle(x, y, w, h); + //printf("BackBuffer::copySurface / rectangle4\n"); } crDest->fill(); @@ -1222,7 +1547,7 @@ void BackBuffer::copySurface(BackBuffer *destBackBuffer, GdkRectangle *rectangle /* * Copy the BackBuffer to another Cairo::Surface */ -void BackBuffer::copySurface(Cairo::RefPtr &destSurface, GdkRectangle *rectangle) +void BackBuffer::copySurface(Cairo::RefPtr destSurface, Gdk::Rectangle *destRectangle) { if (surface && destSurface) { // compute the source offset @@ -1231,36 +1556,56 @@ void BackBuffer::copySurface(Cairo::RefPtr &destSurface, Gd // now copy the off-screen Surface to the destination Surface Cairo::RefPtr crDest = Cairo::Context::create(destSurface); - crDest->set_source(surface, x - offsetX, y - offsetY); crDest->set_line_width(0.); - if (rectangle) { - crDest->rectangle(rectangle->x, rectangle->y, rectangle->width, rectangle->height); + if (destRectangle) { + crDest->set_source(surface, -offsetX + destRectangle->get_x(), -offsetY + destRectangle->get_y()); + int w_ = destRectangle->get_width() > 0 ? destRectangle->get_width() : w; + int h_ = destRectangle->get_height() > 0 ? destRectangle->get_height() : h; + //printf("BackBuffer::copySurface / rectangle5(%d, %d, %d, %d)\n", destRectangle->get_x(), destRectangle->get_y(), w_, h_); + crDest->rectangle(destRectangle->get_x(), destRectangle->get_y(), w_, h_); + //printf("BackBuffer::copySurface / rectangle5\n"); } else { + crDest->set_source(surface, -offsetX + x, -offsetY + y); + //printf("BackBuffer::copySurface / rectangle6(%d, %d, %d, %d)\n", x, y, w, h); crDest->rectangle(x, y, w, h); + //printf("BackBuffer::copySurface / rectangle6\n"); } crDest->fill(); } } -void BackBuffer::copySurface(Cairo::RefPtr &context, GdkRectangle *rectangle) +/* + * Copy the BackBuffer to another Cairo::Surface + */ +void BackBuffer::copySurface(Cairo::RefPtr crDest, Gdk::Rectangle *destRectangle) { - if (surface && context) { + if (surface && crDest) { // compute the source offset int offsetX = rtengine::LIM(offset.x, 0, surface->get_width()); int offsetY = rtengine::LIM(offset.y, 0, surface->get_height()); // now copy the off-screen Surface to the destination Surface - context->set_source(surface, x - offsetX, y - offsetY); - context->set_line_width(0.); + // int srcSurfW = surface->get_width(); + // int srcSurfH = surface->get_height(); + //printf("srcSurf: w: %d, h: %d\n", srcSurfW, srcSurfH); + crDest->set_line_width(0.); - if (rectangle) { - context->rectangle(rectangle->x, rectangle->y, rectangle->width, rectangle->height); + if (destRectangle) { + crDest->set_source(surface, -offsetX + destRectangle->get_x(), -offsetY + destRectangle->get_y()); + int w_ = destRectangle->get_width() > 0 ? destRectangle->get_width() : w; + int h_ = destRectangle->get_height() > 0 ? destRectangle->get_height() : h; + //printf("BackBuffer::copySurface / rectangle7(%d, %d, %d, %d)\n", destRectangle->get_x(), destRectangle->get_y(), w_, h_); + crDest->rectangle(destRectangle->get_x(), destRectangle->get_y(), w_, h_); + //printf("BackBuffer::copySurface / rectangle7\n"); } else { - context->rectangle(x, y, w, h); + crDest->set_source(surface, -offsetX + x, -offsetY + y); + //printf("BackBuffer::copySurface / rectangle8(%d, %d, %d, %d)\n", x, y, w, h); + crDest->rectangle(x, y, w, h); + //printf("BackBuffer::copySurface / rectangle8\n"); } - context->fill(); + crDest->fill(); } } diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h index b8e058eb4..7a71fc399 100644 --- a/rtgui/guiutils.h +++ b/rtgui/guiutils.h @@ -19,20 +19,56 @@ #ifndef __GUI_UTILS_ #define __GUI_UTILS_ +#include + #include -#include "../rtengine/rtengine.h" + +#include + #include "../rtengine/coord.h" -#include -#include +#include "../rtengine/noncopyable.h" +#include "../rtengine/rtengine.h" + +#include "rtimage.h" + +// for convenience... +#include "pathutils.h" + Glib::ustring escapeHtmlChars(const Glib::ustring &src); bool removeIfThere (Gtk::Container* cont, Gtk::Widget* w, bool increference = true); void thumbInterp (const unsigned char* src, int sw, int sh, unsigned char* dst, int dw, int dh); -Glib::ustring removeExtension (const Glib::ustring& filename); -Glib::ustring getExtension (const Glib::ustring& filename); bool confirmOverwrite (Gtk::Window& parent, const std::string& filename); void writeFailed (Gtk::Window& parent, const std::string& filename); void drawCrop (Cairo::RefPtr cr, int imx, int imy, int imw, int imh, int startx, int starty, double scale, const rtengine::procparams::CropParams& cparams, bool drawGuide = true, bool useBgColor = true, bool fullImageVisible = true); +gboolean acquireGUI(void* data); +void setExpandAlignProperties(Gtk::Widget *widget, bool hExpand, bool vExpand, enum Gtk::Align hAlign, enum Gtk::Align vAlign); + +class IdleRegister final : + public rtengine::NonCopyable +{ +public: + ~IdleRegister(); + + void add(GSourceFunc function, gpointer data, gint priority = G_PRIORITY_DEFAULT_IDLE); + void destroy(); + +private: + struct DataWrapper { + IdleRegister* const self; + GSourceFunc function; + gpointer data; + }; + + std::map ids; + MyMutex mutex; +}; + +// TODO: The documentation says gdk_threads_enter and gdk_threads_leave should be replaced +// by g_main_context_invoke(), g_idle_add() and related functions, but this will require more extensive changes. +// We silence those warnings until then so that we notice the others. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" /** * @brief Lock GTK for critical section. @@ -77,10 +113,12 @@ public: } }; +#pragma GCC diagnostic pop + class ConnectionBlocker { public: - explicit ConnectionBlocker (Gtk::Widget *associatedWidget, sigc::connection& connection) : connection (associatedWidget ? &connection : nullptr) + explicit ConnectionBlocker (Gtk::Widget *associatedWidget, sigc::connection& connection) : connection (associatedWidget ? &connection : nullptr), wasBlocked(false) { if (this->connection) { wasBlocked = connection.block(); @@ -116,7 +154,7 @@ public: delete pC; } - void updateStyle(); + void setLevel(int level); void show() {} void show_all(); @@ -126,8 +164,7 @@ public: void showBox(); void hideBox(); - void on_style_changed (const Glib::RefPtr& style); - bool on_expose_event(GdkEventExpose* event); +// bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr); }; /** @@ -165,16 +202,9 @@ private: bool on_enter_leave_title (GdkEventCrossing* event); /// Used to handle the colored background for the Enable button bool on_enter_leave_enable (GdkEventCrossing* event); - /// Update the style of this widget, depending in the "slim" option + void updateStyle(); - void on_style_changed (const Glib::RefPtr& style) - { - updateStyle(); - } - - - protected: Gtk::Container* child; /// Gtk::Contained to display below the expander's title Gtk::Widget* headerWidget; /// Widget to display in the header, next to the arrow image ; can be NULL if the "string" version of the ctor has been used @@ -205,6 +235,9 @@ public: }; type_signal_enabled_toggled signal_enabled_toggled(); + /// Set the nesting level of the Expander to adapt its style accordingly + void setLevel(int level); + /// Set a new label string. If it has been instantiated with a Gtk::Widget, this method will do nothing void setLabel (Glib::ustring newLabel); /// Set a new label string. If it has been instantiated with a Gtk::Widget, this method will do nothing @@ -232,9 +265,6 @@ public: return headerWidget ? headerWidget : label; } - /// Get the widget shown/hidden by the expander - Gtk::Container* getChild(); - /// Set the collapsed/expanded state of the expander void set_expanded( bool expanded ); @@ -243,7 +273,9 @@ public: /// Add a Gtk::Container for the content of the expander /// Warning: do not manually Show/Hide the widget, because this parameter is handled by the click on the Expander's title - void add (Gtk::Container& widget); + void add (Gtk::Container& widget, bool setChild = true); + + void updateVScrollbars(bool hide); }; @@ -254,6 +286,8 @@ class MyScrolledWindow : public Gtk::ScrolledWindow { bool on_scroll_event (GdkEventScroll* event); + void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const; + void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const; public: MyScrolledWindow(); @@ -264,11 +298,16 @@ public: */ class MyComboBox : public Gtk::ComboBox { + int naturalWidth, minimumWidth; bool on_scroll_event (GdkEventScroll* event); + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; public: MyComboBox (); + + void setPreferredWidth (int minimum_width, int natural_width); }; /** @@ -276,11 +315,19 @@ public: */ class MyComboBoxText : public Gtk::ComboBoxText { + int naturalWidth, minimumWidth; + sigc::connection myConnection; bool on_scroll_event (GdkEventScroll* event); + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; public: - MyComboBoxText (); + explicit MyComboBoxText (bool has_entry = false); + + void setPreferredWidth (int minimum_width, int natural_width); + void connect(const sigc::connection &connection) { myConnection = connection; } + void block(bool blocked) { myConnection.block(blocked); } }; /** @@ -316,6 +363,8 @@ class MyFileChooserButton : public Gtk::FileChooserButton protected: bool on_scroll_event (GdkEventScroll* event); + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; public: MyFileChooserButton (const Glib::ustring& title, Gtk::FileChooserAction action = Gtk::FILE_CHOOSER_ACTION_OPEN); @@ -369,6 +418,35 @@ public: void switchTo(TOITypes type); }; +class MyImageMenuItem : public Gtk::MenuItem +{ +private: + Gtk::Grid *box; + RTImage *image; + Gtk::Label *label; + +public: + MyImageMenuItem (Glib::ustring label, Glib::ustring imageFileName); + const RTImage *getImage () const; + const Gtk::Label* getLabel () const; +}; + +class MyProgressBar : public Gtk::ProgressBar +{ +private: + int w; + + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; + +public: + explicit MyProgressBar(int width); + MyProgressBar(); + + void setPreferredWidth(int width); +}; + + /** * @brief Define a gradient milestone */ @@ -391,10 +469,32 @@ public: } }; +class RefCount +{ +private: + int refCount; +public: + RefCount() : refCount(1) {} + virtual ~RefCount() {} + + void reference() + { + ++refCount; + } + void unreference() + { + --refCount; + + if (!refCount) { + delete this; + } + } +}; + /** - * @brief Handle backbuffers as automatically as possible + * @brief Handle back buffers as automatically as possible, and suitable to be used with Glib::RefPtr */ -class BackBuffer +class BackBuffer : public RefCount { protected: @@ -405,11 +505,14 @@ protected: public: BackBuffer(); + BackBuffer(int w, int h, Cairo::Format format = Cairo::FORMAT_RGB24); // set the destination drawing rectangle; return true if the dimensions are different // Note: newW & newH must be > 0 - bool setDrawRectangle(Glib::RefPtr window, int newX, int newY, int newW=-1, int newH=-1, bool updateBackBufferSize = true); - bool setDrawRectangle(Cairo::Format format, int newX, int newY, int newW=-1, int newH=-1, bool updateBackBufferSize = true); + bool setDrawRectangle(Glib::RefPtr window, Gdk::Rectangle &rectangle, bool updateBackBufferSize = true); + bool setDrawRectangle(Glib::RefPtr window, int newX, int newY, int newW, int newH, bool updateBackBufferSize = true); + bool setDrawRectangle(Cairo::Format format, Gdk::Rectangle &rectangle, bool updateBackBufferSize = true); + bool setDrawRectangle(Cairo::Format format, int newX, int newY, int newW, int newH, bool updateBackBufferSize = true); // set the destination drawing location, do not modify other parameters like size and offset. Use setDrawRectangle to set all parameters at the same time void setDestPosition(int x, int y); void setSrcOffset(int x, int y); @@ -417,10 +520,11 @@ public: void getSrcOffset(int &x, int &y); void getSrcOffset(rtengine::Coord &offset); - void copySurface(Glib::RefPtr &window, GdkRectangle *rectangle = nullptr); - void copySurface(BackBuffer *destBackBuffer, GdkRectangle *rectangle = nullptr); - void copySurface(Cairo::RefPtr &destSurface, GdkRectangle *rectangle = nullptr); - void copySurface(Cairo::RefPtr &context, GdkRectangle *rectangle = nullptr); + void copyRGBCharData(const unsigned char *srcData, int srcX, int srcY, int srcW, int srcH, int srcRowStride, int dstX, int dstY); + void copySurface(Glib::RefPtr window, Gdk::Rectangle *rectangle = nullptr); + void copySurface(BackBuffer *destBackBuffer, Gdk::Rectangle *rectangle = nullptr); + void copySurface(Cairo::RefPtr destSurface, Gdk::Rectangle *rectangle = nullptr); + void copySurface(Cairo::RefPtr crDest, Gdk::Rectangle *destRectangle = nullptr); void setDirty(bool isDirty) { @@ -462,20 +566,25 @@ public: } int getWidth() { - return surface ? surface->get_width() : 0; + return surface ? surface->get_width() : 0; // sending back the allocated width } int getHeight() { - return surface ? surface->get_height() : 0; + return surface ? surface->get_height() : 0; // sending back the allocated height } }; inline void setActiveTextOrIndex (Gtk::ComboBoxText& comboBox, const Glib::ustring& text, int index) { - comboBox.set_active_text (text); + bool valueSet = false; + if (!text.empty()) { + comboBox.set_active_text (text); + valueSet = true; + } - if (comboBox.get_active_row_number () < 0) + if (!valueSet || comboBox.get_active_row_number () < 0) { comboBox.set_active (index); + } } inline Gtk::Window& getToplevelWindow (Gtk::Widget* widget) diff --git a/rtgui/histogrampanel.cc b/rtgui/histogrampanel.cc index f674b8951..002c4608b 100644 --- a/rtgui/histogrampanel.cc +++ b/rtgui/histogrampanel.cc @@ -38,16 +38,31 @@ extern Options options; HistogramPanel::HistogramPanel () { + set_vexpand(false); + set_hexpand(true); + set_valign(Gtk::ALIGN_START); + set_halign(Gtk::ALIGN_FILL); + set_name("HistogramPanel"); + histogramArea = Gtk::manage (new HistogramArea (this)); + histogramArea->set_hexpand(true); + histogramArea->set_vexpand(true); histogramRGBArea = Gtk::manage (new HistogramRGBArea ()); + histogramRGBArea->set_hexpand(true); + histogramRGBArea->set_vexpand(false); + histogramRGBArea->set_halign(Gtk::ALIGN_FILL); + histogramRGBArea->set_valign(Gtk::ALIGN_END); histogramRGBArea->show(); - gfxVBox = Gtk::manage (new Gtk::VBox (false, 2)); - histogramRGBArea->setParent(gfxVBox); - gfxVBox->pack_start (*histogramArea, Gtk::PACK_EXPAND_WIDGET, 0); + gfxGrid = Gtk::manage (new Gtk::Grid ()); + gfxGrid->set_orientation(Gtk::ORIENTATION_VERTICAL); + gfxGrid->set_row_spacing(1); + gfxGrid->set_column_spacing(1); + histogramRGBArea->setParent(gfxGrid); + gfxGrid->add(*histogramArea); if (options.histogramBar) { - gfxVBox->pack_start (*histogramRGBArea, Gtk::PACK_SHRINK, 0); + gfxGrid->add (*histogramRGBArea); } redImage = new RTImage ("histRed.png"); @@ -112,7 +127,8 @@ HistogramPanel::HistogramPanel () showFull->set_tooltip_text (M("HISTOGRAM_TOOLTIP_FULL")); showBAR->set_tooltip_text (M("HISTOGRAM_TOOLTIP_BAR")); - buttonVBox = Gtk::manage (new Gtk::VBox (false, 2)); + buttonGrid = Gtk::manage (new Gtk::Grid ()); + buttonGrid->set_orientation(Gtk::ORIENTATION_VERTICAL); showRed->set_active (true); showGreen->set_active (true); showBlue->set_active (true); @@ -132,6 +148,39 @@ HistogramPanel::HistogramPanel () showFull->set_image (showFull->get_active() ? *fullImage : *fullImage_g); showBAR->set_image (showBAR->get_active() ? *barImage : *barImage_g); + showRed->set_hexpand(false); + showRed->set_vexpand(false); + showRed->set_halign(Gtk::ALIGN_CENTER); + showRed->set_valign(Gtk::ALIGN_START); + showGreen->set_hexpand(false); + showGreen->set_vexpand(false); + showGreen->set_halign(Gtk::ALIGN_CENTER); + showGreen->set_valign(Gtk::ALIGN_START); + showBlue->set_hexpand(false); + showRed->set_vexpand(false); + showBlue->set_halign(Gtk::ALIGN_CENTER); + showBlue->set_valign(Gtk::ALIGN_START); + showValue->set_hexpand(false); + showValue->set_vexpand(false); + showValue->set_halign(Gtk::ALIGN_CENTER); + showValue->set_valign(Gtk::ALIGN_START); + showChro->set_hexpand(false); + showChro->set_vexpand(false); + showChro->set_halign(Gtk::ALIGN_CENTER); + showChro->set_valign(Gtk::ALIGN_START); + showRAW->set_hexpand(false); + showRAW->set_vexpand(false); + showRAW->set_halign(Gtk::ALIGN_CENTER); + showRAW->set_valign(Gtk::ALIGN_START); + showFull->set_hexpand(false); + showFull->set_vexpand(false); + showFull->set_halign(Gtk::ALIGN_CENTER); + showFull->set_valign(Gtk::ALIGN_START); + showBAR->set_hexpand(false); + showBAR->set_vexpand(false); + showBAR->set_halign(Gtk::ALIGN_CENTER); + showBAR->set_valign(Gtk::ALIGN_START); + showRed->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::red_toggled), showRed ); showGreen->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::green_toggled), showGreen ); showBlue->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::blue_toggled), showBlue ); @@ -141,22 +190,22 @@ HistogramPanel::HistogramPanel () showFull->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::full_toggled), showFull ); showBAR->signal_toggled().connect( sigc::mem_fun(*this, &HistogramPanel::bar_toggled), showBAR ); - buttonVBox->pack_start (*showRed, Gtk::PACK_SHRINK, 0); - buttonVBox->pack_start (*showGreen, Gtk::PACK_SHRINK, 0); - buttonVBox->pack_start (*showBlue, Gtk::PACK_SHRINK, 0); - buttonVBox->pack_start (*showValue, Gtk::PACK_SHRINK, 0); - buttonVBox->pack_start (*showChro, Gtk::PACK_SHRINK, 0); - buttonVBox->pack_start (*showRAW, Gtk::PACK_SHRINK, 0); - buttonVBox->pack_start (*showFull, Gtk::PACK_SHRINK, 0); - buttonVBox->pack_start (*showBAR, Gtk::PACK_SHRINK, 0); + buttonGrid->add (*showRed); + buttonGrid->add (*showGreen); + buttonGrid->add (*showBlue); + buttonGrid->add (*showValue); + buttonGrid->add (*showChro); + buttonGrid->add (*showRAW); + buttonGrid->add (*showFull); + buttonGrid->add (*showBAR); // Put the button vbox next to the window's border to be less disturbing if (options.histogramPosition == 1) { - pack_start (*buttonVBox, Gtk::PACK_SHRINK, 2); - pack_start (*gfxVBox, Gtk::PACK_EXPAND_WIDGET, 2); + add (*buttonGrid); + add (*gfxGrid); } else { - pack_start (*gfxVBox, Gtk::PACK_EXPAND_WIDGET, 2); - pack_start (*buttonVBox, Gtk::PACK_SHRINK, 2); + add (*gfxGrid); + add (*buttonGrid); } show_all (); @@ -189,42 +238,32 @@ HistogramPanel::~HistogramPanel () void HistogramPanel::resized (Gtk::Allocation& req) { + /* rconn.block (true); - int gHeight = req.get_width() / 2; - - if (gHeight > 150) { - gHeight = 150; - } else if (gHeight < 100) { - gHeight = 100; - } - - int bHeight = req.get_width() / 30; - - if (bHeight > 10) { - bHeight = 10; - } else if (bHeight < 5 ) { - bHeight = 5; - } - + int gHeight = req.get_width()/2; + if (gHeight > 150) gHeight = 150; else if (gHeight < 100) gHeight = 100; + int bHeight = req.get_width()/30; + if (bHeight > 10) bHeight = 10; else if (bHeight < 5 ) bHeight = 5; histogramArea->set_size_request (req.get_width(), gHeight); histogramRGBArea->set_size_request (req.get_width(), bHeight); rconn.block (false); + */ - histogramArea->renderHistogram (); + histogramArea->updateBackBuffer (); histogramArea->queue_draw (); if (histogramRGBArea->getFreeze()) { histogramRGBArea->updateFreeze(false); // set histogramRGBArea invalid; - histogramRGBArea->renderRGBMarks(-1, -1, -1); + histogramRGBArea->updateBackBuffer(-1, -1, -1); // re-set freeze to old state histogramRGBArea->updateFreeze(true); histogramRGBArea->queue_draw (); } else { // set histogramRGBArea invalid; - histogramRGBArea->renderRGBMarks(-1, -1, -1); + histogramRGBArea->updateBackBuffer(-1, -1, -1); histogramRGBArea->queue_draw (); } } @@ -291,14 +330,14 @@ void HistogramPanel::rgbv_toggled () histogramArea->queue_draw (); histogramRGBArea->updateOptions (showRed->get_active(), showGreen->get_active(), showBlue->get_active(), showValue->get_active(), showRAW->get_active(), showBAR->get_active(), showChro->get_active()); - histogramRGBArea->renderRGBMarks (0, 0, 0); + histogramRGBArea->updateBackBuffer (0, 0, 0); histogramArea->queue_draw (); } void HistogramPanel::setHistRGBInvalid () { // do something to un-show vertical bars - histogramRGBArea->renderRGBMarks(-1, -1, -1); + histogramRGBArea->updateBackBuffer(-1, -1, -1); histogramRGBArea->queue_draw (); } @@ -319,25 +358,31 @@ void HistogramPanel::pointerMoved (bool validPos, Glib::ustring profile, Glib::u if (!validPos) { // do something to un-show vertical bars - histogramRGBArea->renderRGBMarks(-1, -1, -1); + histogramRGBArea->updateBackBuffer(-1, -1, -1); histogramRGBArea->queue_draw (); } else { // do something to show vertical bars - histogramRGBArea->renderRGBMarks(r, g, b, profile, profileW); + histogramRGBArea->updateBackBuffer(r, g, b, profile, profileW); histogramRGBArea->queue_draw (); } } /* * Move the vertical button bar to the right side - * only allowed values for align are Gtk::ALIGN_LEFT and Gtk::ALIGN_RIGHT + * only allowed values for align are Gtk::POS_LEFT and Gtk::POS_RIGHT */ -void HistogramPanel::reorder (Gtk::AlignmentEnum align) +void HistogramPanel::reorder (Gtk::PositionType align) { - if (align == Gtk::ALIGN_LEFT) { - reorder_child(*buttonVBox, 0); + if (align == Gtk::POS_LEFT) { + gfxGrid->reference(); + removeIfThere(this, gfxGrid, false); + add (*gfxGrid); + gfxGrid->unreference(); } else { - reorder_child(*buttonVBox, 1); + buttonGrid->reference(); + removeIfThere(this, buttonGrid, false); + add (*buttonGrid); + buttonGrid->unreference(); } } @@ -353,10 +398,12 @@ void HistogramPanel::toggle_button_full () // // HistogramRGBArea HistogramRGBArea::HistogramRGBArea () ://needChroma unactive by default - val(0), r(0), g(0), b(0), frozen(false), valid(false), needRed(true), needGreen(true), needBlue(true), needLuma(true), rawMode(false), - showMode(options.histogramBar), barDisplayed(options.histogramBar), needChroma(false), parent(nullptr) + val(0), r(0), g(0), b(0), frozen(false), valid(false), needRed(true), needGreen(true), needBlue(true), needLuma(true), rawMode(false), showMode(options.histogramBar), barDisplayed(options.histogramBar), needChroma(false), parent(nullptr) { + get_style_context()->add_class("drawingarea"); + set_name("HistogramRGBArea"); + harih = new HistogramRGBAreaIdleHelper; harih->harea = this; harih->destroyed = false; @@ -365,6 +412,7 @@ HistogramRGBArea::HistogramRGBArea () ://needChroma unactive by default HistogramRGBArea::~HistogramRGBArea () { + idle_register.destroy(); if (harih->pending) { harih->destroyed = true; @@ -373,6 +421,45 @@ HistogramRGBArea::~HistogramRGBArea () } } + +Gtk::SizeRequestMode HistogramRGBArea::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_HEIGHT_FOR_WIDTH; +} + +void HistogramRGBArea::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const +{ + int minimumWidth = 0; + int naturalWidth = 0; + get_preferred_width_vfunc(minimumWidth, naturalWidth); + get_preferred_height_for_width_vfunc (minimumWidth, minimum_height, natural_height); +} + +void HistogramRGBArea::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + minimum_width = 60; + natural_width = 200; +} + +void HistogramRGBArea::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + int bHeight = width / 30; + + if (bHeight > 10) { + bHeight = 10; + } else if (bHeight < 5 ) { + bHeight = 5; + } + + minimum_height = bHeight; + natural_height = bHeight; +} + +void HistogramRGBArea::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + get_preferred_width_vfunc (minimum_width, natural_width); +} + bool HistogramRGBArea::getFreeze() { return(frozen); @@ -389,14 +476,9 @@ void HistogramRGBArea::updateFreeze (bool f) return; } -void HistogramRGBArea::renderRGBMarks (int r, int g, int b, Glib::ustring profile, Glib::ustring profileW) +void HistogramRGBArea::updateBackBuffer (int r, int g, int b, Glib::ustring profile, Glib::ustring profileW) { - - if (!is_realized ()) { - return; - } - - if (frozen) { + if (!get_realized () || frozen || !showMode) { return; } @@ -404,83 +486,75 @@ void HistogramRGBArea::renderRGBMarks (int r, int g, int b, Glib::ustring profil GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected Glib::RefPtr window = get_window(); - int winx, winy, winw, winh, wind; - window->get_geometry(winx, winy, winw, winh, wind); + int winx, winy, winw, winh; + window->get_geometry(winx, winy, winw, winh); - overlay = Gdk::Pixmap::create (window, winw, winh, -1); - Glib::RefPtr ovrl = Gdk::GC::create(overlay); + // This will create or update the size of the BackBuffer::surface + setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, winw, winh, true); - Glib::RefPtr style = get_style (); + if (surface) { + Cairo::RefPtr cc = Cairo::Context::create(surface); + Glib::RefPtr style = get_style_context(); - if (!showMode) { - ovrl->set_foreground (style->get_bg (Gtk::STATE_NORMAL)); - overlay->draw_rectangle (ovrl, true, 0, 0, winw, winh); + cc->set_source_rgba (0., 0., 0., 0.); + cc->set_operator (Cairo::OPERATOR_CLEAR); + cc->paint (); + cc->set_operator (Cairo::OPERATOR_OVER); - if (rgbgc_ && overlay) { - window->draw_drawable (rgbgc_, overlay, 0, 0, 0, 0, -1, -1); - } + cc->set_antialias(Cairo::ANTIALIAS_NONE); + cc->set_line_width (1.0); - return; - } else { - ovrl->set_foreground (mgray); - overlay->draw_rectangle (ovrl, true, 0, 0, winw, winh); - - if (rgbgc_ && overlay) { - window->draw_drawable (rgbgc_, overlay, 0, 0, 0, 0, -1, -1); - } - } - - Cairo::RefPtr cr = overlay->create_cairo_context(); - cr->set_line_width (1.0); - - if ( r != -1 && g != -1 && b != -1 ) { - if (needRed) { - // Red - cr->set_source_rgb(1.0, 0.0, 0.0); - cr->move_to((int)(r * (winw / 256.0)), 0); - cr->line_to((int)(r * (winw / 256.0)), winh - 0); - cr->stroke(); - } - - if (needGreen) { - // Green - cr->set_source_rgb(0.0, 1.0, 0.0); - cr->move_to((int)(g * (winw / 256.0)), 0); - cr->line_to((int)(g * (winw / 256.0)), winh - 0); - cr->stroke(); - } - - if (needBlue) { - // Blue - cr->set_source_rgb(0.0, 0.0, 1.0); - cr->move_to((int)(b * (winw / 256.0)), 0); - cr->line_to((int)(b * (winw / 256.0)), winh - 0); - cr->stroke(); - } - - if(needLuma || needChroma) { - float Lab_L, Lab_a, Lab_b; - rgb2lab( profile, profileW, r, g, b, Lab_L, Lab_a, Lab_b); - - if (needLuma) { - // Luma - cr->set_source_rgb(1.0, 1.0, 1.0); - cr->move_to((int)((Lab_L) * (winw / 100.0)), 0); - cr->line_to((int)((Lab_L) * (winw / 100.0)), winh - 0); - cr->stroke(); + if ( r != -1 && g != -1 && b != -1 ) { + if (needRed) { + // Red + cc->set_source_rgb(1.0, 0.0, 0.0); + cc->move_to((int)(r * (winw / 256.0)), 0); + cc->line_to((int)(r * (winw / 256.0)), winh - 0); + cc->stroke(); } - if (needChroma) { - // Chroma - float chromaval = sqrt(Lab_a * Lab_a + Lab_b * Lab_b) / 1.8; - // float chromaval = sqrt(Lab_a*Lab_a + Lab_b*Lab_b); - cr->set_source_rgb(0.0, 0.0, 0.0); - cr->move_to((int)(chromaval * (winw / 100.0)), 0); - cr->line_to((int)(chromaval * (winw / 100.0)), winh - 0); - cr->stroke(); + if (needGreen) { + // Green + cc->set_source_rgb(0.0, 1.0, 0.0); + cc->move_to((int)(g * (winw / 256.0)), 0); + cc->line_to((int)(g * (winw / 256.0)), winh - 0); + cc->stroke(); + } + + if (needBlue) { + // Blue + cc->set_source_rgb(0.0, 0.0, 1.0); + cc->move_to((int)(b * (winw / 256.0)), 0); + cc->line_to((int)(b * (winw / 256.0)), winh - 0); + cc->stroke(); + } + + if(needLuma || needChroma) { + float Lab_L, Lab_a, Lab_b; + rgb2lab( profile, profileW, r, g, b, Lab_L, Lab_a, Lab_b); + + if (needLuma) { + // Luma + cc->set_source_rgb(1.0, 1.0, 1.0); + cc->move_to((int)((Lab_L) * (winw / 100.0)), 0); + cc->line_to((int)((Lab_L) * (winw / 100.0)), winh - 0); + cc->stroke(); + } + + if (needChroma) { + // Chroma + float chromaval = sqrt(Lab_a * Lab_a + Lab_b * Lab_b) / 1.8; + // float chromaval = sqrt(Lab_a*Lab_a + Lab_b*Lab_b); + cc->set_source_rgb(0.0, 0.0, 0.0); + cc->move_to((int)(chromaval * (winw / 100.0)), 0); + cc->line_to((int)(chromaval * (winw / 100.0)), winh - 0); + cc->stroke(); + } } } } + + setDirty(false); } void HistogramRGBArea::rgb2lab (Glib::ustring profile, Glib::ustring profileW, int r, int g, int b, float &LAB_l, float &LAB_a, float &LAB_b) @@ -630,30 +704,6 @@ void HistogramRGBArea::rgb2lab (Glib::ustring profile, Glib::ustring profileW, i } - -int histrgbupdate (void* data) -{ - - HistogramRGBAreaIdleHelper* harih = static_cast(data); - - if (harih->destroyed) { - if (harih->pending == 1) { - delete harih; - } else { - harih->pending--; - } - - return 0; - } - - harih->harea->renderRGBMarks(-1, -1, -1); - harih->harea->queue_draw (); - - harih->pending--; - - return 0; -} - void HistogramRGBArea::update (int valh, int rh, int gh, int bh) { @@ -668,7 +718,29 @@ void HistogramRGBArea::update (int valh, int rh, int gh, int bh) } harih->pending++; - g_idle_add (histrgbupdate, harih); + + const auto func = [](gpointer data) -> gboolean { + HistogramRGBAreaIdleHelper* const harih = static_cast(data); + + if (harih->destroyed) { + if (harih->pending == 1) { + delete harih; + } else { + harih->pending--; + } + + return 0; + } + + harih->harea->updateBackBuffer(-1, -1, -1); + harih->harea->queue_draw (); + + harih->pending--; + + return FALSE; + }; + + idle_register.add(func, harih); } void HistogramRGBArea::updateOptions (bool r, bool g, bool b, bool l, bool raw, bool bar, bool c) @@ -686,7 +758,7 @@ void HistogramRGBArea::updateOptions (bool r, bool g, bool b, bool l, bool raw, if (bar && !barDisplayed) { // Toggled on, add (show) the widget - parent->pack_start(*this, Gtk::PACK_SHRINK, 0); + parent->add(*this); options.histogramBar = true; barDisplayed = true; } else if (!bar && barDisplayed) { @@ -709,38 +781,26 @@ void HistogramRGBArea::on_realize () Gtk::DrawingArea::on_realize(); Glib::RefPtr window = get_window(); - rgbgc_ = Gdk::GC::create(window); - add_events(Gdk::EXPOSURE_MASK | Gdk::BUTTON_PRESS_MASK); - - Glib::RefPtr rgbcolormap = get_default_colormap(); - black = Gdk::Color ("black"); - red = Gdk::Color ("red"); - green = Gdk::Color ("green"); - blue = Gdk::Color ("blue"); - lgray = Gdk::Color ("gray75"); - mgray = Gdk::Color ("gray50"); - dgray = Gdk::Color ("gray25"); - rgbcolormap->alloc_color(black); - rgbcolormap->alloc_color(white); - rgbcolormap->alloc_color(red); - rgbcolormap->alloc_color(green); - rgbcolormap->alloc_color(blue); - rgbcolormap->alloc_color(lgray); - rgbcolormap->alloc_color(mgray); - rgbcolormap->alloc_color(dgray); - + add_events(Gdk::BUTTON_PRESS_MASK); } -bool HistogramRGBArea::on_expose_event(GdkEventExpose* event) +bool HistogramRGBArea::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) { - Glib::RefPtr window = get_window(); + const Glib::RefPtr style = get_style_context(); + style->render_background(cr, 0, 0, get_width(), get_height()); - // on_realize & RenderRGBMarks have to be called before - if (rgbgc_ && overlay) { - window->draw_drawable (rgbgc_, overlay, 0, 0, 0, 0, -1, -1); + // on_realize & updateBackBuffer have to be called before + if (surface) { + if (isDirty()) { // not sure this could happen... + updateBackBuffer(-1, -1, -1); + } + + copySurface(cr, NULL); } + style->render_frame (cr, 0, 0, get_width(), get_height()); + return true; } @@ -754,13 +814,6 @@ bool HistogramRGBArea::on_button_press_event (GdkEventButton* event) return true; } -void HistogramRGBArea::on_style_changed (const Glib::RefPtr& style) -{ - - white = get_style()->get_base(Gtk::STATE_NORMAL); - queue_draw (); -} - // // // @@ -775,6 +828,9 @@ HistogramArea::HistogramArea (FullModeListener *fml) : //needChroma unactive by bhist(256); chist(256); + get_style_context()->add_class("drawingarea"); + set_name("HistogramArea"); + haih = new HistogramAreaIdleHelper; haih->harea = this; haih->destroyed = false; @@ -783,13 +839,51 @@ HistogramArea::HistogramArea (FullModeListener *fml) : //needChroma unactive by HistogramArea::~HistogramArea () { + idle_register.destroy(); if (haih->pending) { haih->destroyed = true; } else { delete haih; } +} +Gtk::SizeRequestMode HistogramArea::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_HEIGHT_FOR_WIDTH; +} + +void HistogramArea::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const +{ + int minimumWidth = 0; + int naturalWidth = 0; + get_preferred_width_vfunc (minimumWidth, naturalWidth); + get_preferred_height_for_width_vfunc (minimumWidth, minimum_height, natural_height); +} + +void HistogramArea::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + minimum_width = 60; + natural_width = 200; +} + +void HistogramArea::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + int gHeight = width / 2; + + if (gHeight > 150) { + gHeight = 150; + } else if (gHeight < 100) { + gHeight = 100; + } + + minimum_height = gHeight * 0.7; + natural_height = gHeight; +} + +void HistogramArea::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + get_preferred_width_vfunc (minimum_width, natural_width); } void HistogramArea::updateOptions (bool r, bool g, bool b, bool l, bool raw, bool full, bool c) @@ -803,35 +897,11 @@ void HistogramArea::updateOptions (bool r, bool g, bool b, bool l, bool raw, boo fullMode = !full; needChroma = c; - renderHistogram (); -} - -int histupdateUI (void* data) -{ - - HistogramAreaIdleHelper* haih = static_cast(data); - - if (haih->destroyed) { - if (haih->pending == 1) { - delete haih; - } else { - haih->pending--; - } - - return 0; - } - - haih->harea->renderHistogram (); - haih->harea->queue_draw (); - - haih->pending--; - - return 0; + updateBackBuffer (); } void HistogramArea::update (LUTu &histRed, LUTu &histGreen, LUTu &histBlue, LUTu &histLuma, LUTu &histRedRaw, LUTu &histGreenRaw, LUTu &histBlueRaw, LUTu &histChroma) { - if (histRed) { lhist = histLuma; chist = histChroma; @@ -849,26 +919,52 @@ void HistogramArea::update (LUTu &histRed, LUTu &histGreen, LUTu &histBlue, LUTu haih->pending++; // Can be done outside of the GUI thread - g_idle_add (histupdateUI, haih); + const auto func = [](gpointer data) -> gboolean { + HistogramAreaIdleHelper* const haih = static_cast(data); + + if (haih->destroyed) { + if (haih->pending == 1) { + delete haih; + } else { + haih->pending--; + } + + return 0; + } + + haih->harea->setDirty (true); + haih->harea->updateBackBuffer (); + haih->harea->queue_draw (); + + haih->pending--; + + return FALSE; + }; + + idle_register.add(func, haih); } -SSEFUNCTION void HistogramArea::renderHistogram () +SSEFUNCTION void HistogramArea::updateBackBuffer () { - if (!is_realized ()) { + if (!get_realized ()) { return; } Glib::RefPtr window = get_window(); - int winx, winy, winw, winh, wind; - window->get_geometry(winx, winy, winw, winh, wind); + int winx, winy, winw, winh; + window->get_geometry(winx, winy, winw, winh); - backBuffer = Gdk::Pixmap::create (window, winw, winh, -1); + // This will create or update the size of the BackBuffer::surface + setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, winw, winh, true); - Glib::RefPtr bgc = Gdk::GC::create(backBuffer); + Cairo::RefPtr cr = Cairo::Context::create(surface); + const Glib::RefPtr style = get_style_context(); - bgc->set_foreground (white); - backBuffer->draw_rectangle (bgc, true, 0, 0, winw, winh); + cr->set_source_rgba (0., 0., 0., 0.); + cr->set_operator (Cairo::OPERATOR_CLEAR); + cr->paint (); + cr->set_operator (Cairo::OPERATOR_OVER); if (valid) { // For RAW mode use the other hists @@ -907,7 +1003,7 @@ SSEFUNCTION void HistogramArea::renderHistogram () // does not take into account 0 and 255 values // them are handled separately - int fullhistheight = 0; + unsigned int fullhistheight = 0; for (int i = 1; i < 255; i++) { if (needLuma && lhisttemp[i] > fullhistheight) { @@ -942,7 +1038,7 @@ SSEFUNCTION void HistogramArea::renderHistogram () vint iv = (vint)ZEROV; #endif - for (int i = 0; i < fullhistheight; i++) { + for (unsigned i = 0; i < fullhistheight; i++) { #ifdef __SSE2__ vint areatempv = (vint)ZEROV; @@ -985,73 +1081,90 @@ SSEFUNCTION void HistogramArea::renderHistogram () realhistheight = winh - 2; } - Cairo::RefPtr cr = backBuffer->create_cairo_context(); cr->set_antialias (Cairo::ANTIALIAS_SUBPIXEL); cr->set_line_width (1.0); int ui = 0, oi = 0; if (needLuma && !rawMode) { - drawCurve(cr, lhist, realhistheight, winw, winh); - cr->set_source_rgb (0.75, 0.75, 0.75); - cr->fill_preserve (); - cr->set_source_rgb (0.5, 0.5, 0.5); - cr->stroke (); + drawCurve(cr, lhist, realhistheight, w, h); + cr->set_source_rgb (0.65, 0.65, 0.65); + cr->fill (); - drawMarks(cr, lhist, realhistheight, winw, ui, oi); + drawMarks(cr, lhist, realhistheight, w, ui, oi); } if (needChroma && !rawMode) { - drawCurve(cr, chist, realhistheight, winw, winh); - cr->set_source_rgb (0.6, 0.6, 0.6); - // cr->fill_preserve (); - // cr->set_source_rgb (0.2, 0.2, 0.1); + drawCurve(cr, chist, realhistheight, w, h); + cr->set_source_rgb (0., 0., 0.); cr->stroke (); - drawMarks(cr, chist, realhistheight, winw, ui, oi); + drawMarks(cr, chist, realhistheight, w, ui, oi); } if (needRed) { - drawCurve(cr, rhchanged, realhistheight, winw, winh); + drawCurve(cr, rhchanged, realhistheight, w, h); cr->set_source_rgb (1.0, 0.0, 0.0); cr->stroke (); - drawMarks(cr, rhchanged, realhistheight, winw, ui, oi); + drawMarks(cr, rhchanged, realhistheight, w, ui, oi); } if (needGreen) { - drawCurve(cr, ghchanged, realhistheight, winw, winh); + drawCurve(cr, ghchanged, realhistheight, w, h); cr->set_source_rgb (0.0, 1.0, 0.0); cr->stroke (); - drawMarks(cr, ghchanged, realhistheight, winw, ui, oi); + drawMarks(cr, ghchanged, realhistheight, w, ui, oi); } if (needBlue) { - drawCurve(cr, bhchanged, realhistheight, winw, winh); + drawCurve(cr, bhchanged, realhistheight, w, h); cr->set_source_rgb (0.0, 0.0, 1.0); cr->stroke (); - drawMarks(cr, bhchanged, realhistheight, winw, ui, oi); + drawMarks(cr, bhchanged, realhistheight, w, ui, oi); } } - bgc->set_foreground (mgray); - backBuffer->draw_rectangle (bgc, false, 0, 0, winw - 1, winh - 1); + cr->set_source_rgba (1., 1., 1., 0.35); + cr->set_line_width (1.0); + cr->set_antialias(Cairo::ANTIALIAS_NONE); - bgc->set_line_attributes (1, Gdk::LINE_ON_OFF_DASH, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER); + // Draw the content + cr->set_line_join(Cairo::LINE_JOIN_MITER); + std::valarray ch_ds (1); + ch_ds[0] = 4; + cr->set_dash (ch_ds, 0); - backBuffer->draw_line (bgc, winw / 4, 0, winw / 4, winh); - backBuffer->draw_line (bgc, 2 * winw / 4, 0, 2 * winw / 4, winh); - backBuffer->draw_line (bgc, 3 * winw / 4, 0, 3 * winw / 4, winh); - backBuffer->draw_line (bgc, 0, winh / 4, winw, winh / 4); - backBuffer->draw_line (bgc, 0, 2 * winh / 4, winw, 2 * winh / 4); - backBuffer->draw_line (bgc, 0, 3 * winh / 4, winw, 3 * winh / 4); + cr->move_to(w / 4 + 0.5, 1.5); + cr->line_to(w / 4 + 0.5, h - 2); + cr->stroke(); + cr->move_to(2 * w / 4 + 0.5, 1.5); + cr->line_to(2 * w / 4 + 0.5, h - 2); + cr->stroke(); + cr->move_to(3 * w / 4 + 0.5, 1.5); + cr->line_to(3 * w / 4 + 0.5, h - 2); + cr->stroke(); + cr->move_to(1.5, h / 4 + 0.5); + cr->line_to(w - 2, h / 4 + 0.5); + cr->stroke(); + cr->move_to(1.5, 2 * h / 4 + 0.5); + cr->line_to(w - 2, 2 * h / 4 + 0.5); + cr->stroke(); + cr->move_to(1.5, 3 * h / 4 + 0.5); + cr->line_to(w - 2, 3 * h / 4 + 0.5); + cr->stroke(); - bgc->set_line_attributes (1, Gdk::LINE_SOLID, Gdk::CAP_NOT_LAST, Gdk::JOIN_MITER); + cr->unset_dash(); - oldwidth = winw; - oldheight = winh; + // Draw the frame's border + style->render_frame(cr, 0, 0, surface->get_width(), surface->get_height()); + + oldwidth = w; + oldheight = h; + + setDirty(false); } void HistogramArea::on_realize () @@ -1059,32 +1172,14 @@ void HistogramArea::on_realize () Gtk::DrawingArea::on_realize(); Glib::RefPtr window = get_window(); - gc_ = Gdk::GC::create(window); - add_events(Gdk::EXPOSURE_MASK | Gdk::BUTTON_PRESS_MASK); - Glib::RefPtr colormap = get_default_colormap(); - - black = Gdk::Color ("black"); - red = Gdk::Color ("red"); - green = Gdk::Color ("green"); - blue = Gdk::Color ("blue"); - lgray = Gdk::Color ("gray75"); - mgray = Gdk::Color ("gray50"); - dgray = Gdk::Color ("gray25"); - colormap->alloc_color(black); - colormap->alloc_color(white); - colormap->alloc_color(red); - colormap->alloc_color(green); - colormap->alloc_color(blue); - colormap->alloc_color(lgray); - colormap->alloc_color(mgray); - colormap->alloc_color(dgray); - + add_events(Gdk::BUTTON_PRESS_MASK); } void HistogramArea::drawCurve(Cairo::RefPtr &cr, LUTu & data, double scale, int hsize, int vsize) { cr->move_to (0, vsize - 1); + scale = scale <= 0.f ? 0.001f : scale; // avoid division by zero and negative values for (int i = 0; i < 256; i++) { double val = data[i] * (double)(vsize - 2) / scale; @@ -1093,7 +1188,9 @@ void HistogramArea::drawCurve(Cairo::RefPtr &cr, val = vsize - 1; } - cr->line_to ((i / 255.0) * (hsize - 1), vsize - 1 - val); + double posX = (i / 255.0) * (hsize - 1); + double posY = vsize - 1 - val; + cr->line_to (posX, posY); } cr->line_to (hsize - 1, vsize - 1); @@ -1115,26 +1212,19 @@ void HistogramArea::drawMarks(Cairo::RefPtr &cr, cr->fill(); } -void HistogramArea::on_style_changed (const Glib::RefPtr& style) -{ - - white = get_style()->get_base(Gtk::STATE_NORMAL); - queue_draw (); -} - -bool HistogramArea::on_expose_event(GdkEventExpose* event) +bool HistogramArea::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) { Glib::RefPtr window = get_window(); - int winx, winy, winw, winh, wind; - window->get_geometry(winx, winy, winw, winh, wind); - - if (winw != oldwidth && winh != oldheight) { - renderHistogram (); + if (get_width() != oldwidth || get_height() != oldheight || isDirty ()) { + updateBackBuffer (); } - window->draw_drawable (gc_, backBuffer, 0, 0, 0, 0, -1, -1); + const Glib::RefPtr style = get_style_context(); + style->render_background(cr, 0, 0, get_width(), get_height()); + copySurface(cr, NULL); + style->render_frame (cr, 0, 0, get_width(), get_height()); return true; } @@ -1150,7 +1240,7 @@ bool HistogramArea::on_button_press_event (GdkEventButton* event) myFullModeListener->toggle_button_full (); } - renderHistogram (); + updateBackBuffer (); queue_draw (); } diff --git a/rtgui/histogrampanel.h b/rtgui/histogrampanel.h index 79fe4a249..25fa15c23 100644 --- a/rtgui/histogrampanel.h +++ b/rtgui/histogrampanel.h @@ -22,8 +22,10 @@ #include #include +#include #include "../rtengine/LUT.h" #include "../rtengine/improccoordinator.h" +#include "guiutils.h" #include "pointermotionlistener.h" @@ -41,25 +43,14 @@ struct HistogramRGBAreaIdleHelper { int pending; }; -class HistogramRGBArea : public Gtk::DrawingArea +class HistogramRGBArea : public Gtk::DrawingArea, public BackBuffer { - +private: typedef const double (*TMatrix)[3]; + IdleRegister idle_register; + protected: - - Glib::RefPtr rgbgc_; - Glib::RefPtr overlay; - - Gdk::Color black; - Gdk::Color white; - Gdk::Color red; - Gdk::Color green; - Gdk::Color blue; - Gdk::Color lgray; - Gdk::Color mgray; - Gdk::Color dgray; - int val; int r; int g; @@ -77,20 +68,19 @@ protected: bool barDisplayed; bool needChroma; - Gtk::VBox* parent; + Gtk::Grid* parent; HistogramRGBAreaIdleHelper* harih; public: - HistogramRGBArea(); ~HistogramRGBArea(); - void renderRGBMarks (int r, int g, int b, Glib::ustring profile = "", Glib::ustring profileW = ""); + void updateBackBuffer (int r, int g, int b, Glib::ustring profile = "", Glib::ustring profileW = ""); void updateFreeze (bool f); bool getFreeze (); bool getShow (); - void setParent (Gtk::VBox* p) + void setParent (Gtk::Grid* p) { parent = p; }; @@ -99,11 +89,15 @@ public: void updateOptions (bool r, bool g, bool b, bool l, bool raw, bool show, bool c); void on_realize(); - bool on_expose_event(GdkEventExpose* event); + bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr); bool on_button_press_event (GdkEventButton* event); - void on_style_changed (const Glib::RefPtr& style); private: void rgb2lab (Glib::ustring profile, Glib::ustring profileW, int r, int g, int b, float &LAB_l, float &LAB_a, float &LAB_b); + Gtk::SizeRequestMode get_request_mode_vfunc () const; + void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const; + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const; + void get_preferred_width_for_height_vfunc (int h, int &minimum_width, int &natural_width) const; // Some ... }; @@ -111,25 +105,16 @@ private: class FullModeListener { public: + virtual ~FullModeListener() {} virtual void toggle_button_full () {} }; -class HistogramArea : public Gtk::DrawingArea +class HistogramArea : public Gtk::DrawingArea, public BackBuffer { +private: + IdleRegister idle_register; protected: - - Glib::RefPtr gc_; - Glib::RefPtr backBuffer; - - Gdk::Color black; - Gdk::Color white; - Gdk::Color red; - Gdk::Color green; - Gdk::Color blue; - Gdk::Color lgray; - Gdk::Color mgray; - Gdk::Color dgray; LUTu lhist, rhist, ghist, bhist, chist; LUTu lhistRaw, rhistRaw, ghistRaw, bhistRaw; @@ -143,31 +128,33 @@ protected: HistogramAreaIdleHelper* haih; public: - explicit HistogramArea(FullModeListener *fml = nullptr); ~HistogramArea(); - void renderHistogram (); + void updateBackBuffer (); void update (LUTu &histRed, LUTu &histGreen, LUTu &histBlue, LUTu &histLuma, LUTu &histRedRaw, LUTu &histGreenRaw, LUTu &histBlueRaw, LUTu &histChroma); void updateOptions (bool r, bool g, bool b, bool l, bool raw, bool full , bool c); void on_realize(); - bool on_expose_event(GdkEventExpose* event); + bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr); bool on_button_press_event (GdkEventButton* event); - void on_style_changed (const Glib::RefPtr& style); + private: - void drawCurve(Cairo::RefPtr &cr, - LUTu & data, double scale, int hsize, int vsize); - void drawMarks(Cairo::RefPtr &cr, - LUTu & data, double scale, int hsize, int & ui, int & oi); + void drawCurve(Cairo::RefPtr &cr, LUTu & data, double scale, int hsize, int vsize); + void drawMarks(Cairo::RefPtr &cr, LUTu & data, double scale, int hsize, int & ui, int & oi); + Gtk::SizeRequestMode get_request_mode_vfunc () const; + void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const; + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; }; -class HistogramPanel : public Gtk::HBox, public PointerMotionListener, public FullModeListener +class HistogramPanel : public Gtk::Grid, public PointerMotionListener, public FullModeListener { protected: - Gtk::VBox* gfxVBox; - Gtk::VBox* buttonVBox; + Gtk::Grid* gfxGrid; + Gtk::Grid* buttonGrid; HistogramArea* histogramArea; HistogramRGBArea* histogramRGBArea; Gtk::ToggleButton* showRed; @@ -217,7 +204,7 @@ public: // TODO should be protected void setHistRGBInvalid (); - void reorder (Gtk::AlignmentEnum align); + void reorder (Gtk::PositionType position); void red_toggled (); void green_toggled (); void blue_toggled (); diff --git a/rtgui/history.cc b/rtgui/history.cc index 4deb7b64a..72c61b678 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -19,13 +19,14 @@ #include "history.h" #include "multilangmgr.h" #include "rtimage.h" +#include "guiutils.h" using namespace rtengine; using namespace rtengine::procparams; Glib::ustring eventDescrArray[NUMOFEVENTS]; -History::History (bool bookmarkSupport) : blistener(nullptr), tpc (nullptr), bmnum (1) +History::History (bool bookmarkSupport) : historyVPaned(nullptr), blistener(nullptr), tpc (nullptr), bmnum (1) { blistenerLock = false; // sets default that the Before preview will not be locked @@ -37,10 +38,11 @@ History::History (bool bookmarkSupport) : blistener(nullptr), tpc (nullptr), bmn // History List // ~~~~~~~~~~~~ - hscrollw = Gtk::manage (new Gtk::ScrolledWindow ()); + Gtk::ScrolledWindow* hscrollw = Gtk::manage (new Gtk::ScrolledWindow ()); hscrollw->set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); Gtk::Frame* histFrame = Gtk::manage (new Gtk::Frame (M("HISTORY_LABEL"))); + histFrame->set_name ("HistoryPanel"); histFrame->add (*hscrollw); hTreeView = Gtk::manage (new Gtk::TreeView ()); @@ -48,41 +50,58 @@ History::History (bool bookmarkSupport) : blistener(nullptr), tpc (nullptr), bmn historyModel = Gtk::ListStore::create (historyColumns); hTreeView->set_model (historyModel); -// hTreeView->set_headers_visible (false); + hTreeView->set_headers_visible (false); + hTreeView->set_hscroll_policy(Gtk::SCROLL_MINIMUM); + hTreeView->set_vscroll_policy(Gtk::SCROLL_NATURAL); + hTreeView->set_size_request(80, -1); Gtk::CellRendererText *changecrt = Gtk::manage (new Gtk::CellRendererText()); + changecrt->property_ellipsize() = Pango::ELLIPSIZE_END; Gtk::CellRendererText *valuecrt = Gtk::manage (new Gtk::CellRendererText()); + valuecrt->property_ellipsize() = Pango::ELLIPSIZE_END; Gtk::TreeView::Column *hviewcol = Gtk::manage (new Gtk::TreeView::Column ("")); hviewcol->pack_start (*changecrt, true); hviewcol->add_attribute (changecrt->property_markup (), historyColumns.text); + hviewcol->set_expand(true); hviewcol->set_resizable (true); + hviewcol->set_fixed_width(35); + hviewcol->set_min_width(35); + hviewcol->set_sizing(Gtk::TREE_VIEW_COLUMN_AUTOSIZE); Gtk::TreeView::Column *hviewcol2 = Gtk::manage (new Gtk::TreeView::Column ("")); hviewcol2->pack_start (*valuecrt, true); hviewcol2->add_attribute (valuecrt->property_markup (), historyColumns.value); - valuecrt->set_property ("xalign", 1.0); + hviewcol2->set_expand(true); + hviewcol2->set_resizable(true); + hviewcol2->set_fixed_width(35); + hviewcol2->set_min_width(35); + hviewcol2->set_sizing(Gtk::TREE_VIEW_COLUMN_AUTOSIZE); + valuecrt->set_alignment(1.f, 0.f); + hTreeView->set_has_tooltip(true); + hTreeView->signal_query_tooltip().connect( sigc::mem_fun(*this, &History::on_query_tooltip) ); hTreeView->append_column (*hviewcol); hTreeView->append_column (*hviewcol2); - hviewcol2->set_sizing (Gtk::TREE_VIEW_COLUMN_FIXED); - selchangehist = hTreeView->get_selection()->signal_changed().connect(sigc::mem_fun(*this, &History::historySelectionChanged)); // Bookmark List // ~~~~~~~~~~~~~ - Gtk::HSeparator* hsepb = Gtk::manage (new Gtk::HSeparator ()); - pack_end (*hsepb, Gtk::PACK_SHRINK, 0); - Gtk::HBox* ahbox = Gtk::manage (new Gtk::HBox ()); - addBookmark = Gtk::manage (new Gtk::Button (M("HISTORY_NEWSNAPSHOT"))); + addBookmark = Gtk::manage (new Gtk::Button ()); // M("HISTORY_NEWSNAPSHOT") + setExpandAlignProperties(addBookmark, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + //addBookmark->get_style_context()->set_junction_sides(Gtk::JUNCTION_RIGHT); + addBookmark->get_style_context()->add_class("Left"); addBookmark->set_tooltip_markup (M("HISTORY_NEWSNAPSHOT_TOOLTIP")); Gtk::Image* addimg = Gtk::manage (new RTImage ("gtk-add.png")); addBookmark->set_image (*addimg); ahbox->pack_start (*addBookmark); - delBookmark = Gtk::manage (new Gtk::Button (M("HISTORY_DELSNAPSHOT"))); + delBookmark = Gtk::manage (new Gtk::Button ()); // M("HISTORY_DELSNAPSHOT") + setExpandAlignProperties(delBookmark, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + //delBookmark->get_style_context()->set_junction_sides(Gtk::JUNCTION_LEFT); + delBookmark->get_style_context()->add_class("Right"); Gtk::Image* delimg = Gtk::manage (new RTImage ("list-remove.png")); delBookmark->set_image (*delimg); ahbox->pack_start (*delBookmark); @@ -90,18 +109,20 @@ History::History (bool bookmarkSupport) : blistener(nullptr), tpc (nullptr), bmn bscrollw = Gtk::manage (new Gtk::ScrolledWindow ()); // bscrollw->set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); bscrollw->set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); - bscrollw->set_size_request (-1, 75); + bscrollw->set_size_request (-1, 45); Gtk::Frame* bmFrame = Gtk::manage (new Gtk::Frame (M("HISTORY_SNAPSHOTS"))); + bmFrame->set_name("Snapshots"); Gtk::VBox* bmBox = Gtk::manage (new Gtk::VBox ()); bmFrame->add (*bmBox); bmBox->pack_start (*bscrollw, Gtk::PACK_EXPAND_WIDGET, 4); bmBox->pack_end (*ahbox, Gtk::PACK_SHRINK, 4); + bmBox->set_size_request(-1,60); if (bookmarkSupport) { historyVPaned = Gtk::manage ( new Gtk::VPaned () ); historyVPaned->pack1 (*histFrame, true, true); - historyVPaned->pack2 (*bmFrame, false, true); + historyVPaned->pack2 (*bmFrame, false, false); pack_start(*historyVPaned); } else { pack_start (*histFrame); @@ -121,9 +142,9 @@ History::History (bool bookmarkSupport) : blistener(nullptr), tpc (nullptr), bmn addBookmark->signal_clicked().connect( sigc::mem_fun(*this, &History::addBookmarkPressed) ); delBookmark->signal_clicked().connect( sigc::mem_fun(*this, &History::delBookmarkPressed) ); -// hTreeView->set_grid_lines (Gtk::TREE_VIEW_GRID_LINES_HORIZONTAL); + //hTreeView->set_grid_lines (Gtk::TREE_VIEW_GRID_LINES_HORIZONTAL); hTreeView->set_grid_lines (Gtk::TREE_VIEW_GRID_LINES_BOTH); - hTreeView->signal_size_allocate().connect( sigc::mem_fun(*this, &History::resized) ); + //hTreeView->signal_size_allocate().connect( sigc::mem_fun(*this, &History::resized) ); hTreeView->set_enable_search(false); bTreeView->set_enable_search(false); @@ -134,6 +155,7 @@ History::History (bool bookmarkSupport) : blistener(nullptr), tpc (nullptr), bmn void History::initHistory () { + ConnectionBlocker selBlocker(selchangehist); historyModel->clear (); bookmarkModel->clear (); } @@ -209,6 +231,7 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring } selchangehist.block (true); + selchangebm.block (true); if (ev == EvPhotoLoaded) { initHistory (); @@ -277,11 +300,12 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring if (!selection->get_selected_rows().empty()) { - Gtk::TreeView::Selection::ListHandle_Path selp = selection->get_selected_rows(); + std::vector selp = selection->get_selected_rows(); hTreeView->scroll_to_row (*selp.begin()); } selchangehist.block (false); + selchangebm.block (false); } void History::addBookmarkWithText (Glib::ustring text) @@ -344,7 +368,7 @@ void History::undo () int size = historyModel->children().size (); if (size > 1) { - selection->select (historyModel->children()[size - 2]); + selection->select (historyModel->children().operator [](size - 2)); } } } @@ -365,14 +389,16 @@ void History::redo () int size = historyModel->children().size (); if (size > 1) { - selection->select (historyModel->children()[size - 2]); + selection->select (historyModel->children().operator [](size - 2)); } } } +/* void History::resized (Gtk::Allocation& req) { } +*/ bool History::getBeforeLineParams (rtengine::procparams::ProcParams& params) { @@ -389,3 +415,44 @@ bool History::getBeforeLineParams (rtengine::procparams::ProcParams& params) return true; } +bool History::on_query_tooltip(int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip) { + bool displayTooltip = false; + + Gtk::TreeModel::Path path; + int x2 = -1; + int y2 = -1; + hTreeView->convert_widget_to_bin_window_coords(x, y, x2, y2); + bool hasPath = hTreeView->get_path_at_pos(x2, y2, path); + + if (hasPath) { + if (path && !path.empty()) { + Gtk::TreeModel::iterator iter = historyModel->get_iter(path); + if (iter) { + Glib::ustring param, val; + iter->get_value(1, param); + iter->get_value(2, val); + + /* + * + * + * Why this doesn't work ??? + * + * + * + Gtk::Label *left = Gtk::manage (new Gtk::Label(param+" :")); + Gtk::Label *right = Gtk::manage (new Gtk::Label(val)); + right->set_justify(Gtk::JUSTIFY_LEFT); + Gtk::HBox *hbox = Gtk::manage (new Gtk::HBox()); + hbox->set_spacing(5); + hbox->pack_start(*left, Gtk::PACK_SHRINK, 0); + hbox->pack_start(*right, Gtk::PACK_SHRINK, 0); + tooltip->set_custom(*hbox); + */ + + tooltip->set_text(param+" : "+val); + displayTooltip = true; + } + } + } + return displayTooltip; +} diff --git a/rtgui/history.h b/rtgui/history.h index e3d18354e..e905cb396 100644 --- a/rtgui/history.h +++ b/rtgui/history.h @@ -74,7 +74,6 @@ public: protected: Gtk::VPaned* historyVPaned; - Gtk::ScrolledWindow* hscrollw; Gtk::TreeView* hTreeView; Glib::RefPtr historyModel; @@ -93,6 +92,8 @@ protected: ParamsEdited defParamsEdited; int bmnum; + bool on_query_tooltip(int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip); + public: explicit History (bool bookmarkSupport = true); @@ -120,7 +121,7 @@ public: void addBookmarkPressed (); void delBookmarkPressed (); - void resized (Gtk::Allocation& req); + //void resized (Gtk::Allocation& req); void undo (); void redo (); diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index 68663ed7e..1bb1c23a3 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -32,7 +32,7 @@ extern Options options; ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunchanged(nullptr), icmplistener(nullptr), lastRefFilename(""), camName("") { - isBatchMode = lastToneCurve = lastApplyLookTable = lastApplyBaselineExposureOffset = lastApplyHueSatMap = lastBlendCMSMatrix = lastgamfree = false; + isBatchMode = lastToneCurve = lastApplyLookTable = lastApplyBaselineExposureOffset = lastApplyHueSatMap = lastgamfree = false; ipDialog = Gtk::manage (new MyFileChooserButton (M("TP_ICM_INPUTDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN)); ipDialog->set_tooltip_text (M("TP_ICM_INPUTCUSTOM_TOOLTIP")); @@ -43,28 +43,26 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch Gtk::Frame *iFrame = Gtk::manage (new Gtk::Frame(M("TP_ICM_INPUTPROFILE")) ); - iFrame->set_border_width(0); iFrame->set_label_align(0.025, 0.5); iVBox = Gtk::manage ( new Gtk::VBox()); - iVBox->set_border_width(4); iVBox->set_spacing(2); inone = Gtk::manage (new Gtk::RadioButton (M("TP_ICM_INPUTNONE"))); inone->set_tooltip_text (M("TP_ICM_INPUTNONE_TOOLTIP")); - iVBox->pack_start (*inone, Gtk::PACK_SHRINK, 2); + iVBox->pack_start (*inone, Gtk::PACK_SHRINK); iembedded = Gtk::manage (new Gtk::RadioButton (M("TP_ICM_INPUTEMBEDDED"))); iembedded->set_tooltip_text (M("TP_ICM_INPUTEMBEDDED_TOOLTIP")); - iVBox->pack_start (*iembedded, Gtk::PACK_SHRINK, 2); + iVBox->pack_start (*iembedded, Gtk::PACK_SHRINK); icamera = Gtk::manage (new Gtk::RadioButton (M("TP_ICM_INPUTCAMERA"))); icamera->set_tooltip_text (M("TP_ICM_INPUTCAMERA_TOOLTIP")); - iVBox->pack_start (*icamera, Gtk::PACK_SHRINK, 2); + iVBox->pack_start (*icamera, Gtk::PACK_SHRINK); icameraICC = Gtk::manage (new Gtk::RadioButton (M("TP_ICM_INPUTCAMERAICC"))); icameraICC->set_tooltip_text (M("TP_ICM_INPUTCAMERAICC_TOOLTIP")); - iVBox->pack_start (*icameraICC, Gtk::PACK_SHRINK, 2); + iVBox->pack_start (*icameraICC, Gtk::PACK_SHRINK); ifromfile = Gtk::manage (new Gtk::RadioButton (M("TP_ICM_INPUTCUSTOM") + ":")); Gtk::HBox* ffbox = Gtk::manage (new Gtk::HBox ()); @@ -72,7 +70,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch ffbox->pack_start (*ifromfile, Gtk::PACK_SHRINK); ffbox->pack_start (*ipDialog); - iVBox->pack_start (*ffbox, Gtk::PACK_SHRINK, 2); + iVBox->pack_start (*ffbox, Gtk::PACK_SHRINK); opts = icamera->get_group(); icameraICC->set_group (opts); @@ -81,110 +79,118 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch inone->set_group (opts); dcpFrame = Gtk::manage (new Gtk::Frame ("DCP")); - Gtk::VBox* dcpFrameVBox = Gtk::manage (new Gtk::VBox ()); - dcpFrameVBox->set_border_width(0); - dcpFrameVBox->set_spacing(2); - Gtk::HBox* dcpIllHBox = Gtk::manage (new Gtk::HBox ()); + Gtk::Grid* dcpGrid = Gtk::manage ( new Gtk::Grid()); + dcpGrid->set_column_homogeneous(false); + dcpGrid->set_row_homogeneous(false); + dcpGrid->set_column_spacing(2); + dcpGrid->set_row_spacing(2); + + Gtk::Grid* dcpIllGrid = Gtk::manage ( new Gtk::Grid()); + dcpIllGrid->set_column_homogeneous(false); + dcpIllGrid->set_row_homogeneous(false); + dcpIllGrid->set_column_spacing(2); + dcpIllGrid->set_row_spacing(2); + dcpIllLabel = Gtk::manage (new Gtk::Label (M("TP_ICM_DCPILLUMINANT") + ":")); + setExpandAlignProperties(dcpIllLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); dcpIllLabel->set_tooltip_text (M("TP_ICM_DCPILLUMINANT_TOOLTIP")); dcpIllLabel->show (); dcpIll = Gtk::manage (new MyComboBoxText ()); + setExpandAlignProperties(dcpIll, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); dcpIll->set_tooltip_text (M("TP_ICM_DCPILLUMINANT_TOOLTIP")); - dcpIll->append_text (M("TP_ICM_DCPILLUMINANT_INTERPOLATED")); - dcpIll->append_text (M("TP_ICM_DCPILLUMINANT") + " 1"); - dcpIll->append_text (M("TP_ICM_DCPILLUMINANT") + " 2"); + dcpIll->append (M("TP_ICM_DCPILLUMINANT_INTERPOLATED")); + dcpIll->append (M("TP_ICM_DCPILLUMINANT") + " 1"); + dcpIll->append (M("TP_ICM_DCPILLUMINANT") + " 2"); dcpIll->show (); dcpTemperatures[0] = 0; dcpTemperatures[1] = 0; - ignoreDcpSignal = true; - dcpIllHBox->pack_start(*dcpIllLabel, Gtk::PACK_SHRINK, 4); - dcpIllHBox->pack_start(*dcpIll); + dcpIllGrid->attach_next_to(*dcpIllLabel, Gtk::POS_LEFT, 1, 1); + dcpIllGrid->attach_next_to(*dcpIll, *dcpIllLabel, Gtk::POS_RIGHT, 1, 1); ckbToneCurve = Gtk::manage (new Gtk::CheckButton (M("TP_ICM_TONECURVE"))); ckbToneCurve->set_sensitive (false); ckbToneCurve->set_tooltip_text (M("TP_ICM_TONECURVE_TOOLTIP")); - ckbApplyHueSatMap = Gtk::manage (new Gtk::CheckButton (M("TP_ICM_APPLYHUESATMAP"))); - ckbApplyHueSatMap->set_sensitive (false); - ckbApplyHueSatMap->set_tooltip_text (M("TP_ICM_APPLYHUESATMAP_TOOLTIP")); + setExpandAlignProperties(ckbToneCurve, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); ckbApplyLookTable = Gtk::manage (new Gtk::CheckButton (M("TP_ICM_APPLYLOOKTABLE"))); ckbApplyLookTable->set_sensitive (false); ckbApplyLookTable->set_tooltip_text (M("TP_ICM_APPLYLOOKTABLE_TOOLTIP")); + setExpandAlignProperties(ckbApplyLookTable, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + + ckbApplyHueSatMap = Gtk::manage (new Gtk::CheckButton (M("TP_ICM_APPLYHUESATMAP"))); + ckbApplyHueSatMap->set_sensitive (false); + ckbApplyHueSatMap->set_tooltip_text (M("TP_ICM_APPLYHUESATMAP_TOOLTIP")); + setExpandAlignProperties(ckbApplyHueSatMap, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + ckbApplyBaselineExposureOffset = Gtk::manage (new Gtk::CheckButton (M("TP_ICM_APPLYBASELINEEXPOSUREOFFSET"))); ckbApplyBaselineExposureOffset->set_sensitive (false); ckbApplyBaselineExposureOffset->set_tooltip_text (M("TP_ICM_APPLYBASELINEEXPOSUREOFFSET_TOOLTIP")); + setExpandAlignProperties(ckbApplyBaselineExposureOffset, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); - dcpFrameVBox->pack_start(*dcpIllHBox, Gtk::PACK_SHRINK, 0); - dcpFrameVBox->pack_start(*ckbToneCurve, Gtk::PACK_SHRINK,0); - dcpFrameVBox->pack_start(*ckbApplyHueSatMap, Gtk::PACK_SHRINK,0); - dcpFrameVBox->pack_start(*ckbApplyLookTable, Gtk::PACK_SHRINK,0); - dcpFrameVBox->pack_start(*ckbApplyBaselineExposureOffset, Gtk::PACK_SHRINK,0); - dcpFrame->add(*dcpFrameVBox); + dcpGrid->attach_next_to(*dcpIllGrid, Gtk::POS_BOTTOM, 1, 1); + dcpGrid->attach_next_to(*ckbToneCurve, Gtk::POS_BOTTOM, 1, 1); + dcpGrid->attach_next_to(*ckbApplyHueSatMap, Gtk::POS_BOTTOM, 1, 1); + dcpGrid->attach_next_to(*ckbApplyLookTable, Gtk::POS_BOTTOM, 1, 1); + dcpGrid->attach_next_to(*ckbApplyBaselineExposureOffset, Gtk::POS_BOTTOM, 1, 1); + + dcpFrame->add(*dcpGrid); dcpFrame->set_sensitive(false); iVBox->pack_start (*dcpFrame); - ckbBlendCMSMatrix = Gtk::manage (new Gtk::CheckButton (M("TP_ICM_BLENDCMSMATRIX"))); - ckbBlendCMSMatrix->set_sensitive (false); - ckbBlendCMSMatrix->set_tooltip_text (M("TP_ICM_BLENDCMSMATRIX_TOOLTIP")); - // blend cms matrix no longer used - //iVBox->pack_start (*ckbBlendCMSMatrix, Gtk::PACK_SHRINK, 2); - saveRef = Gtk::manage (new Gtk::Button (M("TP_ICM_SAVEREFERENCE"))); saveRef->set_image (*Gtk::manage (new RTImage ("gtk-save-large.png"))); + saveRef->set_alignment (0.5f, 0.5f); saveRef->set_tooltip_markup (M("TP_ICM_SAVEREFERENCE_TOOLTIP")); - iVBox->pack_start (*saveRef, Gtk::PACK_SHRINK, 2); + iVBox->pack_start (*saveRef, Gtk::PACK_SHRINK); iFrame->add(*iVBox); - pack_start (*iFrame, Gtk::PACK_EXPAND_WIDGET, 4); + pack_start (*iFrame, Gtk::PACK_EXPAND_WIDGET); // ---------------------------- Working profile Gtk::Frame *wFrame = Gtk::manage (new Gtk::Frame(M("TP_ICM_WORKINGPROFILE")) ); - wFrame->set_border_width(0); wFrame->set_label_align(0.025, 0.5); Gtk::VBox *wVBox = Gtk::manage ( new Gtk::VBox()); - wVBox->set_border_width(4); + wVBox->set_spacing(2); wnames = Gtk::manage (new MyComboBoxText ()); wVBox->pack_start (*wnames, Gtk::PACK_SHRINK); - std::vector wpnames = rtengine::getWorkingProfiles (); + std::vector wpnames = rtengine::ICCStore::getWorkingProfiles(); for (size_t i = 0; i < wpnames.size(); i++) { - wnames->append_text (wpnames[i]); + wnames->append (wpnames[i]); } wnames->set_active (0); wFrame->add(*wVBox); - pack_start (*wFrame, Gtk::PACK_EXPAND_WIDGET, 4); + pack_start (*wFrame, Gtk::PACK_EXPAND_WIDGET); // ---------------------------- Output profile Gtk::Frame *oFrame = Gtk::manage (new Gtk::Frame(M("TP_ICM_OUTPUTPROFILE")) ); - oFrame->set_border_width(0); oFrame->set_label_align(0.025, 0.5); Gtk::VBox *oVBox = Gtk::manage ( new Gtk::VBox()); - oVBox->set_border_width(4); oVBox->set_spacing(2); onames = Gtk::manage (new MyComboBoxText ()); oVBox->pack_start (*onames, Gtk::PACK_SHRINK); - onames->append_text (M("TP_ICM_NOICM")); + onames->append (M("TP_ICM_NOICM")); onames->set_active (0); - std::vector opnames = iccStore->getProfiles (); + std::vector opnames = ICCStore::getInstance()->getProfiles (rtengine::ICCStore::ProfileType::OUTPUT); for (size_t i = 0; i < opnames.size(); i++) { - onames->append_text (opnames[i]); + onames->append (opnames[i]); } onames->set_active (0); @@ -193,7 +199,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch Gtk::HBox *riHBox = Gtk::manage ( new Gtk::HBox()); Gtk::Label* outputIntentLbl = Gtk::manage (new Gtk::Label(M("TP_ICM_PROFILEINTENT")+":")); riHBox->pack_start (*outputIntentLbl, Gtk::PACK_SHRINK); - ointent = Gtk::manage (new PopUpButton ()); + ointent.reset (new PopUpButton ()); ointent->addEntry("intent-perceptual.png", M("PREFERENCES_INTENT_PERCEPTUAL")); ointent->addEntry("intent-relative.png", M("PREFERENCES_INTENT_RELATIVE")); ointent->addEntry("intent-saturation.png", M("PREFERENCES_INTENT_SATURATION")); @@ -214,16 +220,16 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch Gtk::Label* galab = Gtk::manage (new Gtk::Label (M("TP_GAMMA_OUTPUT") + ":")); //galab->set_alignment (0.0, 0.5); - gaHBox->pack_start (*galab, Gtk::PACK_SHRINK, 4); + gaHBox->pack_start (*galab, Gtk::PACK_SHRINK); wgamma = Gtk::manage (new MyComboBoxText ()); gaHBox->pack_start (*wgamma, Gtk::PACK_EXPAND_WIDGET); - oVBox->pack_start(*gaHBox, Gtk::PACK_EXPAND_WIDGET, 2); + oVBox->pack_start(*gaHBox, Gtk::PACK_EXPAND_WIDGET); - std::vector wpgamma = rtengine::getGamma (); + std::vector wpgamma = rtengine::ICCStore::getGamma(); for (size_t i = 0; i < wpgamma.size(); i++) { - wgamma->append_text (wpgamma[i]); + wgamma->append (wpgamma[i]); } wgamma->set_active (0); @@ -231,8 +237,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch Gtk::Frame* fgFrame = Gtk::manage (new Gtk::Frame ()); Gtk::VBox *fgVBox = Gtk::manage ( new Gtk::VBox()); - fgVBox->set_spacing(0); - fgVBox->set_border_width(4); + fgVBox->set_spacing(2); freegamma = Gtk::manage(new Gtk::CheckButton((M("TP_GAMMA_FREE")))); freegamma->set_active (false); @@ -258,36 +263,36 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch fgVBox->pack_start( *slpos, Gtk::PACK_SHRINK);//slope fgFrame->add(*fgVBox); - oVBox->pack_start(*fgFrame, Gtk::PACK_EXPAND_WIDGET, 2); + oVBox->pack_start(*fgFrame, Gtk::PACK_EXPAND_WIDGET); oFrame->add(*oVBox); - pack_start (*oFrame, Gtk::PACK_EXPAND_WIDGET, 4); + pack_start (*oFrame, Gtk::PACK_EXPAND_WIDGET); // ---------------------------- Output gamma list entries - Gtk::FileFilter filter_icc; - filter_icc.set_name(M("FILECHOOSER_FILTER_COLPROF")); - filter_icc.add_pattern("*.dcp"); - filter_icc.add_pattern("*.DCP"); - filter_icc.add_pattern("*.icc"); - filter_icc.add_pattern("*.icm"); - filter_icc.add_pattern("*.ICC"); - filter_icc.add_pattern("*.ICM"); - Gtk::FileFilter filter_iccdng; - filter_iccdng.set_name(M("FILECHOOSER_FILTER_COLPROF") + " + DNG"); - filter_iccdng.add_pattern("*.dcp"); - filter_iccdng.add_pattern("*.DCP"); - filter_iccdng.add_pattern("*.dng"); - filter_iccdng.add_pattern("*.DNG"); - filter_iccdng.add_pattern("*.icc"); - filter_iccdng.add_pattern("*.icm"); - filter_iccdng.add_pattern("*.ICC"); - filter_iccdng.add_pattern("*.ICM"); - Gtk::FileFilter filter_any; - filter_any.set_name(M("FILECHOOSER_FILTER_ANY")); - filter_any.add_pattern("*"); + Glib::RefPtr filter_icc = Gtk::FileFilter::create(); + filter_icc->set_name(M("FILECHOOSER_FILTER_COLPROF")); + filter_icc->add_pattern("*.dcp"); + filter_icc->add_pattern("*.DCP"); + filter_icc->add_pattern("*.icc"); + filter_icc->add_pattern("*.icm"); + filter_icc->add_pattern("*.ICC"); + filter_icc->add_pattern("*.ICM"); + Glib::RefPtr filter_iccdng = Gtk::FileFilter::create(); + filter_iccdng->set_name(M("FILECHOOSER_FILTER_COLPROF") + " + DNG"); + filter_iccdng->add_pattern("*.dcp"); + filter_iccdng->add_pattern("*.DCP"); + filter_iccdng->add_pattern("*.dng"); + filter_iccdng->add_pattern("*.DNG"); + filter_iccdng->add_pattern("*.icc"); + filter_iccdng->add_pattern("*.icm"); + filter_iccdng->add_pattern("*.ICC"); + filter_iccdng->add_pattern("*.ICM"); + Glib::RefPtr filter_any = Gtk::FileFilter::create(); + filter_any->set_name(M("FILECHOOSER_FILTER_ANY")); + filter_any->add_pattern("*"); ipDialog->add_filter (filter_icc); ipDialog->add_filter (filter_iccdng); @@ -295,11 +300,11 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch oldip = ""; - wnames->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::wpChanged) ); - onames->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::opChanged) ); - ointent->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::oiChanged) ); - wgamma->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::gpChanged) ); - dcpIll->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::dcpIlluminantChanged) ); + wnamesconn = wnames->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::wpChanged) ); + onamesconn = onames->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::opChanged) ); + ointentconn = ointent->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::oiChanged) ); + wgammaconn = wgamma->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::gpChanged) ); + dcpillconn = dcpIll->signal_changed().connect( sigc::mem_fun(*this, &ICMPanel::dcpIlluminantChanged) ); obpcconn = obpc->signal_toggled().connect( sigc::mem_fun(*this, &ICMPanel::oBPCChanged) ); gamcsconn = freegamma->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::GamChanged)); @@ -307,7 +312,6 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch ltableconn = ckbApplyLookTable->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::applyLookTableChanged)); beoconn = ckbApplyBaselineExposureOffset->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::applyBaselineExposureOffsetChanged)); hsmconn = ckbApplyHueSatMap->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::applyHueSatMapChanged)); - blendcmsconn = ckbBlendCMSMatrix->signal_toggled().connect ( sigc::mem_fun(*this, &ICMPanel::blendCMSMatrixChanged)); icamera->signal_toggled().connect( sigc::mem_fun(*this, &ICMPanel::ipChanged) ); icameraICC->signal_toggled().connect( sigc::mem_fun(*this, &ICMPanel::ipChanged) ); @@ -321,7 +325,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch } void ICMPanel::updateRenderingIntent (const Glib::ustring &profile) { - const uint8_t supportedIntents = rtengine::iccStore->getOutputIntents (profile); + const uint8_t supportedIntents = rtengine::ICCStore::getInstance()->getOutputIntents (profile); const bool supportsPerceptual = supportedIntents & 1 << INTENT_PERCEPTUAL; const bool supportsRelative = supportedIntents & 1 << INTENT_RELATIVE_COLORIMETRIC; const bool supportsSaturation = supportedIntents & 1 << INTENT_SATURATION; @@ -347,6 +351,7 @@ void ICMPanel::updateRenderingIntent (const Glib::ustring &profile) { void ICMPanel::updateDCP (int dcpIlluminant, Glib::ustring dcp_name) { + ConnectionBlocker dcpillconn_(dcpillconn); if (isBatchMode) { dcpFrame->set_sensitive(true); @@ -359,16 +364,14 @@ void ICMPanel::updateDCP (int dcpIlluminant, Glib::ustring dcp_name) if (dcpTemperatures[0] != 0 || dcpTemperatures[1] != 0) { int curr_active = dcpIll->get_active_row_number(); - ignoreDcpSignal = true; - dcpIll->clear_items (); - dcpIll->append_text (M("TP_ICM_DCPILLUMINANT_INTERPOLATED")); - dcpIll->append_text (M("TP_ICM_DCPILLUMINANT") + " 1"); - dcpIll->append_text (M("TP_ICM_DCPILLUMINANT") + " 2"); - dcpIll->append_text (M("GENERAL_UNCHANGED")); + dcpIll->remove_all (); + dcpIll->append (M("TP_ICM_DCPILLUMINANT_INTERPOLATED")); + dcpIll->append (M("TP_ICM_DCPILLUMINANT") + " 1"); + dcpIll->append (M("TP_ICM_DCPILLUMINANT") + " 2"); + dcpIll->append (M("GENERAL_UNCHANGED")); dcpTemperatures[0] = 0; dcpTemperatures[1] = 0; dcpIll->set_active (curr_active); - ignoreDcpSignal = false; } if (dcpIll->get_active_row_number() == -1 && dcpIlluminant == -1) { @@ -425,15 +428,13 @@ void ICMPanel::updateDCP (int dcpIlluminant, Glib::ustring dcp_name) sprintf(tempstr1, "%.0fK", illuminants.temperature_1); sprintf(tempstr2, "%.0fK", illuminants.temperature_2); int curr_active = dcpIll->get_active_row_number(); - ignoreDcpSignal = true; - dcpIll->clear_items (); - dcpIll->append_text (M("TP_ICM_DCPILLUMINANT_INTERPOLATED")); - dcpIll->append_text (tempstr1); - dcpIll->append_text (tempstr2); + dcpIll->remove_all (); + dcpIll->append (M("TP_ICM_DCPILLUMINANT_INTERPOLATED")); + dcpIll->append (tempstr1); + dcpIll->append (tempstr2); dcpTemperatures[0] = illuminants.temperature_1; dcpTemperatures[1] = illuminants.temperature_2; dcpIll->set_active (curr_active); - ignoreDcpSignal = false; } if (dcpIlluminant > 2) { @@ -441,22 +442,16 @@ void ICMPanel::updateDCP (int dcpIlluminant, Glib::ustring dcp_name) } if (dcpIll->get_active_row_number() == -1 && dcpIlluminant == -1) { - ignoreDcpSignal = true; dcpIll->set_active(0); - ignoreDcpSignal = false; } else if (dcpIlluminant >= 0 && dcpIlluminant != dcpIll->get_active_row_number()) { - ignoreDcpSignal = true; dcpIll->set_active(dcpIlluminant); - ignoreDcpSignal = false; } dcpIll->set_sensitive (true); dcpIllLabel->set_sensitive (true); } else { if (dcpIll->get_active_row_number() != -1) { - ignoreDcpSignal = true; dcpIll->set_active(-1); - ignoreDcpSignal = false; } } } @@ -464,20 +459,18 @@ void ICMPanel::updateDCP (int dcpIlluminant, Glib::ustring dcp_name) if (!dcpIllLabel->get_sensitive() && dcpIll->get_active_row_number() != 0) { if (dcpTemperatures[0] != 0 || dcpTemperatures[1] != 0) { int curr_active = dcpIll->get_active_row_number(); - ignoreDcpSignal = true; - dcpIll->clear_items (); - dcpIll->append_text (M("TP_ICM_DCPILLUMINANT_INTERPOLATED")); - dcpIll->append_text (M("TP_ICM_DCPILLUMINANT") + " 1"); - dcpIll->append_text (M("TP_ICM_DCPILLUMINANT") + " 2"); + dcpIll->remove_all (); + dcpIll->append (M("TP_ICM_DCPILLUMINANT_INTERPOLATED")); + dcpIll->append (M("TP_ICM_DCPILLUMINANT") + " 1"); + dcpIll->append (M("TP_ICM_DCPILLUMINANT") + " 2"); if (isBatchMode) { - dcpIll->append_text (M("GENERAL_UNCHANGED")); + dcpIll->append (M("GENERAL_UNCHANGED")); } dcpTemperatures[0] = 0; dcpTemperatures[1] = 0; dcpIll->set_active (curr_active); - ignoreDcpSignal = false; } } } @@ -487,14 +480,18 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) disableListener (); - obpcconn.block (true); - ipc.block (true); - gamcsconn.block (true); - tcurveconn.block(true); - ltableconn.block(true); - beoconn.block(true); - hsmconn.block(true); - blendcmsconn.block(true); + ConnectionBlocker obpcconn_(obpcconn); + ConnectionBlocker ipc_(ipc); + ConnectionBlocker gamcsconn_(gamcsconn); + ConnectionBlocker tcurveconn_(tcurveconn); + ConnectionBlocker ltableconn_(ltableconn); + ConnectionBlocker beoconn_(beoconn); + ConnectionBlocker hsmconn_(hsmconn); + ConnectionBlocker wnamesconn_(wnamesconn); + ConnectionBlocker onamesconn_(onamesconn); + ConnectionBlocker ointentconn_(ointentconn); + ConnectionBlocker wgammaconn_(wgammaconn); + ConnectionBlocker dcpillconn_(dcpillconn); if(pp->icm.input.substr(0, 5) != "file:" && !ipDialog->get_filename().empty()) { ipDialog->set_filename(pp->icm.input); @@ -502,50 +499,29 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) if (pp->icm.input == "(none)") { inone->set_active (true); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (false); - } updateDCP(pp->icm.dcpIlluminant, ""); } else if (pp->icm.input == "(embedded)" || ((pp->icm.input == "(camera)" || pp->icm.input == "") && icamera->get_state() == Gtk::STATE_INSENSITIVE)) { iembedded->set_active (true); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (false); - } updateDCP(pp->icm.dcpIlluminant, ""); } else if ((pp->icm.input == "(cameraICC)") && icameraICC->get_state() != Gtk::STATE_INSENSITIVE) { icameraICC->set_active (true); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (true); - } updateDCP(pp->icm.dcpIlluminant, "(cameraICC)"); } else if ((pp->icm.input == "(cameraICC)") && icamera->get_state() != Gtk::STATE_INSENSITIVE && icameraICC->get_state() == Gtk::STATE_INSENSITIVE) { // this is the case when (cameraICC) is instructed by packaged profiles, but ICC file is not found // therefore falling back UI to explicitly reflect the (camera) option icamera->set_active (true); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (false); - } updateDCP(pp->icm.dcpIlluminant, ""); } else if ((pp->icm.input == "(cameraICC)") && icamera->get_state() == Gtk::STATE_INSENSITIVE && icameraICC->get_state() == Gtk::STATE_INSENSITIVE) { // If neither (camera) nor (cameraICC) are available, as is the case when loading a non-raw, activate (embedded). iembedded->set_active (true); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (false); - } updateDCP(pp->icm.dcpIlluminant, "(cameraICC)"); } else if ((pp->icm.input == "(camera)" || pp->icm.input == "") && icamera->get_state() != Gtk::STATE_INSENSITIVE) { icamera->set_active (true); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (false); - } updateDCP(pp->icm.dcpIlluminant, ""); } else { ifromfile->set_active (true); oldip = pp->icm.input.substr(5); // cut of "file:" ipDialog->set_filename (pp->icm.input.substr(5)); - if (!batchMode) { - ckbBlendCMSMatrix->set_sensitive (true); - } updateDCP(pp->icm.dcpIlluminant, pp->icm.input.substr(5)); } @@ -573,9 +549,6 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) ckbApplyHueSatMap->set_active (pp->icm.applyHueSatMap); lastApplyHueSatMap = pp->icm.applyHueSatMap; - ckbBlendCMSMatrix->set_active (pp->icm.blendCMSMatrix); - lastBlendCMSMatrix = pp->icm.blendCMSMatrix; - freegamma->set_active (pp->icm.freegamma); lastgamfree = pp->icm.freegamma; @@ -597,7 +570,6 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) ckbApplyLookTable->set_inconsistent(!pedited->icm.applyLookTable); ckbApplyBaselineExposureOffset->set_inconsistent(!pedited->icm.applyBaselineExposureOffset); ckbApplyHueSatMap->set_inconsistent(!pedited->icm.applyHueSatMap); - ckbBlendCMSMatrix->set_inconsistent(!pedited->icm.blendCMSMatrix); freegamma->set_inconsistent (!pedited->icm.freegamma); if (!pedited->icm.working) { @@ -626,15 +598,6 @@ void ICMPanel::read (const ProcParams* pp, const ParamsEdited* pedited) } - blendcmsconn.block(false); - tcurveconn.block(false); - ltableconn.block(false); - beoconn.block(false); - hsmconn.block(false); - gamcsconn.block (false); - ipc.block (false); - obpcconn.block (false); - enableListener (); } @@ -661,11 +624,7 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) pp->icm.working = wnames->get_active_text (); pp->icm.gamma = wgamma->get_active_text (); - pp->icm.dcpIlluminant = dcpIll->get_active_row_number(); - - if (pp->icm.dcpIlluminant < 0) { - pp->icm.dcpIlluminant = 0; - } + pp->icm.dcpIlluminant = rtengine::max(dcpIll->get_active_row_number(), 0); if (onames->get_active_text() == M("TP_ICM_NOICM")) { pp->icm.output = ColorManagementParams::NoICMString; @@ -681,34 +640,10 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) } pp->icm.freegamma = freegamma->get_active(); - - DCPProfile* dcp = nullptr; - - if (ifromfile->get_active() && pp->icm.input.substr(0, 5) == "file:" && DCPStore::getInstance()->isValidDCPFileName(pp->icm.input.substr(5))) { - dcp = DCPStore::getInstance()->getProfile(pp->icm.input.substr(5)); - } else if(icameraICC->get_active()) { - dcp = DCPStore::getInstance()->getStdProfile(camName); - } - - if (dcp) { - if (dcp->getHasToneCurve()) { - pp->icm.toneCurve = ckbToneCurve->get_active (); - } - - if (dcp->getHasLookTable()) { - pp->icm.applyLookTable = ckbApplyLookTable->get_active (); - } - - if (dcp->getHasBaselineExposureOffset()) { - pp->icm.applyBaselineExposureOffset = ckbApplyBaselineExposureOffset->get_active (); - } - - if (dcp->getHasHueSatMap()) { - pp->icm.applyHueSatMap = ckbApplyHueSatMap->get_active (); - } - } - - pp->icm.blendCMSMatrix = ckbBlendCMSMatrix->get_active (); + pp->icm.toneCurve = ckbToneCurve->get_active (); + pp->icm.applyLookTable = ckbApplyLookTable->get_active (); + pp->icm.applyBaselineExposureOffset = ckbApplyBaselineExposureOffset->get_active (); + pp->icm.applyHueSatMap = ckbApplyHueSatMap->get_active (); pp->icm.gampos = (double) gampos->getValue(); pp->icm.slpos = (double) slpos->getValue(); pp->icm.outputBPC = obpc->get_active (); @@ -724,7 +659,6 @@ void ICMPanel::write (ProcParams* pp, ParamsEdited* pedited) pedited->icm.applyLookTable = !ckbApplyLookTable->get_inconsistent (); pedited->icm.applyBaselineExposureOffset = !ckbApplyBaselineExposureOffset->get_inconsistent (); pedited->icm.applyHueSatMap = !ckbApplyHueSatMap->get_inconsistent (); - pedited->icm.blendCMSMatrix = !ckbBlendCMSMatrix->get_inconsistent (); pedited->icm.gamma = wgamma->get_active_text() != M("GENERAL_UNCHANGED"); pedited->icm.freegamma = !freegamma->get_inconsistent(); pedited->icm.gampos = gampos->getEditedState (); @@ -786,7 +720,7 @@ void ICMPanel::gpChanged () void ICMPanel::dcpIlluminantChanged() { - if (listener && !ignoreDcpSignal) { + if (listener) { listener->panelChanged (EvDCPIlluminant, dcpIll->get_active_text ()); } } @@ -902,19 +836,14 @@ void ICMPanel::ipChanged () if (inone->get_active()) { profname = "(none)"; - ckbBlendCMSMatrix->set_sensitive(false); } else if (iembedded->get_active ()) { profname = "(embedded)"; - ckbBlendCMSMatrix->set_sensitive(false); } else if (icamera->get_active ()) { profname = "(camera)"; - ckbBlendCMSMatrix->set_sensitive(false); } else if (icameraICC->get_active ()) { profname = "(cameraICC)"; - ckbBlendCMSMatrix->set_sensitive(true); } else { profname = ipDialog->get_filename (); - ckbBlendCMSMatrix->set_sensitive(true); } updateDCP(-1, profname); @@ -926,32 +855,6 @@ void ICMPanel::ipChanged () oldip = profname; } -void ICMPanel::blendCMSMatrixChanged() -{ - if (multiImage) { - if (ckbBlendCMSMatrix->get_inconsistent()) { - ckbBlendCMSMatrix->set_inconsistent (false); - blendcmsconn.block (true); - ckbBlendCMSMatrix->set_active (false); - blendcmsconn.block (false); - } else if (lastBlendCMSMatrix) { - ckbBlendCMSMatrix->set_inconsistent (true); - } - - lastBlendCMSMatrix = ckbBlendCMSMatrix->get_active (); - } - - if (listener) { - if (ckbBlendCMSMatrix->get_inconsistent()) { - listener->panelChanged (EvBlendCMSMatrix, M("GENERAL_UNCHANGED")); - } else if (ckbBlendCMSMatrix->get_active()) { - listener->panelChanged (EvBlendCMSMatrix, M("GENERAL_ENABLED")); - } else { - listener->panelChanged (EvBlendCMSMatrix, M("GENERAL_DISABLED")); - } - } -} - void ICMPanel::GamChanged() { if (multiImage) { @@ -1064,7 +967,7 @@ void ICMPanel::setRawMeta (bool raw, const rtengine::ImageData* pMeta) iembedded->set_active (!raw); icamera->set_sensitive (raw); camName = pMeta->getCamera(); - icameraICC->set_sensitive (raw && (iccStore->getStdProfile(pMeta->getCamera()) != nullptr || DCPStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr)); + icameraICC->set_sensitive (raw && (ICCStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr || DCPStore::getInstance()->getStdProfile(pMeta->getCamera()) != nullptr)); iembedded->set_sensitive (!raw); enableListener (); @@ -1091,25 +994,25 @@ void ICMPanel::saveReferencePressed () bindCurrentFolder (dialog, options.lastProfilingReferenceDir); dialog.set_current_name (lastRefFilename); - dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL); - dialog.add_button(Gtk::StockID("gtk-save"), Gtk::RESPONSE_OK); + dialog.add_button(M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); + dialog.add_button(M("GENERAL_SAVE"), Gtk::RESPONSE_OK); Gtk::CheckButton applyWB(M("TP_ICM_SAVEREFERENCE_APPLYWB")); applyWB.set_tooltip_text (M("TP_ICM_SAVEREFERENCE_APPLYWB_TOOLTIP")); Gtk::HBox* hbox = Gtk::manage( new Gtk::HBox() ); hbox->pack_end(applyWB, Gtk::PACK_SHRINK, 2); - Gtk::VBox *vbox = dialog.get_vbox(); - vbox->pack_end(*hbox, Gtk::PACK_SHRINK, 2); + Gtk::Box *box = dialog.get_content_area(); + box->pack_end(*hbox, Gtk::PACK_SHRINK, 2); - Gtk::FileFilter filter_tif; - filter_tif.set_name(M("FILECHOOSER_FILTER_TIFF")); - filter_tif.add_pattern("*.tif"); - filter_tif.add_pattern("*.tiff"); + Glib::RefPtr filter_tif = Gtk::FileFilter::create(); + filter_tif->set_name(M("FILECHOOSER_FILTER_TIFF")); + filter_tif->add_pattern("*.tif"); + filter_tif->add_pattern("*.tiff"); dialog.add_filter(filter_tif); - Gtk::FileFilter filter_any; - filter_any.set_name(M("FILECHOOSER_FILTER_ANY")); - filter_any.add_pattern("*"); + Glib::RefPtr filter_any = Gtk::FileFilter::create(); + filter_any->set_name(M("FILECHOOSER_FILTER_ANY")); + filter_any->add_pattern("*"); dialog.add_filter(filter_any); dialog.show_all_children(); @@ -1145,19 +1048,18 @@ void ICMPanel::setBatchMode (bool batchMode) { isBatchMode = true; - ignoreDcpSignal = false; ToolPanel::setBatchMode (batchMode); iunchanged = Gtk::manage (new Gtk::RadioButton (M("GENERAL_UNCHANGED"))); iunchanged->set_group (opts); iVBox->pack_start (*iunchanged, Gtk::PACK_SHRINK, 4); iVBox->reorder_child (*iunchanged, 5); removeIfThere (this, saveRef); - onames->append_text (M("GENERAL_UNCHANGED")); + onames->append (M("GENERAL_UNCHANGED")); ointent->addEntry("unchanged-22.png", M("GENERAL_UNCHANGED")); ointent->show(); - wnames->append_text (M("GENERAL_UNCHANGED")); - wgamma->append_text (M("GENERAL_UNCHANGED")); - dcpIll->append_text (M("GENERAL_UNCHANGED")); + wnames->append (M("GENERAL_UNCHANGED")); + wgamma->append (M("GENERAL_UNCHANGED")); + dcpIll->append (M("GENERAL_UNCHANGED")); gampos->showEditedCB (); slpos->showEditedCB (); } diff --git a/rtgui/icmpanel.h b/rtgui/icmpanel.h index caab1771f..35017bed4 100644 --- a/rtgui/icmpanel.h +++ b/rtgui/icmpanel.h @@ -56,9 +56,7 @@ protected: sigc::connection hsmconn; bool lastobpc; sigc::connection obpcconn; - bool lastBlendCMSMatrix; bool isBatchMode; - sigc::connection blendcmsconn; private: Gtk::VBox * iVBox; @@ -73,18 +71,20 @@ private: Gtk::RadioButton* ifromfile; Gtk::Label* dcpIllLabel; MyComboBoxText* dcpIll; + sigc::connection dcpillconn; Gtk::CheckButton* ckbToneCurve; Gtk::CheckButton* ckbApplyLookTable; Gtk::CheckButton* ckbApplyBaselineExposureOffset; Gtk::CheckButton* ckbApplyHueSatMap; - Gtk::CheckButton* ckbBlendCMSMatrix; MyComboBoxText* wnames; + sigc::connection wnamesconn; MyComboBoxText* wgamma; + sigc::connection wgammaconn; MyComboBoxText* onames; - PopUpButton* ointent; - Gtk::RadioButton* ofromdir; - Gtk::RadioButton* ofromfile; + sigc::connection onamesconn; + std::unique_ptr ointent; + sigc::connection ointentconn; Gtk::RadioButton* iunchanged; MyFileChooserButton* ipDialog; Gtk::RadioButton::Group opts; @@ -93,9 +93,7 @@ private: Glib::ustring oldip; ICMPanelListener* icmplistener; - bool ignoreDcpSignal; double dcpTemperatures[2]; - bool enableLastICCWorkDirChange; Glib::ustring lastRefFilename; Glib::ustring camName; void updateDCP(int dcpIlluminant, Glib::ustring dcp_name); @@ -118,7 +116,6 @@ public: void gpChanged (); void GamChanged (); void ipSelectionChanged (); - void blendCMSMatrixChanged(); void dcpIlluminantChanged(); void toneCurveChanged(); void applyLookTableChanged(); diff --git a/rtgui/ilabel.cc b/rtgui/ilabel.cc index 2c7edfd80..65040b93b 100644 --- a/rtgui/ilabel.cc +++ b/rtgui/ilabel.cc @@ -33,27 +33,29 @@ void ILabel::on_realize() set_size_request (2 + labw, 2 + labh); } -bool ILabel::on_expose_event (GdkEventExpose* event) +bool ILabel::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) { - Glib::RefPtr style = get_style (); - Glib::RefPtr window = get_window(); - Glib::RefPtr gc_ = style->get_bg_gc(get_state()); - Cairo::RefPtr cr = window->create_cairo_context(); + Glib::RefPtr style = get_style_context (); - Gdk::Color c = style->get_fg (get_state()); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + Gtk::StateFlags state = get_state_flags(); + Gdk::RGBA c = style->get_background_color(state); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->rectangle (0, 0, get_width (), get_height()); cr->fill (); Glib::RefPtr fn = create_pango_layout (label); fn->set_markup (label); - window->draw_layout(gc_, 1, 1, fn); + cr->move_to(1., 1.); + fn->add_to_cairo_context(cr); + c = style->get_color (state); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->fill(); return true; } -void ILabel::on_style_changed (const Glib::RefPtr& style) +void ILabel::on_style_updated () { Glib::RefPtr fn = create_pango_layout(label); diff --git a/rtgui/ilabel.h b/rtgui/ilabel.h index 82064bd23..26b29061f 100644 --- a/rtgui/ilabel.h +++ b/rtgui/ilabel.h @@ -28,9 +28,9 @@ class ILabel : public Gtk::DrawingArea public: explicit ILabel (const Glib::ustring &lab); - bool on_expose_event(GdkEventExpose* event); + bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr); void on_realize(); - void on_style_changed (const Glib::RefPtr& style); + void on_style_updated (); }; #endif diff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc index a8bee4fb3..c0d334482 100644 --- a/rtgui/imagearea.cc +++ b/rtgui/imagearea.cc @@ -25,7 +25,7 @@ #include "../rtengine/refreshmap.h" #include "options.h" -ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), firstOpen(true) +ImageArea::ImageArea (ImageAreaPanel* p) : parent(p), firstOpen(true), fullImageWidth(0), fullImageHeight(0) { infotext = ""; @@ -136,7 +136,7 @@ void ImageArea::setPreviewHandler (PreviewHandler* ph) previewHandler = ph; } -void ImageArea::on_style_changed (const Glib::RefPtr& style) +void ImageArea::on_style_updated () { // TODO: notify all crop windows that the style has been changed @@ -149,11 +149,11 @@ void ImageArea::setInfoText (Glib::ustring text) infotext = text; Glib::RefPtr context = get_pango_context () ; - Pango::FontDescription fontd(get_default_style()->get_font()); + Pango::FontDescription fontd(get_style_context()->get_font()); // update font fontd.set_weight (Pango::WEIGHT_BOLD); - fontd.set_size (9 * Pango::SCALE); + fontd.set_size (10 * Pango::SCALE); context->set_font_description (fontd); // create text layout @@ -225,15 +225,17 @@ void ImageArea::switchPickerVisibility (bool isVisible) redraw(); } -bool ImageArea::on_expose_event(GdkEventExpose* event) +bool ImageArea::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) { dirty = false; + /* HOMBRE: How do we replace that?? + if (event->count) { return true; } - Cairo::RefPtr cr = get_window()->create_cairo_context(); + */ if (mainCropWindow) { mainCropWindow->expose (cr); @@ -737,3 +739,31 @@ int ImageArea::getSpotWBRectSize () return 1; } } + +Gtk::SizeRequestMode ImageArea::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_CONSTANT_SIZE; +} + +void ImageArea::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const +{ + minimum_height= 50; + natural_height = 300; +} + +void ImageArea::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + minimum_width = 100; + natural_width = 400; +} + +void ImageArea::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + get_preferred_height_vfunc(minimum_height, natural_height); +} + +void ImageArea::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + get_preferred_width_vfunc (minimum_width, natural_width); +} + diff --git a/rtgui/imagearea.h b/rtgui/imagearea.h index 24a296913..91820beb1 100644 --- a/rtgui/imagearea.h +++ b/rtgui/imagearea.h @@ -59,6 +59,12 @@ protected: ImageAreaToolListener* listener; CropWindow* getCropWindow (int x, int y); + Gtk::SizeRequestMode get_request_mode_vfunc () const; + void get_preferred_height_vfunc (int &minimum_height, int &natural_height) const; + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; + bool firstOpen; int fullImageWidth, fullImageHeight; public: @@ -93,14 +99,14 @@ public: // widget base events void on_realize (); - bool on_expose_event (GdkEventExpose* event); + bool on_draw (const ::Cairo::RefPtr< Cairo::Context> &cr); bool on_motion_notify_event (GdkEventMotion* event); bool on_button_press_event (GdkEventButton* event); bool on_button_release_event (GdkEventButton* event); bool on_scroll_event (GdkEventScroll* event); bool on_leave_notify_event (GdkEventCrossing* event); void on_resized (Gtk::Allocation& req); - void on_style_changed (const Glib::RefPtr& style); + void on_style_updated (); void syncBeforeAfterViews (); void setCropGUIListener (CropGUIListener* l); diff --git a/rtgui/imageareapanel.cc b/rtgui/imageareapanel.cc index 7bcb3d112..b0e680ade 100644 --- a/rtgui/imageareapanel.cc +++ b/rtgui/imageareapanel.cc @@ -21,8 +21,6 @@ ImageAreaPanel::ImageAreaPanel () : before(nullptr), after(nullptr) { - set_border_width (2); - imageArea = new ImageArea (this); Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ()); diff --git a/rtgui/indclippedpanel.cc b/rtgui/indclippedpanel.cc index 2a3330b5c..72180b31a 100644 --- a/rtgui/indclippedpanel.cc +++ b/rtgui/indclippedpanel.cc @@ -51,8 +51,8 @@ IndicateClippedPanel::IndicateClippedPanel (ImageArea* ia) : imageArea(ia) indclippedh->set_active (options.showClippedHighlights); indclippeds->set_active (options.showClippedShadows); - pack_start (*indclippedh, Gtk::PACK_SHRINK, 0); pack_start (*indclippeds, Gtk::PACK_SHRINK, 0); + pack_start (*indclippedh, Gtk::PACK_SHRINK, 0); indclippedh->signal_toggled().connect( sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled) ); indclippeds->signal_toggled().connect( sigc::mem_fun(*this, &IndicateClippedPanel::buttonToggled) ); diff --git a/rtgui/inspector.cc b/rtgui/inspector.cc index 3909195b6..8af99b2ab 100644 --- a/rtgui/inspector.cc +++ b/rtgui/inspector.cc @@ -56,39 +56,43 @@ InspectorBuffer::~InspectorBuffer() { } */ -int InspectorBuffer::infoFromImage (const Glib::ustring& fname) +//int InspectorBuffer::infoFromImage (const Glib::ustring& fname) +//{ +// +// rtengine::ImageMetaData* idata = rtengine::ImageMetaData::fromFile (fname, nullptr); +// +// if (!idata) { +// return 0; +// } +// +// int deg = 0; +// +// if (idata->hasExif()) { +// if (idata->getOrientation() == "Rotate 90 CW" ) { +// deg = 90; +// } else if (idata->getOrientation() == "Rotate 180" ) { +// deg = 180; +// } else if (idata->getOrientation() == "Rotate 270 CW") { +// deg = 270; +// } +// } +// +// delete idata; +// return deg; +//} + +Inspector::Inspector () : currImage(nullptr), zoom(0.0), active(false) { - - rtengine::ImageMetaData* idata = rtengine::ImageMetaData::fromFile (fname, nullptr); - - if (!idata) { - return 0; - } - - int deg = 0; - - if (idata->hasExif()) { - if (idata->getOrientation() == "Rotate 90 CW" ) { - deg = 90; - } else if (idata->getOrientation() == "Rotate 180" ) { - deg = 180; - } else if (idata->getOrientation() == "Rotate 270 CW") { - deg = 270; - } - } - - delete idata; - return deg; + Glib::RefPtr style = get_style_context(); + set_name("Inspector"); } -Inspector::Inspector () : currImage(nullptr), zoom(0.0), active(false) {} - Inspector::~Inspector() { deleteBuffers(); } -bool Inspector::on_expose_event (GdkEventExpose* event) +bool Inspector::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) { Glib::RefPtr win = get_window(); @@ -113,7 +117,8 @@ bool Inspector::on_expose_event (GdkEventExpose* event) rtengine::Coord topLeft; rtengine::Coord displayedSize; rtengine::Coord dest(0, 0); - win->get_size(availableSize.x, availableSize.y); + availableSize.x = win->get_width(); + availableSize.y = win->get_height(); int imW = currImage->imgBuffer.getWidth(); int imH = currImage->imgBuffer.getHeight(); @@ -157,22 +162,25 @@ bool Inspector::on_expose_event (GdkEventExpose* event) // Draw! - Gdk::Color c; - Cairo::RefPtr cr = win->create_cairo_context(); - Glib::RefPtr style = get_style(); + Gdk::RGBA c; + Glib::RefPtr style = get_style_context(); // draw the background - c = style->get_bg (Gtk::STATE_NORMAL); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + style->render_background(cr, 0, 0, get_width(), get_height()); + + /* --- old method + c = style->get_background_color (Gtk::STATE_FLAG_NORMAL); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->set_line_width (0); cr->rectangle (0, 0, availableSize.x, availableSize.y); cr->fill (); + */ currImage->imgBuffer.copySurface(win); // draw the frame - c = style->get_fg (Gtk::STATE_NORMAL); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + c = style->get_border_color (Gtk::STATE_FLAG_NORMAL); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->set_line_width (1); cr->rectangle (0.5, 0.5, availableSize.x - 1, availableSize.y - 1); cr->stroke (); @@ -251,6 +259,7 @@ void Inspector::switchImage (const Glib::ustring &fullPath) images.push_back(iBuffer); currImage = images.at(images.size() - 1); } else { + delete iBuffer; currImage = nullptr; } } @@ -288,3 +297,31 @@ void Inspector::setActive(bool state) active = state; } + +Gtk::SizeRequestMode Inspector::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_CONSTANT_SIZE; +} + +void Inspector::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const +{ + minimum_height= 50; + natural_height = 300; +} + +void Inspector::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + minimum_width = 50; + natural_width = 200; +} + +void Inspector::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + get_preferred_height_vfunc(minimum_height, natural_height); +} + +void Inspector::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + get_preferred_width_vfunc (minimum_width, natural_width); +} + diff --git a/rtgui/inspector.h b/rtgui/inspector.h index 4d275abd5..f68912dc1 100644 --- a/rtgui/inspector.h +++ b/rtgui/inspector.h @@ -25,8 +25,8 @@ class InspectorBuffer { -private: - int infoFromImage (const Glib::ustring& fname); +//private: +// int infoFromImage (const Glib::ustring& fname); public: BackBuffer imgBuffer; @@ -48,7 +48,7 @@ private: double zoom; bool active; - bool on_expose_event (GdkEventExpose* event); + bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr); void deleteBuffers(); public: @@ -86,6 +86,13 @@ public: { return active; }; + + Gtk::SizeRequestMode get_request_mode_vfunc () const; + void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const; + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; + }; #endif diff --git a/rtgui/iptcpanel.cc b/rtgui/iptcpanel.cc index 3a9b3e81c..5ee533e2c 100644 --- a/rtgui/iptcpanel.cc +++ b/rtgui/iptcpanel.cc @@ -20,276 +20,342 @@ #include "clipboard.h" #include "rtimage.h" -extern Glib::ustring argv0; - using namespace rtengine; using namespace rtengine::procparams; IPTCPanel::IPTCPanel () { - set_border_width (2); + set_spacing (4); - Gtk::Table* iptc = Gtk::manage( new Gtk::Table (27, 2) ); + Gtk::Grid* iptc = Gtk::manage( new Gtk::Grid () ); + setExpandAlignProperties(iptc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + iptc->set_row_spacing(3); int row = 0; - Gtk::Label* capl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CAPTION") + ":") ); + Gtk::Label* capl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_DESCRIPTION") + ":") ); + setExpandAlignProperties(capl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); captionText = Gtk::TextBuffer::create (); captionView = Gtk::manage( new Gtk::TextView (captionText) ); + setExpandAlignProperties(captionView, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); Gtk::ScrolledWindow* scrolledWindowc = Gtk::manage( new Gtk::ScrolledWindow() ); + setExpandAlignProperties(scrolledWindowc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + scrolledWindowc->set_min_content_height (100); scrolledWindowc->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS); scrolledWindowc->add(*captionView); - capl->set_tooltip_text (M("IPTCPANEL_CAPTIONHINT")); - captionView->set_tooltip_text (M("IPTCPANEL_CAPTIONHINT")); - captionView->set_size_request(32, 80); - iptc->attach (*capl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*scrolledWindowc, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + capl->set_tooltip_text (M("IPTCPANEL_DESCRIPTIONHINT")); + captionView->set_tooltip_text (M("IPTCPANEL_DESCRIPTIONHINT")); + captionView->set_size_request(35, 95); + iptc->attach (*capl, 0, row++, 1, 1); + iptc->attach (*scrolledWindowc, 0, row++, 1, 1); - row++; + // -------------------------- - Gtk::Label* capwl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CAPTIONWRITER") + ":") ); + Gtk::Label* capwl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_DESCRIPTIONWRITER") + ":") ); + setExpandAlignProperties(capwl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); captionWriter = Gtk::manage( new Gtk::Entry () ); - capwl->set_tooltip_text (M("IPTCPANEL_CAPTIONWRITERHINT")); - captionWriter->set_tooltip_text (M("IPTCPANEL_CAPTIONWRITERHINT")); - iptc->attach (*capwl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*captionWriter, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + setExpandAlignProperties(captionWriter, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + capwl->set_tooltip_text (M("IPTCPANEL_DESCRIPTIONWRITERHINT")); + captionWriter->set_tooltip_text (M("IPTCPANEL_DESCRIPTIONWRITERHINT")); + iptc->attach (*capwl, 0, row++, 1, 1); + iptc->attach (*captionWriter, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* headl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_HEADLINE") + ":") ); + setExpandAlignProperties(headl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); headline = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(headline, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); headl->set_tooltip_text (M("IPTCPANEL_HEADLINEHINT")); headline->set_tooltip_text (M("IPTCPANEL_HEADLINEHINT")); - iptc->attach (*headl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*headline, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + iptc->attach (*headl, 0, row++, 1, 1); + iptc->attach (*headline, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* instl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_INSTRUCTIONS") + ":") ); + setExpandAlignProperties(instl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); instructions = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(instructions, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); instl->set_tooltip_text (M("IPTCPANEL_INSTRUCTIONSHINT")); instructions->set_tooltip_text (M("IPTCPANEL_INSTRUCTIONSHINT")); - iptc->attach (*instl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*instructions, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + iptc->attach (*instl, 0, row++, 1, 1); + iptc->attach (*instructions, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::HSeparator* hsep1 = Gtk::manage( new Gtk::HSeparator () ); - iptc->attach (*hsep1, 0, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + setExpandAlignProperties(hsep1, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + iptc->attach (*hsep1, 0, row++, 2, 1); - row++; + // -------------------------- Gtk::Label* keyl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_KEYWORDS") + ":")); + setExpandAlignProperties(keyl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + keyl->set_tooltip_text (M("IPTCPANEL_KEYWORDSHINT")); keywords = Gtk::manage( new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE) ); + setExpandAlignProperties(keywords, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); keywords->set_headers_visible (false); - keywords->set_size_request (50, 80); + keywords->set_size_request (50, 95); Gtk::ScrolledWindow* scrolledWindowkw = Gtk::manage( new Gtk::ScrolledWindow() ); + setExpandAlignProperties(scrolledWindowkw, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + scrolledWindowkw->set_min_content_height (100); scrolledWindowkw->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS); scrolledWindowkw->add(*keywords); - keyword = Gtk::manage( new Gtk::ComboBoxEntryText () ); - keyword->set_size_request (32, -1); - keyl->set_tooltip_text (M("IPTCPANEL_KEYWORDSHINT")); + keyword = Gtk::manage(new MyComboBoxText (true)); + setExpandAlignProperties(keyword, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + keyword->set_size_request(75); keywords->set_tooltip_text (M("IPTCPANEL_KEYWORDSHINT")); keyword->set_tooltip_text (M("IPTCPANEL_KEYWORDSHINT")); addKW = Gtk::manage( new Gtk::Button () ); + setExpandAlignProperties(addKW, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); delKW = Gtk::manage( new Gtk::Button () ); + setExpandAlignProperties(delKW, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); Gtk::Image* addKWImg = Gtk::manage( new RTImage ("list-add-small.png") ); + setExpandAlignProperties(addKWImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); Gtk::Image* delKWImg = Gtk::manage( new RTImage ("list-remove-red-small.png") ); + setExpandAlignProperties(delKWImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); addKW->add (*addKWImg); delKW->add (*delKWImg); - Gtk::HBox* kwhb = Gtk::manage( new Gtk::HBox () ); - kwhb->pack_start (*keyword); - kwhb->pack_start (*addKW, Gtk::PACK_SHRINK, 2); - kwhb->pack_start (*delKW, Gtk::PACK_SHRINK, 2); - iptc->attach (*keyl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*kwhb, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); - row++; - iptc->attach (*scrolledWindowkw, 0, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); - row++; + Gtk::Grid* kwgrid = Gtk::manage( new Gtk::Grid () ); + setExpandAlignProperties(kwgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + kwgrid->attach (*keyword, 0, 0, 1, 1); + kwgrid->attach (*addKW, 1, 0, 1, 1); + kwgrid->attach (*delKW, 2, 0, 1, 1); + iptc->attach (*keyl, 0, row++, 1, 1); + iptc->attach (*kwgrid, 0, row++, 1, 1); + // -------------------------- + iptc->attach (*scrolledWindowkw, 0, row++, 2, 1); + // -------------------------- Gtk::HSeparator* hsep2 = Gtk::manage( new Gtk::HSeparator () ); - iptc->attach (*hsep2, 0, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); - row++; + setExpandAlignProperties(hsep2, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + iptc->attach (*hsep2, 0, row++, 2, 1); + // -------------------------- Gtk::Label* catl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CATEGORY") + ":") ); - category = Gtk::manage( new Gtk::ComboBoxEntryText () ); - category->set_size_request (32, -1); + setExpandAlignProperties(catl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + category = Gtk::manage(new MyComboBoxText (true)); + category->set_size_request(75); + setExpandAlignProperties(category, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); catl->set_tooltip_text (M("IPTCPANEL_CATEGORYHINT")); category->set_tooltip_text (M("IPTCPANEL_CATEGORYHINT")); Gtk::Label* scl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_SUPPCATEGORIES") + ":") ); + setExpandAlignProperties(scl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); suppCategories = Gtk::manage( new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE) ); + setExpandAlignProperties(suppCategories, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); suppCategories->set_headers_visible (false); - suppCategories->set_size_request(50, 80); + suppCategories->set_size_request(50, 95); Gtk::ScrolledWindow* scrolledWindowsc = Gtk::manage( new Gtk::ScrolledWindow() ); + setExpandAlignProperties(scrolledWindowsc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + scrolledWindowsc->set_min_content_height (100); scrolledWindowsc->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS); scrolledWindowsc->add(*suppCategories); - suppCategory = Gtk::manage( new Gtk::ComboBoxEntryText () ); - suppCategory->set_size_request (32, -1); + suppCategory = Gtk::manage(new MyComboBoxText (true)); + suppCategory->set_size_request(75); + setExpandAlignProperties(suppCategory, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); scl->set_tooltip_text (M("IPTCPANEL_SUPPCATEGORIESHINT")); suppCategories->set_tooltip_text (M("IPTCPANEL_SUPPCATEGORIESHINT")); suppCategory->set_tooltip_text (M("IPTCPANEL_SUPPCATEGORIESHINT")); addSC = Gtk::manage( new Gtk::Button () ); + setExpandAlignProperties(addSC, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); delSC = Gtk::manage( new Gtk::Button () ); + setExpandAlignProperties(delSC, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); Gtk::Image* addSCImg = Gtk::manage( new RTImage ("list-add-small.png") ); + setExpandAlignProperties(addSCImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); Gtk::Image* delSCImg = Gtk::manage( new RTImage ("list-remove-red-small.png") ); + setExpandAlignProperties(delSCImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); addSC->add (*addSCImg); delSC->add (*delSCImg); - Gtk::HBox* schb = Gtk::manage( new Gtk::HBox () ); - schb->pack_start (*suppCategory); - schb->pack_start (*addSC, Gtk::PACK_SHRINK, 2); - schb->pack_start (*delSC, Gtk::PACK_SHRINK, 2); - iptc->attach (*catl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*category, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); - row++; - iptc->attach (*scl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*schb, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); - row++; - iptc->attach (*scrolledWindowsc, 0, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); - row++; + Gtk::Grid* scgrid = Gtk::manage( new Gtk::Grid () ); + setExpandAlignProperties(scgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + scgrid->attach (*suppCategory, 0, 0, 1, 1); + scgrid->attach (*addSC, 1, 0, 1, 1); + scgrid->attach (*delSC, 2, 0, 1, 1); + iptc->attach (*catl, 0, row++, 1, 1); + iptc->attach (*category, 0, row++, 1, 1); + // -------------------------- + iptc->attach (*scl, 0, row++, 1, 1); + iptc->attach (*scgrid, 0, row++, 1, 1); + // -------------------------- + iptc->attach (*scrolledWindowsc, 0, row++, 2, 1); + // -------------------------- Gtk::HSeparator* hsep3 = Gtk::manage( new Gtk::HSeparator () ); - iptc->attach (*hsep3, 0, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); - row++; + setExpandAlignProperties(hsep3, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + iptc->attach (*hsep3, 0, row++, 2, 1); + // -------------------------- - Gtk::Label* authl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_AUTHOR") + ":") ); - author = Gtk::manage( new Gtk::Entry () ); - authl->set_tooltip_text (M("IPTCPANEL_CREDITHINT")); - author->set_tooltip_text (M("IPTCPANEL_CREDITHINT")); - iptc->attach (*authl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*author, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + Gtk::Label* creatorLbl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CREATOR") + ":") ); + setExpandAlignProperties(creatorLbl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + creator = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(creator, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + creatorLbl->set_tooltip_text (M("IPTCPANEL_CREATORHINT")); + creator->set_tooltip_text (M("IPTCPANEL_CREATORHINT")); + iptc->attach (*creatorLbl, 0, row++, 1, 1); + iptc->attach (*creator, 0, row++, 1, 1); - row++; + // -------------------------- - Gtk::Label* aupl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_AUTHORSPOSITION") + ":") ); - authorPos = Gtk::manage( new Gtk::Entry () ); - aupl->set_tooltip_text (M("IPTCPANEL_AUTHORSPOSITIONHINT")); - authorPos->set_tooltip_text (M("IPTCPANEL_AUTHORSPOSITIONHINT")); - iptc->attach (*aupl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*authorPos, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + Gtk::Label* creatorJobTitleLbl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CREATORJOBTITLE") + ":") ); + setExpandAlignProperties(creatorJobTitleLbl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + creatorJobTitle = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(creatorJobTitle, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + creatorJobTitleLbl->set_tooltip_text (M("IPTCPANEL_CREATORJOBTITLEHINT")); + creatorJobTitle->set_tooltip_text (M("IPTCPANEL_CREATORJOBTITLEHINT")); + iptc->attach (*creatorJobTitleLbl, 0, row++, 1, 1); + iptc->attach (*creatorJobTitle, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* credl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CREDIT") + ":") ); + setExpandAlignProperties(credl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); credit = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(credit, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); credl->set_tooltip_text (M("IPTCPANEL_CREDITHINT")); credit->set_tooltip_text (M("IPTCPANEL_CREDITHINT")); - iptc->attach (*credl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*credit, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + iptc->attach (*credl, 0, row++, 1, 1); + iptc->attach (*credit, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* sourl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_SOURCE") + ":") ); + setExpandAlignProperties(sourl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); source = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(source, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); sourl->set_tooltip_text (M("IPTCPANEL_SOURCEHINT")); source->set_tooltip_text (M("IPTCPANEL_SOURCEHINT")); - iptc->attach (*sourl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*source, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + iptc->attach (*sourl, 0, row++, 1, 1); + iptc->attach (*source, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* cprl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_COPYRIGHT") + ":") ); + setExpandAlignProperties(cprl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); copyright = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(copyright, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); cprl->set_tooltip_text (M("IPTCPANEL_COPYRIGHTHINT")); copyright->set_tooltip_text (M("IPTCPANEL_COPYRIGHTHINT")); - iptc->attach (*cprl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*copyright, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + iptc->attach (*cprl, 0, row++, 1, 1); + iptc->attach (*copyright, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::HSeparator* hsep4 = Gtk::manage( new Gtk::HSeparator () ); - iptc->attach (*hsep4, 0, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + setExpandAlignProperties(hsep4, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + iptc->attach (*hsep4, 0, row++, 2, 1); - row++; + // -------------------------- Gtk::Label* cityl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_CITY") + ":") ); + setExpandAlignProperties(cityl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); city = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(city, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); cityl->set_tooltip_text (M("IPTCPANEL_CITYHINT")); city->set_tooltip_text (M("IPTCPANEL_CITYHINT")); - iptc->attach (*cityl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*city, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + iptc->attach (*cityl, 0, row++, 1, 1); + iptc->attach (*city, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* provl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_PROVINCE") + ":") ); + setExpandAlignProperties(provl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); province = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(province, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); provl->set_tooltip_text (M("IPTCPANEL_PROVINCEHINT")); province->set_tooltip_text (M("IPTCPANEL_PROVINCEHINT")); - iptc->attach (*provl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*province, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + iptc->attach (*provl, 0, row++, 1, 1); + iptc->attach (*province, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* ctrl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_COUNTRY") + ":") ); + setExpandAlignProperties(ctrl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); country = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(country, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); ctrl->set_tooltip_text (M("IPTCPANEL_COUNTRYHINT")); country->set_tooltip_text (M("IPTCPANEL_COUNTRYHINT")); - iptc->attach (*ctrl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*country, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + iptc->attach (*ctrl, 0, row++, 1, 1); + iptc->attach (*country, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* titll = Gtk::manage( new Gtk::Label (M("IPTCPANEL_TITLE") + ":") ); + setExpandAlignProperties(titll, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); title = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(title, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); titll->set_tooltip_text (M("IPTCPANEL_TITLEHINT")); title->set_tooltip_text (M("IPTCPANEL_TITLEHINT")); - iptc->attach (*titll, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*title, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + iptc->attach (*titll, 0, row++, 1, 1); + iptc->attach (*title, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* dcl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_DATECREATED") + ":") ); + setExpandAlignProperties(dcl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); dateCreated = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(dateCreated, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); dcl->set_tooltip_text (M("IPTCPANEL_DATECREATEDHINT")); dateCreated->set_tooltip_text (M("IPTCPANEL_DATECREATEDHINT")); - iptc->attach (*dcl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*dateCreated, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + iptc->attach (*dcl, 0, row++, 1, 1); + iptc->attach (*dateCreated, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::Label* trl = Gtk::manage( new Gtk::Label (M("IPTCPANEL_TRANSREFERENCE") + ":") ); + setExpandAlignProperties(trl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); transReference = Gtk::manage( new Gtk::Entry () ); + setExpandAlignProperties(transReference, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); trl->set_tooltip_text (M("IPTCPANEL_TRANSREFERENCEHINT")); transReference->set_tooltip_text (M("IPTCPANEL_TRANSREFERENCEHINT")); - iptc->attach (*trl, 0, 1, row, row + 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); - iptc->attach (*transReference, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); + iptc->attach (*trl, 0, row++, 1, 1); + iptc->attach (*transReference, 0, row++, 1, 1); - row++; + // -------------------------- Gtk::ScrolledWindow* scrolledWindow = Gtk::manage( new Gtk::ScrolledWindow() ); - scrolledWindow->set_border_width(2); + setExpandAlignProperties(scrolledWindow, false, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); scrolledWindow->set_shadow_type(Gtk::SHADOW_NONE); scrolledWindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS); - scrolledWindow->property_window_placement().set_value(Gtk::CORNER_TOP_LEFT); + scrolledWindow->property_window_placement().set_value(Gtk::CORNER_TOP_RIGHT); scrolledWindow->add(*iptc); pack_start (*scrolledWindow); - Gtk::HBox* bbox = Gtk::manage( new Gtk::HBox () ); + Gtk::Grid* bbox = Gtk::manage( new Gtk::Grid () ); + setExpandAlignProperties(bbox, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - reset = Gtk::manage( new Gtk::Button (M("IPTCPANEL_RESET")) ); + reset = Gtk::manage( new Gtk::Button () ); // M("IPTCPANEL_RESET") + reset->get_style_context()->add_class("Left"); reset->set_image (*Gtk::manage(new RTImage ("gtk-undo-ltr.png", "gtk-undo-rtl.png"))); - bbox->pack_start (*reset); + setExpandAlignProperties(reset, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + bbox->attach_next_to (*reset, Gtk::POS_LEFT, 1, 1); - file = Gtk::manage( new Gtk::Button (M("IPTCPANEL_EMBEDDED")) ); + file = Gtk::manage( new Gtk::Button () ); // M("IPTCPANEL_EMBEDDED") + file->get_style_context()->add_class("MiddleH"); file->set_image (*Gtk::manage(new RTImage ("gtk-open.png"))); - bbox->pack_start (*file); + setExpandAlignProperties(file, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + bbox->attach_next_to (*file, Gtk::POS_RIGHT, 1, 1); copy = Gtk::manage( new Gtk::Button () ); + copy->get_style_context()->add_class("MiddleH"); copy->set_image (*Gtk::manage(new RTImage ("edit-copy.png"))); - bbox->pack_start (*copy, Gtk::PACK_SHRINK, 0); + setExpandAlignProperties(copy, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + bbox->attach_next_to (*copy, Gtk::POS_RIGHT, 1, 1); paste = Gtk::manage( new Gtk::Button () ); + paste->get_style_context()->add_class("Right"); paste->set_image (*Gtk::manage(new RTImage ("edit-paste.png"))); - bbox->pack_start (*paste, Gtk::PACK_SHRINK, 0); + setExpandAlignProperties(paste, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + bbox->attach_next_to (*paste, Gtk::POS_RIGHT, 1, 1); pack_end (*bbox, Gtk::PACK_SHRINK, 2); - Gtk::Tooltips* toolTip = Gtk::manage( new Gtk::Tooltips () ); - toolTip->set_tip (*reset, M("IPTCPANEL_RESETHINT")); - toolTip->set_tip (*file, M("IPTCPANEL_EMBEDDEDHINT")); - toolTip->set_tip (*copy, M("IPTCPANEL_COPYHINT")); - toolTip->set_tip (*paste, M("IPTCPANEL_PASTEHINT")); + reset->set_tooltip_text(M("IPTCPANEL_RESETHINT")); + file->set_tooltip_text(M("IPTCPANEL_EMBEDDEDHINT")); + copy->set_tooltip_text(M("IPTCPANEL_COPYHINT")); + paste->set_tooltip_text(M("IPTCPANEL_PASTEHINT")); reset->signal_clicked().connect( sigc::mem_fun(*this, &IPTCPanel::resetClicked) ); file->signal_clicked().connect( sigc::mem_fun(*this, &IPTCPanel::fileClicked) ); @@ -309,8 +375,8 @@ IPTCPanel::IPTCPanel () conns[2] = headline->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) ); conns[3] = instructions->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) ); conns[4] = category->get_entry()->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) ); - conns[5] = author->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) ); - conns[6] = authorPos->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) ); + conns[5] = creator->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) ); + conns[6] = creatorJobTitle->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) ); conns[7] = credit->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) ); conns[8] = source->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) ); conns[9] = copyright->signal_changed().connect( sigc::mem_fun(*this, &IPTCPanel::updateChangeList) ); @@ -325,8 +391,8 @@ IPTCPanel::IPTCPanel () keyword->get_entry()->set_max_length (64); captionWriter->set_max_length (32); instructions->set_max_length (256); - author->set_max_length (32); - authorPos->set_max_length (32); + creator->set_max_length (32); + creatorJobTitle->set_max_length (32); credit->set_max_length (32); source->set_max_length (32); copyright->set_max_length (128); @@ -398,8 +464,8 @@ void IPTCPanel::addKeyWord () return; } - keywords->append_text (keyword->get_entry()->get_text()); - keyword->prepend_text (keyword->get_entry()->get_text()); + keywords->append (keyword->get_entry()->get_text()); + keyword->prepend (keyword->get_entry()->get_text()); std::vector items; for (Gtk::TreeModel::iterator i = keyword->get_model()->children().begin(); i != keyword->get_model()->children().end(); ++i) { @@ -408,10 +474,10 @@ void IPTCPanel::addKeyWord () items.push_back (s); } - keyword->clear_items (); + keyword->remove_all (); for (unsigned int i = 0; i < 10 && i < items.size(); i++) { - keyword->append_text (items[i]); + keyword->append (items[i]); } keywords->scroll_to_row (keywords->get_model()->get_path(--keywords->get_model()->children().end())); @@ -435,7 +501,7 @@ void IPTCPanel::delKeyWord () keywords->clear_items (); for (unsigned int i = 0; i < keep.size(); i++) { - keywords->append_text (keep[i]); + keywords->append (keep[i]); } } @@ -450,8 +516,8 @@ void IPTCPanel::addSuppCategory () return; } - suppCategories->append_text (suppCategory->get_entry()->get_text()); - suppCategory->prepend_text (suppCategory->get_entry()->get_text()); + suppCategories->append (suppCategory->get_entry()->get_text()); + suppCategory->prepend (suppCategory->get_entry()->get_text()); std::vector items; for (Gtk::TreeModel::iterator i = suppCategory->get_model()->children().begin(); i != suppCategory->get_model()->children().end(); ++i) { @@ -460,10 +526,10 @@ void IPTCPanel::addSuppCategory () items.push_back (s); } - suppCategory->clear_items (); + suppCategory->remove_all (); for (unsigned int i = 0; i < 10 && i < items.size(); i++) { - suppCategory->append_text (items[i]); + suppCategory->append (items[i]); } suppCategories->scroll_to_row (suppCategories->get_model()->get_path(--suppCategories->get_model()->children().end())); @@ -488,7 +554,7 @@ void IPTCPanel::delSuppCategory () suppCategories->clear_items (); for (unsigned int i = 0; i < keep.size(); i++) { - suppCategories->append_text (keep[i]); + suppCategories->append (keep[i]); } } @@ -514,8 +580,8 @@ void IPTCPanel::updateChangeList () changeList["SupplementalCategories"].push_back (suppCategories->get_text (i)); } - changeList["Author" ].push_back (author->get_text ()); - changeList["AuthorsPosition"].push_back (authorPos->get_text ()); + changeList["Creator" ].push_back (creator->get_text ()); + changeList["CreatorJobTitle"].push_back (creatorJobTitle->get_text ()); changeList["Credit" ].push_back (credit->get_text ()); changeList["Source" ].push_back (source->get_text ()); changeList["Copyright" ].push_back (copyright->get_text ()); @@ -543,8 +609,8 @@ void IPTCPanel::applyChangeList () keywords->clear_items (); category->get_entry()->set_text (""); suppCategories->clear_items (); - author->set_text (""); - authorPos->set_text (""); + creator->set_text (""); + creatorJobTitle->set_text (""); credit->set_text (""); source->set_text (""); copyright->set_text (""); @@ -568,18 +634,18 @@ void IPTCPanel::applyChangeList () instructions->set_text (i->second.at(0)); } else if (i->first == "Keywords") for (unsigned int j = 0; j < i->second.size(); j++) { - keywords->append_text (i->second.at(j)); + keywords->append (i->second.at(j)); } else if (i->first == "Category" && !i->second.empty()) { category->get_entry()->set_text (i->second.at(0)); } else if (i->first == "SupplementalCategories") for (unsigned int j = 0; j < i->second.size(); j++) { - suppCategories->append_text (i->second.at(j)); + suppCategories->append (i->second.at(j)); } - else if (i->first == "Author" && !i->second.empty()) { - author->set_text (i->second.at(0)); - } else if (i->first == "AuthorsPosition" && !i->second.empty()) { - authorPos->set_text (i->second.at(0)); + else if (i->first == "Creator" && !i->second.empty()) { + creator->set_text (i->second.at(0)); + } else if (i->first == "CreatorJobTitle" && !i->second.empty()) { + creatorJobTitle->set_text (i->second.at(0)); } else if (i->first == "Credit" && !i->second.empty()) { credit->set_text (i->second.at(0)); } else if (i->first == "Source" && !i->second.empty()) { diff --git a/rtgui/iptcpanel.h b/rtgui/iptcpanel.h index 7c26aa7ca..63309cc27 100644 --- a/rtgui/iptcpanel.h +++ b/rtgui/iptcpanel.h @@ -36,18 +36,18 @@ private: Gtk::Entry* captionWriter; Gtk::Entry* headline; Gtk::Entry* instructions; - Gtk::ComboBoxEntryText* keyword; + MyComboBoxText* keyword; Gtk::ListViewText* keywords; Gtk::Button* addKW; Gtk::Button* delKW; - Gtk::ComboBoxEntryText* category; - Gtk::ComboBoxEntryText* suppCategory; + MyComboBoxText* category; + MyComboBoxText* suppCategory; Gtk::ListViewText* suppCategories; Gtk::Button* addSC; Gtk::Button* delSC; - Gtk::Entry* author; - Gtk::Entry* authorPos; + Gtk::Entry* creator; + Gtk::Entry* creatorJobTitle; Gtk::Entry* credit; Gtk::Entry* source; Gtk::Entry* copyright; diff --git a/rtgui/labcurve.cc b/rtgui/labcurve.cc index a173b47ec..c39dc99fc 100644 --- a/rtgui/labcurve.cc +++ b/rtgui/labcurve.cc @@ -559,7 +559,7 @@ void LCurve::adjusterChanged (Adjuster* a, double newval) void LCurve::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (elemType == ColorCaller::CCET_VERTICAL_BAR) { valY = 0.5; @@ -574,6 +574,21 @@ void LCurve::colorForValue (double valX, double valY, enum ColorCaller::ElemType // whole hue range // Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before) Color::hsv2rgb01(float(valY), float(valX), value, R, G, B); + } else if (callerId == 6) { // cc - left bar + + float value = (1.f - 0.7f) * float(valX) + 0.7f; + float hue = (1.14056f - 0.92f) * float(valY) + 0.92f; + + if (hue > 1.0f) { + hue -= 1.0f; + } + + // Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before) + Color::hsv2rgb01(hue, float(valX), value, R, G, B); + + // whole hue range + // Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before) + // Color::hsv2rgb01(float(valY), float(valX), value, R, G, B); } else if (callerId == 3) { // lc - bottom bar float value = (1.f - 0.7f) * float(valX) + 0.7f; diff --git a/rtgui/lensgeom.cc b/rtgui/lensgeom.cc index 423a7a3ec..7cae75d87 100644 --- a/rtgui/lensgeom.cc +++ b/rtgui/lensgeom.cc @@ -23,7 +23,7 @@ using namespace rtengine; using namespace rtengine::procparams; -LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGEOM_LABEL")), rlistener(nullptr) +LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGEOM_LABEL")), rlistener(nullptr), lastFill(false) { fill = Gtk::manage (new Gtk::CheckButton (M("TP_LENSGEOM_FILL"))); @@ -45,7 +45,7 @@ LensGeometry::LensGeometry () : FoldableToolPanel(this, "lensgeom", M("TP_LENSGE LensGeometry::~LensGeometry () { - g_idle_remove_by_data(this); + idle_register.destroy(); } void LensGeometry::read (const ProcParams* pp, const ParamsEdited* pedited) @@ -119,29 +119,3 @@ void LensGeometry::setBatchMode (bool batchMode) removeIfThere (this, autoCrop); } -void LensGeometry::disableAutoFillIfActive () -{ - g_idle_add(doDisableAutoFillIfActive, this); -} - -int LensGeometry::doDisableAutoFillIfActive (void* data) -{ - GThreadLock lock; // Is this really needed? - - LensGeometry* const instance = static_cast(data); - - if (!instance->batchMode) { - if (instance->fill->get_active()) { - instance->fillConn.block (true); - instance->fill->set_active(false); - - if (instance->listener) { - instance->listener->panelChanged (EvTransAutoFill, M("GENERAL_DISABLED")); - } - - instance->fillConn.block (false); - } - } - - return 0; -} diff --git a/rtgui/lensgeom.h b/rtgui/lensgeom.h index b963489e1..29b0c7f20 100644 --- a/rtgui/lensgeom.h +++ b/rtgui/lensgeom.h @@ -54,11 +54,9 @@ public: { rlistener = l; } - void disableAutoFillIfActive (); private: - static int doDisableAutoFillIfActive (void* data); - + IdleRegister idle_register; }; #endif diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index c24bc5cf0..0855ef03f 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -26,7 +26,7 @@ using namespace rtengine; using namespace rtengine::procparams; -LensProfilePanel::LensProfilePanel () : FoldableToolPanel(this, "lensprof", M("TP_LENSPROFILE_LABEL")) +LensProfilePanel::LensProfilePanel () : FoldableToolPanel(this, "lensprof", M("TP_LENSPROFILE_LABEL")), lcpFileChanged(false), useDistChanged(false), useVignChanged(false), useCAChanged(false), isRaw(true), lensgeomLcpFill(nullptr) { hbLCPFile = Gtk::manage(new Gtk::HBox()); @@ -35,10 +35,10 @@ LensProfilePanel::LensProfilePanel () : FoldableToolPanel(this, "lensprof", M("T fcbLCPFile = Gtk::manage(new MyFileChooserButton(M("TP_LENSPROFILE_LABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN)); - Gtk::FileFilter filterLCP; - filterLCP.set_name(M("FILECHOOSER_FILTER_LCP")); - filterLCP.add_pattern("*.lcp"); - filterLCP.add_pattern("*.LCP"); + Glib::RefPtr filterLCP = Gtk::FileFilter::create(); + filterLCP->set_name(M("FILECHOOSER_FILTER_LCP")); + filterLCP->add_pattern("*.lcp"); + filterLCP->add_pattern("*.LCP"); fcbLCPFile->add_filter(filterLCP); Glib::ustring defDir = lcpStore->getDefaultCommonDirectory(); @@ -48,7 +48,10 @@ LensProfilePanel::LensProfilePanel () : FoldableToolPanel(this, "lensprof", M("T fcbLCPFile->set_show_hidden(true); // ProgramData is hidden on Windows #endif fcbLCPFile->set_current_folder(defDir); + } else if (!options.lastLensProfileDir.empty()) { + fcbLCPFile->set_current_folder(options.lastLensProfileDir); } + bindCurrentFolder(*fcbLCPFile, options.lastLensProfileDir); hbLCPFile->pack_start(*fcbLCPFile); @@ -89,8 +92,9 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa fcbLCPFile->unselect_filename(fname); } else { Glib::ustring lastFolder = fcbLCPFile->get_current_folder(); - fcbLCPFile->set_filename(""); fcbLCPFile->set_current_folder(lastFolder); + fcbLCPFile->set_filename(lastFolder + "/."); + bindCurrentFolder(*fcbLCPFile, options.lastLensProfileDir); } updateDisabled(false); @@ -144,10 +148,6 @@ void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited void LensProfilePanel::onLCPFileChanged() { - - // Disable Auto-Fill when enabling LCP Distortion Correction, #1791 - lensgeomLcpFill->disableAutoFillIfActive(); - lcpFileChanged = true; updateDisabled(lcpStore->isValidLCPFileName(fcbLCPFile->get_filename())); @@ -170,12 +170,6 @@ void LensProfilePanel::onLCPFileReset() void LensProfilePanel::onUseDistChanged() { - - // Disable Auto-Fill when enabling LCP Distortion Correction, #1791 - if (ckbUseDist->get_active()) { - lensgeomLcpFill->disableAutoFillIfActive(); - } - useDistChanged = true; if (listener) { diff --git a/rtgui/lockablecolorpicker.cc b/rtgui/lockablecolorpicker.cc index abfb94344..d10dfb438 100644 --- a/rtgui/lockablecolorpicker.cc +++ b/rtgui/lockablecolorpicker.cc @@ -46,7 +46,10 @@ void LockableColorPicker::updateBackBuffer () Gtk::DrawingArea *iArea = cropWindow->getImageArea(); Glib::RefPtr pangoContext = iArea->get_pango_context (); - Pango::FontDescription fontd(options.colorPickerFont); + Pango::FontDescription fontd = pangoContext->get_font_description(); + // set font family and size + fontd.set_family(options.CPFontFamily == "default" ? "sans" : options.CPFontFamily); + fontd.set_size((options.CPFontFamily == "default" ? 8 : options.CPFontSize) * Pango::SCALE); fontd.set_weight(Pango::WEIGHT_NORMAL); pangoContext->set_font_description (fontd); @@ -124,13 +127,13 @@ void LockableColorPicker::updateBackBuffer () // black background of the whole color picker bbcr->set_line_width (0.); bbcr->set_source_rgba (0., 0., 0., opacity); - bbcr->arc_negative (center, center, center, 0., (double)M_PI); + bbcr->arc_negative (center, center, center, 0., (double)rtengine::RT_PI); bbcr->line_to (0, 2. * center + textHeight); - bbcr->arc_negative (2. * textPadding, 2. * center + textHeight, 2. * textPadding, (double)M_PI, (double)M_PI / 2.); + bbcr->arc_negative (2. * textPadding, 2. * center + textHeight, 2. * textPadding, (double)rtengine::RT_PI, (double)rtengine::RT_PI / 2.); bbcr->line_to (textWidth, 2. * center + textHeight + 2. * textPadding); - bbcr->arc_negative (textWidth, 2. * center + textHeight, 2. * textPadding, (double)M_PI / 2., 0.); + bbcr->arc_negative (textWidth, 2. * center + textHeight, 2. * textPadding, (double)rtengine::RT_PI / 2., 0.); bbcr->line_to (textWidth + 2. * textPadding, 2. * center + 2. * textPadding); - bbcr->arc_negative (textWidth, 2. * center + 2. * textPadding, 2. * textPadding, 0., (double)M_PI * 1.5); + bbcr->arc_negative (textWidth, 2. * center + 2. * textPadding, 2. * textPadding, 0., (double)rtengine::RT_PI * 1.5); bbcr->line_to (2. * center, 2. * center); bbcr->close_path(); bbcr->set_line_join (Cairo::LINE_JOIN_BEVEL); @@ -138,13 +141,13 @@ void LockableColorPicker::updateBackBuffer () bbcr->fill (); // light grey circle around the color mark - bbcr->arc (center, center, center - circlePadding / 2., 0., 2. * (double)M_PI); + bbcr->arc (center, center, center - circlePadding / 2., 0., 2. * (double)rtengine::RT_PI); bbcr->set_source_rgb (0.75, 0.75, 0.75); bbcr->set_line_width (circlePadding - 2.); bbcr->stroke (); // spot disc with picked color - bbcr->arc (center, center, center - circlePadding, 0., 2. * (double)M_PI); + bbcr->arc (center, center, center - circlePadding, 0., 2. * (double)rtengine::RT_PI); bbcr->set_source_rgb (rpreview, gpreview, bpreview); // <- set the picker color here bbcr->set_line_width (0.); bbcr->fill(); @@ -223,7 +226,7 @@ void LockableColorPicker::updateBackBuffer () float center = (float)size / 2.f + circlePadding; // light grey circle around the color mark - bbcr->arc (center, center, center - circlePadding / 2., 0., 2. * (double)M_PI); + bbcr->arc (center, center, center - circlePadding / 2., 0., 2. * (double)rtengine::RT_PI); bbcr->set_source_rgba (0., 0., 0., opacity); bbcr->set_line_width(circlePadding); bbcr->stroke_preserve(); diff --git a/rtgui/lwbutton.cc b/rtgui/lwbutton.cc index 5a50c8307..acc0cd734 100644 --- a/rtgui/lwbutton.cc +++ b/rtgui/lwbutton.cc @@ -71,15 +71,15 @@ Cairo::RefPtr LWButton::getIcon () return icon; } -void LWButton::setColors (const Gdk::Color& bg, const Gdk::Color& fg) +void LWButton::setColors (const Gdk::RGBA& bg, const Gdk::RGBA& fg) { - bgr = bg.get_red_p (); - bgg = bg.get_green_p (); - bgb = bg.get_blue_p (); - fgr = fg.get_red_p (); - fgg = fg.get_green_p (); - fgb = fg.get_blue_p (); + bgr = bg.get_red (); + bgg = bg.get_green (); + bgb = bg.get_blue (); + fgr = fg.get_red (); + fgg = fg.get_green (); + fgb = fg.get_blue (); } bool LWButton::inside (int x, int y) diff --git a/rtgui/lwbutton.h b/rtgui/lwbutton.h index 2241235a2..2053911be 100644 --- a/rtgui/lwbutton.h +++ b/rtgui/lwbutton.h @@ -60,7 +60,7 @@ public: bool inside (int x, int y); void setIcon (Cairo::RefPtr i); Cairo::RefPtr getIcon (); - void setColors (const Gdk::Color& bg, const Gdk::Color& fg); + void setColors (const Gdk::RGBA& bg, const Gdk::RGBA& fg); void setToolTip (const Glib::ustring& tooltip); bool motionNotify (int x, int y); diff --git a/rtgui/lwbuttonset.cc b/rtgui/lwbuttonset.cc index c801cc33b..6265c1039 100644 --- a/rtgui/lwbuttonset.cc +++ b/rtgui/lwbuttonset.cc @@ -72,7 +72,7 @@ void LWButtonSet::arrangeButtons (int x, int y, int w, int h) for (size_t i = 0; i < buttons.size(); i++) { LWButton::Alignment halign, valign; - int bx, by, bw, bh; + int bx = 0, by = 0, bw = 0, bh = 0; buttons[i]->getSize (bw, bh); buttons[i]->getAlignment (halign, valign); @@ -187,7 +187,7 @@ void LWButtonSet::getAllocatedDimensions (int& w, int& h) h = ah; } -void LWButtonSet::setColors (const Gdk::Color& bg, const Gdk::Color& fg) +void LWButtonSet::setColors (const Gdk::RGBA& bg, const Gdk::RGBA& fg) { for (size_t i = 0; i < buttons.size(); i++) { diff --git a/rtgui/lwbuttonset.h b/rtgui/lwbuttonset.h index 3c17e488d..5452fa434 100644 --- a/rtgui/lwbuttonset.h +++ b/rtgui/lwbuttonset.h @@ -38,7 +38,7 @@ public: void getMinimalDimensions (int& w, int& h); void getAllocatedDimensions (int& w, int& h); void arrangeButtons (int x, int y, int w, int h); - void setColors (const Gdk::Color& bg, const Gdk::Color& fg); + void setColors (const Gdk::RGBA& bg, const Gdk::RGBA& fg); bool motionNotify (int x, int y); bool pressNotify (int x, int y); bool releaseNotify (int x, int y); diff --git a/rtgui/main-cli.cc b/rtgui/main-cli.cc new file mode 100644 index 000000000..69c3d8487 --- /dev/null +++ b/rtgui/main-cli.cc @@ -0,0 +1,849 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#ifdef __GNUC__ +#if defined(__FAST_MATH__) +#error Using the -ffast-math CFLAG is known to lead to problems. Disable it to compile RawTherapee. +#endif +#endif + +#include "config.h" +#include +#include +#include +#include +#include "rtwindow.h" +#include +#include +#include +#include "options.h" +#include "../rtengine/icons.h" +#include "soundman.h" +#include "rtimage.h" +#include "version.h" +#include "extprog.h" + +#ifndef WIN32 +#include +#include +#include +#include +#else +#include +#include "conio.h" +#endif + +// Set this to 1 to make RT work when started with Eclipse and arguments, at least on Windows platform +#define ECLIPSE_ARGS 0 + +extern Options options; + +// stores path to data files +Glib::ustring argv0; +Glib::ustring creditsPath; +Glib::ustring licensePath; +Glib::ustring argv1; +//bool simpleEditor; +//Glib::Threads::Thread* mainThread; + +namespace +{ + +// For an unknown reason, Glib::filename_to_utf8 doesn't work on reliably Windows, +// so we're using Glib::filename_to_utf8 for Linux/Apple and Glib::locale_to_utf8 for Windows. +Glib::ustring fname_to_utf8 (const char* fname) +{ +#ifdef WIN32 + + try { + return Glib::locale_to_utf8 (fname); + } catch (Glib::Error&) { + return Glib::convert_with_fallback (fname, "UTF-8", "ISO-8859-1", "?"); + } + +#else + + return Glib::filename_to_utf8 (fname); + +#endif +} + +bool fast_export = false; + +} + +/* Process line command options + * Returns + * 0 if process in batch has executed + * 1 to start GUI (with a dir or file option) + * 2 to start GUI because no files found + * -1 if there is an error in parameters + * -2 if an error occurred during processing + * -3 if at least one required procparam file was not found */ +int processLineParams( int argc, char **argv ); + +bool dontLoadCache( int argc, char **argv ); + +int main(int argc, char **argv) +{ + setlocale(LC_ALL, ""); + setlocale(LC_NUMERIC, "C"); // to set decimal point to "." + + Gio::init (); + + //mainThread = Glib::Threads::Thread::self(); + +#ifdef BUILD_BUNDLE + char exname[512] = {0}; + Glib::ustring exePath; + // get the path where the rawtherapee executable is stored +#ifdef WIN32 + WCHAR exnameU[512] = {0}; + GetModuleFileNameW (NULL, exnameU, 511); + WideCharToMultiByte(CP_UTF8, 0, exnameU, -1, exname, 511, 0, 0 ); +#else + + if (readlink("/proc/self/exe", exname, 511) < 0) { + strncpy(exname, argv[0], 511); + } + +#endif + exePath = Glib::path_get_dirname(exname); + + // set paths + if (Glib::path_is_absolute(DATA_SEARCH_PATH)) { + argv0 = DATA_SEARCH_PATH; + } else { + argv0 = Glib::build_filename(exePath, DATA_SEARCH_PATH); + } + + if (Glib::path_is_absolute(CREDITS_SEARCH_PATH)) { + creditsPath = CREDITS_SEARCH_PATH; + } else { + creditsPath = Glib::build_filename(exePath, CREDITS_SEARCH_PATH); + } + + if (Glib::path_is_absolute(LICENCE_SEARCH_PATH)) { + licensePath = LICENCE_SEARCH_PATH; + } else { + licensePath = Glib::build_filename(exePath, LICENCE_SEARCH_PATH); + } + +#else + argv0 = DATA_SEARCH_PATH; + creditsPath = CREDITS_SEARCH_PATH; + licensePath = LICENCE_SEARCH_PATH; +#endif + + bool quickstart = dontLoadCache(argc, argv); + + if (!Options::load (quickstart)) { + printf("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!\n"); + return -2; + } + + rtengine::setPaths(options); + + TIFFSetWarningHandler(nullptr); // avoid annoying message boxes + +#ifndef WIN32 + + // Move the old path to the new one if the new does not exist + if (Glib::file_test(Glib::build_filename(options.rtdir, "cache"), Glib::FILE_TEST_IS_DIR) && !Glib::file_test(options.cacheBaseDir, Glib::FILE_TEST_IS_DIR)) { + g_rename(Glib::build_filename (options.rtdir, "cache").c_str (), options.cacheBaseDir.c_str ()); + } + +#endif + +#ifdef WIN32 + bool consoleOpened = false; + + // suppression of annoying error boxes + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); + + if (argc > 1 || options.rtSettings.verbose) { + Glib::ustring fname(fname_to_utf8 (argv[1])); +#if ECLIPSE_ARGS + fname = fname.substr(1, fname.length()-2); +#endif + if (options.rtSettings.verbose || ( !Glib::file_test (fname, Glib::FILE_TEST_EXISTS ) && !Glib::file_test (fname, Glib::FILE_TEST_IS_DIR))) { + bool stdoutRedirectedtoFile = (GetFileType(GetStdHandle(STD_OUTPUT_HANDLE)) == 0x0001); + bool stderrRedirectedtoFile = (GetFileType(GetStdHandle(STD_ERROR_HANDLE)) == 0x0001); + + // no console, if stdout and stderr both are redirected to file + if( !(stdoutRedirectedtoFile && stderrRedirectedtoFile)) { + // check if parameter -w was passed. + // We have to do that in this step, because it controls whether to open a console to show the output of following steps + bool Console = true; + + for(int i = 1; i < argc; i++) + if(!strcmp(argv[i], "-w")) { + Console = false; + break; + } + + if(Console && AllocConsole()) { + AttachConsole( GetCurrentProcessId() ) ; + // Don't allow CTRL-C in console to terminate RT + SetConsoleCtrlHandler( NULL, true ); + // Set title of console + char consoletitle[128]; + sprintf(consoletitle, "RawTherapee %s Console", RTVERSION); + SetConsoleTitle(consoletitle); + // increase size of screen buffer + COORD c; + c.X = 200; + c.Y = 1000; + SetConsoleScreenBufferSize( GetStdHandle( STD_OUTPUT_HANDLE ), c ); + // Disable console-Cursor + CONSOLE_CURSOR_INFO cursorInfo; + cursorInfo.dwSize = 100; + cursorInfo.bVisible = false; + SetConsoleCursorInfo( GetStdHandle( STD_OUTPUT_HANDLE ), &cursorInfo ); + + if(!stdoutRedirectedtoFile) { + freopen( "CON", "w", stdout ) ; + } + + if(!stderrRedirectedtoFile) { + freopen( "CON", "w", stderr ) ; + } + + freopen( "CON", "r", stdin ) ; + + consoleOpened = true; + + // printing RT's version in every case, particularly useful for the 'verbose' mode, but also for the batch processing + std::cout << "RawTherapee, version " << RTVERSION << ", command line" << std::endl; + std::cout << "WARNING: closing this window will close RawTherapee!" << std::endl << std::endl; + } + } + } + } +#endif + + int ret = 0; + + // printing RT's version in all case, particularly useful for the 'verbose' mode, but also for the batch processing + std::cout << "RawTherapee, version " << RTVERSION << ", command line" << std::endl; + if (argc > 1) { + ret = processLineParams(argc, argv); + } + else { + std::cout << "Terminating without anything to do." << std::endl; + } + +#ifdef WIN32 + if(consoleOpened) { + printf("Press any key to exit RawTherapee\n"); + FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); + getch(); + } +#endif + + return ret; +} + +void deleteProcParams(std::vector &pparams) +{ + for (unsigned int i = 0; i < pparams.size(); i++) { + pparams[i]->deleteInstance(); + delete pparams[i]; + pparams[i] = NULL; + } + + return; +} + + +bool dontLoadCache( int argc, char **argv ) +{ + for (int iArg = 1; iArg < argc; iArg++) { + Glib::ustring currParam(argv[iArg]); +#if ECLIPSE_ARGS + currParam = currParam.substr(1, currParam.length()-2); +#endif + if( currParam.at(0) == '-' && currParam.at(1) == 'q' ) { + return true; + } + } + + return false; +} + +int processLineParams( int argc, char **argv ) +{ + rtengine::procparams::PartialProfile *rawParams = nullptr, *imgParams = nullptr; + std::vector inputFiles; + Glib::ustring outputPath = ""; + std::vector processingParams; + bool outputDirectory = false; + bool leaveUntouched = false; + bool overwriteFiles = false; + bool sideProcParams = false; + bool copyParamsFile = false; + bool skipIfNoSidecar = false; + bool allExtensions = false; + bool useDefault = false; + unsigned int sideCarFilePos = 0; + int compression = 92; + int subsampling = 3; + int bits = -1; + std::string outputType = ""; + unsigned errors = 0; + + for( int iArg = 1; iArg < argc; iArg++) { + Glib::ustring currParam(argv[iArg]); +#if ECLIPSE_ARGS + currParam = currParam.substr(1, currParam.length()-2); +#endif + if( currParam.at(0) == '-' ) { + switch( currParam.at(1) ) { + case 'O': + copyParamsFile = true; + + case 'o': // outputfile or dir + if( iArg + 1 < argc ) { + iArg++; + outputPath = Glib::ustring(fname_to_utf8(argv[iArg])); +#if ECLIPSE_ARGS + outputPath = outputPath.substr(1, outputPath.length()-2); +#endif + if(outputPath.substr(0,9) == "/dev/null") { + outputPath.assign("/dev/null"); // removing any useless chars or filename + outputDirectory = false; + leaveUntouched = true; + } else if(Glib::file_test (outputPath, Glib::FILE_TEST_IS_DIR)) { + outputDirectory = true; + } + } + + break; + + case 'p': // processing parameters for all inputs; all set procparams are required, so + + // RT stop if any of them can't be loaded for any reason. + if( iArg + 1 < argc ) { + iArg++; + Glib::ustring fname(fname_to_utf8(argv[iArg])); +#if ECLIPSE_ARGS + fname = fname.substr(1, fname.length()-2); +#endif + + if (fname.at(0) == '-') { + std::cerr << "Error: filename missing next to the -p switch" << std::endl; + deleteProcParams(processingParams); + return -3; + } + + rtengine::procparams::PartialProfile* currentParams = new rtengine::procparams::PartialProfile(true); + + if (!(currentParams->load ( fname ))) { + processingParams.push_back(currentParams); + } else { + std::cerr << "Error: \"" << fname << "\" not found" << std::endl; + deleteProcParams(processingParams); + return -3; + } + } + + break; + + case 'S': + skipIfNoSidecar = true; + + case 's': // Processing params next to file (file extension appended) + sideProcParams = true; + sideCarFilePos = processingParams.size(); + break; + + case 'd': + useDefault = true; + break; + + case 'q': + break; + + case 'Y': + overwriteFiles = true; + break; + + case 'a': + allExtensions = true; + break; + + case 'j': + if (currParam.length() > 2 && currParam.at(2) == 's') { + if (currParam.length() == 3) { + std::cerr << "Error: the -js switch requires a mandatory value!" << std::endl; + deleteProcParams(processingParams); + return -3; + } + + // looking for the subsampling parameter + subsampling = atoi(currParam.substr(3).c_str()); + + if (subsampling < 1 || subsampling > 3) { + std::cerr << "Error: the value accompanying the -js switch has to be in the [1-3] range!" << std::endl; + deleteProcParams(processingParams); + return -3; + } + } else { + outputType = "jpg"; + compression = atoi(currParam.substr(2).c_str()); + + if (compression < 0 || compression > 100) { + std::cerr << "Error: the value accompanying the -j switch has to be in the [0-100] range!" << std::endl; + deleteProcParams(processingParams); + return -3; + } + } + + break; + + case 'b': + bits = atoi(currParam.substr(2).c_str()); + + if (bits != 8 && bits != 16) { + std::cerr << "Error: specify -b8 for 8-bit or -b16 for 16-bit output." << std::endl; + deleteProcParams(processingParams); + return -3; + } + + break; + + case 't': + outputType = "tif"; + compression = ((currParam.size() < 3 || currParam.at(2) != 'z') ? 0 : 1); + break; + + case 'n': + outputType = "png"; + compression = -1; + break; + + case 'f': + fast_export = true; + break; + + case 'c': // MUST be last option + while (iArg + 1 < argc) { + iArg++; + Glib::ustring argument(fname_to_utf8(argv[iArg])); +#if ECLIPSE_ARGS + argument = argument.substr(1, argument.length()-2); +#endif + + if (!Glib::file_test (argument, Glib::FILE_TEST_EXISTS)) { + std::cout << "\"" << argument << "\" doesn't exist !" << std::endl; + continue; + } + + if (Glib::file_test (argument, Glib::FILE_TEST_IS_REGULAR)) { + bool notAll = allExtensions && !options.is_parse_extention (argument); + bool notRetained = !allExtensions && !options.has_retained_extention (argument); + if (notAll || notRetained) { + if (notAll) { + std::cout << "\"" << argument << "\" is not one of the file format to process: skipped" << std::endl; + } else if (notRetained) { + std::cout << "\"" << argument << "\" is not one of the retained file format to process: skipped" << std::endl; + } + } + else { + inputFiles.emplace_back (argument); + } + continue; + + } + + if (Glib::file_test (argument, Glib::FILE_TEST_IS_DIR)) { + + auto dir = Gio::File::create_for_path (argument); + if (!dir || !dir->query_exists()) { + continue; + } + + try { + + auto enumerator = dir->enumerate_children("standard::name,standard::type"); + + while (auto file = enumerator->next_file()) { + + const auto fileName = Glib::build_filename(argument, file->get_name()); + bool isDir = file->get_file_type() == Gio::FILE_TYPE_DIRECTORY; + bool notAll = allExtensions && !options.is_parse_extention(fileName); + bool notRetained = !allExtensions && !options.has_retained_extention(fileName); + + if (isDir || notAll || notRetained) { + if (isDir) { + std::cout << "\"" << fileName << "\" is a directory: skipped" << std::endl; + } else if (notAll) { + std::cout << "\"" << fileName << "\" is not one of the file format to process: skipped" << std::endl; + } else if (notRetained) { + std::cout << "\"" << fileName << "\" is not one of the retained file format to process: skipped" << std::endl; + } + continue; + + } + + if (sideProcParams && skipIfNoSidecar) { + // look for the sidecar proc params + if (!Glib::file_test(fileName + paramFileExtension, Glib::FILE_TEST_EXISTS)) { + std::cout << "\"" << fileName << "\" has no side-car file: image skipped" << std::endl; + continue; + } + } + + inputFiles.emplace_back (fileName); + } + + } catch (Glib::Exception&) {} + + continue; + } + + std::cerr << "\"" << argument << "\" is neither a regular file nor a directory." << std::endl; + } + + break; +#ifdef WIN32 + + case 'w': // This case is handled outside this function + break; +#endif + + case 'h': + case '?': + default: { + Glib::ustring pparamsExt = paramFileExtension.substr(1); + std::cout << " An advanced, cross-platform program for developing raw photos." << std::endl; + std::cout << std::endl; + std::cout << " Website: http://www.rawtherapee.com/" << std::endl; + std::cout << " Documentation: http://rawpedia.rawtherapee.com/" << std::endl; + std::cout << " Forum: https://discuss.pixls.us/c/software/rawtherapee" << std::endl; + std::cout << " Code and bug reports: https://github.com/Beep6581/RawTherapee" << std::endl; + std::cout << std::endl; + std::cout << "Symbols:" << std::endl; + std::cout << " indicate parameters you can change." << std::endl; + std::cout << " [Square brackets] mean the parameter is optional." << std::endl; + std::cout << " The pipe symbol | indicates a choice of one or the other." << std::endl; + std::cout << " The dash symbol - denotes a range of possible values from one to the other." << std::endl; + std::cout << std::endl; + std::cout << "Usage:" << std::endl; + std::cout << " " << Glib::path_get_basename(argv[0]) << " -c | Convert files in batch with default parameters." << std::endl; + std::cout << " " << Glib::path_get_basename(argv[0]) << " -c | Convert files in batch with your own settings." << std::endl; + std::cout << std::endl; +#ifdef WIN32 + std::cout << " -w Do not open the Windows console" << std::endl; + std::cout << std::endl; +#endif + std::cout << "Options:" << std::endl; + std::cout << " " << Glib::path_get_basename(argv[0]) << "[-o |-O ] [-q] [-a] [-s|-S] [-p [-p ...] ] [-d] [ -j[1-100] [-js<1-3>] | [-b<8|16>] [-t[z] | [-n]] ] [-Y] [-f] -c " << std::endl; + std::cout << std::endl; + std::cout << " -c Specify one or more input files or directory." << std::endl; + std::cout << " When specifying directories, Rawtherapee will look for images files that comply with the" << std::endl; + std::cout << " selected extensions (see also '-a')." << std::endl; + std::cout << " -c must be the last option." << std::endl; + std::cout << " -o | Set output file or folder." << std::endl; + std::cout << " Saves output file alongside input file if -o is not specified." << std::endl; + std::cout << " -O | Set output file or folder and copy " << pparamsExt << " file into it." << std::endl; + std::cout << " Saves output file alongside input file if -O is not specified." << std::endl; + std::cout << " -q Quick-start mode. Does not load cached files to speedup start time." << std::endl; + std::cout << " -a Process all supported image file types when specifying a folder, even those" << std::endl; + std::cout << " not currently selected in Preferences > File Browser > Parsed Extensions." << std::endl; + std::cout << " -s Use the existing sidecar file to build the processing parameters," << std::endl; + std::cout << " e.g. for photo.raw there should be a photo.raw." << pparamsExt << " file in the same folder." << std::endl; + std::cout << " If the sidecar file does not exist, neutral values will be used." << std::endl; + std::cout << " -S Like -s but skip if the sidecar file does not exist." << std::endl; + std::cout << " -p Specify processing profile to be used for all conversions." << std::endl; + std::cout << " You can specify as many sets of \"-p \" options as you like," << std::endl; + std::cout << " each will be built on top of the previous one, as explained below." << std::endl; + std::cout << " -d Use the default raw or non-raw processing profile as set in" << std::endl; + std::cout << " Preferences > Image Processing > Default Processing Profile" << std::endl; + std::cout << " -j[1-100] Specify output to be JPEG (default, if -t and -n are not set)." << std::endl; + std::cout << " Optionally, specify compression 1-100 (default value: 92)." << std::endl; + std::cout << " -js<1-3> Specify the JPEG chroma subsampling parameter, where:" << std::endl; + std::cout << " 1 = Best compression: 2x2, 1x1, 1x1 (4:2:0)" << std::endl; + std::cout << " Chroma halved vertically and horizontally." << std::endl; + std::cout << " 2 = Balanced (default): 2x1, 1x1, 1x1 (4:2:2)" << std::endl; + std::cout << " Chroma halved horizontally." << std::endl; + std::cout << " 3 = Best quality: 1x1, 1x1, 1x1 (4:4:4)" << std::endl; + std::cout << " No chroma subsampling." << std::endl; + std::cout << " -b<8|16> Specify bit depth per channel (default value: 16 for TIFF, 8 for PNG)." << std::endl; + std::cout << " Only applies to TIFF and PNG output, JPEG is always 8." << std::endl; + std::cout << " -t[z] Specify output to be TIFF." << std::endl; + std::cout << " Uncompressed by default, or deflate compression with 'z'." << std::endl; + std::cout << " -n Specify output to be compressed PNG." << std::endl; + std::cout << " Compression is hard-coded to 6." << std::endl; + std::cout << " -Y Overwrite output if present." << std::endl; + std::cout << " -f Use the custom fast-export processing pipeline." << std::endl; + std::cout << std::endl; + std::cout << "Your " << pparamsExt << " files can be incomplete, RawTherapee will build the final values as follows:" << std::endl; + std::cout << " 1- A new processing profile is created using neutral values," << std::endl; + std::cout << " 2- If the \"-d\" option is set, the values are overridden by those found in" << std::endl; + std::cout << " the default raw or non-raw processing profile." << std::endl; + std::cout << " 3- If one or more \"-p\" options are set, the values are overridden by those" << std::endl; + std::cout << " found in these processing profiles." << std::endl; + std::cout << " 4- If the \"-s\" or \"-S\" options are set, the values are finally overridden by those" << std::endl; + std::cout << " found in the sidecar files." << std::endl; + std::cout << " The processing profiles are processed in the order specified on the command line." << std::endl; + return -1; + } + } + } else { + argv1 = Glib::ustring(fname_to_utf8(argv[iArg])); +#if ECLIPSE_ARGS + argv1 = argv1.substr(1, argv1.length()-2); +#endif + + if( outputDirectory ) { + options.savePathFolder = outputPath; + options.saveUsePathTemplate = false; + } else { + options.saveUsePathTemplate = true; + + if (options.savePathTemplate.empty()) + // If the save path template is empty, we use its default value + { + options.savePathTemplate = "%p1/converted/%f"; + } + } + + if (outputType == "jpg") { + options.saveFormat.format = outputType; + options.saveFormat.jpegQuality = compression; + options.saveFormat.jpegSubSamp = subsampling; + } else if (outputType == "tif") { + options.saveFormat.format = outputType; + } else if (outputType == "png") { + options.saveFormat.format = outputType; + } + + break; + } + } + + if( !argv1.empty() ) { + return 1; + } + + if( inputFiles.empty() ) { + return 2; + } + + if (useDefault) { + rawParams = new rtengine::procparams::PartialProfile(true, true); + Glib::ustring profPath = options.findProfilePath(options.defProfRaw); + + if (options.is_defProfRawMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && rawParams->load(profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, Glib::path_get_basename(options.defProfRaw) + paramFileExtension)))) { + std::cerr << "Error: default raw processing profile not found" << std::endl; + rawParams->deleteInstance(); + delete rawParams; + deleteProcParams(processingParams); + return -3; + } + + imgParams = new rtengine::procparams::PartialProfile(true); + profPath = options.findProfilePath(options.defProfImg); + + if (options.is_defProfImgMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && imgParams->load(profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, Glib::path_get_basename(options.defProfImg) + paramFileExtension)))) { + std::cerr << "Error: default non-raw processing profile not found" << std::endl; + imgParams->deleteInstance(); + delete imgParams; + rawParams->deleteInstance(); + delete rawParams; + deleteProcParams(processingParams); + return -3; + } + } + + for( size_t iFile = 0; iFile < inputFiles.size(); iFile++) { + + // Has to be reinstanciated at each profile to have a ProcParams object with default values + rtengine::procparams::ProcParams currentParams; + + Glib::ustring inputFile = inputFiles[iFile]; + std::cout << "Processing: " << inputFile << std::endl; + + rtengine::InitialImage* ii = nullptr; + rtengine::ProcessingJob* job = nullptr; + int errorCode; + bool isRaw = false; + + Glib::ustring outputFile; + + if( outputType.empty() ) { + outputType = "jpg"; + } + + if( outputPath.empty() ) { + Glib::ustring s = inputFile; + Glib::ustring::size_type ext = s.find_last_of('.'); + outputFile = s.substr(0, ext) + "." + outputType; + } else if( outputDirectory ) { + Glib::ustring s = Glib::path_get_basename( inputFile ); + Glib::ustring::size_type ext = s.find_last_of('.'); + outputFile = Glib::build_filename(outputPath, s.substr(0, ext) + "." + outputType); + } else { + if (leaveUntouched) { + outputFile = outputPath; + } else { + Glib::ustring s = outputPath; + Glib::ustring::size_type ext = s.find_last_of('.'); + outputFile = s.substr(0, ext) + "." + outputType; + } + } + + if( inputFile == outputFile) { + std::cerr << "Cannot overwrite: " << inputFile << std::endl; + continue; + } + + if( !overwriteFiles && Glib::file_test( outputFile , Glib::FILE_TEST_EXISTS ) ) { + std::cerr << outputFile << " already exists: use -Y option to overwrite. This image has been skipped." << std::endl; + continue; + } + + // Load the image + isRaw = true; + Glib::ustring ext = getExtension (inputFile); + + if (ext.lowercase() == "jpg" || ext.lowercase() == "jpeg" || ext.lowercase() == "tif" || ext.lowercase() == "tiff" || ext.lowercase() == "png") { + isRaw = false; + } + + ii = rtengine::InitialImage::load ( inputFile, isRaw, &errorCode, nullptr ); + + if (!ii) { + errors++; + std::cerr << "Error loading file: " << inputFile << std::endl; + continue; + } + + if (useDefault) { + if (isRaw) { + if (options.defProfRaw == DEFPROFILE_DYNAMIC) { + rawParams->deleteInstance(); + delete rawParams; + rawParams = ProfileStore::getInstance()->loadDynamicProfile(ii->getMetaData()); + } + std::cout << " Merging default raw processing profile" << std::endl; + rawParams->applyTo(¤tParams); + } else { + if (options.defProfImg == DEFPROFILE_DYNAMIC) { + imgParams->deleteInstance(); + delete imgParams; + imgParams = ProfileStore::getInstance()->loadDynamicProfile(ii->getMetaData()); + } + std::cout << " Merging default non-raw processing profile" << std::endl; + imgParams->applyTo(¤tParams); + } + } + + bool sideCarFound = false; + unsigned int i = 0; + + // Iterate the procparams file list in order to build the final ProcParams + do { + if (sideProcParams && i == sideCarFilePos) { + // using the sidecar file + Glib::ustring sideProcessingParams = inputFile + paramFileExtension; + + // the "load" method don't reset the procparams values anymore, so values found in the procparam file override the one of currentParams + if( !Glib::file_test( sideProcessingParams, Glib::FILE_TEST_EXISTS ) || currentParams.load ( sideProcessingParams )) { + std::cerr << "Warning: sidecar file requested but not found for: " << sideProcessingParams << std::endl; + } else { + sideCarFound = true; + std::cout << " Merging sidecar procparams" << std::endl; + } + } + + if( processingParams.size() > i ) { + std::cout << " Merging procparams #" << i << std::endl; + processingParams[i]->applyTo(¤tParams); + } + + i++; + } while (i < processingParams.size() + (sideProcParams ? 1 : 0)); + + if( sideProcParams && !sideCarFound && skipIfNoSidecar ) { + delete ii; + errors++; + std::cerr << "Error: no sidecar procparams found for: " << inputFile << std::endl; + continue; + } + + job = rtengine::ProcessingJob::create (ii, currentParams, fast_export); + + if( !job ) { + errors++; + std::cerr << "Error creating processing for: " << inputFile << std::endl; + ii->decreaseRef(); + continue; + } + + // Process image + rtengine::IImage16* resultImage = rtengine::processImage (job, errorCode, nullptr, options.tunnelMetaData); + + if( !resultImage ) { + errors++; + std::cerr << "Error processing: " << inputFile << std::endl; + rtengine::ProcessingJob::destroy( job ); + continue; + } + + // save image to disk + if( outputType == "jpg" ) { + errorCode = resultImage->saveAsJPEG( outputFile, compression, subsampling ); + } else if( outputType == "tif" ) { + errorCode = resultImage->saveAsTIFF( outputFile, bits, compression == 0 ); + } else if( outputType == "png" ) { + errorCode = resultImage->saveAsPNG( outputFile, compression, bits ); + } else { + errorCode = resultImage->saveToFile (outputFile); + } + + if(errorCode) { + errors++; + std::cerr << "Error saving to: " << outputFile << std::endl; + } else { + if( copyParamsFile ) { + Glib::ustring outputProcessingParams = outputFile + paramFileExtension; + currentParams.save( outputProcessingParams ); + } + } + + ii->decreaseRef(); + resultImage->free(); + } + + if (imgParams) { + imgParams->deleteInstance(); + delete imgParams; + } + + if (rawParams) { + rawParams->deleteInstance(); + delete rawParams; + } + + deleteProcParams(processingParams); + + return errors > 0 ? -2 : 0; +} diff --git a/rtgui/main.cc b/rtgui/main.cc index a3b4a60f2..731de81cd 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -16,12 +16,6 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -// generated 2004/6/3 19:15:32 CEST by gabor@darkstar.(none) -// using glademm V2.5.0 -// -// newer (non customized) versions of this file go to raw.cc_new - -// This file is for your program, I won't touch it again! #ifdef __GNUC__ #if defined(__FAST_MATH__) @@ -34,6 +28,7 @@ #include #include #include +#include "../rtengine/icons.h" #include "rtwindow.h" #include #include @@ -43,6 +38,7 @@ #include "rtimage.h" #include "version.h" #include "extprog.h" +#include "../rtengine/dynamicprofile.h" #ifndef WIN32 #include @@ -54,6 +50,9 @@ #include "conio.h" #endif +// Set this to 1 to make RT work when started with Eclipse and arguments, at least on Windows platform +#define ECLIPSE_ARGS 0 + extern Options options; // stores path to data files @@ -61,8 +60,13 @@ Glib::ustring argv0; Glib::ustring creditsPath; Glib::ustring licensePath; Glib::ustring argv1; -bool simpleEditor; -Glib::Thread* mainThread; +Glib::ustring argv2; +bool simpleEditor = false; +bool gimpPlugin = false; +bool remote = false; +Glib::RefPtr cssForced; +Glib::RefPtr cssRT; +//Glib::Threads::Thread* mainThread; namespace { @@ -86,14 +90,8 @@ Glib::ustring fname_to_utf8 (const char* fname) #endif } -} - // This recursive mutex will be used by gdk_threads_enter/leave instead of a simple mutex -#ifdef WIN32 -static Glib::RecMutex myGdkRecMutex; -#else static Glib::Threads::RecMutex myGdkRecMutex; -#endif static void myGdkLockEnter() { @@ -103,14 +101,15 @@ static void myGdkLockLeave() { // Automatic gdk_flush for non main tread #if AUTO_GDK_FLUSH - if (Glib::Thread::self() != mainThread) { - gdk_flush(); - } + //if (Glib::Thread::self() != mainThread) { + // gdk_flush(); + //} #endif myGdkRecMutex.unlock(); } + /* Process line command options * Returns * 0 if process in batch has executed @@ -119,32 +118,373 @@ static void myGdkLockLeave() * -1 if there is an error in parameters * -2 if an error occurred during processing * -3 if at least one required procparam file was not found */ -int processLineParams( int argc, char **argv ); +int processLineParams( int argc, char **argv ) +{ + for( int iArg = 1; iArg < argc; iArg++) { + Glib::ustring currParam(argv[iArg]); +#if ECLIPSE_ARGS + currParam = currParam.substr(1, currParam.length()-2); +#endif + if( currParam.at(0) == '-' ) { + switch( currParam.at(1) ) { +#ifdef WIN32 + + case 'w': // This case is handled outside this function + break; +#endif + case 'v': + return 0; + +#ifndef __APPLE__ // TODO agriggio - there seems to be already some "single instance app" support for OSX in rtwindow. Disabling it here until I understand how to merge the two + case 'R': + if (!gimpPlugin) { + remote = true; + } + break; +#endif + + case 'g': + if (currParam == "-gimp") { + gimpPlugin = true; + simpleEditor = true; + remote = false; + break; + } + // no break here on purpose + + case 'h': + case '?': + default: { + Glib::ustring pparamsExt = paramFileExtension.substr(1); + std::cout << " An advanced, cross-platform program for developing raw photos." << std::endl; + std::cout << std::endl; + std::cout << " Website: http://www.rawtherapee.com/" << std::endl; + std::cout << " Documentation: http://rawpedia.rawtherapee.com/" << std::endl; + std::cout << " Forum: https://discuss.pixls.us/c/software/rawtherapee" << std::endl; + std::cout << " Code and bug reports: https://github.com/Beep6581/RawTherapee" << std::endl; + std::cout << std::endl; + std::cout << "Symbols:" << std::endl; + std::cout << " indicate parameters you can change." << std::endl; + //std::cout << " [Square brackets] mean the parameter is optional." << std::endl; + //std::cout << " The pipe symbol | indicates a choice of one or the other." << std::endl; + //std::cout << " The dash symbol - denotes a range of possible values from one to the other." << std::endl; + std::cout << std::endl; + std::cout << "Usage:" << std::endl; + std::cout << " " << Glib::path_get_basename(argv[0]) << " Start File Browser inside folder." << std::endl; + std::cout << " " << Glib::path_get_basename(argv[0]) << " Start Image Editor with file." << std::endl; + std::cout << std::endl; + std::cout << "Options:" << std::endl; +#ifdef WIN32 + std::cout << " -w Do not open the Windows console" << std::endl; +#endif + std::cout << " -v Print RawTherapee version number and exit" << std::endl; +#ifndef __APPLE__ + std::cout << " -R Raise an already running RawTherapee instance (if available)" << std::endl; +#endif + std::cout << " -h -? Display this help message" << std::endl; + return -1; + } + } + } else { + if (argv1.empty()) { + argv1 = Glib::ustring(fname_to_utf8(argv[iArg])); +#if ECLIPSE_ARGS + argv1 = argv1.substr(1, argv1.length()-2); +#endif + } else if (gimpPlugin) { + argv2 = Glib::ustring(fname_to_utf8(argv[iArg])); + break; + } + if (!gimpPlugin) { + break; + } + } + } + + return 1; +} + + +bool init_rt() +{ + if (!Options::load ()) { + return false; + } + + extProgStore->init(); + SoundManager::init(); + + if( !options.rtSettings.verbose ) { + TIFFSetWarningHandler(nullptr); // avoid annoying message boxes + } + +#ifndef WIN32 + + // Move the old path to the new one if the new does not exist + if (Glib::file_test(Glib::build_filename(options.rtdir, "cache"), Glib::FILE_TEST_IS_DIR) && !Glib::file_test(options.cacheBaseDir, Glib::FILE_TEST_IS_DIR)) { + g_rename(Glib::build_filename (options.rtdir, "cache").c_str (), options.cacheBaseDir.c_str ()); + } + +#endif + + return true; +} + + +void cleanup_rt() +{ + rtengine::cleanup(); +} + + +RTWindow *create_rt_window() +{ + Glib::ustring icon_path = Glib::build_filename(argv0, "images"); + Glib::RefPtr defaultIconTheme = Gtk::IconTheme::get_default(); + defaultIconTheme->append_search_path(icon_path); + + rtengine::setPaths(options); + MyExpander::init(); // has to stay AFTER rtengine::setPaths + + // ------- loading theme files + + Glib::RefPtr screen = Gdk::Screen::get_default(); + + if (screen) { + Gtk::Settings::get_for_screen(screen)->property_gtk_theme_name() = "Adwaita"; + Gtk::Settings::get_for_screen(screen)->property_gtk_application_prefer_dark_theme() = true; + +#if defined(__APPLE__) + // This will force screen resolution regarding font, but I don't think it's compliant with Gtk guidelines... + // Do not confuse with screen scaling, where everything is scaled up ! + screen->set_resolution (96.); +#endif + + Glib::RefPtr regex = Glib::Regex::create(THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); + Glib::ustring filename; + Glib::MatchInfo mInfo; + bool match = regex->match(options.theme + ".css", mInfo); + if (match) { + // save old theme (name + version) + Glib::ustring initialTheme(options.theme); + + // update version + auto pos = options.theme.find("-GTK3-"); + Glib::ustring themeRootName(options.theme.substr(0, pos)); + if (GTK_MINOR_VERSION < 20) { + options.theme = themeRootName + "-GTK3-_19"; + } else { + options.theme = themeRootName + "-GTK3-20_"; + } + // check if this version exist + if (!Glib::file_test(Glib::build_filename(argv0, "themes", options.theme + ".css"), Glib::FILE_TEST_EXISTS)) { + // set back old theme version if the actual one doesn't exist yet + options.theme = initialTheme; + } + } + filename = Glib::build_filename(argv0, "themes", options.theme + ".css"); + + if (!match || !Glib::file_test(filename, Glib::FILE_TEST_EXISTS)) { + options.theme = "RawTherapee-GTK"; + // We're not testing GTK_MAJOR_VERSION == 3 here, since this branch requires Gtk3 only + if (GTK_MINOR_VERSION < 20) { + options.theme = options.theme + "3-_19"; + } else { + options.theme = options.theme + "3-20_"; + } + filename = Glib::build_filename(argv0, "themes", options.theme + ".css"); + } + cssRT = Gtk::CssProvider::create(); + + try { + cssRT->load_from_path (filename); + Gtk::StyleContext::add_provider_for_screen(screen, cssRT, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + } catch (Glib::Error &err) { + printf("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str()); + } catch (...) { + printf("Error: Can't load css file \"%s\"\n", filename.c_str()); + } + + // Set the font face and size + if (options.fontFamily != "default") { + try { + cssForced = Gtk::CssProvider::create(); + //GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + cssForced->load_from_data (Glib::ustring::compose("* { font-family: %1; font-size: %2px }", options.fontFamily, options.fontSize)); +#else + cssForced->load_from_data (Glib::ustring::compose("* { font-family: %1; font-size: %2pt }", options.fontFamily, options.fontSize)); +#endif + //GTK318 + Gtk::StyleContext::add_provider_for_screen(screen, cssForced, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + } catch (Glib::Error &err) { + printf("Error: \"%s\"\n", err.what().c_str()); + } catch (...) { + printf("Error: Can't find the font named \"%s\"\n", options.fontFamily.c_str()); + } + } + } + +#ifndef NDEBUG + else if (!screen) { + printf("ERROR: Can't get default screen!\n"); + } + +#endif + + // ------- end loading theme files + + //gdk_threads_enter (); + RTWindow *rtWindow = new RTWindow(); + + // alerting users if the default raw and image profiles are missing + if (options.is_defProfRawMissing()) { + Gtk::MessageDialog msgd (Glib::ustring::compose(M("OPTIONS_DEFRAW_MISSING"), options.defProfRaw), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); + msgd.run (); + } + + if (options.is_defProfImgMissing()) { + Gtk::MessageDialog msgd (Glib::ustring::compose(M("OPTIONS_DEFIMG_MISSING"), options.defProfImg), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); + msgd.run (); + } + + return rtWindow; +} + + +class RTApplication: public Gtk::Application { +public: + RTApplication(): + Gtk::Application("com.rawtherapee.application", + Gio::APPLICATION_HANDLES_OPEN), + rtWindow(nullptr) + { + } + + ~RTApplication() + { + if (rtWindow) { + delete rtWindow; + } + cleanup_rt(); + } + +private: + bool create_window() + { + if (rtWindow) { + return true; + } + + if (!init_rt()) { + Gtk::MessageDialog msgd ("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!", true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); + add_window(msgd); + msgd.run (); + return false; + } else { + rtWindow = create_rt_window(); + add_window(*rtWindow); + return true; + } + } + + // Override default signal handlers: + void on_activate() override + { + if (create_window()) { + rtWindow->present(); + } + } + + void on_open(const Gio::Application::type_vec_files& files, + const Glib::ustring& hint) override + { + if (create_window()) { + struct Data { + std::vector entries; + Glib::ustring lastfilename; + FileCatalog *filecatalog; + }; + Data *d = new Data; + d->filecatalog = rtWindow->fpanel->fileCatalog; + + for (const auto &f : files) { + Thumbnail *thm = cacheMgr->getEntry(f->get_path()); + if (thm) { + d->entries.push_back(thm); + d->lastfilename = f->get_path(); + } + } + + if (!d->entries.empty()) { + const auto doit = + [](gpointer data) -> gboolean + { + Data *d = static_cast(data); + d->filecatalog->openRequested(d->entries); + d->filecatalog->selectImage(d->lastfilename, true); + delete d; + return FALSE; + }; + gdk_threads_add_idle(doit, d); + } else { + delete d; + } + rtWindow->present(); + } + } + +private: + RTWindow *rtWindow; +}; + +void show_gimp_plugin_info_dialog(Gtk::Window *parent) +{ + if (options.gimpPluginShowInfoDialog) { + Gtk::MessageDialog info(*parent, M("GIMP_PLUGIN_INFO"), false, Gtk::MESSAGE_INFO, Gtk::BUTTONS_OK, true); + Gtk::Box *box = info.get_message_area(); + Gtk::CheckButton dontshowagain(M("DONT_SHOW_AGAIN")); + dontshowagain.show(); + box->pack_start(dontshowagain); + info.run(); + options.gimpPluginShowInfoDialog = !dontshowagain.get_active(); + } +} + +} // namespace + int main(int argc, char **argv) { setlocale(LC_ALL, ""); setlocale(LC_NUMERIC, "C"); // to set decimal point to "." - // Uncomment the following line if you want to use the "--g-fatal-warnings" command line flag - //gtk_init (&argc, &argv); - Glib::thread_init(); + simpleEditor = false; + gimpPlugin = false; + remote = false; + argv0 = ""; + argv1 = ""; + argv2 = ""; + + Glib::init(); // called by Gtk::Main, but this may be important for thread handling, so we call it ourselves now gdk_threads_set_lock_functions(G_CALLBACK(myGdkLockEnter), (G_CALLBACK(myGdkLockLeave))); gdk_threads_init(); + gtk_init (&argc, &argv); // use the "--g-fatal-warnings" command line flag to make warnings fatal Gio::init (); + #ifdef BUILD_BUNDLE char exname[512] = {0}; Glib::ustring exePath; // get the path where the rawtherapee executable is stored #ifdef WIN32 WCHAR exnameU[512] = {0}; - GetModuleFileNameW (NULL, exnameU, 512); - WideCharToMultiByte(CP_UTF8, 0, exnameU, -1, exname, 512, 0, 0 ); + GetModuleFileNameW (NULL, exnameU, 511); + WideCharToMultiByte(CP_UTF8, 0, exnameU, -1, exname, 511, 0, 0 ); #else - if (readlink("/proc/self/exe", exname, 512) < 0) { - strncpy(exname, argv[0], 512); + if (readlink("/proc/self/exe", exname, 511) < 0) { + strncpy(exname, argv[0], 511); } #endif @@ -174,24 +514,17 @@ int main(int argc, char **argv) creditsPath = CREDITS_SEARCH_PATH; licensePath = LICENCE_SEARCH_PATH; #endif - - mainThread = Glib::Thread::self(); - - if (!Options::load ()) { - Gtk::Main m(&argc, &argv); - Gtk::MessageDialog msgd ("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!", true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); - msgd.run (); - return -2; - } - - extProgStore->init(); - SoundManager::init(); - + + #ifdef WIN32 bool consoleOpened = false; - if (argc > 1 || options.rtSettings.verbose) { - if (options.rtSettings.verbose || ( !Glib::file_test (fname_to_utf8 (argv[1]), Glib::FILE_TEST_EXISTS ) && !Glib::file_test (fname_to_utf8 (argv[1]), Glib::FILE_TEST_IS_DIR))) { + // suppression of annoying error boxes + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); + + if(argc > 1) { + int ret = processLineParams( argc, argv); + if (options.rtSettings.verbose || (!remote && !Glib::file_test (argv1, Glib::FILE_TEST_EXISTS ) && !Glib::file_test (argv1, Glib::FILE_TEST_IS_DIR))) { bool stdoutRedirectedtoFile = (GetFileType(GetStdHandle(STD_OUTPUT_HANDLE)) == 0x0001); bool stderrRedirectedtoFile = (GetFileType(GetStdHandle(STD_ERROR_HANDLE)) == 0x0001); @@ -207,14 +540,13 @@ int main(int argc, char **argv) break; } - if(Console) { - AllocConsole(); + if(Console && AllocConsole()) { AttachConsole( GetCurrentProcessId() ) ; // Don't allow CTRL-C in console to terminate RT SetConsoleCtrlHandler( NULL, true ); // Set title of console char consoletitle[128]; - sprintf(consoletitle, "RawTherapee %s Console", VERSION); + sprintf(consoletitle, "RawTherapee %s Console", RTVERSION); SetConsoleTitle(consoletitle); // increase size of screen buffer COORD c; @@ -240,14 +572,12 @@ int main(int argc, char **argv) consoleOpened = true; // printing RT's version in every case, particularly useful for the 'verbose' mode, but also for the batch processing - std::cout << "RawTherapee, version " << VERSION << std::endl; + std::cout << "RawTherapee, version " << RTVERSION << std::endl; std::cout << "WARNING: closing this window will close RawTherapee!" << std::endl << std::endl; } } } - int ret = processLineParams( argc, argv); - if( ret <= 0 ) { if(consoleOpened) { printf("Press any key to exit RawTherapee\n"); @@ -263,7 +593,7 @@ int main(int argc, char **argv) if (argc > 1 || options.rtSettings.verbose) { // printing RT's version in all case, particularly useful for the 'verbose' mode, but also for the batch processing - std::cout << "RawTherapee, version " << VERSION << std::endl; + std::cout << "RawTherapee, version " << RTVERSION << std::endl; #ifdef WIN32 std::cout << "WARNING: closing this window will close RawTherapee!" << std::endl << std::endl; #endif @@ -279,93 +609,61 @@ int main(int argc, char **argv) #endif - if( !options.rtSettings.verbose ) { - TIFFSetWarningHandler(nullptr); // avoid annoying message boxes - } - -#ifndef WIN32 - - // Move the old path to the new one if the new does not exist - if (Glib::file_test(Glib::build_filename(options.rtdir, "cache"), Glib::FILE_TEST_IS_DIR) && !Glib::file_test(options.cacheBaseDir, Glib::FILE_TEST_IS_DIR)) { - g_rename(Glib::build_filename (options.rtdir, "cache").c_str (), options.cacheBaseDir.c_str ()); - } - -#endif - - simpleEditor = false; - - if( !argv1.empty() ) - if( Glib::file_test(argv1, Glib::FILE_TEST_EXISTS) && !Glib::file_test(argv1, Glib::FILE_TEST_IS_DIR)) { - simpleEditor = true; + if (gimpPlugin) { + if (!Glib::file_test(argv1, Glib::FILE_TEST_EXISTS) || Glib::file_test(argv1, Glib::FILE_TEST_IS_DIR)) { + printf("Error: argv1 doesn't exist\n"); + return 1; } + if (argv2.empty()) { + printf("Error: -gimp requires two arguments\n"); + return 1; + } + } else if (!remote && Glib::file_test(argv1, Glib::FILE_TEST_EXISTS)) { + simpleEditor = true; + } - if (options.theme.empty()) { - options.theme = "21-Gray-Gray"; + int ret = 0; + if (remote) { + char *app_argv[2] = { const_cast(argv0.c_str()) }; + int app_argc = 1; + if (!argv1.empty()) { + app_argc = 2; + app_argv[1] = const_cast(argv1.c_str()); + } + RTApplication app; + ret = app.run(app_argc, app_argv); } else { - std::string themeFile = argv0 + "/themes/" + options.theme + ".gtkrc"; - if (!std::ifstream(themeFile.c_str())) { - printf ("Current theme in options file is invalid: %s\nChanging to 21-Gray-Gray\n", options.theme.c_str()); - options.theme = "21-Gray-Gray"; + if (init_rt()) { + Gtk::Main m(&argc, &argv); + gdk_threads_enter(); + const std::unique_ptr rtWindow(create_rt_window()); + if (gimpPlugin) { + show_gimp_plugin_info_dialog(rtWindow.get()); + } + m.run(*rtWindow); + gdk_threads_leave(); + + if (gimpPlugin && + rtWindow->epanel && rtWindow->epanel->isRealized()) { + SaveFormat sf; + sf.format = "tif"; + sf.tiffBits = 16; + sf.tiffUncompressed = true; + sf.saveParams = true; + + if (!rtWindow->epanel->saveImmediately(argv2, sf)) { + ret = -2; + } + } + cleanup_rt(); + } else { + Gtk::Main m(&argc, &argv); + Gtk::MessageDialog msgd ("Fatal error!\nThe RT_SETTINGS and/or RT_PATH environment variables are set, but use a relative path. The path must be absolute!", true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); + msgd.run (); + ret = -2; } } - if (!options.useSystemTheme) { - std::vector rcfiles; - rcfiles.push_back (argv0 + "/themes/" + options.theme + ".gtkrc"); - - if (options.slimUI) { - rcfiles.push_back (argv0 + "/themes/slim"); - } - - // Set the font face and size - Gtk::RC::parse_string (Glib::ustring::compose( - "style \"clearlooks-default\" { font_name = \"%1\" }", options.font)); - Gtk::RC::set_default_files (rcfiles); - } - - Gtk::Main m(&argc, &argv); - - Glib::ustring icon_path = Glib::build_filename(argv0, "images"); - Glib::RefPtr defaultIconTheme = Gtk::IconTheme::get_default(); - defaultIconTheme->append_search_path(icon_path); - - RTImage::setPaths(options); - MyExpander::init(); // has to stay AFTER RTImage::setPaths - -#ifndef WIN32 - // For an unknown reason, gtkmm 2.22 don't know the gtk-button-images property, while it exists in the documentation... - // Anyway, the problem was Linux only - static Glib::RefPtr settings = Gtk::Settings::get_default(); - - if (settings) { - settings->property_gtk_button_images().set_value(true); - } else { - printf("Error: no default settings to update!\n"); - } - -#endif - - gdk_threads_enter (); - RTWindow *rtWindow = new class RTWindow(); - - // alerting users if the default raw and image profiles are missing - if (options.is_defProfRawMissing()) { - Gtk::MessageDialog msgd (Glib::ustring::compose(M("OPTIONS_DEFRAW_MISSING"), options.defProfRaw), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); - msgd.run (); - } - - if (options.is_defProfImgMissing()) { - Gtk::MessageDialog msgd (Glib::ustring::compose(M("OPTIONS_DEFIMG_MISSING"), options.defProfImg), true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); - msgd.run (); - } - - // opening the main window - m.run(*rtWindow); - - gdk_threads_leave (); - delete rtWindow; - rtengine::cleanup(); - #ifdef WIN32 if (consoleOpened) { @@ -376,503 +674,6 @@ int main(int argc, char **argv) #endif - return 0; -} - -void deleteProcParams(std::vector &pparams) -{ - for (unsigned int i = 0; i < pparams.size(); i++) { - pparams[i]->deleteInstance(); - delete pparams[i]; - pparams[i] = NULL; - } - - return; -} - -int processLineParams( int argc, char **argv ) -{ - rtengine::procparams::PartialProfile *rawParams = nullptr, *imgParams = nullptr; - std::vector inputFiles; - Glib::ustring outputPath = ""; - std::vector processingParams; - bool outputDirectory = false; - bool overwriteFiles = false; - bool sideProcParams = false; - bool copyParamsFile = false; - bool skipIfNoSidecar = false; - bool useDefault = false; - unsigned int sideCarFilePos = 0; - int compression = 92; - int subsampling = 3; - int bits = -1; - std::string outputType = ""; - unsigned errors = 0; - - for( int iArg = 1; iArg < argc; iArg++) { - if( argv[iArg][0] == '-' ) { - switch( argv[iArg][1] ) { - case 'O': - copyParamsFile = true; - - case 'o': // outputfile or dir - if( iArg + 1 < argc ) { - iArg++; - outputPath = fname_to_utf8 (argv[iArg]); - - if( Glib::file_test (outputPath, Glib::FILE_TEST_IS_DIR)) { - outputDirectory = true; - } - } - - break; - - case 'p': // processing parameters for all inputs; all set procparams are required, so - - // RT stop if any of them can't be loaded for any reason. - if( iArg + 1 < argc ) { - iArg++; - Glib::ustring fname = fname_to_utf8 (argv[iArg]); - - if (fname.at(0) == '-') { - std::cerr << "Error: filename missing next to the -p switch" << std::endl; - deleteProcParams(processingParams); - return -3; - } - - rtengine::procparams::PartialProfile* currentParams = new rtengine::procparams::PartialProfile(true); - - if (!(currentParams->load ( fname ))) { - processingParams.push_back(currentParams); - } else { - std::cerr << "Error: \"" << fname << "\" not found" << std::endl; - deleteProcParams(processingParams); - return -3; - } - } - - break; - - case 'S': - skipIfNoSidecar = true; - - case 's': // Processing params next to file (file extension appended) - sideProcParams = true; - sideCarFilePos = processingParams.size(); - break; - - case 'd': - useDefault = true; - break; - - case 'Y': - overwriteFiles = true; - break; - - case 'j': - if (strlen(argv[iArg]) > 2 && argv[iArg][2] == 's') { - if (strlen(argv[iArg]) == 3) { - std::cerr << "Error: the -js switch requires a mandatory value!" << std::endl; - deleteProcParams(processingParams); - return -3; - } - - // looking for the subsampling parameter - sscanf(&argv[iArg][3], "%d", &subsampling); - - if (subsampling < 1 || subsampling > 3) { - std::cerr << "Error: the value accompanying the -js switch has to be in the [1-3] range!" << std::endl; - deleteProcParams(processingParams); - return -3; - } - } else { - outputType = "jpg"; - sscanf(&argv[iArg][2], "%d", &compression); - - if (compression < 0 || compression > 100) { - std::cerr << "Error: the value accompanying the -j switch has to be in the [0-100] range!" << std::endl; - deleteProcParams(processingParams); - return -3; - } - } - - break; - - case 'b': - sscanf(&argv[iArg][2], "%d", &bits); - - if (bits != 8 && bits != 16) { - std::cerr << "Error: specify -b8 for 8-bit or -b16 for 16-bit output." << std::endl; - deleteProcParams(processingParams); - return -3; - } - - break; - - case 't': - outputType = "tif"; - compression = ((argv[iArg][2] != 'z') ? 0 : 1); - break; - - case 'n': - outputType = "png"; - compression = -1; - break; - - case 'c': // MUST be last option - while (iArg + 1 < argc) { - iArg++; - - const auto argument = fname_to_utf8 (argv[iArg]); - - if (Glib::file_test (argument, Glib::FILE_TEST_IS_REGULAR)) { - inputFiles.emplace_back (argument); - continue; - } - - if (Glib::file_test (argument, Glib::FILE_TEST_IS_DIR)) { - - auto dir = Gio::File::create_for_path (argument); - if (!dir || !dir->query_exists()) { - continue; - } - - try { - - auto enumerator = dir->enumerate_children (); - - while (auto file = enumerator->next_file ()) { - - const auto fileName = Glib::build_filename (argument, file->get_name ()); - - if (Glib::file_test (fileName, Glib::FILE_TEST_IS_DIR)) { - continue; - } - - // skip files without extension and sidecar files - auto lastdot = fileName.find_last_of('.'); - if (lastdot == Glib::ustring::npos) { - continue; - } - - if (fileName.substr (lastdot).compare (paramFileExtension) == 0) { - continue; - } - - inputFiles.emplace_back (fileName); - } - - } catch (Glib::Exception&) {} - - continue; - } - - std::cerr << "\"" << argument << "\" is neither a regular file nor a directory." << std::endl; - } - - break; -#ifdef WIN32 - - case 'w': // This case is handled outside this function - break; -#endif - - case 'h': - case '?': - default: { - Glib::ustring pparamsExt = paramFileExtension.substr(1); - std::cout << " An advanced, cross-platform program for developing raw photos." << std::endl; - std::cout << std::endl; - std::cout << " Website: http://www.rawtherapee.com/" << std::endl; - std::cout << " Documentation: http://rawpedia.rawtherapee.com/" << std::endl; - std::cout << " Forum: https://discuss.pixls.us/c/software/rawtherapee" << std::endl; - std::cout << " Code and bug reports: https://github.com/Beep6581/RawTherapee" << std::endl; - std::cout << std::endl; - std::cout << "Symbols:" << std::endl; - std::cout << " indicate parameters you can change." << std::endl; - std::cout << " [Square brackets] mean the parameter is optional." << std::endl; - std::cout << " The pipe symbol | indicates a choice of one or the other." << std::endl; - std::cout << " The dash symbol - denotes a range of possible values from one to the other." << std::endl; - std::cout << std::endl; - std::cout << "Usage:" << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " Start File Browser inside folder." << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " Start Image Editor with file." << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " -c | Convert files in batch with default parameters." << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " -c | Convert files in batch with your own settings." << std::endl; - std::cout << std::endl; -#ifdef WIN32 - std::cout << " -w Do not open the Windows console" << std::endl; - std::cout << std::endl; -#endif - std::cout << "Options:" << std::endl; - std::cout << " " << Glib::path_get_basename(argv[0]) << " [-o |-O ] [-s|-S] [-p [-p ...] ] [-d] [ -j[1-100] [-js<1-3>] | [-b<8|16>] [-t[z] | [-n]] ] [-Y] -c " << std::endl; - std::cout << std::endl; - std::cout << " -c Specify one or more input files." << std::endl; - std::cout << " -c must be the last option." << std::endl; - std::cout << " -o | Set output file or folder." << std::endl; - std::cout << " Saves output file alongside input file if -o is not specified." << std::endl; - std::cout << " -O | Set output file or folder and copy " << pparamsExt << " file into it." << std::endl; - std::cout << " Saves output file alongside input file if -O is not specified." << std::endl; - std::cout << " -s Use the existing sidecar file to build the processing parameters," << std::endl; - std::cout << " e.g. for photo.raw there should be a photo.raw." << pparamsExt << " file in the same folder." << std::endl; - std::cout << " If the sidecar file does not exist, neutral values will be used." << std::endl; - std::cout << " -S Like -s but skip if the sidecar file does not exist." << std::endl; - std::cout << " -p Specify processing profile to be used for all conversions." << std::endl; - std::cout << " You can specify as many sets of \"-p \" options as you like," << std::endl; - std::cout << " each will be built on top of the previous one, as explained below." << std::endl; - std::cout << " -d Use the default raw or non-raw processing profile as set in" << std::endl; - std::cout << " Preferences > Image Processing > Default Processing Profile" << std::endl; - std::cout << " -j[1-100] Specify output to be JPEG (default, if -t and -n are not set)." << std::endl; - std::cout << " Optionally, specify compression 1-100 (default value: 92)." << std::endl; - std::cout << " -js<1-3> Specify the JPEG chroma subsampling parameter, where:" << std::endl; - std::cout << " 1 = Best compression: 2x2, 1x1, 1x1 (4:2:0)" << std::endl; - std::cout << " Chroma halved vertically and horizontally." << std::endl; - std::cout << " 2 = Balanced (default): 2x1, 1x1, 1x1 (4:2:2)" << std::endl; - std::cout << " Chroma halved horizontally." << std::endl; - std::cout << " 3 = Best quality: 1x1, 1x1, 1x1 (4:4:4)" << std::endl; - std::cout << " No chroma subsampling." << std::endl; - std::cout << " -b<8|16> Specify bit depth per channel (default value: 16 for TIFF, 8 for PNG)." << std::endl; - std::cout << " Only applies to TIFF and PNG output, JPEG is always 8." << std::endl; - std::cout << " -t[z] Specify output to be TIFF." << std::endl; - std::cout << " Uncompressed by default, or deflate compression with 'z'." << std::endl; - std::cout << " -n Specify output to be compressed PNG." << std::endl; - std::cout << " Compression is hard-coded to 6." << std::endl; - std::cout << " -Y Overwrite output if present." << std::endl; - std::cout << std::endl; - std::cout << "Your " << pparamsExt << " files can be incomplete, RawTherapee will build the final values as follows:" << std::endl; - std::cout << " 1- A new processing profile is created using neutral values," << std::endl; - std::cout << " 2- If the \"-d\" option is set, the values are overridden by those found in" << std::endl; - std::cout << " the default raw or non-raw processing profile." << std::endl; - std::cout << " 3- If one or more \"-p\" options are set, the values are overridden by those" << std::endl; - std::cout << " found in these processing profiles." << std::endl; - std::cout << " 4- If the \"-s\" or \"-S\" options are set, the values are finally overridden by those" << std::endl; - std::cout << " found in the sidecar files." << std::endl; - std::cout << " The processing profiles are processed in the order specified on the command line." << std::endl; - return -1; - } - } - } else { - argv1 = fname_to_utf8 (argv[iArg]); - - if( outputDirectory ) { - options.savePathFolder = outputPath; - options.saveUsePathTemplate = false; - } else { - options.saveUsePathTemplate = true; - - if (options.savePathTemplate.empty()) - // If the save path template is empty, we use its default value - { - options.savePathTemplate = "%p1/converted/%f"; - } - } - - if (outputType == "jpg") { - options.saveFormat.format = outputType; - options.saveFormat.jpegQuality = compression; - options.saveFormat.jpegSubSamp = subsampling; - } else if (outputType == "tif") { - options.saveFormat.format = outputType; - } else if (outputType == "png") { - options.saveFormat.format = outputType; - } - - break; - } - } - - if( !argv1.empty() ) { - return 1; - } - - if( inputFiles.empty() ) { - return 2; - } - - if (useDefault) { - rawParams = new rtengine::procparams::PartialProfile(true, true); - Glib::ustring profPath = options.findProfilePath(options.defProfRaw); - - if (options.is_defProfRawMissing() || profPath.empty() || rawParams->load(profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, options.defProfRaw.substr(5) + paramFileExtension))) { - std::cerr << "Error: default raw processing profile not found" << std::endl; - rawParams->deleteInstance(); - delete rawParams; - deleteProcParams(processingParams); - return -3; - } - - imgParams = new rtengine::procparams::PartialProfile(true); - profPath = options.findProfilePath(options.defProfImg); - - if (options.is_defProfImgMissing() || profPath.empty() || imgParams->load(profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, options.defProfImg.substr(5) + paramFileExtension))) { - std::cerr << "Error: default non-raw processing profile not found" << std::endl; - imgParams->deleteInstance(); - delete imgParams; - rawParams->deleteInstance(); - delete rawParams; - deleteProcParams(processingParams); - return -3; - } - } - - for( size_t iFile = 0; iFile < inputFiles.size(); iFile++) { - - // Has to be reinstanciated at each profile to have a ProcParams object with default values - rtengine::procparams::ProcParams currentParams; - - Glib::ustring inputFile = inputFiles[iFile]; - std::cout << "Processing: " << inputFile << std::endl; - - rtengine::InitialImage* ii = nullptr; - rtengine::ProcessingJob* job = nullptr; - int errorCode; - bool isRaw = false; - - Glib::ustring outputFile; - - if( outputType.empty() ) { - outputType = "jpg"; - } - - if( outputPath.empty() ) { - Glib::ustring s = inputFile; - Glib::ustring::size_type ext = s.find_last_of('.'); - outputFile = s.substr(0, ext) + "." + outputType; - } else if( outputDirectory ) { - Glib::ustring s = Glib::path_get_basename( inputFile ); - Glib::ustring::size_type ext = s.find_last_of('.'); - outputFile = outputPath + "/" + s.substr(0, ext) + "." + outputType; - } else { - Glib::ustring s = outputPath; - Glib::ustring::size_type ext = s.find_last_of('.'); - outputFile = s.substr(0, ext) + "." + outputType; - } - - if( inputFile == outputFile) { - std::cerr << "Cannot overwrite: " << inputFile << std::endl; - continue; - } - - if( !overwriteFiles && Glib::file_test( outputFile , Glib::FILE_TEST_EXISTS ) ) { - std::cerr << outputFile << " already exists: use -Y option to overwrite. This image has been skipped." << std::endl; - continue; - } - - // Load the image - isRaw = true; - Glib::ustring ext = getExtension (inputFile); - - if (ext.lowercase() == "jpg" || ext.lowercase() == "jpeg" || ext.lowercase() == "tif" || ext.lowercase() == "tiff" || ext.lowercase() == "png") { - isRaw = false; - } - - ii = rtengine::InitialImage::load ( inputFile, isRaw, &errorCode, nullptr ); - - if (!ii) { - errors++; - std::cerr << "Error loading file: " << inputFile << std::endl; - continue; - } - - if (useDefault) { - if (isRaw) { - std::cout << " Merging default raw processing profile" << std::endl; - rawParams->applyTo(¤tParams); - } else { - std::cout << " Merging default non-raw processing profile" << std::endl; - imgParams->applyTo(¤tParams); - } - } - - bool sideCarFound = false; - unsigned int i = 0; - - // Iterate the procparams file list in order to build the final ProcParams - do { - if (sideProcParams && i == sideCarFilePos) { - // using the sidecar file - Glib::ustring sideProcessingParams = inputFile + paramFileExtension; - - // the "load" method don't reset the procparams values anymore, so values found in the procparam file override the one of currentParams - if( !Glib::file_test( sideProcessingParams, Glib::FILE_TEST_EXISTS ) || currentParams.load ( sideProcessingParams )) { - std::cerr << "Warning: sidecar file requested but not found for: " << sideProcessingParams << std::endl; - } else { - sideCarFound = true; - std::cout << " Merging sidecar procparams" << std::endl; - } - } - - if( processingParams.size() > i ) { - std::cout << " Merging procparams #" << i << std::endl; - processingParams[i]->applyTo(¤tParams); - } - - i++; - } while (i < processingParams.size() + (sideProcParams ? 1 : 0)); - - if( sideProcParams && !sideCarFound && skipIfNoSidecar ) { - delete ii; - errors++; - std::cerr << "Error: no sidecar procparams found for: " << inputFile << std::endl; - continue; - } - - job = rtengine::ProcessingJob::create (ii, currentParams); - - if( !job ) { - errors++; - std::cerr << "Error creating processing for: " << inputFile << std::endl; - ii->decreaseRef(); - continue; - } - - // Process image - rtengine::IImage16* resultImage = rtengine::processImage (job, errorCode, nullptr, options.tunnelMetaData); - - if( !resultImage ) { - errors++; - std::cerr << "Error processing: " << inputFile << std::endl; - rtengine::ProcessingJob::destroy( job ); - continue; - } - - // save image to disk - if( outputType == "jpg" ) { - errorCode = resultImage->saveAsJPEG( outputFile, compression, subsampling ); - } else if( outputType == "tif" ) { - errorCode = resultImage->saveAsTIFF( outputFile, bits, compression == 0 ); - } else if( outputType == "png" ) { - errorCode = resultImage->saveAsPNG( outputFile, compression, bits ); - } else { - errorCode = resultImage->saveToFile (outputFile); - } - - if(errorCode) { - errors++; - std::cerr << "Error saving to: " << outputFile << std::endl; - } else { - if( copyParamsFile ) { - Glib::ustring outputProcessingParams = outputFile + paramFileExtension; - currentParams.save( outputProcessingParams ); - } - } - - ii->decreaseRef(); - resultImage->free(); - } - - if (imgParams) { - imgParams->deleteInstance(); - delete imgParams; - } - - if (rawParams) { - rawParams->deleteInstance(); - delete rawParams; - } - - deleteProcParams(processingParams); - - return errors > 0 ? -2 : 0; + return ret; } diff --git a/rtgui/multilangmgr.cc b/rtgui/multilangmgr.cc index 4c0b78fc9..d8a619292 100644 --- a/rtgui/multilangmgr.cc +++ b/rtgui/multilangmgr.cc @@ -196,7 +196,8 @@ Glib::ustring MultiLangMgr::getOSUserLanguage () #elif defined (__linux__) || defined (__APPLE__) // Query the current locale and force decimal point to dot. - if (const char* locale = setlocale (LC_CTYPE, "")) { + const char *locale = getenv("LANG"); + if (locale || (locale = setlocale (LC_CTYPE, ""))) { langName = localeToLang (locale); } diff --git a/rtgui/mycurve.cc b/rtgui/mycurve.cc index 255818e7c..215eac429 100644 --- a/rtgui/mycurve.cc +++ b/rtgui/mycurve.cc @@ -21,7 +21,7 @@ #include #include -MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal(-1.f), listener(nullptr), cursor_type( CSArrow) +MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal(-1.f), listener(nullptr), cursor_type(CSArrow), graphW(0), graphH(0), mod_type(Gdk::MODIFIER_MASK), cursorX(0), cursorY(0), snapToMinDistX(0.0), snapToMinDistY(0.0), snapToValX(0.0), snapToValY(0.0) { graphX = get_allocation().get_width() - RADIUS * 2; @@ -33,19 +33,12 @@ MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal leftBar = nullptr; bottomBar = nullptr; colorProvider = nullptr; - sized = RS_Pending; snapToElmt = -100; curveIsDirty = true; edited_point = -1; - set_extension_events(Gdk::EXTENSION_EVENTS_ALL); -#if defined (__APPLE__) - // Workaround: disabling POINTER_MOTION_HINT_MASK as for gtk 2.24.22 the get_pointer() function is buggy for quartz and modifier mask is not updated correctly. - // This workaround should be removed when bug is fixed in GTK2 or when migrating to GTK3 - add_events(Gdk::EXPOSURE_MASK | Gdk::POINTER_MOTION_MASK | Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::BUTTON1_MOTION_MASK); -#else - add_events(Gdk::EXPOSURE_MASK | Gdk::POINTER_MOTION_MASK | Gdk::POINTER_MOTION_HINT_MASK | Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::BUTTON1_MOTION_MASK); -#endif + add_events(Gdk::POINTER_MOTION_MASK | Gdk::POINTER_MOTION_HINT_MASK | Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::BUTTON1_MOTION_MASK); + get_style_context()->add_class("drawingarea"); mcih = new MyCurveIdleHelper; mcih->myCurve = this; @@ -55,7 +48,6 @@ MyCurve::MyCurve () : pipetteR(-1.f), pipetteG(-1.f), pipetteB(-1.f), pipetteVal MyCurve::~MyCurve () { - if (mcih->pending) { mcih->destroyed = true; } else { @@ -70,21 +62,66 @@ int MyCurve::calcDimensions () newRequestedW = newRequestedH = get_allocation().get_width(); if (leftBar && !bottomBar) { - newRequestedH -= getBarWidth() + CBAR_MARGIN - RADIUS; + newRequestedH -= CBAR_WIDTH + CBAR_MARGIN - RADIUS; } if (!leftBar && bottomBar) { - newRequestedH += getBarWidth() + CBAR_MARGIN - RADIUS; + newRequestedH += CBAR_WIDTH + CBAR_MARGIN - RADIUS; } - graphW = newRequestedW - RADIUS - (leftBar ? (getBarWidth() + CBAR_MARGIN) : RADIUS); - graphH = newRequestedH - RADIUS - (bottomBar ? (getBarWidth() + CBAR_MARGIN) : RADIUS); + graphW = newRequestedW - RADIUS - (leftBar ? (CBAR_WIDTH + CBAR_MARGIN) : RADIUS); + graphH = newRequestedH - RADIUS - (bottomBar ? (CBAR_WIDTH + CBAR_MARGIN) : RADIUS); graphX = newRequestedW - RADIUS - graphW; graphY = RADIUS + graphH; return newRequestedH; } +Gtk::SizeRequestMode MyCurve::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_HEIGHT_FOR_WIDTH; +} + +void MyCurve::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const +{ + int minimumWidth = 0; + int naturalWidth = 0; + get_preferred_width_vfunc (minimumWidth, naturalWidth); + get_preferred_height_for_width_vfunc (minimumWidth, minimum_height, natural_height); +} + +void MyCurve::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + natural_width = minimum_width = GRAPH_SIZE + 2 * RADIUS; +} + +void MyCurve::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + minimum_height = width; + + if (leftBar && !bottomBar) { + minimum_height -= CBAR_WIDTH + CBAR_MARGIN - RADIUS; + } + + if (!leftBar && bottomBar) { + minimum_height += CBAR_WIDTH + CBAR_MARGIN - RADIUS; + } + + /* + graphW = width - RADIUS - (leftBar ? (CBAR_WIDTH+CBAR_MARGIN) : RADIUS); + graphH = minimum_height - RADIUS - (bottomBar ? (CBAR_WIDTH+CBAR_MARGIN) : RADIUS); + graphX = width - RADIUS - graphW; + graphY = RADIUS + graphH; + */ + + natural_height = minimum_height; +} + +void MyCurve::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + get_preferred_width_vfunc (minimum_width, natural_width); +} + void MyCurve::setColoredBar (ColoredBar *left, ColoredBar *bottom) { leftBar = left; @@ -137,14 +174,14 @@ bool MyCurve::snapCoordinateY(double testedVal, double realVal) float MyCurve::getVal(LUTf &curve, int x) { - if ((graphW - 2) == curve.getSize()) { + if (size_t(graphW - 2) == curve.getSize()) { return curve[x]; } else { return curve.getVal01(float(x) / (graphW - 3)); } } -void MyCurve::on_style_changed (const Glib::RefPtr& style) +void MyCurve::on_style_updated () { setDirty(true); queue_draw (); diff --git a/rtgui/mycurve.h b/rtgui/mycurve.h index ba3158ac9..8521b5748 100644 --- a/rtgui/mycurve.h +++ b/rtgui/mycurve.h @@ -30,12 +30,11 @@ #include "options.h" #define RADIUS 3 /** radius of the control points */ -#define CBAR_WIDTH_STD 13 /** width of the colored bar (border included) for standard themes */ -#define CBAR_WIDTH_SLIM 10 /** width of the colored bar (border included) for slim themes */ +#define CBAR_WIDTH 10 /** width of the colored bar (border included) */ #define CBAR_MARGIN 2 /** spacing between the colored bar and the graph */ #define SQUARE 2 /** half length of the square shape of the tangent handles */ #define MIN_DISTANCE 5 /** min distance between control points */ -#define GRAPH_SIZE 200 /** size of the curve editor graphic */ +#define GRAPH_SIZE 150 /** size of the curve editor graphic */ /** @brief Flat or Diagonal curve type For compatibility and simplicity reason, order shouldn't change, and must be identical to the order specified in the curveType widget @@ -53,18 +52,11 @@ enum SnapToType { ST_Neighbors /// Point snapped to the neighbor points }; -enum ResizeState { - RS_Pending = 1, /// Resize has to occurs - RS_Done = 2, /// Resize has been done - RS_Force = 4 /// Resize has to occurs even without CONFIGURE event -}; - class MyCurveIdleHelper; class CurveEditor; class MyCurve : public Gtk::DrawingArea, public BackBuffer, public ColorCaller, public CoordinateProvider { - friend class MyCurveIdleHelper; protected: @@ -75,7 +67,7 @@ protected: ColoredBar *leftBar; ColoredBar *bottomBar; CursorShape cursor_type; - int graphX, graphY, graphW, graphH; /// position and dimensions of the graphic area, excluding surrounding space for the points of for the colored bar + int graphX, graphY, graphW, graphH; /// position and dimensions of the graphic area, excluding surrounding space for the points or for the colored bar int prevGraphW, prevGraphH; /// previous inner width and height of the editor Gdk::ModifierType mod_type; int cursorX; /// X coordinate in the graph of the cursor @@ -98,7 +90,6 @@ protected: double snapToMinDistX, snapToMinDistY; double snapToValX, snapToValY; MyCurveIdleHelper* mcih; - enum ResizeState sized; bool curveIsDirty; int edited_point; // > -1 when a point is being numerically edited @@ -130,18 +121,15 @@ public: { return; } ; - void forceResize() - { - sized = RS_Force; - } void refresh(); void setCurveDirty () { curveIsDirty = true; } - void on_style_changed (const Glib::RefPtr& style); + void on_style_updated (); virtual std::vector getPoints () = 0; virtual void setPoints (const std::vector& p) = 0; + virtual bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) = 0; virtual bool handleEvents (GdkEvent* event) = 0; virtual void reset (const std::vector &resetCurve, double identityValue = 0.5) = 0; @@ -150,10 +138,11 @@ public: virtual void pipetteButton1Released(EditDataProvider *provider) = 0; virtual void pipetteDrag(EditDataProvider *provider, int modifierKey) = 0; - static int getBarWidth() - { - return options.slimUI ? CBAR_WIDTH_SLIM : CBAR_WIDTH_STD; - } + Gtk::SizeRequestMode get_request_mode_vfunc () const; + void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const; + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; }; class MyCurveIdleHelper diff --git a/rtgui/mydiagonalcurve.cc b/rtgui/mydiagonalcurve.cc index 969b197a2..d249d4439 100644 --- a/rtgui/mydiagonalcurve.cc +++ b/rtgui/mydiagonalcurve.cc @@ -21,7 +21,7 @@ #include #include -MyDiagonalCurve::MyDiagonalCurve () : activeParam(-1), bghistvalid(false) +MyDiagonalCurve::MyDiagonalCurve () : closest_point(0), clampedX(0.0), clampedY(0.0), deltaX(0.0), deltaY(0.0), distanceX(0.0), distanceY(0.0), ugpX(0.0), ugpY(0.0), activeParam(-1), bghistvalid(false) { graphW = get_allocation().get_width() - RADIUS * 2; @@ -49,6 +49,7 @@ MyDiagonalCurve::MyDiagonalCurve () : activeParam(-1), bghistvalid(false) MyDiagonalCurve::~MyDiagonalCurve () { + idle_register.destroy(); delete [] bghist; } @@ -210,32 +211,34 @@ void MyDiagonalCurve::draw (int handle) return; } - Glib::RefPtr win = get_window(); - - if (!surfaceCreated() || !win) { + if (!surfaceCreated()) { return; } // re-calculate curve if dimensions changed int currPointSize = point.getUpperBound(); - if (curveIsDirty || /*prevGraphW != graphW || prevGraphH != graphH ||*/ (currPointSize == 200 && (graphW - 3 > 200)) || (currPointSize > 200 && (graphW - 2 <= 200 || graphW - 3 != currPointSize))) { + if (curveIsDirty || /*prevGraphW != graphW || prevGraphH != graphH ||*/ (currPointSize == GRAPH_SIZE && (graphW - 3 > GRAPH_SIZE)) || (currPointSize > GRAPH_SIZE && (graphW - 2 <= GRAPH_SIZE || graphW - 3 != currPointSize))) { interpolate (); } currPointSize = point.getUpperBound(); - Gtk::StateType state = !is_sensitive() ? Gtk::STATE_INSENSITIVE : Gtk::STATE_NORMAL; + Gtk::StateFlags state = !is_sensitive() ? Gtk::STATE_FLAG_INSENSITIVE : Gtk::STATE_FLAG_NORMAL; - Glib::RefPtr style = get_style (); + Glib::RefPtr style = get_style_context(); Cairo::RefPtr cr = getContext(); cr->set_line_cap(Cairo::LINE_CAP_SQUARE); // clear background - Gdk::Color c = style->get_bg (Gtk::STATE_NORMAL); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); - cr->rectangle (0., 0., double(getWidth()), double(getHeight())); - cr->fill (); + cr->set_source_rgba (0., 0., 0., 0.); + cr->set_operator (Cairo::OPERATOR_CLEAR); + cr->paint (); + cr->set_operator (Cairo::OPERATOR_OVER); + + style->render_background(cr, graphX, graphY-graphH, graphW, graphH); + + Gdk::RGBA c; // histogram in the background if (bghistvalid) { @@ -251,8 +254,8 @@ void MyDiagonalCurve::draw (int handle) cr->set_line_width (1.0); double stepSize = (graphW - 3) / 255.0; cr->move_to ( double(graphX + 1), double(graphY - 1) ); - c = style->get_fg (Gtk::STATE_INSENSITIVE); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + c = style->get_color(state); + cr->set_source_rgba (c.get_red(), c.get_green(), c.get_blue(), 0.2); for (int i = 0; i < 256; i++) { double val = double(bghist[i]) * double(graphH - 2) / double(valMax); @@ -271,8 +274,8 @@ void MyDiagonalCurve::draw (int handle) // draw the grid lines: cr->set_line_width (1.0); - c = style->get_dark (state); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + c = style->get_border_color(state); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->set_antialias (Cairo::ANTIALIAS_NONE); for (int i = 0; i <= 10; i++) { @@ -290,7 +293,7 @@ void MyDiagonalCurve::draw (int handle) if (snapToElmt == -2) { cr->set_source_rgb (1.0, 0.0, 0.0); } else { - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); } std::valarray ds (1); @@ -310,7 +313,7 @@ void MyDiagonalCurve::draw (int handle) float graphY_ = float(graphY) - 1.5; if (curve.type == DCT_Parametric && activeParam > 0 && lpoint.getUpperBound() > 1 && upoint.getUpperBound() > 1) { - cr->set_source_rgba (0.0, 0.0, 0.0, 0.15); + cr->set_source_rgba (1.0, 1.0, 1.0, 0.1); cr->move_to (graphX_, getVal(upoint, 0) * -graphH_ + graphY_); for (int i = 1; i < graphW - 2; ++i) { @@ -365,8 +368,8 @@ void MyDiagonalCurve::draw (int handle) if (pipetteVal > -1.f) { cr->set_line_width (2.); - c = style->get_fg (state); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + c = style->get_color (state); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->move_to (double(graphX) + 1.5 + double(graphW - 3)*pipetteVal, double(graphY) - 1.5); cr->rel_line_to (0, double(-graphH + 3)); cr->stroke (); @@ -374,7 +377,7 @@ void MyDiagonalCurve::draw (int handle) } } - c = style->get_fg (state); + c = style->get_color (state); // draw the cage of the NURBS curve if (curve.type == DCT_NURBS) { @@ -383,7 +386,7 @@ void MyDiagonalCurve::draw (int handle) ch_ds[0] = 2; cr->set_dash (ch_ds, 0); cr->set_line_width (0.75); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); std::vector points = getPoints(); nbPoints = ((int)points.size() - 1) / 2; @@ -396,10 +399,10 @@ void MyDiagonalCurve::draw (int handle) double y2 = double(graphY) - 1.5 - double(graphH - 3) * points[pos + 1]; // project (curve.y.at(i), 0, 1, graphH); // set the color of the line when the point is snapped to the cage - if (curve.x.size() == nbPoints && snapToElmt >= 1000 && ((i == (snapToElmt - 1000)) || (i == (snapToElmt - 999)))) { + if (curve.x.size() == nbPoints && snapToElmt >= 1000 && ((int(i) == (snapToElmt - 1000)) || (int(i) == (snapToElmt - 999)))) { cr->set_source_rgb (1.0, 0.0, 0.0); } else { - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); } cr->move_to (x1, y1); @@ -412,7 +415,7 @@ void MyDiagonalCurve::draw (int handle) } // draw curve - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->move_to (graphX_, getVal(point, 0) * -graphH_ + graphY_); for (int i = 1; i < graphW - 2; ++i) { @@ -424,14 +427,14 @@ void MyDiagonalCurve::draw (int handle) // draw the left colored bar if (leftBar) { // first the background - int bWidth = getBarWidth(); + int bWidth = CBAR_WIDTH; BackBuffer *bb = this; - leftBar->setDrawRectangle(win, 1, graphY - graphH + 1, bWidth - 2, graphH - 2); - leftBar->expose(bb); + leftBar->setDrawRectangle(1, graphY - graphH + 1, bWidth - 2, graphH - 2); + leftBar->expose(*this, bb); // now the border - c = style->get_dark (state); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + c = style->get_border_color(state); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->rectangle(0.5, graphY - graphH + 0.5, bWidth - 1, graphH - 1); cr->stroke(); } @@ -439,21 +442,21 @@ void MyDiagonalCurve::draw (int handle) // draw the bottom colored bar if (bottomBar) { // first the background - int bWidth = getBarWidth(); + int bWidth = CBAR_WIDTH; BackBuffer *bb = this; - bottomBar->setDrawRectangle(win, graphX + 1, graphY + CBAR_MARGIN + 1, graphW - 2, bWidth - 2); - bottomBar->expose(bb); + bottomBar->setDrawRectangle(graphX + 1, graphY + CBAR_MARGIN + 1, graphW - 2, bWidth - 2); + bottomBar->expose(*this, bb); // now the border - c = style->get_dark (state); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + c = style->get_border_color (state); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->rectangle(graphX + 0.5, graphY + CBAR_MARGIN + 0.5, graphW - 1, bWidth - 1 ); cr->stroke(); } // draw bullets if (curve.type != DCT_Parametric) { - c = style->get_fg (state); + c = style->get_color (state); for (int i = 0; i < (int)curve.x.size(); ++i) { if (curve.x.at(i) == -1) { @@ -466,25 +469,25 @@ void MyDiagonalCurve::draw (int handle) if (i >= (pt - 1) && i <= (pt + 1)) { cr->set_source_rgb(1.0, 0.0, 0.0); } else { - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); } } else { if (i == handle || i == snapToElmt || i == edited_point) { cr->set_source_rgb (1.0, 0.0, 0.0); } else { - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); } } double x = double(graphX + 1) + double((graphW - 2) * curve.x.at(i)); // project (curve.x.at(i), 0, 1, graphW); double y = double(graphY - 1) - double((graphH - 2) * curve.y.at(i)); // project (curve.y.at(i), 0, 1, graphH); - cr->arc (x, y, RADIUS + 0.5, 0, 2 * M_PI); + cr->arc (x, y, RADIUS + 0.5, 0, 2 * rtengine::RT_PI); cr->fill (); if (i == edited_point) { cr->set_line_width(2.); - cr->arc (x, y, RADIUS + 3.5, 0, 2 * M_PI); + cr->arc (x, y, RADIUS + 3.5, 0, 2 * rtengine::RT_PI); cr->stroke(); cr->set_line_width(1.); } @@ -496,6 +499,26 @@ void MyDiagonalCurve::draw (int handle) queue_draw(); } +bool MyDiagonalCurve::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) +{ + Gtk::Allocation allocation = get_allocation(); + allocation.set_x(0); + allocation.set_y(0); + + // setDrawRectangle will allocate the backbuffer Surface + if (setDrawRectangle(Cairo::FORMAT_ARGB32, allocation)) { + setDirty(true); + + if (prevGraphW > GRAPH_SIZE || graphW > GRAPH_SIZE) { + curveIsDirty = true; + } + } + + draw (lit_point); + copySurface(cr); + return false; +} + /*void MyDiagonalCurve::graphSizeRequest (Gtk::Requisition* req) { req->width = getGraphMinSize(); // The real height request should take care of the presence of the vertical @@ -522,43 +545,6 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event) double minDistanceY = double(MIN_DISTANCE) / double(graphH - 1); switch (event->type) { - case Gdk::CONFIGURE: { - // Happen when the the window is resized - if (sized & (RS_Pending | RS_Force)) { - set_size_request(-1, calcDimensions()); - sized = RS_Done; - } - - retval = true; - break; - } - - case Gdk::EXPOSE: { - Glib::RefPtr win = get_window(); - - if (sized & (RS_Pending | RS_Force)) { - set_size_request(-1, calcDimensions()); - } - - sized = RS_Pending; - - // setDrawRectangle will allocate the backbuffer Surface - if (setDrawRectangle(win, 0, 0, get_allocation().get_width(), get_allocation().get_height())) { - setDirty(true); - - if (prevGraphW > 200 || graphW > 200) { - curveIsDirty = true; - } - } - - draw (lit_point); - GdkRectangle *rectangle = &(event->expose.area); - copySurface(win, rectangle); - - retval = true; - break; - } - case Gdk::BUTTON_PRESS: snapToElmt = -100; @@ -621,7 +607,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event) edited_point = lit_point; std::vector newBoundaries(2); - unsigned int size = curve.x.size(); + int size = curve.x.size(); if (edited_point == 0) { newBoundaries.at(0).minVal = 0.; @@ -670,7 +656,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event) draw (lit_point); std::vector newBoundaries; newBoundaries.resize(2); - unsigned int size = curve.x.size(); + int size = curve.x.size(); if (edited_point == 0) { newBoundaries.at(0).minVal = 0.; @@ -773,7 +759,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event) // Pointer can LEAVE even when dragging the point, so we don't modify the cursor in this case // The cursor will have to LEAVE another time after the drag... - if (!buttonPressed) + if (!buttonPressed) { if (grab_point == -1) { new_type = CSArrow; lit_point = -1; @@ -781,6 +767,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event) setDirty(true); draw (lit_point); } + } retval = true; break; @@ -803,7 +790,10 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event) int previous_lit_point = lit_point; findClosestPoint(); - if (cursorX < 0 || cursorX > graphW || cursorY < 0 || cursorY > graphH) { + { + int extendedGraphW = graphW + RADIUS + 1; + int extendedGraphH = graphH + RADIUS + 1; + if (cursorX < -RADIUS || cursorX > extendedGraphW || cursorY < -RADIUS || cursorY > extendedGraphH) { // the cursor has left the graph area new_type = CSArrow; lit_point = -1; @@ -816,6 +806,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event) new_type = CSPlus; lit_point = -1; } + } if (lit_point != previous_lit_point) { setDirty(true); @@ -898,7 +889,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event) } else { // snapping point to specific values if (snapTo && curve.x.at(grab_point) != -1.) { - if (grab_point > 0 && grab_point < (curve.y.size() - 1)) { + if (grab_point > 0 && unsigned(grab_point) < (curve.y.size() - 1)) { double prevX = curve.x.at(grab_point - 1); double prevY = curve.y.at(grab_point - 1); double nextX = curve.x.at(grab_point + 1); @@ -920,7 +911,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event) } } - if (grab_point < (curve.y.size() - 1)) { + if (grab_point < int(curve.y.size() - 1)) { int nextP = grab_point + 1; if (snapCoordinateY(curve.y.at(nextP), ugpY)) { @@ -972,7 +963,7 @@ bool MyDiagonalCurve::handleEvents (GdkEvent* event) if (new_type != cursor_type) { cursor_type = new_type; - cursorManager.setCursor(cursor_type); + CursorManager::setCursorOfMainWindow(get_window(), cursor_type); } return retval; @@ -1120,8 +1111,10 @@ bool MyDiagonalCurve::pipetteButton1Pressed(EditDataProvider *provider, int modi curve.y.insert (ity, 0); // the graph is refreshed only if a new point is created (snapped to a pixel) - curve.x.at(lit_point) = clampedX; - curve.y.at(lit_point) = clampedY; + if (lit_point >= 0) { + curve.x.at(lit_point) = clampedX; + curve.y.at(lit_point) = clampedY; + } if (lit_point > -1 && grab_point == -1 && coordinateAdjuster->is_visible()) { std::vector position; @@ -1218,7 +1211,7 @@ void MyDiagonalCurve::pipetteDrag(EditDataProvider *provider, int modifierKey) // snapping point to specific values if (snapTo && curve.x.at(grab_point) != -1.) { - if (grab_point > 0 && grab_point < (curve.y.size() - 1)) { + if (grab_point > 0 && unsigned(grab_point) < (curve.y.size() - 1)) { double prevX = curve.x.at(grab_point - 1); double prevY = curve.y.at(grab_point - 1); double nextX = curve.x.at(grab_point + 1); @@ -1240,7 +1233,7 @@ void MyDiagonalCurve::pipetteDrag(EditDataProvider *provider, int modifierKey) } } - if (grab_point < (curve.y.size() - 1)) { + if (grab_point < int(curve.y.size() - 1)) { int nextP = grab_point + 1; if (snapCoordinateY(curve.y.at(nextP), ugpY)) { @@ -1502,38 +1495,13 @@ void MyDiagonalCurve::setType (DiagonalCurveType t) void MyDiagonalCurve::setActiveParam (int ac) { - activeParam = ac; setDirty(true); queue_draw (); } -int diagonalmchistupdateUI (void* data) -{ - - MyCurveIdleHelper* mcih = static_cast(data); - - if (mcih->destroyed) { - if (mcih->pending == 1) { - delete mcih; - } else { - mcih->pending--; - } - - return 0; - } - - mcih->clearPixmap (); - mcih->myCurve->queue_draw (); - - mcih->pending--; - - return 0; -} - void MyDiagonalCurve::updateBackgroundHistogram (LUTu & hist) { - if (hist) { //memcpy (bghist, hist, 256*sizeof(unsigned int)); for (int i = 0; i < 256; i++) { @@ -1547,14 +1515,33 @@ void MyDiagonalCurve::updateBackgroundHistogram (LUTu & hist) } mcih->pending++; - // Can be done outside of the GUI thread - g_idle_add (diagonalmchistupdateUI, mcih); + const auto func = [](gpointer data) -> gboolean { + MyCurveIdleHelper* const mcih = static_cast(data); + + if (mcih->destroyed) { + if (mcih->pending == 1) { + delete mcih; + } else { + mcih->pending--; + } + + return 0; + } + + mcih->clearPixmap (); + mcih->myCurve->queue_draw (); + + mcih->pending--; + + return FALSE; + }; + + idle_register.add(func, mcih); } void MyDiagonalCurve::reset(const std::vector &resetCurve, double identityValue) { - stopNumericalAdjustment(); if (!resetCurve.empty()) { diff --git a/rtgui/mydiagonalcurve.h b/rtgui/mydiagonalcurve.h index 45b23e965..abb8d3dc6 100644 --- a/rtgui/mydiagonalcurve.h +++ b/rtgui/mydiagonalcurve.h @@ -48,6 +48,8 @@ public: class MyDiagonalCurve : public MyCurve { +private: + IdleRegister idle_register; protected: DiagonalCurveDescr curve; @@ -84,6 +86,7 @@ public: std::vector getPoints (); void setPoints (const std::vector& p); void setType (DiagonalCurveType t); + bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr); bool handleEvents (GdkEvent* event); void setActiveParam (int ac); void reset (const std::vector &resetCurve, double identityValue = 0.5); diff --git a/rtgui/myflatcurve.cc b/rtgui/myflatcurve.cc index 4ccc8b5bb..4da683b0c 100644 --- a/rtgui/myflatcurve.cc +++ b/rtgui/myflatcurve.cc @@ -21,7 +21,25 @@ #include #include -MyFlatCurve::MyFlatCurve () +MyFlatCurve::MyFlatCurve () : + clampedX(0.0), + clampedY(0.0), + deltaX(0.0), + deltaY(0.0), + distanceX(0.0), + distanceY(0.0), + ugpX(0.0), + ugpY(0.0), + leftTanX(0.0), + rightTanX(0.0), + preciseCursorX(0.0), + preciseCursorY(0.0), + minDistanceX(0.0), + minDistanceY(0.0), + deletedPointX(0.0), + leftTanHandle({0.0, 0.0}), + rightTanHandle({0.0, 0.0}), + draggingElement(false) { graphW = get_allocation().get_width() - RADIUS * 2; @@ -116,39 +134,41 @@ void MyFlatCurve::draw () return; } - Glib::RefPtr win = get_window(); - - if (!surfaceCreated() || !win) { + if (!surfaceCreated()) { return; } // re-calculate curve if dimensions changed int currPointSize = point.getUpperBound(); - if (curveIsDirty || /*prevGraphW != graphW || prevGraphH != graphH ||*/ (currPointSize == 200 && (graphW - 3 > 200)) || (currPointSize > 200 && (graphW - 2 <= 200 || graphW - 3 != currPointSize))) { + if (curveIsDirty || /*prevGraphW != graphW || prevGraphH != graphH ||*/ (currPointSize == GRAPH_SIZE && (graphW - 3 > GRAPH_SIZE)) || (currPointSize > GRAPH_SIZE && (graphW - 2 <= GRAPH_SIZE || graphW - 3 != currPointSize))) { interpolate (); } double innerW = double(graphW - 2); double innerH = double(graphH - 2); - Gtk::StateType state = !is_sensitive() ? Gtk::STATE_INSENSITIVE : Gtk::STATE_NORMAL; + Gtk::StateFlags state = !is_sensitive() ? Gtk::STATE_FLAG_INSENSITIVE : Gtk::STATE_FLAG_NORMAL; - Glib::RefPtr style = get_style (); + Glib::RefPtr style = get_style_context(); Cairo::RefPtr cr = getContext(); cr->set_line_cap(Cairo::LINE_CAP_SQUARE); // clear background - Gdk::Color c = style->get_bg (Gtk::STATE_NORMAL); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); - cr->rectangle (0, 0, double(getWidth()), double(getHeight())); - cr->fill (); + cr->set_source_rgba (0., 0., 0., 0.); + cr->set_operator (Cairo::OPERATOR_CLEAR); + cr->paint (); + cr->set_operator (Cairo::OPERATOR_OVER); + + style->render_background(cr, graphX, graphY-graphH, graphW, graphH); + + Gdk::RGBA c; cr->set_line_width (1.0); // draw f(x)=0.5 line - c = style->get_dark (state); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + c = style->get_border_color(state); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); std::valarray ds (1); ds[0] = 4; cr->set_dash (ds, 0); @@ -165,14 +185,14 @@ void MyFlatCurve::draw () // draw the left colored bar if (leftBar) { // first the background - int bWidth = getBarWidth(); + int bWidth = CBAR_WIDTH; BackBuffer *bb = this; - leftBar->setDrawRectangle(win, 1, graphY - graphH + 1, bWidth - 2, graphH - 2); - leftBar->expose(bb); + leftBar->setDrawRectangle(1, graphY - graphH + 1, bWidth - 2, graphH - 2); + leftBar->expose(*this, bb); // now the border - c = style->get_dark (state); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + c = style->get_border_color(state); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->rectangle(0.5, graphY - graphH + 0.5, bWidth - 1, graphH - 1); cr->stroke(); } @@ -180,14 +200,14 @@ void MyFlatCurve::draw () // draw the bottom colored bar if (bottomBar) { // first the background - int bWidth = getBarWidth(); + int bWidth = CBAR_WIDTH; BackBuffer *bb = this; - bottomBar->setDrawRectangle(win, graphX + 1, graphY + CBAR_MARGIN + 1, graphW - 2, bWidth - 2); - bottomBar->expose(bb); + bottomBar->setDrawRectangle(graphX + 1, graphY + CBAR_MARGIN + 1, graphW - 2, bWidth - 2); + bottomBar->expose(*this, bb); // now the border - c = style->get_dark (state); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + c = style->get_border_color(state); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->rectangle(graphX + 0.5, graphY + CBAR_MARGIN + 0.5, graphW - 1, bWidth - 1 ); cr->stroke(); } @@ -197,7 +217,7 @@ void MyFlatCurve::draw () // draw the pipette values if (pipetteR > -1.f || pipetteG > -1.f || pipetteB > -1.f) { cr->set_line_width (0.75); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); int n = 0; if (pipetteR > -1.f) { @@ -237,8 +257,8 @@ void MyFlatCurve::draw () if (pipetteVal > -1.f) { cr->set_line_width (2.); - c = style->get_fg (state); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + c = style->get_color (state); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->move_to (double(graphX) + 1.5 + double(graphW - 3)*pipetteVal, double(graphY) - 1.5); cr->rel_line_to (0, double(-graphH + 3)); cr->stroke (); @@ -329,8 +349,8 @@ void MyFlatCurve::draw () cr->set_line_cap(Cairo::LINE_CAP_SQUARE); // draw the graph's borders: - c = style->get_dark (state); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + c = style->get_border_color(state); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->rectangle(double(graphX) + 0.5, double(graphY) - 0.5, double(graphW - 1), double(-graphH + 1)); cr->stroke (); @@ -417,8 +437,8 @@ void MyFlatCurve::draw () } // draw curve - c = style->get_fg (state); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + c = style->get_color(state); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); float graphH_ = float(graphH - 3); float graphX_ = float(graphX) + 1.5; float graphY_ = float(graphY) - 1.5; @@ -448,19 +468,19 @@ void MyFlatCurve::draw () } else if (curve.y.at(i) == 0.5) { cr->set_source_rgb (0.0, 0.5, 0.0); } else { - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); } double x = double(graphX + 1) + innerW * curve.x.at(i); // project (curve.x.at(i), 0, 1, graphW); double y = double(graphY - 1) - innerH * curve.y.at(i); // project (curve.y.at(i), 0, 1, graphH); - cr->arc (x, y, (double)RADIUS, 0, 2 * M_PI); + cr->arc (x, y, (double)RADIUS, 0, 2 * rtengine::RT_PI); cr->fill (); if (i == edited_point) { cr->set_source_rgb (1.0, 0.0, 0.0); cr->set_line_width(2.); - cr->arc (x, y, RADIUS + 3.5, 0, 2 * M_PI); + cr->arc (x, y, RADIUS + 3.5, 0, 2 * rtengine::RT_PI); cr->stroke(); cr->set_line_width(1.); } @@ -500,6 +520,27 @@ void MyFlatCurve::draw () queue_draw(); } +bool MyFlatCurve::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) +{ + Gtk::Allocation allocation = get_allocation(); + allocation.set_x(0); + allocation.set_y(0); + + // setDrawRectangle will allocate the backbuffer Surface + if (setDrawRectangle(Cairo::FORMAT_ARGB32, allocation)) { + setDirty(true); + + if (prevGraphW > GRAPH_SIZE || graphW > GRAPH_SIZE) { + curveIsDirty = true; + } + } + + draw (); + copySurface(cr); + return false; +} + + /* * Return the X1, X2, Y position of the tangential handles. */ @@ -571,42 +612,6 @@ bool MyFlatCurve::handleEvents (GdkEvent* event) minDistanceY = double(MIN_DISTANCE) / double(graphH - 1); switch (event->type) { - case Gdk::CONFIGURE: { - // Happen when the the window is resized - if (sized & (RS_Pending | RS_Force)) { - set_size_request(-1, calcDimensions()); - sized = RS_Done; - } - - retval = true; - break; - } - - case Gdk::EXPOSE: { - Glib::RefPtr win = get_window(); - - if (sized & (RS_Pending | RS_Force)) { - set_size_request(-1, calcDimensions()); - } - - sized = RS_Pending; - - // setDrawRectangle will allocate the backbuffer Surface - if (setDrawRectangle(win, 0, 0, get_allocation().get_width(), get_allocation().get_height())) { - setDirty(true); - - if (prevGraphW > 200 || graphW > 200) { - curveIsDirty = true; - } - } - - draw (); - GdkRectangle *rectangle = &(event->expose.area); - copySurface(win, rectangle); - - retval = true; - break; - } case Gdk::BUTTON_PRESS: if (edited_point == -1) { //curve.type!=FCT_Parametric) { @@ -724,7 +729,7 @@ bool MyFlatCurve::handleEvents (GdkEvent* event) setDirty(true); draw (); std::vector newBoundaries(4); - unsigned int size = curve.x.size(); + int size = curve.x.size(); if (edited_point == 0) { newBoundaries.at(0).minVal = 0.; @@ -774,7 +779,7 @@ bool MyFlatCurve::handleEvents (GdkEvent* event) setDirty(true); draw (); std::vector newBoundaries(4); - unsigned int size = curve.x.size(); + int size = curve.x.size(); if (edited_point == 0) { newBoundaries.at(0).minVal = 0.; @@ -1195,7 +1200,7 @@ bool MyFlatCurve::handleEvents (GdkEvent* event) if (new_type != cursor_type) { cursor_type = new_type; - cursorManager.setCursor(cursor_type); + CursorManager::setCursorOfMainWindow(get_window(), cursor_type); } return retval; @@ -1207,6 +1212,7 @@ void MyFlatCurve::pipetteMouseOver (CurveEditor *ce, EditDataProvider *provider, // occurs when leaving the preview area -> cleanup the curve editor pipetteR = pipetteG = pipetteB = -1.f; lit_point = -1; + editedHandle = FCT_EditedHandle_None; return; } @@ -1308,7 +1314,7 @@ bool MyFlatCurve::pipetteButton1Pressed(EditDataProvider *provider, int modifier switch (area) { case (FCT_Area_Insertion): { - rtengine::FlatCurve rtCurve(getPoints(), 200); + rtengine::FlatCurve rtCurve(getPoints(), GRAPH_SIZE); std::vector::iterator itx, ity, itlt, itrt; int num = (int)curve.x.size(); @@ -1557,7 +1563,7 @@ void MyFlatCurve::movePoint(bool moveX, bool moveY, bool pipetteDrag) } if (curve.y.size() > 2) { - if (lit_point == (curve.y.size() - 1)) { + if (lit_point == int(curve.y.size()) - 1) { if (snapCoordinateY(curve.y.at(0), ugpY)) { snapToElmt = 0; } diff --git a/rtgui/myflatcurve.h b/rtgui/myflatcurve.h index 7949a4df6..65a1e2230 100644 --- a/rtgui/myflatcurve.h +++ b/rtgui/myflatcurve.h @@ -125,6 +125,7 @@ public: }; void setPoints (const std::vector& p); void setType (FlatCurveType t); + bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr); bool handleEvents (GdkEvent* event); void reset (const std::vector &resetCurve, double identityValue = 0.5); //void updateBackgroundHistogram (unsigned int* hist); diff --git a/rtgui/navigator.cc b/rtgui/navigator.cc index 2c724ee4c..7222436b6 100644 --- a/rtgui/navigator.cc +++ b/rtgui/navigator.cc @@ -35,6 +35,7 @@ Navigator::Navigator () : currentRGBUnit(options.navRGBUnit), currentHSVUnit(opt set_label (M("MAIN_MSG_NAVIGATOR")); Gtk::VBox* mbox = Gtk::manage (new Gtk::VBox ()); + mbox->set_name("Navigator"); previewWindow = Gtk::manage (new PreviewWindow ()); mbox->pack_start (*previewWindow, Gtk::PACK_SHRINK, 2); position = Gtk::manage (new Gtk::Label ()); @@ -52,15 +53,15 @@ Navigator::Navigator () : currentRGBUnit(options.navRGBUnit), currentHSVUnit(opt lLAB_L = Gtk::manage (new Gtk::Label (M("NAVIGATOR_LAB_L"))); // left-align labels - lR->set_alignment(Gtk::ALIGN_LEFT); - lG->set_alignment(Gtk::ALIGN_LEFT); - lB->set_alignment(Gtk::ALIGN_LEFT); - lH->set_alignment(Gtk::ALIGN_LEFT); - lS->set_alignment(Gtk::ALIGN_LEFT); - lV->set_alignment(Gtk::ALIGN_LEFT); - lLAB_A->set_alignment(Gtk::ALIGN_LEFT); - lLAB_B->set_alignment(Gtk::ALIGN_LEFT); - lLAB_L->set_alignment(Gtk::ALIGN_LEFT); + lR->set_alignment(Gtk::ALIGN_START); + lG->set_alignment(Gtk::ALIGN_START); + lB->set_alignment(Gtk::ALIGN_START); + lH->set_alignment(Gtk::ALIGN_START); + lS->set_alignment(Gtk::ALIGN_START); + lV->set_alignment(Gtk::ALIGN_START); + lLAB_A->set_alignment(Gtk::ALIGN_START); + lLAB_B->set_alignment(Gtk::ALIGN_START); + lLAB_L->set_alignment(Gtk::ALIGN_START); //values R = Gtk::manage (new Gtk::Label ()); @@ -74,17 +75,18 @@ Navigator::Navigator () : currentRGBUnit(options.navRGBUnit), currentHSVUnit(opt LAB_L = Gtk::manage (new Gtk::Label ()); // right-align values - R->set_alignment(Gtk::ALIGN_RIGHT); - G->set_alignment(Gtk::ALIGN_RIGHT); - B->set_alignment(Gtk::ALIGN_RIGHT); - H->set_alignment(Gtk::ALIGN_RIGHT); - S->set_alignment(Gtk::ALIGN_RIGHT); - V->set_alignment(Gtk::ALIGN_RIGHT); - LAB_A->set_alignment(Gtk::ALIGN_RIGHT); - LAB_B->set_alignment(Gtk::ALIGN_RIGHT); - LAB_L->set_alignment(Gtk::ALIGN_RIGHT); + R->set_alignment(Gtk::ALIGN_END); + G->set_alignment(Gtk::ALIGN_END); + B->set_alignment(Gtk::ALIGN_END); + H->set_alignment(Gtk::ALIGN_END); + S->set_alignment(Gtk::ALIGN_END); + V->set_alignment(Gtk::ALIGN_END); + LAB_A->set_alignment(Gtk::ALIGN_END); + LAB_B->set_alignment(Gtk::ALIGN_END); + LAB_L->set_alignment(Gtk::ALIGN_END); // set font family and size + /* Glib::ustring fontname; #ifdef WIN32 @@ -99,29 +101,35 @@ Navigator::Navigator () : currentRGBUnit(options.navRGBUnit), currentHSVUnit(opt fontname = "Menlo"; #endif - if (fontname != "") { - R->modify_font(Pango::FontDescription(fontname)); - G->modify_font(Pango::FontDescription(fontname)); - B->modify_font(Pango::FontDescription(fontname)); - H->modify_font(Pango::FontDescription(fontname)); - S->modify_font(Pango::FontDescription(fontname)); - V->modify_font(Pango::FontDescription(fontname)); - LAB_A->modify_font(Pango::FontDescription(fontname)); - LAB_B->modify_font(Pango::FontDescription(fontname)); - LAB_L->modify_font(Pango::FontDescription(fontname)); + if (0) { // (fontname!=""){ + Glib::RefPtr cssProvider = Gtk::CssProvider::create(); - lR->modify_font(Pango::FontDescription(fontname)); - lG->modify_font(Pango::FontDescription(fontname)); - lB->modify_font(Pango::FontDescription(fontname)); - lH->modify_font(Pango::FontDescription(fontname)); - lS->modify_font(Pango::FontDescription(fontname)); - lV->modify_font(Pango::FontDescription(fontname)); - lLAB_A->modify_font(Pango::FontDescription(fontname)); - lLAB_B->modify_font(Pango::FontDescription(fontname)); - lLAB_L->modify_font(Pango::FontDescription(fontname)); + if (cssProvider) { + cssProvider->load_from_data("Label { font-name: " + fontname + " }"); + R->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + G->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + B->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + H->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + S->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + V->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + LAB_A->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + LAB_B->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + LAB_L->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); - position->modify_font(Pango::FontDescription(fontname)); + lR->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + lG->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + lB->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + lH->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + lS->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + lV->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + lLAB_A->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + lLAB_B->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + lLAB_L->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + + position->get_style_context()->add_provider(cssProvider, GTK_STYLE_PROVIDER_PRIORITY_USER); + } } + */ // setup the tables Gtk::Table* table0 = Gtk::manage (new Gtk::Table (1, 3)); //rows, cols The main table container diff --git a/rtgui/options.cc b/rtgui/options.cc index 1c29387ac..7293a3a63 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -46,8 +46,7 @@ Glib::ustring Options::rtdir; Glib::ustring Options::cacheBaseDir; Options options; -Glib::ustring versionString = VERSION; -Glib::ustring versionSuffixString = VERSION_SUFFIX; +Glib::ustring versionString = RTVERSION; Glib::ustring paramFileExtension = ".pp3"; Options::Options () @@ -60,7 +59,7 @@ Options::Options () const char *DefaultLanguage = "English (US)"; -inline bool Options::checkProfilePath(Glib::ustring &path) +inline bool Options::checkProfilePath (Glib::ustring &path) { if (path.empty()) { return false; @@ -77,13 +76,13 @@ inline bool Options::checkProfilePath(Glib::ustring &path) return !p.empty() && Glib::file_test (path + paramFileExtension, Glib::FILE_TEST_EXISTS); } -bool Options::checkDirPath(Glib::ustring &path, Glib::ustring errString) +bool Options::checkDirPath (Glib::ustring &path, Glib::ustring errString) { if (Glib::file_test (path, Glib::FILE_TEST_EXISTS) && Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) { return true; } else { if (!errString.empty()) { - printf("%s\n", errString.c_str()); + printf ("%s\n", errString.c_str()); } return false; @@ -98,22 +97,22 @@ void Options::updatePaths() userProfilePath = ""; globalProfilePath = ""; - if (Glib::path_is_absolute(profilePath)) { + if (Glib::path_is_absolute (profilePath)) { // absolute path if (!checkDirPath (profilePath, "")) { g_mkdir_with_parents (profilePath.c_str (), 511); if (!checkDirPath (profilePath, "")) { // had problems with mkdir_with_parents return value on OS X, just check dir again - printf("Error: user's profiles' directory \"%s\" creation failed\n", profilePath.c_str()); + printf ("Error: user's profiles' directory \"%s\" creation failed\n", profilePath.c_str()); } } if (checkDirPath (profilePath, "Error: the specified user's profiles' path doesn't point to a directory or doesn't exist!\n")) { if (multiUser) { userProfilePath = profilePath; - tmpPath = Glib::build_filename(argv0, "profiles"); + tmpPath = Glib::build_filename (argv0, "profiles"); - if(checkDirPath (tmpPath, "Error: the global's profiles' path doesn't point to a directory or doesn't exist!\n")) { + if (checkDirPath (tmpPath, "Error: the global's profiles' path doesn't point to a directory or doesn't exist!\n")) { if (userProfilePath != tmpPath) { globalProfilePath = tmpPath; } @@ -122,40 +121,40 @@ void Options::updatePaths() globalProfilePath = profilePath; } } else { - tmpPath = Glib::build_filename(argv0, "profiles"); + tmpPath = Glib::build_filename (argv0, "profiles"); - if(checkDirPath (tmpPath, "Error: the global's profiles' path doesn't point to a directory or doesn't exist!\n")) { + if (checkDirPath (tmpPath, "Error: the global's profiles' path doesn't point to a directory or doesn't exist!\n")) { globalProfilePath = tmpPath; } } } else { // relative paths if (multiUser) { - tmpPath = Glib::build_filename(rtdir, profilePath); + tmpPath = Glib::build_filename (rtdir, profilePath); if (!checkDirPath (tmpPath, "")) { g_mkdir_with_parents (tmpPath.c_str (), 511); if (!checkDirPath (tmpPath, "")) { - printf("Error: user's profiles' directory \"%s\" creation failed\n", tmpPath.c_str()); + printf ("Error: user's profiles' directory \"%s\" creation failed\n", tmpPath.c_str()); } } - if(checkDirPath (tmpPath, "Error: the specified user's profiles' path doesn't point to a directory!\n")) { + if (checkDirPath (tmpPath, "Error: the specified user's profiles' path doesn't point to a directory!\n")) { userProfilePath = tmpPath; } - tmpPath = Glib::build_filename(argv0, "profiles"); + tmpPath = Glib::build_filename (argv0, "profiles"); - if(checkDirPath (tmpPath, "Error: the specified user's profiles' path doesn't point to a directory or doesn't exist!\n")) { + if (checkDirPath (tmpPath, "Error: the specified user's profiles' path doesn't point to a directory or doesn't exist!\n")) { globalProfilePath = tmpPath; } } else { // common directory // directory name set in options is ignored, we use the default directory name - tmpPath = Glib::build_filename(argv0, "profiles"); + tmpPath = Glib::build_filename (argv0, "profiles"); - if(checkDirPath (tmpPath, "Error: no global profiles' directory found!\n")) { + if (checkDirPath (tmpPath, "Error: no global profiles' directory found!\n")) { globalProfilePath = tmpPath; } } @@ -228,11 +227,11 @@ Glib::ustring Options::getPreferredProfilePath() /** @brief Get the absolute path of the given filename or the "Neutral" special value * *@param profName path + filename of the procparam to look for. A filename without path can be provided for backward compatibility. - * In this case, this parameter will be update with the new format. + * In this case, this parameter will be updated with the new format. *@return Send back the absolute path of the given filename or "Neutral" if "Neutral" has been set to profName. Implementor will have * to test for this particular value. If the absolute path is invalid (e.g. the file doesn't exist), it will return an empty string. */ -Glib::ustring Options::findProfilePath(Glib::ustring &profName) +Glib::ustring Options::findProfilePath (Glib::ustring &profName) { if (profName.empty()) { return ""; @@ -242,41 +241,45 @@ Glib::ustring Options::findProfilePath(Glib::ustring &profName) return profName; } - Glib::ustring p = profName.substr(0, 4); + if (profName == DEFPROFILE_DYNAMIC) { + return profName; + } + + Glib::ustring p = profName.substr (0, 4); if (p == "${U}") { // the path starts by the User virtual path p = getUserProfilePath(); - Glib::ustring fullPath = Glib::build_filename(p, profName.substr(5) + paramFileExtension); + Glib::ustring fullPath = Glib::build_filename (p, profName.substr (5) + paramFileExtension); if (!p.empty() && Glib::file_test (fullPath, Glib::FILE_TEST_EXISTS)) { - return Glib::path_get_dirname(fullPath); + return Glib::path_get_dirname (fullPath); } } else if (p == "${G}") { // the path starts by the User virtual path p = getGlobalProfilePath(); - Glib::ustring fullPath = Glib::build_filename(p, profName.substr(5) + paramFileExtension); + Glib::ustring fullPath = Glib::build_filename (p, profName.substr (5) + paramFileExtension); if (!p.empty() && Glib::file_test (fullPath, Glib::FILE_TEST_EXISTS)) { - return Glib::path_get_dirname(fullPath); + return Glib::path_get_dirname (fullPath); } } else { // compatibility case -> convert the path to the new format p = getUserProfilePath(); - Glib::ustring fullPath = Glib::build_filename(p, profName + paramFileExtension); + Glib::ustring fullPath = Glib::build_filename (p, profName + paramFileExtension); if (!p.empty() && Glib::file_test (fullPath, Glib::FILE_TEST_EXISTS)) { // update the profile path - profName = Glib::build_filename("${U}", profName); - return Glib::path_get_dirname(fullPath); + profName = Glib::build_filename ("${U}", profName); + return Glib::path_get_dirname (fullPath); } p = getGlobalProfilePath(); - fullPath = Glib::build_filename(p, profName + paramFileExtension); + fullPath = Glib::build_filename (p, profName + paramFileExtension); if (!p.empty() && Glib::file_test (fullPath, Glib::FILE_TEST_EXISTS)) { - profName = Glib::build_filename("${G}", profName); - return Glib::path_get_dirname(fullPath); + profName = Glib::build_filename ("${G}", profName); + return Glib::path_get_dirname (fullPath); } } @@ -287,13 +290,19 @@ Glib::ustring Options::findProfilePath(Glib::ustring &profName) void Options::setDefaults () { - font = "sans, 8"; - colorPickerFont = "sans, 8"; windowWidth = 1200; windowHeight = 680; windowX = 0; windowY = 0; windowMaximized = true; + windowMonitor = 0; + meowMonitor = -1; + meowFullScreen = false; + meowMaximized = true; + meowWidth = 1200; + meowHeight = 680; + meowX = 0; + meowY = 0; saveAsDialogWidth = 920; saveAsDialogHeight = 680; savesParamsAtExit = true; @@ -340,6 +349,10 @@ void Options::setDefaults () browserDirPanelOpened = true; editorFilmStripOpened = true; historyPanelWidth = 330; + fontFamily = "default"; + fontSize = 10; + CPFontFamily = "default"; + CPFontSize = 8; lastScale = 5; panAccelFactor = 5; rememberZoomAndPan = true; @@ -374,9 +387,7 @@ void Options::setDefaults () languageAutoDetect = langMgr.isOSLanguageDetectSupported(); lastSaveAsPath = ""; overwriteOutputFile = false; // if TRUE, existing output JPGs/PNGs are overwritten, instead of adding ..-1.jpg, -2.jpg etc. - theme = "25-Gray-Gray"; - slimUI = false; - useSystemTheme = false; + theme = "RawTherapee"; maxThumbnailHeight = 250; maxCacheEntries = 20000; thumbInterp = 1; @@ -477,6 +488,7 @@ void Options::setDefaults () fastexport_resize_dataspec = 3; fastexport_resize_width = 900; fastexport_resize_height = 900; + fastexport_use_fast_pipeline = true; clutsDir = "./cluts"; @@ -499,121 +511,126 @@ void Options::setDefaults () // Reminder: 0 = SET mode, 1 = ADD mode baBehav = { - 0, // ADDSET_TC_EXPCOMP - 0, // ADDSET_TC_BRIGHTNESS - 0, // ADDSET_TC_BLACKLEVEL - 0, // ADDSET_TC_CONTRAST - 0, // ADDSET_SH_HIGHLIGHTS - 0, // ADDSET_SH_SHADOWS - 0, // ADDSET_SH_LOCALCONTRAST - 0, // ADDSET_LC_BRIGHTNESS - 0, // ADDSET_LC_CONTRAST - 0, // ADDSET_SHARP_AMOUNT - 0, // ADDSET_WB_TEMPERATURE - 0, // ADDSET_WB_GREEN - 0, // ADDSET_ROTATE_DEGREE - 0, // ADDSET_DIST_AMOUNT - 0, // ADDSET_PERSPECTIVE - 0, // ADDSET_CA - 0, // ADDSET_VIGN_AMOUNT - 0, // ADDSET_VIGN_RADIUS - 0, // ADDSET_VIGN_STRENGTH - 0, // ADDSET_VIGN_CENTER - 0, // ADDSET_LC_CHROMATICITY - 0, // ADDSET_TC_SATURATION - 0, // ADDSET_TC_HLCOMPAMOUNT - 0, // ADDSET_TC_HLCOMPTHRESH - 0, // ADDSET_TC_SHCOMP - 0, // ADDSET_DIRPYREQ - 0, // ADDSET_DIRPYRDN_LUMA - 0, // ADDSET_DIRPYRDN_LUDET - 0, // ADDSET_DIRPYRDN_CHROMA - 0, // ADDSET_DIRPYRDN_CHROMARED - 0, // ADDSET_DIRPYRDN_CHROMABLUE - 0, // ADDSET_DIRPYRDN_GAMMA - 0, // ADDSET_CHMIXER - 0, // ADDSET_PREPROCESS_GREENEQUIL - 0, // ADDSET_PREPROCESS_LINEDENOISE - 0, // ADDSET_RAWCACORR - 0, // ADDSET_RAWEXPOS_LINEAR - 0, // ADDSET_RAWEXPOS_PRESER - 0, // ADDSET_RAWEXPOS_BLACKS - 0, // ADDSET_SHARPENEDGE_AMOUNT - 0, // ADDSET_SHARPENMICRO_AMOUNT - 0, // ADDSET_SHARPENEDGE_PASS - 0, // ADDSET_SHARPENMICRO_UNIFORMITY - 0, // ADDSET_VIBRANCE_PASTELS - 0, // ADDSET_VIBRANCE_SATURATED - 0, // ADDSET_FREE_OUPUT_GAMMA - 0, // ADDSET_FREE_OUTPUT_SLOPE - 0, // ADDSET_CAT_DEGREE - 0, // ADDSET_CAT_ADAPSCEN - 0, // ADDSET_CAT_ADAPLUM - 0, // ADDSET_CAT_LIGHT - 0, // ADDSET_CAT_RSTPRO - 0, // ADDSET_CAT_BADPIX - 0, // ADDSET_CAT_JLIGHT - 0, // ADDSET_CAT_CHROMA - 0, // ADDSET_CAT_CONTRAST - 0, // ADDSET_CAT_CHROMA_S - 0, // ADDSET_CAT_CHROMA_M - 0, // ADDSET_CAT_HUE - 0, // ADDSET_CAT_BADPIX - 0, // ADDSET_WB_EQUAL - 0, // ADDSET_GRADIENT_DEGREE - 0, // ADDSET_GRADIENT_FEATHER - 0, // ADDSET_GRADIENT_STRENGTH - 0, // ADDSET_GRADIENT_CENTER - 0, // ADDSET_PCVIGNETTE_STRENGTH - 0, // ADDSET_PCVIGNETTE_FEATHER - 0, // ADDSET_PCVIGNETTE_ROUNDNESS - 0, // ADDSET_BLACKWHITE_HUES - 0, // ADDSET_BLACKWHITE_GAMMA - 0, // ADDSET_DIRPYREQ_THRESHOLD - 0, // ADDSET_DIRPYREQ_SKINPROTECT - 0, // ADDSET_COLORTONING_SPLIT - 0, // ADDSET_DIRPYRDN_PASSES - 0, // ADDSET_RAWFFCLIPCONTROL - 0, // ADDSET_FILMSIMULATION_STRENGTH - 0, // ADDSET_WA - 0, // ADDSET_WA_THRESHOLD - 0, // ADDSET_WA_THRESHOLD2 - 0, // ADDSET_WA_THRES - 0, // ADDSET_WA_CHRO - 0, // ADDSET_WA_CHROMA - 0, // ADDSET_WA_CONTRAST - 0, // ADDSET_WA_SKINPROTECT - 0, // ADDSET_WA_RESCHRO - 0, // ADDSET_WA_RESCON - 0, // ADDSET_WA_RESCONH - 0, // ADDSET_WA_THRR - 0, // ADDSET_WA_THRRH - 0, // ADDSET_WA_SKYPROTECT - 0, // ADDSET_WA_EDGRAD - 0, // ADDSET_WA_EDGVAL - 0, // ADDSET_WA_STRENGTH - 0, // ADDSET_WA_EDGEDETECT - 0, // ADDSET_WA_EDGEDETECTTHR - 0, // ADDSET_WA_EDGEDETECTTHR2 - 0, // ADDSET_WA_TMRS - 0, // ADDSET_WA_GAMMA - 0, // ADDSET_RETI_STR - 0, // ADDSET_RETI_NEIGH - 0, // ADDSET_RETI_LIMD - 0, // ADDSET_RETI_GAIN - 0, // ADDSET_RETI_OFFS - 0, // ADDSET_RETI_VART - 0, // ADDSET_RETI_GAM - 0, // ADDSET_RETI_SLO + 1, // ADDSET_TC_EXPCOMP + 1, // ADDSET_TC_BRIGHTNESS + 1, // ADDSET_TC_BLACKLEVEL + 1, // ADDSET_TC_CONTRAST + 1, // ADDSET_SH_HIGHLIGHTS + 1, // ADDSET_SH_SHADOWS + 1, // ADDSET_SH_LOCALCONTRAST + 1, // ADDSET_LC_BRIGHTNESS + 1, // ADDSET_LC_CONTRAST + 1, // ADDSET_SHARP_AMOUNT + 1, // ADDSET_WB_TEMPERATURE + 1, // ADDSET_WB_GREEN + 1, // ADDSET_ROTATE_DEGREE + 1, // ADDSET_DIST_AMOUNT + 1, // ADDSET_PERSPECTIVE + 1, // ADDSET_CA + 1, // ADDSET_VIGN_AMOUNT + 1, // ADDSET_VIGN_RADIUS + 1, // ADDSET_VIGN_STRENGTH + 1, // ADDSET_VIGN_CENTER + 1, // ADDSET_LC_CHROMATICITY + 1, // ADDSET_TC_SATURATION + 1, // ADDSET_TC_HLCOMPAMOUNT + 1, // ADDSET_TC_HLCOMPTHRESH + 1, // ADDSET_TC_SHCOMP + 1, // ADDSET_DIRPYREQ + 1, // ADDSET_DIRPYRDN_LUMA + 1, // ADDSET_DIRPYRDN_LUDET + 1, // ADDSET_DIRPYRDN_CHROMA + 1, // ADDSET_DIRPYRDN_CHROMARED + 1, // ADDSET_DIRPYRDN_CHROMABLUE + 1, // ADDSET_DIRPYRDN_GAMMA + 1, // ADDSET_CHMIXER + 1, // ADDSET_PREPROCESS_GREENEQUIL + 1, // ADDSET_PREPROCESS_LINEDENOISE + 1, // ADDSET_RAWCACORR + 1, // ADDSET_RAWEXPOS_LINEAR + 1, // ADDSET_RAWEXPOS_PRESER + 1, // ADDSET_RAWEXPOS_BLACKS + 1, // ADDSET_SHARPENEDGE_AMOUNT + 1, // ADDSET_SHARPENMICRO_AMOUNT + 1, // ADDSET_SHARPENEDGE_PASS + 1, // ADDSET_SHARPENMICRO_UNIFORMITY + 1, // ADDSET_VIBRANCE_PASTELS + 1, // ADDSET_VIBRANCE_SATURATED + 1, // ADDSET_FREE_OUPUT_GAMMA + 1, // ADDSET_FREE_OUTPUT_SLOPE + 1, // ADDSET_CAT_DEGREE + 1, // ADDSET_CAT_ADAPSCEN + 1, // ADDSET_CAT_ADAPLUM + 1, // ADDSET_CAT_LIGHT + 1, // ADDSET_CAT_RSTPRO + 1, // ADDSET_CAT_BADPIX + 1, // ADDSET_CAT_JLIGHT + 1, // ADDSET_CAT_CHROMA + 1, // ADDSET_CAT_CONTRAST + 1, // ADDSET_CAT_CHROMA_S + 1, // ADDSET_CAT_CHROMA_M + 1, // ADDSET_CAT_HUE + 1, // ADDSET_CAT_BADPIX + 1, // ADDSET_WB_EQUAL + 1, // ADDSET_GRADIENT_DEGREE + 1, // ADDSET_GRADIENT_FEATHER + 1, // ADDSET_GRADIENT_STRENGTH + 1, // ADDSET_GRADIENT_CENTER + 1, // ADDSET_PCVIGNETTE_STRENGTH + 1, // ADDSET_PCVIGNETTE_FEATHER + 1, // ADDSET_PCVIGNETTE_ROUNDNESS + 1, // ADDSET_BLACKWHITE_HUES + 1, // ADDSET_BLACKWHITE_GAMMA + 1, // ADDSET_DIRPYREQ_THRESHOLD + 1, // ADDSET_DIRPYREQ_SKINPROTECT + 1, // ADDSET_COLORTONING_SPLIT + 1, // ADDSET_COLORTONING_SATTHRESHOLD + 1, // ADDSET_COLORTONING_SATOPACITY + 1, // ADDSET_COLORTONING_BALANCE + 1, // ADDSET_COLORTONING_STRENGTH + 1, // ADDSET_DIRPYRDN_PASSES + 1, // ADDSET_RAWFFCLIPCONTROL + 1, // ADDSET_FILMSIMULATION_STRENGTH + 1, // ADDSET_WA + 1, // ADDSET_WA_SKINPROTECT + 1, // ADDSET_WA_THRESHOLD2 + 1, // ADDSET_WA_THRR + 1, // ADDSET_WA_THRRH + 1, // ADDSET_WA_THRESHOLD + 1, // ADDSET_WA_THRESHOLD2 + 1, // ADDSET_WA_CHRO + 1, // ADDSET_WA_CHROMA + 1, // ADDSET_WA_CONTRAST + 1, // ADDSET_WA_RESCON + 1, // ADDSET_WA_RESCONH + 1, // ADDSET_WA_RESCHRO + 1, // ADDSET_WA_SKYPROTECT + 1, // ADDSET_WA_EDGRAD + 1, // ADDSET_WA_EDGVAL + 1, // ADDSET_WA_STRENGTH + 1, // ADDSET_WA_EDGEDETECT + 1, // ADDSET_WA_EDGEDETECTTHR + 1, // ADDSET_WA_EDGEDETECTTHR2 + 1, // ADDSET_WA_TMRS + 1, // ADDSET_WA_GAMMA + 1, // ADDSET_RETI_STR + 1, // ADDSET_RETI_NEIGH + 1, // ADDSET_RETI_LIMD + 1, // ADDSET_RETI_GAIN + 1, // ADDSET_RETI_OFFS + 1, // ADDSET_RETI_VART + 1, // ADDSET_RETI_GAM + 1, // ADDSET_RETI_SLO + 1, // ADDSET_WB_TEMPBIAS }; rtSettings.darkFramesPath = ""; rtSettings.flatFieldsPath = ""; #ifdef WIN32 - const gchar* sysRoot = g_getenv("SystemRoot"); // Returns e.g. "c:\Windows" + const gchar* sysRoot = g_getenv ("SystemRoot"); // Returns e.g. "c:\Windows" if (sysRoot != NULL) { - rtSettings.iccDirectory = Glib::ustring(sysRoot) + Glib::ustring("\\System32\\spool\\drivers\\color"); + rtSettings.iccDirectory = Glib::ustring (sysRoot) + Glib::ustring ("\\System32\\spool\\drivers\\color"); } else { rtSettings.iccDirectory = "C:\\WINDOWS\\System32\\spool\\drivers\\color"; } @@ -623,15 +640,18 @@ void Options::setDefaults () #else rtSettings.iccDirectory = "/usr/share/color/icc"; #endif - rtSettings.viewingdevice = 0; - rtSettings.viewingdevicegrey = 3; - rtSettings.viewinggreySc = 1; +// rtSettings.viewingdevice = 0; +// rtSettings.viewingdevicegrey = 3; + // rtSettings.viewinggreySc = 1; rtSettings.leveldnv = 2; rtSettings.leveldnti = 0; rtSettings.leveldnaut = 0; rtSettings.leveldnliss = 0; rtSettings.leveldnautsimpl = 0; + rtSettings.printerProfile = Glib::ustring(); + rtSettings.printerIntent = rtengine::RI_RELATIVE; + rtSettings.printerBPC = true; rtSettings.monitorProfile = Glib::ustring(); rtSettings.monitorIntent = rtengine::RI_RELATIVE; rtSettings.monitorBPC = true; @@ -703,6 +723,8 @@ void Options::setDefaults () lastVibranceCurvesDir = ""; lastProfilingReferenceDir = ""; lastBWCurvesDir = ""; + lastLensProfileDir = ""; + gimpPluginShowInfoDialog = true; maxRecentFolders = 15; } @@ -718,17 +740,17 @@ void Options::filterOutParsedExtensions () for (unsigned int i = 0; i < parseExtensions.size(); i++) if (parseExtensionsEnabled[i]) { - parsedExtensions.push_back(parseExtensions[i].lowercase()); + parsedExtensions.push_back (parseExtensions[i].lowercase()); } } int Options::readFromFile (Glib::ustring fname) { - setlocale(LC_NUMERIC, "C"); // to set decimal point to "." + setlocale (LC_NUMERIC, "C"); // to set decimal point to "." Glib::KeyFile keyFile; - if( !Glib::file_test(fname, Glib::FILE_TEST_EXISTS)) { + if ( !Glib::file_test (fname, Glib::FILE_TEST_EXISTS)) { return 1; } @@ -743,7 +765,7 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("General", "StartupDirectory")) { - if ( keyFile.get_string ("General", "StartupDirectory") == "home") { + if ( keyFile.get_string ("General", "StartupDirectory") == "home") { startupDir = STARTUPDIR_HOME; } else if ( keyFile.get_string ("General", "StartupDirectory") == "current") { startupDir = STARTUPDIR_CURRENT; @@ -755,19 +777,19 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("General", "StartupPath")) { - startupPath = keyFile.get_string ("General", "StartupPath"); + startupPath = keyFile.get_string ("General", "StartupPath"); } if (keyFile.has_key ("General", "DateFormat")) { - dateFormat = keyFile.get_string ("General", "DateFormat"); + dateFormat = keyFile.get_string ("General", "DateFormat"); } if (keyFile.has_key ("General", "AdjusterMinDelay")) { - adjusterMinDelay = keyFile.get_integer ("General", "AdjusterMinDelay"); + adjusterMinDelay = keyFile.get_integer ("General", "AdjusterMinDelay"); } if (keyFile.has_key ("General", "AdjusterMaxDelay")) { - adjusterMaxDelay = keyFile.get_integer ("General", "AdjusterMaxDelay"); + adjusterMaxDelay = keyFile.get_integer ("General", "AdjusterMaxDelay"); } if (keyFile.has_key ("General", "StoreLastProfile")) { @@ -775,15 +797,15 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("General", "MultiUser")) { - multiUser = keyFile.get_boolean ("General", "MultiUser"); + multiUser = keyFile.get_boolean ("General", "MultiUser"); } if (keyFile.has_key ("General", "Version")) { - version = keyFile.get_string ("General", "Version"); + version = keyFile.get_string ("General", "Version"); } if (keyFile.has_key ("General", "Language")) { - language = keyFile.get_string ("General", "Language"); + language = keyFile.get_string ("General", "Language"); } if (keyFile.has_key ("General", "LanguageAutoDetect")) { @@ -791,63 +813,55 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("General", "Theme")) { - theme = keyFile.get_string ("General", "Theme"); + theme = keyFile.get_string ("General", "Theme"); } - if (keyFile.has_key ("General", "SlimUI")) { - slimUI = keyFile.get_boolean ("General", "SlimUI"); + if ( keyFile.has_key ("General", "DarkFramesPath")) { + rtSettings.darkFramesPath = keyFile.get_string ("General", "DarkFramesPath"); } - if (keyFile.has_key ("General", "UseSystemTheme")) { - useSystemTheme = keyFile.get_boolean ("General", "UseSystemTheme"); + if ( keyFile.has_key ("General", "FlatFieldsPath")) { + rtSettings.flatFieldsPath = keyFile.get_string ("General", "FlatFieldsPath"); } - if( keyFile.has_key ("General", "DarkFramesPath")) { - rtSettings.darkFramesPath = keyFile.get_string("General", "DarkFramesPath"); - } - - if( keyFile.has_key ("General", "FlatFieldsPath")) { - rtSettings.flatFieldsPath = keyFile.get_string("General", "FlatFieldsPath"); - } - - if( keyFile.has_key ("General", "Verbose")) { + if ( keyFile.has_key ("General", "Verbose")) { rtSettings.verbose = keyFile.get_boolean ( "General", "Verbose"); } if (keyFile.has_key ("General", "BotLeft")) { - rtSettings.bot_left = keyFile.get_double("General", "BotLeft"); + rtSettings.bot_left = keyFile.get_double ("General", "BotLeft"); } if (keyFile.has_key ("General", "TopLeft")) { - rtSettings.top_left = keyFile.get_double("General", "TopLeft"); + rtSettings.top_left = keyFile.get_double ("General", "TopLeft"); } if (keyFile.has_key ("General", "TopRight")) { - rtSettings.top_right = keyFile.get_double("General", "TopRight"); + rtSettings.top_right = keyFile.get_double ("General", "TopRight"); } if (keyFile.has_key ("General", "BotRight")) { - rtSettings.bot_right = keyFile.get_double("General", "BotRight"); + rtSettings.bot_right = keyFile.get_double ("General", "BotRight"); } if (keyFile.has_key ("General", "EDdetec")) { - rtSettings.ed_detec = keyFile.get_double("General", "EDdetec"); + rtSettings.ed_detec = keyFile.get_double ("General", "EDdetec"); } if (keyFile.has_key ("General", "EDdetecStr")) { - rtSettings.ed_detecStr = keyFile.get_double("General", "EDdetecStr"); + rtSettings.ed_detecStr = keyFile.get_double ("General", "EDdetecStr"); } if (keyFile.has_key ("General", "EDLow")) { - rtSettings.ed_low = keyFile.get_double("General", "EDLow"); + rtSettings.ed_low = keyFile.get_double ("General", "EDLow"); } if (keyFile.has_key ("General", "EDLipinfl")) { - rtSettings.ed_lipinfl = keyFile.get_double("General", "EDLipinfl"); + rtSettings.ed_lipinfl = keyFile.get_double ("General", "EDLipinfl"); } if (keyFile.has_key ("General", "EDLipampl")) { - rtSettings.ed_lipampl = keyFile.get_double("General", "EDLipampl"); + rtSettings.ed_lipampl = keyFile.get_double ("General", "EDLipampl"); } @@ -855,45 +869,45 @@ int Options::readFromFile (Glib::ustring fname) if (keyFile.has_group ("External Editor")) { if (keyFile.has_key ("External Editor", "EditorKind")) { - editorToSendTo = keyFile.get_integer ("External Editor", "EditorKind"); + editorToSendTo = keyFile.get_integer ("External Editor", "EditorKind"); } if (keyFile.has_key ("External Editor", "GimpDir")) { - gimpDir = keyFile.get_string ("External Editor", "GimpDir"); + gimpDir = keyFile.get_string ("External Editor", "GimpDir"); } if (keyFile.has_key ("External Editor", "PhotoshopDir")) { - psDir = keyFile.get_string ("External Editor", "PhotoshopDir"); + psDir = keyFile.get_string ("External Editor", "PhotoshopDir"); } if (keyFile.has_key ("External Editor", "CustomEditor")) { - customEditorProg = keyFile.get_string ("External Editor", "CustomEditor"); + customEditorProg = keyFile.get_string ("External Editor", "CustomEditor"); } } if (keyFile.has_group ("Output")) { if (keyFile.has_key ("Output", "Format")) { - saveFormat.format = keyFile.get_string ("Output", "Format"); + saveFormat.format = keyFile.get_string ("Output", "Format"); } if (keyFile.has_key ("Output", "JpegQuality")) { - saveFormat.jpegQuality = keyFile.get_integer ("Output", "JpegQuality"); + saveFormat.jpegQuality = keyFile.get_integer ("Output", "JpegQuality"); } if (keyFile.has_key ("Output", "JpegSubSamp")) { - saveFormat.jpegSubSamp = keyFile.get_integer ("Output", "JpegSubSamp"); + saveFormat.jpegSubSamp = keyFile.get_integer ("Output", "JpegSubSamp"); } if (keyFile.has_key ("Output", "PngCompression")) { - saveFormat.pngCompression = keyFile.get_integer ("Output", "PngCompression"); + saveFormat.pngCompression = keyFile.get_integer ("Output", "PngCompression"); } if (keyFile.has_key ("Output", "PngBps")) { - saveFormat.pngBits = keyFile.get_integer ("Output", "PngBps"); + saveFormat.pngBits = keyFile.get_integer ("Output", "PngBps"); } if (keyFile.has_key ("Output", "TiffBps")) { - saveFormat.tiffBits = keyFile.get_integer ("Output", "TiffBps"); + saveFormat.tiffBits = keyFile.get_integer ("Output", "TiffBps"); } if (keyFile.has_key ("Output", "TiffUncompressed")) { @@ -901,32 +915,32 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("Output", "SaveProcParams")) { - saveFormat.saveParams = keyFile.get_boolean ("Output", "SaveProcParams"); + saveFormat.saveParams = keyFile.get_boolean ("Output", "SaveProcParams"); } if (keyFile.has_key ("Output", "FormatBatch")) { - saveFormatBatch.format = keyFile.get_string ("Output", "FormatBatch"); + saveFormatBatch.format = keyFile.get_string ("Output", "FormatBatch"); } if (keyFile.has_key ("Output", "JpegQualityBatch")) { - saveFormatBatch.jpegQuality = keyFile.get_integer ("Output", "JpegQualityBatch"); + saveFormatBatch.jpegQuality = keyFile.get_integer ("Output", "JpegQualityBatch"); } if (keyFile.has_key ("Output", "JpegSubSampBatch")) { - saveFormatBatch.jpegSubSamp = keyFile.get_integer ("Output", "JpegSubSampBatch"); + saveFormatBatch.jpegSubSamp = keyFile.get_integer ("Output", "JpegSubSampBatch"); } if (keyFile.has_key ("Output", "PngCompressionBatch")) { - saveFormatBatch.pngCompression = keyFile.get_integer ("Output", "PngCompressionBatch"); + saveFormatBatch.pngCompression = keyFile.get_integer ("Output", "PngCompressionBatch"); } if (keyFile.has_key ("Output", "PngBpsBatch")) { - saveFormatBatch.pngBits = keyFile.get_integer ("Output", "PngBpsBatch"); + saveFormatBatch.pngBits = keyFile.get_integer ("Output", "PngBpsBatch"); } if (keyFile.has_key ("Output", "TiffBpsBatch")) { - saveFormatBatch.tiffBits = keyFile.get_integer ("Output", "TiffBpsBatch"); + saveFormatBatch.tiffBits = keyFile.get_integer ("Output", "TiffBpsBatch"); } if (keyFile.has_key ("Output", "TiffUncompressedBatch")) { @@ -934,135 +948,135 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("Output", "SaveProcParamsBatch")) { - saveFormatBatch.saveParams = keyFile.get_boolean ("Output", "SaveProcParamsBatch"); + saveFormatBatch.saveParams = keyFile.get_boolean ("Output", "SaveProcParamsBatch"); } if (keyFile.has_key ("Output", "Path")) { - savePathTemplate = keyFile.get_string ("Output", "Path"); + savePathTemplate = keyFile.get_string ("Output", "Path"); } if (keyFile.has_key ("Output", "PathTemplate")) { - savePathTemplate = keyFile.get_string ("Output", "PathTemplate"); + savePathTemplate = keyFile.get_string ("Output", "PathTemplate"); } if (keyFile.has_key ("Output", "PathFolder")) { - savePathFolder = keyFile.get_string ("Output", "PathFolder"); + savePathFolder = keyFile.get_string ("Output", "PathFolder"); } if (keyFile.has_key ("Output", "AutoSuffix")) { - autoSuffix = keyFile.get_boolean("Output", "AutoSuffix"); + autoSuffix = keyFile.get_boolean ("Output", "AutoSuffix"); } if (keyFile.has_key ("Output", "ForceFormatOpts")) { - forceFormatOpts = keyFile.get_boolean("Output", "ForceFormatOpts"); + forceFormatOpts = keyFile.get_boolean ("Output", "ForceFormatOpts"); } if (keyFile.has_key ("Output", "SaveMethodNum")) { - saveMethodNum = keyFile.get_integer("Output", "SaveMethodNum"); + saveMethodNum = keyFile.get_integer ("Output", "SaveMethodNum"); } if (keyFile.has_key ("Output", "UsePathTemplate")) { - saveUsePathTemplate = keyFile.get_boolean("Output", "UsePathTemplate"); + saveUsePathTemplate = keyFile.get_boolean ("Output", "UsePathTemplate"); } if (keyFile.has_key ("Output", "LastSaveAsPath")) { - lastSaveAsPath = keyFile.get_string ("Output", "LastSaveAsPath"); + lastSaveAsPath = keyFile.get_string ("Output", "LastSaveAsPath"); } if (keyFile.has_key ("Output", "OverwriteOutputFile")) { - overwriteOutputFile = keyFile.get_boolean("Output", "OverwriteOutputFile"); + overwriteOutputFile = keyFile.get_boolean ("Output", "OverwriteOutputFile"); } if (keyFile.has_key ("Output", "TunnelMetaData")) { - tunnelMetaData = keyFile.get_boolean("Output", "TunnelMetaData"); + tunnelMetaData = keyFile.get_boolean ("Output", "TunnelMetaData"); } } if (keyFile.has_group ("Profiles")) { if (keyFile.has_key ("Profiles", "Directory")) { - profilePath = keyFile.get_string ("Profiles", "Directory"); + profilePath = keyFile.get_string ("Profiles", "Directory"); } if (keyFile.has_key ("Profiles", "UseBundledProfiles")) { - useBundledProfiles = keyFile.get_boolean ("Profiles", "UseBundledProfiles"); + useBundledProfiles = keyFile.get_boolean ("Profiles", "UseBundledProfiles"); } if (keyFile.has_key ("Profiles", "LoadSaveProfilePath")) { - loadSaveProfilePath = keyFile.get_string ("Profiles", "LoadSaveProfilePath"); + loadSaveProfilePath = keyFile.get_string ("Profiles", "LoadSaveProfilePath"); } if (keyFile.has_key ("Profiles", "RawDefault")) { - defProfRaw = keyFile.get_string ("Profiles", "RawDefault"); + defProfRaw = keyFile.get_string ("Profiles", "RawDefault"); } if (keyFile.has_key ("Profiles", "ImgDefault")) { - defProfImg = keyFile.get_string ("Profiles", "ImgDefault"); + defProfImg = keyFile.get_string ("Profiles", "ImgDefault"); } if (keyFile.has_key ("Profiles", "FilledProfile")) { - filledProfile = keyFile.get_boolean ("Profiles", "FilledProfile"); + filledProfile = keyFile.get_boolean ("Profiles", "FilledProfile"); } if (keyFile.has_key ("Profiles", "SaveParamsWithFile")) { - saveParamsFile = keyFile.get_boolean ("Profiles", "SaveParamsWithFile"); + saveParamsFile = keyFile.get_boolean ("Profiles", "SaveParamsWithFile"); } if (keyFile.has_key ("Profiles", "SaveParamsToCache")) { - saveParamsCache = keyFile.get_boolean ("Profiles", "SaveParamsToCache"); + saveParamsCache = keyFile.get_boolean ("Profiles", "SaveParamsToCache"); } if (keyFile.has_key ("Profiles", "LoadParamsFromLocation")) { - paramsLoadLocation = (PPLoadLocation)keyFile.get_integer ("Profiles", "LoadParamsFromLocation"); + paramsLoadLocation = (PPLoadLocation)keyFile.get_integer ("Profiles", "LoadParamsFromLocation"); } if (keyFile.has_key ("Profiles", "CustomProfileBuilder")) { - CPBPath = keyFile.get_string ("Profiles", "CustomProfileBuilder"); // for backward compatibility only + CPBPath = keyFile.get_string ("Profiles", "CustomProfileBuilder"); // for backward compatibility only } if (keyFile.has_key ("Profiles", "CustomProfileBuilderPath")) { - CPBPath = keyFile.get_string ("Profiles", "CustomProfileBuilderPath"); + CPBPath = keyFile.get_string ("Profiles", "CustomProfileBuilderPath"); } if (keyFile.has_key ("Profiles", "CustomProfileBuilderKeys")) { - CPBKeys = (CPBKeyType)keyFile.get_integer ("Profiles", "CustomProfileBuilderKeys"); + CPBKeys = (CPBKeyType)keyFile.get_integer ("Profiles", "CustomProfileBuilderKeys"); } } if (keyFile.has_group ("File Browser")) { if (keyFile.has_key ("File Browser", "ThumbnailSize")) { - thumbSize = keyFile.get_integer ("File Browser", "ThumbnailSize"); + thumbSize = keyFile.get_integer ("File Browser", "ThumbnailSize"); } if (keyFile.has_key ("File Browser", "ThumbnailSizeTab")) { - thumbSizeTab = keyFile.get_integer ("File Browser", "ThumbnailSizeTab"); + thumbSizeTab = keyFile.get_integer ("File Browser", "ThumbnailSizeTab"); } if (keyFile.has_key ("File Browser", "ThumbnailSizeQueue")) { - thumbSizeQueue = keyFile.get_integer ("File Browser", "ThumbnailSizeQueue"); + thumbSizeQueue = keyFile.get_integer ("File Browser", "ThumbnailSizeQueue"); } if (keyFile.has_key ("File Browser", "SameThumbSize")) { - sameThumbSize = keyFile.get_integer ("File Browser", "SameThumbSize"); + sameThumbSize = keyFile.get_integer ("File Browser", "SameThumbSize"); } if (keyFile.has_key ("File Browser", "BrowseOnlyRaw")) { - fbOnlyRaw = keyFile.get_boolean ("File Browser", "BrowseOnlyRaw"); + fbOnlyRaw = keyFile.get_boolean ("File Browser", "BrowseOnlyRaw"); } if (keyFile.has_key ("File Browser", "BrowserShowsDate")) { - fbShowDateTime = keyFile.get_boolean ("File Browser", "BrowserShowsDate"); + fbShowDateTime = keyFile.get_boolean ("File Browser", "BrowserShowsDate"); } if (keyFile.has_key ("File Browser", "BrowserShowsExif")) { - fbShowBasicExif = keyFile.get_boolean ("File Browser", "BrowserShowsExif"); + fbShowBasicExif = keyFile.get_boolean ("File Browser", "BrowserShowsExif"); } if (keyFile.has_key ("File Browser", "BrowserShowsExpComp")) { - fbShowExpComp = keyFile.get_boolean ("File Browser", "BrowserShowsExpComp"); + fbShowExpComp = keyFile.get_boolean ("File Browser", "BrowserShowsExpComp"); } if (keyFile.has_key ("File Browser", "BrowserShowsHidden")) { - fbShowHidden = keyFile.get_boolean ("File Browser", "BrowserShowsHidden"); + fbShowHidden = keyFile.get_boolean ("File Browser", "BrowserShowsHidden"); } if (keyFile.has_key ("File Browser", "MaxPreviewHeight")) { @@ -1070,31 +1084,31 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("File Browser", "MaxCacheEntries")) { - maxCacheEntries = keyFile.get_integer ("File Browser", "MaxCacheEntries"); + maxCacheEntries = keyFile.get_integer ("File Browser", "MaxCacheEntries"); } if (keyFile.has_key ("File Browser", "ParseExtensions")) { - parseExtensions = keyFile.get_string_list ("File Browser", "ParseExtensions"); + parseExtensions = keyFile.get_string_list ("File Browser", "ParseExtensions"); } if (keyFile.has_key ("File Browser", "ParseExtensionsEnabled")) { - parseExtensionsEnabled = keyFile.get_integer_list ("File Browser", "ParseExtensionsEnabled"); + parseExtensionsEnabled = keyFile.get_integer_list ("File Browser", "ParseExtensionsEnabled"); } if (keyFile.has_key ("File Browser", "ThumbnailArrangement")) { - fbArrangement = keyFile.get_integer ("File Browser", "ThumbnailArrangement"); + fbArrangement = keyFile.get_integer ("File Browser", "ThumbnailArrangement"); } if (keyFile.has_key ("File Browser", "ThumbnailInterpolation")) { - thumbInterp = keyFile.get_integer ("File Browser", "ThumbnailInterpolation"); + thumbInterp = keyFile.get_integer ("File Browser", "ThumbnailInterpolation"); } if (keyFile.has_key ("File Browser", "FavoriteDirs")) { - favoriteDirs = keyFile.get_string_list ("File Browser", "FavoriteDirs"); + favoriteDirs = keyFile.get_string_list ("File Browser", "FavoriteDirs"); } if (keyFile.has_key ("File Browser", "RenameTemplates")) { - renameTemplates = keyFile.get_string_list ("File Browser", "RenameTemplates"); + renameTemplates = keyFile.get_string_list ("File Browser", "RenameTemplates"); } if (keyFile.has_key ("File Browser", "RenameUseTemplates")) { @@ -1106,7 +1120,7 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("File Browser", "OverlayedFileNames")) { - overlayedFileNames = keyFile.get_boolean ("File Browser", "OverlayedFileNames"); + overlayedFileNames = keyFile.get_boolean ("File Browser", "OverlayedFileNames"); } if (keyFile.has_key ("File Browser", "FilmStripOverlayedFileNames")) { @@ -1114,45 +1128,45 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("File Browser", "ShowFileNames")) { - showFileNames = keyFile.get_boolean ("File Browser", "ShowFileNames"); + showFileNames = keyFile.get_boolean ("File Browser", "ShowFileNames"); } if (keyFile.has_key ("File Browser", "FilmStripShowFileNames")) { - filmStripShowFileNames = keyFile.get_boolean ("File Browser", "FilmStripShowFileNames"); + filmStripShowFileNames = keyFile.get_boolean ("File Browser", "FilmStripShowFileNames"); } if (keyFile.has_key ("File Browser", "InternalThumbIfUntouched")) { - internalThumbIfUntouched = keyFile.get_boolean ("File Browser", "InternalThumbIfUntouched"); + internalThumbIfUntouched = keyFile.get_boolean ("File Browser", "InternalThumbIfUntouched"); } if (keyFile.has_key ("File Browser", "menuGroupRank")) { - menuGroupRank = keyFile.get_boolean ("File Browser", "menuGroupRank"); + menuGroupRank = keyFile.get_boolean ("File Browser", "menuGroupRank"); } if (keyFile.has_key ("File Browser", "menuGroupLabel")) { - menuGroupLabel = keyFile.get_boolean ("File Browser", "menuGroupLabel"); + menuGroupLabel = keyFile.get_boolean ("File Browser", "menuGroupLabel"); } if (keyFile.has_key ("File Browser", "menuGroupFileOperations")) { - menuGroupFileOperations = keyFile.get_boolean ("File Browser", "menuGroupFileOperations"); + menuGroupFileOperations = keyFile.get_boolean ("File Browser", "menuGroupFileOperations"); } if (keyFile.has_key ("File Browser", "menuGroupProfileOperations")) { - menuGroupProfileOperations = keyFile.get_boolean ("File Browser", "menuGroupProfileOperations"); + menuGroupProfileOperations = keyFile.get_boolean ("File Browser", "menuGroupProfileOperations"); } if (keyFile.has_key ("File Browser", "menuGroupExtProg")) { - menuGroupExtProg = keyFile.get_boolean ("File Browser", "menuGroupExtProg"); + menuGroupExtProg = keyFile.get_boolean ("File Browser", "menuGroupExtProg"); } if (keyFile.has_key ("File Browser", "MaxRecentFolders")) { - maxRecentFolders = keyFile.get_integer ("File Browser", "MaxRecentFolders"); + maxRecentFolders = keyFile.get_integer ("File Browser", "MaxRecentFolders"); } - recentFolders.reserve(maxRecentFolders + 10); // reserve some more than maxRecentFolders, because at runtime it stores more than that + recentFolders.reserve (maxRecentFolders + 10); // reserve some more than maxRecentFolders, because at runtime it stores more than that if (keyFile.has_key ("File Browser", "RecentFolders")) { - recentFolders = keyFile.get_string_list ("File Browser", "RecentFolders"); + recentFolders = keyFile.get_string_list ("File Browser", "RecentFolders"); } } @@ -1162,53 +1176,53 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("Clipping Indication", "ShadowThreshold")) { - shadowThreshold = keyFile.get_integer ("Clipping Indication", "ShadowThreshold"); + shadowThreshold = keyFile.get_integer ("Clipping Indication", "ShadowThreshold"); } if (keyFile.has_key ("Clipping Indication", "BlinkClipped")) { - blinkClipped = keyFile.get_boolean ("Clipping Indication", "BlinkClipped"); + blinkClipped = keyFile.get_boolean ("Clipping Indication", "BlinkClipped"); } } if (keyFile.has_group ("Performance")) { if (keyFile.has_key ("Performance", "RgbDenoiseThreadLimit")) { - rgbDenoiseThreadLimit = keyFile.get_integer ("Performance", "RgbDenoiseThreadLimit"); + rgbDenoiseThreadLimit = keyFile.get_integer ("Performance", "RgbDenoiseThreadLimit"); } - if( keyFile.has_key ("Performance", "NRauto")) { - rtSettings.nrauto = keyFile.get_double ("Performance", "NRauto"); + if ( keyFile.has_key ("Performance", "NRauto")) { + rtSettings.nrauto = keyFile.get_double ("Performance", "NRauto"); } - if( keyFile.has_key ("Performance", "NRautomax")) { - rtSettings.nrautomax = keyFile.get_double ("Performance", "NRautomax"); + if ( keyFile.has_key ("Performance", "NRautomax")) { + rtSettings.nrautomax = keyFile.get_double ("Performance", "NRautomax"); } - if( keyFile.has_key ("Performance", "NRhigh")) { - rtSettings.nrhigh = keyFile.get_double ("Performance", "NRhigh"); + if ( keyFile.has_key ("Performance", "NRhigh")) { + rtSettings.nrhigh = keyFile.get_double ("Performance", "NRhigh"); } - if(rtSettings.nrhigh == 0.0) { //avoid crash by division by zero in noise reduction + if (rtSettings.nrhigh == 0.0) { //avoid crash by division by zero in noise reduction rtSettings.nrhigh = 0.45; } - if( keyFile.has_key ("Performance", "NRWavlevel")) { - rtSettings.nrwavlevel = keyFile.get_integer ("Performance", "NRWavlevel"); + if ( keyFile.has_key ("Performance", "NRWavlevel")) { + rtSettings.nrwavlevel = keyFile.get_integer ("Performance", "NRWavlevel"); } if (keyFile.has_key ("Performance", "LevNR")) { - rtSettings.leveldnv = keyFile.get_integer ("Performance", "LevNR"); + rtSettings.leveldnv = keyFile.get_integer ("Performance", "LevNR"); } if (keyFile.has_key ("Performance", "LevNRTI")) { - rtSettings.leveldnti = keyFile.get_integer ("Performance", "LevNRTI"); + rtSettings.leveldnti = keyFile.get_integer ("Performance", "LevNRTI"); } if (keyFile.has_key ("Performance", "LevNRAUT")) { - rtSettings.leveldnaut = keyFile.get_integer ("Performance", "LevNRAUT"); + rtSettings.leveldnaut = keyFile.get_integer ("Performance", "LevNRAUT"); } if (keyFile.has_key ("Performance", "LevNRLISS")) { - rtSettings.leveldnliss = keyFile.get_integer ("Performance", "LevNRLISS"); + rtSettings.leveldnliss = keyFile.get_integer ("Performance", "LevNRLISS"); } if (keyFile.has_key ("Performance", "SIMPLNRAUT")) { @@ -1216,49 +1230,73 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("Performance", "ClutCacheSize")) { - clutCacheSize = keyFile.get_integer ("Performance", "ClutCacheSize"); + clutCacheSize = keyFile.get_integer ("Performance", "ClutCacheSize"); } if (keyFile.has_key ("Performance", "MaxInspectorBuffers")) { - maxInspectorBuffers = keyFile.get_integer ("Performance", "MaxInspectorBuffers"); + maxInspectorBuffers = keyFile.get_integer ("Performance", "MaxInspectorBuffers"); } if (keyFile.has_key ("Performance", "PreviewDemosaicFromSidecar")) { - prevdemo = (prevdemo_t)keyFile.get_integer ("Performance", "PreviewDemosaicFromSidecar"); + prevdemo = (prevdemo_t)keyFile.get_integer ("Performance", "PreviewDemosaicFromSidecar"); } if (keyFile.has_key ("Performance", "Daubechies")) { - rtSettings.daubech = keyFile.get_boolean ("Performance", "Daubechies"); + rtSettings.daubech = keyFile.get_boolean ("Performance", "Daubechies"); } if (keyFile.has_key ("Performance", "SerializeTiffRead")) { - serializeTiffRead = keyFile.get_boolean ("Performance", "SerializeTiffRead"); + serializeTiffRead = keyFile.get_boolean ("Performance", "SerializeTiffRead"); } } if (keyFile.has_group ("GUI")) { - if (keyFile.has_key ("GUI", "Font")) { - font = keyFile.get_string ("GUI", "Font"); - } - - if (keyFile.has_key ("GUI", "ColorPickerFont")) { - colorPickerFont = keyFile.get_string ("GUI", "ColorPickerFont"); - } - if (keyFile.has_key ("GUI", "WindowWidth")) { - windowWidth = keyFile.get_integer ("GUI", "WindowWidth"); + windowWidth = keyFile.get_integer ("GUI", "WindowWidth"); } if (keyFile.has_key ("GUI", "WindowHeight")) { - windowHeight = keyFile.get_integer ("GUI", "WindowHeight"); + windowHeight = keyFile.get_integer ("GUI", "WindowHeight"); } if (keyFile.has_key ("GUI", "WindowX")) { - windowX = keyFile.get_integer ("GUI", "WindowX"); + windowX = keyFile.get_integer ("GUI", "WindowX"); } if (keyFile.has_key ("GUI", "WindowY")) { - windowY = keyFile.get_integer ("GUI", "WindowY"); + windowY = keyFile.get_integer ("GUI", "WindowY"); + } + + if (keyFile.has_key ("GUI", "WindowMonitor")) { + windowMonitor = keyFile.get_integer ("GUI", "WindowMonitor"); + } + + if (keyFile.has_key ("GUI", "MeowMonitor")) { + meowMonitor = keyFile.get_integer ("GUI", "MeowMonitor"); + } + + if (keyFile.has_key ("GUI", "MeowFullScreen")) { + meowFullScreen = keyFile.get_boolean ("GUI", "MeowFullScreen"); + } + + if (keyFile.has_key ("GUI", "MeowMaximized")) { + meowMaximized = keyFile.get_boolean ("GUI", "MeowMaximized"); + } + + if (keyFile.has_key ("GUI", "MeowWidth")) { + meowWidth = keyFile.get_integer ("GUI", "MeowWidth"); + } + + if (keyFile.has_key ("GUI", "MeowHeight")) { + meowHeight = keyFile.get_integer ("GUI", "MeowHeight"); + } + + if (keyFile.has_key ("GUI", "MeowX")) { + meowX = keyFile.get_integer ("GUI", "MeowX"); + } + + if (keyFile.has_key ("GUI", "MeowY")) { + meowY = keyFile.get_integer ("GUI", "MeowY"); } if (keyFile.has_key ("GUI", "WindowMaximized")) { @@ -1266,47 +1304,47 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("GUI", "DetailWindowWidth")) { - detailWindowWidth = keyFile.get_integer ("GUI", "DetailWindowWidth"); + detailWindowWidth = keyFile.get_integer ("GUI", "DetailWindowWidth"); } if (keyFile.has_key ("GUI", "DetailWindowHeight")) { - detailWindowHeight = keyFile.get_integer ("GUI", "DetailWindowHeight"); + detailWindowHeight = keyFile.get_integer ("GUI", "DetailWindowHeight"); } if (keyFile.has_key ("GUI", "DirBrowserWidth")) { - dirBrowserWidth = keyFile.get_integer ("GUI", "DirBrowserWidth"); + dirBrowserWidth = keyFile.get_integer ("GUI", "DirBrowserWidth"); } if (keyFile.has_key ("GUI", "DirBrowserHeight")) { - dirBrowserHeight = keyFile.get_integer ("GUI", "DirBrowserHeight"); + dirBrowserHeight = keyFile.get_integer ("GUI", "DirBrowserHeight"); } if (keyFile.has_key ("GUI", "SortType")) { - dirBrowserSortType = static_cast(keyFile.get_integer ("GUI", "SortType")); + dirBrowserSortType = static_cast (keyFile.get_integer ("GUI", "SortType")); } if (keyFile.has_key ("GUI", "PreferencesWidth")) { - preferencesWidth = keyFile.get_integer ("GUI", "PreferencesWidth"); + preferencesWidth = keyFile.get_integer ("GUI", "PreferencesWidth"); } if (keyFile.has_key ("GUI", "PreferencesHeight")) { - preferencesHeight = keyFile.get_integer ("GUI", "PreferencesHeight"); + preferencesHeight = keyFile.get_integer ("GUI", "PreferencesHeight"); } if (keyFile.has_key ("GUI", "SaveAsDialogWidth")) { - saveAsDialogWidth = keyFile.get_integer ("GUI", "SaveAsDialogWidth"); + saveAsDialogWidth = keyFile.get_integer ("GUI", "SaveAsDialogWidth"); } if (keyFile.has_key ("GUI", "SaveAsDialogHeight")) { - saveAsDialogHeight = keyFile.get_integer ("GUI", "SaveAsDialogHeight"); + saveAsDialogHeight = keyFile.get_integer ("GUI", "SaveAsDialogHeight"); } if (keyFile.has_key ("GUI", "ToolPanelWidth")) { - toolPanelWidth = keyFile.get_integer ("GUI", "ToolPanelWidth"); + toolPanelWidth = keyFile.get_integer ("GUI", "ToolPanelWidth"); } if (keyFile.has_key ("GUI", "BrowserToolPanelWidth")) { - browserToolPanelWidth = keyFile.get_integer ("GUI", "BrowserToolPanelWidth"); + browserToolPanelWidth = keyFile.get_integer ("GUI", "BrowserToolPanelWidth"); } if (keyFile.has_key ("GUI", "BrowserToolPanelHeight")) { @@ -1318,35 +1356,51 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("GUI", "BrowserDirPanelOpened")) { - browserDirPanelOpened = keyFile.get_boolean ("GUI", "BrowserDirPanelOpened"); + browserDirPanelOpened = keyFile.get_boolean ("GUI", "BrowserDirPanelOpened"); } if (keyFile.has_key ("GUI", "EditorFilmStripOpened")) { - editorFilmStripOpened = keyFile.get_boolean ("GUI", "EditorFilmStripOpened"); + editorFilmStripOpened = keyFile.get_boolean ("GUI", "EditorFilmStripOpened"); } if (keyFile.has_key ("GUI", "HistoryPanelWidth")) { historyPanelWidth = keyFile.get_integer ("GUI", "HistoryPanelWidth"); } + if (keyFile.has_key ("GUI", "FontFamily")) { + fontFamily = keyFile.get_string ("GUI", "FontFamily"); + } + + if (keyFile.has_key ("GUI", "FontSize")) { + fontSize = keyFile.get_integer ("GUI", "FontSize"); + } + + if (keyFile.has_key ("GUI", "CPFontFamily")) { + CPFontFamily = keyFile.get_string ("GUI", "CPFontFamily"); + } + + if (keyFile.has_key ("GUI", "CPFontSize")) { + CPFontSize = keyFile.get_integer ("GUI", "CPFontSize"); + } + if (keyFile.has_key ("GUI", "LastPreviewScale")) { - lastScale = keyFile.get_integer ("GUI", "LastPreviewScale"); + lastScale = keyFile.get_integer ("GUI", "LastPreviewScale"); } if (keyFile.has_key ("GUI", "PanAccelFactor")) { - panAccelFactor = keyFile.get_integer ("GUI", "PanAccelFactor"); + panAccelFactor = keyFile.get_integer ("GUI", "PanAccelFactor"); } if (keyFile.has_key ("GUI", "RememberZoomAndPan")) { - rememberZoomAndPan = keyFile.get_boolean ("GUI", "RememberZoomAndPan"); + rememberZoomAndPan = keyFile.get_boolean ("GUI", "RememberZoomAndPan"); } if (keyFile.has_key ("GUI", "LastCropSize")) { - lastCropSize = keyFile.get_integer ("GUI", "LastCropSize"); + lastCropSize = keyFile.get_integer ("GUI", "LastCropSize"); } if (keyFile.has_key ("GUI", "ShowHistory")) { - showHistory = keyFile.get_boolean ("GUI", "ShowHistory"); + showHistory = keyFile.get_boolean ("GUI", "ShowHistory"); } if (keyFile.has_key ("GUI", "ShowFilePanelState")) { @@ -1354,11 +1408,11 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("GUI", "ShowInfo")) { - showInfo = keyFile.get_boolean ("GUI", "ShowInfo"); + showInfo = keyFile.get_boolean ("GUI", "ShowInfo"); } if (keyFile.has_key ("GUI", "MainNBVertical")) { - mainNBVertical = keyFile.get_boolean ("GUI", "MainNBVertical"); + mainNBVertical = keyFile.get_boolean ("GUI", "MainNBVertical"); } if (keyFile.has_key ("GUI", "ShowClippedHighlights")) { @@ -1370,7 +1424,7 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("GUI", "FrameColor")) { - bgcolor = keyFile.get_integer ("GUI", "FrameColor"); + bgcolor = keyFile.get_integer ("GUI", "FrameColor"); } if (keyFile.has_key ("GUI", "ProcessingQueueEnbled")) { @@ -1378,44 +1432,44 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("GUI", "ToolPanelsExpanded")) { - tpOpen = keyFile.get_integer_list ("GUI", "ToolPanelsExpanded"); + tpOpen = keyFile.get_integer_list ("GUI", "ToolPanelsExpanded"); } if (keyFile.has_key ("GUI", "MultiDisplayMode")) { - multiDisplayMode = keyFile.get_integer ("GUI", "MultiDisplayMode"); + multiDisplayMode = keyFile.get_integer ("GUI", "MultiDisplayMode"); } - //if (keyFile.has_key ("GUI", "CurvePanelsExpanded")) crvOpen = keyFile.get_integer_list ("GUI", "CurvePanelsExpanded"); + //if (keyFile.has_key ("GUI", "CurvePanelsExpanded")) crvOpen = keyFile.get_integer_list ("GUI", "CurvePanelsExpanded"); if (keyFile.has_key ("GUI", "CutOverlayBrush")) { - cutOverlayBrush = keyFile.get_double_list ("GUI", "CutOverlayBrush"); + cutOverlayBrush = keyFile.get_double_list ("GUI", "CutOverlayBrush"); } if (keyFile.has_key ("GUI", "NavGuideBrush")) { - navGuideBrush = keyFile.get_double_list ("GUI", "NavGuideBrush"); + navGuideBrush = keyFile.get_double_list ("GUI", "NavGuideBrush"); } if (keyFile.has_key ("GUI", "HistogramPosition")) { - histogramPosition = keyFile.get_integer ("GUI", "HistogramPosition"); + histogramPosition = keyFile.get_integer ("GUI", "HistogramPosition"); } if (keyFile.has_key ("GUI", "HistogramBar")) { - histogramBar = keyFile.get_boolean ("GUI", "HistogramBar"); + histogramBar = keyFile.get_boolean ("GUI", "HistogramBar"); } if (keyFile.has_key ("GUI", "HistogramFullMode")) { - histogramFullMode = keyFile.get_boolean ("GUI", "HistogramFullMode"); + histogramFullMode = keyFile.get_boolean ("GUI", "HistogramFullMode"); } if (keyFile.has_key ("GUI", "NavigatorRGBUnit")) { - navRGBUnit = (NavigatorUnit)keyFile.get_integer ("GUI", "NavigatorRGBUnit"); + navRGBUnit = (NavigatorUnit)keyFile.get_integer ("GUI", "NavigatorRGBUnit"); } if (keyFile.has_key ("GUI", "NavigatorHSVUnit")) { - navHSVUnit = (NavigatorUnit)keyFile.get_integer ("GUI", "NavigatorHSVUnit"); + navHSVUnit = (NavigatorUnit)keyFile.get_integer ("GUI", "NavigatorHSVUnit"); } if (keyFile.has_key ("GUI", "ShowFilmStripToolBar")) { - showFilmStripToolBar = keyFile.get_boolean ("GUI", "ShowFilmStripToolBar"); + showFilmStripToolBar = keyFile.get_boolean ("GUI", "ShowFilmStripToolBar"); } if (keyFile.has_key ("GUI", "FileBrowserToolbarSingleRow")) { @@ -1423,11 +1477,11 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("GUI", "HideTPVScrollbar")) { - hideTPVScrollbar = keyFile.get_boolean ("GUI", "HideTPVScrollbar"); + hideTPVScrollbar = keyFile.get_boolean ("GUI", "HideTPVScrollbar"); } if (keyFile.has_key ("GUI", "UseIconNoText")) { - UseIconNoText = keyFile.get_boolean ("GUI", "UseIconNoText"); + UseIconNoText = keyFile.get_boolean ("GUI", "UseIconNoText"); } if (keyFile.has_key ("GUI", "HistogramWorking")) { @@ -1435,23 +1489,35 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("GUI", "CurveBBoxPosition")) { - curvebboxpos = keyFile.get_integer ("GUI", "CurveBBoxPosition"); + curvebboxpos = keyFile.get_integer ("GUI", "CurveBBoxPosition"); } } if (keyFile.has_group ("Crop Settings")) { if (keyFile.has_key ("Crop Settings", "PPI")) { - cropPPI = keyFile.get_integer ("Crop Settings", "PPI"); + cropPPI = keyFile.get_integer ("Crop Settings", "PPI"); } } if (keyFile.has_group ("Color Management")) { if (keyFile.has_key ("Color Management", "ICCDirectory")) { - rtSettings.iccDirectory = keyFile.get_string ("Color Management", "ICCDirectory"); + rtSettings.iccDirectory = keyFile.get_string ("Color Management", "ICCDirectory"); + } + + if (keyFile.has_key ("Color Management", "PrinterIntent")) { + rtSettings.printerIntent = static_cast (keyFile.get_integer ("Color Management", "PrinterIntent")); + } + + if (keyFile.has_key ("Color Management", "PrinterBPC")) { + rtSettings.printerBPC = keyFile.get_boolean ("Color Management", "PrinterBPC"); + } + + if (keyFile.has_key ("Color Management", "PrinterProfile")) { + rtSettings.printerProfile = keyFile.get_string ("Color Management", "PrinterProfile"); } if (keyFile.has_key ("Color Management", "MonitorProfile")) { - rtSettings.monitorProfile = keyFile.get_string ("Color Management", "MonitorProfile"); + rtSettings.monitorProfile = keyFile.get_string ("Color Management", "MonitorProfile"); } if (keyFile.has_key ("Color Management", "AutoMonitorProfile")) { @@ -1467,122 +1533,124 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("Color Management", "Intent")) { - rtSettings.monitorIntent = static_cast(keyFile.get_integer("Color Management", "Intent")); + rtSettings.monitorIntent = static_cast (keyFile.get_integer ("Color Management", "Intent")); } if (keyFile.has_key ("Color Management", "MonitorBPC")) { - rtSettings.monitorBPC = keyFile.get_boolean("Color Management", "MonitorBPC"); + rtSettings.monitorBPC = keyFile.get_boolean ("Color Management", "MonitorBPC"); } if (keyFile.has_key ("Color Management", "CRI")) { - rtSettings.CRI_color = keyFile.get_integer("Color Management", "CRI"); + rtSettings.CRI_color = keyFile.get_integer ("Color Management", "CRI"); } if (keyFile.has_key ("Color Management", "DenoiseLabgamma")) { - rtSettings.denoiselabgamma = keyFile.get_integer("Color Management", "DenoiseLabgamma"); + rtSettings.denoiselabgamma = keyFile.get_integer ("Color Management", "DenoiseLabgamma"); } + /* if (keyFile.has_key ("Color Management", "view")) { - rtSettings.viewingdevice = keyFile.get_integer("Color Management", "view"); + rtSettings.viewingdevice = keyFile.get_integer ("Color Management", "view"); } if (keyFile.has_key ("Color Management", "grey")) { - rtSettings.viewingdevicegrey = keyFile.get_integer("Color Management", "grey"); + rtSettings.viewingdevicegrey = keyFile.get_integer ("Color Management", "grey"); } - + */ +/* if (keyFile.has_key ("Color Management", "greySc")) { - rtSettings.viewinggreySc = keyFile.get_integer("Color Management", "greySc"); + rtSettings.viewinggreySc = keyFile.get_integer ("Color Management", "greySc"); } - +*/ if (keyFile.has_key ("Color Management", "CBDLArtif")) { - rtSettings.artifact_cbdl = keyFile.get_double("Color Management", "CBDLArtif"); + rtSettings.artifact_cbdl = keyFile.get_double ("Color Management", "CBDLArtif"); } if (keyFile.has_key ("Color Management", "CBDLlevel0")) { - rtSettings.level0_cbdl = keyFile.get_double("Color Management", "CBDLlevel0"); + rtSettings.level0_cbdl = keyFile.get_double ("Color Management", "CBDLlevel0"); } if (keyFile.has_key ("Color Management", "CBDLlevel123")) { - rtSettings.level123_cbdl = keyFile.get_double("Color Management", "CBDLlevel123"); + rtSettings.level123_cbdl = keyFile.get_double ("Color Management", "CBDLlevel123"); } -// 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", "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", "WhiteBalanceSpotSize")) { - whiteBalanceSpotSize = keyFile.get_integer("Color Management", "WhiteBalanceSpotSize"); + whiteBalanceSpotSize = keyFile.get_integer ("Color Management", "WhiteBalanceSpotSize"); } - if( keyFile.has_key ("Color Management", "GamutICC")) { - rtSettings.gamutICC = keyFile.get_boolean("Color Management", "GamutICC"); + if ( keyFile.has_key ("Color Management", "GamutICC")) { + rtSettings.gamutICC = keyFile.get_boolean ("Color Management", "GamutICC"); } -// if( keyFile.has_key ("Color Management", "BWcomplement")) rtSettings.bw_complementary = keyFile.get_boolean("Color Management", "BWcomplement"); - if( keyFile.has_key ("Color Management", "Ciecamfloat")) { - rtSettings.ciecamfloat = keyFile.get_boolean("Color Management", "Ciecamfloat"); + //if ( keyFile.has_key ("Color Management", "BWcomplement")) rtSettings.bw_complementary = keyFile.get_boolean("Color Management", "BWcomplement"); + if ( keyFile.has_key ("Color Management", "Ciecamfloat")) { + rtSettings.ciecamfloat = keyFile.get_boolean ("Color Management", "Ciecamfloat"); } - if( keyFile.has_key ("Color Management", "AdobeRGB")) { - rtSettings.adobe = keyFile.get_string("Color Management", "AdobeRGB"); + if ( keyFile.has_key ("Color Management", "AdobeRGB")) { + rtSettings.adobe = keyFile.get_string ("Color Management", "AdobeRGB"); } - if( keyFile.has_key ("Color Management", "ProPhoto")) { - rtSettings.prophoto = keyFile.get_string("Color Management", "ProPhoto"); + if ( keyFile.has_key ("Color Management", "ProPhoto")) { + rtSettings.prophoto = keyFile.get_string ("Color Management", "ProPhoto"); } - if( keyFile.has_key ("Color Management", "ProPhoto10")) { - rtSettings.prophoto10 = keyFile.get_string("Color Management", "ProPhoto10"); + if ( keyFile.has_key ("Color Management", "ProPhoto10")) { + rtSettings.prophoto10 = keyFile.get_string ("Color Management", "ProPhoto10"); } - if( keyFile.has_key ("Color Management", "WideGamut")) { - rtSettings.widegamut = keyFile.get_string("Color Management", "WideGamut"); + if ( keyFile.has_key ("Color Management", "WideGamut")) { + rtSettings.widegamut = keyFile.get_string ("Color Management", "WideGamut"); } - if( keyFile.has_key ("Color Management", "sRGB")) { - rtSettings.srgb = keyFile.get_string("Color Management", "sRGB"); + if ( keyFile.has_key ("Color Management", "sRGB")) { + rtSettings.srgb = keyFile.get_string ("Color Management", "sRGB"); } - if( keyFile.has_key ("Color Management", "sRGB10")) { - rtSettings.srgb10 = keyFile.get_string("Color Management", "sRGB10"); + if ( keyFile.has_key ("Color Management", "sRGB10")) { + rtSettings.srgb10 = keyFile.get_string ("Color Management", "sRGB10"); } - if( keyFile.has_key ("Color Management", "Beta")) { - rtSettings.beta = keyFile.get_string("Color Management", "Beta"); + if ( keyFile.has_key ("Color Management", "Beta")) { + rtSettings.beta = keyFile.get_string ("Color Management", "Beta"); } - if( keyFile.has_key ("Color Management", "Best")) { - rtSettings.best = keyFile.get_string("Color Management", "Best"); + if ( keyFile.has_key ("Color Management", "Best")) { + rtSettings.best = keyFile.get_string ("Color Management", "Best"); } - if( keyFile.has_key ("Color Management", "Rec2020")) { - rtSettings.rec2020 = keyFile.get_string("Color Management", "Rec2020"); + if ( keyFile.has_key ("Color Management", "Rec2020")) { + rtSettings.rec2020 = keyFile.get_string ("Color Management", "Rec2020"); } - if( keyFile.has_key ("Color Management", "Bruce")) { - rtSettings.bruce = keyFile.get_string("Color Management", "Bruce"); + if ( keyFile.has_key ("Color Management", "Bruce")) { + rtSettings.bruce = keyFile.get_string ("Color Management", "Bruce"); } - if( keyFile.has_key ("Color Management", "GamutLch")) { - rtSettings.gamutLch = keyFile.get_boolean("Color Management", "GamutLch"); + if ( keyFile.has_key ("Color Management", "GamutLch")) { + rtSettings.gamutLch = keyFile.get_boolean ("Color Management", "GamutLch"); } - if( keyFile.has_key ("Color Management", "ProtectRed")) { - rtSettings.protectred = keyFile.get_integer("Color Management", "ProtectRed"); + if ( keyFile.has_key ("Color Management", "ProtectRed")) { + rtSettings.protectred = keyFile.get_integer ("Color Management", "ProtectRed"); } - if( keyFile.has_key ("Color Management", "ProtectRedH")) { - rtSettings.protectredh = keyFile.get_double("Color Management", "ProtectRedH"); + if ( keyFile.has_key ("Color Management", "ProtectRedH")) { + rtSettings.protectredh = keyFile.get_double ("Color Management", "ProtectRedH"); } - if( keyFile.has_key ("Color Management", "Amountchroma")) { - rtSettings.amchroma = keyFile.get_integer("Color Management", "Amountchroma"); + if ( keyFile.has_key ("Color Management", "Amountchroma")) { + rtSettings.amchroma = keyFile.get_integer ("Color Management", "Amountchroma"); } - if( keyFile.has_key ("Color Management", "ClutsDirectory")) { - clutsDir = keyFile.get_string("Color Management", "ClutsDirectory"); + if ( keyFile.has_key ("Color Management", "ClutsDirectory")) { + clutsDir = keyFile.get_string ("Color Management", "ClutsDirectory"); } -// if( keyFile.has_key ("Color Management", "Ciebadpixgauss")) rtSettings.ciebadpixgauss = keyFile.get_boolean("Color Management", "Ciebadpixgauss"); + //if( keyFile.has_key ("Color Management", "Ciebadpixgauss")) rtSettings.ciebadpixgauss = keyFile.get_boolean("Color Management", "Ciebadpixgauss"); } @@ -1594,7 +1662,7 @@ int Options::readFromFile (Glib::ustring fname) if (keyFile.has_group ("Sounds")) { if (keyFile.has_key ("Sounds", "Enable")) { - sndEnable = keyFile.get_boolean ("Sounds", "Enable"); + sndEnable = keyFile.get_boolean ("Sounds", "Enable"); } if (keyFile.has_key ("Sounds", "BatchQueueDone")) { @@ -1602,7 +1670,7 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_key ("Sounds", "LngEditProcDone")) { - sndLngEditProcDone = keyFile.get_string ("Sounds", "LngEditProcDone"); + sndLngEditProcDone = keyFile.get_string ("Sounds", "LngEditProcDone"); } if (keyFile.has_key ("Sounds", "LngEditProcDoneSecs")) { @@ -1611,178 +1679,187 @@ int Options::readFromFile (Glib::ustring fname) } if (keyFile.has_group ("Fast Export")) { - if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpening" )) { - fastexport_bypass_sharpening = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpening" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpening" )) { + fastexport_bypass_sharpening = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpening" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpenEdge" )) { - fastexport_bypass_sharpenEdge = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpenEdge" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpenEdge" )) { + fastexport_bypass_sharpenEdge = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpenEdge" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpenMicro" )) { - fastexport_bypass_sharpenMicro = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpenMicro" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_sharpenMicro" )) { + fastexport_bypass_sharpenMicro = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sharpenMicro" ); } - //if (keyFile.has_key ("Fast Export", "fastexport_bypass_lumaDenoise" )) fastexport_bypass_lumaDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" ); - //if (keyFile.has_key ("Fast Export", "fastexport_bypass_colorDenoise" )) fastexport_bypass_colorDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_colorDenoise" ); - if (keyFile.has_key ("Fast Export", "fastexport_bypass_defringe" )) { - fastexport_bypass_defringe = keyFile.get_boolean ("Fast Export", "fastexport_bypass_defringe" ); + //if (keyFile.has_key ("Fast Export", "fastexport_bypass_lumaDenoise" )) fastexport_bypass_lumaDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" ); + //if (keyFile.has_key ("Fast Export", "fastexport_bypass_colorDenoise" )) fastexport_bypass_colorDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_colorDenoise" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_defringe" )) { + fastexport_bypass_defringe = keyFile.get_boolean ("Fast Export", "fastexport_bypass_defringe" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_dirpyrDenoise" )) { - fastexport_bypass_dirpyrDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_dirpyrDenoise" )) { + fastexport_bypass_dirpyrDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_sh_hq" )) { - fastexport_bypass_sh_hq = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sh_hq" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_sh_hq" )) { + fastexport_bypass_sh_hq = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sh_hq" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_dirpyrequalizer" )) { - fastexport_bypass_dirpyrequalizer = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_dirpyrequalizer" )) { + fastexport_bypass_dirpyrequalizer = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_wavelet" )) { - fastexport_bypass_wavelet = keyFile.get_boolean ("Fast Export", "fastexport_bypass_wavelet" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_wavelet" )) { + fastexport_bypass_wavelet = keyFile.get_boolean ("Fast Export", "fastexport_bypass_wavelet" ); } - if (keyFile.has_key ("Fast Export", "fastexport_raw_dmethod" )) { - fastexport_raw_bayer_method = keyFile.get_string ("Fast Export", "fastexport_raw_dmethod" ); + if (keyFile.has_key ("Fast Export", "fastexport_raw_dmethod" )) { + fastexport_raw_bayer_method = keyFile.get_string ("Fast Export", "fastexport_raw_dmethod" ); } - if (keyFile.has_key ("Fast Export", "fastexport_raw_bayer_method" )) { - fastexport_raw_bayer_method = keyFile.get_string ("Fast Export", "fastexport_raw_bayer_method" ); + if (keyFile.has_key ("Fast Export", "fastexport_raw_bayer_method" )) { + fastexport_raw_bayer_method = keyFile.get_string ("Fast Export", "fastexport_raw_bayer_method" ); } - //if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_all_enhance" )) fastexport_bypass_raw_bayer_all_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_all_enhance" ); - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_dcb_iterations" )) { - fastexport_bypass_raw_bayer_dcb_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_dcb_iterations" ); +//if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_all_enhance" )) fastexport_bypass_raw_bayer_all_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_all_enhance" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_dcb_iterations" )) { + fastexport_bypass_raw_bayer_dcb_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_dcb_iterations" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" )) { - fastexport_bypass_raw_bayer_dcb_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" )) { + fastexport_bypass_raw_bayer_dcb_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_dcb_enhance" )) { - fastexport_bypass_raw_bayer_dcb_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_dcb_enhance" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_dcb_enhance" )) { + fastexport_bypass_raw_bayer_dcb_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_dcb_enhance" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" )) { - fastexport_bypass_raw_bayer_dcb_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" )) { + fastexport_bypass_raw_bayer_dcb_enhance = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_lmmse_iterations" )) { - fastexport_bypass_raw_bayer_lmmse_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_lmmse_iterations" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_lmmse_iterations" )) { + fastexport_bypass_raw_bayer_lmmse_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_lmmse_iterations" ); } if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations")) { - fastexport_bypass_raw_bayer_lmmse_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations"); + fastexport_bypass_raw_bayer_lmmse_iterations = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations"); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_linenoise" )) { - fastexport_bypass_raw_bayer_linenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_linenoise" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_linenoise" )) { + fastexport_bypass_raw_bayer_linenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_linenoise" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" )) { - fastexport_bypass_raw_bayer_linenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" )) { + fastexport_bypass_raw_bayer_linenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_greenthresh" )) { - fastexport_bypass_raw_bayer_greenthresh = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_greenthresh" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_greenthresh" )) { + fastexport_bypass_raw_bayer_greenthresh = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_greenthresh" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" )) { - fastexport_bypass_raw_bayer_greenthresh = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" )) { + fastexport_bypass_raw_bayer_greenthresh = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" ); } - if (keyFile.has_key ("Fast Export", "fastexport_raw_xtrans_method" )) { - fastexport_raw_xtrans_method = keyFile.get_string ("Fast Export", "fastexport_raw_xtrans_method" ); + if (keyFile.has_key ("Fast Export", "fastexport_raw_xtrans_method" )) { + fastexport_raw_xtrans_method = keyFile.get_string ("Fast Export", "fastexport_raw_xtrans_method" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ccSteps" )) { - fastexport_bypass_raw_ccSteps = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ccSteps" )) { + fastexport_bypass_raw_ccSteps = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ca" )) { - fastexport_bypass_raw_ca = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ca" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ca" )) { + fastexport_bypass_raw_ca = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ca" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_df" )) { - fastexport_bypass_raw_df = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_df" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_df" )) { + fastexport_bypass_raw_df = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_df" ); } - if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ff" )) { - fastexport_bypass_raw_ff = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ff" ); + if (keyFile.has_key ("Fast Export", "fastexport_bypass_raw_ff" )) { + fastexport_bypass_raw_ff = keyFile.get_boolean ("Fast Export", "fastexport_bypass_raw_ff" ); } - if (keyFile.has_key ("Fast Export", "fastexport_icm_input" )) { - fastexport_icm_input = keyFile.get_string ("Fast Export", "fastexport_icm_input" ); + if (keyFile.has_key ("Fast Export", "fastexport_icm_input" )) { + fastexport_icm_input = keyFile.get_string ("Fast Export", "fastexport_icm_input" ); } - if (keyFile.has_key ("Fast Export", "fastexport_icm_working" )) { - fastexport_icm_working = keyFile.get_string ("Fast Export", "fastexport_icm_working" ); + if (keyFile.has_key ("Fast Export", "fastexport_icm_working" )) { + fastexport_icm_working = keyFile.get_string ("Fast Export", "fastexport_icm_working" ); } - if (keyFile.has_key ("Fast Export", "fastexport_icm_output" )) { - fastexport_icm_output = keyFile.get_string ("Fast Export", "fastexport_icm_output" ); + if (keyFile.has_key ("Fast Export", "fastexport_icm_output" )) { + fastexport_icm_output = keyFile.get_string ("Fast Export", "fastexport_icm_output" ); } - if (keyFile.has_key ("Fast Export", "fastexport_icm_output_intent" )) { - fastexport_icm_outputIntent = static_cast(keyFile.get_integer ("Fast Export", "fastexport_icm_output_intent" )); + if (keyFile.has_key ("Fast Export", "fastexport_icm_output_intent" )) { + fastexport_icm_outputIntent = static_cast (keyFile.get_integer ("Fast Export", "fastexport_icm_output_intent" )); } - if (keyFile.has_key ("Fast Export", "fastexport_icm_output_bpc" )) { - fastexport_icm_outputBPC = keyFile.get_boolean ("Fast Export", "fastexport_icm_output_bpc" ); + if (keyFile.has_key ("Fast Export", "fastexport_icm_output_bpc" )) { + fastexport_icm_outputBPC = keyFile.get_boolean ("Fast Export", "fastexport_icm_output_bpc" ); } - if (keyFile.has_key ("Fast Export", "fastexport_icm_gamma" )) { - fastexport_icm_gamma = keyFile.get_string ("Fast Export", "fastexport_icm_gamma" ); + if (keyFile.has_key ("Fast Export", "fastexport_icm_gamma" )) { + fastexport_icm_gamma = keyFile.get_string ("Fast Export", "fastexport_icm_gamma" ); } - if (keyFile.has_key ("Fast Export", "fastexport_resize_enabled" )) { - fastexport_resize_enabled = keyFile.get_boolean ("Fast Export", "fastexport_resize_enabled" ); + if (keyFile.has_key ("Fast Export", "fastexport_resize_enabled" )) { + fastexport_resize_enabled = keyFile.get_boolean ("Fast Export", "fastexport_resize_enabled" ); } - if (keyFile.has_key ("Fast Export", "fastexport_resize_scale" )) { - fastexport_resize_scale = keyFile.get_double ("Fast Export", "fastexport_resize_scale" ); + if (keyFile.has_key ("Fast Export", "fastexport_resize_scale" )) { + fastexport_resize_scale = keyFile.get_double ("Fast Export", "fastexport_resize_scale" ); } - if (keyFile.has_key ("Fast Export", "fastexport_resize_appliesTo" )) { - fastexport_resize_appliesTo = keyFile.get_string ("Fast Export", "fastexport_resize_appliesTo" ); + if (keyFile.has_key ("Fast Export", "fastexport_resize_appliesTo" )) { + fastexport_resize_appliesTo = keyFile.get_string ("Fast Export", "fastexport_resize_appliesTo" ); } - if (keyFile.has_key ("Fast Export", "fastexport_resize_method" )) { - fastexport_resize_method = keyFile.get_string ("Fast Export", "fastexport_resize_method" ); + if (keyFile.has_key ("Fast Export", "fastexport_resize_method" )) { + fastexport_resize_method = keyFile.get_string ("Fast Export", "fastexport_resize_method" ); } - if (keyFile.has_key ("Fast Export", "fastexport_resize_dataspec" )) { - fastexport_resize_dataspec = keyFile.get_integer ("Fast Export", "fastexport_resize_dataspec" ); + if (keyFile.has_key ("Fast Export", "fastexport_resize_dataspec" )) { + fastexport_resize_dataspec = keyFile.get_integer ("Fast Export", "fastexport_resize_dataspec" ); } - if (keyFile.has_key ("Fast Export", "fastexport_resize_width" )) { - fastexport_resize_width = keyFile.get_integer ("Fast Export", "fastexport_resize_width" ); + if (keyFile.has_key ("Fast Export", "fastexport_resize_width" )) { + fastexport_resize_width = keyFile.get_integer ("Fast Export", "fastexport_resize_width" ); } - if (keyFile.has_key ("Fast Export", "fastexport_resize_height" )) { - fastexport_resize_height = keyFile.get_integer ("Fast Export", "fastexport_resize_height" ); + if (keyFile.has_key ("Fast Export", "fastexport_resize_height" )) { + fastexport_resize_height = keyFile.get_integer ("Fast Export", "fastexport_resize_height" ); + } + + if (keyFile.has_key ("Fast Export", "fastexport_use_fast_pipeline" )) { + fastexport_use_fast_pipeline = keyFile.get_integer ("Fast Export", "fastexport_use_fast_pipeline" ); } } if (keyFile.has_group ("Dialogs")) { - safeDirGet(keyFile, "Dialogs", "LastIccDir", lastIccDir); - safeDirGet(keyFile, "Dialogs", "LastDarkframeDir", lastDarkframeDir); - safeDirGet(keyFile, "Dialogs", "LastFlatfieldDir", lastFlatfieldDir); - safeDirGet(keyFile, "Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir); - safeDirGet(keyFile, "Dialogs", "LastLabCurvesDir", lastLabCurvesDir); - safeDirGet(keyFile, "Dialogs", "LastRetinexDir", lastRetinexDir); - safeDirGet(keyFile, "Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); - safeDirGet(keyFile, "Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); - safeDirGet(keyFile, "Dialogs", "LastPFCurvesDir", lastPFCurvesDir); - safeDirGet(keyFile, "Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); - safeDirGet(keyFile, "Dialogs", "LastBWCurvesDir", lastBWCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastIccDir", lastIccDir); + safeDirGet (keyFile, "Dialogs", "LastDarkframeDir", lastDarkframeDir); + safeDirGet (keyFile, "Dialogs", "LastFlatfieldDir", lastFlatfieldDir); + safeDirGet (keyFile, "Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastLabCurvesDir", lastLabCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastRetinexDir", lastRetinexDir); + safeDirGet (keyFile, "Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastPFCurvesDir", lastPFCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastBWCurvesDir", lastBWCurvesDir); - safeDirGet(keyFile, "Dialogs", "LastToneCurvesDir", lastToneCurvesDir); - safeDirGet(keyFile, "Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); - safeDirGet(keyFile, "Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); + safeDirGet (keyFile, "Dialogs", "LastToneCurvesDir", lastToneCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); + safeDirGet (keyFile, "Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); + safeDirGet (keyFile, "Dialogs", "LastLensProfileDir", lastLensProfileDir); + + if (keyFile.has_key ("Dialogs", "GimpPluginShowInfoDialog")) { + gimpPluginShowInfoDialog = keyFile.get_boolean ("Dialogs", "GimpPluginShowInfoDialog"); + } } // -------------------------------------------------------------------------------------------------------- @@ -1793,17 +1870,21 @@ int Options::readFromFile (Glib::ustring fname) } } catch (Glib::Error &err) { - printf("Options::readFromFile / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); + if (options.rtSettings.verbose) { + printf ("Options::readFromFile / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); + } } catch (...) { - printf("Options::readFromFile / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); + if (options.rtSettings.verbose) { + printf ("Options::readFromFile / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); + } } return 1; } -bool Options::safeDirGet(const Glib::KeyFile& keyFile, const Glib::ustring& section, - const Glib::ustring& entryName, Glib::ustring& destination) +bool Options::safeDirGet (const Glib::KeyFile& keyFile, const Glib::ustring& section, + const Glib::ustring& entryName, Glib::ustring& destination) { try { @@ -1812,7 +1893,7 @@ bool Options::safeDirGet(const Glib::KeyFile& keyFile, const Glib::ustring& sect return true; } - } catch(Glib::KeyFileError&) {} + } catch (Glib::KeyFileError&) {} return false; } @@ -1847,21 +1928,19 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_string ("General", "Language", language); keyFile.set_boolean ("General", "LanguageAutoDetect", languageAutoDetect); keyFile.set_string ("General", "Theme", theme); - keyFile.set_boolean ("General", "SlimUI", slimUI); - keyFile.set_boolean ("General", "UseSystemTheme", useSystemTheme); - keyFile.set_string ("General", "Version", VERSION); + keyFile.set_string ("General", "Version", RTVERSION); keyFile.set_string ("General", "DarkFramesPath", rtSettings.darkFramesPath); keyFile.set_string ("General", "FlatFieldsPath", rtSettings.flatFieldsPath); keyFile.set_boolean ("General", "Verbose", rtSettings.verbose); - keyFile.set_double ("General", "BotLeft", rtSettings.bot_left); - keyFile.set_double ("General", "TopLeft", rtSettings.top_left); - keyFile.set_double ("General", "TopRight", rtSettings.top_right); - keyFile.set_double ("General", "BotRight", rtSettings.bot_right); - keyFile.set_double ("General", "EDdetec", rtSettings.ed_detec); - keyFile.set_double ("General", "EDdetecStr", rtSettings.ed_detecStr); - keyFile.set_double ("General", "EDLow", rtSettings.ed_low); - keyFile.set_double ("General", "EDLipinfl", rtSettings.ed_lipinfl); - keyFile.set_double ("General", "EDLipampl", rtSettings.ed_lipampl); + keyFile.set_double ("General", "BotLeft", rtSettings.bot_left); + keyFile.set_double ("General", "TopLeft", rtSettings.top_left); + keyFile.set_double ("General", "TopRight", rtSettings.top_right); + keyFile.set_double ("General", "BotRight", rtSettings.bot_right); + keyFile.set_double ("General", "EDdetec", rtSettings.ed_detec); + keyFile.set_double ("General", "EDdetecStr", rtSettings.ed_detecStr); + keyFile.set_double ("General", "EDLow", rtSettings.ed_low); + keyFile.set_double ("General", "EDLipinfl", rtSettings.ed_lipinfl); + keyFile.set_double ("General", "EDLipampl", rtSettings.ed_lipampl); keyFile.set_integer ("External Editor", "EditorKind", editorToSendTo); @@ -1906,10 +1985,10 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_integer ("File Browser", "MaxRecentFolders", maxRecentFolders); { std::vector temp; - temp.reserve(maxRecentFolders); + temp.reserve (maxRecentFolders); - for(unsigned int i = 0; i < std::min(recentFolders.size(), maxRecentFolders); i++) { - temp.push_back(recentFolders[i]); + for (unsigned int i = 0; i < std::min (recentFolders.size(), maxRecentFolders); i++) { + temp.push_back (recentFolders[i]); } keyFile.set_string_list ("File Browser", "RecentFolders", temp); @@ -1974,12 +2053,18 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_string ("Profiles", "CustomProfileBuilderPath", CPBPath); keyFile.set_integer ("Profiles", "CustomProfileBuilderKeys", CPBKeys); - keyFile.set_string ("GUI", "Font", font); - keyFile.set_string ("GUI", "ColorPickerFont", colorPickerFont); keyFile.set_integer ("GUI", "WindowWidth", windowWidth); keyFile.set_integer ("GUI", "WindowHeight", windowHeight); keyFile.set_integer ("GUI", "WindowX", windowX); keyFile.set_integer ("GUI", "WindowY", windowY); + keyFile.set_integer ("GUI", "WindowMonitor", windowMonitor); + keyFile.set_integer ("GUI", "MeowMonitor", meowMonitor); + keyFile.set_boolean ("GUI", "MeowFullScreen", meowFullScreen); + keyFile.set_boolean ("GUI", "MeowMaximized", meowMaximized); + keyFile.set_integer ("GUI", "MeowWidth", meowWidth); + keyFile.set_integer ("GUI", "MeowHeight", meowHeight); + keyFile.set_integer ("GUI", "MeowX", meowX); + keyFile.set_integer ("GUI", "MeowY", meowY); keyFile.set_boolean ("GUI", "WindowMaximized", windowMaximized); keyFile.set_integer ("GUI", "DetailWindowWidth", detailWindowWidth); keyFile.set_integer ("GUI", "DetailWindowHeight", detailWindowHeight); @@ -1997,6 +2082,10 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_boolean ("GUI", "EditorFilmStripOpened", editorFilmStripOpened); keyFile.set_boolean ("GUI", "BrowserDirPanelOpened", browserDirPanelOpened); keyFile.set_integer ("GUI", "HistoryPanelWidth", historyPanelWidth); + keyFile.set_string ("GUI", "FontFamily", fontFamily); + keyFile.set_integer ("GUI", "FontSize", fontSize); + keyFile.set_string ("GUI", "CPFontFamily", CPFontFamily); + keyFile.set_integer ("GUI", "CPFontSize", CPFontSize); keyFile.set_integer ("GUI", "LastPreviewScale", lastScale); keyFile.set_integer ("GUI", "PanAccelFactor", panAccelFactor); keyFile.set_boolean ("GUI", "RememberZoomAndPan", rememberZoomAndPan); @@ -2031,6 +2120,10 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_integer ("Crop Settings", "PPI", cropPPI); + keyFile.set_string ("Color Management", "PrinterProfile", rtSettings.printerProfile); + keyFile.set_integer ("Color Management", "PrinterIntent", rtSettings.printerIntent); + keyFile.set_boolean ("Color Management", "PrinterBPC", rtSettings.printerBPC); + keyFile.set_string ("Color Management", "ICCDirectory", rtSettings.iccDirectory); keyFile.set_string ("Color Management", "MonitorProfile", rtSettings.monitorProfile); keyFile.set_boolean ("Color Management", "AutoMonitorProfile", rtSettings.autoMonitorProfile); @@ -2038,9 +2131,9 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_boolean ("Color Management", "RGBcurvesLumamode_Gamut", rtSettings.rgbcurveslumamode_gamut); keyFile.set_integer ("Color Management", "Intent", rtSettings.monitorIntent); keyFile.set_boolean ("Color Management", "MonitorBPC", rtSettings.monitorBPC); - keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); - keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); - keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); + //keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); + //keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); +// keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); keyFile.set_string ("Color Management", "AdobeRGB", rtSettings.adobe); keyFile.set_string ("Color Management", "ProPhoto", rtSettings.prophoto); @@ -2054,7 +2147,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_string ("Color Management", "Bruce", rtSettings.bruce); keyFile.set_integer ("Color Management", "WhiteBalanceSpotSize", whiteBalanceSpotSize); keyFile.set_boolean ("Color Management", "GamutICC", rtSettings.gamutICC); -// keyFile.set_boolean ("Color Management", "BWcomplement", rtSettings.bw_complementary); + //keyFile.set_boolean ("Color Management", "BWcomplement", rtSettings.bw_complementary); keyFile.set_boolean ("Color Management", "Ciecamfloat", rtSettings.ciecamfloat); keyFile.set_boolean ("Color Management", "GamutLch", rtSettings.gamutLch); keyFile.set_integer ("Color Management", "ProtectRed", rtSettings.protectred); @@ -2062,13 +2155,13 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_double ("Color Management", "ProtectRedH", rtSettings.protectredh); keyFile.set_integer ("Color Management", "CRI", rtSettings.CRI_color); keyFile.set_integer ("Color Management", "DenoiseLabgamma", rtSettings.denoiselabgamma); -// keyFile.set_boolean ("Color Management", "Ciebadpixgauss", rtSettings.ciebadpixgauss); - keyFile.set_double ("Color Management", "CBDLArtif", rtSettings.artifact_cbdl); - keyFile.set_double ("Color Management", "CBDLlevel0", rtSettings.level0_cbdl); - keyFile.set_double ("Color Management", "CBDLlevel123", rtSettings.level123_cbdl); -// keyFile.set_double ("Color Management", "Colortoningab", rtSettings.colortoningab); -// keyFile.set_double ("Color Management", "Decaction", rtSettings.decaction); - keyFile.set_string ("Color Management", "ClutsDirectory", clutsDir); + //keyFile.set_boolean ("Color Management", "Ciebadpixgauss", rtSettings.ciebadpixgauss); + keyFile.set_double ("Color Management", "CBDLArtif", rtSettings.artifact_cbdl); + keyFile.set_double ("Color Management", "CBDLlevel0", rtSettings.level0_cbdl); + keyFile.set_double ("Color Management", "CBDLlevel123", rtSettings.level123_cbdl); + //keyFile.set_double ("Color Management", "Colortoningab", rtSettings.colortoningab); + //keyFile.set_double ("Color Management", "Decaction", rtSettings.decaction); + keyFile.set_string ("Color Management", "ClutsDirectory", clutsDir); Glib::ArrayHandle bab = baBehav; @@ -2080,56 +2173,59 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_double ("Sounds", "LngEditProcDoneSecs", sndLngEditProcDoneSecs); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpening" , fastexport_bypass_sharpening ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenEdge" , fastexport_bypass_sharpenEdge ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenMicro" , fastexport_bypass_sharpenMicro ); - //keyFile.set_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" , fastexport_bypass_lumaDenoise ); - //keyFile.set_boolean ("Fast Export", "fastexport_bypass_colorDenoise" , fastexport_bypass_colorDenoise ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_defringe" , fastexport_bypass_defringe ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" , fastexport_bypass_dirpyrDenoise ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_sh_hq" , fastexport_bypass_sh_hq ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" , fastexport_bypass_dirpyrequalizer ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_wavelet" , fastexport_bypass_wavelet ); - keyFile.set_string ("Fast Export", "fastexport_raw_bayer_method" , fastexport_raw_bayer_method ); - //keyFile.set_boolean ("Fast Export", "fastexport_bypass_bayer_raw_all_enhance" , fastexport_bypass_raw_bayer_all_enhance ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations" , fastexport_bypass_raw_bayer_dcb_iterations ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance" , fastexport_bypass_raw_bayer_dcb_enhance ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpening", fastexport_bypass_sharpening); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenEdge", fastexport_bypass_sharpenEdge); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sharpenMicro", fastexport_bypass_sharpenMicro); + //keyFile.set_boolean ("Fast Export", "fastexport_bypass_lumaDenoise" , fastexport_bypass_lumaDenoise); + //keyFile.set_boolean ("Fast Export", "fastexport_bypass_colorDenoise" , fastexport_bypass_colorDenoise); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_defringe", fastexport_bypass_defringe); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise", fastexport_bypass_dirpyrDenoise); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_sh_hq", fastexport_bypass_sh_hq); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer", fastexport_bypass_dirpyrequalizer); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_wavelet", fastexport_bypass_wavelet); + keyFile.set_string ("Fast Export", "fastexport_raw_bayer_method", fastexport_raw_bayer_method); + //keyFile.set_boolean ("Fast Export", "fastexport_bypass_bayer_raw_all_enhance" , fastexport_bypass_raw_bayer_all_enhance); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_iterations", fastexport_bypass_raw_bayer_dcb_iterations); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_dcb_enhance", fastexport_bypass_raw_bayer_dcb_enhance); keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_lmmse_iterations", fastexport_bypass_raw_bayer_lmmse_iterations); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise" , fastexport_bypass_raw_bayer_linenoise ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh" , fastexport_bypass_raw_bayer_greenthresh ); - keyFile.set_string ("Fast Export", "fastexport_raw_xtrans_method" , fastexport_raw_xtrans_method ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps" , fastexport_bypass_raw_ccSteps ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ca" , fastexport_bypass_raw_ca ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_df" , fastexport_bypass_raw_df ); - keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ff" , fastexport_bypass_raw_ff ); - keyFile.set_string ("Fast Export", "fastexport_icm_input" , fastexport_icm_input ); - keyFile.set_string ("Fast Export", "fastexport_icm_working" , fastexport_icm_working ); - keyFile.set_string ("Fast Export", "fastexport_icm_output" , fastexport_icm_output ); - keyFile.set_integer ("Fast Export", "fastexport_icm_output_intent" , fastexport_icm_outputIntent ); - keyFile.set_boolean ("Fast Export", "fastexport_icm_output_bpc" , fastexport_icm_outputBPC ); - keyFile.set_string ("Fast Export", "fastexport_icm_gamma" , fastexport_icm_gamma ); - keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled" , fastexport_resize_enabled ); - keyFile.set_double ("Fast Export", "fastexport_resize_scale" , fastexport_resize_scale ); - keyFile.set_string ("Fast Export", "fastexport_resize_appliesTo" , fastexport_resize_appliesTo ); - keyFile.set_string ("Fast Export", "fastexport_resize_method" , fastexport_resize_method ); - keyFile.set_integer ("Fast Export", "fastexport_resize_dataspec" , fastexport_resize_dataspec ); - keyFile.set_integer ("Fast Export", "fastexport_resize_width" , fastexport_resize_width ); - keyFile.set_integer ("Fast Export", "fastexport_resize_height" , fastexport_resize_height ); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_linenoise", fastexport_bypass_raw_bayer_linenoise); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_bayer_greenthresh", fastexport_bypass_raw_bayer_greenthresh); + keyFile.set_string ("Fast Export", "fastexport_raw_xtrans_method", fastexport_raw_xtrans_method); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ccSteps", fastexport_bypass_raw_ccSteps); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ca", fastexport_bypass_raw_ca); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_df", fastexport_bypass_raw_df); + keyFile.set_boolean ("Fast Export", "fastexport_bypass_raw_ff", fastexport_bypass_raw_ff); + keyFile.set_string ("Fast Export", "fastexport_icm_input", fastexport_icm_input); + keyFile.set_string ("Fast Export", "fastexport_icm_working", fastexport_icm_working); + keyFile.set_string ("Fast Export", "fastexport_icm_output", fastexport_icm_output); + keyFile.set_integer ("Fast Export", "fastexport_icm_output_intent", fastexport_icm_outputIntent); + keyFile.set_boolean ("Fast Export", "fastexport_icm_output_bpc", fastexport_icm_outputBPC); + keyFile.set_string ("Fast Export", "fastexport_icm_gamma", fastexport_icm_gamma); + keyFile.set_boolean ("Fast Export", "fastexport_resize_enabled", fastexport_resize_enabled); + keyFile.set_double ("Fast Export", "fastexport_resize_scale", fastexport_resize_scale); + keyFile.set_string ("Fast Export", "fastexport_resize_appliesTo", fastexport_resize_appliesTo); + keyFile.set_string ("Fast Export", "fastexport_resize_method", fastexport_resize_method); + keyFile.set_integer ("Fast Export", "fastexport_resize_dataspec", fastexport_resize_dataspec); + keyFile.set_integer ("Fast Export", "fastexport_resize_width", fastexport_resize_width); + keyFile.set_integer ("Fast Export", "fastexport_resize_height", fastexport_resize_height); + keyFile.set_integer ("Fast Export", "fastexport_use_fast_pipeline", fastexport_use_fast_pipeline); - keyFile.set_string ("Dialogs", "LastIccDir", lastIccDir); - keyFile.set_string ("Dialogs", "LastDarkframeDir", lastDarkframeDir); - keyFile.set_string ("Dialogs", "LastFlatfieldDir", lastFlatfieldDir); - keyFile.set_string ("Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir); - keyFile.set_string ("Dialogs", "LastLabCurvesDir", lastLabCurvesDir); - keyFile.set_string ("Dialogs", "LastRetinexDir", lastRetinexDir); - keyFile.set_string ("Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); - keyFile.set_string ("Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); - keyFile.set_string ("Dialogs", "LastPFCurvesDir", lastPFCurvesDir); - keyFile.set_string ("Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); - keyFile.set_string ("Dialogs", "LastBWCurvesDir", lastBWCurvesDir); - keyFile.set_string ("Dialogs", "LastToneCurvesDir", lastToneCurvesDir); - keyFile.set_string ("Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); - keyFile.set_string ("Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); + keyFile.set_string ("Dialogs", "LastIccDir", lastIccDir); + keyFile.set_string ("Dialogs", "LastDarkframeDir", lastDarkframeDir); + keyFile.set_string ("Dialogs", "LastFlatfieldDir", lastFlatfieldDir); + keyFile.set_string ("Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir); + keyFile.set_string ("Dialogs", "LastLabCurvesDir", lastLabCurvesDir); + keyFile.set_string ("Dialogs", "LastRetinexDir", lastRetinexDir); + keyFile.set_string ("Dialogs", "LastDenoiseCurvesDir", lastDenoiseCurvesDir); + keyFile.set_string ("Dialogs", "LastWaveletCurvesDir", lastWaveletCurvesDir); + keyFile.set_string ("Dialogs", "LastPFCurvesDir", lastPFCurvesDir); + keyFile.set_string ("Dialogs", "LastHsvCurvesDir", lastHsvCurvesDir); + keyFile.set_string ("Dialogs", "LastBWCurvesDir", lastBWCurvesDir); + keyFile.set_string ("Dialogs", "LastToneCurvesDir", lastToneCurvesDir); + keyFile.set_string ("Dialogs", "LastVibranceCurvesDir", lastVibranceCurvesDir); + keyFile.set_string ("Dialogs", "LastProfilingReferenceDir", lastProfilingReferenceDir); + keyFile.set_string ("Dialogs", "LastLensProfileDir", lastLensProfileDir); + keyFile.set_boolean ("Dialogs", "GimpPluginShowInfoDialog", gimpPluginShowInfoDialog); keyData = keyFile.to_data (); @@ -2142,10 +2238,13 @@ int Options::saveToFile (Glib::ustring fname) FILE *f = g_fopen (fname.c_str (), "wt"); if (f == nullptr) { - if (options.rtSettings.verbose) { - printf("Options::saveToFile / Error: unable to open file \"%s\" with write access!\n", fname.c_str()); - } - + std::cout << "Warning! Unable to save your preferences to: " << fname << std::endl; +#ifndef RAWTHERAPEE_CLI + Glib::ustring msg_ = Glib::ustring::compose (M ("MAIN_MSG_WRITEFAILED"), fname.c_str()); + //writeFailed (getToplevelWindow (this), msg_); + Gtk::MessageDialog msgd (msg_, true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true); + msgd.run (); +#endif return 1; } else { fprintf (f, "%s", keyData.c_str ()); @@ -2154,7 +2253,7 @@ int Options::saveToFile (Glib::ustring fname) } } -bool Options::load () +bool Options::load (bool lightweight) { // Find the application data path @@ -2162,55 +2261,55 @@ bool Options::load () const gchar* path; Glib::ustring dPath; - path = g_getenv("RT_SETTINGS"); + path = g_getenv ("RT_SETTINGS"); if (path != nullptr) { - rtdir = Glib::ustring(path); + rtdir = Glib::ustring (path); - if (!Glib::path_is_absolute(rtdir)) { + if (!Glib::path_is_absolute (rtdir)) { return false; } } else { #ifdef WIN32 WCHAR pathW[MAX_PATH] = {0}; - if (SHGetSpecialFolderPathW(NULL, pathW, CSIDL_LOCAL_APPDATA, false)) { + if (SHGetSpecialFolderPathW (NULL, pathW, CSIDL_LOCAL_APPDATA, false)) { char pathA[MAX_PATH]; - WideCharToMultiByte(CP_UTF8, 0, pathW, -1, pathA, MAX_PATH, 0, 0); - rtdir = Glib::build_filename(Glib::ustring(pathA), Glib::ustring(CACHEFOLDERNAME)); + WideCharToMultiByte (CP_UTF8, 0, pathW, -1, pathA, MAX_PATH, 0, 0); + rtdir = Glib::build_filename (Glib::ustring (pathA), Glib::ustring (CACHEFOLDERNAME)); } #else - rtdir = Glib::build_filename(Glib::ustring(g_get_user_config_dir ()), Glib::ustring(CACHEFOLDERNAME)); + rtdir = Glib::build_filename (Glib::ustring (g_get_user_config_dir ()), Glib::ustring (CACHEFOLDERNAME)); #endif } if (options.rtSettings.verbose) { - printf("Settings directory (rtdir) = %s\n", rtdir.c_str()); + printf ("Settings directory (rtdir) = %s\n", rtdir.c_str()); } // Set the cache folder in RT's base folder - cacheBaseDir = Glib::build_filename(argv0, "cache"); + cacheBaseDir = Glib::build_filename (argv0, "cache"); // Read the global option file (the one located in the application's base folder) - options.readFromFile (Glib::build_filename(argv0, "options")); + options.readFromFile (Glib::build_filename (argv0, "options")); // Modify the path of the cache folder to the one provided in RT_CACHE environment variable - path = g_getenv("RT_CACHE"); + path = g_getenv ("RT_CACHE"); if (path != nullptr) { - cacheBaseDir = Glib::ustring(path); + cacheBaseDir = Glib::ustring (path); - if (!Glib::path_is_absolute(cacheBaseDir)) { + if (!Glib::path_is_absolute (cacheBaseDir)) { return false; } } // No environment variable provided, so falling back to the multi user mode, is enabled else if (options.multiUser) { #ifdef WIN32 - cacheBaseDir = Glib::build_filename(rtdir, "cache"); + cacheBaseDir = Glib::build_filename (rtdir, "cache"); #else - cacheBaseDir = Glib::build_filename(Glib::ustring(g_get_user_cache_dir()), Glib::ustring(CACHEFOLDERNAME)); + cacheBaseDir = Glib::build_filename (Glib::ustring (g_get_user_cache_dir()), Glib::ustring (CACHEFOLDERNAME)); #endif } @@ -2218,12 +2317,12 @@ bool Options::load () if (options.multiUser) { // Read the user option file (the one located somewhere in the user's home folder) // Those values supersets those of the global option file - int r = options.readFromFile (Glib::build_filename(rtdir, "options")); + int r = options.readFromFile (Glib::build_filename (rtdir, "options")); // If the local option file does not exist or is broken, and the local cache folder does not exist, recreate it if (r && !g_mkdir_with_parents (rtdir.c_str (), 511)) { // Save the option file - options.saveToFile (Glib::build_filename(rtdir, "options")); + options.saveToFile (Glib::build_filename (rtdir, "options")); } #ifdef __APPLE__ @@ -2233,7 +2332,7 @@ bool Options::load () } if (options.rtSettings.verbose) { - printf("Cache directory (cacheBaseDir) = %s\n", cacheBaseDir.c_str()); + printf ("Cache directory (cacheBaseDir) = %s\n", cacheBaseDir.c_str()); } // Update profile's path and recreate it if necessary @@ -2243,15 +2342,15 @@ bool Options::load () if (options.defProfRaw.empty()) { options.defProfRaw = DEFPROFILE_INTERNAL; } else { - Glib::ustring tmpFName = options.findProfilePath(options.defProfRaw); + Glib::ustring tmpFName = options.findProfilePath (options.defProfRaw); if (!tmpFName.empty()) { if (options.rtSettings.verbose) { - printf("Raws' default profile \"%s\" found\n", options.defProfRaw.c_str()); + printf ("Raws' default profile \"%s\" found\n", options.defProfRaw.c_str()); } } else { if (options.rtSettings.verbose) { - printf("Raws' default profile \"%s\" not found or not set -> using Internal values\n", options.defProfRaw.c_str()); + printf ("Raws' default profile \"%s\" not found or not set -> using Internal values\n", options.defProfRaw.c_str()); } options.defProfRaw = DEFPROFILE_INTERNAL; @@ -2262,15 +2361,15 @@ bool Options::load () if (options.defProfImg.empty()) { options.defProfImg = DEFPROFILE_INTERNAL; } else { - Glib::ustring tmpFName = options.findProfilePath(options.defProfImg); + Glib::ustring tmpFName = options.findProfilePath (options.defProfImg); if (!tmpFName.empty()) { if (options.rtSettings.verbose) { - printf("Images' default profile \"%s\" found\n", options.defProfImg.c_str()); + printf ("Images' default profile \"%s\" found\n", options.defProfImg.c_str()); } } else { if (options.rtSettings.verbose) { - printf("Images' default profile \"%s\" not found or not set -> using Internal values\n", options.defProfImg.c_str()); + printf ("Images' default profile \"%s\" not found or not set -> using Internal values\n", options.defProfImg.c_str()); } options.defProfImg = DEFPROFILE_INTERNAL; @@ -2293,7 +2392,7 @@ bool Options::load () // out which are the parent translations. Furthermore, there must be a file for each locale () -- you cannot have // 'French (CA)' unless there is a file 'French'. - Glib::ustring defaultTranslation = argv0 + "/languages/default"; + Glib::ustring defaultTranslation = Glib::build_filename (argv0, "languages", "default"); Glib::ustring languageTranslation = ""; Glib::ustring localeTranslation = ""; @@ -2302,20 +2401,20 @@ bool Options::load () } if (!options.language.empty()) { - std::vector langPortions = Glib::Regex::split_simple(" ", options.language); + std::vector langPortions = Glib::Regex::split_simple (" ", options.language); if (langPortions.size() >= 1) { - languageTranslation = argv0 + "/languages/" + langPortions.at(0); + languageTranslation = Glib::build_filename (argv0, "languages", langPortions.at (0)); } if (langPortions.size() >= 2) { - localeTranslation = argv0 + "/languages/" + options.language; + localeTranslation = Glib::build_filename (argv0, "languages", options.language); } } - langMgr.load(localeTranslation, new MultiLangMgr(languageTranslation, new MultiLangMgr(defaultTranslation))); + langMgr.load (localeTranslation, new MultiLangMgr (languageTranslation, new MultiLangMgr (defaultTranslation))); - rtengine::init (&options.rtSettings, argv0, rtdir); + rtengine::init (&options.rtSettings, argv0, rtdir, !lightweight); return true; } @@ -2324,19 +2423,40 @@ void Options::save () { if (!options.multiUser) { - options.saveToFile (Glib::build_filename(argv0, "options")); + options.saveToFile (Glib::build_filename (argv0, "options")); } else { - options.saveToFile (Glib::build_filename(rtdir, "options")); + options.saveToFile (Glib::build_filename (rtdir, "options")); } } +/* + * return true if ext is a parsed extension (retained or not) + */ +bool Options::is_parse_extention (Glib::ustring fname) +{ + Glib::ustring ext = getExtension (fname).lowercase(); + + if (!ext.empty()) { + // there is an extension to the filename + + // look out if it has one of the listed extensions (selected or not) + for (unsigned int i = 0; i < parseExtensions.size(); i++) { + if (ext == parseExtensions[i]) { + return true; + } + } + } + + return false; +} + /* * return true if fname ends with one of the retained image file extensions */ bool Options::has_retained_extention (Glib::ustring fname) { - Glib::ustring ext = getExtension(fname).lowercase(); + Glib::ustring ext = getExtension (fname).lowercase(); if (!ext.empty()) { // there is an extension to the filename diff --git a/rtgui/options.h b/rtgui/options.h index ab0726798..13025ee7c 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -27,6 +27,8 @@ #define STARTUPDIR_CUSTOM 2 #define STARTUPDIR_LAST 3 +#define THEMEREGEXSTR "^(.+)-GTK3-(\\d{1,2})?_(\\d{1,2})?\\.css$" + // Default bundled profile name to use for Raw images #ifdef WIN32 #define DEFPROFILE_RAW "${G}\\Default" @@ -37,11 +39,23 @@ #define DEFPROFILE_IMG "Neutral" // Profile name to use for internal values' profile #define DEFPROFILE_INTERNAL "Neutral" +// Special name for the Dynamic profile +#define DEFPROFILE_DYNAMIC "Dynamic" -class SaveFormat +struct SaveFormat { + SaveFormat() : + format("jpg"), + pngBits(8), + pngCompression(6), + jpegQuality(90), + jpegSubSamp(2), + tiffBits(8), + tiffUncompressed(true), + saveParams(true) + { + } -public: Glib::ustring format; int pngBits; int pngCompression; @@ -50,7 +64,6 @@ public: int tiffBits; bool tiffUncompressed; bool saveParams; - SaveFormat () : format("jpg"), pngBits(8), pngCompression(6), jpegQuality(90), jpegSubSamp(2), tiffBits(8), tiffUncompressed(true), saveParams(true) {}; }; enum ThFileType {FT_Invalid = -1, FT_None = 0, FT_Raw = 1, FT_Jpeg = 2, FT_Tiff = 3, FT_Png = 4, FT_Custom = 5, FT_Tiff16 = 6, FT_Png16 = 7, FT_Custom16 = 8}; @@ -119,13 +132,19 @@ public: bool browserDirPanelOpened; bool editorFilmStripOpened; int historyPanelWidth; - Glib::ustring font; - Glib::ustring colorPickerFont; - int windowWidth; - int windowHeight; int windowX; int windowY; + int windowWidth; + int windowHeight; bool windowMaximized; + int windowMonitor; + int meowMonitor; + bool meowFullScreen; + bool meowMaximized; + int meowWidth; + int meowHeight; + int meowX; + int meowY; int detailWindowWidth; int detailWindowHeight; int dirBrowserWidth; @@ -135,6 +154,10 @@ public: int lastScale; int panAccelFactor; int lastCropSize; + Glib::ustring fontFamily; // RT's main font family + int fontSize; // RT's main font size (units: pt) + Glib::ustring CPFontFamily; // ColorPicker font family + int CPFontSize; // ColorPicker font size (units: pt) bool fbOnlyRaw; bool fbShowDateTime; bool fbShowBasicExif; @@ -162,8 +185,6 @@ public: Glib::ustring language; bool languageAutoDetect; Glib::ustring theme; - bool slimUI; - bool useSystemTheme; static Glib::ustring cacheBaseDir; bool autoSuffix; bool forceFormatOpts; @@ -275,6 +296,7 @@ public: int fastexport_resize_dataspec; int fastexport_resize_width; int fastexport_resize_height; + bool fastexport_use_fast_pipeline; // Dialog settings Glib::ustring lastIccDir; @@ -292,6 +314,8 @@ public: Glib::ustring lastVibranceCurvesDir; Glib::ustring lastProfilingReferenceDir; Glib::ustring lastBWCurvesDir; + Glib::ustring lastLensProfileDir; + bool gimpPluginShowInfoDialog; size_t maxRecentFolders; // max. number of recent folders stored in options file std::vector recentFolders; // List containing all recent folders @@ -304,7 +328,7 @@ public: void setDefaults (); int readFromFile (Glib::ustring fname); int saveToFile (Glib::ustring fname); - static bool load (); + static bool load (bool lightweight = false); static void save (); // if multiUser=false, send back the global profile path @@ -318,6 +342,7 @@ public: return globalProfilePath; } Glib::ustring findProfilePath(Glib::ustring &profName); + bool is_parse_extention (Glib::ustring fname); bool has_retained_extention (Glib::ustring fname); bool is_extention_enabled(Glib::ustring ext); bool is_defProfRawMissing() @@ -342,8 +367,9 @@ extern Options options; extern Glib::ustring argv0; extern Glib::ustring argv1; extern bool simpleEditor; +extern bool gimpPlugin; +extern bool remote; extern Glib::ustring versionString; -extern Glib::ustring versionSuffixString; extern Glib::ustring paramFileExtension; #endif diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index d5122444f..01ecfbe97 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -67,12 +67,10 @@ void ParamsEdited::set (bool v) retinex.gam = v; retinex.slope = v; retinex.neigh = v; - retinex.gain = v; retinex.offs = v; retinex.vart = v; retinex.limd = v; retinex.highl = v; - retinex.baselog = v; retinex.skal = v; retinex.medianmap = v; retinex.transmissionCurve = v; @@ -177,9 +175,14 @@ void ParamsEdited::set (bool v) colorappearance.enabled = v; colorappearance.degree = v; colorappearance.autodegree = v; + colorappearance.degreeout = v; + colorappearance.autodegreeout = v; colorappearance.surround = v; + colorappearance.surrsrc = v; colorappearance.adapscen = v; colorappearance.autoadapscen = v; + colorappearance.ybscen = v; + colorappearance.autoybscen = v; colorappearance.adaplum = v; colorappearance.badpixsl = v; colorappearance.wbmodel = v; @@ -206,6 +209,11 @@ void ParamsEdited::set (bool v) colorappearance.curveMode = v; colorappearance.curveMode2 = v; colorappearance.curveMode3 = v; + colorappearance.tempout = v; + colorappearance.greenout = v; + colorappearance.ybout = v; + colorappearance.tempsc = v; + colorappearance.greensc = v; //colorBoost.amount = v; //colorBoost.avoidclip = v; @@ -215,6 +223,7 @@ void ParamsEdited::set (bool v) wb.green = v; wb.temperature = v; wb.equal = v; + wb.tempBias = v; //colorShift.a = v; //colorShift.b = v; //lumaDenoise.enabled = v; @@ -234,7 +243,6 @@ void ParamsEdited::set (bool v) dirpyrDenoise.lcurve = v; dirpyrDenoise.cccurve = v; dirpyrDenoise.median = v; - dirpyrDenoise.autochroma = v; dirpyrDenoise.luma = v; dirpyrDenoise.Ldetail = v; dirpyrDenoise.chroma = v; @@ -352,7 +360,6 @@ void ParamsEdited::set (bool v) icm.applyLookTable = v; icm.applyBaselineExposureOffset = v; icm.applyHueSatMap = v; - icm.blendCMSMatrix = v; icm.dcpIlluminant = v; icm.working = v; icm.output = v; @@ -363,6 +370,7 @@ void ParamsEdited::set (bool v) icm.gampos = v; icm.slpos = v; raw.bayersensor.method = v; + raw.bayersensor.imageNum = v; raw.bayersensor.ccSteps = v; raw.bayersensor.exBlack0 = v; raw.bayersensor.exBlack1 = v; @@ -373,6 +381,36 @@ void ParamsEdited::set (bool v) raw.bayersensor.dcbEnhance = v; //raw.bayersensor.allEnhance = v; raw.bayersensor.lmmseIterations = v; + raw.bayersensor.pixelShiftMotion = v; + raw.bayersensor.pixelShiftMotionCorrection = v; + raw.bayersensor.pixelShiftMotionCorrectionMethod = v; + raw.bayersensor.pixelShiftStddevFactorGreen = v; + raw.bayersensor.pixelShiftStddevFactorRed = v; + raw.bayersensor.pixelShiftStddevFactorBlue = v; + raw.bayersensor.pixelShiftEperIso = v; + raw.bayersensor.pixelShiftNreadIso = v; + raw.bayersensor.pixelShiftPrnu = v; + raw.bayersensor.pixelShiftSigma = v; + raw.bayersensor.pixelShiftSum = v; + raw.bayersensor.pixelShiftRedBlueWeight = v; + raw.bayersensor.pixelShiftShowMotion = v; + raw.bayersensor.pixelShiftShowMotionMaskOnly = v; + raw.bayersensor.pixelShiftAutomatic = v; + raw.bayersensor.pixelShiftNonGreenHorizontal = v; + raw.bayersensor.pixelShiftNonGreenVertical = v; + raw.bayersensor.pixelShiftHoleFill = v; + raw.bayersensor.pixelShiftMedian = v; + raw.bayersensor.pixelShiftMedian3 = v; + raw.bayersensor.pixelShiftGreen = v; + raw.bayersensor.pixelShiftBlur = v; + raw.bayersensor.pixelShiftSmooth = v; + raw.bayersensor.pixelShiftExp0 = v; + raw.bayersensor.pixelShiftLmmse = v; + raw.bayersensor.pixelShiftEqualBright = v; + raw.bayersensor.pixelShiftEqualBrightChannel = v; + raw.bayersensor.pixelShiftNonGreenCross = v; + raw.bayersensor.pixelShiftNonGreenCross2 = v; + raw.bayersensor.pixelShiftNonGreenAmaze = v; raw.bayersensor.greenEq = v; raw.bayersensor.linenoise = v; raw.xtranssensor.method = v; @@ -381,7 +419,6 @@ void ParamsEdited::set (bool v) raw.xtranssensor.exBlackGreen = v; raw.xtranssensor.exBlackBlue = v; raw.caCorrection = v; - raw.caAutoStrength = v; raw.caBlue = v; raw.caRed = v; raw.hotPixelFilter = v; @@ -484,11 +521,11 @@ void ParamsEdited::set (bool v) wavelet.exptoning = v; wavelet.expnoise = v; - for(int i = 0; i < 9; i++) { + for (int i = 0; i < 9; i++) { wavelet.c[i] = v; } - for(int i = 0; i < 9; i++) { + for (int i = 0; i < 9; i++) { wavelet.ch[i] = v; } @@ -497,7 +534,7 @@ void ParamsEdited::set (bool v) dirpyrequalizer.cbdlMethod = v; - for(int i = 0; i < 6; i++) { + for (int i = 0; i < 6; i++) { dirpyrequalizer.mult[i] = v; } @@ -567,12 +604,10 @@ void ParamsEdited::initFrom (const std::vector retinex.gam = retinex.gam && p.retinex.gam == other.retinex.gam; retinex.slope = retinex.slope && p.retinex.slope == other.retinex.slope; retinex.neigh = retinex.neigh && p.retinex.neigh == other.retinex.neigh; - retinex.gain = retinex.gain && p.retinex.gain == other.retinex.gain; retinex.offs = retinex.offs && p.retinex.offs == other.retinex.offs; retinex.vart = retinex.vart && p.retinex.vart == other.retinex.vart; retinex.limd = retinex.limd && p.retinex.limd == other.retinex.limd; retinex.highl = retinex.highl && p.retinex.highl == other.retinex.highl; - retinex.baselog = retinex.baselog && p.retinex.baselog == other.retinex.baselog; retinex.skal = retinex.skal && p.retinex.skal == other.retinex.skal; retinex.medianmap = retinex.medianmap && p.retinex.medianmap == other.retinex.medianmap; retinex.highlights = retinex.highlights && p.retinex.highlights == other.retinex.highlights; @@ -675,9 +710,14 @@ void ParamsEdited::initFrom (const std::vector colorappearance.enabled = colorappearance.enabled && p.colorappearance.enabled == other.colorappearance.enabled; colorappearance.degree = colorappearance.degree && p.colorappearance.degree == other.colorappearance.degree; colorappearance.autodegree = colorappearance.autodegree && p.colorappearance.autodegree == other.colorappearance.autodegree; + colorappearance.degreeout = colorappearance.degreeout && p.colorappearance.degreeout == other.colorappearance.degreeout; + colorappearance.autodegreeout = colorappearance.autodegreeout && p.colorappearance.autodegreeout == other.colorappearance.autodegreeout; colorappearance.surround = colorappearance.surround && p.colorappearance.surround == other.colorappearance.surround; + colorappearance.surrsrc = colorappearance.surrsrc && p.colorappearance.surrsrc == other.colorappearance.surrsrc; colorappearance.adapscen = colorappearance.adapscen && p.colorappearance.adapscen == other.colorappearance.adapscen; colorappearance.autoadapscen = colorappearance.autoadapscen && p.colorappearance.autoadapscen == other.colorappearance.autoadapscen; + colorappearance.ybscen = colorappearance.ybscen && p.colorappearance.ybscen == other.colorappearance.ybscen; + colorappearance.autoybscen = colorappearance.autoybscen && p.colorappearance.autoybscen == other.colorappearance.autoybscen; colorappearance.adaplum = colorappearance.adaplum && p.colorappearance.adaplum == other.colorappearance.adaplum; colorappearance.badpixsl = colorappearance.badpixsl && p.colorappearance.badpixsl == other.colorappearance.badpixsl; colorappearance.wbmodel = colorappearance.wbmodel && p.colorappearance.wbmodel == other.colorappearance.wbmodel; @@ -703,6 +743,11 @@ void ParamsEdited::initFrom (const std::vector colorappearance.curveMode = colorappearance.curveMode && p.colorappearance.curveMode == other.colorappearance.curveMode; colorappearance.curveMode2 = colorappearance.curveMode2 && p.colorappearance.curveMode2 == other.colorappearance.curveMode2; colorappearance.curveMode3 = colorappearance.curveMode3 && p.colorappearance.curveMode3 == other.colorappearance.curveMode3; + colorappearance.tempout = colorappearance.tempout && p.colorappearance.tempout == other.colorappearance.tempout; + colorappearance.greenout = colorappearance.greenout && p.colorappearance.greenout == other.colorappearance.greenout; + colorappearance.ybout = colorappearance.ybout && p.colorappearance.ybout == other.colorappearance.ybout; + colorappearance.tempsc = colorappearance.tempsc && p.colorappearance.tempsc == other.colorappearance.tempsc; + colorappearance.greensc = colorappearance.greensc && p.colorappearance.greensc == other.colorappearance.greensc; //colorBoost.amount = colorBoost.amount && p.colorBoost.amount == other.colorBoost.amount; //colorBoost.avoidclip = colorBoost.avoidclip && p.colorBoost.avoidclip == other.colorBoost.avoidclip; @@ -712,6 +757,7 @@ void ParamsEdited::initFrom (const std::vector wb.green = wb.green && p.wb.green == other.wb.green; wb.equal = wb.equal && p.wb.equal == other.wb.equal; wb.temperature = wb.temperature && p.wb.temperature == other.wb.temperature; + wb.tempBias = wb.tempBias && p.wb.tempBias == other.wb.tempBias; //colorShift.a = colorShift.a && p.colorShift.a == other.colorShift.a; //colorShift.b = colorShift.b && p.colorShift.b == other.colorShift.b; //lumaDenoise.enabled = lumaDenoise.enabled && p.lumaDenoise.enabled == other.lumaDenoise.enabled; @@ -730,7 +776,6 @@ void ParamsEdited::initFrom (const std::vector dirpyrDenoise.enabled = dirpyrDenoise.enabled && p.dirpyrDenoise.enabled == other.dirpyrDenoise.enabled; dirpyrDenoise.enhance = dirpyrDenoise.enhance && p.dirpyrDenoise.enhance == other.dirpyrDenoise.enhance; dirpyrDenoise.median = dirpyrDenoise.median && p.dirpyrDenoise.median == other.dirpyrDenoise.median; - dirpyrDenoise.autochroma = dirpyrDenoise.autochroma && p.dirpyrDenoise.autochroma == other.dirpyrDenoise.autochroma; // dirpyrDenoise.perform = dirpyrDenoise.perform && p.dirpyrDenoise.perform == other.dirpyrDenoise.perform; dirpyrDenoise.luma = dirpyrDenoise.luma && p.dirpyrDenoise.luma == other.dirpyrDenoise.luma; dirpyrDenoise.lcurve = dirpyrDenoise.lcurve && p.dirpyrDenoise.lcurve == other.dirpyrDenoise.lcurve; @@ -849,7 +894,6 @@ void ParamsEdited::initFrom (const std::vector icm.applyLookTable = icm.applyLookTable && p.icm.applyLookTable == other.icm.applyLookTable; icm.applyBaselineExposureOffset = icm.applyBaselineExposureOffset && p.icm.applyBaselineExposureOffset == other.icm.applyBaselineExposureOffset; icm.applyHueSatMap = icm.applyHueSatMap && p.icm.applyHueSatMap == other.icm.applyHueSatMap; - icm.blendCMSMatrix = icm.blendCMSMatrix && p.icm.blendCMSMatrix == other.icm.blendCMSMatrix; icm.dcpIlluminant = icm.dcpIlluminant && p.icm.dcpIlluminant == other.icm.dcpIlluminant; icm.working = icm.working && p.icm.working == other.icm.working; icm.output = icm.output && p.icm.output == other.icm.output; @@ -860,6 +904,7 @@ void ParamsEdited::initFrom (const std::vector icm.gampos = icm.gampos && p.icm.gampos == other.icm.gampos; icm.slpos = icm.slpos && p.icm.slpos == other.icm.slpos; raw.bayersensor.method = raw.bayersensor.method && p.raw.bayersensor.method == other.raw.bayersensor.method; + raw.bayersensor.imageNum = raw.bayersensor.imageNum && p.raw.bayersensor.imageNum == other.raw.bayersensor.imageNum; raw.bayersensor.ccSteps = raw.bayersensor.ccSteps && p.raw.bayersensor.ccSteps == other.raw.bayersensor.ccSteps; raw.bayersensor.exBlack0 = raw.bayersensor.exBlack0 && p.raw.bayersensor.black0 == other.raw.bayersensor.black0; raw.bayersensor.exBlack1 = raw.bayersensor.exBlack1 && p.raw.bayersensor.black1 == other.raw.bayersensor.black1; @@ -870,6 +915,36 @@ void ParamsEdited::initFrom (const std::vector raw.bayersensor.dcbEnhance = raw.bayersensor.dcbEnhance && p.raw.bayersensor.dcb_enhance == other.raw.bayersensor.dcb_enhance; //raw.bayersensor.allEnhance = raw.bayersensor.allEnhance && p.raw.bayersensor.all_enhance == other.raw.bayersensor.all_enhance; raw.bayersensor.lmmseIterations = raw.bayersensor.lmmseIterations && p.raw.bayersensor.lmmse_iterations == other.raw.bayersensor.lmmse_iterations; + raw.bayersensor.pixelShiftMotion = raw.bayersensor.pixelShiftMotion && p.raw.bayersensor.pixelShiftMotion == other.raw.bayersensor.pixelShiftMotion; + raw.bayersensor.pixelShiftMotionCorrection = raw.bayersensor.pixelShiftMotionCorrection && p.raw.bayersensor.pixelShiftMotionCorrection == other.raw.bayersensor.pixelShiftMotionCorrection; + raw.bayersensor.pixelShiftMotionCorrectionMethod = raw.bayersensor.pixelShiftMotionCorrectionMethod && p.raw.bayersensor.pixelShiftMotionCorrectionMethod == other.raw.bayersensor.pixelShiftMotionCorrectionMethod; + raw.bayersensor.pixelShiftStddevFactorGreen = raw.bayersensor.pixelShiftStddevFactorGreen && p.raw.bayersensor.pixelShiftStddevFactorGreen == other.raw.bayersensor.pixelShiftStddevFactorGreen; + raw.bayersensor.pixelShiftStddevFactorRed = raw.bayersensor.pixelShiftStddevFactorRed && p.raw.bayersensor.pixelShiftStddevFactorRed == other.raw.bayersensor.pixelShiftStddevFactorRed; + raw.bayersensor.pixelShiftStddevFactorBlue = raw.bayersensor.pixelShiftStddevFactorBlue && p.raw.bayersensor.pixelShiftStddevFactorBlue == other.raw.bayersensor.pixelShiftStddevFactorBlue; + raw.bayersensor.pixelShiftEperIso = raw.bayersensor.pixelShiftEperIso && p.raw.bayersensor.pixelShiftEperIso == other.raw.bayersensor.pixelShiftEperIso; + raw.bayersensor.pixelShiftNreadIso = raw.bayersensor.pixelShiftNreadIso && p.raw.bayersensor.pixelShiftNreadIso == other.raw.bayersensor.pixelShiftNreadIso; + raw.bayersensor.pixelShiftPrnu = raw.bayersensor.pixelShiftPrnu && p.raw.bayersensor.pixelShiftPrnu == other.raw.bayersensor.pixelShiftPrnu; + raw.bayersensor.pixelShiftSigma = raw.bayersensor.pixelShiftSigma && p.raw.bayersensor.pixelShiftSigma == other.raw.bayersensor.pixelShiftSigma; + raw.bayersensor.pixelShiftSum = raw.bayersensor.pixelShiftSum && p.raw.bayersensor.pixelShiftSum == other.raw.bayersensor.pixelShiftSum; + raw.bayersensor.pixelShiftRedBlueWeight = raw.bayersensor.pixelShiftRedBlueWeight && p.raw.bayersensor.pixelShiftRedBlueWeight == other.raw.bayersensor.pixelShiftRedBlueWeight; + raw.bayersensor.pixelShiftShowMotion = raw.bayersensor.pixelShiftShowMotion && p.raw.bayersensor.pixelShiftShowMotion == other.raw.bayersensor.pixelShiftShowMotion; + raw.bayersensor.pixelShiftShowMotionMaskOnly = raw.bayersensor.pixelShiftShowMotionMaskOnly && p.raw.bayersensor.pixelShiftShowMotionMaskOnly == other.raw.bayersensor.pixelShiftShowMotionMaskOnly; + raw.bayersensor.pixelShiftAutomatic = raw.bayersensor.pixelShiftAutomatic && p.raw.bayersensor.pixelShiftAutomatic == other.raw.bayersensor.pixelShiftAutomatic; + raw.bayersensor.pixelShiftNonGreenHorizontal = raw.bayersensor.pixelShiftNonGreenHorizontal && p.raw.bayersensor.pixelShiftNonGreenHorizontal == other.raw.bayersensor.pixelShiftNonGreenHorizontal; + raw.bayersensor.pixelShiftNonGreenVertical = raw.bayersensor.pixelShiftNonGreenVertical && p.raw.bayersensor.pixelShiftNonGreenVertical == other.raw.bayersensor.pixelShiftNonGreenVertical; + raw.bayersensor.pixelShiftHoleFill = raw.bayersensor.pixelShiftHoleFill && p.raw.bayersensor.pixelShiftHoleFill == other.raw.bayersensor.pixelShiftHoleFill; + raw.bayersensor.pixelShiftMedian = raw.bayersensor.pixelShiftMedian && p.raw.bayersensor.pixelShiftMedian == other.raw.bayersensor.pixelShiftMedian; + raw.bayersensor.pixelShiftMedian3 = raw.bayersensor.pixelShiftMedian3 && p.raw.bayersensor.pixelShiftMedian3 == other.raw.bayersensor.pixelShiftMedian3; + raw.bayersensor.pixelShiftGreen = raw.bayersensor.pixelShiftGreen && p.raw.bayersensor.pixelShiftGreen == other.raw.bayersensor.pixelShiftGreen; + raw.bayersensor.pixelShiftBlur = raw.bayersensor.pixelShiftBlur && p.raw.bayersensor.pixelShiftBlur == other.raw.bayersensor.pixelShiftBlur; + raw.bayersensor.pixelShiftSmooth = raw.bayersensor.pixelShiftSmooth && p.raw.bayersensor.pixelShiftSmoothFactor == other.raw.bayersensor.pixelShiftSmoothFactor; + raw.bayersensor.pixelShiftExp0 = raw.bayersensor.pixelShiftExp0 && p.raw.bayersensor.pixelShiftExp0 == other.raw.bayersensor.pixelShiftExp0; + raw.bayersensor.pixelShiftLmmse = raw.bayersensor.pixelShiftLmmse && p.raw.bayersensor.pixelShiftLmmse == other.raw.bayersensor.pixelShiftLmmse; + raw.bayersensor.pixelShiftEqualBright = raw.bayersensor.pixelShiftEqualBright && p.raw.bayersensor.pixelShiftEqualBright == other.raw.bayersensor.pixelShiftEqualBright; + raw.bayersensor.pixelShiftEqualBrightChannel = raw.bayersensor.pixelShiftEqualBrightChannel && p.raw.bayersensor.pixelShiftEqualBrightChannel == other.raw.bayersensor.pixelShiftEqualBrightChannel; + raw.bayersensor.pixelShiftNonGreenCross = raw.bayersensor.pixelShiftNonGreenCross && p.raw.bayersensor.pixelShiftNonGreenCross == other.raw.bayersensor.pixelShiftNonGreenCross; + raw.bayersensor.pixelShiftNonGreenCross2 = raw.bayersensor.pixelShiftNonGreenCross2 && p.raw.bayersensor.pixelShiftNonGreenCross2 == other.raw.bayersensor.pixelShiftNonGreenCross2; + raw.bayersensor.pixelShiftNonGreenAmaze = raw.bayersensor.pixelShiftNonGreenAmaze && p.raw.bayersensor.pixelShiftNonGreenAmaze == other.raw.bayersensor.pixelShiftNonGreenAmaze; raw.bayersensor.greenEq = raw.bayersensor.greenEq && p.raw.bayersensor.greenthresh == other.raw.bayersensor.greenthresh; raw.bayersensor.linenoise = raw.bayersensor.linenoise && p.raw.bayersensor.linenoise == other.raw.bayersensor.linenoise; raw.xtranssensor.method = raw.xtranssensor.method && p.raw.xtranssensor.method == other.raw.xtranssensor.method; @@ -878,7 +953,6 @@ void ParamsEdited::initFrom (const std::vector raw.xtranssensor.exBlackGreen = raw.xtranssensor.exBlackGreen && p.raw.xtranssensor.blackgreen == other.raw.xtranssensor.blackgreen; raw.xtranssensor.exBlackBlue = raw.xtranssensor.exBlackBlue && p.raw.xtranssensor.blackblue == other.raw.xtranssensor.blackblue; raw.caCorrection = raw.caCorrection && p.raw.ca_autocorrect == other.raw.ca_autocorrect; - raw.caAutoStrength = raw.caAutoStrength && p.raw.caautostrength == other.raw.caautostrength; raw.caRed = raw.caRed && p.raw.cared == other.raw.cared; raw.caBlue = raw.caBlue && p.raw.cablue == other.raw.cablue; raw.hotPixelFilter = raw.hotPixelFilter && p.raw.hotPixelFilter == other.raw.hotPixelFilter; @@ -977,11 +1051,11 @@ void ParamsEdited::initFrom (const std::vector wavelet.exptoning = wavelet.exptoning && p.wavelet.exptoning == other.wavelet.exptoning; wavelet.expnoise = wavelet.expnoise && p.wavelet.expnoise == other.wavelet.expnoise; - for(int i = 0; i < 9; i++) { + for (int i = 0; i < 9; i++) { wavelet.c[i] = wavelet.c[i] && p.wavelet.c[i] == other.wavelet.c[i]; } - for(int i = 0; i < 9; i++) { + for (int i = 0; i < 9; i++) { wavelet.ch[i] = wavelet.ch[i] && p.wavelet.ch[i] == other.wavelet.ch[i]; } @@ -989,7 +1063,7 @@ void ParamsEdited::initFrom (const std::vector dirpyrequalizer.gamutlab = dirpyrequalizer.gamutlab && p.dirpyrequalizer.gamutlab == other.dirpyrequalizer.gamutlab; dirpyrequalizer.cbdlMethod = dirpyrequalizer.cbdlMethod && p.dirpyrequalizer.cbdlMethod == other.dirpyrequalizer.cbdlMethod; - for(int i = 0; i < 6; i++) { + for (int i = 0; i < 6; i++) { dirpyrequalizer.mult[i] = dirpyrequalizer.mult[i] && p.dirpyrequalizer.mult[i] == other.dirpyrequalizer.mult[i]; } @@ -1175,18 +1249,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.retinex.highl = mods.retinex.highl; } - if (retinex.baselog) { - toEdit.retinex.baselog = mods.retinex.baselog; - } - if (retinex.skal) { toEdit.retinex.skal = mods.retinex.skal; } - if (retinex.gain) { - toEdit.retinex.gain = dontforceSet && options.baBehav[ADDSET_RETI_GAIN] ? toEdit.retinex.gain + mods.retinex.gain : mods.retinex.gain; - } - if (retinex.offs) { toEdit.retinex.offs = dontforceSet && options.baBehav[ADDSET_RETI_OFFS] ? toEdit.retinex.offs + mods.retinex.offs : mods.retinex.offs; } @@ -1593,6 +1659,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.wb.equal = dontforceSet && options.baBehav[ADDSET_WB_EQUAL] ? toEdit.wb.equal + mods.wb.equal : mods.wb.equal; } + if (wb.tempBias) { + toEdit.wb.tempBias = dontforceSet && options.baBehav[ADDSET_WB_TEMPBIAS] ? toEdit.wb.tempBias + mods.wb.tempBias : mods.wb.tempBias; + } + if (wb.green) { toEdit.wb.green = dontforceSet && options.baBehav[ADDSET_WB_GREEN] ? toEdit.wb.green + mods.wb.green : mods.wb.green; } @@ -1661,10 +1731,22 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.colorappearance.autodegree = mods.colorappearance.autodegree; } + if (colorappearance.degreeout) { + toEdit.colorappearance.degreeout = mods.colorappearance.degreeout; + } + + if (colorappearance.autodegreeout) { + toEdit.colorappearance.autodegreeout = mods.colorappearance.autodegreeout; + } + if (colorappearance.surround) { toEdit.colorappearance.surround = mods.colorappearance.surround; } + if (colorappearance.surrsrc) { + toEdit.colorappearance.surrsrc = mods.colorappearance.surrsrc; + } + if (colorappearance.autoadapscen) { toEdit.colorappearance.autoadapscen = mods.colorappearance.autoadapscen; } @@ -1673,6 +1755,14 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.colorappearance.adapscen = mods.colorappearance.adapscen; } + if (colorappearance.autoybscen) { + toEdit.colorappearance.autoybscen = mods.colorappearance.autoybscen; + } + + if (colorappearance.ybscen) { + toEdit.colorappearance.ybscen = mods.colorappearance.ybscen; + } + if (colorappearance.adaplum) { toEdit.colorappearance.adaplum = dontforceSet && options.baBehav[ADDSET_CAT_ADAPTVIEWING] ? toEdit.colorappearance.adaplum + mods.colorappearance.adaplum : mods.colorappearance.adaplum; } @@ -1689,6 +1779,26 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.colorappearance.algo = mods.colorappearance.algo; } + if (colorappearance.tempout) { + toEdit.colorappearance.tempout = mods.colorappearance.tempout; + } + + if (colorappearance.greenout) { + toEdit.colorappearance.greenout = mods.colorappearance.greenout; + } + + if (colorappearance.tempsc) { + toEdit.colorappearance.tempsc = mods.colorappearance.tempsc; + } + + if (colorappearance.greensc) { + toEdit.colorappearance.greensc = mods.colorappearance.greensc; + } + + if (colorappearance.ybout) { + toEdit.colorappearance.ybout = mods.colorappearance.ybout; + } + if (colorappearance.jlight) { toEdit.colorappearance.jlight = dontforceSet && options.baBehav[ADDSET_CAT_LIGHT] ? toEdit.colorappearance.jlight + mods.colorappearance.jlight : mods.colorappearance.jlight; } @@ -1763,10 +1873,6 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.dirpyrDenoise.median = mods.dirpyrDenoise.median; } - if (dirpyrDenoise.autochroma) { - toEdit.dirpyrDenoise.autochroma = mods.dirpyrDenoise.autochroma; - } - if (dirpyrDenoise.luma) { toEdit.dirpyrDenoise.luma = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_LUMA] ? toEdit.dirpyrDenoise.luma + mods.dirpyrDenoise.luma : mods.dirpyrDenoise.luma; } @@ -2206,10 +2312,6 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.icm.applyHueSatMap = mods.icm.applyHueSatMap; } - if (icm.blendCMSMatrix) { - toEdit.icm.blendCMSMatrix = mods.icm.blendCMSMatrix; - } - if (icm.dcpIlluminant) { toEdit.icm.dcpIlluminant = mods.icm.dcpIlluminant; } @@ -2250,6 +2352,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.raw.bayersensor.method = mods.raw.bayersensor.method; } + if (raw.bayersensor.imageNum) { + toEdit.raw.bayersensor.imageNum = mods.raw.bayersensor.imageNum; + } + if (raw.bayersensor.ccSteps) { toEdit.raw.bayersensor.ccSteps = mods.raw.bayersensor.ccSteps; } @@ -2286,7 +2392,126 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.raw.bayersensor.lmmse_iterations = mods.raw.bayersensor.lmmse_iterations; } - //if (raw.bayersensor.allEnhance) toEdit.raw.bayersensor.all_enhance = mods.raw.bayersensor.all_enhance; + if (raw.bayersensor.pixelShiftMotion) { + toEdit.raw.bayersensor.pixelShiftMotion = mods.raw.bayersensor.pixelShiftMotion; + } + + if (raw.bayersensor.pixelShiftMotionCorrection) { + toEdit.raw.bayersensor.pixelShiftMotionCorrection = mods.raw.bayersensor.pixelShiftMotionCorrection; + } + + if (raw.bayersensor.pixelShiftMotionCorrectionMethod) { + toEdit.raw.bayersensor.pixelShiftMotionCorrectionMethod = mods.raw.bayersensor.pixelShiftMotionCorrectionMethod; + } + + if (raw.bayersensor.pixelShiftStddevFactorGreen) { + toEdit.raw.bayersensor.pixelShiftStddevFactorGreen = mods.raw.bayersensor.pixelShiftStddevFactorGreen; + } + + if (raw.bayersensor.pixelShiftStddevFactorRed) { + toEdit.raw.bayersensor.pixelShiftStddevFactorRed = mods.raw.bayersensor.pixelShiftStddevFactorRed; + } + + if (raw.bayersensor.pixelShiftStddevFactorBlue) { + toEdit.raw.bayersensor.pixelShiftStddevFactorBlue = mods.raw.bayersensor.pixelShiftStddevFactorBlue; + } + + if (raw.bayersensor.pixelShiftEperIso) { + toEdit.raw.bayersensor.pixelShiftEperIso = mods.raw.bayersensor.pixelShiftEperIso; + } + + if (raw.bayersensor.pixelShiftNreadIso) { + toEdit.raw.bayersensor.pixelShiftNreadIso = mods.raw.bayersensor.pixelShiftNreadIso; + } + + if (raw.bayersensor.pixelShiftPrnu) { + toEdit.raw.bayersensor.pixelShiftPrnu = mods.raw.bayersensor.pixelShiftPrnu; + } + + if (raw.bayersensor.pixelShiftSigma) { + toEdit.raw.bayersensor.pixelShiftSigma = mods.raw.bayersensor.pixelShiftSigma; + } + + if (raw.bayersensor.pixelShiftSum) { + toEdit.raw.bayersensor.pixelShiftSum = mods.raw.bayersensor.pixelShiftSum; + } + + if (raw.bayersensor.pixelShiftRedBlueWeight) { + toEdit.raw.bayersensor.pixelShiftRedBlueWeight = mods.raw.bayersensor.pixelShiftRedBlueWeight; + } + + if (raw.bayersensor.pixelShiftShowMotion) { + toEdit.raw.bayersensor.pixelShiftShowMotion = mods.raw.bayersensor.pixelShiftShowMotion; + } + + if (raw.bayersensor.pixelShiftShowMotionMaskOnly) { + toEdit.raw.bayersensor.pixelShiftShowMotionMaskOnly = mods.raw.bayersensor.pixelShiftShowMotionMaskOnly; + } + + if (raw.bayersensor.pixelShiftAutomatic) { + toEdit.raw.bayersensor.pixelShiftAutomatic = mods.raw.bayersensor.pixelShiftAutomatic; + } + + if (raw.bayersensor.pixelShiftNonGreenHorizontal) { + toEdit.raw.bayersensor.pixelShiftNonGreenHorizontal = mods.raw.bayersensor.pixelShiftNonGreenHorizontal; + } + + if (raw.bayersensor.pixelShiftNonGreenVertical) { + toEdit.raw.bayersensor.pixelShiftNonGreenVertical = mods.raw.bayersensor.pixelShiftNonGreenVertical; + } + + if (raw.bayersensor.pixelShiftHoleFill) { + toEdit.raw.bayersensor.pixelShiftHoleFill = mods.raw.bayersensor.pixelShiftHoleFill; + } + + if (raw.bayersensor.pixelShiftMedian) { + toEdit.raw.bayersensor.pixelShiftMedian = mods.raw.bayersensor.pixelShiftMedian; + } + + if (raw.bayersensor.pixelShiftMedian3) { + toEdit.raw.bayersensor.pixelShiftMedian3 = mods.raw.bayersensor.pixelShiftMedian3; + } + + if (raw.bayersensor.pixelShiftGreen) { + toEdit.raw.bayersensor.pixelShiftGreen = mods.raw.bayersensor.pixelShiftGreen; + } + + if (raw.bayersensor.pixelShiftBlur) { + toEdit.raw.bayersensor.pixelShiftBlur = mods.raw.bayersensor.pixelShiftBlur; + } + + if (raw.bayersensor.pixelShiftSmooth) { + toEdit.raw.bayersensor.pixelShiftSmoothFactor = mods.raw.bayersensor.pixelShiftSmoothFactor; + } + + if (raw.bayersensor.pixelShiftExp0) { + toEdit.raw.bayersensor.pixelShiftExp0 = mods.raw.bayersensor.pixelShiftExp0; + } + + if (raw.bayersensor.pixelShiftLmmse) { + toEdit.raw.bayersensor.pixelShiftLmmse = mods.raw.bayersensor.pixelShiftLmmse; + } + + if (raw.bayersensor.pixelShiftEqualBright) { + toEdit.raw.bayersensor.pixelShiftEqualBright = mods.raw.bayersensor.pixelShiftEqualBright; + } + + if (raw.bayersensor.pixelShiftEqualBrightChannel) { + toEdit.raw.bayersensor.pixelShiftEqualBrightChannel = mods.raw.bayersensor.pixelShiftEqualBrightChannel; + } + + if (raw.bayersensor.pixelShiftNonGreenCross) { + toEdit.raw.bayersensor.pixelShiftNonGreenCross = mods.raw.bayersensor.pixelShiftNonGreenCross; + } + + if (raw.bayersensor.pixelShiftNonGreenCross2) { + toEdit.raw.bayersensor.pixelShiftNonGreenCross2 = mods.raw.bayersensor.pixelShiftNonGreenCross2; + } + + if (raw.bayersensor.pixelShiftNonGreenAmaze) { + toEdit.raw.bayersensor.pixelShiftNonGreenAmaze = mods.raw.bayersensor.pixelShiftNonGreenAmaze; + } + if (raw.bayersensor.greenEq) { toEdit.raw.bayersensor.greenthresh = dontforceSet && options.baBehav[ADDSET_PREPROCESS_GREENEQUIL] ? toEdit.raw.bayersensor.greenthresh + mods.raw.bayersensor.greenthresh : mods.raw.bayersensor.greenthresh; } @@ -2319,10 +2544,6 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.raw.ca_autocorrect = mods.raw.ca_autocorrect; } - if (raw.caAutoStrength) { - toEdit.raw.caautostrength = dontforceSet && options.baBehav[ADDSET_RAWCACORR] ? toEdit.raw.caautostrength + mods.raw.caautostrength : mods.raw.caautostrength; - } - if (raw.caRed) { toEdit.raw.cared = dontforceSet && options.baBehav[ADDSET_RAWCACORR] ? toEdit.raw.cared + mods.raw.cared : mods.raw.cared; } @@ -2624,14 +2845,14 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.wavelet.expnoise = mods.wavelet.expnoise; } - for(int i = 0; i < 9; i++) { - if(wavelet.c[i]) { + for (int i = 0; i < 9; i++) { + if (wavelet.c[i]) { toEdit.wavelet.c[i] = dontforceSet && options.baBehav[ADDSET_WA] ? toEdit.wavelet.c[i] + mods.wavelet.c[i] : mods.wavelet.c[i]; } } - for(int i = 0; i < 9; i++) { - if(wavelet.ch[i]) { + for (int i = 0; i < 9; i++) { + if (wavelet.ch[i]) { toEdit.wavelet.ch[i] = dontforceSet && options.baBehav[ADDSET_WA] ? toEdit.wavelet.ch[i] + mods.wavelet.ch[i] : mods.wavelet.ch[i]; } } @@ -2737,8 +2958,8 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.dirpyrequalizer.cbdlMethod = mods.dirpyrequalizer.cbdlMethod; } - for(int i = 0; i < 6; i++) { - if(dirpyrequalizer.mult[i]) { + for (int i = 0; i < 6; i++) { + if (dirpyrequalizer.mult[i]) { toEdit.dirpyrequalizer.mult[i] = dontforceSet && options.baBehav[ADDSET_DIRPYREQ] ? toEdit.dirpyrequalizer.mult[i] + mods.dirpyrequalizer.mult[i] : mods.dirpyrequalizer.mult[i]; } } @@ -2796,7 +3017,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten bool RAWParamsEdited::BayerSensor::isUnchanged() const { - return method && dcbIterations && dcbEnhance && lmmseIterations/*&& allEnhance*/ && greenEq + return method && imageNum && dcbIterations && dcbEnhance && lmmseIterations/*&& allEnhance*/ && greenEq + && pixelShiftMotion && pixelShiftMotionCorrection && pixelShiftMotionCorrectionMethod && pixelShiftStddevFactorGreen && pixelShiftStddevFactorRed && pixelShiftStddevFactorBlue && pixelShiftEperIso + && pixelShiftNreadIso && pixelShiftPrnu && pixelShiftSigma && pixelShiftSum && pixelShiftRedBlueWeight && pixelShiftShowMotion && pixelShiftShowMotionMaskOnly + && pixelShiftAutomatic && pixelShiftNonGreenHorizontal && pixelShiftNonGreenVertical && pixelShiftHoleFill && pixelShiftMedian && pixelShiftMedian3 && pixelShiftNonGreenCross && pixelShiftNonGreenCross2 && pixelShiftNonGreenAmaze && pixelShiftGreen && pixelShiftBlur && pixelShiftSmooth && pixelShiftExp0 && pixelShiftLmmse && pixelShiftEqualBright && pixelShiftEqualBrightChannel && linenoise && exBlack0 && exBlack1 && exBlack2 && exBlack3 && exTwoGreen; } @@ -2807,7 +3031,7 @@ bool RAWParamsEdited::XTransSensor::isUnchanged() const bool RAWParamsEdited::isUnchanged() const { - return bayersensor.isUnchanged() && xtranssensor.isUnchanged() && caCorrection && caAutoStrength && caRed && caBlue && hotPixelFilter && deadPixelFilter && hotDeadPixelThresh && darkFrame + return bayersensor.isUnchanged() && xtranssensor.isUnchanged() && caCorrection && caRed && caBlue && hotPixelFilter && deadPixelFilter && hotDeadPixelThresh && darkFrame && dfAuto && ff_file && ff_AutoSelect && ff_BlurRadius && ff_BlurType && exPos && exPreser && ff_AutoClipControl && ff_clipControl; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 60fabc5ce..4f0dc0029 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -67,7 +67,6 @@ public: bool gam; bool slope; bool neigh; - bool gain; bool offs; bool retinexMethod; bool mapMethod; @@ -234,6 +233,7 @@ public: bool temperature; bool green; bool equal; + bool tempBias; }; /*class ColorShiftParamsEdited { @@ -289,10 +289,15 @@ public: bool enabled; bool degree; bool autodegree; + bool degreeout; + bool autodegreeout; bool autoadapscen; + bool autoybscen; bool surround; + bool surrsrc; bool adapscen; bool adaplum; + bool ybscen; bool badpixsl; bool wbmodel; bool algo; @@ -311,6 +316,12 @@ public: bool datacie; bool tonecie; // bool sharpcie; + bool tempout; + bool greenout; + bool ybout; + bool tempsc; + bool greensc; + }; class DirPyrDenoiseParamsEdited @@ -320,7 +331,6 @@ public: bool enabled; bool enhance; bool median; - bool autochroma; bool Ldetail; bool luma; bool chroma; @@ -546,7 +556,6 @@ public: bool applyLookTable; bool applyBaselineExposureOffset; bool applyHueSatMap; - bool blendCMSMatrix; bool dcpIlluminant; bool working; bool output; @@ -638,7 +647,6 @@ public: bool bluemed; bool greenhigh; bool bluehigh; - bool enacont; bool expcontrast; bool expchroma; bool expedge; @@ -689,6 +697,7 @@ public: public: bool method; + bool imageNum; bool ccSteps; bool exBlack0; bool exBlack1; @@ -698,6 +707,37 @@ public: bool dcbIterations; bool dcbEnhance; bool lmmseIterations; + bool pixelShiftMotion; + bool pixelShiftMotionCorrection; + bool pixelShiftMotionCorrectionMethod; + bool pixelShiftStddevFactorGreen; + bool pixelShiftStddevFactorRed; + bool pixelShiftStddevFactorBlue; + bool pixelShiftEperIso; + bool pixelShiftNreadIso; + bool pixelShiftPrnu; + bool pixelShiftSigma; + bool pixelShiftSum; + bool pixelShiftRedBlueWeight; + bool pixelShiftShowMotion; + bool pixelShiftShowMotionMaskOnly; + bool pixelShiftAutomatic; + bool pixelShiftNonGreenHorizontal; + bool pixelShiftNonGreenVertical; + bool pixelShiftHoleFill; + bool pixelShiftMedian; + bool pixelShiftMedian3; + bool pixelShiftGreen; + bool pixelShiftBlur; + bool pixelShiftSmooth; + bool pixelShiftExp0; + bool pixelShiftLmmse; + bool pixelShiftEqualBright; + bool pixelShiftEqualBrightChannel; + bool pixelShiftNonGreenCross; + bool pixelShiftNonGreenCross2; + bool pixelShiftNonGreenAmaze; + //bool allEnhance; bool greenEq; bool linenoise; @@ -722,7 +762,6 @@ public: XTransSensor xtranssensor; bool caCorrection; - bool caAutoStrength; bool caRed; bool caBlue; bool hotPixelFilter; diff --git a/rtgui/partialpastedlg.cc b/rtgui/partialpastedlg.cc index 78631b725..ce26078fc 100644 --- a/rtgui/partialpastedlg.cc +++ b/rtgui/partialpastedlg.cc @@ -19,40 +19,39 @@ #include "partialpastedlg.h" #include "multilangmgr.h" #include "paramsedited.h" +#include "guiutils.h" -PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) +PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* parent) + : Gtk::Dialog (title, *parent, true) { - - set_modal (true); - set_title (title); set_default_size(700, 600); everything = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_EVERYTHING"))); - everything ->set_name("partialPasteHeader"); + everything ->set_name("PartialPasteHeader"); basic = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_BASICGROUP"))); - basic ->set_name("partialPasteHeader"); + basic ->set_name("PartialPasteHeader"); detail = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DETAILGROUP"))); - detail ->set_name("partialPasteHeader"); + detail ->set_name("PartialPasteHeader"); color = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COLORGROUP"))); - color ->set_name("partialPasteHeader"); + color ->set_name("PartialPasteHeader"); lens = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_LENSGROUP"))); - lens ->set_name("partialPasteHeader"); + lens ->set_name("PartialPasteHeader"); composition = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COMPOSITIONGROUP"))); - composition ->set_name("partialPasteHeader"); - meta = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_METAGROUP"))); - meta ->set_name("partialPasteHeader"); + composition ->set_name("PartialPasteHeader"); + meta = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_METAGROUP"))); + meta ->set_name("PartialPasteHeader"); raw = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWGROUP"))); - raw ->set_name("partialPasteHeader"); + raw ->set_name("PartialPasteHeader"); wav = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_WAVELETGROUP"))); - wav ->set_name("partialPasteHeader"); + wav ->set_name("PartialPasteHeader"); // options in basic: wb = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_WHITEBALANCE"))); exposure = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_EXPOSURE"))); sh = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_SHADOWSHIGHLIGHTS"))); epd = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_EPD"))); - retinex = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RETINEX"))); + retinex = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RETINEX"))); pcvignette = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PCVIGNETTE"))); gradient = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_GRADIENT"))); labcurve = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_LABCURVE"))); @@ -67,14 +66,14 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) defringe = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DEFRINGE"))); // options in wavelet: - wavelet = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_EQUALIZER"))); //TODO - rename to wavelet + wavelet = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_EQUALIZER"))); //TODO - rename to wavelet // options in color: icm = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_ICMSETTINGS"))); //gam = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_ICMGAMMA"))); vibrance = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_VIBRANCE"))); chmixer = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_CHANNELMIXER"))); - blackwhite = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_CHANNELMIXERBW"))); + blackwhite = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_CHANNELMIXERBW"))); dirpyrden = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DIRPYRDENOISE"))); hsveq = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_HSVEQUALIZER"))); filmSimulation = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FILMSIMULATION")) ); @@ -88,13 +87,13 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) lcp = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_LENSPROFILE"))); // options in composition: - coarserot = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COARSETRANS"))); - finerot = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_ROTATION"))); - crop = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_CROP"))); - resize = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RESIZE"))); - prsharpening = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PRSHARPENING"))); - perspective = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PERSPECTIVE"))); - commonTrans = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COMMONTRANSFORMPARAMS"))); + coarserot = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COARSETRANS"))); + finerot = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_ROTATION"))); + crop = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_CROP"))); + resize = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RESIZE"))); + prsharpening = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PRSHARPENING"))); + perspective = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PERSPECTIVE"))); + commonTrans = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COMMONTRANSFORMPARAMS"))); // options in meta: exifch = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_EXIFCHANGES"))); @@ -105,13 +104,14 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) raw_preser = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_PRESER"))); raw_black = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWEXPOS_BLACK"))); raw_ca_autocorrect = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_AUTO"))); - raw_cared = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_CARED"))); - raw_cablue = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_CABLUE"))); + raw_caredblue = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAWCACORR_CAREDBLUE"))); raw_hotpix_filt = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_HOTPIXFILT"))); raw_deadpix_filt = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_DEADPIXFILT"))); raw_linenoise = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_LINEDENOISE"))); raw_greenthresh = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCESS_GREENEQUIL"))); raw_method = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_DMETHOD"))); + raw_imagenum = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_IMAGENUM"))); + raw_pixelshift = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_PIXELSHIFT"))); raw_ccSteps = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_FALSECOLOR"))); raw_dcb_iterations = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_DCBITERATIONS"))); raw_dcb_enhance = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_RAW_DCBENHANCE"))); @@ -131,9 +131,9 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) for (int i = 0; i < 8; i++) { vboxes[i] = Gtk::manage (new Gtk::VBox ()); - vboxes[i]->set_border_width (6); + vboxes[i]->set_name("PartialPasteGroupContainer"); hseps[i] = Gtk::manage (new Gtk::HSeparator ()); - hseps[i]->set_name("partialPasteHeaderSep"); + hseps[i]->set_name("PartialPasteHeaderSep"); } //BASIC @@ -201,6 +201,8 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) vboxes[6]->pack_start (*raw, Gtk::PACK_SHRINK, 2); vboxes[6]->pack_start (*hseps[6], Gtk::PACK_SHRINK, 2); vboxes[6]->pack_start (*raw_method, Gtk::PACK_SHRINK, 2); + vboxes[6]->pack_start (*raw_imagenum, Gtk::PACK_SHRINK, 2); + vboxes[6]->pack_start (*raw_pixelshift, Gtk::PACK_SHRINK, 2); vboxes[6]->pack_start (*raw_ccSteps, Gtk::PACK_SHRINK, 2); vboxes[6]->pack_start (*raw_dcb_iterations, Gtk::PACK_SHRINK, 2); vboxes[6]->pack_start (*raw_dcb_enhance, Gtk::PACK_SHRINK, 2); @@ -226,8 +228,7 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) vboxes[6]->pack_start (*ff_ClipControl, Gtk::PACK_SHRINK, 2); vboxes[6]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0); vboxes[6]->pack_start (*raw_ca_autocorrect, Gtk::PACK_SHRINK, 2); - vboxes[6]->pack_start (*raw_cared, Gtk::PACK_SHRINK, 2); - vboxes[6]->pack_start (*raw_cablue, Gtk::PACK_SHRINK, 2); + vboxes[6]->pack_start (*raw_caredblue, Gtk::PACK_SHRINK, 2); //META vboxes[7]->pack_start (*meta, Gtk::PACK_SHRINK, 2); @@ -239,10 +240,6 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) Gtk::VBox* vbCol2 = Gtk::manage (new Gtk::VBox ()); Gtk::VBox* vbCol3 = Gtk::manage (new Gtk::VBox ()); - vbCol1->set_border_width (8); - vbCol2->set_border_width (8); - vbCol3->set_border_width (8); - for (int i = 0; i < 3; i++) { vbCol1->pack_start (*vboxes[i], Gtk::PACK_SHRINK, 2); } @@ -257,27 +254,30 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) Gtk::VBox* vbtop = Gtk::manage (new Gtk::VBox ()); vbtop->pack_start (*everything, Gtk::PACK_SHRINK, 2); - vbtop->set_border_width (8); - Gtk::Dialog::get_vbox()->pack_start (*vbtop, Gtk::PACK_SHRINK, 2); // TODO replace with get_content_area() with GTK upgrade + Gtk::Dialog::get_content_area()->pack_start (*vbtop, Gtk::PACK_SHRINK, 2); // TODO replace with get_content_area() with GTK upgrade Gtk::HBox* hbmain = Gtk::manage (new Gtk::HBox ()); hbmain->pack_start (*vbCol1); - hbmain->pack_start (*(Gtk::manage (new Gtk::VSeparator ()))); + Gtk::VSeparator *vsep1 = Gtk::manage (new Gtk::VSeparator ()); + setExpandAlignProperties(vsep1, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); + hbmain->pack_start (*vsep1); hbmain->pack_start (*vbCol2); - hbmain->pack_start (*(Gtk::manage (new Gtk::VSeparator ()))); + Gtk::VSeparator *vsep2 = Gtk::manage (new Gtk::VSeparator ()); + setExpandAlignProperties(vsep2, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); + hbmain->pack_start (*vsep2); hbmain->pack_start (*vbCol3); scrolledwindow = Gtk::manage ( new Gtk::ScrolledWindow() ); - scrolledwindow->set_flags(Gtk::CAN_FOCUS); - scrolledwindow->set_border_width(2); + scrolledwindow->set_name("PartialPaste"); + scrolledwindow->set_can_focus(true); scrolledwindow->set_shadow_type(Gtk::SHADOW_NONE); scrolledwindow->set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); scrolledwindow->property_window_placement().set_value(Gtk::CORNER_TOP_LEFT); scrolledwindow->add(*hbmain); - Gtk::Dialog::get_vbox()->pack_start (*scrolledwindow, Gtk::PACK_EXPAND_WIDGET, 2);// TODO replace with get_content_area() with GTK upgrade + Gtk::Dialog::get_content_area()->pack_start (*scrolledwindow, Gtk::PACK_EXPAND_WIDGET, 2);// TODO replace with get_content_area() with GTK upgrade hbmain->show(); scrolledwindow->show (); @@ -290,7 +290,7 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) colorConn = color->signal_toggled().connect (sigc::mem_fun(*this, &PartialPasteDlg::colorToggled)); lensConn = lens->signal_toggled().connect (sigc::mem_fun(*this, &PartialPasteDlg::lensToggled)); compositionConn = composition->signal_toggled().connect (sigc::mem_fun(*this, &PartialPasteDlg::compositionToggled)); - metaConn = meta->signal_toggled().connect (sigc::mem_fun(*this, &PartialPasteDlg::metaToggled)); + metaConn = meta->signal_toggled().connect (sigc::mem_fun(*this, &PartialPasteDlg::metaToggled)); rawConn = raw->signal_toggled().connect (sigc::mem_fun(*this, &PartialPasteDlg::rawToggled)); wavConn = wav->signal_toggled().connect (sigc::mem_fun(*this, &PartialPasteDlg::wavToggled)); @@ -298,7 +298,7 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) exposureConn = exposure->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); shConn = sh->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); epdConn = epd->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); - retinexConn = retinex->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); + retinexConn = retinex->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); pcvignetteConn = pcvignette->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); gradientConn = gradient->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); labcurveConn = labcurve->signal_toggled().connect (sigc::bind (sigc::mem_fun(*basic, &Gtk::CheckButton::set_inconsistent), true)); @@ -333,26 +333,27 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) finerotConn = finerot->signal_toggled().connect (sigc::bind (sigc::mem_fun(*composition, &Gtk::CheckButton::set_inconsistent), true)); cropConn = crop->signal_toggled().connect (sigc::bind (sigc::mem_fun(*composition, &Gtk::CheckButton::set_inconsistent), true)); resizeConn = resize->signal_toggled().connect (sigc::bind (sigc::mem_fun(*composition, &Gtk::CheckButton::set_inconsistent), true)); - prsharpeningConn = prsharpening->signal_toggled().connect (sigc::bind (sigc::mem_fun(*composition, &Gtk::CheckButton::set_inconsistent), true)); + prsharpeningConn = prsharpening->signal_toggled().connect (sigc::bind (sigc::mem_fun(*composition, &Gtk::CheckButton::set_inconsistent), true)); perspectiveConn = perspective->signal_toggled().connect (sigc::bind (sigc::mem_fun(*composition, &Gtk::CheckButton::set_inconsistent), true)); commonTransConn = commonTrans->signal_toggled().connect (sigc::bind (sigc::mem_fun(*composition, &Gtk::CheckButton::set_inconsistent), true)); exifchConn = exifch->signal_toggled().connect (sigc::bind (sigc::mem_fun(*meta, &Gtk::CheckButton::set_inconsistent), true)); iptcConn = iptc->signal_toggled().connect (sigc::bind (sigc::mem_fun(*meta, &Gtk::CheckButton::set_inconsistent), true)); - raw_methodConn = raw_method->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); + raw_methodConn = raw_method->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); + raw_imagenumConn = raw_imagenum->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_ccStepsConn = raw_ccSteps->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_dcb_iterationsConn = raw_dcb_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_dcb_enhanceConn = raw_dcb_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); //raw_all_enhanceConn = raw_all_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_lmmse_iterationsConn = raw_lmmse_iterations->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); + raw_pixelshiftConn = raw_pixelshift->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_exposConn = raw_expos->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_preserConn = raw_preser->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_blackConn = raw_black->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_ca_autocorrectConn = raw_ca_autocorrect->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); - raw_caredConn = raw_cared->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); - raw_cablueConn = raw_cablue->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); + raw_caredblueConn = raw_caredblue->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_hotpix_filtConn = raw_hotpix_filt->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_deadpix_filtConn = raw_deadpix_filt->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); raw_linenoiseConn = raw_linenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); @@ -365,8 +366,8 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title) ff_BlurTypeConn = ff_BlurType->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); ff_ClipControlConn = ff_ClipControl->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true)); - add_button (Gtk::StockID("gtk-ok"), Gtk::RESPONSE_OK); - add_button (Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL); + add_button (M("GENERAL_OK"), Gtk::RESPONSE_OK); + add_button (M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); set_response_sensitive (Gtk::RESPONSE_OK); set_default_response (Gtk::RESPONSE_OK); show_all_children (); @@ -420,17 +421,18 @@ void PartialPasteDlg::rawToggled () { raw_methodConn.block (true); + raw_imagenumConn.block (true); raw_ccStepsConn.block (true); raw_dcb_iterationsConn.block (true); raw_dcb_enhanceConn.block (true); //raw_all_enhanceConn.block (true); raw_lmmse_iterationsConn.block (true); + raw_pixelshiftConn.block (true); raw_exposConn.block (true); raw_preserConn.block (true); raw_blackConn.block (true); raw_ca_autocorrectConn.block (true); - raw_caredConn.block (true); - raw_cablueConn.block (true); + raw_caredblueConn.block (true); raw_hotpix_filtConn.block (true); raw_deadpix_filtConn.block (true); raw_linenoiseConn.block (true); @@ -446,17 +448,18 @@ void PartialPasteDlg::rawToggled () raw->set_inconsistent (false); raw_method->set_active (raw->get_active ()); + raw_imagenum->set_active (raw->get_active ()); raw_ccSteps->set_active (raw->get_active ()); raw_dcb_iterations->set_active (raw->get_active ()); raw_dcb_enhance->set_active (raw->get_active ()); raw_lmmse_iterations->set_active (raw->get_active ()); + raw_pixelshift->set_active (raw->get_active ()); //raw_all_enhance->set_active (raw->get_active ()); raw_expos->set_active (raw->get_active ()); raw_preser->set_active (raw->get_active ()); raw_black->set_active (raw->get_active ()); raw_ca_autocorrect->set_active (raw->get_active ()); - raw_cared->set_active (raw->get_active ()); - raw_cablue->set_active (raw->get_active ()); + raw_caredblue->set_active (raw->get_active ()); raw_hotpix_filt->set_active (raw->get_active ()); raw_deadpix_filt->set_active (raw->get_active ()); raw_linenoise->set_active (raw->get_active ()); @@ -470,17 +473,18 @@ void PartialPasteDlg::rawToggled () ff_ClipControl->set_active (raw->get_active ()); raw_methodConn.block (false); + raw_imagenumConn.block (false); raw_ccStepsConn.block (false); raw_dcb_iterationsConn.block (false); raw_dcb_enhanceConn.block (false); //raw_all_enhanceConn.block (false); + raw_pixelshiftConn.block (false); raw_lmmse_iterationsConn.block (false); raw_exposConn.block (false); raw_preserConn.block (false); raw_blackConn.block (false); raw_ca_autocorrectConn.block (false); - raw_caredConn.block (false); - raw_cablueConn.block (false); + raw_caredblueConn.block (false); raw_hotpix_filtConn.block (false); raw_deadpix_filtConn.block (false); raw_linenoiseConn.block (false); @@ -690,7 +694,6 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param // the general section is always ignored, whichever operation we use the PartialPaste for filterPE.general = falsePE.general; - // Now we filter out the filter depending on the checked items if (!wb->get_active ()) { filterPE.wb = falsePE.wb; @@ -849,6 +852,10 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param filterPE.raw.xtranssensor.method = falsePE.raw.xtranssensor.method; } + if (!raw_imagenum->get_active ()) { + filterPE.raw.bayersensor.imageNum = falsePE.raw.bayersensor.imageNum; + } + if (!raw_ccSteps->get_active ()) { filterPE.raw.bayersensor.ccSteps = falsePE.raw.bayersensor.ccSteps; filterPE.raw.xtranssensor.ccSteps = falsePE.raw.xtranssensor.ccSteps; @@ -878,6 +885,39 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param filterPE.raw.xtranssensor.exBlackBlue = falsePE.raw.xtranssensor.exBlackBlue; } + if (!raw_pixelshift->get_active ()) { + filterPE.raw.bayersensor.pixelShiftAutomatic = falsePE.raw.bayersensor.pixelShiftAutomatic; + filterPE.raw.bayersensor.pixelShiftBlur = falsePE.raw.bayersensor.pixelShiftBlur; + filterPE.raw.bayersensor.pixelShiftEperIso = falsePE.raw.bayersensor.pixelShiftEperIso; + filterPE.raw.bayersensor.pixelShiftEqualBright = falsePE.raw.bayersensor.pixelShiftEqualBright; + filterPE.raw.bayersensor.pixelShiftEqualBrightChannel = falsePE.raw.bayersensor.pixelShiftEqualBrightChannel; + filterPE.raw.bayersensor.pixelShiftExp0 = falsePE.raw.bayersensor.pixelShiftExp0; + filterPE.raw.bayersensor.pixelShiftGreen = falsePE.raw.bayersensor.pixelShiftGreen; + filterPE.raw.bayersensor.pixelShiftHoleFill = falsePE.raw.bayersensor.pixelShiftHoleFill; + filterPE.raw.bayersensor.pixelShiftLmmse = falsePE.raw.bayersensor.pixelShiftLmmse; + filterPE.raw.bayersensor.pixelShiftMedian = falsePE.raw.bayersensor.pixelShiftMedian; + filterPE.raw.bayersensor.pixelShiftMedian3 = falsePE.raw.bayersensor.pixelShiftMedian3; + filterPE.raw.bayersensor.pixelShiftMotion = falsePE.raw.bayersensor.pixelShiftMotion; + filterPE.raw.bayersensor.pixelShiftMotionCorrection = falsePE.raw.bayersensor.pixelShiftMotionCorrection; + filterPE.raw.bayersensor.pixelShiftMotionCorrectionMethod = falsePE.raw.bayersensor.pixelShiftMotionCorrectionMethod; + filterPE.raw.bayersensor.pixelShiftNonGreenAmaze = falsePE.raw.bayersensor.pixelShiftNonGreenAmaze; + filterPE.raw.bayersensor.pixelShiftNonGreenCross = falsePE.raw.bayersensor.pixelShiftNonGreenCross; + filterPE.raw.bayersensor.pixelShiftNonGreenCross2 = falsePE.raw.bayersensor.pixelShiftNonGreenCross2; + filterPE.raw.bayersensor.pixelShiftNonGreenHorizontal = falsePE.raw.bayersensor.pixelShiftNonGreenHorizontal; + filterPE.raw.bayersensor.pixelShiftNonGreenVertical = falsePE.raw.bayersensor.pixelShiftNonGreenVertical; + filterPE.raw.bayersensor.pixelShiftNreadIso = falsePE.raw.bayersensor.pixelShiftNreadIso; + filterPE.raw.bayersensor.pixelShiftPrnu = falsePE.raw.bayersensor.pixelShiftPrnu; + filterPE.raw.bayersensor.pixelShiftRedBlueWeight = falsePE.raw.bayersensor.pixelShiftRedBlueWeight; + filterPE.raw.bayersensor.pixelShiftSigma = falsePE.raw.bayersensor.pixelShiftSigma; + filterPE.raw.bayersensor.pixelShiftSmooth = falsePE.raw.bayersensor.pixelShiftSmooth; + filterPE.raw.bayersensor.pixelShiftStddevFactorBlue = falsePE.raw.bayersensor.pixelShiftStddevFactorBlue; + filterPE.raw.bayersensor.pixelShiftStddevFactorGreen = falsePE.raw.bayersensor.pixelShiftStddevFactorGreen; + filterPE.raw.bayersensor.pixelShiftStddevFactorRed = falsePE.raw.bayersensor.pixelShiftStddevFactorRed; + filterPE.raw.bayersensor.pixelShiftSum = falsePE.raw.bayersensor.pixelShiftSum; + filterPE.raw.bayersensor.pixelShiftShowMotion = falsePE.raw.bayersensor.pixelShiftShowMotion; + filterPE.raw.bayersensor.pixelShiftShowMotionMaskOnly = falsePE.raw.bayersensor.pixelShiftShowMotionMaskOnly; + } + if (!raw_linenoise->get_active ()) { filterPE.raw.bayersensor.linenoise = falsePE.raw.bayersensor.linenoise; } @@ -898,11 +938,8 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param filterPE.raw.caCorrection = falsePE.raw.caCorrection; } - if (!raw_cared->get_active ()) { + if (!raw_caredblue->get_active ()) { filterPE.raw.caRed = falsePE.raw.caRed; - } - - if (!raw_cablue->get_active ()) { filterPE.raw.caBlue = falsePE.raw.caBlue; } diff --git a/rtgui/partialpastedlg.h b/rtgui/partialpastedlg.h index d22f50fad..8fa6dbd23 100644 --- a/rtgui/partialpastedlg.h +++ b/rtgui/partialpastedlg.h @@ -100,17 +100,18 @@ public: Gtk::CheckButton* raw_preser; Gtk::CheckButton* raw_black; Gtk::CheckButton* raw_ca_autocorrect; - Gtk::CheckButton* raw_cared; - Gtk::CheckButton* raw_cablue; + Gtk::CheckButton* raw_caredblue; Gtk::CheckButton* raw_hotpix_filt; Gtk::CheckButton* raw_deadpix_filt; Gtk::CheckButton* raw_linenoise; Gtk::CheckButton* raw_greenthresh; Gtk::CheckButton* raw_method; + Gtk::CheckButton* raw_imagenum; Gtk::CheckButton* raw_ccSteps; Gtk::CheckButton* raw_dcb_iterations; Gtk::CheckButton* raw_dcb_enhance; Gtk::CheckButton* raw_lmmse_iterations; + Gtk::CheckButton* raw_pixelshift; Gtk::CheckButton* df_file; Gtk::CheckButton* df_AutoSelect; @@ -129,10 +130,10 @@ public: sigc::connection coarserotConn, finerotConn, cropConn, resizeConn, prsharpeningConn, perspectiveConn, commonTransConn; sigc::connection exifchConn, iptcConn, icmConn; sigc::connection df_fileConn, df_AutoSelectConn, ff_fileConn, ff_AutoSelectConn, ff_BlurRadiusConn, ff_BlurTypeConn, ff_ClipControlConn; - sigc::connection raw_caredConn, raw_cablueConn, raw_ca_autocorrectConn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn; + sigc::connection raw_caredblueConn, raw_ca_autocorrectConn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_imagenumConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_pixelshiftConn, raw_dcb_enhanceConn, raw_exposConn, raw_preserConn, raw_blackConn; public: - explicit PartialPasteDlg (const Glib::ustring &title); + PartialPasteDlg (const Glib::ustring &title, Gtk::Window* parent); void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = nullptr); diff --git a/rtgui/pathutils.cc b/rtgui/pathutils.cc new file mode 100644 index 000000000..21c452d4c --- /dev/null +++ b/rtgui/pathutils.cc @@ -0,0 +1,48 @@ +/* + * This file is part of RawTherapee. + * + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ + +#include "pathutils.h" + + +Glib::ustring removeExtension (const Glib::ustring& filename) +{ + + Glib::ustring bname = Glib::path_get_basename(filename); + size_t lastdot = bname.find_last_of ('.'); + size_t lastwhitespace = bname.find_last_of (" \t\f\v\n\r"); + + if (lastdot != bname.npos && (lastwhitespace == bname.npos || lastdot > lastwhitespace)) { + return filename.substr (0, filename.size() - (bname.size() - lastdot)); + } else { + return filename; + } +} + +Glib::ustring getExtension (const Glib::ustring& filename) +{ + + Glib::ustring bname = Glib::path_get_basename(filename); + size_t lastdot = bname.find_last_of ('.'); + size_t lastwhitespace = bname.find_last_of (" \t\f\v\n\r"); + + if (lastdot != bname.npos && (lastwhitespace == bname.npos || lastdot > lastwhitespace)) { + return filename.substr (filename.size() - (bname.size() - lastdot) + 1, filename.npos); + } else { + return ""; + } +} diff --git a/rtgui/pathutils.h b/rtgui/pathutils.h new file mode 100644 index 000000000..ce58103b9 --- /dev/null +++ b/rtgui/pathutils.h @@ -0,0 +1,34 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ +#ifndef __PATH_UTILS_ +#define __PATH_UTILS_ + +#include +#include +#include "../rtengine/rtengine.h" +#include "../rtengine/coord.h" +#include "rtimage.h" +#include +#include + +// Removed from guiutils because used by rawtherapee-cli +Glib::ustring removeExtension (const Glib::ustring& filename); +Glib::ustring getExtension (const Glib::ustring& filename); + +#endif diff --git a/rtgui/placesbrowser.cc b/rtgui/placesbrowser.cc index acceb73e2..490b9ff47 100644 --- a/rtgui/placesbrowser.cc +++ b/rtgui/placesbrowser.cc @@ -36,18 +36,28 @@ PlacesBrowser::PlacesBrowser () scrollw->set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); pack_start (*scrollw); - add = Gtk::manage (new Gtk::Button (M("MAIN_FRAME_PLACES_ADD"))); - del = Gtk::manage (new Gtk::Button (M("MAIN_FRAME_PLACES_DEL"))); - add->set_image (*Gtk::manage (new RTImage ("gtk-add.png"))); + // Since Gtk3, we can't have image+text buttons natively. We'll comply to the Gtk guidelines and choose one of them (icons here) + add = Gtk::manage (new Gtk::Button ()); + add->set_tooltip_text(M("MAIN_FRAME_PLACES_ADD")); + setExpandAlignProperties(add, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + //add->get_style_context()->set_junction_sides(Gtk::JUNCTION_RIGHT); + add->get_style_context()->add_class("Left"); + add->set_image (*Gtk::manage (new RTImage ("list-add.png"))); + del = Gtk::manage (new Gtk::Button ()); + del->set_tooltip_text(M("MAIN_FRAME_PLACES_DEL")); + setExpandAlignProperties(del, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + //del->get_style_context()->set_junction_sides(Gtk::JUNCTION_LEFT); + del->get_style_context()->add_class("Right"); del->set_image (*Gtk::manage (new RTImage ("list-remove.png"))); - Gtk::HBox* buttonBox = Gtk::manage (new Gtk::HBox ()); - buttonBox->pack_start (*add); - buttonBox->pack_start (*del); + Gtk::Grid* buttonBox = Gtk::manage (new Gtk::Grid ()); + buttonBox->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + buttonBox->attach_next_to(*add, Gtk::POS_LEFT, 1, 1); + buttonBox->attach_next_to(*del, *add, Gtk::POS_RIGHT, 1, 1); pack_start (*buttonBox, Gtk::PACK_SHRINK, 2); treeView = Gtk::manage (new Gtk::TreeView ()); - treeView->unset_flags (Gtk::CAN_FOCUS); + treeView->set_can_focus(false); scrollw->add (*treeView); placesModel = Gtk::ListStore::create (placesColumns); @@ -57,6 +67,7 @@ PlacesBrowser::PlacesBrowser () Gtk::TreeView::Column *iviewcol = Gtk::manage (new Gtk::TreeView::Column (M("MAIN_FRAME_PLACES"))); Gtk::CellRendererPixbuf *iconCR = Gtk::manage (new Gtk::CellRendererPixbuf()); Gtk::CellRendererText *labelCR = Gtk::manage (new Gtk::CellRendererText()); + labelCR->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE; iviewcol->pack_start (*iconCR, false); iviewcol->pack_start (*labelCR, true); iviewcol->add_attribute (*iconCR, "gicon", 0); diff --git a/rtgui/popupbutton.cc b/rtgui/popupbutton.cc index 554f41cc6..2aa43ddcb 100644 --- a/rtgui/popupbutton.cc +++ b/rtgui/popupbutton.cc @@ -21,7 +21,7 @@ #include "popupbutton.h" -#include +#include /* * PopUpButton::PopUpButton (const Glib::ustring& label, bool imgRight) diff --git a/rtgui/popupcommon.cc b/rtgui/popupcommon.cc index ee56c915b..c79c69011 100644 --- a/rtgui/popupcommon.cc +++ b/rtgui/popupcommon.cc @@ -23,35 +23,34 @@ #include "multilangmgr.h" #include "popupcommon.h" #include "rtimage.h" +#include "guiutils.h" PopUpCommon::PopUpCommon (Gtk::Button* thisButton, const Glib::ustring& label) - : selected (-1) // -1 means that the button is invalid + : buttonImage (nullptr) , menu (nullptr) - , buttonImage (nullptr) + , selected (-1) // -1 means that the button is invalid { button = thisButton; hasMenu = false; - imageContainer = Gtk::manage( new Gtk::HBox(false, 0)); + imageContainer = Gtk::manage( new Gtk::Grid()); + setExpandAlignProperties(imageContainer, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); button->set_relief (Gtk::RELIEF_NORMAL); - button->set_border_width (0); button->add(*imageContainer); - if (label.size()) { + if (!label.empty()) { Gtk::Label* buttonLabel = Gtk::manage ( new Gtk::Label(label + " ") ); - imageContainer->pack_start(*buttonLabel, Gtk::PACK_SHRINK, 0); + setExpandAlignProperties(buttonLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + imageContainer->attach(*buttonLabel, 0, 0, 1, 1); } // Create the global container and put the button in it - buttonGroup = Gtk::manage( new Gtk::HBox(false, 0)); - buttonGroup->pack_start(*button, Gtk::PACK_EXPAND_WIDGET, 0); + buttonGroup = Gtk::manage( new Gtk::Grid()); + setExpandAlignProperties(buttonGroup, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + buttonGroup->attach(*button, 0, 0, 1, 1); } PopUpCommon::~PopUpCommon () { - for (std::vector::iterator i = images.begin(); i != images.end(); ++i) { - delete *i; - } - delete menu; delete buttonImage; } @@ -61,21 +60,19 @@ bool PopUpCommon::addEntry (const Glib::ustring& fileName, const Glib::ustring& if (label.empty ()) return false; - // Create the image - RTImage* newImage = new RTImage(fileName); - images.push_back(newImage); - imageFilenames.push_back(fileName); - int currPos = (int)images.size(); - // Create the menu item - Gtk::ImageMenuItem* newItem = Gtk::manage(new Gtk::ImageMenuItem (*newImage, label)); + // Create the menu item and image + MyImageMenuItem* newItem = Gtk::manage (new MyImageMenuItem (label, fileName)); + imageFilenames.push_back (fileName); + images.push_back (newItem->getImage ()); if (selected == -1) { // Create the menu on the first item menu = new Gtk::Menu (); // Create the image for the button buttonImage = new RTImage(fileName); + setExpandAlignProperties(buttonImage, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); // Use the first image by default - imageContainer->pack_start(*buttonImage, Gtk::PACK_EXPAND_WIDGET); + imageContainer->attach_next_to(*buttonImage, Gtk::POS_RIGHT, 1, 1); selected = 0; } @@ -83,16 +80,18 @@ bool PopUpCommon::addEntry (const Glib::ustring& fileName, const Glib::ustring& if (images.size() == 1) { Gtk::Button* arrowButton = Gtk::manage( new Gtk::Button() ); RTImage* arrowImage = Gtk::manage( new RTImage("popuparrow.png") ); + setExpandAlignProperties(arrowButton, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); arrowButton->add(*arrowImage); //menuSymbol); - arrowButton->set_relief (Gtk::RELIEF_NONE); - arrowButton->set_border_width (0); - buttonGroup->pack_start(*arrowButton, Gtk::PACK_SHRINK, 0); + buttonGroup->attach_next_to(*arrowButton, *button, Gtk::POS_RIGHT, 1, 1); arrowButton->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &PopUpCommon::showMenu) ); + button->get_style_context()->add_class("Left"); + arrowButton->get_style_context()->add_class("Right"); + arrowButton->get_style_context()->add_class("popupbutton-arrow"); hasMenu = true; } - newItem->signal_activate().connect (sigc::bind(sigc::mem_fun(*this, &PopUpCommon::entrySelected), currPos - 1)); - menu->attach (*newItem, 0, 1, currPos - 1, currPos); + newItem->signal_activate ().connect (sigc::bind (sigc::mem_fun (*this, &PopUpCommon::entrySelected), images.size () - 1)); + menu->append (*newItem); return true; } @@ -101,15 +100,18 @@ bool PopUpCommon::addEntry (const Glib::ustring& fileName, const Glib::ustring& void PopUpCommon::entrySelected (int i) { - // Emit a a signal if the selected item has changed + // Emit a signal if the selected item has changed if (setSelected (i)) - message (selected); + messageChanged (selected); + + // Emit a signal in all case (i.e. propagate the signal_activate event) + messageItemSelected (selected); } -void PopUpCommon::setItemSensitivity (int i, bool isSensitive) { - Gtk::Menu_Helpers::MenuList items = menu->items(); - if (i < items.size()) { - items[i].set_sensitive(isSensitive); +void PopUpCommon::setItemSensitivity (int index, bool isSensitive) { + const auto items = menu->get_children (); + if (size_t(index) < items.size ()) { + items[size_t(index)]->set_sensitive (isSensitive); } } @@ -151,12 +153,12 @@ void PopUpCommon::setButtonHint() } if (selected > -1) { - // HACK: Gtk::MenuItem::get_label does not seem to work reliably. - Gtk::MenuItem& item = menu->items ()[selected]; - Gtk::Label* label = dynamic_cast(item.get_child ()); + auto widget = menu->get_children ()[selected]; + auto item = dynamic_cast(widget); - if (label) - hint += label->get_text (); + if (item) { + hint += item->getLabel ()->get_text (); + } } button->set_tooltip_markup(hint); diff --git a/rtgui/popupcommon.h b/rtgui/popupcommon.h index b5cb757f4..f4bdb581f 100644 --- a/rtgui/popupcommon.h +++ b/rtgui/popupcommon.h @@ -27,7 +27,7 @@ namespace Gtk { -class HBox; +class Grid; class Menu; class Button; class ImageMenuItem; @@ -42,8 +42,10 @@ class PopUpCommon public: typedef sigc::signal type_signal_changed; + typedef sigc::signal type_signal_item_selected; type_signal_changed signal_changed(); - Gtk::HBox* buttonGroup; // this is the widget to be packed + type_signal_item_selected signal_item_selected(); + Gtk::Grid* buttonGroup; // this is the widget to be packed PopUpCommon (Gtk::Button* button, const Glib::ustring& label = ""); virtual ~PopUpCommon (); @@ -57,13 +59,14 @@ public: void setItemSensitivity (int i, bool isSensitive); private: - type_signal_changed message; + type_signal_changed messageChanged; + type_signal_item_selected messageItemSelected; std::vector imageFilenames; - std::vector images; + std::vector images; Glib::ustring buttonHint; RTImage* buttonImage; - Gtk::HBox* imageContainer; + Gtk::Grid* imageContainer; Gtk::Menu* menu; Gtk::Button* button; int selected; @@ -78,7 +81,12 @@ protected: inline PopUpCommon::type_signal_changed PopUpCommon::signal_changed () { - return message; + return messageChanged; +} + +inline PopUpCommon::type_signal_item_selected PopUpCommon::signal_item_selected () +{ + return messageItemSelected; } inline int PopUpCommon::getEntryCount () const diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 30d9d5ed2..f0f35300f 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -22,6 +22,7 @@ #include "splash.h" #include "cachemanager.h" #include "addsetids.h" +#include "../rtengine/icons.h" #include "../rtengine/dfmanager.h" #include "../rtengine/ffmanager.h" #include @@ -32,95 +33,113 @@ extern Options options; extern Glib::ustring argv0; +Glib::RefPtr themecss; +Glib::RefPtr fontcss; -Preferences::Preferences (RTWindow *rtwindow) : rprofiles(nullptr), iprofiles(nullptr), parent(rtwindow) +Preferences::Preferences (RTWindow *rtwindow) + : Gtk::Dialog (M ("MAIN_BUTTON_PREFERENCES"), *rtwindow, true) + , splash (nullptr) + , rprofiles (nullptr) + , iprofiles (nullptr) + , parent (rtwindow) + , newFont (false) + , newCPFont (false) { - - splash = nullptr; - - set_title (M("MAIN_BUTTON_PREFERENCES")); + regex = Glib::Regex::create (THEMEREGEXSTR, Glib::RegexCompileFlags::REGEX_CASELESS); moptions.copyFrom (&options); - oldSlimUI = options.slimUI; /* - * Do not increase height, since it's not visible on e.g. smaller netbook screens - * Default height is about 620 pixels actually, that's why we do not set the height anymore - * Netbook users will most certainly set a smaller font and use the "slimUI" mode, - * so they'll be able to shrink the pref window and close it. + * Do not increase height, since it's not visible on e.g. smaller netbook + * screens. The default height is about 620 pixels currently, that's why + * we do not set the height anymore. Netbook users will most certainly set + * a smaller font, so they'll be able to shrink the Preferences window and + * close it. */ set_size_request (650, -1); set_default_size (options.preferencesWidth, options.preferencesHeight); - set_border_width(4); - Gtk::VBox* mainvb = get_vbox (); - mainvb->set_spacing(8); - set_has_separator (false); + Pango::FontDescription defaultFont = get_style_context ()->get_font(); + initialFontFamily = defaultFont.get_family (); + initialFontSize = defaultFont.get_size () / Pango::SCALE; + + Gtk::Box* mainBox = get_content_area (); +//GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + mainBox->set_spacing (8); +#endif +//GTK318 + //set_has_separator (false); Gtk::Notebook* nb = Gtk::manage (new Gtk::Notebook ()); - mainvb->pack_start (*nb); + nb->set_name ("PrefNotebook"); + mainBox->pack_start (*nb); - Gtk::HBox* buttonpanel = Gtk::manage (new Gtk::HBox ()); - buttonpanel->set_spacing(8); - mainvb->pack_start (*buttonpanel, Gtk::PACK_SHRINK, 0); + Gtk::Button* about = Gtk::manage (new Gtk::Button (M ("GENERAL_ABOUT"))); + Gtk::Button* ok = Gtk::manage (new Gtk::Button (M ("GENERAL_OK"))); + Gtk::Button* cancel = Gtk::manage (new Gtk::Button (M ("GENERAL_CANCEL"))); - Gtk::Button* about = Gtk::manage (new Gtk::Button (M("GENERAL_ABOUT"))); - Gtk::Button* ok = Gtk::manage (new Gtk::Button (M("GENERAL_OK"))); - Gtk::Button* cancel = Gtk::manage (new Gtk::Button (M("GENERAL_CANCEL"))); + about->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::aboutPressed) ); + ok->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::okPressed) ); + cancel->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::cancelPressed) ); - about->set_image (*Gtk::manage(new RTImage ("rt-logo.png"))); - ok->set_image (*Gtk::manage(new RTImage ("gtk-apply.png"))); - cancel->set_image (*Gtk::manage(new RTImage ("gtk-cancel.png"))); + get_action_area()->pack_start (*about); + get_action_area()->pack_end (*ok); + get_action_area()->pack_end (*cancel); - - about->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::aboutPressed) ); - ok->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::okPressed) ); - cancel->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::cancelPressed) ); - - buttonpanel->pack_start (*about, Gtk::PACK_SHRINK, 0); - buttonpanel->pack_end (*ok, Gtk::PACK_SHRINK, 0); - buttonpanel->pack_end (*cancel, Gtk::PACK_SHRINK, 0); - nb->append_page (*getGeneralPanel(), M("PREFERENCES_TAB_GENERAL")); - nb->append_page (*getProcParamsPanel(), M("PREFERENCES_TAB_IMPROC")); - nb->append_page (*getFileBrowserPanel(), M("PREFERENCES_TAB_BROWSER")); - nb->append_page (*getColorManagementPanel(), M("PREFERENCES_TAB_COLORMGR")); - nb->append_page (*getBatchProcPanel(), M("PREFERENCES_BATCH_PROCESSING")); - nb->append_page (*getPerformancePanel(), M("PREFERENCES_TAB_PERFORMANCE")); + nb->append_page (*getGeneralPanel(), M ("PREFERENCES_TAB_GENERAL")); + nb->append_page (*getProcParamsPanel(), M ("PREFERENCES_TAB_IMPROC")); + nb->append_page (*getDynProfilePanel(), M ("PREFERENCES_TAB_DYNAMICPROFILE")); + nb->append_page (*getFileBrowserPanel(), M ("PREFERENCES_TAB_BROWSER")); + nb->append_page (*getColorManagementPanel(), M ("PREFERENCES_TAB_COLORMGR")); + nb->append_page (*getBatchProcPanel(), M ("PREFERENCES_BATCH_PROCESSING")); + nb->append_page (*getPerformancePanel(), M ("PREFERENCES_TAB_PERFORMANCE")); // Sounds only on Windows and Linux #if defined(WIN32) || defined(__linux__) - nb->append_page (*getSoundPanel(), M("PREFERENCES_TAB_SOUND")); + nb->append_page (*getSoundPanel(), M ("PREFERENCES_TAB_SOUND")); #endif nb->set_current_page (0); - profileStore.addListener(this); + ProfileStore::getInstance()->addListener (this); fillPreferences (); show_all_children (); - set_modal (true); } Preferences::~Preferences () { - profileStore.removeListener(this); - get_size(options.preferencesWidth, options.preferencesHeight); + ProfileStore::getInstance()->removeListener (this); + get_size (options.preferencesWidth, options.preferencesHeight); +} + +int Preferences::getThemeRowNumber (Glib::ustring& longThemeFName) +{ + + if (regex->match (longThemeFName + ".css", matchInfo)) { + for (size_t i = 0 ; i < themeFNames.size(); ++i) { + if (themeFNames.at (i).longFName == longThemeFName) { + return (int)i; + } + } + } + + return -1; } Gtk::Widget* Preferences::getBatchProcPanel () { Gtk::VBox* mvbpp = Gtk::manage (new Gtk::VBox ()); - mvbpp->set_border_width(4); Gtk::ScrolledWindow* behscrollw = Gtk::manage (new Gtk::ScrolledWindow ()); behscrollw->set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - behscrollw->set_border_width(8); - behscrollw->set_size_request(-1, 60); - Gtk::VBox* vbbeh = Gtk::manage( new Gtk::VBox () ); + behscrollw->set_size_request (-1, 60); + Gtk::VBox* vbbeh = Gtk::manage ( new Gtk::VBox () ); vbbeh->pack_start (*behscrollw, Gtk::PACK_EXPAND_WIDGET); - Gtk::Frame* behFrame = Gtk::manage (new Gtk::Frame (M("PREFERENCES_BEHAVIOR"))); + Gtk::Frame* behFrame = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_BEHAVIOR"))); behFrame->add (*vbbeh); //mvbpp->pack_start (*behFrame); mvbpp->pack_start (*behFrame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -130,243 +149,244 @@ Gtk::Widget* Preferences::getBatchProcPanel () behModel = Gtk::TreeStore::create (behavColumns); behTreeView->set_model (behModel); - behTreeView->append_column (M("PREFERENCES_PROPERTY"), behavColumns.label); - behTreeView->append_column_editable (M("PREFERENCES_ADD"), behavColumns.badd); - behTreeView->append_column_editable (M("PREFERENCES_SET"), behavColumns.bset); + behTreeView->append_column (M ("PREFERENCES_PROPERTY"), behavColumns.label); + behTreeView->append_column_editable (M ("PREFERENCES_ADD"), behavColumns.badd); + behTreeView->append_column_editable (M ("PREFERENCES_SET"), behavColumns.bset); - Gtk::CellRendererToggle* cr_add = static_cast (behTreeView->get_column (1)->get_first_cell_renderer()); - Gtk::CellRendererToggle* cr_set = static_cast (behTreeView->get_column (2)->get_first_cell_renderer()); + Gtk::CellRendererToggle* cr_add = static_cast (behTreeView->get_column (1)->get_first_cell()); + Gtk::CellRendererToggle* cr_set = static_cast (behTreeView->get_column (2)->get_first_cell()); cr_add->set_radio (true); - cr_add->set_property("xalign", 0.0f); + cr_add->set_property ("xalign", 0.0f); sigc::connection addc = cr_add->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::behAddRadioToggled)); cr_set->set_radio (true); - cr_set->set_property("xalign", 0.0f); + cr_set->set_property ("xalign", 0.0f); sigc::connection setc = cr_set->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::behSetRadioToggled)); behTreeView->get_column (1)->add_attribute (*cr_add, "visible", behavColumns.visible); - behTreeView->get_column (1)->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED); + behTreeView->get_column (1)->set_sizing (Gtk::TREE_VIEW_COLUMN_FIXED); behTreeView->get_column (1)->set_fixed_width (50); behTreeView->get_column (2)->add_attribute (*cr_set, "visible", behavColumns.visible); - behTreeView->get_column (2)->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED); + behTreeView->get_column (2)->set_sizing (Gtk::TREE_VIEW_COLUMN_FIXED); behTreeView->get_column (2)->set_fixed_width (50); // fill model Gtk::TreeModel::iterator mi, ci; /* - * The TRUE/FALSE values of appendBehavList are replaced by the one defined in options.cc, + * The TRUE/FALSE values of appendBehavList are replaced by the one defined in options.cc, */ mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_EXPOSURE_LABEL")); - appendBehavList (mi, M("TP_EXPOSURE_EXPCOMP"), ADDSET_TC_EXPCOMP, false); - appendBehavList (mi, M("TP_EXPOSURE_COMPRHIGHLIGHTS"), ADDSET_TC_HLCOMPAMOUNT, false); - appendBehavList (mi, M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), ADDSET_TC_HLCOMPTHRESH, false); - appendBehavList (mi, M("TP_EXPOSURE_BLACKLEVEL"), ADDSET_TC_BLACKLEVEL, false); - appendBehavList (mi, M("TP_EXPOSURE_COMPRSHADOWS"), ADDSET_TC_SHCOMP, false); - appendBehavList (mi, M("TP_EXPOSURE_BRIGHTNESS"), ADDSET_TC_BRIGHTNESS, false); - appendBehavList (mi, M("TP_EXPOSURE_CONTRAST"), ADDSET_TC_CONTRAST, false); - appendBehavList (mi, M("TP_EXPOSURE_SATURATION"), ADDSET_TC_SATURATION, false); + mi->set_value (behavColumns.label, M ("TP_EXPOSURE_LABEL")); + appendBehavList (mi, M ("TP_EXPOSURE_EXPCOMP"), ADDSET_TC_EXPCOMP, false); + appendBehavList (mi, M ("TP_EXPOSURE_COMPRHIGHLIGHTS"), ADDSET_TC_HLCOMPAMOUNT, false); + appendBehavList (mi, M ("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), ADDSET_TC_HLCOMPTHRESH, false); + appendBehavList (mi, M ("TP_EXPOSURE_BLACKLEVEL"), ADDSET_TC_BLACKLEVEL, false); + appendBehavList (mi, M ("TP_EXPOSURE_COMPRSHADOWS"), ADDSET_TC_SHCOMP, false); + appendBehavList (mi, M ("TP_EXPOSURE_BRIGHTNESS"), ADDSET_TC_BRIGHTNESS, false); + appendBehavList (mi, M ("TP_EXPOSURE_CONTRAST"), ADDSET_TC_CONTRAST, false); + appendBehavList (mi, M ("TP_EXPOSURE_SATURATION"), ADDSET_TC_SATURATION, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_RETINEX_LABEL")); - appendBehavList (mi, M("TP_RETINEX_STRENGTH"), ADDSET_RETI_STR, false); - appendBehavList (mi, M("TP_RETINEX_NEIGHBOR"), ADDSET_RETI_NEIGH, false); - appendBehavList (mi, M("TP_RETINEX_VARIANCE"), ADDSET_RETI_VART, false); - appendBehavList (mi, M("TP_RETINEX_GAMMA"), ADDSET_RETI_GAM, false); - appendBehavList (mi, M("TP_RETINEX_SLOPE"), ADDSET_RETI_SLO, false); - appendBehavList (mi, M("TP_RETINEX_GAIN"), ADDSET_RETI_GAIN, false); - appendBehavList (mi, M("TP_RETINEX_OFFSET"), ADDSET_RETI_OFFS, false); - appendBehavList (mi, M("TP_RETINEX_THRESHOLD"), ADDSET_RETI_LIMD, false); + mi->set_value (behavColumns.label, M ("TP_RETINEX_LABEL")); + appendBehavList (mi, M ("TP_RETINEX_STRENGTH"), ADDSET_RETI_STR, false); + appendBehavList (mi, M ("TP_RETINEX_NEIGHBOR"), ADDSET_RETI_NEIGH, false); + appendBehavList (mi, M ("TP_RETINEX_VARIANCE"), ADDSET_RETI_VART, false); + appendBehavList (mi, M ("TP_RETINEX_GAMMA"), ADDSET_RETI_GAM, false); + appendBehavList (mi, M ("TP_RETINEX_SLOPE"), ADDSET_RETI_SLO, false); + appendBehavList (mi, M ("TP_RETINEX_GAIN"), ADDSET_RETI_GAIN, false); + appendBehavList (mi, M ("TP_RETINEX_OFFSET"), ADDSET_RETI_OFFS, false); + appendBehavList (mi, M ("TP_RETINEX_THRESHOLD"), ADDSET_RETI_LIMD, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_SHADOWSHLIGHTS_LABEL")); - appendBehavList (mi, M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), ADDSET_SH_HIGHLIGHTS, false); - appendBehavList (mi, M("TP_SHADOWSHLIGHTS_SHADOWS"), ADDSET_SH_SHADOWS, false); - appendBehavList (mi, M("TP_SHADOWSHLIGHTS_LOCALCONTR"), ADDSET_SH_LOCALCONTRAST, false); + mi->set_value (behavColumns.label, M ("TP_SHADOWSHLIGHTS_LABEL")); + appendBehavList (mi, M ("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), ADDSET_SH_HIGHLIGHTS, false); + appendBehavList (mi, M ("TP_SHADOWSHLIGHTS_SHADOWS"), ADDSET_SH_SHADOWS, false); + appendBehavList (mi, M ("TP_SHADOWSHLIGHTS_LOCALCONTR"), ADDSET_SH_LOCALCONTRAST, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_LABCURVE_LABEL")); - appendBehavList (mi, M("TP_LABCURVE_BRIGHTNESS"), ADDSET_LC_BRIGHTNESS, false); - appendBehavList (mi, M("TP_LABCURVE_CONTRAST"), ADDSET_LC_CONTRAST, false); - appendBehavList (mi, M("TP_LABCURVE_CHROMATICITY"), ADDSET_LC_CHROMATICITY, false); + mi->set_value (behavColumns.label, M ("TP_LABCURVE_LABEL")); + appendBehavList (mi, M ("TP_LABCURVE_BRIGHTNESS"), ADDSET_LC_BRIGHTNESS, false); + appendBehavList (mi, M ("TP_LABCURVE_CONTRAST"), ADDSET_LC_CONTRAST, false); + appendBehavList (mi, M ("TP_LABCURVE_CHROMATICITY"), ADDSET_LC_CHROMATICITY, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_SHARPENING_LABEL")); - appendBehavList (mi, M("TP_SHARPENING_AMOUNT"), ADDSET_SHARP_AMOUNT, false); + mi->set_value (behavColumns.label, M ("TP_SHARPENING_LABEL")); + appendBehavList (mi, M ("TP_SHARPENING_AMOUNT"), ADDSET_SHARP_AMOUNT, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_SHARPENEDGE_LABEL")); - appendBehavList (mi, M("TP_SHARPENEDGE_PASSES"), ADDSET_SHARPENEDGE_PASS, false); - appendBehavList (mi, M("TP_SHARPENEDGE_AMOUNT"), ADDSET_SHARPENEDGE_AMOUNT, false); + mi->set_value (behavColumns.label, M ("TP_SHARPENEDGE_LABEL")); + appendBehavList (mi, M ("TP_SHARPENEDGE_PASSES"), ADDSET_SHARPENEDGE_PASS, false); + appendBehavList (mi, M ("TP_SHARPENEDGE_AMOUNT"), ADDSET_SHARPENEDGE_AMOUNT, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_SHARPENMICRO_LABEL")); - appendBehavList (mi, M("TP_SHARPENMICRO_AMOUNT"), ADDSET_SHARPENMICRO_AMOUNT, false); - appendBehavList (mi, M("TP_SHARPENMICRO_UNIFORMITY"), ADDSET_SHARPENMICRO_UNIFORMITY, false); + mi->set_value (behavColumns.label, M ("TP_SHARPENMICRO_LABEL")); + appendBehavList (mi, M ("TP_SHARPENMICRO_AMOUNT"), ADDSET_SHARPENMICRO_AMOUNT, false); + appendBehavList (mi, M ("TP_SHARPENMICRO_UNIFORMITY"), ADDSET_SHARPENMICRO_UNIFORMITY, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_DIRPYRDENOISE_LABEL")); - // appendBehavList (mi, M("TP_DIRPYRDENOISE_LUMA")+", "+M("TP_DIRPYRDENOISE_CHROMA"), ADDSET_DIRPYRDN_CHLUM, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_LUMA"), ADDSET_DIRPYRDN_LUMA, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_LDETAIL"), ADDSET_DIRPYRDN_LUMDET, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_CHROMA"), ADDSET_DIRPYRDN_CHROMA, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_RED"), ADDSET_DIRPYRDN_CHROMARED, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_BLUE"), ADDSET_DIRPYRDN_CHROMABLUE, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_GAMMA"), ADDSET_DIRPYRDN_GAMMA, true); - appendBehavList (mi, M("TP_DIRPYRDENOISE_PASSES"), ADDSET_DIRPYRDN_PASSES, true); + mi->set_value (behavColumns.label, M ("TP_DIRPYRDENOISE_LABEL")); + //appendBehavList (mi, M("TP_DIRPYRDENOISE_LUMA")+", "+M("TP_DIRPYRDENOISE_CHROMA"), ADDSET_DIRPYRDN_CHLUM, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_LUMA"), ADDSET_DIRPYRDN_LUMA, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_LDETAIL"), ADDSET_DIRPYRDN_LUMDET, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_CHROMA"), ADDSET_DIRPYRDN_CHROMA, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_RED"), ADDSET_DIRPYRDN_CHROMARED, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_BLUE"), ADDSET_DIRPYRDN_CHROMABLUE, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_GAMMA"), ADDSET_DIRPYRDN_GAMMA, true); + appendBehavList (mi, M ("TP_DIRPYRDENOISE_PASSES"), ADDSET_DIRPYRDN_PASSES, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_WBALANCE_LABEL")); - appendBehavList (mi, M("TP_WBALANCE_TEMPERATURE"), ADDSET_WB_TEMPERATURE, true); - appendBehavList (mi, M("TP_WBALANCE_GREEN"), ADDSET_WB_GREEN, true); - appendBehavList (mi, M("TP_WBALANCE_EQBLUERED"), ADDSET_WB_EQUAL, true); + mi->set_value (behavColumns.label, M ("TP_WBALANCE_LABEL")); + appendBehavList (mi, M ("TP_WBALANCE_TEMPERATURE"), ADDSET_WB_TEMPERATURE, true); + appendBehavList (mi, M ("TP_WBALANCE_GREEN"), ADDSET_WB_GREEN, true); + appendBehavList (mi, M ("TP_WBALANCE_EQBLUERED"), ADDSET_WB_EQUAL, true); + appendBehavList (mi, M ("TP_WBALANCE_TEMPBIAS"), ADDSET_WB_TEMPBIAS, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_COLORAPP_LABEL")); - appendBehavList (mi, M("TP_COLORAPP_CIECAT_DEGREE"), ADDSET_CAT_DEGREE, true); - appendBehavList (mi, M("TP_COLORAPP_ADAPTSCENE"), ADDSET_CAT_ADAPTSCENE, true); - appendBehavList (mi, M("TP_COLORAPP_LIGHT"), ADDSET_CAT_LIGHT, true); - appendBehavList (mi, M("TP_COLORAPP_BRIGHT"), ADDSET_CAT_BRIGHT, true); - appendBehavList (mi, M("TP_COLORAPP_CHROMA"), ADDSET_CAT_CHROMA, true); - appendBehavList (mi, M("TP_COLORAPP_RSTPRO"), ADDSET_CAT_RSTPRO, true); - appendBehavList (mi, M("TP_COLORAPP_CONTRAST"), ADDSET_CAT_CONTRAST, true); - appendBehavList (mi, M("TP_COLORAPP_CONTRAST_Q"), ADDSET_CAT_CONTRAST_Q, true); - appendBehavList (mi, M("TP_COLORAPP_CHROMA_S"), ADDSET_CAT_CHROMA_S, true); - appendBehavList (mi, M("TP_COLORAPP_CHROMA_M"), ADDSET_CAT_CHROMA_M, true); - appendBehavList (mi, M("TP_COLORAPP_HUE"), ADDSET_CAT_HUE, true); - appendBehavList (mi, M("TP_COLORAPP_ADAPTVIEWING"), ADDSET_CAT_ADAPTVIEWING, true); - appendBehavList (mi, M("TP_COLORAPP_BADPIXSL"), ADDSET_CAT_BADPIX, true); + mi->set_value (behavColumns.label, M ("TP_COLORAPP_LABEL")); + appendBehavList (mi, M ("TP_COLORAPP_CIECAT_DEGREE"), ADDSET_CAT_DEGREE, true); + appendBehavList (mi, M ("TP_COLORAPP_ADAPTSCENE"), ADDSET_CAT_ADAPTSCENE, true); + appendBehavList (mi, M ("TP_COLORAPP_LIGHT"), ADDSET_CAT_LIGHT, true); + appendBehavList (mi, M ("TP_COLORAPP_BRIGHT"), ADDSET_CAT_BRIGHT, true); + appendBehavList (mi, M ("TP_COLORAPP_CHROMA"), ADDSET_CAT_CHROMA, true); + appendBehavList (mi, M ("TP_COLORAPP_RSTPRO"), ADDSET_CAT_RSTPRO, true); + appendBehavList (mi, M ("TP_COLORAPP_CONTRAST"), ADDSET_CAT_CONTRAST, true); + appendBehavList (mi, M ("TP_COLORAPP_CONTRAST_Q"), ADDSET_CAT_CONTRAST_Q, true); + appendBehavList (mi, M ("TP_COLORAPP_CHROMA_S"), ADDSET_CAT_CHROMA_S, true); + appendBehavList (mi, M ("TP_COLORAPP_CHROMA_M"), ADDSET_CAT_CHROMA_M, true); + appendBehavList (mi, M ("TP_COLORAPP_HUE"), ADDSET_CAT_HUE, true); + appendBehavList (mi, M ("TP_COLORAPP_ADAPTVIEWING"), ADDSET_CAT_ADAPTVIEWING, true); + appendBehavList (mi, M ("TP_COLORAPP_BADPIXSL"), ADDSET_CAT_BADPIX, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_VIBRANCE_LABEL")); - appendBehavList (mi, M("TP_VIBRANCE_PASTELS"), ADDSET_VIBRANCE_PASTELS, false); - appendBehavList (mi, M("TP_VIBRANCE_SATURATED"), ADDSET_VIBRANCE_SATURATED, false); + mi->set_value (behavColumns.label, M ("TP_VIBRANCE_LABEL")); + appendBehavList (mi, M ("TP_VIBRANCE_PASTELS"), ADDSET_VIBRANCE_PASTELS, false); + appendBehavList (mi, M ("TP_VIBRANCE_SATURATED"), ADDSET_VIBRANCE_SATURATED, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_GAMMA_OUTPUT")); - appendBehavList (mi, M("TP_GAMMA_CURV"), ADDSET_FREE_OUPUT_GAMMA, false); - appendBehavList (mi, M("TP_GAMMA_SLOP"), ADDSET_FREE_OUTPUT_SLOPE, false); + mi->set_value (behavColumns.label, M ("TP_GAMMA_OUTPUT")); + appendBehavList (mi, M ("TP_GAMMA_CURV"), ADDSET_FREE_OUPUT_GAMMA, false); + appendBehavList (mi, M ("TP_GAMMA_SLOP"), ADDSET_FREE_OUTPUT_SLOPE, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_CHMIXER_LABEL")); - appendBehavList (mi, M("TP_CHMIXER_RED") + ", " + M("TP_CHMIXER_GREEN") + ", " + M("TP_CHMIXER_BLUE"), ADDSET_CHMIXER, false); + mi->set_value (behavColumns.label, M ("TP_CHMIXER_LABEL")); + appendBehavList (mi, M ("TP_CHMIXER_RED") + ", " + M ("TP_CHMIXER_GREEN") + ", " + M ("TP_CHMIXER_BLUE"), ADDSET_CHMIXER, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_BWMIX_LABEL")); - appendBehavList (mi, M("TP_BWMIX_MIXC"), ADDSET_BLACKWHITE_HUES, false); - appendBehavList (mi, M("TP_BWMIX_GAMMA"), ADDSET_BLACKWHITE_GAMMA, false); + mi->set_value (behavColumns.label, M ("TP_BWMIX_LABEL")); + appendBehavList (mi, M ("TP_BWMIX_MIXC"), ADDSET_BLACKWHITE_HUES, false); + appendBehavList (mi, M ("TP_BWMIX_GAMMA"), ADDSET_BLACKWHITE_GAMMA, false); mi = behModel->append (); - mi->set_value( behavColumns.label, M("TP_FILMSIMULATION_LABEL") ); - appendBehavList( mi, M( "TP_FILMSIMULATION_STRENGTH" ), ADDSET_FILMSIMULATION_STRENGTH, true ); + mi->set_value ( behavColumns.label, M ("TP_FILMSIMULATION_LABEL") ); + appendBehavList ( mi, M ( "TP_FILMSIMULATION_STRENGTH" ), ADDSET_FILMSIMULATION_STRENGTH, true ); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_COLORTONING_LABEL")); - appendBehavList (mi, M("TP_COLORTONING_SPLITCOCO"), ADDSET_COLORTONING_SPLIT , true); - appendBehavList (mi, M("TP_COLORTONING_SATURATIONTHRESHOLD"), ADDSET_COLORTONING_SATTHRESHOLD , true); - appendBehavList (mi, M("TP_COLORTONING_SATURATEDOPACITY"), ADDSET_COLORTONING_SATOPACITY , true); - appendBehavList (mi, M("TP_COLORTONING_BALANCE"), ADDSET_COLORTONING_BALANCE , true); - appendBehavList (mi, M("TP_COLORTONING_STRENGTH"), ADDSET_COLORTONING_STRENGTH , true); + mi->set_value (behavColumns.label, M ("TP_COLORTONING_LABEL")); + appendBehavList (mi, M ("TP_COLORTONING_SPLITCOCO"), ADDSET_COLORTONING_SPLIT, true); + appendBehavList (mi, M ("TP_COLORTONING_SATURATIONTHRESHOLD"), ADDSET_COLORTONING_SATTHRESHOLD, true); + appendBehavList (mi, M ("TP_COLORTONING_SATURATEDOPACITY"), ADDSET_COLORTONING_SATOPACITY, true); + appendBehavList (mi, M ("TP_COLORTONING_BALANCE"), ADDSET_COLORTONING_BALANCE, true); + appendBehavList (mi, M ("TP_COLORTONING_STRENGTH"), ADDSET_COLORTONING_STRENGTH, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_ROTATE_LABEL")); - appendBehavList (mi, M("TP_ROTATE_DEGREE"), ADDSET_ROTATE_DEGREE, false); + mi->set_value (behavColumns.label, M ("TP_ROTATE_LABEL")); + appendBehavList (mi, M ("TP_ROTATE_DEGREE"), ADDSET_ROTATE_DEGREE, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_DISTORTION_LABEL")); - appendBehavList (mi, M("TP_DISTORTION_AMOUNT"), ADDSET_DIST_AMOUNT, false); + mi->set_value (behavColumns.label, M ("TP_DISTORTION_LABEL")); + appendBehavList (mi, M ("TP_DISTORTION_AMOUNT"), ADDSET_DIST_AMOUNT, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_PERSPECTIVE_LABEL")); - appendBehavList (mi, M("TP_PERSPECTIVE_HORIZONTAL") + ", " + M("TP_PERSPECTIVE_VERTICAL"), ADDSET_PERSPECTIVE, false); + mi->set_value (behavColumns.label, M ("TP_PERSPECTIVE_LABEL")); + appendBehavList (mi, M ("TP_PERSPECTIVE_HORIZONTAL") + ", " + M ("TP_PERSPECTIVE_VERTICAL"), ADDSET_PERSPECTIVE, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_GRADIENT_LABEL")); - appendBehavList (mi, M("TP_GRADIENT_DEGREE"), ADDSET_GRADIENT_DEGREE, false); - appendBehavList (mi, M("TP_GRADIENT_FEATHER"), ADDSET_GRADIENT_FEATHER, false); - appendBehavList (mi, M("TP_GRADIENT_STRENGTH"), ADDSET_GRADIENT_STRENGTH, false); - appendBehavList (mi, M("TP_GRADIENT_CENTER_X") + ", " + M("TP_GRADIENT_CENTER_Y"), ADDSET_GRADIENT_CENTER, false); + mi->set_value (behavColumns.label, M ("TP_GRADIENT_LABEL")); + appendBehavList (mi, M ("TP_GRADIENT_DEGREE"), ADDSET_GRADIENT_DEGREE, false); + appendBehavList (mi, M ("TP_GRADIENT_FEATHER"), ADDSET_GRADIENT_FEATHER, false); + appendBehavList (mi, M ("TP_GRADIENT_STRENGTH"), ADDSET_GRADIENT_STRENGTH, false); + appendBehavList (mi, M ("TP_GRADIENT_CENTER_X") + ", " + M ("TP_GRADIENT_CENTER_Y"), ADDSET_GRADIENT_CENTER, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_PCVIGNETTE_LABEL")); - appendBehavList (mi, M("TP_PCVIGNETTE_STRENGTH"), ADDSET_PCVIGNETTE_STRENGTH, false); - appendBehavList (mi, M("TP_PCVIGNETTE_FEATHER"), ADDSET_PCVIGNETTE_FEATHER, false); - appendBehavList (mi, M("TP_PCVIGNETTE_ROUNDNESS"), ADDSET_PCVIGNETTE_ROUNDNESS, false); + mi->set_value (behavColumns.label, M ("TP_PCVIGNETTE_LABEL")); + appendBehavList (mi, M ("TP_PCVIGNETTE_STRENGTH"), ADDSET_PCVIGNETTE_STRENGTH, false); + appendBehavList (mi, M ("TP_PCVIGNETTE_FEATHER"), ADDSET_PCVIGNETTE_FEATHER, false); + appendBehavList (mi, M ("TP_PCVIGNETTE_ROUNDNESS"), ADDSET_PCVIGNETTE_ROUNDNESS, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_CACORRECTION_LABEL")); - appendBehavList (mi, M("TP_CACORRECTION_BLUE") + ", " + M("TP_CACORRECTION_RED"), ADDSET_CA, true); + mi->set_value (behavColumns.label, M ("TP_CACORRECTION_LABEL")); + appendBehavList (mi, M ("TP_CACORRECTION_BLUE") + ", " + M ("TP_CACORRECTION_RED"), ADDSET_CA, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_VIGNETTING_LABEL")); - appendBehavList (mi, M("TP_VIGNETTING_AMOUNT"), ADDSET_VIGN_AMOUNT, false); - appendBehavList (mi, M("TP_VIGNETTING_RADIUS"), ADDSET_VIGN_RADIUS, false); - appendBehavList (mi, M("TP_VIGNETTING_STRENGTH"), ADDSET_VIGN_STRENGTH, false); - appendBehavList (mi, M("TP_VIGNETTING_CENTER_X") + ", " + M("TP_VIGNETTING_CENTER_Y"), ADDSET_VIGN_CENTER, false); + mi->set_value (behavColumns.label, M ("TP_VIGNETTING_LABEL")); + appendBehavList (mi, M ("TP_VIGNETTING_AMOUNT"), ADDSET_VIGN_AMOUNT, false); + appendBehavList (mi, M ("TP_VIGNETTING_RADIUS"), ADDSET_VIGN_RADIUS, false); + appendBehavList (mi, M ("TP_VIGNETTING_STRENGTH"), ADDSET_VIGN_STRENGTH, false); + appendBehavList (mi, M ("TP_VIGNETTING_CENTER_X") + ", " + M ("TP_VIGNETTING_CENTER_Y"), ADDSET_VIGN_CENTER, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_DIRPYREQUALIZER_LABEL")); - appendBehavList (mi, M("TP_EXPOSURE_CONTRAST"), ADDSET_DIRPYREQ, true); - appendBehavList (mi, M("TP_DIRPYREQUALIZER_THRESHOLD"), ADDSET_DIRPYREQ_THRESHOLD, true); - appendBehavList (mi, M("TP_DIRPYREQUALIZER_SKIN"), ADDSET_DIRPYREQ_SKINPROTECT, true); + mi->set_value (behavColumns.label, M ("TP_DIRPYREQUALIZER_LABEL")); + appendBehavList (mi, M ("TP_EXPOSURE_CONTRAST"), ADDSET_DIRPYREQ, true); + appendBehavList (mi, M ("TP_DIRPYREQUALIZER_THRESHOLD"), ADDSET_DIRPYREQ_THRESHOLD, true); + appendBehavList (mi, M ("TP_DIRPYREQUALIZER_SKIN"), ADDSET_DIRPYREQ_SKINPROTECT, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_WAVELET_LABEL")); - appendBehavList (mi, M("TP_WAVELET_LEVELS"), ADDSET_WA_THRES, true); - // appendBehavList (mi, M("TP_WAVELET_CONTRAST"), ADDSET_WA, true); - appendBehavList (mi, M("TP_WAVELET_THRESHOLD"), ADDSET_WA_THRESHOLD, true); - appendBehavList (mi, M("TP_WAVELET_THRESHOLD2"), ADDSET_WA_THRESHOLD2, true); - appendBehavList (mi, M("TP_WAVELET_CHRO"), ADDSET_WA_CHRO, true); - appendBehavList (mi, M("TP_WAVELET_CHR"), ADDSET_WA_CHROMA, true); - appendBehavList (mi, M("TP_WAVELET_SKIN"), ADDSET_WA_SKINPROTECT, true); - appendBehavList (mi, M("TP_WAVELET_EDRAD"), ADDSET_WA_EDGRAD, true); - appendBehavList (mi, M("TP_WAVELET_EDVAL"), ADDSET_WA_EDGVAL, true); - appendBehavList (mi, M("TP_WAVELET_RESCON"), ADDSET_WA_RESCON, 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_THRH"), ADDSET_WA_THRRH, 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_SKY"), ADDSET_WA_SKYPROTECT, 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_COMPGAMMA"), ADDSET_WA_GAMMA, true); - appendBehavList (mi, M("TP_WAVELET_EDGEDETECT"), ADDSET_WA_EDGEDETECT, true); - appendBehavList (mi, M("TP_WAVELET_EDGEDETECTTHR"), ADDSET_WA_EDGEDETECTTHR, true); - appendBehavList (mi, M("TP_WAVELET_EDGEDETECTTHR2"), ADDSET_WA_EDGEDETECTTHR2, true); + mi->set_value (behavColumns.label, M ("TP_WAVELET_LABEL")); + appendBehavList (mi, M ("TP_WAVELET_LEVELS"), ADDSET_WA_THRES, true); + //appendBehavList (mi, M("TP_WAVELET_CONTRAST"), ADDSET_WA, true); + appendBehavList (mi, M ("TP_WAVELET_THRESHOLD"), ADDSET_WA_THRESHOLD, true); + appendBehavList (mi, M ("TP_WAVELET_THRESHOLD2"), ADDSET_WA_THRESHOLD2, true); + appendBehavList (mi, M ("TP_WAVELET_CHRO"), ADDSET_WA_CHRO, true); + appendBehavList (mi, M ("TP_WAVELET_CHR"), ADDSET_WA_CHROMA, true); + appendBehavList (mi, M ("TP_WAVELET_SKIN"), ADDSET_WA_SKINPROTECT, true); + appendBehavList (mi, M ("TP_WAVELET_EDRAD"), ADDSET_WA_EDGRAD, true); + appendBehavList (mi, M ("TP_WAVELET_EDVAL"), ADDSET_WA_EDGVAL, true); + appendBehavList (mi, M ("TP_WAVELET_RESCON"), ADDSET_WA_RESCON, 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_THRH"), ADDSET_WA_THRRH, 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_SKY"), ADDSET_WA_SKYPROTECT, 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_COMPGAMMA"), ADDSET_WA_GAMMA, true); + appendBehavList (mi, M ("TP_WAVELET_EDGEDETECT"), ADDSET_WA_EDGEDETECT, true); + appendBehavList (mi, M ("TP_WAVELET_EDGEDETECTTHR"), ADDSET_WA_EDGEDETECTTHR, true); + appendBehavList (mi, M ("TP_WAVELET_EDGEDETECTTHR2"), ADDSET_WA_EDGEDETECTTHR2, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_PREPROCESS_LABEL")); - appendBehavList (mi, M("TP_PREPROCESS_GREENEQUIL"), ADDSET_PREPROCESS_GREENEQUIL, false); - appendBehavList (mi, M("TP_PREPROCESS_LINEDENOISE"), ADDSET_PREPROCESS_LINEDENOISE, true); + mi->set_value (behavColumns.label, M ("TP_PREPROCESS_LABEL")); + appendBehavList (mi, M ("TP_PREPROCESS_GREENEQUIL"), ADDSET_PREPROCESS_GREENEQUIL, false); + appendBehavList (mi, M ("TP_PREPROCESS_LINEDENOISE"), ADDSET_PREPROCESS_LINEDENOISE, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_EXPOS_WHITEPOINT_LABEL")); - appendBehavList (mi, M("TP_RAWEXPOS_LINEAR"), ADDSET_RAWEXPOS_LINEAR, false); - appendBehavList (mi, M("TP_RAWEXPOS_PRESER"), ADDSET_RAWEXPOS_PRESER, false); + mi->set_value (behavColumns.label, M ("TP_EXPOS_WHITEPOINT_LABEL")); + appendBehavList (mi, M ("TP_RAWEXPOS_LINEAR"), ADDSET_RAWEXPOS_LINEAR, false); + appendBehavList (mi, M ("TP_RAWEXPOS_PRESER"), ADDSET_RAWEXPOS_PRESER, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_RAWEXPOS_BLACKS")); - appendBehavList (mi, M("TP_RAWEXPOS_RGB"), ADDSET_RAWEXPOS_BLACKS, false); + mi->set_value (behavColumns.label, M ("TP_RAWEXPOS_BLACKS")); + appendBehavList (mi, M ("TP_RAWEXPOS_RGB"), ADDSET_RAWEXPOS_BLACKS, false); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_FLATFIELD_LABEL")); - appendBehavList (mi, M("TP_FLATFIELD_CLIPCONTROL"), ADDSET_RAWFFCLIPCONTROL, true); + mi->set_value (behavColumns.label, M ("TP_FLATFIELD_LABEL")); + appendBehavList (mi, M ("TP_FLATFIELD_CLIPCONTROL"), ADDSET_RAWFFCLIPCONTROL, true); mi = behModel->append (); - mi->set_value (behavColumns.label, M("TP_CHROMATABERR_LABEL")); - appendBehavList (mi, M("TP_RAWCACORR_CARED") + ", " + M("TP_RAWCACORR_CABLUE"), ADDSET_RAWCACORR, true); + mi->set_value (behavColumns.label, M ("TP_CHROMATABERR_LABEL")); + appendBehavList (mi, M ("TP_RAWCACORR_CARED") + ", " + M ("TP_RAWCACORR_CABLUE"), ADDSET_RAWCACORR, true); behTreeView->expand_all (); - behAddAll = Gtk::manage( new Gtk::Button (M("PREFERENCES_BEHADDALL")) ); - behSetAll = Gtk::manage( new Gtk::Button (M("PREFERENCES_BEHSETALL")) ); - behAddAll->set_tooltip_markup (M("PREFERENCES_BEHADDALLHINT")); - behSetAll->set_tooltip_markup (M("PREFERENCES_BEHSETALLHINT")); + behAddAll = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_BEHADDALL")) ); + behSetAll = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_BEHSETALL")) ); + behAddAll->set_tooltip_markup (M ("PREFERENCES_BEHADDALLHINT")); + behSetAll->set_tooltip_markup (M ("PREFERENCES_BEHSETALLHINT")); - behAddAll->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::behAddAllPressed) ); - behSetAll->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::behSetAllPressed) ); + behAddAll->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::behAddAllPressed) ); + behSetAll->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::behSetAllPressed) ); Gtk::HBox* buttonpanel1 = Gtk::manage (new Gtk::HBox ()); //buttonpanel1->set_spacing(8); @@ -374,8 +394,8 @@ Gtk::Widget* Preferences::getBatchProcPanel () buttonpanel1->pack_end (*behAddAll, Gtk::PACK_SHRINK, 4); vbbeh->pack_start (*buttonpanel1, Gtk::PACK_SHRINK, 4); - chOverwriteOutputFile = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_OVERWRITEOUTPUTFILE")) ); - mvbpp->pack_start(*chOverwriteOutputFile, Gtk::PACK_SHRINK, 4); + chOverwriteOutputFile = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_OVERWRITEOUTPUTFILE")) ); + mvbpp->pack_start (*chOverwriteOutputFile, Gtk::PACK_SHRINK, 4); return mvbpp; } @@ -409,46 +429,57 @@ void Preferences::behSetRadioToggled (const Glib::ustring& path) iter->set_value (behavColumns.badd, false); } + +Gtk::Widget *Preferences::getDynProfilePanel() +{ + dynProfilePanel = Gtk::manage (new DynamicProfilePanel()); + return dynProfilePanel; +} + + Gtk::Widget* Preferences::getProcParamsPanel () { Gtk::VBox* mvbpp = Gtk::manage (new Gtk::VBox ()); - Gtk::Frame* fpp = Gtk::manage (new Gtk::Frame (M("PREFERENCES_IMPROCPARAMS"))); + Gtk::Frame* fpp = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_IMPROCPARAMS"))); Gtk::VBox* vbpp = Gtk::manage (new Gtk::VBox ()); - vbpp->set_border_width(4); - Gtk::Label* drlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_FORRAW") + ":", Gtk::ALIGN_LEFT)); + Gtk::Label* drlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_FORRAW") + ":", Gtk::ALIGN_START)); rprofiles = Gtk::manage (new ProfileStoreComboBox ()); - rprofiles->set_size_request(50, -1); - rpconn = rprofiles->signal_changed().connect( sigc::mem_fun(*this, &Preferences::forRAWComboChanged) ); - Gtk::Label* drimg = Gtk::manage (new Gtk::Label (M("PREFERENCES_FORIMAGE") + ":", Gtk::ALIGN_LEFT)); + const ProfileStoreEntry* dynpse = ProfileStore::getInstance()->getInternalDynamicPSE(); + rprofiles->addRow (dynpse); + setExpandAlignProperties (rprofiles, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + rprofiles->set_size_request (50, -1); + rpconn = rprofiles->signal_changed().connect ( sigc::mem_fun (*this, &Preferences::forRAWComboChanged) ); + Gtk::Label* drimg = Gtk::manage (new Gtk::Label (M ("PREFERENCES_FORIMAGE") + ":", Gtk::ALIGN_START)); iprofiles = Gtk::manage (new ProfileStoreComboBox ()); - iprofiles->set_size_request(50, -1); - ipconn = iprofiles->signal_changed().connect( sigc::mem_fun(*this, &Preferences::forImageComboChanged) ); + iprofiles->addRow (dynpse); + iprofiles->set_size_request (50, -1); + setExpandAlignProperties (iprofiles, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + ipconn = iprofiles->signal_changed().connect ( sigc::mem_fun (*this, &Preferences::forImageComboChanged) ); Gtk::Table* defpt = Gtk::manage (new Gtk::Table (2, 2)); defpt->attach (*drlab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); defpt->attach (*rprofiles, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); defpt->attach (*drimg, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); defpt->attach (*iprofiles, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); vbpp->pack_start (*defpt, Gtk::PACK_SHRINK, 4); - useBundledProfiles = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_USEBUNDLEDPROFILES"))); - bpconn = useBundledProfiles->signal_clicked().connect ( sigc::mem_fun(*this, &Preferences::bundledProfilesChanged) ); + useBundledProfiles = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_USEBUNDLEDPROFILES"))); + bpconn = useBundledProfiles->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::bundledProfilesChanged) ); vbpp->pack_start (*useBundledProfiles, Gtk::PACK_SHRINK, 4); fpp->add (*vbpp); mvbpp->pack_start (*fpp, Gtk::PACK_SHRINK, 4); // Custom profile builder box - Gtk::Frame* cpfrm = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CUSTPROFBUILD")) ); - Gtk::Label* cplab = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUSTPROFBUILDPATH") + ":", Gtk::ALIGN_LEFT) ); - txtCustProfBuilderPath = Gtk::manage( new Gtk::Entry () ); - txtCustProfBuilderPath->set_tooltip_markup (M("PREFERENCES_CUSTPROFBUILDHINT")); - Gtk::Label* cpltypelab = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUSTPROFBUILDKEYFORMAT") + ":", Gtk::ALIGN_LEFT) ); + Gtk::Frame* cpfrm = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CUSTPROFBUILD")) ); + Gtk::Label* cplab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CUSTPROFBUILDPATH") + ":", Gtk::ALIGN_START) ); + txtCustProfBuilderPath = Gtk::manage ( new Gtk::Entry () ); + txtCustProfBuilderPath->set_tooltip_markup (M ("PREFERENCES_CUSTPROFBUILDHINT")); + Gtk::Label* cpltypelab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT") + ":", Gtk::ALIGN_START) ); custProfBuilderLabelType = Gtk::manage (new Gtk::ComboBoxText ()); - custProfBuilderLabelType->append_text (M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID")); - custProfBuilderLabelType->append_text (M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); - custProfBuilderLabelType->append_text (M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID") + "_" + M("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); + custProfBuilderLabelType->append (M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID")); + custProfBuilderLabelType->append (M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); + custProfBuilderLabelType->append (M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID") + "_" + M ("PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME")); Gtk::Table* cpbt = Gtk::manage (new Gtk::Table (2, 2)); - cpbt->set_border_width(4); cpbt->attach (*cplab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); cpbt->attach (*txtCustProfBuilderPath, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); cpbt->attach (*cpltypelab, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); @@ -456,76 +487,72 @@ Gtk::Widget* Preferences::getProcParamsPanel () cpfrm->add (*cpbt); mvbpp->pack_start (*cpfrm, Gtk::PACK_SHRINK, 4); - Gtk::Frame* fdp = Gtk::manage (new Gtk::Frame (M("PREFERENCES_PROFILEHANDLING"))); - Gtk::VBox* vbdp = Gtk::manage (new Gtk::VBox ()); - vbdp->set_border_width (4); - saveParamsFile = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_PROFILESAVEINPUT"))); - vbdp->pack_start (*saveParamsFile, Gtk::PACK_SHRINK, 4); - saveParamsCache = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_PROFILESAVECACHE"))); - vbdp->pack_start (*saveParamsCache, Gtk::PACK_SHRINK, 4); - Gtk::Label* lplab = Gtk::manage (new Gtk::Label (M("PREFERENCES_PROFILELOADPR") + ":")); + Gtk::Frame* fdp = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_PROFILEHANDLING"))); + Gtk::Table* vbdp = Gtk::manage (new Gtk::Table (2, 2)); + saveParamsPreference = Gtk::manage (new Gtk::ComboBoxText ()); + saveParamsPreference->append (M ("PREFERENCES_PROFILESAVEINPUT")); + saveParamsPreference->append (M ("PREFERENCES_PROFILESAVECACHE")); + saveParamsPreference->append (M ("PREFERENCES_PROFILESAVEBOTH")); + Gtk::Label *splab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PROFILESAVELOCATION") + ":")); + vbdp->attach (*splab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); + vbdp->attach (*saveParamsPreference, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); + Gtk::Label* lplab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PROFILELOADPR") + ":")); loadParamsPreference = Gtk::manage (new Gtk::ComboBoxText ()); - loadParamsPreference->append_text (M("PREFERENCES_PROFILEPRCACHE")); - loadParamsPreference->append_text (M("PREFERENCES_PROFILEPRFILE")); - Gtk::HBox* hb41 = Gtk::manage (new Gtk::HBox ()); - hb41->pack_start (*lplab, Gtk::PACK_SHRINK, 0); - hb41->pack_start (*loadParamsPreference, Gtk::PACK_EXPAND_WIDGET, 0); - hb41->set_spacing(4); - vbdp->pack_start (*hb41, Gtk::PACK_EXPAND_WIDGET, 4); + loadParamsPreference->append (M ("PREFERENCES_PROFILEPRCACHE")); + loadParamsPreference->append (M ("PREFERENCES_PROFILEPRFILE")); + vbdp->attach (*lplab, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); + vbdp->attach (*loadParamsPreference, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); fdp->add (*vbdp); mvbpp->pack_start (*fdp, Gtk::PACK_SHRINK, 4); - Gtk::Frame* fdf = Gtk::manage (new Gtk::Frame (M("PREFERENCES_DARKFRAME")) ); + Gtk::Frame* fdf = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_DARKFRAME")) ); Gtk::HBox* hb42 = Gtk::manage (new Gtk::HBox ()); - darkFrameDir = Gtk::manage(new Gtk::FileChooserButton(M("PREFERENCES_DIRDARKFRAMES"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); - Gtk::Label *dfLab = Gtk::manage(new Gtk::Label(M("PREFERENCES_DIRDARKFRAMES") + ":")); - hb42->pack_start(*dfLab , Gtk::PACK_SHRINK, 4 ); - hb42->pack_start(*darkFrameDir, Gtk::PACK_EXPAND_WIDGET, 4); - dfLabel = Gtk::manage(new Gtk::Label("Found:")); + darkFrameDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_DIRDARKFRAMES"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + Gtk::Label *dfLab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_DIRDARKFRAMES") + ":")); + hb42->pack_start (*dfLab, Gtk::PACK_SHRINK, 4 ); + hb42->pack_start (*darkFrameDir, Gtk::PACK_EXPAND_WIDGET, 4); + dfLabel = Gtk::manage (new Gtk::Label ("Found:")); Gtk::VBox* vbdf = Gtk::manage (new Gtk::VBox ()); - vbdf->pack_start( *hb42, Gtk::PACK_SHRINK, 4); - vbdf->pack_start( *dfLabel, Gtk::PACK_SHRINK, 4 ); - fdf->add( *vbdf ); - mvbpp->pack_start ( *fdf , Gtk::PACK_SHRINK, 4); - mvbpp->set_border_width (4); + vbdf->pack_start (*hb42, Gtk::PACK_SHRINK, 4); + vbdf->pack_start (*dfLabel, Gtk::PACK_SHRINK, 4 ); + fdf->add (*vbdf ); + mvbpp->pack_start (*fdf, Gtk::PACK_SHRINK, 4); //dfconn = darkFrameDir->signal_file_set().connect ( sigc::mem_fun(*this, &Preferences::darkFrameChanged), true); - dfconn = darkFrameDir->signal_current_folder_changed().connect ( sigc::mem_fun(*this, &Preferences::darkFrameChanged), true); + dfconn = darkFrameDir->signal_selection_changed().connect ( sigc::mem_fun (*this, &Preferences::darkFrameChanged), true); // FLATFIELD - Gtk::Frame* fff = Gtk::manage (new Gtk::Frame (M("PREFERENCES_FLATFIELD")) ); + Gtk::Frame* fff = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_FLATFIELD")) ); Gtk::HBox* hb43 = Gtk::manage (new Gtk::HBox ()); - flatFieldDir = Gtk::manage(new Gtk::FileChooserButton(M("PREFERENCES_FLATFIELDSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); - Gtk::Label *ffLab = Gtk::manage(new Gtk::Label(M("PREFERENCES_FLATFIELDSDIR") + ":")); - hb43->pack_start(*ffLab , Gtk::PACK_SHRINK, 4 ); - hb43->pack_start(*flatFieldDir); - ffLabel = Gtk::manage(new Gtk::Label("Found:")); + flatFieldDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_FLATFIELDSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + Gtk::Label *ffLab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_FLATFIELDSDIR") + ":")); + hb43->pack_start (*ffLab, Gtk::PACK_SHRINK, 4 ); + hb43->pack_start (*flatFieldDir); + ffLabel = Gtk::manage (new Gtk::Label ("Found:")); Gtk::VBox* vbff = Gtk::manage (new Gtk::VBox ()); - vbff->pack_start( *hb43, Gtk::PACK_SHRINK, 4); - vbff->pack_start( *ffLabel, Gtk::PACK_SHRINK, 4 ); - fff->add( *vbff ); - mvbpp->pack_start ( *fff , Gtk::PACK_SHRINK, 4); - mvbpp->set_border_width (4); + vbff->pack_start (*hb43, Gtk::PACK_SHRINK, 4); + vbff->pack_start (*ffLabel, Gtk::PACK_SHRINK, 4 ); + fff->add (*vbff ); + mvbpp->pack_start (*fff, Gtk::PACK_SHRINK, 4); //ffconn = flatFieldDir->signal_file_set().connect ( sigc::mem_fun(*this, &Preferences::flatFieldChanged), true); - ffconn = flatFieldDir->signal_current_folder_changed().connect ( sigc::mem_fun(*this, &Preferences::flatFieldChanged), true); + ffconn = flatFieldDir->signal_selection_changed().connect ( sigc::mem_fun (*this, &Preferences::flatFieldChanged), true); //Cluts Dir - Gtk::Frame* clutsDirFrame = Gtk::manage (new Gtk::Frame (M("PREFERENCES_FILMSIMULATION")) ); + Gtk::Frame* clutsDirFrame = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_FILMSIMULATION")) ); Gtk::HBox* clutsDirBox = Gtk::manage (new Gtk::HBox ()); - clutsDir = Gtk::manage(new Gtk::FileChooserButton(M("PREFERENCES_CLUTSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); - Gtk::Label *clutsDirLabel = Gtk::manage(new Gtk::Label(M("PREFERENCES_CLUTSDIR") + ":")); - Gtk::Label* clutsRestartNeeded = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); - clutsDirBox->pack_start( *clutsDirLabel, Gtk::PACK_SHRINK, 4 ); - clutsDirBox->pack_start( *clutsDir ); - clutsDirBox->pack_start( *clutsRestartNeeded, Gtk::PACK_SHRINK, 4 ); - clutsDirBox->set_border_width( 4 ); - clutsDirFrame->add( *clutsDirBox ); - mvbpp->pack_start( *clutsDirFrame, Gtk::PACK_SHRINK, 4 ); + clutsDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_CLUTSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + Gtk::Label *clutsDirLabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_CLUTSDIR") + ":")); + Gtk::Label* clutsRestartNeeded = Gtk::manage ( new Gtk::Label (Glib::ustring (" (") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")") ); + clutsDirBox->pack_start (*clutsDirLabel, Gtk::PACK_SHRINK, 4 ); + clutsDirBox->pack_start (*clutsDir ); + clutsDirBox->pack_start (*clutsRestartNeeded, Gtk::PACK_SHRINK, 4 ); + clutsDirFrame->add (*clutsDirBox ); + mvbpp->pack_start (*clutsDirFrame, Gtk::PACK_SHRINK, 4 ); - Gtk::Frame* fmd = Gtk::manage (new Gtk::Frame (M("PREFERENCES_METADATA"))); + Gtk::Frame* fmd = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_METADATA"))); Gtk::VBox* vbmd = Gtk::manage (new Gtk::VBox ()); - ckbTunnelMetaData = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_TUNNELMETADATA"))); + ckbTunnelMetaData = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_TUNNELMETADATA"))); vbmd->pack_start (*ckbTunnelMetaData, Gtk::PACK_SHRINK, 4); fmd->add (*vbmd); mvbpp->pack_start (*fmd, Gtk::PACK_SHRINK, 4); @@ -535,41 +562,37 @@ Gtk::Widget* Preferences::getProcParamsPanel () Gtk::Widget* Preferences::getPerformancePanel () { - Gtk::VBox* mainContainer = Gtk::manage( new Gtk::VBox () ); - mainContainer->set_border_width (4); - mainContainer->set_spacing(4); + Gtk::VBox* mainContainer = Gtk::manage ( new Gtk::VBox () ); + mainContainer->set_spacing (4); - Gtk::Frame* fprevdemo = Gtk::manage (new Gtk::Frame (M("PREFERENCES_PREVDEMO"))); + Gtk::Frame* fprevdemo = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_PREVDEMO"))); Gtk::HBox* hbprevdemo = Gtk::manage (new Gtk::HBox (false, 4)); - Gtk::Label* lprevdemo = Gtk::manage (new Gtk::Label (M("PREFERENCES_PREVDEMO_LABEL"))); + Gtk::Label* lprevdemo = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PREVDEMO_LABEL"))); cprevdemo = Gtk::manage (new Gtk::ComboBoxText ()); - cprevdemo->append_text (M("PREFERENCES_PREVDEMO_FAST")); - cprevdemo->append_text (M("PREFERENCES_PREVDEMO_SIDECAR")); + cprevdemo->append (M ("PREFERENCES_PREVDEMO_FAST")); + cprevdemo->append (M ("PREFERENCES_PREVDEMO_SIDECAR")); cprevdemo->set_active (1); hbprevdemo->pack_start (*lprevdemo, Gtk::PACK_SHRINK); hbprevdemo->pack_start (*cprevdemo); fprevdemo->add (*hbprevdemo); - hbprevdemo->set_border_width(4); mainContainer->pack_start (*fprevdemo, Gtk::PACK_SHRINK, 4); - Gtk::Frame* ftiffserialize = Gtk::manage (new Gtk::Frame (M("PREFERENCES_SERIALIZE_TIFF_READ"))); + Gtk::Frame* ftiffserialize = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_SERIALIZE_TIFF_READ"))); Gtk::HBox* htiffserialize = Gtk::manage (new Gtk::HBox (false, 4)); - ctiffserialize = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SERIALIZE_TIFF_READ_LABEL")) ); - ctiffserialize->set_tooltip_text(M("PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP")); + ctiffserialize = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SERIALIZE_TIFF_READ_LABEL")) ); + ctiffserialize->set_tooltip_text (M ("PREFERENCES_SERIALIZE_TIFF_READ_TOOLTIP")); htiffserialize->pack_start (*ctiffserialize); ftiffserialize->add (*htiffserialize); - htiffserialize->set_border_width(4); mainContainer->pack_start (*ftiffserialize, Gtk::PACK_SHRINK, 4); - Gtk::Frame* fclut = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CLUTSCACHE")) ); - Gtk::HBox* clutCacheSizeHB = Gtk::manage( new Gtk::HBox () ); - clutCacheSizeHB->set_border_width(4); - clutCacheSizeHB->set_spacing(4); - Gtk::Label* CLUTLl = Gtk::manage( new Gtk::Label (M("PREFERENCES_CLUTSCACHE_LABEL") + ":", Gtk::ALIGN_LEFT)); - clutCacheSizeSB = Gtk::manage( new Gtk::SpinButton () ); + Gtk::Frame* fclut = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CLUTSCACHE")) ); + Gtk::HBox* clutCacheSizeHB = Gtk::manage ( new Gtk::HBox () ); + clutCacheSizeHB->set_spacing (4); + Gtk::Label* CLUTLl = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CLUTSCACHE_LABEL") + ":", Gtk::ALIGN_START)); + clutCacheSizeSB = Gtk::manage ( new Gtk::SpinButton () ); clutCacheSizeSB->set_digits (0); clutCacheSizeSB->set_increments (1, 5); - clutCacheSizeSB->set_max_length(2); // Will this be sufficient? :) + clutCacheSizeSB->set_max_length (2); // Will this be sufficient? :) #ifdef _OPENMP clutCacheSizeSB->set_range (1, 3 * omp_get_num_procs()); #else @@ -580,34 +603,32 @@ Gtk::Widget* Preferences::getPerformancePanel () fclut->add (*clutCacheSizeHB); mainContainer->pack_start (*fclut, Gtk::PACK_SHRINK, 4); - Gtk::Frame* finspect = Gtk::manage( new Gtk::Frame (M("PREFERENCES_INSPECT_LABEL")) ); - Gtk::HBox* maxIBuffersHB = Gtk::manage( new Gtk::HBox () ); - maxIBuffersHB->set_border_width(4); - maxIBuffersHB->set_spacing(4); - maxIBuffersHB->set_tooltip_text(M("PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP")); - Gtk::Label* maxIBufferLbl = Gtk::manage( new Gtk::Label (M("PREFERENCES_INSPECT_MAXBUFFERS_LABEL") + ":", Gtk::ALIGN_LEFT)); - maxInspectorBuffersSB = Gtk::manage( new Gtk::SpinButton () ); + Gtk::Frame* finspect = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_INSPECT_LABEL")) ); + Gtk::HBox* maxIBuffersHB = Gtk::manage ( new Gtk::HBox () ); + maxIBuffersHB->set_spacing (4); + maxIBuffersHB->set_tooltip_text (M ("PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP")); + Gtk::Label* maxIBufferLbl = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_INSPECT_MAXBUFFERS_LABEL") + ":", Gtk::ALIGN_START)); + maxInspectorBuffersSB = Gtk::manage ( new Gtk::SpinButton () ); maxInspectorBuffersSB->set_digits (0); maxInspectorBuffersSB->set_increments (1, 5); - maxInspectorBuffersSB->set_max_length(2); - maxInspectorBuffersSB->set_range (1, 12); // ... we have to set a limit, 12 seem to be enough even for systems with tons of RAM + maxInspectorBuffersSB->set_max_length (2); + maxInspectorBuffersSB->set_range (1, 12); // ... we have to set a limit, 12 seem to be enough even for systems with tons of RAM maxIBuffersHB->pack_start (*maxIBufferLbl, Gtk::PACK_SHRINK, 0); maxIBuffersHB->pack_end (*maxInspectorBuffersSB, Gtk::PACK_SHRINK, 0); - finspect->add(*maxIBuffersHB); - mainContainer->pack_start(*finspect, Gtk::PACK_SHRINK, 4); + finspect->add (*maxIBuffersHB); + mainContainer->pack_start (*finspect, Gtk::PACK_SHRINK, 4); - Gtk::Frame* fdenoise = Gtk::manage( new Gtk::Frame (M("PREFERENCES_NOISE")) ); - Gtk::VBox* vbdenoise = Gtk::manage( new Gtk::VBox (Gtk::PACK_SHRINK, 4) ); - vbdenoise->set_border_width (4); + Gtk::Frame* fdenoise = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_NOISE")) ); + Gtk::VBox* vbdenoise = Gtk::manage ( new Gtk::VBox (Gtk::PACK_SHRINK, 4) ); - Gtk::Label* lreloadneeded2 = Gtk::manage (new Gtk::Label (M("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_LEFT)); + Gtk::Label* lreloadneeded2 = Gtk::manage (new Gtk::Label (M ("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_START)); Gtk::HBox* threadLimitHB = Gtk::manage (new Gtk::HBox (Gtk::PACK_SHRINK, 4)); - threadLimitHB->set_tooltip_text(M("PREFERENCES_RGBDTL_TOOLTIP")); - Gtk::Label* RGBDTLl = Gtk::manage( new Gtk::Label (M("PREFERENCES_RGBDTL_LABEL") + ":", Gtk::ALIGN_LEFT)); - rgbDenoiseTreadLimitSB = Gtk::manage( new Gtk::SpinButton () ); + threadLimitHB->set_tooltip_text (M ("PREFERENCES_RGBDTL_TOOLTIP")); + Gtk::Label* RGBDTLl = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_RGBDTL_LABEL") + ":", Gtk::ALIGN_START)); + rgbDenoiseTreadLimitSB = Gtk::manage ( new Gtk::SpinButton () ); rgbDenoiseTreadLimitSB->set_digits (0); rgbDenoiseTreadLimitSB->set_increments (1, 5); - rgbDenoiseTreadLimitSB->set_max_length(2); // Will this be sufficient? :) + rgbDenoiseTreadLimitSB->set_max_length (2); // Will this be sufficient? :) #ifdef _OPENMP int maxThreadNumber = omp_get_max_threads(); #else @@ -617,40 +638,40 @@ Gtk::Widget* Preferences::getPerformancePanel () threadLimitHB->pack_start (*RGBDTLl, Gtk::PACK_SHRINK, 2); threadLimitHB->pack_end (*rgbDenoiseTreadLimitSB, Gtk::PACK_SHRINK, 2); - Gtk::Label* dnlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_LEVDN") + ":", Gtk::ALIGN_LEFT)); - Gtk::Label* dnautlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_LEVAUTDN") + ":", Gtk::ALIGN_LEFT)); - Gtk::Label* dnautsimpllab = Gtk::manage (new Gtk::Label (M("PREFERENCES_SIMPLAUT") + ":", Gtk::ALIGN_LEFT)); - Gtk::Label* dntilab = Gtk::manage (new Gtk::Label (M("PREFERENCES_TINB") + ":", Gtk::ALIGN_LEFT)); - Gtk::Label* dnwavlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_WAVLEV") + ":", Gtk::ALIGN_LEFT)); - Gtk::Label* dnlisslab = Gtk::manage (new Gtk::Label (M("PREFERENCES_LISS") + ":", Gtk::ALIGN_LEFT)); + Gtk::Label* dnlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_LEVDN") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnautlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_LEVAUTDN") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnautsimpllab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SIMPLAUT") + ":", Gtk::ALIGN_START)); + Gtk::Label* dntilab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_TINB") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnwavlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_WAVLEV") + ":", Gtk::ALIGN_START)); + Gtk::Label* dnlisslab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_LISS") + ":", Gtk::ALIGN_START)); dnv = Gtk::manage (new Gtk::ComboBoxText ()); - dnv->append_text (M("PREFERENCES_MIN")); - dnv->append_text (M("PREFERENCES_SMA")); - dnv->append_text (M("PREFERENCES_MED")); - dnv->append_text (M("PREFERENCES_MAX")); + dnv->append (M ("PREFERENCES_MIN")); + dnv->append (M ("PREFERENCES_SMA")); + dnv->append (M ("PREFERENCES_MED")); + dnv->append (M ("PREFERENCES_MAX")); dnaut = Gtk::manage (new Gtk::ComboBoxText ()); - dnaut->append_text (M("PREFERENCES_AUTLOW")); - dnaut->append_text (M("PREFERENCES_AUTSTD")); + dnaut->append (M ("PREFERENCES_AUTLOW")); + dnaut->append (M ("PREFERENCES_AUTSTD")); dnautsimpl = Gtk::manage (new Gtk::ComboBoxText ()); - dnautsimpl->append_text (M("PREFERENCES_STDAUT")); - dnautsimpl->append_text (M("PREFERENCES_EXPAUT")); + dnautsimpl->append (M ("PREFERENCES_STDAUT")); + dnautsimpl->append (M ("PREFERENCES_EXPAUT")); dnliss = Gtk::manage (new Gtk::ComboBoxText ()); - dnliss->append_text (M("PREFERENCES_AUTLISVLOW"));//very low - dnliss->append_text (M("PREFERENCES_AUTLISLOW"));//low - dnliss->append_text (M("PREFERENCES_AUTLISSTD"));//med - dnliss->append_text (M("PREFERENCES_AUTLISMAX"));//max + dnliss->append (M ("PREFERENCES_AUTLISVLOW")); //very low + dnliss->append (M ("PREFERENCES_AUTLISLOW")); //low + dnliss->append (M ("PREFERENCES_AUTLISSTD")); //med + dnliss->append (M ("PREFERENCES_AUTLISMAX")); //max dnti = Gtk::manage (new Gtk::ComboBoxText ()); - dnti->append_text (M("PREFERENCES_TISTD")); - dnti->append_text (M("PREFERENCES_TIMAX")); + dnti->append (M ("PREFERENCES_TISTD")); + dnti->append (M ("PREFERENCES_TIMAX")); dnwavlev = Gtk::manage (new Gtk::ComboBoxText ()); - dnwavlev->append_text (M("PREFERENCES_WLZER")); - dnwavlev->append_text (M("PREFERENCES_WLONE")); - dnwavlev->append_text (M("PREFERENCES_WLTWO")); + dnwavlev->append (M ("PREFERENCES_WLZER")); + dnwavlev->append (M ("PREFERENCES_WLONE")); + dnwavlev->append (M ("PREFERENCES_WLTWO")); Gtk::Table* colon = Gtk::manage (new Gtk::Table (6, 2)); colon->attach (*dnlab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); @@ -668,10 +689,10 @@ Gtk::Widget* Preferences::getPerformancePanel () vbdenoise->pack_start (*lreloadneeded2, Gtk::PACK_SHRINK); vbdenoise->pack_start (*colon, Gtk::PACK_SHRINK); - vbdenoise->pack_start(*threadLimitHB, Gtk::PACK_SHRINK); + vbdenoise->pack_start (*threadLimitHB, Gtk::PACK_SHRINK); // <--- To be hard-coded and removed once tested - cbdaubech = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_DAUB_LABEL"), Gtk::ALIGN_LEFT)); - cbdaubech->set_tooltip_markup (M("PREFERENCES_DAUB_TOOLTIP")); + cbdaubech = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_DAUB_LABEL"), Gtk::ALIGN_START)); + cbdaubech->set_tooltip_markup (M ("PREFERENCES_DAUB_TOOLTIP")); // vbdenoise->pack_start (*cbdaubech, Gtk::PACK_SHRINK); // ---> fdenoise->add (*vbdenoise); @@ -684,111 +705,208 @@ Gtk::Widget* Preferences::getColorManagementPanel () { Gtk::VBox* mvbcm = Gtk::manage (new Gtk::VBox ()); - mvbcm->set_border_width (4); + mvbcm->set_spacing (4); - iccDir = Gtk::manage (new Gtk::FileChooserButton (M("PREFERENCES_ICCDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); - Gtk::Label* pdlabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_ICCDIR") + ":", Gtk::ALIGN_LEFT)); + iccDir = Gtk::manage (new Gtk::FileChooserButton (M ("PREFERENCES_ICCDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); + setExpandAlignProperties (iccDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* pdlabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_ICCDIR") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (pdlabel, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); - monProfile = Gtk::manage (new Gtk::ComboBoxText ()); - Gtk::Label* mplabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONPROFILE") + ":", Gtk::ALIGN_LEFT)); + Gtk::Grid* iccdgrid = Gtk::manage (new Gtk::Grid ()); + setExpandAlignProperties (iccdgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + iccdgrid->set_column_spacing (4); - monIntent = Gtk::manage (new Gtk::ComboBoxText ()); - Gtk::Label* milabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONINTENT")+":", Gtk::ALIGN_LEFT)); - - monProfile->append_text (M("PREFERENCES_PROFILE_NONE")); - monProfile->set_active (0); - - const std::vector profiles = rtengine::ICCStore::getInstance ()->getProfiles (true); - for (std::vector::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) - monProfile->append_text (*profile); - - // same order as the enum - monIntent->append_text (M("PREFERENCES_INTENT_PERCEPTUAL")); - monIntent->append_text (M("PREFERENCES_INTENT_RELATIVE")); - monIntent->append_text (M("PREFERENCES_INTENT_ABSOLUTE")); - monIntent->set_active (1); - - monBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_MONBPC"))); - monBPC->set_active (true); + iccdgrid->attach (*pdlabel, 0, 0, 1, 1); + iccdgrid->attach (*iccDir, 1, 0, 1, 1); iccDir->signal_selection_changed ().connect (sigc::mem_fun (this, &Preferences::iccDirChanged)); -#if defined(WIN32) // Auto-detection not implemented for Linux, see issue 851 - cbAutoMonProfile = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_AUTOMONPROFILE"))); - autoMonProfileConn = cbAutoMonProfile->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::autoMonProfileToggled)); -#endif + mvbcm->pack_start (*iccdgrid, Gtk::PACK_SHRINK); + + //------------------------- MONITOR ---------------------- + + Gtk::Frame* fmonitor = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_MONITOR")) ); + Gtk::Grid* gmonitor = Gtk::manage ( new Gtk::Grid () ); + gmonitor->set_column_spacing (4); + + monProfile = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties (monProfile, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* mplabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_MONPROFILE") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (mplabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + + monIntent = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties (monIntent, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* milabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_MONINTENT") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (milabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + + monProfile->append (M ("PREFERENCES_PROFILE_NONE")); + monProfile->set_active (0); + + const std::vector profiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::MONITOR); + + for (const auto profile : profiles) { + if (profile.find ("file:") != 0) { + monProfile->append (profile); + } + } + + // same order as the enum + monIntent->append (M ("PREFERENCES_INTENT_PERCEPTUAL")); + monIntent->append (M ("PREFERENCES_INTENT_RELATIVE")); + monIntent->append (M ("PREFERENCES_INTENT_ABSOLUTE")); + monIntent->set_active (1); + monIntent->set_size_request (120, -1); + + monBPC = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_CMMBPC"))); + setExpandAlignProperties (monBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + monBPC->set_active (true); + +//#if defined(WIN32) // Auto-detection not implemented for Linux, see issue 851 + cbAutoMonProfile = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_AUTOMONPROFILE"))); + setExpandAlignProperties (cbAutoMonProfile, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + autoMonProfileConn = cbAutoMonProfile->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::autoMonProfileToggled)); +//#endif - Gtk::Table* colt = Gtk::manage (new Gtk::Table (3, 2)); int row = 0; - colt->attach (*pdlabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colt->attach (*iccDir, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); -#if !defined(__APPLE__) // monitor profile not supported on apple - ++row; - colt->attach (*mplabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colt->attach (*monProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); -#if defined(WIN32) - ++row; - colt->attach (*cbAutoMonProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); -#endif + gmonitor->attach (*mplabel, 0, row, 1, 1); +#if defined(__APPLE__) // monitor profile not supported on apple + Gtk::Label *osxwarn = Gtk::manage (new Gtk::Label (M ("PREFERENCES_MONPROFILE_WARNOSX"), Gtk::ALIGN_START)); + setExpandAlignProperties (osxwarn, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + gmonitor->attach (*osxwarn, 1, row, 1, 1); +#else + gmonitor->attach (*monProfile, 1, row, 1, 1); #endif ++row; - colt->attach (*milabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colt->attach (*monIntent, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); - mvbcm->pack_start (*colt, Gtk::PACK_SHRINK, 4); +//#if defined(WIN32) + gmonitor->attach (*cbAutoMonProfile, 1, row, 1, 1); + ++row; +//#endif + gmonitor->attach (*milabel, 0, row, 1, 1); + gmonitor->attach (*monIntent, 1, row, 1, 1); + ++row; + gmonitor->attach (*monBPC, 0, row, 2, 1); - mvbcm->pack_start (*monBPC, Gtk::PACK_SHRINK, 4); - -#if defined(WIN32) +//#if defined(WIN32) autoMonProfileToggled(); -#endif +//#endif - Gtk::VBox* vbdp = Gtk::manage (new Gtk::VBox ()); - vbdp->set_border_width (4); - Gtk::Label* viewlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_VIEW") + ":", Gtk::ALIGN_LEFT)); + fmonitor->add (*gmonitor); - view = Gtk::manage (new Gtk::ComboBoxText ()); - view->append_text (M("PREFERENCES_D50")); - view->append_text (M("PREFERENCES_D55")); - view->append_text (M("PREFERENCES_D60")); - view->append_text (M("PREFERENCES_D65")); - view->append_text (M("PREFERENCES_BLACKBODY")); - view->append_text (M("PREFERENCES_FLUOF2")); - view->append_text (M("PREFERENCES_FLUOF7")); - view->append_text (M("PREFERENCES_FLUOF11")); + mvbcm->pack_start (*fmonitor, Gtk::PACK_SHRINK); - Gtk::Label* greylab = Gtk::manage (new Gtk::Label (M("PREFERENCES_GREY") + ":", Gtk::ALIGN_LEFT)); - grey = Gtk::manage (new Gtk::ComboBoxText ()); - grey->append_text (M("PREFERENCES_GREY05")); - grey->append_text (M("PREFERENCES_GREY10")); - grey->append_text (M("PREFERENCES_GREY15")); - grey->append_text (M("PREFERENCES_GREY18")); - grey->append_text (M("PREFERENCES_GREY23")); - grey->append_text (M("PREFERENCES_GREY30")); - grey->append_text (M("PREFERENCES_GREY40")); + //------------------------- PRINTER ---------------------- - Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_LEFT)); + Gtk::Frame* fprinter = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_PRINTER")) ); + Gtk::Grid* gprinter = Gtk::manage ( new Gtk::Grid () ); + gprinter->set_column_spacing (4); + prtProfile = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties (prtProfile, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* pplabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PRTPROFILE") + ":")); + setExpandAlignProperties (pplabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + + prtIntent = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties (prtIntent, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + Gtk::Label* pilabel = Gtk::manage (new Gtk::Label (M ("PREFERENCES_PRTINTENT") + ":")); + setExpandAlignProperties (pilabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + + prtProfile->append (M ("PREFERENCES_PROFILE_NONE")); + prtProfile->set_active (0); + + const std::vector prtprofiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::PRINTER); + + for (const auto prtprofile : prtprofiles) { + prtProfile->append (prtprofile); + } + + // same order as the enum + prtIntent->append (M ("PREFERENCES_INTENT_PERCEPTUAL")); + prtIntent->append (M ("PREFERENCES_INTENT_RELATIVE")); + prtIntent->append (M ("PREFERENCES_INTENT_ABSOLUTE")); + prtIntent->set_active (1); + + prtBPC = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_CMMBPC"))); + setExpandAlignProperties (prtBPC, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + prtBPC->set_active (true); + + row = 0; + gprinter->attach (*pplabel, 0, row, 1, 1); + gprinter->attach (*prtProfile, 1, row, 1, 1); + ++row; + gprinter->attach (*pilabel, 0, row, 1, 1); + gprinter->attach (*prtIntent, 1, row, 1, 1); + ++row; + gprinter->attach (*prtBPC, 0, row, 2, 1); + +//#if defined(WIN32) + autoMonProfileToggled(); +//#endif + + fprinter->add (*gprinter); + + mvbcm->pack_start (*fprinter, Gtk::PACK_SHRINK); + + //------------------------- CIECAM ---------------------- + + /* + Gtk::Label* viewlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_VIEW") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (viewlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + + view = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties (view, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + view->append (M("PREFERENCES_D50_MENU")); + + view->append (M ("PREFERENCES_D50")); + view->append (M("PREFERENCES_D55")); + view->append (M("PREFERENCES_D60")); + view->append (M("PREFERENCES_D65")); + view->append (M("PREFERENCES_BLACKBODY")); + view->append (M("PREFERENCES_FLUOF2")); + view->append (M("PREFERENCES_FLUOF7")); + view->append (M("PREFERENCES_FLUOF11")); + + Gtk::Label* greylab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_GREY") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (greylab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + grey = Gtk::manage (new Gtk::ComboBoxText ()); + setExpandAlignProperties (grey, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + grey->append (M("PREFERENCES_GREY05")); + grey->append (M("PREFERENCES_GREY10")); + grey->append (M("PREFERENCES_GREY15")); + grey->append (M ("PREFERENCES_GREY18")); + grey->append (M("PREFERENCES_GREY18_MENU")); + + grey->append (M("PREFERENCES_GREY23")); + grey->append (M("PREFERENCES_GREY30")); + grey->append (M("PREFERENCES_GREY40")); + */ +/* + Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (greySclab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); greySc = Gtk::manage (new Gtk::ComboBoxText ()); - greySc->append_text (M("PREFERENCES_GREYSCA")); - greySc->append_text (M("PREFERENCES_GREYSC18")); + setExpandAlignProperties (greySc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + greySc->append (M ("PREFERENCES_GREYSCA")); + greySc->append (M ("PREFERENCES_GREYSC18")); +*/ + Gtk::Frame* fcielab = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CIEART_FRAME")) ); + setExpandAlignProperties (fcielab, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - Gtk::Frame* fcielab = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CIEART_FRAME")) ); - Gtk::VBox* vbcielab = Gtk::manage( new Gtk::VBox () ); - vbcielab->set_border_width (4); - - Gtk::Label* lreloadneeded1 = Gtk::manage (new Gtk::Label (M("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_LEFT)); - Gtk::Table* colo = Gtk::manage (new Gtk::Table (4, 2)); - colo->attach (*viewlab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2); - colo->attach (*view, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); - colo->attach (*greylab, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2); - colo->attach (*grey, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); - colo->attach (*greySclab, 0, 1, 2, 3, Gtk::FILL, Gtk::SHRINK, 2, 2); - colo->attach (*greySc, 1, 2, 2, 3, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); - cbciecamfloat = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CIEART_LABEL"))); - colo->attach (*cbciecamfloat, 0, 1, 3, 4, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2); - cbciecamfloat->set_tooltip_markup (M("PREFERENCES_CIEART_TOOLTIP")); - vbcielab->pack_start (*lreloadneeded1, Gtk::PACK_SHRINK, 4); - vbcielab->pack_start (*colo, Gtk::PACK_EXPAND_WIDGET, 4); - fcielab->add (*vbcielab); + Gtk::Grid* colo = Gtk::manage (new Gtk::Grid ()); + setExpandAlignProperties (colo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Label* lreloadneeded1 = Gtk::manage (new Gtk::Label (M ("PREFERENCES_IMG_RELOAD_NEEDED"), Gtk::ALIGN_START)); + setExpandAlignProperties (lreloadneeded1, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + colo->attach (*lreloadneeded1, 0, 0, 2, 1); + /* + colo->attach (*viewlab, 0, 1, 1, 1); + colo->attach (*view, 1, 1, 1, 1); + colo->attach (*greylab, 0, 2, 1, 1); + colo->attach (*grey, 1, 2, 1, 1); + */ +// colo->attach (*greySclab, 0, 3, 1, 1); +// colo->attach (*greySc, 1, 3, 1, 1); + cbciecamfloat = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_CIEART_LABEL"))); + setExpandAlignProperties (cbciecamfloat, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + colo->attach (*cbciecamfloat, 0, 4, 2, 1); + cbciecamfloat->set_tooltip_markup (M ("PREFERENCES_CIEART_TOOLTIP")); + fcielab->add (*colo); mvbcm->pack_start (*fcielab, Gtk::PACK_SHRINK, 4); @@ -798,289 +916,316 @@ Gtk::Widget* Preferences::getColorManagementPanel () Gtk::Widget* Preferences::getGeneralPanel () { - Gtk::VBox* mvbsd = Gtk::manage( new Gtk::VBox () ); + Gtk::Grid* mvbsd = Gtk::manage ( new Gtk::Grid () ); + mvbsd->set_column_spacing (4); + mvbsd->set_row_spacing (4); - Gtk::Frame* fworklflow = Gtk::manage (new Gtk::Frame (M("PREFERENCES_WORKFLOW"))); - Gtk::VBox* vbworkflow = Gtk::manage (new Gtk::VBox (false, 4)); - vbworkflow->set_border_width (4); + Gtk::Frame* fworklflow = Gtk::manage (new Gtk::Frame (M ("PREFERENCES_WORKFLOW"))); + setExpandAlignProperties (fworklflow, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + Gtk::Grid* workflowGrid = Gtk::manage (new Gtk::Grid()); + workflowGrid->set_column_spacing (4); + workflowGrid->set_row_spacing (4); + setExpandAlignProperties (workflowGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::HBox* hbworkflow = Gtk::manage (new Gtk::HBox (false, 4)); - Gtk::Label* flayoutlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_EDITORLAYOUT") + ":")); + Gtk::Label* flayoutlab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_EDITORLAYOUT") + ":")); + setExpandAlignProperties (flayoutlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); editorLayout = Gtk::manage (new Gtk::ComboBoxText ()); - editorLayout->append_text (M("PREFERENCES_SINGLETAB")); - editorLayout->append_text (M("PREFERENCES_SINGLETABVERTAB")); - editorLayout->append_text (M("PREFERENCES_MULTITAB")); - editorLayout->append_text (M("PREFERENCES_MULTITABDUALMON")); + setExpandAlignProperties (editorLayout, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + editorLayout->append (M ("PREFERENCES_SINGLETAB")); + editorLayout->append (M ("PREFERENCES_SINGLETABVERTAB")); + editorLayout->append (M ("PREFERENCES_MULTITAB")); + editorLayout->append (M ("PREFERENCES_MULTITABDUALMON")); editorLayout->set_active (2); - editorLayout->signal_changed().connect (sigc::mem_fun(*this, &Preferences::layoutComboChanged)); + Gtk::CellRendererText* cellRenderer = dynamic_cast (editorLayout->get_first_cell()); + cellRenderer->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE; + cellRenderer->property_ellipsize_set() = true; + editorLayout->signal_changed().connect (sigc::mem_fun (*this, &Preferences::layoutComboChanged)); layoutComboChanged(); // update the tooltip - hbworkflow->pack_start (*flayoutlab, Gtk::PACK_SHRINK); - hbworkflow->pack_start (*editorLayout); - Gtk::Label* lNextStart = Gtk::manage( new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); - hbworkflow->pack_end (*lNextStart, Gtk::PACK_SHRINK); - vbworkflow->pack_start (*hbworkflow, Gtk::PACK_SHRINK); + Gtk::Label* lNextStart = Gtk::manage ( new Gtk::Label (Glib::ustring ("(") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")") ); + setExpandAlignProperties (lNextStart, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to (*flayoutlab, Gtk::POS_LEFT, 1, 1); + workflowGrid->attach_next_to (*editorLayout, *flayoutlab, Gtk::POS_RIGHT, 1, 1); + workflowGrid->attach_next_to (*lNextStart, *editorLayout, Gtk::POS_RIGHT, 1, 1); - Gtk::HBox* curveBBoxPosHB = Gtk::manage (new Gtk::HBox (false, 4)); - Gtk::Label* curveBBoxPosL = Gtk::manage (new Gtk::Label (M("PREFERENCES_CURVEBBOXPOS") + ":")); - Gtk::Label* curveBBoxPosRestartL = Gtk::manage (new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")")); + Gtk::Label* curveBBoxPosL = Gtk::manage (new Gtk::Label (M ("PREFERENCES_CURVEBBOXPOS") + ":")); + setExpandAlignProperties (curveBBoxPosL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); curveBBoxPosC = Gtk::manage (new Gtk::ComboBoxText ()); - curveBBoxPosC->append_text (M("PREFERENCES_CURVEBBOXPOS_ABOVE")); - curveBBoxPosC->append_text (M("PREFERENCES_CURVEBBOXPOS_RIGHT")); - curveBBoxPosC->append_text (M("PREFERENCES_CURVEBBOXPOS_BELOW")); - curveBBoxPosC->append_text (M("PREFERENCES_CURVEBBOXPOS_LEFT")); + setExpandAlignProperties (curveBBoxPosC, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + curveBBoxPosC->append (M ("PREFERENCES_CURVEBBOXPOS_ABOVE")); + curveBBoxPosC->append (M ("PREFERENCES_CURVEBBOXPOS_RIGHT")); + curveBBoxPosC->append (M ("PREFERENCES_CURVEBBOXPOS_BELOW")); + curveBBoxPosC->append (M ("PREFERENCES_CURVEBBOXPOS_LEFT")); curveBBoxPosC->set_active (1); - curveBBoxPosHB->pack_start (*curveBBoxPosL, Gtk::PACK_SHRINK); - curveBBoxPosHB->pack_start (*curveBBoxPosC); - curveBBoxPosHB->pack_start (*curveBBoxPosRestartL, Gtk::PACK_SHRINK); - vbworkflow->pack_start (*curveBBoxPosHB, Gtk::PACK_SHRINK); + Gtk::Label* curveBBoxPosRestartL = Gtk::manage (new Gtk::Label (Glib::ustring ("(") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")")); + setExpandAlignProperties (curveBBoxPosRestartL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to (*curveBBoxPosL, *flayoutlab, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*curveBBoxPosC, *editorLayout, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*curveBBoxPosRestartL, *lNextStart, Gtk::POS_BOTTOM, 1, 1); - Gtk::HBox* hbworkflow2 = Gtk::manage( new Gtk::HBox () ); - ckbHistogramPositionLeft = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_HISTOGRAMPOSITIONLEFT")) ); - hbworkflow2->pack_start (*ckbHistogramPositionLeft); - ckbHistogramWorking = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_HISTOGRAMWORKING")) ); - ckbHistogramWorking->set_tooltip_markup (M("PREFERENCES_HISTOGRAM_TOOLTIP")); - hbworkflow2->pack_start (*ckbHistogramWorking); - vbworkflow->pack_start (*hbworkflow2, Gtk::PACK_SHRINK); + ckbHistogramPositionLeft = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_HISTOGRAMPOSITIONLEFT")) ); + setExpandAlignProperties (ckbHistogramPositionLeft, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbHistogramWorking = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_HISTOGRAMWORKING")) ); + setExpandAlignProperties (ckbHistogramWorking, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbHistogramWorking->set_tooltip_markup (M ("PREFERENCES_HISTOGRAM_TOOLTIP")); + workflowGrid->attach_next_to (*ckbHistogramPositionLeft, *curveBBoxPosL, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*ckbHistogramWorking, *curveBBoxPosC, Gtk::POS_BOTTOM, 2, 1); - Gtk::HBox* hbworkflow3 = Gtk::manage( new Gtk::HBox () ); - ckbFileBrowserToolbarSingleRow = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")) ); - ckbShowFilmStripToolBar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWFILMSTRIPTOOLBAR")) ); - hbworkflow3->pack_start (*ckbFileBrowserToolbarSingleRow); - hbworkflow3->pack_start (*ckbShowFilmStripToolBar); - vbworkflow->pack_start (*hbworkflow3, Gtk::PACK_SHRINK); + ckbFileBrowserToolbarSingleRow = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")) ); + setExpandAlignProperties (ckbFileBrowserToolbarSingleRow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); + ckbShowFilmStripToolBar = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWFILMSTRIPTOOLBAR")) ); + setExpandAlignProperties (ckbShowFilmStripToolBar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_START); + workflowGrid->attach_next_to (*ckbFileBrowserToolbarSingleRow, *ckbHistogramPositionLeft, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*ckbShowFilmStripToolBar, *ckbHistogramWorking, Gtk::POS_BOTTOM, 2, 1); - Gtk::HBox* hbworkflow4 = Gtk::manage( new Gtk::HBox (false, 4) ); - Gtk::Label* hb4label = Gtk::manage( new Gtk::Label (M("PREFERENCES_TP_LABEL")) ); - hbworkflow4->pack_start (*hb4label, Gtk::PACK_SHRINK); - ckbHideTPVScrollbar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_VSCROLLBAR")) ); - hbworkflow4->pack_start (*ckbHideTPVScrollbar, Gtk::PACK_SHRINK); - ckbUseIconNoText = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_USEICONORTEXT")) ); - hbworkflow4->pack_start (*ckbUseIconNoText, Gtk::PACK_SHRINK); - vbworkflow->pack_start (*hbworkflow4, Gtk::PACK_SHRINK); + Gtk::Label* hb4label = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_TP_LABEL")) ); + setExpandAlignProperties (hb4label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbHideTPVScrollbar = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_TP_VSCROLLBAR")) ); + setExpandAlignProperties (ckbHideTPVScrollbar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + ckbUseIconNoText = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_TP_USEICONORTEXT")) ); + setExpandAlignProperties (ckbUseIconNoText, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + workflowGrid->attach_next_to (*hb4label, *ckbFileBrowserToolbarSingleRow, Gtk::POS_BOTTOM, 1, 1); + workflowGrid->attach_next_to (*ckbHideTPVScrollbar, *hb4label, Gtk::POS_RIGHT, 1, 1); + workflowGrid->attach_next_to (*ckbUseIconNoText, *ckbHideTPVScrollbar, Gtk::POS_RIGHT, 1, 1); - fworklflow->add (*vbworkflow); - mvbsd->pack_start (*fworklflow, Gtk::PACK_SHRINK); + fworklflow->add (*workflowGrid); + mvbsd->attach_next_to (*fworklflow, Gtk::POS_TOP, 2, 1); - Gtk::Frame* flang = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DEFAULTLANG")) ); - Gtk::HBox* hblang = Gtk::manage( new Gtk::HBox () ); - hblang->set_border_width (4); + // --------------------------------------------- - ckbLangAutoDetect = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_LANGAUTODETECT")) ); + Gtk::Frame* flang = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_LANG")) ); + setExpandAlignProperties (flang, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + Gtk::Grid* langGrid = Gtk::manage ( new Gtk::Grid() ); + langGrid->set_column_spacing (4); + langGrid->set_row_spacing (4); + setExpandAlignProperties (langGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); - Gtk::Label* langlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTLANG") + ":") ); - languages = Gtk::manage( new Gtk::ComboBoxText () ); + ckbLangAutoDetect = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_LANGAUTODETECT")) ); + setExpandAlignProperties (ckbLangAutoDetect, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + + Gtk::Label* langlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SELECTLANG") + ":") ); + setExpandAlignProperties (langlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + languages = Gtk::manage ( new Gtk::ComboBoxText () ); + setExpandAlignProperties (languages, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); std::vector langs; parseDir (argv0 + "/languages", langs, ""); for (size_t i = 0; i < langs.size(); i++) { if ("default" != langs[i] && "README" != langs[i] && "LICENSE" != langs[i]) { - languages->append_text (langs[i]); + languages->append (langs[i]); } } - Gtk::Label* langw = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); - hblang->pack_start (*ckbLangAutoDetect, Gtk::PACK_SHRINK, 4); - hblang->pack_start (*langlab, Gtk::PACK_SHRINK, 8); - hblang->pack_start (*languages); - hblang->pack_end (*langw, Gtk::PACK_SHRINK, 4); - flang->add (*hblang); - mvbsd->pack_start (*flang, Gtk::PACK_SHRINK, 4); + Gtk::Label* langw = Gtk::manage ( new Gtk::Label (Glib::ustring (" (") + M ("PREFERENCES_APPLNEXTSTARTUP") + ")") ); + setExpandAlignProperties (langw, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + langGrid->attach_next_to (*ckbLangAutoDetect, Gtk::POS_LEFT, 3, 1); + langGrid->attach_next_to (*langlab, *ckbLangAutoDetect, Gtk::POS_BOTTOM, 1, 1); + langGrid->attach_next_to (*languages, *langlab, Gtk::POS_RIGHT, 1, 1); + langGrid->attach_next_to (*langw, *languages, Gtk::POS_RIGHT, 1, 1); + flang->add (*langGrid); + mvbsd->attach_next_to (*flang, *fworklflow, Gtk::POS_BOTTOM, 2, 1); - langAutoDetectConn = ckbLangAutoDetect->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::langAutoDetectToggled)); + // --------------------------------------------- - Gtk::Frame* ftheme = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DEFAULTTHEME")) ); - Gtk::VBox* vbftheme = Gtk::manage( new Gtk::VBox () ); - vbftheme->set_border_width(4); - vbftheme->set_spacing(4); - Gtk::HBox* hbUseSystemTheme = Gtk::manage( new Gtk::HBox () ); - hbUseSystemTheme->set_spacing(4); - chUseSystemTheme = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_USESYSTEMTHEME")) ); - Gtk::Label* useNextStart = Gtk::manage( new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") ); + Gtk::Frame* ftheme = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_THEME")) ); + setExpandAlignProperties (ftheme, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + Gtk::Grid* themeGrid = Gtk::manage ( new Gtk::Grid() ); + themeGrid->set_column_spacing (4); + themeGrid->set_row_spacing (4); + setExpandAlignProperties (themeGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::Label* cutOverlayLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUTOVERLAYBRUSH") + ":") ); - butCropCol = Gtk::manage( new Gtk::ColorButton() ); - butCropCol->set_use_alpha(true); - - Gtk::Label* navGuideLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_NAVGUIDEBRUSH") + ":") ); - butNavGuideCol = Gtk::manage( new Gtk::ColorButton() ); - butNavGuideCol->set_use_alpha(true); - - slimUI = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SLIMUI")) ); - hbUseSystemTheme->pack_start(*chUseSystemTheme, Gtk::PACK_SHRINK); - hbUseSystemTheme->pack_start (*useNextStart, Gtk::PACK_SHRINK, 0); - hbUseSystemTheme->pack_end(*slimUI, Gtk::PACK_SHRINK, 0); - vbftheme->pack_start(*hbUseSystemTheme, Gtk::PACK_SHRINK, 0); - - - hbtheme = Gtk::manage( new Gtk::HBox () ); - hbtheme->set_spacing (4); - Gtk::Label* themelab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTTHEME") + ":") ); - theme = Gtk::manage( new Gtk::ComboBoxText () ); + Gtk::Label* themelab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SELECTTHEME") + ":") ); + setExpandAlignProperties (themelab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + theme = Gtk::manage ( new Gtk::ComboBoxText () ); + setExpandAlignProperties (theme, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); theme->set_active (0); - std::vector themes; - parseDir (argv0 + "/themes", themes, ".gtkrc"); + parseThemeDir (Glib::build_filename (argv0, "themes")); - for (size_t i = 0; i < themes.size(); i++) { - theme->append_text (themes[i]); + for (size_t i = 0; i < themeFNames.size(); i++) { + theme->append (themeFNames.at (i).shortFName); } - Gtk::Label* fontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT") + ":") ); - fontbutton = Gtk::manage( new Gtk::FontButton ()); - fontbutton->set_use_size(true); - fontbutton->set_font_name(options.font); + themeGrid->attach_next_to (*themelab, Gtk::POS_LEFT, 1, 1); + themeGrid->attach_next_to (*theme, *themelab, Gtk::POS_RIGHT, 1, 1); - hbtheme->pack_start (*themelab, Gtk::PACK_SHRINK, 0); - hbtheme->pack_start (*theme); - hbtheme->pack_start (*fontlab, Gtk::PACK_SHRINK, 0); - hbtheme->pack_start (*fontbutton); - vbftheme->pack_start(*hbtheme, Gtk::PACK_SHRINK, 0); + Gtk::Label* fontlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SELECTFONT")) ); + setExpandAlignProperties (fontlab, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + fontButton = Gtk::manage ( new Gtk::FontButton ()); + setExpandAlignProperties (fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + fontButton->set_use_size (true); - Gtk::Label* cpfontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT_COLPICKER") + ":", Gtk::ALIGN_RIGHT) ); - colorPickerFontButton = Gtk::manage( new Gtk::FontButton ()); - colorPickerFontButton->set_use_size(true); - colorPickerFontButton->set_font_name(options.colorPickerFont); + if (options.fontFamily == "default") { + fontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize)); + } else { + fontButton->set_font_name (Glib::ustring::compose ("%1 %2", options.fontFamily, options.fontSize)); + } - Gtk::HBox* hbcolorchooser = Gtk::manage( new Gtk::HBox () ); - hbcolorchooser->set_spacing(4); + themeGrid->attach_next_to (*fontlab, *theme, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to (*fontButton, *fontlab, Gtk::POS_RIGHT, 1, 1); - hbcolorchooser->pack_start (*cutOverlayLabel, Gtk::PACK_SHRINK, 0); - hbcolorchooser->pack_start (*butCropCol, Gtk::PACK_SHRINK, 0); - hbcolorchooser->pack_start (*navGuideLabel, Gtk::PACK_SHRINK, 0); - hbcolorchooser->pack_start (*butNavGuideCol, Gtk::PACK_SHRINK, 0); - hbcolorchooser->pack_start (*cpfontlab, Gtk::PACK_EXPAND_WIDGET, 0); - hbcolorchooser->pack_start (*colorPickerFontButton, Gtk::PACK_EXPAND_WIDGET, 0); - vbftheme->pack_start(*hbcolorchooser, Gtk::PACK_SHRINK, 0); + Gtk::Label* cpfontlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SELECTFONT_COLPICKER") + ":") ); + setExpandAlignProperties (cpfontlab, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + colorPickerFontButton = Gtk::manage ( new Gtk::FontButton ()); + setExpandAlignProperties (fontButton, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + colorPickerFontButton->set_use_size (true); + if (options.fontFamily == "default") { + colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize)); + } else { + colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", options.CPFontFamily, options.CPFontSize)); + } - ftheme->add (*vbftheme); - mvbsd->pack_start (*ftheme, Gtk::PACK_SHRINK, 0); + themeGrid->attach_next_to (*cpfontlab, *fontButton, Gtk::POS_RIGHT, 1, 1); + themeGrid->attach_next_to (*colorPickerFontButton, *cpfontlab, Gtk::POS_RIGHT, 1, 1); -//----- + Gtk::Label* cutOverlayLabel = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CUTOVERLAYBRUSH") + ":") ); + setExpandAlignProperties (cutOverlayLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + butCropCol = Gtk::manage ( new Gtk::ColorButton() ); + setExpandAlignProperties (butCropCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + butCropCol->set_use_alpha (true); + themeGrid->attach_next_to (*cutOverlayLabel, *themelab, Gtk::POS_BOTTOM, 1, 1); + themeGrid->attach_next_to (*butCropCol, *cutOverlayLabel, Gtk::POS_RIGHT, 1, 1); - Gtk::HBox* hbcd = Gtk::manage( new Gtk::HBox (true) ); - hbcd->set_spacing(4); + Gtk::Label* navGuideLabel = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_NAVGUIDEBRUSH") + ":") ); + setExpandAlignProperties (navGuideLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + butNavGuideCol = Gtk::manage ( new Gtk::ColorButton() ); + setExpandAlignProperties (butNavGuideCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + butNavGuideCol->set_use_alpha (true); + themeGrid->attach_next_to (*navGuideLabel, *butCropCol, Gtk::POS_RIGHT, 2, 1); + themeGrid->attach_next_to (*butNavGuideCol, *navGuideLabel, Gtk::POS_RIGHT, 1, 1); - Gtk::Frame* frl = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CLIPPINGIND"))); - Gtk::VBox* vbrl = Gtk::manage( new Gtk::VBox () ); - vbrl->set_border_width(4); - vbrl->set_spacing (4); + ftheme->add (*themeGrid); + mvbsd->attach_next_to (*ftheme, *flang, Gtk::POS_BOTTOM, 2, 1); - Gtk::HBox* vbhl = Gtk::manage( new Gtk::HBox () ); - vbhl->set_spacing(4); - Gtk::Label* hll = Gtk::manage( new Gtk::Label (M("PREFERENCES_HLTHRESHOLD") + ": ")); - hlThresh = Gtk::manage( new Gtk::SpinButton () ); + // --------------------------------------------- + + Gtk::Frame* fclip = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CLIPPINGIND"))); + setExpandAlignProperties (fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Grid* clipGrid = Gtk::manage ( new Gtk::Grid() ); + clipGrid->set_column_spacing (4); + clipGrid->set_row_spacing (4); + setExpandAlignProperties (clipGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + + Gtk::Label* hll = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_HLTHRESHOLD") + ": ")); + setExpandAlignProperties (hll, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + hlThresh = Gtk::manage ( new Gtk::SpinButton () ); + setExpandAlignProperties (hlThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); hlThresh->set_digits (0); hlThresh->set_increments (1, 10); hlThresh->set_range (0, 255); - vbhl->pack_start (*hll, Gtk::PACK_SHRINK, 0); - vbhl->pack_end (*hlThresh, Gtk::PACK_SHRINK, 0); + clipGrid->attach_next_to (*hll, Gtk::POS_LEFT, 1, 1); + clipGrid->attach_next_to (*hlThresh, *hll, Gtk::POS_RIGHT, 1, 1); - vbrl->pack_start (*vbhl, Gtk::PACK_SHRINK, 0); - - Gtk::HBox* vbsh = Gtk::manage( new Gtk::HBox () ); - vbsh->set_spacing (4); - Gtk::Label* shl = Gtk::manage( new Gtk::Label (M("PREFERENCES_SHTHRESHOLD") + ": ") ); - shThresh = Gtk::manage( new Gtk::SpinButton () ); + Gtk::Label* shl = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_SHTHRESHOLD") + ": ") ); + setExpandAlignProperties (shl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + shThresh = Gtk::manage ( new Gtk::SpinButton () ); + setExpandAlignProperties (shThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE); shThresh->show (); shThresh->set_digits (0); shThresh->set_increments (1, 10); shThresh->set_range (0, 255); - vbsh->pack_start (*shl, Gtk::PACK_SHRINK, 0); - vbsh->pack_end (*shThresh, Gtk::PACK_SHRINK, 0); - vbrl->pack_start (*vbsh, Gtk::PACK_SHRINK, 0); + clipGrid->attach_next_to (*shl, *hll, Gtk::POS_BOTTOM, 1, 1); + clipGrid->attach_next_to (*shThresh, *shl, Gtk::POS_RIGHT, 1, 1); - frl->add (*vbrl); - hbcd->pack_start (*frl, true, true, 0); + fclip->add (*clipGrid); + mvbsd->attach_next_to (*fclip, *ftheme, Gtk::POS_BOTTOM, 1, 1); - //--- + // --------------------------------------------- - Gtk::Frame* navigationFrame = Gtk::manage( new Gtk::Frame (M("PREFERENCES_NAVIGATIONFRAME")) ); - Gtk::VBox* navigationVBox = Gtk::manage( new Gtk::VBox () ); - navigationVBox->set_border_width(4); + Gtk::Frame* fnav = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_NAVIGATIONFRAME")) ); + setExpandAlignProperties (fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Grid* navigationGrid = Gtk::manage ( new Gtk::Grid() ); + navigationGrid->set_column_spacing (4); + navigationGrid->set_row_spacing (4); + setExpandAlignProperties (fclip, false, false, Gtk::ALIGN_START, Gtk::ALIGN_FILL); - Gtk::HBox* panFactorHBox = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* panFactorLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_PANFACTORLABEL") + ":", Gtk::ALIGN_LEFT)); - panFactor = Gtk::manage( new Gtk::SpinButton () ); + Gtk::Label* panFactorLabel = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_PANFACTORLABEL") + ":", Gtk::ALIGN_START)); + setExpandAlignProperties (panFactorLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + panFactor = Gtk::manage ( new Gtk::SpinButton () ); + setExpandAlignProperties (panFactor, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); panFactor->set_digits (0); panFactor->set_increments (1, 5); panFactor->set_range (1, 10); - panFactorHBox->pack_start (*panFactorLabel); - panFactorHBox->pack_end (*panFactor, Gtk::PACK_SHRINK); + navigationGrid->attach_next_to (*panFactorLabel, Gtk::POS_LEFT, 1, 1); + navigationGrid->attach_next_to (*panFactor, *panFactorLabel, Gtk::POS_RIGHT, 1, 1); - rememberZoomPanCheckbutton = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_REMEMBERZOOMPAN")) ); - rememberZoomPanCheckbutton->set_tooltip_text(M("PREFERENCES_REMEMBERZOOMPAN_TOOLTIP")); + rememberZoomPanCheckbutton = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_REMEMBERZOOMPAN")) ); + setExpandAlignProperties (rememberZoomPanCheckbutton, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + rememberZoomPanCheckbutton->set_tooltip_text (M ("PREFERENCES_REMEMBERZOOMPAN_TOOLTIP")); - navigationVBox->pack_start (*panFactorHBox, Gtk::PACK_SHRINK); - navigationVBox->pack_start (*rememberZoomPanCheckbutton, Gtk::PACK_SHRINK); - navigationFrame->add (*navigationVBox); + navigationGrid->attach_next_to (*rememberZoomPanCheckbutton, *panFactorLabel, Gtk::POS_BOTTOM, 2, 1); - hbcd->pack_start (*navigationFrame); - mvbsd->pack_start (*hbcd, Gtk::PACK_SHRINK, 0); + fnav->add (*navigationGrid); + mvbsd->attach_next_to (*fnav, *fclip, Gtk::POS_RIGHT, 1, 1); -//----- + // --------------------------------------------- - Gtk::Frame* fdg = Gtk::manage( new Gtk::Frame (M("PREFERENCES_EXTERNALEDITOR")) ); - Gtk::VBox* dgvb = Gtk::manage( new Gtk::VBox () ); + Gtk::Frame* fdg = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_EXTERNALEDITOR")) ); + setExpandAlignProperties (fdg, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + Gtk::Grid* externaleditorGrid = Gtk::manage ( new Gtk::Grid() ); + externaleditorGrid->set_column_spacing (4); + externaleditorGrid->set_row_spacing (4); + setExpandAlignProperties (externaleditorGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); - Gtk::HBox* hb7c = Gtk::manage( new Gtk::HBox () ); - edOther = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_EDITORCMDLINE") + ":")); - hb7c->pack_start (*edOther, Gtk::PACK_SHRINK, 4); - editorToSendTo = Gtk::manage( new Gtk::Entry () ); - hb7c->pack_start (*editorToSendTo); + edOther = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_EDITORCMDLINE") + ":")); + setExpandAlignProperties (edOther, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + editorToSendTo = Gtk::manage ( new Gtk::Entry () ); + setExpandAlignProperties (editorToSendTo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); Gtk::RadioButton::Group ge = edOther->get_group(); #ifdef __APPLE__ - Gtk::HBox* hb7 = Gtk::manage( new Gtk::HBox () ); - edGimp = Gtk::manage( new Gtk::RadioButton ("GIMP") ); - hb7->pack_start (*edGimp, Gtk::PACK_SHRINK, 4); - dgvb->pack_start (*hb7, Gtk::PACK_SHRINK, 4); + edGimp = Gtk::manage ( new Gtk::RadioButton ("GIMP") ); + setExpandAlignProperties (edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); edGimp->set_group (ge); + externaleditorGrid->attach_next_to (*edGimp, Gtk::POS_TOP, 2, 1); - Gtk::HBox* hb7b = Gtk::manage( new Gtk::HBox () ); - edPS = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_PSPATH") + ":")); - hb7b->pack_start (*edPS, Gtk::PACK_SHRINK, 4); - psDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); - hb7b->pack_start (*psDir); - dgvb->pack_start (*hb7b, Gtk::PACK_SHRINK, 4); + edPS = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_PSPATH") + ":")); + setExpandAlignProperties (edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + psDir = Gtk::manage ( new Gtk::FileChooserButton (M ("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); + setExpandAlignProperties (psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + externaleditorGrid->attach_next_to (*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*psDir, *edPS, Gtk::POS_RIGHT, 1, 1); edPS->set_group (ge); + + externaleditorGrid->attach_next_to (*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); #elif defined WIN32 - Gtk::HBox* hb7 = Gtk::manage( new Gtk::HBox () ); - edGimp = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_GIMPPATH") + ":") ); - hb7->pack_start (*edGimp, Gtk::PACK_SHRINK, 4); - gimpDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_GIMPPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); - hb7->pack_start (*gimpDir); - dgvb->pack_start (*hb7, Gtk::PACK_SHRINK, 4); + edGimp = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_GIMPPATH") + ":") ); + setExpandAlignProperties (edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + gimpDir = Gtk::manage ( new Gtk::FileChooserButton (M ("PREFERENCES_GIMPPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); + setExpandAlignProperties (gimpDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + externaleditorGrid->attach_next_to (*edGimp, Gtk::POS_TOP, 1, 1); + externaleditorGrid->attach_next_to (*gimpDir, *edGimp, Gtk::POS_RIGHT, 1, 1); edGimp->set_group (ge); - Gtk::HBox* hb7b = Gtk::manage( new Gtk::HBox ()); - edPS = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_PSPATH") + ":") ); - hb7b->pack_start (*edPS, Gtk::PACK_SHRINK, 4); - psDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); - hb7b->pack_start (*psDir); - dgvb->pack_start (*hb7b, Gtk::PACK_SHRINK, 4); + edPS = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_PSPATH") + ":") ); + setExpandAlignProperties (edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + psDir = Gtk::manage ( new Gtk::FileChooserButton (M ("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) ); + setExpandAlignProperties (psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + externaleditorGrid->attach_next_to (*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*psDir, *edPS, Gtk::POS_RIGHT, 1, 1); edPS->set_group (ge); + + externaleditorGrid->attach_next_to (*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); #else - Gtk::HBox* hb7 = Gtk::manage( new Gtk::HBox () ); - edGimp = Gtk::manage( new Gtk::RadioButton ("GIMP") ); - hb7->pack_start (*edGimp, Gtk::PACK_SHRINK, 4); - dgvb->pack_start (*hb7, Gtk::PACK_SHRINK, 4); + edGimp = Gtk::manage ( new Gtk::RadioButton ("GIMP") ); + setExpandAlignProperties (edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + externaleditorGrid->attach_next_to (*edGimp, Gtk::POS_TOP, 2, 1); edGimp->set_group (ge); + + externaleditorGrid->attach_next_to (*edOther, *edGimp, Gtk::POS_BOTTOM, 1, 1); + externaleditorGrid->attach_next_to (*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1); #endif - dgvb->pack_start (*hb7c, Gtk::PACK_SHRINK, 4); - dgvb->set_border_width (4); - fdg->add (*dgvb); - mvbsd->pack_start (*fdg, Gtk::PACK_SHRINK, 4); + fdg->add (*externaleditorGrid); + mvbsd->attach_next_to (*fdg, *fclip, Gtk::POS_BOTTOM, 2, 1); - - mvbsd->set_border_width (4); - - tconn = theme->signal_changed().connect( sigc::mem_fun(*this, &Preferences::themeChanged) ); - sconn = slimUI->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::themeChanged) ); - fconn = fontbutton->signal_font_set().connect( sigc::mem_fun(*this, &Preferences::fontChanged) ); - usethcon = chUseSystemTheme->signal_clicked ().connect( sigc::mem_fun(*this, &Preferences::useThemeChanged) ); + langAutoDetectConn = ckbLangAutoDetect->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::langAutoDetectToggled)); + tconn = theme->signal_changed().connect ( sigc::mem_fun (*this, &Preferences::themeChanged) ); + fconn = fontButton->signal_font_set().connect ( sigc::mem_fun (*this, &Preferences::fontChanged) ); + cpfconn = colorPickerFontButton->signal_font_set().connect ( sigc::mem_fun (*this, &Preferences::cpFontChanged) ); return mvbsd; } @@ -1088,63 +1233,60 @@ Gtk::Widget* Preferences::getGeneralPanel () Gtk::Widget* Preferences::getFileBrowserPanel () { - Gtk::VBox* mvbfb = Gtk::manage( new Gtk::VBox () ); - mvbfb->set_border_width (4); + Gtk::VBox* mvbfb = Gtk::manage ( new Gtk::VBox () ); - Gtk::Frame* fsd = Gtk::manage( new Gtk::Frame (M("PREFERENCES_STARTUPIMDIR")) ); + Gtk::Frame* fsd = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_STARTUPIMDIR")) ); - sdcurrent = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_DIRSOFTWARE")) ); - sdlast = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_DIRLAST")) ); - sdhome = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_DIRHOME")) ); - sdother = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_DIROTHER") + ": ") ); - startupdir = Gtk::manage( new Gtk::Entry () ); + sdcurrent = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_DIRSOFTWARE")) ); + sdlast = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_DIRLAST")) ); + sdhome = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_DIRHOME")) ); + sdother = Gtk::manage ( new Gtk::RadioButton (M ("PREFERENCES_DIROTHER") + ": ") ); + startupdir = Gtk::manage ( new Gtk::Entry () ); - Gtk::Button* sdselect = Gtk::manage( new Gtk::Button ("") ); - sdselect->set_image (*Gtk::manage(new RTImage ("gtk-open.png"))); + Gtk::Button* sdselect = Gtk::manage ( new Gtk::Button () ); + sdselect->set_image (*Gtk::manage (new RTImage ("gtk-open.png"))); Gtk::RadioButton::Group opts = sdcurrent->get_group(); sdlast->set_group (opts); sdhome->set_group (opts); sdother->set_group (opts); - Gtk::VBox* vbsd = Gtk::manage( new Gtk::VBox () ); + Gtk::VBox* vbsd = Gtk::manage ( new Gtk::VBox () ); vbsd->pack_start (*sdcurrent, Gtk::PACK_SHRINK, 0); vbsd->pack_start (*sdlast, Gtk::PACK_SHRINK, 0); vbsd->pack_start (*sdhome, Gtk::PACK_SHRINK, 0); - Gtk::HBox* otherbox = Gtk::manage( new Gtk::HBox () ); + Gtk::HBox* otherbox = Gtk::manage ( new Gtk::HBox () ); otherbox->pack_start (*sdother, Gtk::PACK_SHRINK); otherbox->pack_start (*startupdir); otherbox->pack_end (*sdselect, Gtk::PACK_SHRINK, 4); vbsd->pack_start (*otherbox, Gtk::PACK_SHRINK, 0); - vbsd->set_border_width (4); fsd->add (*vbsd); mvbfb->pack_start (*fsd, Gtk::PACK_SHRINK, 4); - sdselect->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::selectStartupDir) ); + sdselect->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::selectStartupDir) ); //--- - Gtk::Frame* fro = Gtk::manage( new Gtk::Frame (M("PREFERENCES_FBROWSEROPTS")) ); - showDateTime = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWDATETIME")) ); - showBasicExif = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWBASICEXIF")) ); - showExpComp = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWEXPOSURECOMPENSATION")) ); - Gtk::VBox* vbro = Gtk::manage( new Gtk::VBox () ); - Gtk::HBox* hbro1 = Gtk::manage( new Gtk::HBox () ); - Gtk::HBox* hbro0 = Gtk::manage( new Gtk::HBox () ); - overlayedFileNames = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_OVERLAY_FILENAMES")) ); - filmStripOverlayedFileNames = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP")) ); - sameThumbSize = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT")) ); - sameThumbSize->set_tooltip_text(M("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT")); - ckbInternalThumbIfUntouched = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_INTERNALTHUMBIFUNTOUCHED"))); + Gtk::Frame* fro = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_FBROWSEROPTS")) ); + showDateTime = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWDATETIME")) ); + showBasicExif = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWBASICEXIF")) ); + showExpComp = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_SHOWEXPOSURECOMPENSATION")) ); + Gtk::VBox* vbro = Gtk::manage ( new Gtk::VBox () ); + Gtk::HBox* hbro1 = Gtk::manage ( new Gtk::HBox () ); + Gtk::HBox* hbro0 = Gtk::manage ( new Gtk::HBox () ); + overlayedFileNames = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_OVERLAY_FILENAMES")) ); + filmStripOverlayedFileNames = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_OVERLAY_FILENAMES_FILMSTRIP")) ); + sameThumbSize = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT")) ); + sameThumbSize->set_tooltip_text (M ("PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT")); + ckbInternalThumbIfUntouched = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_INTERNALTHUMBIFUNTOUCHED"))); - vbro->set_border_width (4); vbro->pack_start (*showDateTime, Gtk::PACK_SHRINK, 0); - Gtk::Label* dflab = Gtk::manage( new Gtk::Label (M("PREFERENCES_DATEFORMAT") + ":", Gtk::ALIGN_LEFT)); - dateformat = Gtk::manage( new Gtk::Entry () ); - dateformat->set_tooltip_markup (M("PREFERENCES_DATEFORMATHINT")); - dflab->set_tooltip_markup (M("PREFERENCES_DATEFORMATHINT")); + Gtk::Label* dflab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_DATEFORMAT") + ":", Gtk::ALIGN_START)); + dateformat = Gtk::manage ( new Gtk::Entry () ); + dateformat->set_tooltip_markup (M ("PREFERENCES_DATEFORMATHINT")); + dflab->set_tooltip_markup (M ("PREFERENCES_DATEFORMATHINT")); hbro0->pack_start (*dflab, Gtk::PACK_SHRINK, 4); hbro0->pack_start (*dateformat, Gtk::PACK_SHRINK, 0); @@ -1157,9 +1299,9 @@ Gtk::Widget* Preferences::getFileBrowserPanel () vbro->pack_start (*sameThumbSize, Gtk::PACK_SHRINK, 0); vbro->pack_start (*ckbInternalThumbIfUntouched, Gtk::PACK_SHRINK, 0); - Gtk::HBox* hbrecent = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* labrecent = Gtk::manage( new Gtk::Label (M("PREFERENCES_MAXRECENTFOLDERS") + ":") ); - maxRecentFolders = Gtk::manage( new Gtk::SpinButton () ); + Gtk::HBox* hbrecent = Gtk::manage ( new Gtk::HBox () ); + Gtk::Label* labrecent = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_MAXRECENTFOLDERS") + ":") ); + maxRecentFolders = Gtk::manage ( new Gtk::SpinButton () ); hbrecent->pack_start (*labrecent, Gtk::PACK_SHRINK, 4); hbrecent->pack_start (*maxRecentFolders, Gtk::PACK_SHRINK, 4); maxRecentFolders->set_digits (0); @@ -1170,15 +1312,14 @@ Gtk::Widget* Preferences::getFileBrowserPanel () fro->add (*vbro); - Gtk::Frame* frmnu = Gtk::manage( new Gtk::Frame (M("PREFERENCES_MENUOPTIONS")) ); - ckbmenuGroupRank = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPRANK")) ); - ckbmenuGroupLabel = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPLABEL")) ); - ckbmenuGroupFileOperations = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPFILEOPERATIONS")) ); - ckbmenuGroupProfileOperations = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPPROFILEOPERATIONS")) ); - ckbmenuGroupExtProg = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_MENUGROUPEXTPROGS")) ); - Gtk::VBox* vbmnu = Gtk::manage( new Gtk::VBox () ); + Gtk::Frame* frmnu = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_MENUOPTIONS")) ); + ckbmenuGroupRank = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPRANK")) ); + ckbmenuGroupLabel = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPLABEL")) ); + ckbmenuGroupFileOperations = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPFILEOPERATIONS")) ); + ckbmenuGroupProfileOperations = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPPROFILEOPERATIONS")) ); + ckbmenuGroupExtProg = Gtk::manage ( new Gtk::CheckButton (M ("PREFERENCES_MENUGROUPEXTPROGS")) ); + Gtk::VBox* vbmnu = Gtk::manage ( new Gtk::VBox () ); - vbmnu->set_border_width (4); vbmnu->pack_start (*ckbmenuGroupRank, Gtk::PACK_SHRINK, 0); vbmnu->pack_start (*ckbmenuGroupLabel, Gtk::PACK_SHRINK, 0); vbmnu->pack_start (*ckbmenuGroupFileOperations, Gtk::PACK_SHRINK, 0); @@ -1188,27 +1329,27 @@ Gtk::Widget* Preferences::getFileBrowserPanel () frmnu->add (*vbmnu); - Gtk::Frame* fre = Gtk::manage( new Gtk::Frame (M("PREFERENCES_PARSEDEXT")) ); - Gtk::VBox* vbre = Gtk::manage( new Gtk::VBox () ); - vbre->set_border_width (4); - Gtk::HBox* hb0 = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* elab = Gtk::manage( new Gtk::Label (M("PREFERENCES_PARSEDEXTADD") + ":") ); + Gtk::Frame* fre = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_PARSEDEXT")) ); + Gtk::VBox* vbre = Gtk::manage ( new Gtk::VBox () ); + Gtk::HBox* hb0 = Gtk::manage ( new Gtk::HBox () ); + Gtk::Label* elab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_PARSEDEXTADD") + ":") ); hb0->pack_start (*elab, Gtk::PACK_SHRINK, 4); - extension = Gtk::manage( new Gtk::Entry () ); - extension->set_width_chars(5); + extension = Gtk::manage ( new Gtk::Entry () ); + extension->set_width_chars (5); + extension->set_max_width_chars (5); hb0->pack_start (*extension); - addExt = Gtk::manage( new Gtk::Button () ); - delExt = Gtk::manage( new Gtk::Button () ); - moveExtUp = Gtk::manage( new Gtk::Button () ); - moveExtDown = Gtk::manage( new Gtk::Button () ); - addExt->set_tooltip_text (M("PREFERENCES_PARSEDEXTADDHINT")); - delExt->set_tooltip_text (M("PREFERENCES_PARSEDEXTDELHINT")); - moveExtUp->set_tooltip_text (M("PREFERENCES_PARSEDEXTUPHINT")); - moveExtDown->set_tooltip_text (M("PREFERENCES_PARSEDEXTDOWNHINT")); - Gtk::Image* addExtImg = Gtk::manage( new RTImage ("list-add-small.png") ); - Gtk::Image* delExtImg = Gtk::manage( new RTImage ("list-remove-red-small.png") ); - Gtk::Image* moveExtUpImg = Gtk::manage( new RTImage ("arrow-up-small.png") ); - Gtk::Image* moveExtDownImg = Gtk::manage( new RTImage ("arrow-down-small.png") ); + addExt = Gtk::manage ( new Gtk::Button () ); + delExt = Gtk::manage ( new Gtk::Button () ); + moveExtUp = Gtk::manage ( new Gtk::Button () ); + moveExtDown = Gtk::manage ( new Gtk::Button () ); + addExt->set_tooltip_text (M ("PREFERENCES_PARSEDEXTADDHINT")); + delExt->set_tooltip_text (M ("PREFERENCES_PARSEDEXTDELHINT")); + moveExtUp->set_tooltip_text (M ("PREFERENCES_PARSEDEXTUPHINT")); + moveExtDown->set_tooltip_text (M ("PREFERENCES_PARSEDEXTDOWNHINT")); + Gtk::Image* addExtImg = Gtk::manage ( new RTImage ("list-add-small.png") ); + Gtk::Image* delExtImg = Gtk::manage ( new RTImage ("list-remove-red-small.png") ); + Gtk::Image* moveExtUpImg = Gtk::manage ( new RTImage ("arrow-up-small.png") ); + Gtk::Image* moveExtDownImg = Gtk::manage ( new RTImage ("arrow-down-small.png") ); addExt->add (*addExtImg); delExt->add (*delExtImg); moveExtUp->set_image (*moveExtUpImg); @@ -1217,28 +1358,27 @@ Gtk::Widget* Preferences::getFileBrowserPanel () hb0->pack_end (*moveExtUp, Gtk::PACK_SHRINK, 4); hb0->pack_end (*delExt, Gtk::PACK_SHRINK, 4); hb0->pack_end (*addExt, Gtk::PACK_SHRINK, 4); - extensions = Gtk::manage( new Gtk::TreeView () ); - Gtk::ScrolledWindow* hscrollw = Gtk::manage( new Gtk::ScrolledWindow () ); + extensions = Gtk::manage ( new Gtk::TreeView () ); + Gtk::ScrolledWindow* hscrollw = Gtk::manage ( new Gtk::ScrolledWindow () ); hscrollw->set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS); hscrollw->add (*extensions); extensionModel = Gtk::ListStore::create (extensionColumns); extensions->set_model (extensionModel); - extensions->append_column_editable("Enabled", extensionColumns.enabled); - extensions->append_column("Extension", extensionColumns.ext); + extensions->append_column_editable ("Enabled", extensionColumns.enabled); + extensions->append_column ("Extension", extensionColumns.ext); extensions->set_headers_visible (false); vbre->pack_start (*hscrollw); vbre->pack_start (*hb0, Gtk::PACK_SHRINK, 4); fre->add (*vbre); - Gtk::Frame* frc = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CACHEOPTS")) ); - Gtk::VBox* vbc = Gtk::manage( new Gtk::VBox () ); + Gtk::Frame* frc = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CACHEOPTS")) ); + Gtk::VBox* vbc = Gtk::manage ( new Gtk::VBox () ); frc->add (*vbc); - vbc->set_border_width (4); - Gtk::HBox* hb3 = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* chlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_CACHETHUMBHEIGHT") + ":") ); - maxThumbSize = Gtk::manage( new Gtk::SpinButton () ); + Gtk::HBox* hb3 = Gtk::manage ( new Gtk::HBox () ); + Gtk::Label* chlab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CACHETHUMBHEIGHT") + ":") ); + maxThumbSize = Gtk::manage ( new Gtk::SpinButton () ); hb3->pack_start (*chlab, Gtk::PACK_SHRINK, 4); hb3->pack_start (*maxThumbSize, Gtk::PACK_SHRINK, 4); @@ -1247,9 +1387,9 @@ Gtk::Widget* Preferences::getFileBrowserPanel () maxThumbSize->set_range (40, 800); vbc->pack_start (*hb3, Gtk::PACK_SHRINK, 4); - Gtk::HBox* hb4 = Gtk::manage( new Gtk::HBox () ); - Gtk::Label* celab = Gtk::manage( new Gtk::Label (M("PREFERENCES_CACHEMAXENTRIES") + ":") ); - maxCacheEntries = Gtk::manage( new Gtk::SpinButton () ); + Gtk::HBox* hb4 = Gtk::manage ( new Gtk::HBox () ); + Gtk::Label* celab = Gtk::manage ( new Gtk::Label (M ("PREFERENCES_CACHEMAXENTRIES") + ":") ); + maxCacheEntries = Gtk::manage ( new Gtk::SpinButton () ); hb4->pack_start (*celab, Gtk::PACK_SHRINK, 4); hb4->pack_start (*maxCacheEntries, Gtk::PACK_SHRINK, 4); @@ -1258,24 +1398,24 @@ Gtk::Widget* Preferences::getFileBrowserPanel () maxCacheEntries->set_range (10, 100000); vbc->pack_start (*hb4, Gtk::PACK_SHRINK, 4); - Gtk::HBox* hb5 = Gtk::manage( new Gtk::HBox () ); - clearThumbnails = Gtk::manage( new Gtk::Button (M("PREFERENCES_CACHECLEARTHUMBS")) ); - clearProfiles = Gtk::manage( new Gtk::Button (M("PREFERENCES_CACHECLEARPROFILES")) ); - clearAll = Gtk::manage( new Gtk::Button (M("PREFERENCES_CACHECLEARALL")) ); + Gtk::HBox* hb5 = Gtk::manage ( new Gtk::HBox () ); + clearThumbnails = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_CACHECLEARTHUMBS")) ); + clearProfiles = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_CACHECLEARPROFILES")) ); + clearAll = Gtk::manage ( new Gtk::Button (M ("PREFERENCES_CACHECLEARALL")) ); hb5->pack_start (*clearThumbnails, Gtk::PACK_SHRINK, 4); hb5->pack_start (*clearProfiles, Gtk::PACK_SHRINK, 4); hb5->pack_start (*clearAll, Gtk::PACK_SHRINK, 4); vbc->pack_start (*hb5, Gtk::PACK_SHRINK, 4); - Gtk::HBox* hb6 = Gtk::manage( new Gtk::HBox () ); - Gtk::VBox* vb6 = Gtk::manage( new Gtk::VBox () ); + Gtk::HBox* hb6 = Gtk::manage ( new Gtk::HBox () ); + Gtk::VBox* vb6 = Gtk::manage ( new Gtk::VBox () ); vb6->pack_start (*fro); vb6->pack_start (*frmnu); vb6->pack_end (*frc); hb6->pack_start (*vb6); hb6->pack_start (*fre); - hb6->set_spacing(4); + hb6->set_spacing (4); mvbfb->pack_start (*hb6, Gtk::PACK_SHRINK, 4); @@ -1283,14 +1423,14 @@ Gtk::Widget* Preferences::getFileBrowserPanel () // mvbfb->pack_start (*fre); // mvbfb->pack_start (*frc, Gtk::PACK_SHRINK, 4); - addExt->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::addExtPressed) ); - delExt->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::delExtPressed) ); - moveExtUp->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::moveExtUpPressed) ); - moveExtDown->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::moveExtDownPressed) ); - extension->signal_activate().connect( sigc::mem_fun(*this, &Preferences::addExtPressed) ); - clearThumbnails->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::clearThumbImagesPressed) ); - clearProfiles->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::clearProfilesPressed) ); - clearAll->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::clearAllPressed) ); + addExt->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::addExtPressed) ); + delExt->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::delExtPressed) ); + moveExtUp->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::moveExtUpPressed) ); + moveExtDown->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::moveExtDownPressed) ); + extension->signal_activate().connect ( sigc::mem_fun (*this, &Preferences::addExtPressed) ); + clearThumbnails->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearThumbImagesPressed) ); + clearProfiles->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearProfilesPressed) ); + clearAll->signal_clicked().connect ( sigc::mem_fun (*this, &Preferences::clearAllPressed) ); return mvbfb; } @@ -1299,40 +1439,40 @@ Gtk::Widget* Preferences::getSoundPanel () { Gtk::VBox* pSnd = new Gtk::VBox (); - ckbSndEnable = Gtk::manage( new Gtk::CheckButton (M("GENERAL_ENABLE"))); - sndEnableConn = ckbSndEnable->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::sndEnableToggled)); + ckbSndEnable = Gtk::manage ( new Gtk::CheckButton (M ("GENERAL_ENABLE"))); + sndEnableConn = ckbSndEnable->signal_toggled().connect (sigc::mem_fun (*this, &Preferences::sndEnableToggled)); pSnd->pack_start (*ckbSndEnable, Gtk::PACK_SHRINK, 4); Gtk::HBox* hblSndHelp = Gtk::manage (new Gtk::HBox ()); - Gtk::Label* lSndHelp = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_HELP"))); + Gtk::Label* lSndHelp = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SND_HELP"))); hblSndHelp->pack_start (*lSndHelp, Gtk::PACK_SHRINK, 4); pSnd->pack_start (*hblSndHelp, Gtk::PACK_SHRINK, 4); // BatchQueueDone - Gtk::HBox* pBatchQueueDone = Gtk::manage( new Gtk::HBox() ); + Gtk::HBox* pBatchQueueDone = Gtk::manage ( new Gtk::HBox() ); - Gtk::Label* lSndBatchQueueDone = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_BATCHQUEUEDONE") + Glib::ustring(":"))); + Gtk::Label* lSndBatchQueueDone = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SND_BATCHQUEUEDONE") + Glib::ustring (":"))); pBatchQueueDone->pack_start (*lSndBatchQueueDone, Gtk::PACK_SHRINK, 4); - txtSndBatchQueueDone = Gtk::manage (new Gtk::Entry()); + txtSndBatchQueueDone = Gtk::manage (new Gtk::Entry()); pBatchQueueDone->pack_end (*txtSndBatchQueueDone, Gtk::PACK_EXPAND_WIDGET, 4); pSnd->pack_start (*pBatchQueueDone, Gtk::PACK_SHRINK, 4); // LngEditProcDone - Gtk::HBox* pSndLngEditProcDone = Gtk::manage( new Gtk::HBox() ); + Gtk::HBox* pSndLngEditProcDone = Gtk::manage ( new Gtk::HBox() ); - Gtk::Label* lSndLngEditProcDone = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_LNGEDITPROCDONE") + Glib::ustring(":"))); + Gtk::Label* lSndLngEditProcDone = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SND_LNGEDITPROCDONE") + Glib::ustring (":"))); pSndLngEditProcDone->pack_start (*lSndLngEditProcDone, Gtk::PACK_SHRINK, 4); - txtSndLngEditProcDone = Gtk::manage (new Gtk::Entry()); + txtSndLngEditProcDone = Gtk::manage (new Gtk::Entry()); pSndLngEditProcDone->pack_start (*txtSndLngEditProcDone, Gtk::PACK_EXPAND_WIDGET, 4); - Gtk::Label* lSndLngEditProcDoneSecs = Gtk::manage (new Gtk::Label (M("PREFERENCES_SND_TRESHOLDSECS") + Glib::ustring(":"))); + Gtk::Label* lSndLngEditProcDoneSecs = Gtk::manage (new Gtk::Label (M ("PREFERENCES_SND_TRESHOLDSECS") + Glib::ustring (":"))); pSndLngEditProcDone->pack_start (*lSndLngEditProcDoneSecs, Gtk::PACK_SHRINK, 12); - spbSndLngEditProcDoneSecs = Gtk::manage( new Gtk::SpinButton () ); + spbSndLngEditProcDoneSecs = Gtk::manage ( new Gtk::SpinButton () ); spbSndLngEditProcDoneSecs->set_digits (1); spbSndLngEditProcDoneSecs->set_increments (0.5, 1); spbSndLngEditProcDoneSecs->set_range (0, 10); @@ -1340,8 +1480,6 @@ Gtk::Widget* Preferences::getSoundPanel () pSnd->pack_start (*pSndLngEditProcDone, Gtk::PACK_SHRINK, 4); - pSnd->set_border_width (4); - sndEnableToggled(); return pSnd; @@ -1364,74 +1502,140 @@ void Preferences::parseDir (Glib::ustring dirname, std::vector& i } for (Glib::DirIterator i = dir->begin(); i != dir->end(); ++i) { - Glib::ustring fname = Glib::build_filename(dirname, *i); + Glib::ustring fname = Glib::build_filename (dirname, *i); Glib::ustring sname = *i; // ignore directories if (!Glib::file_test (fname, Glib::FILE_TEST_IS_DIR) && sname.size() >= ext.size() && sname.substr (sname.size() - ext.size(), ext.size()).casefold() == ext) { - items.push_back (sname.substr(0, sname.size() - ext.size())); + items.push_back (sname.substr (0, sname.size() - ext.size())); } } - std::sort(items.begin(), items.end()); + std::sort (items.begin(), items.end()); + delete dir; +} + +void Preferences::parseThemeDir (Glib::ustring dirname) +{ + + if (dirname.empty()) { + return; + } + + // process directory + Glib::Dir* dir = nullptr; + + try { + dir = new Glib::Dir (dirname); + } catch (const Glib::Error& e) { + return; + } + + for (Glib::DirIterator i = dir->begin(); i != dir->end(); ++i) { + Glib::ustring fname = Glib::build_filename (dirname, *i); + Glib::ustring sname = *i; + + // ignore directories and filter out unsupported theme + if (regex->match (sname, matchInfo) && !Glib::file_test (fname, Glib::FILE_TEST_IS_DIR) && sname.size() >= 4) { + bool keepIt = false; + Glib::ustring fname2 = matchInfo.fetch (1); + Glib::ustring minMinor = matchInfo.fetch (2); + Glib::ustring maxMinor = matchInfo.fetch (3); + + if (!minMinor.empty()) { + guint64 minMinorVal = g_ascii_strtoll (minMinor.c_str(), 0, 0); + + if ((guint64)GTK_MINOR_VERSION >= minMinorVal) { + keepIt = true; + } + } + + if (!maxMinor.empty()) { + guint64 maxMinorVal = g_ascii_strtoll (maxMinor.c_str(), 0, 0); + + if ((guint64)GTK_MINOR_VERSION <= maxMinorVal) { + keepIt = true; + } + } + + if (keepIt) { + themeFNames.push_back (ThemeFilename (matchInfo.fetch (1), sname.substr (0, sname.size() - 4))); + } + } + } + + std::sort (themeFNames.begin(), themeFNames.end(), [] (const ThemeFilename & firstDir, const ThemeFilename & secondDir) { + return firstDir.longFName < secondDir.longFName; + }); + delete dir; } void Preferences::storePreferences () { - // With the new mechanism, we can't be sure of the availability of the DEFPROFILE_RAW & DEFPROFILE_IMG profiles, - // because useBundledProfiles may be false. We're now using DEFPROFILE_INTERNAL instead, which is always available. - moptions.defProfRaw = rprofiles->getFullPathFromActiveRow(); +// With the new mechanism, we can't be sure of the availability of the DEFPROFILE_RAW & DEFPROFILE_IMG profiles, +// because useBundledProfiles may be false. We're now using DEFPROFILE_INTERNAL instead, which is always available. + moptions.defProfRaw = rprofiles->getFullPathFromActiveRow(); if (moptions.defProfRaw.empty()) { moptions.defProfRaw = DEFPROFILE_INTERNAL; } - moptions.defProfImg = iprofiles->getFullPathFromActiveRow(); + moptions.defProfImg = iprofiles->getFullPathFromActiveRow(); if (moptions.defProfImg.empty()) { moptions.defProfImg = DEFPROFILE_INTERNAL; } - moptions.dateFormat = dateformat->get_text(); - moptions.panAccelFactor = (int)panFactor->get_value(); + moptions.dateFormat = dateformat->get_text(); + moptions.panAccelFactor = (int)panFactor->get_value(); moptions.rememberZoomAndPan = rememberZoomPanCheckbutton->get_active(); - moptions.fbShowDateTime = showDateTime->get_active (); + moptions.fbShowDateTime = showDateTime->get_active (); moptions.fbShowBasicExif = showBasicExif->get_active (); - moptions.fbShowExpComp = showExpComp->get_active (); - moptions.menuGroupRank = ckbmenuGroupRank->get_active(); - moptions.menuGroupLabel = ckbmenuGroupLabel->get_active(); - moptions.menuGroupFileOperations = ckbmenuGroupFileOperations->get_active(); + moptions.fbShowExpComp = showExpComp->get_active (); + moptions.menuGroupRank = ckbmenuGroupRank->get_active(); + moptions.menuGroupLabel = ckbmenuGroupLabel->get_active(); + moptions.menuGroupFileOperations = ckbmenuGroupFileOperations->get_active(); moptions.menuGroupProfileOperations = ckbmenuGroupProfileOperations->get_active(); - moptions.menuGroupExtProg = ckbmenuGroupExtProg->get_active(); + moptions.menuGroupExtProg = ckbmenuGroupExtProg->get_active(); moptions.highlightThreshold = (int)hlThresh->get_value (); moptions.shadowThreshold = (int)shThresh->get_value (); - moptions.language = languages->get_active_text (); + moptions.language = languages->get_active_text (); moptions.languageAutoDetect = ckbLangAutoDetect->get_active (); - moptions.theme = theme->get_active_text (); - moptions.slimUI = slimUI->get_active (); - moptions.useSystemTheme = chUseSystemTheme->get_active (); + moptions.theme = themeFNames.at (theme->get_active_row_number ()).longFName; - Gdk::Color cropCol = butCropCol->get_color(); - moptions.cutOverlayBrush[0] = cropCol.get_red_p(); - moptions.cutOverlayBrush[1] = cropCol.get_green_p(); - moptions.cutOverlayBrush[2] = cropCol.get_blue_p(); + Gdk::RGBA cropCol = butCropCol->get_rgba(); + moptions.cutOverlayBrush[0] = cropCol.get_red(); + moptions.cutOverlayBrush[1] = cropCol.get_green(); + moptions.cutOverlayBrush[2] = cropCol.get_blue(); moptions.cutOverlayBrush[3] = butCropCol->get_alpha() / 65535.0; - Gdk::Color NavGuideCol = butNavGuideCol->get_color(); - moptions.navGuideBrush[0] = NavGuideCol.get_red_p(); - moptions.navGuideBrush[1] = NavGuideCol.get_green_p(); - moptions.navGuideBrush[2] = NavGuideCol.get_blue_p(); + Gdk::RGBA NavGuideCol = butNavGuideCol->get_rgba(); + moptions.navGuideBrush[0] = NavGuideCol.get_red(); + moptions.navGuideBrush[1] = NavGuideCol.get_green(); + moptions.navGuideBrush[2] = NavGuideCol.get_blue(); moptions.navGuideBrush[3] = butNavGuideCol->get_alpha() / 65535.0; - moptions.font = fontbutton->get_font_name(); - moptions.colorPickerFont = colorPickerFontButton->get_font_name(); + Pango::FontDescription fd (fontButton->get_font_name()); + + if (newFont) { + moptions.fontFamily = fd.get_family(); + moptions.fontSize = fd.get_size() / Pango::SCALE; + } + + Pango::FontDescription cpfd (colorPickerFontButton->get_font_name()); + + if (newCPFont) { + moptions.CPFontFamily = cpfd.get_family(); + moptions.CPFontSize = cpfd.get_size() / Pango::SCALE; + } + #ifdef WIN32 - moptions.gimpDir = gimpDir->get_filename (); - moptions.psDir = psDir->get_filename (); + moptions.gimpDir = gimpDir->get_filename (); + moptions.psDir = psDir->get_filename (); #elif defined __APPLE__ - moptions.psDir = psDir->get_filename (); + moptions.psDir = psDir->get_filename (); #endif moptions.customEditorProg = editorToSendTo->get_text (); @@ -1455,42 +1659,74 @@ void Preferences::storePreferences () } moptions.CPBPath = txtCustProfBuilderPath->get_text(); - moptions.CPBKeys = CPBKeyType(custProfBuilderLabelType->get_active_row_number()); + moptions.CPBKeys = CPBKeyType (custProfBuilderLabelType->get_active_row_number()); + + if (!prtProfile->get_active_row_number()) { + moptions.rtSettings.printerProfile = ""; + } else { + moptions.rtSettings.printerProfile = prtProfile->get_active_text (); + } + + switch (prtIntent->get_active_row_number ()) { + default: + case 0: + moptions.rtSettings.printerIntent = rtengine::RI_PERCEPTUAL; + break; + + case 1: + moptions.rtSettings.printerIntent = rtengine::RI_RELATIVE; + break; + + case 2: + moptions.rtSettings.printerIntent = rtengine::RI_ABSOLUTE; + break; + } + + moptions.rtSettings.printerBPC = prtBPC->get_active (); #if !defined(__APPLE__) // monitor profile not supported on apple - moptions.rtSettings.monitorProfile = monProfile->get_active_text (); - switch (monIntent->get_active_row_number ()) { - default: - case 0: - moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL; - break; - case 1: - moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE; - break; - case 2: - moptions.rtSettings.monitorIntent = rtengine::RI_ABSOLUTE; - break; + + if (!monProfile->get_active_row_number()) { + moptions.rtSettings.monitorProfile = ""; + } else { + moptions.rtSettings.monitorProfile = monProfile->get_active_text (); } + + switch (monIntent->get_active_row_number ()) { + default: + case 0: + moptions.rtSettings.monitorIntent = rtengine::RI_PERCEPTUAL; + break; + + case 1: + moptions.rtSettings.monitorIntent = rtengine::RI_RELATIVE; + break; + + case 2: + moptions.rtSettings.monitorIntent = rtengine::RI_ABSOLUTE; + break; + } + moptions.rtSettings.monitorBPC = monBPC->get_active (); -#if defined(WIN32) - moptions.rtSettings.autoMonitorProfile = cbAutoMonProfile->get_active (); -#endif +//#if defined(WIN32) + moptions.rtSettings.autoMonitorProfile = cbAutoMonProfile->get_active (); +//#endif #endif - moptions.rtSettings.iccDirectory = iccDir->get_filename (); - moptions.rtSettings.viewingdevice = view->get_active_row_number (); - moptions.rtSettings.viewingdevicegrey = grey->get_active_row_number (); - moptions.rtSettings.viewinggreySc = greySc->get_active_row_number (); - // moptions.rtSettings.autocielab = cbAutocielab->get_active (); - moptions.rtSettings.ciecamfloat = cbciecamfloat->get_active (); - moptions.rtSettings.HistogramWorking = ckbHistogramWorking->get_active (); - moptions.rtSettings.leveldnv = dnv->get_active_row_number (); - moptions.rtSettings.leveldnti = dnti->get_active_row_number (); - moptions.rtSettings.leveldnliss = dnliss->get_active_row_number (); - moptions.rtSettings.leveldnaut = dnaut->get_active_row_number (); - moptions.rtSettings.nrwavlevel = dnwavlev->get_active_row_number (); - moptions.rtSettings.leveldnautsimpl = dnautsimpl->get_active_row_number (); - moptions.rtSettings.daubech = cbdaubech->get_active (); + moptions.rtSettings.iccDirectory = iccDir->get_filename (); +// moptions.rtSettings.viewingdevice = view->get_active_row_number (); +// moptions.rtSettings.viewingdevicegrey = grey->get_active_row_number (); +// moptions.rtSettings.viewinggreySc = greySc->get_active_row_number (); +// moptions.rtSettings.autocielab = cbAutocielab->get_active (); + moptions.rtSettings.ciecamfloat = cbciecamfloat->get_active (); + moptions.rtSettings.HistogramWorking = ckbHistogramWorking->get_active (); + moptions.rtSettings.leveldnv = dnv->get_active_row_number (); + moptions.rtSettings.leveldnti = dnti->get_active_row_number (); + moptions.rtSettings.leveldnliss = dnliss->get_active_row_number (); + moptions.rtSettings.leveldnaut = dnaut->get_active_row_number (); + moptions.rtSettings.nrwavlevel = dnwavlev->get_active_row_number (); + moptions.rtSettings.leveldnautsimpl = dnautsimpl->get_active_row_number (); + moptions.rtSettings.daubech = cbdaubech->get_active (); moptions.prevdemo = (prevdemo_t)cprevdemo->get_active_row_number (); moptions.serializeTiffRead = ctiffserialize->get_active(); @@ -1523,22 +1759,23 @@ void Preferences::storePreferences () moptions.sameThumbSize = sameThumbSize->get_active(); moptions.internalThumbIfUntouched = ckbInternalThumbIfUntouched->get_active (); - moptions.saveParamsFile = saveParamsFile->get_active (); - moptions.saveParamsCache = saveParamsCache->get_active (); + auto save_where = saveParamsPreference->get_active_row_number(); + moptions.saveParamsFile = save_where == 0 || save_where == 2; + moptions.saveParamsCache = save_where == 1 || save_where == 2; moptions.paramsLoadLocation = (PPLoadLocation)loadParamsPreference->get_active_row_number (); moptions.useBundledProfiles = useBundledProfiles->get_active (); moptions.tunnelMetaData = ckbTunnelMetaData->get_active (); - moptions.rtSettings.darkFramesPath = darkFrameDir->get_filename(); - moptions.rtSettings.flatFieldsPath = flatFieldDir->get_filename(); + moptions.rtSettings.darkFramesPath = darkFrameDir->get_filename(); + moptions.rtSettings.flatFieldsPath = flatFieldDir->get_filename(); moptions.clutsDir = clutsDir->get_filename(); moptions.baBehav.resize (ADDSET_PARAM_NUM); - for (Gtk::TreeIter sections = behModel->children().begin(); sections != behModel->children().end(); sections++) - for (Gtk::TreeIter adjs = sections->children().begin(); adjs != sections->children().end(); adjs++) { + for (Gtk::TreeIter sections = behModel->children().begin(); sections != behModel->children().end(); sections++) + for (Gtk::TreeIter adjs = sections->children().begin(); adjs != sections->children().end(); adjs++) { moptions.baBehav[adjs->get_value (behavColumns.addsetid)] = adjs->get_value (behavColumns.badd); } @@ -1559,11 +1796,11 @@ void Preferences::storePreferences () moptions.clutCacheSize = clutCacheSizeSB->get_value_as_int(); moptions.maxInspectorBuffers = maxInspectorBuffersSB->get_value_as_int(); - // Sounds only on Windows and Linux +// Sounds only on Windows and Linux #if defined(WIN32) || defined(__linux__) moptions.sndEnable = ckbSndEnable->get_active (); moptions.sndBatchQueueDone = txtSndBatchQueueDone->get_text (); - moptions.sndLngEditProcDone = txtSndLngEditProcDone->get_text (); + moptions.sndLngEditProcDone = txtSndLngEditProcDone->get_text (); moptions.sndLngEditProcDoneSecs = spbSndLngEditProcDoneSecs->get_value (); #endif } @@ -1572,12 +1809,14 @@ void Preferences::fillPreferences () { tconn.block (true); + fconn.block (true); + cpfconn.block (true); sconn.block (true); dfconn.block (true); ffconn.block (true); - rpconn.block(true); - ipconn.block(true); - bpconn.block(true); + rpconn.block (true); + ipconn.block (true); + bpconn.block (true); rprofiles->setActiveRowFromFullPath (moptions.defProfRaw); forRAWComboChanged(); // update the tooltip @@ -1586,35 +1825,58 @@ void Preferences::fillPreferences () dateformat->set_text (moptions.dateFormat); panFactor->set_value (moptions.panAccelFactor); rememberZoomPanCheckbutton->set_active (moptions.rememberZoomAndPan); - ctiffserialize->set_active(moptions.serializeTiffRead); + ctiffserialize->set_active (moptions.serializeTiffRead); + + setActiveTextOrIndex (*prtProfile, moptions.rtSettings.printerProfile, 0); + + switch (moptions.rtSettings.printerIntent) { + default: + case rtengine::RI_PERCEPTUAL: + prtIntent->set_active (0); + break; + + case rtengine::RI_RELATIVE: + prtIntent->set_active (1); + break; + + case rtengine::RI_ABSOLUTE: + prtIntent->set_active (2); + break; + } + + prtBPC->set_active (moptions.rtSettings.printerBPC); #if !defined(__APPLE__) // monitor profile not supported on apple setActiveTextOrIndex (*monProfile, moptions.rtSettings.monitorProfile, 0); + switch (moptions.rtSettings.monitorIntent) { - default: - case rtengine::RI_PERCEPTUAL: - monIntent->set_active (0); - break; - case rtengine::RI_RELATIVE: - monIntent->set_active (1); - break; - case rtengine::RI_ABSOLUTE: - monIntent->set_active (2); - break; + default: + case rtengine::RI_PERCEPTUAL: + monIntent->set_active (0); + break; + + case rtengine::RI_RELATIVE: + monIntent->set_active (1); + break; + + case rtengine::RI_ABSOLUTE: + monIntent->set_active (2); + break; } + monBPC->set_active (moptions.rtSettings.monitorBPC); -#if defined(WIN32) - cbAutoMonProfile->set_active(moptions.rtSettings.autoMonitorProfile); -#endif +//#if defined(WIN32) + cbAutoMonProfile->set_active (moptions.rtSettings.autoMonitorProfile); +//#endif #endif if (Glib::file_test (moptions.rtSettings.iccDirectory, Glib::FILE_TEST_IS_DIR)) { iccDir->set_current_folder (moptions.rtSettings.iccDirectory); } - view->set_active (moptions.rtSettings.viewingdevice); - grey->set_active (moptions.rtSettings.viewingdevicegrey); - greySc->set_active (moptions.rtSettings.viewinggreySc); +// view->set_active (moptions.rtSettings.viewingdevice); +// grey->set_active (moptions.rtSettings.viewingdevicegrey); +// greySc->set_active (moptions.rtSettings.viewinggreySc); dnv->set_active (moptions.rtSettings.leveldnv); dnti->set_active (moptions.rtSettings.leveldnti); dnliss->set_active (moptions.rtSettings.leveldnliss); @@ -1629,30 +1891,39 @@ void Preferences::fillPreferences () ckbHistogramWorking->set_active (moptions.rtSettings.HistogramWorking); languages->set_active_text (moptions.language); ckbLangAutoDetect->set_active (moptions.languageAutoDetect); - theme->set_active_text (moptions.theme); - slimUI->set_active(moptions.slimUI); - chUseSystemTheme->set_active(moptions.useSystemTheme); + int themeNbr = getThemeRowNumber (moptions.theme); + theme->set_active (themeNbr == -1 ? 0 : themeNbr); - Gdk::Color cropCol; - cropCol.set_rgb_p(moptions.cutOverlayBrush[0], moptions.cutOverlayBrush[1], moptions.cutOverlayBrush[2]); - butCropCol->set_color(cropCol); - butCropCol->set_alpha ( (unsigned short)(moptions.cutOverlayBrush[3] * 65535.0)); + Gdk::RGBA cropCol; + cropCol.set_rgba (moptions.cutOverlayBrush[0], moptions.cutOverlayBrush[1], moptions.cutOverlayBrush[2]); + butCropCol->set_rgba (cropCol); + butCropCol->set_alpha ( (unsigned short) (moptions.cutOverlayBrush[3] * 65535.0)); - Gdk::Color NavGuideCol; - NavGuideCol.set_rgb_p(moptions.navGuideBrush[0], moptions.navGuideBrush[1], moptions.navGuideBrush[2]); - butNavGuideCol->set_color(NavGuideCol); - butNavGuideCol->set_alpha ( (unsigned short)(moptions.navGuideBrush[3] * 65535.0)); + Gdk::RGBA NavGuideCol; + NavGuideCol.set_rgba (moptions.navGuideBrush[0], moptions.navGuideBrush[1], moptions.navGuideBrush[2]); + butNavGuideCol->set_rgba (NavGuideCol); + butNavGuideCol->set_alpha ( (unsigned short) (moptions.navGuideBrush[3] * 65535.0)); + + if (options.fontFamily == "default") { + fontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize)); + } else { + fontButton->set_font_name (Glib::ustring::compose ("%1 %2", options.fontFamily, options.fontSize)); + } + + if (options.CPFontFamily == "default") { + colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", initialFontFamily, initialFontSize)); + } else { + colorPickerFontButton->set_font_name (Glib::ustring::compose ("%1 %2", options.CPFontFamily, options.CPFontSize)); + } - fontbutton->set_font_name(moptions.font); - colorPickerFontButton->set_font_name(moptions.colorPickerFont); showDateTime->set_active (moptions.fbShowDateTime); showBasicExif->set_active (moptions.fbShowBasicExif); showExpComp->set_active (moptions.fbShowExpComp); - ckbmenuGroupRank->set_active(moptions.menuGroupRank); - ckbmenuGroupLabel->set_active(moptions.menuGroupLabel); - ckbmenuGroupFileOperations->set_active(moptions.menuGroupFileOperations); - ckbmenuGroupProfileOperations->set_active(moptions.menuGroupProfileOperations); - ckbmenuGroupExtProg->set_active(moptions.menuGroupExtProg); + ckbmenuGroupRank->set_active (moptions.menuGroupRank); + ckbmenuGroupLabel->set_active (moptions.menuGroupLabel); + ckbmenuGroupFileOperations->set_active (moptions.menuGroupFileOperations); + ckbmenuGroupProfileOperations->set_active (moptions.menuGroupProfileOperations); + ckbmenuGroupExtProg->set_active (moptions.menuGroupExtProg); hlThresh->set_value (moptions.highlightThreshold); shThresh->set_value (moptions.shadowThreshold); @@ -1664,10 +1935,14 @@ void Preferences::fillPreferences () if (Glib::file_test (moptions.gimpDir, Glib::FILE_TEST_IS_DIR)) { gimpDir->set_current_folder (moptions.gimpDir); + } else { + gimpDir->set_current_folder (Glib::get_home_dir()); } if (Glib::file_test (moptions.psDir, Glib::FILE_TEST_IS_DIR)) { psDir->set_current_folder (moptions.psDir); + } else { + psDir->set_current_folder (Glib::get_home_dir()); } #elif defined __APPLE__ @@ -1675,13 +1950,15 @@ void Preferences::fillPreferences () if (Glib::file_test (moptions.psDir, Glib::FILE_TEST_IS_DIR)) { psDir->set_current_folder (moptions.psDir); + } else { + psDir->set_current_folder (Glib::get_home_dir()); } #endif editorToSendTo->set_text (moptions.customEditorProg); - txtCustProfBuilderPath->set_text(moptions.CPBPath); - custProfBuilderLabelType->set_active(moptions.CPBKeys); + txtCustProfBuilderPath->set_text (moptions.CPBPath); + custProfBuilderLabelType->set_active (moptions.CPBKeys); if (moptions.startupDir == STARTUPDIR_CURRENT) { @@ -1698,75 +1975,77 @@ void Preferences::fillPreferences () extensionModel->clear (); for (size_t i = 0; i < moptions.parseExtensions.size(); i++) { - Gtk::TreeRow row = *(extensionModel->append()); + Gtk::TreeRow row = * (extensionModel->append()); row[extensionColumns.enabled] = moptions.parseExtensionsEnabled[i]; row[extensionColumns.ext] = moptions.parseExtensions[i]; } maxThumbSize->set_value (moptions.maxThumbnailHeight); - maxRecentFolders->set_value(moptions.maxRecentFolders); + maxRecentFolders->set_value (moptions.maxRecentFolders); maxCacheEntries->set_value (moptions.maxCacheEntries); overlayedFileNames->set_active (moptions.overlayedFileNames); - filmStripOverlayedFileNames->set_active(moptions.filmStripOverlayedFileNames); - sameThumbSize->set_active(moptions.sameThumbSize); - ckbInternalThumbIfUntouched->set_active(moptions.internalThumbIfUntouched); + filmStripOverlayedFileNames->set_active (moptions.filmStripOverlayedFileNames); + sameThumbSize->set_active (moptions.sameThumbSize); + ckbInternalThumbIfUntouched->set_active (moptions.internalThumbIfUntouched); + + saveParamsPreference->set_active (moptions.saveParamsFile ? (moptions.saveParamsCache ? 2 : 0) : 1); - saveParamsFile->set_active (moptions.saveParamsFile); - saveParamsCache->set_active (moptions.saveParamsCache); loadParamsPreference->set_active (moptions.paramsLoadLocation); useBundledProfiles->set_active (moptions.useBundledProfiles); ckbTunnelMetaData->set_active (moptions.tunnelMetaData); if (!moptions.tabbedUI) { - editorLayout->set_active(moptions.mainNBVertical ? 1 : 0); + editorLayout->set_active (moptions.mainNBVertical ? 1 : 0); } else { - editorLayout->set_active(moptions.multiDisplayMode ? 3 : 2); + editorLayout->set_active (moptions.multiDisplayMode ? 3 : 2); } - curveBBoxPosC->set_active(moptions.curvebboxpos); - ckbHistogramPositionLeft->set_active(moptions.histogramPosition == 1); + curveBBoxPosC->set_active (moptions.curvebboxpos); + ckbHistogramPositionLeft->set_active (moptions.histogramPosition == 1); // ckbHistogramWorking->set_active(moptions.histogramWorking==1); - ckbFileBrowserToolbarSingleRow->set_active(moptions.FileBrowserToolbarSingleRow); - ckbShowFilmStripToolBar->set_active(moptions.showFilmStripToolBar); - ckbHideTPVScrollbar->set_active(moptions.hideTPVScrollbar); - ckbUseIconNoText->set_active(moptions.UseIconNoText); + ckbFileBrowserToolbarSingleRow->set_active (moptions.FileBrowserToolbarSingleRow); + ckbShowFilmStripToolBar->set_active (moptions.showFilmStripToolBar); + ckbHideTPVScrollbar->set_active (moptions.hideTPVScrollbar); + ckbUseIconNoText->set_active (moptions.UseIconNoText); - rgbDenoiseTreadLimitSB->set_value(moptions.rgbDenoiseThreadLimit); - clutCacheSizeSB->set_value(moptions.clutCacheSize); - maxInspectorBuffersSB->set_value(moptions.maxInspectorBuffers); + rgbDenoiseTreadLimitSB->set_value (moptions.rgbDenoiseThreadLimit); + clutCacheSizeSB->set_value (moptions.clutCacheSize); + maxInspectorBuffersSB->set_value (moptions.maxInspectorBuffers); - darkFrameDir->set_current_folder( moptions.rtSettings.darkFramesPath ); + darkFrameDir->set_current_folder ( moptions.rtSettings.darkFramesPath ); darkFrameChanged (); - flatFieldDir->set_current_folder( moptions.rtSettings.flatFieldsPath ); + flatFieldDir->set_current_folder ( moptions.rtSettings.flatFieldsPath ); flatFieldChanged (); - clutsDir->set_current_folder( moptions.clutsDir ); + clutsDir->set_current_folder ( moptions.clutsDir ); addc.block (true); setc.block (true); - if (moptions.baBehav.size() == ADDSET_PARAM_NUM) { - for (size_t i = 0; i < moptions.baBehav.size(); i++) - for (Gtk::TreeIter sections = behModel->children().begin(); sections != behModel->children().end(); sections++) - for (Gtk::TreeIter adjs = sections->children().begin(); adjs != sections->children().end(); adjs++) - if (adjs->get_value (behavColumns.addsetid) == (int)i) { - adjs->set_value (behavColumns.badd, moptions.baBehav[i] == 1); - adjs->set_value (behavColumns.bset, moptions.baBehav[i] != 1); - break; - } - } + moptions.baBehav.resize (ADDSET_PARAM_NUM); + + for (size_t i = 0; i < moptions.baBehav.size(); i++) + for (Gtk::TreeIter sections = behModel->children().begin(); sections != behModel->children().end(); sections++) + for (Gtk::TreeIter adjs = sections->children().begin(); adjs != sections->children().end(); adjs++) + if (adjs->get_value (behavColumns.addsetid) == (int)i) { + adjs->set_value (behavColumns.badd, moptions.baBehav[i] == 1); + adjs->set_value (behavColumns.bset, moptions.baBehav[i] != 1); + break; + } addc.block (false); setc.block (false); + cpfconn.block (false); + fconn.block (false); tconn.block (false); sconn.block (false); dfconn.block (false); ffconn.block (false); - rpconn.block(true); - ipconn.block(true); - bpconn.block(false); + rpconn.block (true); + ipconn.block (true); + bpconn.block (false); chOverwriteOutputFile->set_active (moptions.overwriteOutputFile); @@ -1794,12 +2073,12 @@ void Preferences::savePressed () { } */ -#if defined(WIN32) +//#if defined(WIN32) void Preferences::autoMonProfileToggled () { - monProfile->set_sensitive(!cbAutoMonProfile->get_active()); + monProfile->set_sensitive (!cbAutoMonProfile->get_active()); } -#endif +//#endif /* void Preferences::autocielabToggled () { // cbAutocielab->set_sensitive(cbAutocielab->get_active()); @@ -1807,14 +2086,14 @@ void Preferences::autocielabToggled () { */ void Preferences::sndEnableToggled () { - txtSndBatchQueueDone->set_sensitive(ckbSndEnable->get_active()); - txtSndLngEditProcDone->set_sensitive(ckbSndEnable->get_active()); - spbSndLngEditProcDoneSecs->set_sensitive(ckbSndEnable->get_active()); + txtSndBatchQueueDone->set_sensitive (ckbSndEnable->get_active()); + txtSndLngEditProcDone->set_sensitive (ckbSndEnable->get_active()); + spbSndLngEditProcDoneSecs->set_sensitive (ckbSndEnable->get_active()); } void Preferences::langAutoDetectToggled () { - languages->set_sensitive(!ckbLangAutoDetect->get_active()); + languages->set_sensitive (!ckbLangAutoDetect->get_active()); } void Preferences::okPressed () @@ -1825,34 +2104,37 @@ void Preferences::okPressed () options.copyFrom (&moptions); options.filterOutParsedExtensions(); Options::save (); + dynProfilePanel->save(); hide (); } void Preferences::cancelPressed () { - - bool currentSlimState = options.slimUI; - options.slimUI = oldSlimUI; - // set the initial theme back - if (theme->get_active_text() != options.theme || options.slimUI != currentSlimState) { - RTImage::setPaths(options); + if (themeFNames.at (theme->get_active_row_number ()).longFName != options.theme) { + rtengine::setPaths (options); RTImage::updateImages(); - switchThemeTo(options.theme, options.slimUI); + switchThemeTo (options.theme); } // set the initial font back - if (fontbutton->get_font_name() != options.font) { - switchFontTo(options.font); + Pango::FontDescription fd (fontButton->get_font_name()); + + if (fd.get_family() != options.fontFamily && (fd.get_size() / Pango::SCALE) != options.fontSize) { + if (options.fontFamily == "default") { + switchFontTo (initialFontFamily, initialFontSize); + } else { + switchFontTo (options.fontFamily, options.fontSize); + } } // update the profileStore if (useBundledProfiles->get_active () != options.useBundledProfiles) { // we have to rescan with the old value; - bpconn.block(true); + bpconn.block (true); useBundledProfiles->set_active (false); bundledProfilesChanged(); - bpconn.block(false); + bpconn.block (false); } hide (); @@ -1861,12 +2143,12 @@ void Preferences::cancelPressed () void Preferences::selectStartupDir () { - Gtk::FileChooserDialog dialog (getToplevelWindow (this), M("PREFERENCES_DIRSELECTDLG"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER); + Gtk::FileChooserDialog dialog (getToplevelWindow (this), M ("PREFERENCES_DIRSELECTDLG"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER); // dialog.set_transient_for(*this); //Add response buttons the the dialog: - dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL); - dialog.add_button(Gtk::StockID("gtk-open"), Gtk::RESPONSE_OK); + dialog.add_button (M ("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); + dialog.add_button (M ("GENERAL_OPEN"), Gtk::RESPONSE_OK); int result = dialog.run(); @@ -1880,18 +2162,17 @@ void Preferences::aboutPressed () splash = new Splash (*this); splash->set_transient_for (*this); - splash->signal_delete_event().connect( sigc::mem_fun(*this, &Preferences::splashClosed) ); + splash->signal_delete_event().connect ( sigc::mem_fun (*this, &Preferences::splashClosed) ); splash->show (); } void Preferences::themeChanged () { - moptions.theme = theme->get_active_text (); - moptions.useSystemTheme = chUseSystemTheme->get_active (); - RTImage::setPaths(moptions); + moptions.theme = themeFNames.at (theme->get_active_row_number ()).longFName; + rtengine::setPaths (moptions); RTImage::updateImages(); - switchThemeTo(theme->get_active_text (), slimUI->get_active()); + switchThemeTo (moptions.theme); } void Preferences::forRAWComboChanged () @@ -1907,14 +2188,14 @@ void Preferences::forRAWComboChanged () } if (selectedEntry->type == PSET_FOLDER) { - rpconn.block(true); - rprofiles->set_active(currRawRow); - rpconn.block(false); + rpconn.block (true); + rprofiles->set_active (currRawRow); + rpconn.block (false); } else { currRawRow = rprofiles->get_active(); } - rprofiles->set_tooltip_text(selectedEntry->label); + rprofiles->set_tooltip_text (selectedEntry->label); } void Preferences::forImageComboChanged () @@ -1930,19 +2211,19 @@ void Preferences::forImageComboChanged () } if (selectedEntry->type == PSET_FOLDER) { - ipconn.block(true); - iprofiles->set_active(currImgRow); - ipconn.block(false); + ipconn.block (true); + iprofiles->set_active (currImgRow); + ipconn.block (false); } else { currImgRow = rprofiles->get_active(); } - iprofiles->set_tooltip_text(iprofiles->getSelectedEntry()->label); + iprofiles->set_tooltip_text (iprofiles->getSelectedEntry()->label); } void Preferences::layoutComboChanged () { - editorLayout->set_tooltip_text(editorLayout->get_active_text()); + editorLayout->set_tooltip_text (editorLayout->get_active_text()); } void Preferences::bundledProfilesChanged () @@ -1955,7 +2236,7 @@ void Preferences::bundledProfilesChanged () options.useBundledProfiles = useBundledProfiles->get_active (); // rescan the file's tree - profileStore.parseProfiles(); // This will call Preferences::updateProfileList in return + ProfileStore::getInstance()->parseProfiles(); // This will call Preferences::updateProfileList in return // restoring back the old value options.useBundledProfiles = currValue; @@ -1971,12 +2252,13 @@ void Preferences::iccDirChanged () monProfile->remove_all(); - monProfile->append (M("PREFERENCES_PROFILE_NONE")); + monProfile->append (M ("PREFERENCES_PROFILE_NONE")); - for (const auto& profile : profiles) + for (const auto& profile : profiles) { monProfile->append (profile); + } - setActiveTextOrIndex(*monProfile, currentSelection, 0); + setActiveTextOrIndex (*monProfile, currentSelection, 0); } void Preferences::storeCurrentValue() @@ -1990,24 +2272,27 @@ void Preferences::updateProfileList() { rprofiles->updateProfileList(); iprofiles->updateProfileList(); + const ProfileStoreEntry* dynpse = ProfileStore::getInstance()->getInternalDynamicPSE(); + rprofiles->addRow (dynpse); + iprofiles->addRow (dynpse); } void Preferences::restoreValue() { - if (!rprofiles->setActiveRowFromFullPath(storedValueRaw)) { + if (!rprofiles->setActiveRowFromFullPath (storedValueRaw)) { moptions.defProfRaw = DEFPROFILE_INTERNAL; - rpconn.block(true); + rpconn.block (true); rprofiles->setInternalEntry(); - rpconn.block(false); + rpconn.block (false); } currRawRow = rprofiles->get_active(); - if (!iprofiles->setActiveRowFromFullPath(storedValueImg)) { + if (!iprofiles->setActiveRowFromFullPath (storedValueImg)) { moptions.defProfImg = DEFPROFILE_INTERNAL; - ipconn.block(true); + ipconn.block (true); iprofiles->setInternalEntry(); - ipconn.block(false); + ipconn.block (false); } currImgRow = iprofiles->get_active(); @@ -2016,108 +2301,111 @@ void Preferences::restoreValue() storedValueImg = ""; } +void Preferences::switchThemeTo (Glib::ustring newTheme) +{ + + Glib::ustring filename (Glib::build_filename (argv0, "themes", newTheme + ".css")); + + if (!themecss) { + themecss = Gtk::CssProvider::create(); + Glib::RefPtr screen = Gdk::Screen::get_default(); + Gtk::StyleContext::add_provider_for_screen (screen, themecss, GTK_STYLE_PROVIDER_PRIORITY_USER); + } + + try { + themecss->load_from_path (filename); + } catch (Glib::Error &err) { + printf ("Error: Can't load css file \"%s\"\nMessage: %s\n", filename.c_str(), err.what().c_str()); + } catch (...) { + printf ("Error: Can't load css file \"%s\"\n", filename.c_str()); + } +} + void Preferences::fontChanged () { - switchFontTo(fontbutton->get_font_name()); + newFont = true; + Pango::FontDescription fd (fontButton->get_font_name()); + switchFontTo (fd.get_family(), fd.get_size() / Pango::SCALE); } -void Preferences::switchThemeTo(Glib::ustring newTheme, bool slimInterface) +void Preferences::cpFontChanged () { - std::vector files; - files.push_back (argv0 + "/themes/" + newTheme + ".gtkrc"); + newCPFont = true; +} - options.slimUI = slimInterface; +void Preferences::switchFontTo (const Glib::ustring &newFontFamily, const int newFontSize) +{ - if (slimInterface) { - files.push_back (argv0 + "/themes/slim"); - } - - Gtk::RC::set_default_files (files); - -#ifndef WIN32 - // For an unknown reason, gtkmm 2.22 don't know the gtk-button-images property, while it exists in the documentation... - // Anyway, the problem was Linux only - static Glib::RefPtr settings = Gtk::Settings::get_default(); - - if (settings) { - settings->property_gtk_button_images().set_value(true); - } else { - printf("Error: no default settings to update!\n"); - } + if (newFontFamily != "default") { + if (!fontcss) { + fontcss = Gtk::CssProvider::create(); + Glib::RefPtr screen = Gdk::Screen::get_default(); + Gtk::StyleContext::add_provider_for_screen (screen, fontcss, GTK_STYLE_PROVIDER_PRIORITY_USER); + } + try { + //GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + fontcss->load_from_data (Glib::ustring::compose ("* { font-family: %1; font-size: %2px }", newFontFamily, newFontSize)); +#else + fontcss->load_from_data (Glib::ustring::compose ("* { font-family: %1; font-size: %2pt }", newFontFamily, newFontSize)); #endif - - Gtk::RC::reparse_all (Gtk::Settings::get_default()); - GdkEventClient event = { GDK_CLIENT_EVENT, nullptr, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; - gdk_event_send_clientmessage_toall ((GdkEvent*)&event); + //GTK318 + } catch (Glib::Error &err) { + printf ("Error: \"%s\"\n", err.what().c_str()); + } catch (...) { + printf ("Error: Can't find the font named \"%s\"\n", newFontFamily.c_str()); + } + } else { + if (fontcss) { + fontcss = Gtk::CssProvider::create(); + Glib::RefPtr screen = Gdk::Screen::get_default(); + Gtk::StyleContext::remove_provider_for_screen (screen, fontcss); + } + } } void Preferences::workflowUpdate () { - if(moptions.tabbedUI != options.tabbedUI) { - parent->MoveFileBrowserToMain(); - parent->CloseOpenEditors(); - parent->SetMainCurrent(); - - if(moptions.tabbedUI) { - parent->epanel->hide_all(); - parent->set_title_decorated(""); - } else { - parent->epanel->show_all(); - parent->set_title_decorated(parent->epanel->getFileName()); - } + if (moptions.tabbedUI != options.tabbedUI) { + parent->setEditorMode (moptions.tabbedUI); } - if(moptions.hideTPVScrollbar != options.hideTPVScrollbar) { + if (moptions.hideTPVScrollbar != options.hideTPVScrollbar) { // Update the tool panels parent->updateTPVScrollbar (moptions.hideTPVScrollbar); } - if(moptions.UseIconNoText != options.UseIconNoText) { + if (moptions.UseIconNoText != options.UseIconNoText) { // Update the tool's tab titles - parent->updateTabsUsesIcons(moptions.UseIconNoText); + parent->updateTabsUsesIcons (moptions.UseIconNoText); } - if(moptions.FileBrowserToolbarSingleRow != options.FileBrowserToolbarSingleRow) { + if (moptions.FileBrowserToolbarSingleRow != options.FileBrowserToolbarSingleRow) { // Update the position of the Query toolbar - parent->updateFBQueryTB(moptions.FileBrowserToolbarSingleRow); + parent->updateFBQueryTB (moptions.FileBrowserToolbarSingleRow); } - if(moptions.showFilmStripToolBar != options.showFilmStripToolBar) { + if (moptions.showFilmStripToolBar != options.showFilmStripToolBar) { // Update the visibility of FB toolbar - parent->updateFBToolBarVisibility(moptions.showFilmStripToolBar); + parent->updateFBToolBarVisibility (moptions.showFilmStripToolBar); } - if(moptions.histogramPosition != options.histogramPosition) { + if (moptions.histogramPosition != options.histogramPosition) { // Update the position of the Histogram - parent->updateHistogramPosition(options.histogramPosition, moptions.histogramPosition); + parent->updateHistogramPosition (options.histogramPosition, moptions.histogramPosition); } -} - -void Preferences::switchFontTo(Glib::ustring newFont) -{ - - Gtk::RC::parse_string (Glib::ustring::compose( - "style \"clearlooks-default\" { font_name = \"%1\" }", newFont)); - Gtk::RC::reparse_all (Gtk::Settings::get_default()); - GdkEventClient event = { GDK_CLIENT_EVENT, nullptr, TRUE, gdk_atom_intern("_GTK_READ_RCFILES", FALSE), 8 }; - gdk_event_send_clientmessage_toall ((GdkEvent*)&event); -} - -void Preferences::useThemeChanged() -{ - - if(!chUseSystemTheme->get_active()) { - hbtheme->set_sensitive(true); - fontbutton->set_sensitive(true); - } else { - hbtheme->set_sensitive(false); - fontbutton->set_sensitive(false); + if ( moptions.rtSettings.printerProfile != options.rtSettings.printerProfile + || moptions.rtSettings.printerBPC != options.rtSettings.printerBPC + || moptions.rtSettings.printerIntent != options.rtSettings.printerIntent) { + // Update the position of the Histogram + parent->updateProfiles (moptions.rtSettings.printerProfile, moptions.rtSettings.printerIntent, moptions.rtSettings.printerBPC); } + } void Preferences::addExtPressed () @@ -2130,7 +2418,7 @@ void Preferences::addExtPressed () return; } - Gtk::TreeRow row = *(extensionModel->append()); + Gtk::TreeRow row = * (extensionModel->append()); row[extensionColumns.enabled] = true; row[extensionColumns.ext] = extension->get_text (); @@ -2145,12 +2433,16 @@ void Preferences::delExtPressed () void Preferences::moveExtUpPressed () { const Glib::RefPtr selection = extensions->get_selection (); - if (!selection) + + if (!selection) { return; + } const Gtk::TreeModel::iterator selected = selection->get_selected (); - if (!selected || selected == extensionModel->children ().begin ()) + + if (!selected || selected == extensionModel->children ().begin ()) { return; + } Gtk::TreeModel::iterator previous = selected; --previous; @@ -2160,16 +2452,22 @@ void Preferences::moveExtUpPressed () void Preferences::moveExtDownPressed () { const Glib::RefPtr selection = extensions->get_selection (); - if (!selection) + + if (!selection) { return; + } const Gtk::TreeModel::iterator selected = selection->get_selected (); - if (!selected) + + if (!selected) { return; + } Gtk::TreeModel::iterator next = selected; - if (++next) + + if (++next) { extensionModel->iter_swap (selected, next); + } } void Preferences::clearProfilesPressed () @@ -2193,9 +2491,9 @@ void Preferences::clearAllPressed () void Preferences::darkFrameChanged () { //Glib::ustring s(darkFrameDir->get_filename()); - Glib::ustring s(darkFrameDir->get_current_folder()); + Glib::ustring s (darkFrameDir->get_current_folder()); //if( s.compare( rtengine::dfm.getPathname()) !=0 ){ - rtengine::dfm.init( s ); + rtengine::dfm.init ( s ); updateDFinfos(); //} } @@ -2203,9 +2501,9 @@ void Preferences::darkFrameChanged () void Preferences::flatFieldChanged () { //Glib::ustring s(flatFieldDir->get_filename()); - Glib::ustring s(flatFieldDir->get_current_folder()); + Glib::ustring s (flatFieldDir->get_current_folder()); //if( s.compare( rtengine::ffm.getPathname()) !=0 ){ - rtengine::ffm.init( s ); + rtengine::ffm.init ( s ); updateFFinfos(); //} } @@ -2213,20 +2511,20 @@ void Preferences::flatFieldChanged () void Preferences::updateDFinfos() { int t1, t2; - rtengine::dfm.getStat(t1, t2); - Glib::ustring s = Glib::ustring::compose("%1: %2 %3, %4 %5", M("PREFERENCES_DARKFRAMEFOUND"), t1, M("PREFERENCES_DARKFRAMESHOTS"), t2, M("PREFERENCES_DARKFRAMETEMPLATES")); - dfLabel->set_text(s); + rtengine::dfm.getStat (t1, t2); + Glib::ustring s = Glib::ustring::compose ("%1: %2 %3, %4 %5", M ("PREFERENCES_DARKFRAMEFOUND"), t1, M ("PREFERENCES_DARKFRAMESHOTS"), t2, M ("PREFERENCES_DARKFRAMETEMPLATES")); + dfLabel->set_text (s); } void Preferences::updateFFinfos() { int t1, t2; - rtengine::ffm.getStat(t1, t2); - Glib::ustring s = Glib::ustring::compose("%1: %2 %3, %4 %5", M("PREFERENCES_FLATFIELDFOUND"), t1, M("PREFERENCES_FLATFIELDSHOTS"), t2, M("PREFERENCES_FLATFIELDTEMPLATES")); - ffLabel->set_text(s); + rtengine::ffm.getStat (t1, t2); + Glib::ustring s = Glib::ustring::compose ("%1: %2 %3, %4 %5", M ("PREFERENCES_FLATFIELDFOUND"), t1, M ("PREFERENCES_FLATFIELDSHOTS"), t2, M ("PREFERENCES_FLATFIELDTEMPLATES")); + ffLabel->set_text (s); } -bool Preferences::splashClosed(GdkEventAny* event) +bool Preferences::splashClosed (GdkEventAny* event) { delete splash; splash = nullptr; diff --git a/rtgui/preferences.h b/rtgui/preferences.h index a94601663..1a86c64a9 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -24,6 +24,7 @@ #include "options.h" #include #include "rtwindow.h" +#include "dynamicprofilepanel.h" class Preferences : public Gtk::Dialog, public ProfileStoreListener { @@ -60,11 +61,21 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener add(addsetid); } }; + + class ThemeFilename + { + public: + Glib::ustring shortFName; + Glib::ustring longFName; + + ThemeFilename (Glib::ustring sfname, Glib::ustring lfname) : shortFName(sfname), longFName(lfname) {} + }; + Glib::RefPtr behModel; BehavColumns behavColumns; - - -protected: + std::vector themeFNames; + Glib::RefPtr regex; + Glib::MatchInfo matchInfo; Splash* splash; ProfileStoreComboBox* rprofiles; Gtk::TreeIter currRawRow; // :) @@ -95,6 +106,9 @@ protected: Gtk::CheckButton* showExpComp; Gtk::FileChooserButton* iccDir; + Gtk::ComboBoxText* prtProfile; + Gtk::ComboBoxText* prtIntent; + Gtk::CheckButton* prtBPC; Gtk::ComboBoxText* monProfile; Gtk::ComboBoxText* monIntent; Gtk::CheckButton* monBPC; @@ -108,9 +122,9 @@ protected: Gtk::SpinButton* panFactor; Gtk::CheckButton* rememberZoomPanCheckbutton; - Gtk::ComboBoxText* view; - Gtk::ComboBoxText* grey; - Gtk::ComboBoxText* greySc; + // Gtk::ComboBoxText* view; +// Gtk::ComboBoxText* grey; +// Gtk::ComboBoxText* greySc; Gtk::ComboBoxText* dnv; Gtk::ComboBoxText* dnti; Gtk::ComboBoxText* dnaut; @@ -128,10 +142,7 @@ protected: Gtk::ComboBoxText* curveBBoxPosC; Gtk::ComboBoxText* theme; - Gtk::CheckButton* slimUI; - Gtk::HBox* hbtheme; - Gtk::CheckButton* chUseSystemTheme; - Gtk::FontButton* fontbutton; + Gtk::FontButton* fontButton; Gtk::FontButton* colorPickerFontButton; Gtk::ColorButton* butCropCol; Gtk::ColorButton* butNavGuideCol; @@ -166,8 +177,7 @@ protected: Gtk::Button* behSetAll; Gtk::CheckButton* chOverwriteOutputFile; - Gtk::CheckButton* saveParamsFile; - Gtk::CheckButton* saveParamsCache; + Gtk::ComboBoxText* saveParamsPreference; Gtk::CheckButton* useBundledProfiles; Gtk::ComboBoxText* loadParamsPreference; Gtk::ComboBoxText* editorLayout; @@ -191,35 +201,41 @@ protected: Gtk::CheckButton* ckbHideTPVScrollbar; Gtk::CheckButton* ckbUseIconNoText; + DynamicProfilePanel *dynProfilePanel; + Glib::ustring storedValueRaw; Glib::ustring storedValueImg; Options moptions; - sigc::connection tconn, sconn, fconn, usethcon, addc, setc, dfconn, ffconn, bpconn, rpconn, ipconn; + sigc::connection tconn, sconn, fconn, cpfconn, addc, setc, dfconn, ffconn, bpconn, rpconn, ipconn; sigc::connection autoMonProfileConn, sndEnableConn, langAutoDetectConn, autocielabConn; Glib::ustring initialTheme; - Glib::ustring initialFont; - - bool oldSlimUI; + Glib::ustring initialFontFamily; + int initialFontSize; + bool newFont; + bool newCPFont; void fillPreferences (); void storePreferences (); void parseDir (Glib::ustring dirname, std::vector& items, Glib::ustring ext); + void parseThemeDir (Glib::ustring dirname); void updateDFinfos (); void updateFFinfos (); void workflowUpdate(); void themeChanged (); - void useThemeChanged(); void fontChanged (); + void cpFontChanged (); void forRAWComboChanged (); void forImageComboChanged (); void layoutComboChanged (); void bundledProfilesChanged (); void iccDirChanged (); - void switchThemeTo (Glib::ustring newTheme, bool slimInterface); - void switchFontTo (Glib::ustring newFont); + void switchThemeTo (Glib::ustring newTheme); + void switchFontTo (const Glib::ustring &newFontFamily, const int newFontSize); bool splashClosed(GdkEventAny* event); + int getThemeRowNumber(Glib::ustring& longThemeFName); + void appendBehavList (Gtk::TreeModel::iterator& parent, Glib::ustring label, int id, bool set); Gtk::Widget* getProcParamsPanel (); @@ -229,6 +245,7 @@ protected: Gtk::Widget* getBatchProcPanel (); Gtk::Widget* getPerformancePanel (); Gtk::Widget* getSoundPanel (); + Gtk::Widget* getDynProfilePanel (); public: explicit Preferences (RTWindow *rtwindow); diff --git a/rtgui/previewhandler.cc b/rtgui/previewhandler.cc index 650e323eb..45e46d2d8 100644 --- a/rtgui/previewhandler.cc +++ b/rtgui/previewhandler.cc @@ -23,6 +23,18 @@ using namespace rtengine; using namespace rtengine::procparams; +namespace +{ + +struct iaimgpar { + IImage8* image; + PreviewHandlerIdleHelper* pih; + double scale; + CropParams cp; +}; + +} + PreviewHandler::PreviewHandler () : image(nullptr), previewScale(1.) { @@ -34,6 +46,7 @@ PreviewHandler::PreviewHandler () : image(nullptr), previewScale(1.) PreviewHandler::~PreviewHandler () { + idle_register.destroy(); if (pih->pending) { pih->destroyed = true; @@ -44,50 +57,8 @@ PreviewHandler::~PreviewHandler () //----------------previewimagelistener functions-------------------- -struct iaimgpar { - IImage8* image; - PreviewHandlerIdleHelper* pih; - double scale; - CropParams cp; -}; - -int setImageUI (void* data) -{ - iaimgpar* iap = static_cast(data); - PreviewHandlerIdleHelper* pih = iap->pih; - - if (pih->destroyed) { - if (pih->pending == 1) { - delete pih; - } else { - pih->pending--; - } - - delete iap; - - return 0; - } - - if (pih->phandler->image) { - IImage8* oldImg = pih->phandler->image; - oldImg->getMutex().lock (); - pih->phandler->image = iap->image; - oldImg->getMutex().unlock (); - } else { - pih->phandler->image = iap->image; - } - - pih->phandler->cropParams = iap->cp; - pih->phandler->previewScale = iap->scale; - pih->pending--; - delete iap; - - return 0; -} - void PreviewHandler::setImage (rtengine::IImage8* i, double scale, rtengine::procparams::CropParams cp) { - pih->pending++; iaimgpar* iap = new iaimgpar; @@ -96,95 +67,123 @@ void PreviewHandler::setImage (rtengine::IImage8* i, double scale, rtengine::pro iap->scale = scale; iap->cp = cp; - g_idle_add (setImageUI, iap); -} + const auto func = [](gpointer data) -> gboolean { + iaimgpar* const iap = static_cast(data); + PreviewHandlerIdleHelper* const pih = iap->pih; + if (pih->destroyed) { + if (pih->pending == 1) { + delete pih; + } else { + pih->pending--; + } -int delImageUI (void* data) -{ + delete iap; - iaimgpar* iap = static_cast(data); - PreviewHandlerIdleHelper* pih = iap->pih; - - if (pih->destroyed) { - if (pih->pending == 1) { - delete pih; - } else { - pih->pending--; + return FALSE; } + if (pih->phandler->image) { + IImage8* const oldImg = pih->phandler->image; + oldImg->getMutex().lock (); + pih->phandler->image = iap->image; + oldImg->getMutex().unlock (); + } else { + pih->phandler->image = iap->image; + } + + pih->phandler->cropParams = iap->cp; + pih->phandler->previewScale = iap->scale; + pih->pending--; delete iap; - return 0; - } + return FALSE; + }; - if (pih->phandler->image) { - IImage8* oldImg = pih->phandler->image; - oldImg->getMutex().lock (); - pih->phandler->image = nullptr; - oldImg->getMutex().unlock (); - } - - iap->image->free (); - pih->phandler->previewImgMutex.lock (); - pih->phandler->previewImg.clear (); - pih->phandler->previewImgMutex.unlock (); - - pih->pending--; - delete iap; - - return 0; + idle_register.add(func, iap); } + void PreviewHandler::delImage (IImage8* i) { - pih->pending++; iaimgpar* iap = new iaimgpar; iap->image = i; iap->pih = pih; - g_idle_add (delImageUI, iap); -} + const auto func = [](gpointer data) -> gboolean { + iaimgpar* iap = static_cast(data); + PreviewHandlerIdleHelper* pih = iap->pih; -int imageReadyUI (void* data) -{ + if (pih->destroyed) { + if (pih->pending == 1) { + delete pih; + } else { + pih->pending--; + } - iaimgpar* iap = static_cast(data); - PreviewHandlerIdleHelper* pih = iap->pih; + delete iap; - if (pih->destroyed) { - if (pih->pending == 1) { - delete pih; - } else { - pih->pending--; + return FALSE; } + if (pih->phandler->image) { + IImage8* oldImg = pih->phandler->image; + oldImg->getMutex().lock (); + pih->phandler->image = nullptr; + oldImg->getMutex().unlock (); + } + + iap->image->free (); + pih->phandler->previewImgMutex.lock (); + pih->phandler->previewImg.clear (); + pih->phandler->previewImgMutex.unlock (); + + pih->pending--; delete iap; - return 0; - } + return FALSE; + }; - pih->phandler->previewImgMutex.lock (); - pih->phandler->previewImg = Gdk::Pixbuf::create_from_data (pih->phandler->image->getData(), Gdk::COLORSPACE_RGB, false, 8, pih->phandler->image->getWidth(), pih->phandler->image->getHeight(), 3 * pih->phandler->image->getWidth()); - pih->phandler->previewImgMutex.unlock (); - pih->phandler->cropParams = iap->cp; - pih->phandler->previewImageChanged (); - pih->pending--; - delete iap; - - return 0; + idle_register.add(func, iap); } void PreviewHandler::imageReady (CropParams cp) { - pih->pending++; iaimgpar* iap = new iaimgpar; iap->pih = pih; iap->cp = cp; - g_idle_add (imageReadyUI, iap); + + const auto func = [](gpointer data) -> gboolean { + iaimgpar* const iap = static_cast(data); + PreviewHandlerIdleHelper* pih = iap->pih; + + if (pih->destroyed) { + if (pih->pending == 1) { + delete pih; + } else { + pih->pending--; + } + + delete iap; + + return FALSE; + } + + pih->phandler->previewImgMutex.lock (); + pih->phandler->previewImg = Gdk::Pixbuf::create_from_data (pih->phandler->image->getData(), Gdk::COLORSPACE_RGB, false, 8, pih->phandler->image->getWidth(), pih->phandler->image->getHeight(), 3 * pih->phandler->image->getWidth()); + pih->phandler->previewImgMutex.unlock (); + pih->phandler->cropParams = iap->cp; + pih->phandler->previewImageChanged (); + pih->pending--; + delete iap; + + return FALSE; + }; + + idle_register.add(func, iap); } Glib::RefPtr PreviewHandler::getRoughImage (int x, int y, int w, int h, double zoom) diff --git a/rtgui/previewhandler.h b/rtgui/previewhandler.h index a0e6ca242..1258083ec 100644 --- a/rtgui/previewhandler.h +++ b/rtgui/previewhandler.h @@ -19,11 +19,15 @@ #ifndef _PREVIEWHANDLER_ #define _PREVIEWHANDLER_ -#include "../rtengine/rtengine.h" -#include "threadutils.h" -#include #include +#include + +#include "threadutils.h" +#include "guiutils.h" + +#include "../rtengine/rtengine.h" + class PreviewListener { @@ -41,11 +45,13 @@ struct PreviewHandlerIdleHelper { class PreviewHandler : public rtengine::PreviewImageListener { - +private: friend int setImageUI (void* data); friend int delImageUI (void* data); friend int imageReadyUI (void* data); + IdleRegister idle_register; + protected: rtengine::IImage8* image; rtengine::procparams::CropParams cropParams; diff --git a/rtgui/previewloader.cc b/rtgui/previewloader.cc index 4bdffc512..0c0ecf9f6 100644 --- a/rtgui/previewloader.cc +++ b/rtgui/previewloader.cc @@ -130,6 +130,7 @@ public: } if ( tmb ) { + DEBUG("Preview Ready\n"); j.listener_->previewReady(j.dir_id_, new FileBrowserEntry(tmb, j.dir_entry_)); // Issue 2406 fdn = new FileBrowserEntry(tmb,j.dir_entry_); } diff --git a/rtgui/previewmodepanel.cc b/rtgui/previewmodepanel.cc index 601103fa8..50beb8b66 100644 --- a/rtgui/previewmodepanel.cc +++ b/rtgui/previewmodepanel.cc @@ -93,7 +93,6 @@ PreviewModePanel::PreviewModePanel (ImageArea* ia) : imageArea(ia) backColor2->set_active (options.bgcolor == 2); vbbackColor = Gtk::manage (new Gtk::VBox ()); - vbbackColor->set_border_width (0); vbbackColor->pack_start (*backColor0, Gtk::PACK_SHRINK, 0); vbbackColor->pack_start (*backColor1, Gtk::PACK_SHRINK, 0); vbbackColor->pack_start (*backColor2, Gtk::PACK_SHRINK, 0); @@ -227,7 +226,7 @@ void PreviewModePanel::buttonToggled (Gtk::ToggleButton* tbpreview) int PreviewModePanel::GetbackColor() { - int backColor; + int backColor = 0; if (backColor0->get_active ()) { backColor = 0; diff --git a/rtgui/previewwindow.cc b/rtgui/previewwindow.cc index 7d4eaaa0a..cd4e0c75c 100644 --- a/rtgui/previewwindow.cc +++ b/rtgui/previewwindow.cc @@ -21,9 +21,12 @@ #include "imagearea.h" #include "cursormanager.h" -PreviewWindow::PreviewWindow () : previewHandler(nullptr), mainCropWin(nullptr), imageArea(nullptr), imgX(0), imgY(0), imgW(0), imgH(0), zoom(0.0), isMoving(false), needsUpdate(false) -{ +PreviewWindow::PreviewWindow () : previewHandler(nullptr), mainCropWin(nullptr), imageArea(nullptr), imgX(0), imgY(0), imgW(0), imgH(0), + zoom(0.0), press_x(0), press_y(0), isMoving(false), needsUpdate(false), cursor_type(CSUndefined) +{ + set_name("PreviewWindow"); + get_style_context()->add_class("drawingarea"); rconn = signal_size_allocate().connect( sigc::mem_fun(*this, &PreviewWindow::on_resized) ); } @@ -31,7 +34,7 @@ void PreviewWindow::on_realize () { Gtk::DrawingArea::on_realize (); - add_events(Gdk::EXPOSURE_MASK | Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::SCROLL_MASK); + add_events(Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::SCROLL_MASK); } void PreviewWindow::getObservedFrameArea (int& x, int& y, int& w, int& h) @@ -59,8 +62,16 @@ void PreviewWindow::updatePreviewImage () return; } - backBuffer = Gdk::Pixmap::create (wind, W, H, -1); - backBuffer->draw_rectangle (get_style()->get_base_gc(Gtk::STATE_NORMAL), true, 0, 0, W, H); + backBuffer = Cairo::RefPtr ( new BackBuffer(W, H, Cairo::FORMAT_ARGB32) ); + Cairo::RefPtr surface = backBuffer->getSurface(); + Glib::RefPtr style = get_style_context(); + Cairo::RefPtr cc = Cairo::Context::create(surface); + cc->set_source_rgba (0., 0., 0., 0.); + cc->set_operator (Cairo::OPERATOR_CLEAR); + cc->paint (); + cc->set_operator (Cairo::OPERATOR_OVER); + cc->set_antialias(Cairo::ANTIALIAS_NONE); + cc->set_line_join(Cairo::LINE_JOIN_MITER); if (previewHandler) { Glib::RefPtr resPixbuf = previewHandler->getRoughImage (W, H, zoom); @@ -70,11 +81,12 @@ void PreviewWindow::updatePreviewImage () imgH = resPixbuf->get_height(); imgX = (W - imgW) / 2; imgY = (H - imgH) / 2; - backBuffer->draw_pixbuf (get_style()->get_base_gc(Gtk::STATE_NORMAL), resPixbuf, 0, 0, imgX, imgY, -1, -1, Gdk::RGB_DITHER_NONE, 0, 0); - Cairo::RefPtr cr = backBuffer->create_cairo_context(); + Gdk::Cairo::set_source_pixbuf(cc, resPixbuf, imgX, imgY); + cc->rectangle(imgX, imgY, imgW, imgH); + cc->fill(); if (previewHandler->getCropParams().enabled) { - drawCrop (cr, imgX, imgY, imgW, imgH, 0, 0, zoom, previewHandler->getCropParams(), true, false); + drawCrop (cc, imgX, imgY, imgW, imgH, 0, 0, zoom, previewHandler->getCropParams(), true, false); } } } @@ -97,17 +109,18 @@ void PreviewWindow::on_resized (Gtk::Allocation& req) queue_draw (); } -bool PreviewWindow::on_expose_event (GdkEventExpose* event) +bool PreviewWindow::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) { + const Glib::RefPtr style = get_style_context(); + style->render_background(cr, 0, 0, get_width(), get_height()); if (!backBuffer) { return true; } - Glib::RefPtr window = get_window(); - int bufferW, bufferH; - backBuffer->get_size (bufferW, bufferH); + bufferW = backBuffer->getWidth(); + bufferH = backBuffer->getHeight(); if (!mainCropWin && imageArea) { mainCropWin = imageArea->getMainCropWindow (); @@ -122,10 +135,9 @@ bool PreviewWindow::on_expose_event (GdkEventExpose* event) updatePreviewImage (); } - window->draw_drawable (get_style()->get_base_gc(Gtk::STATE_NORMAL), backBuffer, 0, 0, 0, 0, -1, -1); + backBuffer->copySurface(cr, NULL); if (mainCropWin && zoom > 0.0) { - Cairo::RefPtr cr = get_window()->create_cairo_context(); int x, y, w, h; getObservedFrameArea (x, y, w, h); if (x>imgX || y>imgY || w < imgW || h < imgH) { @@ -136,7 +148,8 @@ bool PreviewWindow::on_expose_event (GdkEventExpose* event) // draw a black "shadow" line cr->set_source_rgba (0.0, 0.0, 0.0, 0.65); - cr->set_line_width (1); + cr->set_line_width (1.); + cr->set_line_join(Cairo::LINE_JOIN_MITER); cr->rectangle (rectX + 1., rectY + 1, rectW, rectH); cr->stroke (); @@ -147,6 +160,8 @@ bool PreviewWindow::on_expose_event (GdkEventExpose* event) } } + style->render_frame (cr, 0, 0, get_width(), get_height()); + return true; } @@ -196,20 +211,26 @@ bool PreviewWindow::on_motion_notify_event (GdkEventMotion* event) int x, y, w, h; getObservedFrameArea (x, y, w, h); if (x>imgX || y>imgY || w < imgW || h < imgH) { - bool inside = event->x > x - 6 && event->x < x + w - 1 + 6 && event->y > y - 6 && event->y < y + h - 1 + 6; - bool moreInside = event->x > x + 6 && event->x < x + w - 1 - 6 && event->y > y + 6 && event->y < y + h - 1 - 6; + bool inside = event->x > x - 6 && event->x < x + w - 1 + 6 && event->y > y - 6 && event->y < y + h - 1 + 6; + + CursorShape newType = cursor_type; if (isMoving) { mainCropWin->remoteMove ((event->x - press_x) / zoom, (event->y - press_y) / zoom); press_x = event->x; press_y = event->y; - } else if (inside && !moreInside) { - cursorManager.setCursor (get_window(), CSClosedHand); + } else if (inside) { + newType = CSClosedHand; } else { - cursorManager.setCursor (get_window(), CSArrow); + newType = CSArrow; + } + + if (newType != cursor_type) { + cursor_type = newType; + CursorManager::setWidgetCursor(get_window(), cursor_type); } } - + return true; } @@ -225,20 +246,15 @@ bool PreviewWindow::on_button_press_event (GdkEventButton* event) if (x>imgX || y>imgY || w < imgW || h < imgH) { if (!isMoving) { - bool inside = event->x > x - 6 && event->x < x + w - 1 + 6 && event->y > y - 6 && event->y < y + h - 1 + 6; - bool moreInside = event->x > x + 6 && event->x < x + w - 1 - 6 && event->y > y + 6 && event->y < y + h - 1 - 6; isMoving = true; - if (!inside || moreInside) { - mainCropWin->remoteMove ((event->x - (x + w / 2)) / zoom, (event->y - (y + h / 2)) / zoom); - press_x = x + w / 2; - press_y = y + h / 2; - } else { - press_x = event->x; - press_y = event->y; - } + press_x = event->x; + press_y = event->y; - cursorManager.setCursor (get_window(), CSClosedHand); + if (cursor_type != CSClosedHand) { + cursor_type = CSClosedHand; + CursorManager::setWidgetCursor(get_window(), cursor_type); + } } } @@ -254,9 +270,41 @@ bool PreviewWindow::on_button_release_event (GdkEventButton* event) if (isMoving) { isMoving = false; - cursorManager.setCursor (get_window(), CSArrow); + + if (cursor_type != CSArrow) { + cursor_type = CSArrow; + CursorManager::setWidgetCursor(get_window(), cursor_type); + } + mainCropWin->remoteMoveReady (); } return true; } + +Gtk::SizeRequestMode PreviewWindow::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_CONSTANT_SIZE; +} + +void PreviewWindow::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const +{ + minimum_height= 50; + natural_height = 100; +} + +void PreviewWindow::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + minimum_width = 80; + natural_width = 120; +} + +void PreviewWindow::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + get_preferred_height_vfunc(minimum_height, natural_height); +} + +void PreviewWindow::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + get_preferred_width_vfunc (minimum_width, natural_width); +} diff --git a/rtgui/previewwindow.h b/rtgui/previewwindow.h index 275f4bbe3..f50411170 100644 --- a/rtgui/previewwindow.h +++ b/rtgui/previewwindow.h @@ -22,21 +22,24 @@ #include #include "previewhandler.h" #include "cropwindow.h" +#include "guiutils.h" +#include "cursormanager.h" class PreviewWindow : public Gtk::DrawingArea, public PreviewListener, public CropWindowListener { private: - Glib::RefPtr backBuffer; + Cairo::RefPtr backBuffer; PreviewHandler* previewHandler; sigc::connection rconn; CropWindow* mainCropWin; ImageArea* imageArea; int imgX, imgY, imgW, imgH; double zoom; - int press_x, press_y; + double press_x, press_y; bool isMoving; bool needsUpdate; + CursorShape cursor_type; void updatePreviewImage (); void getObservedFrameArea (int& x, int& y, int& w, int& h); @@ -49,10 +52,15 @@ public: void on_realize (); void on_resized (Gtk::Allocation& req); - bool on_expose_event (GdkEventExpose* event); + bool on_draw (const ::Cairo::RefPtr< Cairo::Context> &cr); bool on_motion_notify_event (GdkEventMotion* event); bool on_button_press_event (GdkEventButton* event); bool on_button_release_event(GdkEventButton* event); + Gtk::SizeRequestMode get_request_mode_vfunc () const; + void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const; + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; // PreviewListener interface void previewImageChanged (); diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc index ad1cfccc3..6d317f5a4 100644 --- a/rtgui/profilepanel.cc +++ b/rtgui/profilepanel.cc @@ -18,9 +18,9 @@ */ #include "profilepanel.h" #include "options.h" -#include "profilestore.h" #include "clipboard.h" #include "multilangmgr.h" +#include "profilestorecombobox.h" #include "rtimage.h" using namespace rtengine; @@ -29,9 +29,9 @@ using namespace rtengine::procparams; PartialPasteDlg* ProfilePanel::partialProfileDlg; -void ProfilePanel::init () +void ProfilePanel::init (Gtk::Window* parent) { - partialProfileDlg = new PartialPasteDlg("Foo"); + partialProfileDlg = new PartialPasteDlg (Glib::ustring (), parent); } void ProfilePanel::cleanup () @@ -39,7 +39,7 @@ void ProfilePanel::cleanup () delete partialProfileDlg; } -ProfilePanel::ProfilePanel (bool readOnly) : storedPProfile(nullptr), lastFilename(""), imagePath("") +ProfilePanel::ProfilePanel () : storedPProfile(nullptr), lastFilename(""), imagePath(""), lastSavedPSE(nullptr), customPSE(nullptr) { tpc = nullptr; @@ -51,82 +51,61 @@ ProfilePanel::ProfilePanel (bool readOnly) : storedPProfile(nullptr), lastFilena fillMode->add( options.filledProfile ? *profileFillModeOnImage : *profileFillModeOffImage ); fillMode->signal_toggled().connect ( sigc::mem_fun(*this, &ProfilePanel::profileFillModeToggled) ); fillMode->set_tooltip_text(M("PROFILEPANEL_MODE_TIP")); +//GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + fillMode->set_margin_right(2); +#endif +//GTK318 + setExpandAlignProperties(fillMode, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); // Create the Combobox profiles = Gtk::manage (new ProfileStoreComboBox ()); - - Gtk::HBox* hbox = Gtk::manage (new Gtk::HBox ()); - hbox->show (); -// pack_start (*profiles, Gtk::PACK_SHRINK, 4); - - pack_start (*hbox, Gtk::PACK_SHRINK, 4); + setExpandAlignProperties(profiles, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); load = Gtk::manage (new Gtk::Button ()); load->add (*Gtk::manage (new RTImage ("gtk-open.png"))); - - if (!readOnly) { - save = Gtk::manage (new Gtk::Button ()); - } - - if (!readOnly) { - save->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); - } - - if (!readOnly) { - copy = Gtk::manage (new Gtk::Button ()); - } - - if (!readOnly) { - copy->add (*Gtk::manage (new RTImage ("edit-copy.png"))); - } - + load->get_style_context()->add_class("Left"); + load->set_margin_left(2); + setExpandAlignProperties(load, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); + save = Gtk::manage (new Gtk::Button ()); + save->add (*Gtk::manage (new RTImage ("gtk-save-large.png"))); + save->get_style_context()->add_class("MiddleH"); + setExpandAlignProperties(save, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); + copy = Gtk::manage (new Gtk::Button ()); + copy->add (*Gtk::manage (new RTImage ("edit-copy.png"))); + copy->get_style_context()->add_class("MiddleH"); + setExpandAlignProperties(copy, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); paste = Gtk::manage (new Gtk::Button ()); paste->add (*Gtk::manage (new RTImage ("edit-paste.png"))); + paste->get_style_context()->add_class("Right"); + setExpandAlignProperties(paste, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); - hbox->pack_start (*fillMode, Gtk::PACK_SHRINK, 1); - hbox->pack_start (*profiles); - hbox->pack_start (*load, Gtk::PACK_SHRINK, 1); + attach_next_to (*fillMode, Gtk::POS_RIGHT, 1, 1); + attach_next_to (*profiles, Gtk::POS_RIGHT, 1, 1); + attach_next_to (*load, Gtk::POS_RIGHT, 1, 1); + attach_next_to (*save, Gtk::POS_RIGHT, 1, 1); + attach_next_to (*copy, Gtk::POS_RIGHT, 1, 1); + attach_next_to (*paste, Gtk::POS_RIGHT, 1, 1); - if (!readOnly) { - hbox->pack_start (*save, Gtk::PACK_SHRINK, 1); - } - - hbox->pack_start (*copy, Gtk::PACK_SHRINK, 1); - - if (!readOnly) { - hbox->pack_start (*paste, Gtk::PACK_SHRINK, 1); - } + setExpandAlignProperties(this, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + show (); load->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &ProfilePanel::load_clicked) ); - - if (!readOnly) { - save->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &ProfilePanel::save_clicked) ); - } - - if (!readOnly) { - copy->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &ProfilePanel::copy_clicked) ); - } - + save->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &ProfilePanel::save_clicked) ); + copy->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &ProfilePanel::copy_clicked) ); paste->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &ProfilePanel::paste_clicked) ); custom = nullptr; lastsaved = nullptr; dontupdate = false; - profileStore.addListener(this); + ProfileStore::getInstance()->addListener(this); changeconn = profiles->signal_changed().connect( sigc::mem_fun(*this, &ProfilePanel::selection_changed) ); load->set_tooltip_markup (M("PROFILEPANEL_TOOLTIPLOAD")); - - if (!readOnly) { - save->set_tooltip_markup (M("PROFILEPANEL_TOOLTIPSAVE")); - } - - if (!readOnly) { - copy->set_tooltip_markup (M("PROFILEPANEL_TOOLTIPCOPY")); - } - + save->set_tooltip_markup (M("PROFILEPANEL_TOOLTIPSAVE")); + copy->set_tooltip_markup (M("PROFILEPANEL_TOOLTIPCOPY")); paste->set_tooltip_markup (M("PROFILEPANEL_TOOLTIPPASTE")); show_all_children (); @@ -135,7 +114,7 @@ ProfilePanel::ProfilePanel (bool readOnly) : storedPProfile(nullptr), lastFilena ProfilePanel::~ProfilePanel () { - profileStore.removeListener(this); + ProfileStore::getInstance()->removeListener(this); if (custom) { custom->deleteInstance(); @@ -149,6 +128,8 @@ ProfilePanel::~ProfilePanel () delete profileFillModeOnImage; delete profileFillModeOffImage; + delete lastSavedPSE; + delete customPSE; } bool ProfilePanel::isCustomSelected() @@ -185,14 +166,24 @@ Gtk::TreeIter ProfilePanel::getLastSavedRow() Gtk::TreeIter ProfilePanel::addCustomRow() { - const ProfileStoreEntry *customPSE = new ProfileStoreEntry(Glib::ustring ("(" + M("PROFILEPANEL_PCUSTOM") + ")"), PSET_FILE, 0, 0); + if(customPSE) { + delete customPSE; + customPSE = nullptr; + } + + customPSE = new ProfileStoreEntry(Glib::ustring ("(" + M("PROFILEPANEL_PCUSTOM") + ")"), PSET_FILE, 0, 0); Gtk::TreeIter newEntry = profiles->addRow(customPSE); return newEntry; } Gtk::TreeIter ProfilePanel::addLastSavedRow() { - const ProfileStoreEntry *lastSavedPSE = new ProfileStoreEntry(Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")"), PSET_FILE, 0, 0); + if(lastSavedPSE) { + delete lastSavedPSE; + lastSavedPSE = nullptr; + } + + lastSavedPSE = new ProfileStoreEntry(Glib::ustring ("(" + M("PROFILEPANEL_PLASTSAVED") + ")"), PSET_FILE, 0, 0); Gtk::TreeIter newEntry = profiles->addRow(lastSavedPSE); return newEntry; } @@ -209,7 +200,7 @@ void ProfilePanel::storeCurrentValue () const ProfileStoreEntry *entry = profiles->getSelectedEntry(); const PartialProfile *currProfile; - if (entry && (currProfile = profileStore.getProfile(entry)) != nullptr) { + if (entry && (currProfile = ProfileStore::getInstance()->getProfile(entry)) != nullptr) { // now storedPProfile has the current entry's values storedPProfile = new PartialProfile(currProfile->pparams, currProfile->pedited, true); } else { @@ -294,19 +285,19 @@ void ProfilePanel::save_clicked (GdkEventButton* event) } catch (Glib::Error&) {} //Add response buttons the the dialog: - dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL); - dialog.add_button(Gtk::StockID("gtk-save"), Gtk::RESPONSE_OK); + dialog.add_button(M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); + dialog.add_button(M("GENERAL_SAVE"), Gtk::RESPONSE_OK); //Add filters, so that only certain file types can be selected: - Gtk::FileFilter filter_pp; - filter_pp.set_name(M("FILECHOOSER_FILTER_PP")); - filter_pp.add_pattern("*" + paramFileExtension); + Glib::RefPtr filter_pp = Gtk::FileFilter::create(); + filter_pp->set_name(M("FILECHOOSER_FILTER_PP")); + filter_pp->add_pattern("*" + paramFileExtension); dialog.add_filter(filter_pp); - Gtk::FileFilter filter_any; - filter_any.set_name(M("FILECHOOSER_FILTER_ANY")); - filter_any.add_pattern("*"); + Glib::RefPtr filter_any = Gtk::FileFilter::create(); + filter_any->set_name(M("FILECHOOSER_FILTER_ANY")); + filter_any->add_pattern("*"); dialog.add_filter(filter_any); // dialog.set_do_overwrite_confirmation (true); @@ -316,6 +307,8 @@ void ProfilePanel::save_clicked (GdkEventButton* event) do { if (dialog.run() == Gtk::RESPONSE_OK) { + dialog.hide(); + std::string fname = dialog.get_filename(); Glib::ustring ext = getExtension (fname); @@ -337,7 +330,7 @@ void ProfilePanel::save_clicked (GdkEventButton* event) toSave = lastsaved; } else { const ProfileStoreEntry* entry = profiles->getSelectedEntry(); - toSave = entry ? profileStore.getProfile (profiles->getSelectedEntry()) : nullptr; + toSave = entry ? ProfileStore::getInstance()->getProfile (profiles->getSelectedEntry()) : nullptr; } if (toSave) { @@ -362,7 +355,7 @@ void ProfilePanel::save_clicked (GdkEventButton* event) } else { done = true; bool ccPrevState = changeconn.block(true); - profileStore.parseProfiles(); + ProfileStore::getInstance()->parseProfiles(); changeconn.block (ccPrevState); } } else { @@ -374,7 +367,7 @@ void ProfilePanel::save_clicked (GdkEventButton* event) } else { done = true; bool ccPrevState = changeconn.block(true); - profileStore.parseProfiles(); + ProfileStore::getInstance()->parseProfiles(); changeconn.block (ccPrevState); } } @@ -407,7 +400,7 @@ void ProfilePanel::copy_clicked (GdkEventButton* event) toSave = lastsaved; } else { const ProfileStoreEntry* entry = profiles->getSelectedEntry(); - toSave = entry ? profileStore.getProfile (entry) : nullptr; + toSave = entry ? ProfileStore::getInstance()->getProfile (entry) : nullptr; } // toSave has to be a complete procparams @@ -459,19 +452,19 @@ void ProfilePanel::load_clicked (GdkEventButton* event) } catch (Glib::Error&) {} //Add response buttons the the dialog: - dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL); - dialog.add_button(Gtk::StockID("gtk-open"), Gtk::RESPONSE_OK); + dialog.add_button(M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL); + dialog.add_button(M("GENERAL_OPEN"), Gtk::RESPONSE_OK); //Add filters, so that only certain file types can be selected: - Gtk::FileFilter filter_pp; - filter_pp.set_name(M("FILECHOOSER_FILTER_PP")); - filter_pp.add_pattern("*" + paramFileExtension); + Glib::RefPtr filter_pp = Gtk::FileFilter::create(); + filter_pp->set_name(M("FILECHOOSER_FILTER_PP")); + filter_pp->add_pattern("*" + paramFileExtension); dialog.add_filter(filter_pp); - Gtk::FileFilter filter_any; - filter_any.set_name(M("FILECHOOSER_FILTER_ANY")); - filter_any.add_pattern("*"); + Glib::RefPtr filter_any = Gtk::FileFilter::create(); + filter_any->set_name(M("FILECHOOSER_FILTER_ANY")); + filter_any->add_pattern("*"); dialog.add_filter(filter_any); int result = dialog.run(); @@ -578,7 +571,7 @@ void ProfilePanel::paste_clicked (GdkEventButton* event) const ProfileStoreEntry* entry = profiles->getSelectedEntry(); if (entry) { - const PartialProfile* partProfile = profileStore.getProfile (entry); + const PartialProfile* partProfile = ProfileStore::getInstance()->getProfile (entry); *custom->pparams = *partProfile->pparams; } } @@ -595,7 +588,7 @@ void ProfilePanel::paste_clicked (GdkEventButton* event) const ProfileStoreEntry* entry = profiles->getSelectedEntry(); if (entry) { - const PartialProfile* partProfile = profileStore.getProfile (entry); + const PartialProfile* partProfile = ProfileStore::getInstance()->getProfile (entry); *custom->pparams = *partProfile->pparams; } } @@ -679,7 +672,7 @@ void ProfilePanel::selection_changed () currRow = profiles->get_active(); } - const PartialProfile* s = profileStore.getProfile (pse); + const PartialProfile* s = ProfileStore::getInstance()->getProfile (pse); if (s) { if (fillMode->get_active() && s->pedited) { @@ -760,16 +753,15 @@ void ProfilePanel::initProfile (const Glib::ustring& profileFullPath, ProcParams // adding the Last Saved combobox entry, if needed if (lastsaved) { - defprofile = lastsaved; lasSavedEntry = getLastSavedRow(); } - if (!(pse = profileStore.findEntryFromFullPath(profileFullPath))) { + if (!(pse = ProfileStore::getInstance()->findEntryFromFullPath(profileFullPath))) { // entry not found, pse = the Internal ProfileStoreEntry - pse = profileStore.getInternalDefaultPSE(); + pse = ProfileStore::getInstance()->getInternalDefaultPSE(); } - defprofile = profileStore.getProfile (pse); + defprofile = ProfileStore::getInstance()->getProfile (pse); // selecting the "Internal" entry profiles->setInternalEntry (); diff --git a/rtgui/profilepanel.h b/rtgui/profilepanel.h index b0b1ac021..ddd7133ca 100644 --- a/rtgui/profilepanel.h +++ b/rtgui/profilepanel.h @@ -24,12 +24,12 @@ #include "../rtengine/rtengine.h" #include "pparamschangelistener.h" #include "profilechangelistener.h" -#include "profilestore.h" #include "partialpastedlg.h" #include "guiutils.h" +#include "profilestorecombobox.h" #include "rtimage.h" -class ProfilePanel : public Gtk::VBox, public PParamsChangeListener, public ProfileStoreListener +class ProfilePanel : public Gtk::Grid, public PParamsChangeListener, public ProfileStoreListener { private: @@ -42,6 +42,8 @@ private: RTImage *profileFillModeOffImage; Gtk::ToggleButton* fillMode; Gtk::TreeIter currRow; + ProfileStoreEntry *lastSavedPSE; + ProfileStoreEntry *customPSE; void profileFillModeToggled (); bool isCustomSelected (); @@ -69,7 +71,7 @@ protected: public: - explicit ProfilePanel (bool readOnly = false); + explicit ProfilePanel (); virtual ~ProfilePanel (); void setProfileChangeListener (ProfileChangeListener* ppl) @@ -77,7 +79,7 @@ public: tpc = ppl; } - static void init (); + static void init (Gtk::Window* parent); static void cleanup (); void storeCurrentValue(); void updateProfileList (); diff --git a/rtgui/profilestore.cc b/rtgui/profilestore.cc deleted file mode 100644 index c80bbe388..000000000 --- a/rtgui/profilestore.cc +++ /dev/null @@ -1,819 +0,0 @@ -/* - * This file is part of RawTherapee. - * - * Copyright (c) 2004-2010 Gabor Horvath - * - * RawTherapee is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * RawTherapee is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with RawTherapee. If not, see . - */ -#include "profilestore.h" -#include "options.h" -#include "toolpanel.h" -#include "guiutils.h" - -ProfileStore profileStore; - -using namespace rtengine; -using namespace rtengine::procparams; - -ProfileStore::ProfileStore () : parseMutex(nullptr), storeState(STORESTATE_NOTINITIALIZED), internalDefaultProfile(nullptr), internalDefaultEntry(nullptr) -{ - internalDefaultProfile = new AutoPartialProfile(); - internalDefaultProfile->set(true); -} - -bool ProfileStore::init () -{ - if (storeState == STORESTATE_DELETED) { - return false; - } - - if (storeState == STORESTATE_NOTINITIALIZED) { - storeState = STORESTATE_BEINGINITIALIZED; - parseMutex = new MyMutex(); - _parseProfiles (); - storeState = STORESTATE_INITIALIZED; - } - - return true; -} - -ProfileStore::~ProfileStore () -{ - - if (storeState == STORESTATE_NOTINITIALIZED) { - return; - } - - // This lock prevent object's suppression while scanning the directories - storeState = STORESTATE_DELETED; - MyMutex::MyLock lock(*parseMutex); - - clearProfileList (); - partProfiles.clear (); - clearFileList(); - delete internalDefaultProfile; - lock.release(); - delete parseMutex; - parseMutex = nullptr; -} - -/* - * Public method to parse the profiles' directories - * Since there's a race condition in the multithreaded environment on this object, - * parseProfiles may need to ask for initialization of this object, and then will - * ask a mutex lock on it, has it been initialized by this call or not - * - * This method will scan the directory tree again and update the profile list. When finished, - * the listeners will be called in order to update with the new list - */ -void ProfileStore::parseProfiles () -{ - - if (!init()) - // I don't even know if this situation can occur - { - return; - } - - for (auto listener : listeners) { - listener->storeCurrentValue(); - } - - { - MyMutex::MyLock lock(*parseMutex); - - _parseProfiles (); - } - - for (auto listener : listeners) { - listener->updateProfileList(); - listener->restoreValue(); - } -} - -void ProfileStore::_parseProfiles () -{ - - // Acquire the GUI, since the tree model can interact with combobox - GThreadLock threadLock; - - // clear loaded profiles - folders.clear(); - clearFileList(); - clearProfileList (); - - folders.push_back("<<< ROOT >>>"); // Fake path, so parentFolderId == 0 will be used to attach a ProfileStoreEntry to the root container, not sub-menu - - Glib::ustring p1 = options.getUserProfilePath(); - Glib::ustring p2 = options.getGlobalProfilePath(); - bool displayLevel0 = options.useBundledProfiles && !p1.empty() && !p2.empty() && p1 != p2; - - Glib::ustring virtualPath("${U}"); - Glib::ustring currDir("${U}"); - parseDir (p1, virtualPath, currDir, 0, 0, displayLevel0); - - if (displayLevel0) { - virtualPath = "${G}"; - currDir = "${G}"; - parseDir (p2, virtualPath, currDir, 0, 0, displayLevel0); - } - - // sort profiles - std::sort(entries.begin(), entries.end(), SortProfiles() ); - - // entries and partProfiles are empty, but the entry and profiles already exist (they have survived to clearFileList and clearProfileList) - if (!internalDefaultEntry) { - internalDefaultEntry = new ProfileStoreEntry(Glib::ustring("(") + M("PROFILEPANEL_PINTERNAL") + Glib::ustring(")"), PSET_FILE, 0, 0); - } - - entries.push_back(internalDefaultEntry); - partProfiles[internalDefaultEntry] = internalDefaultProfile; - - - // Check if the default profiles has been found. - if (findEntryFromFullPathU(options.defProfRaw) == nullptr) { - options.setDefProfRawMissing(true); - - if (options.rtSettings.verbose) { - printf("WARNING: Default profile \"%s\" for raw images not found!\n", options.defProfRaw.c_str()); - } - } - - if (findEntryFromFullPathU(options.defProfImg) == nullptr) { - options.setDefProfImgMissing(true); - - if (options.rtSettings.verbose) { - printf("WARNING: Default profile \"%s\" for standard images not found!\n", options.defProfImg.c_str()); - } - } -} - -/// @return Returns true if some files has been found (directories are ignored) -bool ProfileStore::parseDir (Glib::ustring& realPath, Glib::ustring& virtualPath, Glib::ustring& currDir, unsigned int parentId, unsigned char level, bool displayLevel0) -{ - - bool fileFound = false; - - // reload the available profiles from the profile dir - if (!realPath.empty() && Glib::file_test(realPath, Glib::FILE_TEST_EXISTS) && Glib::file_test (realPath, Glib::FILE_TEST_IS_DIR)) { - unsigned int folder = 0; // folder's own Id - - // add this entry to the folder list - folders.push_back(virtualPath); - folder = (unsigned int)(folders.size()) - 1; - - if (level > 0 || displayLevel0) { - // replace the virtual folder name by a localized text - if (currDir == "${U}") { - currDir = M("PROFILEPANEL_MYPROFILES"); - } else if (currDir == "${G}") { - currDir = M("PROFILEPANEL_GLOBALPROFILES"); - } - - // add this localized text to the file list - entries.push_back( new ProfileStoreEntry(currDir, PSET_FOLDER, parentId, folder) ); - } - - // walking through the directory - Glib::Dir* dir = nullptr; - dir = new Glib::Dir (realPath); - - for (Glib::DirIterator i = dir->begin(); i != dir->end(); ++i) { - currDir = *i; - - if (currDir == "." || currDir == "..") { - continue; - } - - Glib::ustring fname = Glib::build_filename(realPath, currDir); - - if (Glib::file_test (fname, Glib::FILE_TEST_IS_DIR)) { - Glib::ustring vp(Glib::build_filename(virtualPath, currDir)); - Glib::ustring rp(Glib::build_filename(realPath, currDir)); - fileFound = parseDir (rp, vp, currDir, folder, level + 1, 0); - } else { - size_t lastdot = currDir.find_last_of ('.'); - - if (lastdot != Glib::ustring::npos && lastdot == currDir.length() - 4 && currDir.substr(lastdot).casefold() == paramFileExtension) { - // file found - if( options.rtSettings.verbose ) { - printf ("Processing file %s...", fname.c_str()); - } - - Glib::ustring name = currDir.substr(0, lastdot); - - // create the partial profile - AutoPartialProfile *pProf = new AutoPartialProfile(); - int res = pProf->load (fname); - - if (!res && pProf->pparams->ppVersion >= 220) { - fileFound = true; - - if( options.rtSettings.verbose ) { - printf ("OK\n"); - } - - // adding this file to the list - ProfileStoreEntry* filePSE = new ProfileStoreEntry(name, PSET_FILE, folder, 0); - entries.push_back(filePSE); - - // map the partial profile - partProfiles[filePSE] = pProf; - //partProfiles.insert( std::pair (filePSE, pProf) ); - } else if( options.rtSettings.verbose ) { - printf ("failed!\n"); - } - } - } - } - - delete dir; - } - - if (!fileFound && (level > 0 || displayLevel0)) { - // no files found in this level, we delete the subdirectory entry - folders.pop_back(); - entries.pop_back(); - } - - return fileFound; -} - -int ProfileStore::findFolderId(const Glib::ustring &path) -{ - for (std::vector::iterator i = folders.begin(); i != folders.end(); ++i) { - if (*i == path) { - return i - folders.begin(); - } - } - - return -1; -} - -/** @brief Return the ProfileStoreEntry object that match the given file and path - * - * @param fullPath Path of the file; the filename may end by the standard extension, - * but have to begin with a virtual location ( ${G} or ${U} ) - * Will return null on invalid path or if the entry can't be found - */ -const ProfileStoreEntry* ProfileStore::findEntryFromFullPathU(Glib::ustring path) -{ - - if (path.empty()) { - return nullptr; - } - - if (path == DEFPROFILE_INTERNAL) { - return internalDefaultEntry; - } - - size_t lastdot = path.find_last_of ('.'); - - if (lastdot != Glib::ustring::npos && lastdot <= path.size() - 4 && !path.casefold().compare (lastdot, 4, paramFileExtension)) - // removing the extension - { - path = path.substr(0, lastdot); - } - - // dir separator may come from options file and may be \ or /, we convert them to G_DIR_SEPARATOR_S - if (path.size() > 4 && (path[4] == '/' || path[4] == '\\')) { - path = path.substr(0, 4) + G_DIR_SEPARATOR_S + path.substr(5); - } - - // removing the filename - Glib::ustring fName = Glib::path_get_basename(path); - - if (!fName.empty()) { - path = path.substr(0, path.length() - fName.length()); - } else { - // path is malformed, returning NULL; - return nullptr; - } - - path = Glib::path_get_dirname(path); - - // 1. find the path in the folder list - int parentFolderId = findFolderId(path); - - if (parentFolderId == -1) { - return nullptr; - } - - // 2. find the entry that match the given filename and parentFolderId - for (auto entry : entries) { - if (entry->parentFolderId == parentFolderId && entry->label == fName) { - return entry; - } - } - - return nullptr; -} - -/** Protected version of findEntryFromFullPathU */ -const ProfileStoreEntry* ProfileStore::findEntryFromFullPath(Glib::ustring path) -{ - MyMutex::MyLock lock(*parseMutex); - return findEntryFromFullPathU(path); -} - -const PartialProfile* ProfileStore::getProfile (Glib::ustring path) -{ - - if (!init()) - // I don't even know if this situation can occur - { - return nullptr; - } - - const ProfileStoreEntry *pse = findEntryFromFullPath(path); - - if (!pse) { - return nullptr; - } - - return getProfile(pse); -} - -const PartialProfile* ProfileStore::getProfile (const ProfileStoreEntry* entry) -{ - - if (!init()) - // I don't even know if this situation can occur - { - return nullptr; - } - - MyMutex::MyLock lock(*parseMutex); - - if (entry == internalDefaultEntry) { - return internalDefaultProfile; - } - - std::map::iterator iter = partProfiles.find(entry); - - if (iter != partProfiles.end()) { - return iter->second; - } else { - // This shouldn't happen! -#ifndef NDEBUG - printf("WARNING! Profile not found!\n"); -#endif - return nullptr; - } -} - -/** @brief Get a pointer to the profile's vector list - * - * This method grants you unique access to the vector list through Mutex locking. - * When you're done with the file list, you MUST call the releaseFileList method to release the lock. - */ -const std::vector* ProfileStore::getFileList () -{ - /*if (!init()) { - // I don't even know if this situation can occur - return NULL; - }*/ - - parseMutex->lock(); - - return &entries; -} - -void ProfileStore::releaseFileList() -{ - parseMutex->unlock(); -} - -/* - * Send back a pointer to the default procparams for raw or standard images. - * If the profile doesn't already exist in the profile list, - * it will add it with default internal values, so this method never fails - */ -const ProcParams* ProfileStore::getDefaultProcParams (bool isRaw) -{ - - if (!init()) - // I don't even know if this situation can occur - { - return nullptr; - } - - //Note: the mutex is locked in getProfile, called below - - const PartialProfile* pProf = getProfile (isRaw ? options.defProfRaw : options.defProfImg); - - if (!pProf) { - pProf = internalDefaultProfile; - } - - return pProf->pparams; -} - -/* - * Send back a pointer to the default partial profile for raw or standard images. - * If it doesn't already exist in the profile list, it will add it with default internal values, - * so this method will never fails - */ -const PartialProfile* ProfileStore::getDefaultPartialProfile (bool isRaw) -{ - - if (!init()) - // I don't even know if this situation can occur - { - return nullptr; - } - - //Note: the mutex is locked in getProfile, called below - - const PartialProfile* pProf = getProfile (isRaw ? options.defProfRaw : options.defProfImg); - - if (!pProf) { - pProf = internalDefaultProfile; - } - - return pProf; -} - -const Glib::ustring ProfileStore::getPathFromId(int folderId) -{ - return folders.at(folderId); -} - - -void ProfileStore::clearFileList() -{ - for (auto entry : entries) { - if (entry != internalDefaultEntry) { - delete entry; - } - } - - entries.clear(); -} - -void ProfileStore::clearProfileList() -{ - for (auto partProfile : partProfiles) { - if (partProfile.second != internalDefaultProfile) { - delete partProfile.second; - } - } - - partProfiles.clear(); -} - -void ProfileStore::addListener(ProfileStoreListener *listener) -{ - listeners.push_back(listener); -} - -void ProfileStore::removeListener(ProfileStoreListener *listener) -{ - listeners.remove(listener); -} - -void ProfileStore::dumpFolderList() -{ - printf("Folder list:\n------------\n"); - - for (unsigned int i = 0; i < folders.size(); i++) { - printf(" #%3ud - %s\n", i, folders.at(i).c_str()); - } - - printf("\n"); -} - -ProfileStoreEntry::ProfileStoreEntry() : label(""), type(PSET_FOLDER), parentFolderId(0), folderId(0) {} - -ProfileStoreEntry::ProfileStoreEntry(Glib::ustring label, PSEType type, unsigned short parentFolder, unsigned short folder) : label(label), type(type), parentFolderId(parentFolder), folderId(folder) {} - -void ProfileStoreEntry::setValues(Glib::ustring label, PSEType type, unsigned short parentFolder, unsigned short folder) -{ - this->label = label; - this->type = type; - parentFolderId = parentFolder; - folderId = folder; -} - -ProfileStoreLabel::ProfileStoreLabel(const ProfileStoreEntry *entry) : Gtk::Label(entry->label), entry(entry) -{ - set_alignment(0, 0.5); - show(); -} - -ProfileStoreComboBox::ProfileStoreComboBox () -{ - updateProfileList(); -} - -Glib::ustring ProfileStoreComboBox::getCurrentLabel() -{ - Glib::ustring currLabel; - Gtk::TreeModel::iterator currRow = get_active(); - - if (currRow) { - const ProfileStoreEntry *currEntry = (*currRow)[methodColumns.profileStoreEntry]; - return currEntry->label; - } - - return currLabel; -} - -const ProfileStoreEntry* ProfileStoreComboBox::getSelectedEntry() -{ - Gtk::TreeModel::iterator currRow_ = get_active(); - Gtk::TreeModel::Row currRow = *currRow_; - - if (currRow) { - return currRow[methodColumns.profileStoreEntry]; - } else { - return nullptr; - } -} - -/** @brief Recursive method to update the combobox entries */ -void ProfileStoreComboBox::refreshProfileList_ (Gtk::TreeModel::Row *parentRow, int parentFolderId, bool initial, const std::vector *entryList) -{ - for (auto entry : *entryList) { - if (entry->parentFolderId == parentFolderId) { // filtering the entry of the same folder - if (entry->type == PSET_FOLDER) { - Glib::ustring folderPath( profileStore.getPathFromId(entry->folderId) ); - - if (options.useBundledProfiles || ((folderPath != "${G}" ) && (folderPath != "${U}" ))) { - // creating the new submenu - Gtk::TreeModel::Row newSubMenu; - - if (initial) { - newSubMenu = *(refTreeModel->append()); - } else { - newSubMenu = *(refTreeModel->append(parentRow->children())); - } - - // creating and assigning the custom Label object - newSubMenu[methodColumns.label] = entry->label; - newSubMenu[methodColumns.profileStoreEntry] = entry; - - refreshProfileList_ (&newSubMenu, entry->folderId, false, entryList); - } else { - refreshProfileList_ (parentRow, entry->folderId, true, entryList); - } - } else { - Gtk::TreeModel::Row newItem; - - // creating a menu entry - if (initial) { - newItem = *(refTreeModel->append()); - } else { - newItem = *(refTreeModel->append(parentRow->children())); - } - - newItem[methodColumns.label] = entry->label; - newItem[methodColumns.profileStoreEntry] = entry; - } - } - } -} - -/** @brief Get the ProfileStore's entry list and recreate the combobox entries. - * If you want to update the ProfileStore list itself (rescan the dir tree), use the "ProfileStore::parseProfiles" method instead - * - * This method has to be called by the ProfileStoreListener having a ProfileStoreComboBox. - */ -void ProfileStoreComboBox::updateProfileList () -{ - - // clear items - clear(); - refTreeModel.clear(); - // Create the Tree model - refTreeModel = Gtk::TreeStore::create(methodColumns); - // Assign the model to the Combobox - set_model(refTreeModel); - - - // this will lock the profilestore's entry list too - const std::vector *entryList = profileStore.getFileList(); - - Gtk::TreeModel::Row root; - //profileStore.dumpFolderList(); - refreshProfileList_ (&root, entryList->at(0)->parentFolderId, true, entryList); - - if (entryList->at(0)->parentFolderId != 0) { - // special case for the Internal default entry - addRow(profileStore.getInternalDefaultPSE()); - } - - // releasing the profilestore's entry list mutex - profileStore.releaseFileList(); - - pack_start(methodColumns.label, false); -} - -Gtk::TreeIter ProfileStoreComboBox::findRowFromEntry_ (Gtk::TreeModel::Children childs, const ProfileStoreEntry *pse) -{ - Gtk::TreeModel::Row row; - Gtk::TreeIter rowInSubLevel; - - for(Gtk::TreeModel::Children::iterator iter = childs.begin(); iter != childs.end(); ++iter) { - row = *iter; - // Hombre: is there a smarter way of knowing if this row has childs? - const ProfileStoreEntry *pse_ = row[methodColumns.profileStoreEntry]; - - if (pse_->type == PSET_FOLDER) { - rowInSubLevel = findRowFromEntry_ (iter->children(), pse); - - if (rowInSubLevel) { - // entry found - return rowInSubLevel; - } - } else if (pse_ == pse) { - // entry found - return iter; - } - } - - return childs.end(); -} - -Gtk::TreeIter ProfileStoreComboBox::findRowFromEntry (const ProfileStoreEntry *pse) -{ - Gtk::TreeModel::Children childs = refTreeModel->children(); - - if (pse) { - Gtk::TreeIter row = findRowFromEntry_ (childs, pse); - return row; - } - - return childs.end(); -} - -Gtk::TreeIter ProfileStoreComboBox::findRowFromFullPath_ (Gtk::TreeModel::Children childs, int parentFolderId, Glib::ustring &name) -{ - Gtk::TreeModel::Row row; - Gtk::TreeIter rowInSubLevel; - - for(Gtk::TreeModel::Children::iterator iter = childs.begin(); iter != childs.end(); ++iter) { - row = *iter; - // Hombre: is there a smarter way of knowing if this row has childs? - const ProfileStoreEntry *pse = row[methodColumns.profileStoreEntry]; - - if (pse->type == PSET_FOLDER) { - rowInSubLevel = findRowFromFullPath_ (iter->children(), parentFolderId, name); - - if (rowInSubLevel) { - // entry found - return rowInSubLevel; - } - } else if (parentFolderId == pse->parentFolderId && name == pse->label) { - // entry found - return iter; - } - } - - return childs.end(); -} - -Gtk::TreeIter ProfileStoreComboBox::findRowFromFullPath (Glib::ustring path) -{ - Gtk::TreeIter row; - - if (path.empty()) { - return row; - } - - if (path == DEFPROFILE_INTERNAL) { - row = findRowFromEntry(profileStore.getInternalDefaultPSE()); - return row; - } - - // removing the filename - Glib::ustring fName = Glib::path_get_basename(path); - - if (!fName.empty()) { - path = path.substr(0, path.length() - fName.length()); - } else { - // path is malformed; - return row; - } - - path = Glib::path_get_dirname(path); - int parentFolderId = profileStore.findFolderId(path); - - // 1. find the path in the folder list - if (parentFolderId != -1) { - row = findRowFromFullPath_ (refTreeModel->children(), parentFolderId, fName); - } - - return row; -} - -/** @brief Get the absolute full path of the active row entry. - * @return The absolute full path of the active row entry, or the "Internal" keyword, - * or an empty string if the ComboBox is in an invalid state - */ -Glib::ustring ProfileStoreComboBox::getFullPathFromActiveRow() -{ - Glib::ustring path; - Gtk::TreeModel::iterator currRowI = get_active(); - - if (!currRowI) { - return path; - } - - Gtk::TreeModel::Row currRow = *currRowI; - - if (currRow) { - - const ProfileStoreEntry *currEntry = currRow[methodColumns.profileStoreEntry]; - - if (!currEntry) { - return path; - } - - if (currEntry == profileStore.getInternalDefaultPSE()) { - return Glib::ustring(DEFPROFILE_INTERNAL); - } - - path = Glib::build_filename(profileStore.getPathFromId(currEntry->parentFolderId), currEntry->label); - } - - return path; -} - -bool ProfileStoreComboBox::setActiveRowFromFullPath(Glib::ustring path) -{ - if (!path.empty()) { - Gtk::TreeIter row = findRowFromFullPath(path); - - if (row) { - set_active(row); - return true; - } - } - - return false; -} - -bool ProfileStoreComboBox::setActiveRowFromEntry(const ProfileStoreEntry *pse) -{ - if (pse) { - Gtk::TreeIter row = findRowFromEntry(pse); - - if (row) { - set_active(row); - return true; - } - } - - return false; -} - -bool ProfileStoreComboBox::setInternalEntry () -{ - return setActiveRowFromEntry(profileStore.getInternalDefaultPSE()); -} - -/** @brief Get the row from the first level of the tree that match the provided name */ -Gtk::TreeIter ProfileStoreComboBox::getRowFromLabel(Glib::ustring name) -{ - Gtk::TreeIter row; - Gtk::TreeModel::Children childs = refTreeModel->children(); - - if (!name.empty()) { - Gtk::TreeModel::Row currRow; - - for(Gtk::TreeModel::Children::iterator iter = childs.begin(); iter != childs.end(); ++iter) { - currRow = *iter; - const ProfileStoreEntry *pse = currRow[methodColumns.profileStoreEntry]; - - if (pse->label == name) { - return currRow; - } - } - } - - return childs.end(); - //return refTreeModel->get_iter(""); // is this fast? We want to send back a null, anvalid or end() iterator object here -} - -/** @brief Add a new row to the first level of the tree */ -Gtk::TreeIter ProfileStoreComboBox::addRow(const ProfileStoreEntry *profileStoreEntry) -{ - Gtk::TreeIter newEntry = refTreeModel->append(); - Gtk::TreeModel::Row row = *newEntry; - row[methodColumns.label] = profileStoreEntry->label; - row[methodColumns.profileStoreEntry] = profileStoreEntry; - return newEntry; -} - diff --git a/rtgui/profilestorecombobox.cc b/rtgui/profilestorecombobox.cc new file mode 100644 index 000000000..186309aa3 --- /dev/null +++ b/rtgui/profilestorecombobox.cc @@ -0,0 +1,358 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ +#include "../rtengine/profilestore.h" +#include "profilestorecombobox.h" + +#include "../rtengine/dynamicprofile.h" +#include "options.h" +#include "toolpanel.h" +#include "guiutils.h" + +using namespace rtengine; +using namespace rtengine::procparams; + +ProfileStoreLabel::ProfileStoreLabel (const ProfileStoreEntry *entry) : Gtk::Label (entry->label), entry (entry) +{ + set_alignment (0, 0.5); + set_ellipsize (Pango::ELLIPSIZE_END); + show(); +} + +ProfileStoreComboBox::ProfileStoreComboBox () +{ + updateProfileList(); + setPreferredWidth (50, 120); +} + +Glib::ustring ProfileStoreComboBox::getCurrentLabel() +{ + Glib::ustring currLabel; + Gtk::TreeModel::iterator currRow = get_active(); + + if (currRow) { + const ProfileStoreEntry *currEntry = (*currRow)[methodColumns.profileStoreEntry]; + return currEntry->label; + } + + return currLabel; +} + +const ProfileStoreEntry* ProfileStoreComboBox::getSelectedEntry() +{ + Gtk::TreeModel::iterator currRow_ = get_active(); + Gtk::TreeModel::Row currRow = *currRow_; + + if (currRow) { + return currRow[methodColumns.profileStoreEntry]; + } else { + return nullptr; + } +} + +/** @brief Recursive method to update the combobox entries */ +void ProfileStoreComboBox::refreshProfileList_ (Gtk::TreeModel::Row *parentRow, int parentFolderId, bool initial, const std::vector *entryList) +{ + for (auto entry : *entryList) { + if (entry->parentFolderId == parentFolderId) { // filtering the entry of the same folder + if (entry->type == PSET_FOLDER) { + Glib::ustring folderPath ( ProfileStore::getInstance()->getPathFromId (entry->folderId) ); + + if (options.useBundledProfiles || ((folderPath != "${G}" ) && (folderPath != "${U}" ))) { + // creating the new submenu + Gtk::TreeModel::Row newSubMenu; + + if (initial) { + newSubMenu = * (refTreeModel->append()); + } else { + newSubMenu = * (refTreeModel->append (parentRow->children())); + } + + // creating and assigning the custom Label object + newSubMenu[methodColumns.label] = entry->label; + newSubMenu[methodColumns.profileStoreEntry] = entry; +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION == 18 + // HACK: Workaround for bug in Gtk+ 3.18... + Gtk::TreeModel::Row menuHeader = * (refTreeModel->append (newSubMenu->children())); + menuHeader[methodColumns.label] = "-"; + menuHeader[methodColumns.profileStoreEntry] = entry; +#endif + refreshProfileList_ (&newSubMenu, entry->folderId, false, entryList); + } else { + refreshProfileList_ (parentRow, entry->folderId, true, entryList); + } + } else { + Gtk::TreeModel::Row newItem; + + // creating a menu entry + if (initial) { + newItem = * (refTreeModel->append()); + } else { + newItem = * (refTreeModel->append (parentRow->children())); + } + + newItem[methodColumns.label] = entry->label; + newItem[methodColumns.profileStoreEntry] = entry; + } + } + } +} +/** @brief Get the ProfileStore's entry list and recreate the combobox entries. + * If you want to update the ProfileStore list itself (rescan the dir tree), use the "ProfileStore::parseProfiles" method instead + * + * This method has to be called by the ProfileStoreListener having a ProfileStoreComboBox. + */ +void ProfileStoreComboBox::updateProfileList () +{ + // clear items + clear(); + refTreeModel.clear(); + // Create the Tree model + refTreeModel = Gtk::TreeStore::create (methodColumns); + // Assign the model to the Combobox + set_model (refTreeModel); + + // this will lock the profilestore's entry list too + const std::vector *entryList = ProfileStore::getInstance()->getFileList(); + + //profileStore.dumpFolderList(); + refreshProfileList_ (NULL, entryList->at (0)->parentFolderId, true, entryList); + + if (entryList->at (0)->parentFolderId != 0) { + // special case for the Internal default entry + addRow (ProfileStore::getInstance()->getInternalDefaultPSE()); + } + + // releasing the profilestore's entry list mutex + ProfileStore::getInstance()->releaseFileList(); + + pack_start (methodColumns.label, false); + + Gtk::CellRendererText* cellRenderer = dynamic_cast (get_first_cell()); + cellRenderer->property_ellipsize() = Pango::ELLIPSIZE_MIDDLE; + cellRenderer->property_ellipsize_set() = true; +} + +Gtk::TreeIter ProfileStoreComboBox::findRowFromEntry_ (Gtk::TreeModel::Children childs, const ProfileStoreEntry *pse) +{ + Gtk::TreeModel::Row row; + Gtk::TreeIter rowInSubLevel; + + for (Gtk::TreeModel::Children::iterator iter = childs.begin(); iter != childs.end(); ++iter) { + row = *iter; + // Hombre: is there a smarter way of knowing if this row has childs? + const ProfileStoreEntry *pse_ = row[methodColumns.profileStoreEntry]; + + if (pse_->type == PSET_FOLDER) { + rowInSubLevel = findRowFromEntry_ (iter->children(), pse); + + if (rowInSubLevel) { + // entry found + return rowInSubLevel; + } + } else if (pse_ == pse) { + // entry found + return iter; + } + } + + return childs.end(); +} + +Gtk::TreeIter ProfileStoreComboBox::findRowFromEntry (const ProfileStoreEntry *pse) +{ + Gtk::TreeModel::Children childs = refTreeModel->children(); + + if (pse) { + Gtk::TreeIter row = findRowFromEntry_ (childs, pse); + return row; + } + + return childs.end(); +} + +Gtk::TreeIter ProfileStoreComboBox::findRowFromFullPath_ (Gtk::TreeModel::Children childs, int parentFolderId, Glib::ustring &name) +{ + Gtk::TreeModel::Row row; + Gtk::TreeIter rowInSubLevel; + + for (Gtk::TreeModel::Children::iterator iter = childs.begin(); iter != childs.end(); ++iter) { + row = *iter; + // Hombre: is there a smarter way of knowing if this row has childs? + const ProfileStoreEntry *pse = row[methodColumns.profileStoreEntry]; + + if (pse->type == PSET_FOLDER) { + rowInSubLevel = findRowFromFullPath_ (iter->children(), parentFolderId, name); + + if (rowInSubLevel) { + // entry found + return rowInSubLevel; + } + } else if (parentFolderId == pse->parentFolderId && name == pse->label) { + // entry found + return iter; + } + } + + return childs.end(); +} + +Gtk::TreeIter ProfileStoreComboBox::findRowFromFullPath (Glib::ustring path) +{ + Gtk::TreeIter row; + ProfileStore *profileStore = ProfileStore::getInstance(); + + if (path.empty()) { + return row; + } + + if (path == DEFPROFILE_INTERNAL) { + row = findRowFromEntry (profileStore->getInternalDefaultPSE()); + return row; + } + + if (path == DEFPROFILE_DYNAMIC) { + row = findRowFromEntry (profileStore->getInternalDynamicPSE()); + return row; + } + + // removing the filename + Glib::ustring fName = Glib::path_get_basename (path); + + if (!fName.empty()) { + path = path.substr (0, path.length() - fName.length()); + } else { + // path is malformed; + return row; + } + + path = Glib::path_get_dirname (path); + int parentFolderId = profileStore->findFolderId (path); + + // 1. find the path in the folder list + if (parentFolderId != -1) { + row = findRowFromFullPath_ (refTreeModel->children(), parentFolderId, fName); + } + + return row; +} + +/** @brief Get the absolute full path of the active row entry. + * @return The absolute full path of the active row entry, or the "Internal" keyword, + * or an empty string if the ComboBox is in an invalid state + */ +Glib::ustring ProfileStoreComboBox::getFullPathFromActiveRow() +{ + Glib::ustring path; + Gtk::TreeModel::iterator currRowI = get_active(); + ProfileStore *profileStore = ProfileStore::getInstance(); + + if (!currRowI) { + return path; + } + + Gtk::TreeModel::Row currRow = *currRowI; + + if (currRow) { + + const ProfileStoreEntry *currEntry = currRow[methodColumns.profileStoreEntry]; + + if (!currEntry) { + return path; + } + + if (currEntry == profileStore->getInternalDefaultPSE()) { + return Glib::ustring (DEFPROFILE_INTERNAL); + } + + if (currEntry == profileStore->getInternalDynamicPSE()) { + return Glib::ustring (DEFPROFILE_DYNAMIC); + } + + path = Glib::build_filename (profileStore->getPathFromId (currEntry->parentFolderId), currEntry->label); + } + + return path; +} + +bool ProfileStoreComboBox::setActiveRowFromFullPath (Glib::ustring path) +{ + if (!path.empty()) { + Gtk::TreeIter row = findRowFromFullPath (path); + + if (row) { + set_active (row); + return true; + } + } + + return false; +} + +bool ProfileStoreComboBox::setActiveRowFromEntry (const ProfileStoreEntry *pse) +{ + if (pse) { + Gtk::TreeIter row = findRowFromEntry (pse); + + if (row) { + set_active (row); + return true; + } + } + + return false; +} + +bool ProfileStoreComboBox::setInternalEntry () +{ + return setActiveRowFromEntry (ProfileStore::getInstance()->getInternalDefaultPSE()); +} + +/** @brief Get the row from the first level of the tree that match the provided name */ +Gtk::TreeIter ProfileStoreComboBox::getRowFromLabel (Glib::ustring name) +{ + Gtk::TreeIter row; + Gtk::TreeModel::Children childs = refTreeModel->children(); + + if (!name.empty()) { + Gtk::TreeModel::Row currRow; + + for (Gtk::TreeModel::Children::iterator iter = childs.begin(); iter != childs.end(); ++iter) { + currRow = *iter; + const ProfileStoreEntry *pse = currRow[methodColumns.profileStoreEntry]; + + if (pse->label == name) { + return currRow; + } + } + } + + return childs.end(); + //return refTreeModel->get_iter(""); // is this fast? We want to send back a null, anvalid or end() iterator object here +} + +/** @brief Add a new row to the first level of the tree */ +Gtk::TreeIter ProfileStoreComboBox::addRow (const ProfileStoreEntry *profileStoreEntry) +{ + Gtk::TreeIter newEntry = refTreeModel->append(); + Gtk::TreeModel::Row row = *newEntry; + row[methodColumns.label] = profileStoreEntry->label; + row[methodColumns.profileStoreEntry] = profileStoreEntry; + return newEntry; +} + diff --git a/rtgui/profilestorecombobox.h b/rtgui/profilestorecombobox.h new file mode 100644 index 000000000..111e767c2 --- /dev/null +++ b/rtgui/profilestorecombobox.h @@ -0,0 +1,95 @@ +/* + * This file is part of RawTherapee. + * + * Copyright (c) 2004-2010 Gabor Horvath + * + * RawTherapee is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * RawTherapee is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with RawTherapee. If not, see . + */ +#ifndef _PROFILESTORECOMBOBOX_ +#define _PROFILESTORECOMBOBOX_ + +#include +#include +#include + +#include "../rtengine/rtengine.h" +#include "../rtengine/noncopyable.h" +#include "../rtengine/profilestore.h" + +#include "threadutils.h" +#include "paramsedited.h" +#include "guiutils.h" + + +/** + * @brief subclass of Gtk::Label with extra fields for Combobox and Menu, to link with a ProfileStoreEntry + */ +class ProfileStoreLabel : public Gtk::Label +{ + +public: + const ProfileStoreEntry *entry; + +#ifndef NDEBUG + ProfileStoreLabel() : Gtk::Label ("*** error ***"), entry (nullptr) {} +#else + ProfileStoreLabel() : Gtk::Label (""), entry (NULL) {} +#endif + + /** @brief Create a new ProfileStoreLabel + * + * @param entry Pointer to the ProfileStoreEntry object, be it a directory or a file + */ + explicit ProfileStoreLabel (const ProfileStoreEntry *entry); + ProfileStoreLabel (const ProfileStoreLabel &other); +}; + +class ProfileStoreComboBox : public MyComboBox +{ + +protected: + class MethodColumns : public Gtk::TreeModel::ColumnRecord + { + public: + Gtk::TreeModelColumn label; + Gtk::TreeModelColumn profileStoreEntry; + MethodColumns() + { + add (label); + add (profileStoreEntry); + } + }; + + Glib::RefPtr refTreeModel; + MethodColumns methodColumns; + void refreshProfileList_ (Gtk::TreeModel::Row *parentRow, int parentFolderId, bool initial, const std::vector *entryList); + Gtk::TreeIter findRowFromEntry_ (Gtk::TreeModel::Children childs, const ProfileStoreEntry *pse); + Gtk::TreeIter findRowFromFullPath_ (Gtk::TreeModel::Children childs, int parentFolderId, Glib::ustring &name); + +public: + ProfileStoreComboBox(); + void updateProfileList(); + Glib::ustring getCurrentLabel(); + const ProfileStoreEntry* getSelectedEntry(); + Gtk::TreeIter findRowFromEntry (const ProfileStoreEntry *pse); + Gtk::TreeIter findRowFromFullPath (Glib::ustring path); + Glib::ustring getFullPathFromActiveRow (); + bool setActiveRowFromFullPath (Glib::ustring oldPath); + bool setActiveRowFromEntry (const ProfileStoreEntry *pse); + bool setInternalEntry (); + Gtk::TreeIter getRowFromLabel (Glib::ustring name); + Gtk::TreeIter addRow (const ProfileStoreEntry *profileStoreEntry); +}; + +#endif diff --git a/rtgui/progressconnector.h b/rtgui/progressconnector.h index f62b645c3..3ce20f8f8 100644 --- a/rtgui/progressconnector.h +++ b/rtgui/progressconnector.h @@ -84,7 +84,7 @@ class ProgressConnector void workingThread () { retval = opStart.emit (); - g_idle_add (ProgressConnector::emitEndSignalUI, new sigc::signal0 (opEnd)); + gdk_threads_add_idle(ProgressConnector::emitEndSignalUI, new sigc::signal0(opEnd)); workThread = nullptr; } diff --git a/rtgui/prsharpening.cc b/rtgui/prsharpening.cc index 7dd097a90..5e79d078a 100644 --- a/rtgui/prsharpening.cc +++ b/rtgui/prsharpening.cc @@ -32,13 +32,12 @@ PrSharpening::PrSharpening () : FoldableToolPanel(this, "prsharpening", M("TP_PR //setEnabledTooltipMarkup(M("TP_PRSHARPENING_TOOLTIP")); Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); - hb->set_border_width (4); hb->show (); Gtk::Label* ml = Gtk::manage (new Gtk::Label (M("TP_SHARPENING_METHOD") + ":")); ml->show (); method = Gtk::manage (new MyComboBoxText ()); - method->append_text (M("TP_SHARPENING_USM")); - method->append_text (M("TP_SHARPENING_RLD")); + method->append (M("TP_SHARPENING_USM")); + method->append (M("TP_SHARPENING_RLD")); method->show (); hb->pack_start(*ml, Gtk::PACK_SHRINK, 4); hb->pack_start(*method); @@ -465,7 +464,7 @@ void PrSharpening::setBatchMode (bool batchMode) damount->showEditedCB (); ddamping->showEditedCB (); diter->showEditedCB (); - method->append_text (M("GENERAL_UNCHANGED")); + method->append (M("GENERAL_UNCHANGED")); } void PrSharpening::setAdjusterBehavior (bool amountadd) diff --git a/rtgui/rawcacorrection.cc b/rtgui/rawcacorrection.cc index d619ab112..ca3b1a970 100644 --- a/rtgui/rawcacorrection.cc +++ b/rtgui/rawcacorrection.cc @@ -18,7 +18,6 @@ */ #include "rawcacorrection.h" #include "guiutils.h" -#include #include "rtimage.h" using namespace rtengine; @@ -31,15 +30,9 @@ RAWCACorr::RAWCACorr () : FoldableToolPanel(this, "rawcacorrection", M("TP_CHROM Gtk::Image* icablueL = Gtk::manage (new RTImage ("ajd-ca-blue1.png")); Gtk::Image* icablueR = Gtk::manage (new RTImage ("ajd-ca-blue2.png")); - caAutocorrect = Gtk::manage(new Gtk::CheckButton((M("TP_RAWCACORR_AUTO")))); + caAutocorrect = Gtk::manage (new CheckBox(M("TP_RAWCACORR_AUTO"), multiImage)); + caAutocorrect->setCheckBoxListener (this); - caStrength = Gtk::manage(new Adjuster (M("TP_RAWCACORR_CASTR"), 2.0, 8.0, 0.5, 6.0)); - caStrength->setAdjusterListener (this); - if (caStrength->delay < options.adjusterMaxDelay) { - caStrength->delay = options.adjusterMaxDelay; - } - -// caStrength->show(); caRed = Gtk::manage(new Adjuster (M("TP_RAWCACORR_CARED"), -4.0, 4.0, 0.1, 0, icaredL, icaredR)); caRed->setAdjusterListener (this); @@ -58,51 +51,40 @@ RAWCACorr::RAWCACorr () : FoldableToolPanel(this, "rawcacorrection", M("TP_CHROM caBlue->show(); pack_start( *caAutocorrect, Gtk::PACK_SHRINK, 4); -// pack_start( *caStrength, Gtk::PACK_SHRINK, 4); pack_start( *caRed, Gtk::PACK_SHRINK, 4); pack_start( *caBlue, Gtk::PACK_SHRINK, 4); - caacsconn = caAutocorrect->signal_toggled().connect ( sigc::mem_fun(*this, &RAWCACorr::caCorrectionChanged), true); } void RAWCACorr::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { disableListener (); - caacsconn.block (true); if(pedited ) { - caAutocorrect->set_inconsistent(!pedited->raw.caCorrection); - caStrength->setEditedState( pedited->raw.caAutoStrength ? Edited : UnEdited ); + caAutocorrect->setEdited(pedited->raw.caCorrection); caRed->setEditedState( pedited->raw.caRed ? Edited : UnEdited ); caBlue->setEditedState( pedited->raw.caBlue ? Edited : UnEdited ); } - lastCA = pp->raw.ca_autocorrect; - - caStrength->set_sensitive(pp->raw.ca_autocorrect); // disable Red and Blue sliders when caAutocorrect is enabled caRed->set_sensitive(!pp->raw.ca_autocorrect); caBlue->set_sensitive(!pp->raw.ca_autocorrect); - caAutocorrect->set_active(pp->raw.ca_autocorrect); - caStrength->setValue (pp->raw.caautostrength); + caAutocorrect->setValue(pp->raw.ca_autocorrect); caRed->setValue (pp->raw.cared); caBlue->setValue (pp->raw.cablue); - caacsconn.block (false); enableListener (); } void RAWCACorr::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited) { - pp->raw.ca_autocorrect = caAutocorrect->get_active(); - pp->raw.caautostrength = caStrength->getValue(); + pp->raw.ca_autocorrect = caAutocorrect->getLastActive(); pp->raw.cared = caRed->getValue(); pp->raw.cablue = caBlue->getValue(); if (pedited) { pedited->raw.caCorrection = !caAutocorrect->get_inconsistent(); - pedited->raw.caAutoStrength = caStrength->getEditedState (); pedited->raw.caRed = caRed->getEditedState (); pedited->raw.caBlue = caBlue->getEditedState (); } @@ -119,8 +101,20 @@ void RAWCACorr::adjusterChanged (Adjuster* a, double newval) listener->panelChanged (EvPreProcessCARed, value ); } else if (a == caBlue) { listener->panelChanged (EvPreProcessCABlue, value ); -// } else if (a == caStrength) { -// listener->panelChanged (EvPreProcessCAStrength, value ); + } + } +} + +void RAWCACorr::checkBoxToggled (CheckBox* c, CheckValue newval) +{ + if (c == caAutocorrect) { + if (!batchMode) { + // disable Red and Blue sliders when caAutocorrect is enabled + caRed->set_sensitive(!caAutocorrect->getLastActive ()); + caBlue->set_sensitive(!caAutocorrect->getLastActive ()); + } + if (listener) { + listener->panelChanged (EvPreProcessAutoCA, caAutocorrect->getLastActive() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); } } } @@ -128,78 +122,27 @@ void RAWCACorr::adjusterChanged (Adjuster* a, double newval) void RAWCACorr::setBatchMode(bool batchMode) { ToolPanel::setBatchMode (batchMode); - caStrength->showEditedCB (); caRed->showEditedCB (); caBlue->showEditedCB (); } void RAWCACorr::setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited) { - caStrength->setDefault( defParams->raw.caautostrength); caRed->setDefault( defParams->raw.cared); caBlue->setDefault( defParams->raw.cablue); if (pedited) { - caStrength->setDefaultEditedState( pedited->raw.caAutoStrength ? Edited : UnEdited); caRed->setDefaultEditedState( pedited->raw.caRed ? Edited : UnEdited); caBlue->setDefaultEditedState( pedited->raw.caBlue ? Edited : UnEdited); } else { - caStrength->setDefaultEditedState( Irrelevant ); caRed->setDefaultEditedState( Irrelevant ); caBlue->setDefaultEditedState( Irrelevant ); } } -void RAWCACorr::caCorrectionChanged() -{ - if (batchMode) { - if (caAutocorrect->get_inconsistent()) { - caAutocorrect->set_inconsistent (false); - caacsconn.block (true); - caAutocorrect->set_active (false); - caacsconn.block (false); - } else if (lastCA) { - caAutocorrect->set_inconsistent (true); - } - - lastCA = caAutocorrect->get_active (); - - } - - /*else { - // For non batch mode, we disable the red and blue slider if caAutocorrect is true - if (caAutocorrect->get_active ()) { - caRed->set_sensitive(false); - caBlue->set_sensitive(false); - } - else { - caRed->set_sensitive(true); - caBlue->set_sensitive(true); - } - }*/ - - caStrength->set_sensitive(caAutocorrect->get_active ()); - // disable Red and Blue sliders when caAutocorrect is enabled - caRed->set_sensitive(!caAutocorrect->get_active ()); - caBlue->set_sensitive(!caAutocorrect->get_active ()); - - if (caAutocorrect->get_active ()) { - // set caRed and caBlue to 0 as RawImageSource::CA_correct_RT uses this as - // a condition for auto-CA correction. Alternative would be to change - // RawImageSource::CA_correct_RT and pass it ca_autocorrect value - caRed->setValue(0); - caBlue->setValue(0); - } - - if (listener) { - listener->panelChanged (EvPreProcessAutoCA, caAutocorrect->get_active() ? M("GENERAL_ENABLED") : M("GENERAL_DISABLED")); - } -} - void RAWCACorr::setAdjusterBehavior (bool caadd) { - caStrength->setAddMode(caadd); caRed->setAddMode(caadd); caBlue->setAddMode(caadd); } @@ -207,7 +150,6 @@ void RAWCACorr::setAdjusterBehavior (bool caadd) void RAWCACorr::trimValues (rtengine::procparams::ProcParams* pp) { - caStrength->trimValue(pp->raw.caautostrength); caRed->trimValue(pp->raw.cared); caBlue->trimValue(pp->raw.cablue); } diff --git a/rtgui/rawcacorrection.h b/rtgui/rawcacorrection.h index 4edf9f9f2..69292b1aa 100644 --- a/rtgui/rawcacorrection.h +++ b/rtgui/rawcacorrection.h @@ -21,19 +21,16 @@ #include #include "adjuster.h" +#include "checkbox.h" #include "toolpanel.h" -#include "../rtengine/rawimage.h" -class RAWCACorr : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel +class RAWCACorr : public ToolParamBlock, public AdjusterListener, public CheckBoxListener, public FoldableToolPanel { protected: - Gtk::CheckButton* caAutocorrect; - Adjuster* caStrength; + CheckBox* caAutocorrect; Adjuster* caRed; Adjuster* caBlue; - bool lastCA; - sigc::connection caacsconn; public: @@ -47,7 +44,7 @@ public: void trimValues (rtengine::procparams::ProcParams* pp); void adjusterChanged (Adjuster* a, double newval); - void caCorrectionChanged (); + void checkBoxToggled (CheckBox* c, CheckValue newval); }; #endif diff --git a/rtgui/recentbrowser.cc b/rtgui/recentbrowser.cc index 1d559a9cd..ec97f6ded 100644 --- a/rtgui/recentbrowser.cc +++ b/rtgui/recentbrowser.cc @@ -31,7 +31,7 @@ RecentBrowser::RecentBrowser () frame->add (*recentDirs); for(size_t i = 0; i < options.recentFolders.size(); i++) { - recentDirs->append_text (options.recentFolders[i]); + recentDirs->append (options.recentFolders[i]); } pack_start (*frame, Gtk::PACK_SHRINK, 4); @@ -54,12 +54,11 @@ void RecentBrowser::selectionChanged () void RecentBrowser::dirSelected (const Glib::ustring& dirname, const Glib::ustring& openfile) { - size_t numFolders = options.recentFolders.size(); + ssize_t numFolders = options.recentFolders.size(); + ssize_t i = -1; if(numFolders > 0) { // search entry and move to top if it exists - size_t i; - - for(i = 0; i < numFolders; i++) { + for(i = 0; i < numFolders; ++i) { if(options.recentFolders[i] == dirname) { break; } @@ -78,10 +77,14 @@ void RecentBrowser::dirSelected (const Glib::ustring& dirname, const Glib::ustri conn.block (true); - recentDirs->remove_text (dirname); - recentDirs->prepend_text (dirname); - recentDirs->set_active_text (dirname); + if (i > 0) { + recentDirs->remove_text (i); + } + + if(i != 0) { + recentDirs->prepend (dirname); + } + recentDirs->set_active (0); conn.block (false); } - diff --git a/rtgui/renamedlg.cc b/rtgui/renamedlg.cc index e51ada336..ce59fe5f5 100644 --- a/rtgui/renamedlg.cc +++ b/rtgui/renamedlg.cc @@ -22,7 +22,7 @@ #include "rtimage.h" RenameDialog::RenameDialog (Gtk::Window* parent) - : Gtk::Dialog (M("FILEBROWSER_RENAMEDLGLABEL"), *parent, true, true), p(parent), imageData(nullptr) + : Gtk::Dialog (M("FILEBROWSER_RENAMEDLGLABEL"), *parent, true), p(parent), imageData(nullptr) { Gtk::Table* names = Gtk::manage (new Gtk::Table (2, 2)); @@ -36,7 +36,7 @@ RenameDialog::RenameDialog (Gtk::Window* parent) names->attach (*nnlab, 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 2, 2); names->attach (*newName, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); - get_vbox()->pack_start (*names, Gtk::PACK_SHRINK, 4); + get_content_area()->pack_start (*names, Gtk::PACK_SHRINK, 4); // Issue 316 // Gtk::HBox* tbox = Gtk::manage (new Gtk::HBox()); @@ -49,7 +49,7 @@ RenameDialog::RenameDialog (Gtk::Window* parent) // tbox->pack_start (*useTmpl, Gtk::PACK_SHRINK, 4); // tbox->pack_start (*templates); -// get_vbox()->pack_start (*tbox, Gtk::PACK_SHRINK, 4); +// get_content_area()->pack_start (*tbox, Gtk::PACK_SHRINK, 4); add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK); add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); @@ -168,12 +168,12 @@ Glib::ustring RenameDialog::getNewName () //} //RenameTemplateEditor::RenameTemplateEditor (Gtk::Window* parent) -// : Gtk::Dialog ("Edit rename templates", *parent, true, true) +// : Gtk::Dialog ("Edit rename templates", *parent, true) //{ // // list = Gtk::manage (new Gtk::ListViewText (1, false, Gtk::SELECTION_MULTIPLE)); // list->set_headers_visible (false); -// get_vbox ()->pack_start (*list); +// get_content_area ()->pack_start (*list); // // Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); // templ = Gtk::manage (new Gtk::Entry ()); @@ -185,7 +185,7 @@ Glib::ustring RenameDialog::getNewName () // hb->pack_start (*add, Gtk::PACK_SHRINK, 2); // hb->pack_start (*del, Gtk::PACK_SHRINK, 2); // -// get_vbox ()->pack_start (*hb, Gtk::PACK_SHRINK, 4); +// get_content_area ()->pack_start (*hb, Gtk::PACK_SHRINK, 4); // // add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK); // @@ -202,10 +202,10 @@ Glib::ustring RenameDialog::getNewName () //void RenameTemplateEditor::refreshTemplateList () //{ // -// list->clear_items (); +// list->remove_all_columns(); // // for (size_t i = 0; i < options.renameTemplates.size(); i++) { -// list->append_text (options.renameTemplates[i]); +// list->append (options.renameTemplates[i]); // } //} // diff --git a/rtgui/resize.cc b/rtgui/resize.cc index 64cf673e9..1a87bbe8c 100644 --- a/rtgui/resize.cc +++ b/rtgui/resize.cc @@ -29,22 +29,21 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals croph = 0; Gtk::Table* combos = Gtk::manage (new Gtk::Table (2, 2)); - Gtk::Label *label = nullptr; appliesTo = Gtk::manage (new MyComboBoxText ()); - appliesTo->append_text (M("TP_RESIZE_CROPPEDAREA")); - appliesTo->append_text (M("TP_RESIZE_FULLIMAGE")); + appliesTo->append (M("TP_RESIZE_CROPPEDAREA")); + appliesTo->append (M("TP_RESIZE_FULLIMAGE")); appliesTo->set_active (0); - label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_APPLIESTO"))); + Gtk::Label *label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_APPLIESTO"))); label->set_alignment(0., 0.); combos->attach (*label, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 2, 2); combos->attach (*appliesTo, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); // See Resize::methodChanged() when adding a new method. method = Gtk::manage (new MyComboBoxText ()); - method->append_text (M("TP_RESIZE_LANCZOS")); - method->append_text (M("TP_RESIZE_NEAREST")); + method->append (M("TP_RESIZE_LANCZOS")); + method->append (M("TP_RESIZE_NEAREST")); method->set_active (0); label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_METHOD"))); @@ -53,10 +52,10 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals combos->attach (*method, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); spec = Gtk::manage (new MyComboBoxText ()); - spec->append_text (M("TP_RESIZE_SCALE")); - spec->append_text (M("TP_RESIZE_WIDTH")); - spec->append_text (M("TP_RESIZE_HEIGHT")); - spec->append_text (M("TP_RESIZE_FITBOX")); + spec->append (M("TP_RESIZE_SCALE")); + spec->append (M("TP_RESIZE_WIDTH")); + spec->append (M("TP_RESIZE_HEIGHT")); + spec->append (M("TP_RESIZE_FITBOX")); spec->set_active (0); label = Gtk::manage (new Gtk::Label (M("TP_RESIZE_SPECIFY"))); @@ -118,7 +117,7 @@ Resize::Resize () : FoldableToolPanel(this, "resize", M("TP_RESIZE_LABEL"), fals Resize::~Resize () { - + idle_register.destroy(); delete scale; delete sizeBox; } @@ -352,68 +351,76 @@ void Resize::sizeChanged (int mw, int mh, int ow, int oh) void Resize::setDimensions () { + const auto func = [](gpointer data) -> gboolean { + Resize* const self = static_cast(data); - int refw, refh; + self->wconn.block(true); + self->hconn.block(true); + self->scale->block(true); - wconn.block (true); - hconn.block (true); - scale->block(true); + int refw, refh; - if (appliesTo->get_active_row_number() == 0 && cropw) { - // Applies to Cropped area - refw = cropw; - refh = croph; - } else { - // Applies to Full image or crop is disabled - refw = maxw; - refh = maxh; - } - - GThreadLock lock; - w->set_range (32, 4 * refw); - h->set_range (32, 4 * refh); - - double tmpScale; - - switch (spec->get_active_row_number()) { - case (0): // Scale mode - w->set_value((double)((int)( (double)(refw) * scale->getValue() + 0.5) )); - h->set_value((double)((int)( (double)(refh) * scale->getValue() + 0.5) )); - break; - - case (1): // Width mode - tmpScale = w->get_value() / (double)refw; - scale->setValue (tmpScale); - h->set_value((double)((int)( (double)(refh) * tmpScale + 0.5) )); - break; - - case (2): // Height mode - tmpScale = h->get_value() / (double)refh; - scale->setValue (tmpScale); - w->set_value((double)((int)( (double)(refw) * tmpScale + 0.5) )); - break; - - case (3): { // Bounding box mode - double wSliderValue = w->get_value(); - double hSliderValue = h->get_value(); - - if ( (wSliderValue / hSliderValue) < ((double)refw / (double)refh)) { - tmpScale = wSliderValue / (double)refw; + if (self->appliesTo->get_active_row_number() == 0 && self->cropw) { + // Applies to Cropped area + refw = self->cropw; + refh = self->croph; } else { - tmpScale = hSliderValue / (double)refh; + // Applies to Full image or crop is disabled + refw = self->maxw; + refh = self->maxh; } - scale->setValue (tmpScale); - break; - } + self->w->set_range(32, 4 * refw); + self->h->set_range(32, 4 * refh); - default: - break; - } + switch (self->spec->get_active_row_number()) { + case 0: { + // Scale mode + self->w->set_value(static_cast(static_cast(static_cast(refw) * self->scale->getValue() + 0.5))); + self->h->set_value(static_cast(static_cast(static_cast(refh) * self->scale->getValue() + 0.5))); + break; + } - scale->block(false); - wconn.block (false); - hconn.block (false); + case 1: { + // Width mode + const double tmp_scale = self->w->get_value() / static_cast(refw); + self->scale->setValue(tmp_scale); + self->h->set_value(static_cast(static_cast(static_cast(refh) * tmp_scale + 0.5))); + break; + } + + case 2: { + // Height mode + const double tmp_scale = self->h->get_value() / static_cast(refh); + self->scale->setValue(tmp_scale); + self->w->set_value(static_cast(static_cast(static_cast(refw) * tmp_scale + 0.5))); + break; + } + + case 3: { + // Bounding box mode + const double tmp_scale = + self->w->get_value() / self->h->get_value() < static_cast(refw) / static_cast(refh) + ? self->w->get_value() / static_cast(refw) + : self->h->get_value() / static_cast(refh); + + self->scale->setValue(tmp_scale); + break; + } + + default: { + break; + } + } + + self->scale->block(false); + self->wconn.block(false); + self->hconn.block(false); + + return FALSE; + }; + + idle_register.add(func, this); } void Resize::fitBoxScale() @@ -593,8 +600,8 @@ void Resize::notifyBBox() void Resize::setBatchMode (bool batchMode) { - method->append_text (M("GENERAL_UNCHANGED")); - spec->append_text (M("GENERAL_UNCHANGED")); + method->append (M("GENERAL_UNCHANGED")); + spec->append (M("GENERAL_UNCHANGED")); ToolPanel::setBatchMode (batchMode); scale->showEditedCB (); } diff --git a/rtgui/resize.h b/rtgui/resize.h index cf640c281..acba5b478 100644 --- a/rtgui/resize.h +++ b/rtgui/resize.h @@ -25,25 +25,13 @@ #include "toolpanel.h" #include "guiutils.h" -class Resize : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel, public rtengine::SizeListener +class Resize final : + public ToolParamBlock, + public AdjusterListener, + public FoldableToolPanel, + public rtengine::SizeListener { - -protected: - Adjuster* scale; - Gtk::VBox* sizeBox; - MyComboBoxText* appliesTo; - MyComboBoxText* method; - MyComboBoxText* spec; - MySpinButton* w; - MySpinButton* h; - int maxw, maxh; - int cropw, croph; - sigc::connection sconn, aconn, wconn, hconn; - bool wDirty, hDirty; - ToolParamBlock* packBox; - public: - Resize (); ~Resize (); @@ -75,6 +63,20 @@ private: int getComputedHeight (); void notifyBBox (); void updateGUI (); + + Adjuster* scale; + Gtk::VBox* sizeBox; + MyComboBoxText* appliesTo; + MyComboBoxText* method; + MyComboBoxText* spec; + MySpinButton* w; + MySpinButton* h; + int maxw, maxh; + int cropw, croph; + sigc::connection sconn, aconn, wconn, hconn; + bool wDirty, hDirty; + ToolParamBlock* packBox; + IdleRegister idle_register; }; #endif diff --git a/rtgui/retinex.cc b/rtgui/retinex.cc index 61d9073ae..bf88a85e4 100644 --- a/rtgui/retinex.cc +++ b/rtgui/retinex.cc @@ -8,9 +8,10 @@ using namespace rtengine; using namespace rtengine::procparams; -Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), false, true) +Retinex::Retinex () : FoldableToolPanel (this, "retinex", M ("TP_RETINEX_LABEL"), false, true), lastmedianmap (false) { - CurveListener::setMulti(true); + CurveListener::setMulti (true); + std::vector defaultCurve; std::vector milestones; nextmin = 0.; nextmax = 0.; @@ -21,377 +22,465 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), nextminT = 0.; nextmaxT = 0.; - Gtk::VBox * retinexVBox = Gtk::manage ( new Gtk::VBox()); - retinexVBox->set_border_width(4); - retinexVBox->set_spacing(2); - Gtk::VBox * settingsVBox = Gtk::manage ( new Gtk::VBox()); - settingsVBox->set_border_width(4); - settingsVBox->set_spacing(2); - dhbox = Gtk::manage (new Gtk::HBox ()); - labmdh = Gtk::manage (new Gtk::Label (M("TP_RETINEX_METHOD") + ":")); - dhbox->pack_start (*labmdh, Gtk::PACK_SHRINK, 1); + + // MAIN Expander ================================================================== + + + + + Gtk::Grid *retinexGrid = Gtk::manage ( new Gtk::Grid()); + setExpandAlignProperties (retinexGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + dhgrid = Gtk::manage (new Gtk::Grid ()); + setExpandAlignProperties (dhgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + labmdh = Gtk::manage (new Gtk::Label (M ("TP_RETINEX_METHOD") + ":")); + setExpandAlignProperties (labmdh, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + dhgrid->attach (*labmdh, 0, 0, 1, 1); retinexMethod = Gtk::manage (new MyComboBoxText ()); - retinexMethod->append_text (M("TP_RETINEX_LOW")); - retinexMethod->append_text (M("TP_RETINEX_UNIFORM")); - retinexMethod->append_text (M("TP_RETINEX_HIGH")); - retinexMethod->append_text (M("TP_RETINEX_HIGHLIG")); -// retinexMethod->append_text (M("TP_RETINEX_HIGHLIGPLUS")); - retinexMethod->set_active(0); - retinexMethodConn = retinexMethod->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::retinexMethodChanged) ); - retinexMethod->set_tooltip_markup (M("TP_RETINEX_METHOD_TOOLTIP")); + setExpandAlignProperties (retinexMethod, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + retinexMethod->append (M ("TP_RETINEX_LOW")); + retinexMethod->append (M ("TP_RETINEX_UNIFORM")); + retinexMethod->append (M ("TP_RETINEX_HIGH")); + retinexMethod->append (M ("TP_RETINEX_HIGHLIG")); +// retinexMethod->append (M("TP_RETINEX_HIGHLIGPLUS")); + retinexMethod->set_active (0); + retinexMethodConn = retinexMethod->signal_changed().connect ( sigc::mem_fun (*this, &Retinex::retinexMethodChanged) ); + retinexMethod->set_tooltip_markup (M ("TP_RETINEX_METHOD_TOOLTIP")); + dhgrid->attach (*retinexMethod, 1, 0, 1, 1); retinexcolorspace = Gtk::manage (new MyComboBoxText ()); - retinexcolorspace->append_text (M("TP_RETINEX_LABSPACE")); - retinexcolorspace->append_text (M("TP_RETINEX_HSLSPACE_LOG")); - retinexcolorspace->append_text (M("TP_RETINEX_HSLSPACE_LIN")); - retinexcolorspace->set_active(0); - retinexColorSpaceConn = retinexcolorspace->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::retinexColorSpaceChanged) ); + setExpandAlignProperties (retinexcolorspace, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + retinexcolorspace->append (M ("TP_RETINEX_LABSPACE")); + retinexcolorspace->append (M ("TP_RETINEX_HSLSPACE_LOG")); + retinexcolorspace->append (M ("TP_RETINEX_HSLSPACE_LIN")); + retinexcolorspace->set_active (0); + retinexColorSpaceConn = retinexcolorspace->signal_changed().connect ( sigc::mem_fun (*this, &Retinex::retinexColorSpaceChanged) ); + dhgrid->attach (*retinexcolorspace, 2, 0, 1, 1); + retinexGrid->attach (*dhgrid, 0, 0, 1, 1); - dhbox->pack_start(*retinexMethod); - dhbox->pack_start(*retinexcolorspace); - retinexVBox->pack_start(*dhbox); - - Gtk::VBox *equalVBox = Gtk::manage (new Gtk::VBox()); - - equalFrame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_EQUAL"))); - - // Histogram equalizer Lab curve - curveEditorGD = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LAB")); - curveEditorGD->setCurveListener (this); - cdshape = static_cast(curveEditorGD->addCurve(CT_Diagonal, M("TP_RETINEX_CURVEEDITOR_CD"))); - cdshape->setTooltip(M("TP_RETINEX_CURVEEDITOR_CD_TOOLTIP")); - std::vector milestones22; - - milestones22.push_back( GradientMilestone(0., 0., 0., 0.) ); - milestones22.push_back( GradientMilestone(1., 1., 1., 1.) ); - cdshape->setBottomBarBgGradient(milestones22); - cdshape->setLeftBarBgGradient(milestones22); - - curveEditorGD->curveListComplete(); - - - // Histogram equalizer HSL curve - curveEditorGDH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_HSL")); - curveEditorGDH->setCurveListener (this); - cdshapeH = static_cast(curveEditorGDH->addCurve(CT_Diagonal, M("TP_RETINEX_CURVEEDITOR_CD"))); - cdshapeH->setTooltip(M("TP_RETINEX_CURVEEDITOR_CD_TOOLTIP")); - std::vector milestones22H; - - milestones22H.push_back( GradientMilestone(0., 0., 0., 0.) ); - milestones22H.push_back( GradientMilestone(1., 1., 1., 1.) ); - cdshapeH->setBottomBarBgGradient(milestones22H); - cdshapeH->setLeftBarBgGradient(milestones22H); - - curveEditorGDH->curveListComplete(); - - curveEditormap = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_MAP")); - curveEditormap->setCurveListener (this); - mapshape = static_cast(curveEditormap->addCurve(CT_Diagonal, M("TP_RETINEX_CURVEEDITOR_MAP"))); - mapshape->setTooltip(M("TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP")); - std::vector milestones222; - milestones222.push_back( GradientMilestone(0., 0., 0., 0.) ); - milestones222.push_back( GradientMilestone(1., 1., 1., 1.) ); - mapshape->setBottomBarBgGradient(milestones222); - mapshape->setLeftBarBgGradient(milestones222); - - curveEditormap->curveListComplete(); - - // Transmission map curve - transmissionCurveEditorG = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_TRANSMISSION")); - transmissionCurveEditorG->setCurveListener (this); - - std::vector defaultCurve; - rtengine::RetinexParams::getDefaulttransmissionCurve(defaultCurve); - transmissionShape = static_cast(transmissionCurveEditorG->addCurve(CT_Flat, "", nullptr, false, false)); - transmissionShape->setIdentityValue(0.); - transmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); - transmissionShape->setBottomBarBgGradient(milestones); - transmissionCurveEditorG->set_tooltip_markup (M("TP_RETINEX_TRANSMISSION_TOOLTIP")); - - transmissionCurveEditorG->curveListComplete(); - - gambox = Gtk::manage (new Gtk::HBox ()); - labgam = Gtk::manage (new Gtk::Label (M("TP_RETINEX_GAMMA") + ":")); - gambox->pack_start (*labgam, Gtk::PACK_SHRINK, 1); - - gammaretinex = Gtk::manage (new MyComboBoxText ()); - gammaretinex->append_text (M("TP_RETINEX_GAMMA_NONE")); - gammaretinex->append_text (M("TP_RETINEX_GAMMA_LOW")); - gammaretinex->append_text (M("TP_RETINEX_GAMMA_MID")); - gammaretinex->append_text (M("TP_RETINEX_GAMMA_HIGH")); - gammaretinex->append_text (M("TP_RETINEX_GAMMA_FREE")); - gammaretinex->set_active(0); - gammaretinexConn = gammaretinex->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::gammaretinexChanged) ); - gammaretinex->set_tooltip_markup (M("TP_RETINEX_GAMMA_TOOLTIP")); - - gam = Gtk::manage (new Adjuster (M("TP_RETINEX_FREEGAMMA"), 0.6, 3.0, 0.01, 1.30)); - slope = Gtk::manage (new Adjuster (M("TP_RETINEX_SLOPE"), 1., 20., 0.1, 3.)); - - str = Gtk::manage (new Adjuster (M("TP_RETINEX_STRENGTH"), 0, 100., 1., 20.)); - neigh = Gtk::manage (new Adjuster (M("TP_RETINEX_NEIGHBOR"), 6, 100., 1., 80.)); - highl = Gtk::manage (new Adjuster (M("TP_RETINEX_HIGHLIGHT"), 1, 20, 1, 4)); - highl->set_tooltip_markup (M("TP_RETINEX_HIGHLIGHT_TOOLTIP")); - vart = Gtk::manage (new Adjuster (M("TP_RETINEX_VARIANCE"), 50, 500, 1, 200)); - vart->set_tooltip_markup (M("TP_RETINEX_VARIANCE_TOOLTIP")); - - expsettings = new MyExpander (false, M("TP_RETINEX_SETTINGS")); - expsettings->signal_button_release_event().connect_notify( sigc::bind( sigc::mem_fun(this, &Retinex::foldAllButMe), expsettings) ); - - retinexVBox->pack_start (*str); + str = Gtk::manage (new Adjuster (M ("TP_RETINEX_STRENGTH"), 0, 100., 1., 20.)); + setExpandAlignProperties (str, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + retinexGrid->attach (*str, 0, 1, 1, 1); str->show (); - retinexVBox->pack_start (*neigh); + neigh = Gtk::manage (new Adjuster (M ("TP_RETINEX_NEIGHBOR"), 6, 100., 1., 80.)); + setExpandAlignProperties (neigh, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + retinexGrid->attach (*neigh, 0, 2, 1, 1); neigh->show (); - retinexVBox->pack_start (*vart); + vart = Gtk::manage (new Adjuster (M ("TP_RETINEX_VARIANCE"), 50, 500, 1, 200)); + setExpandAlignProperties (vart, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + vart->set_tooltip_markup (M ("TP_RETINEX_VARIANCE_TOOLTIP")); + retinexGrid->attach (*vart, 0, 3, 1, 1); vart->show (); - retinexVBox->pack_start (*highl); + highl = Gtk::manage (new Adjuster (M ("TP_RETINEX_HIGHLIGHT"), 1, 20, 1, 4)); + setExpandAlignProperties (highl, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + highl->set_tooltip_markup (M ("TP_RETINEX_HIGHLIGHT_TOOLTIP")); + retinexGrid->attach (*highl, 0, 4, 1, 1); highl->show (); - mMLabels = Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER)); - mMLabels->set_tooltip_markup (M("TP_RETINEX_MLABEL_TOOLTIP")); + viewgrid = Gtk::manage (new Gtk::Grid ()); + setExpandAlignProperties (viewgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - transLabels = Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER)); - transLabels->set_tooltip_markup (M("TP_RETINEX_TLABEL_TOOLTIP")); - transLabels2 = Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER)); - - scal = Gtk::manage (new Adjuster (M("TP_RETINEX_SCALES"), -1, 6., 1., 3.)); - iter = Gtk::manage (new Adjuster (M("TP_RETINEX_ITER"), 1, 5., 1., 1.)); - grad = Gtk::manage (new Adjuster (M("TP_RETINEX_GRAD"), -2., 2., 1., 1.)); - grads = Gtk::manage (new Adjuster (M("TP_RETINEX_GRADS"), -2., 2., 1., 1.)); - gain = Gtk::manage (new Adjuster (M("TP_RETINEX_GAIN"), 20, 200, 1, 50)); - offs = Gtk::manage (new Adjuster (M("TP_RETINEX_OFFSET"), -1000, 5000, 1, 0)); -// vart = Gtk::manage (new Adjuster (M("TP_RETINEX_VARIANCE"), 50, 500, 1, 125)); - limd = Gtk::manage (new Adjuster (M("TP_RETINEX_THRESHOLD"), 2, 100, 1, 8)); - baselog = Gtk::manage (new Adjuster (M("TP_RETINEX_BASELOG"), 1., 10., 1., 3.)); - skal = Gtk::manage (new Adjuster (M("TP_RETINEX_SKAL"), 1, 8, 1, 3)); - gain->set_tooltip_markup (M("TP_RETINEX_GAIN_TOOLTIP")); - scal->set_tooltip_markup (M("TP_RETINEX_SCALES_TOOLTIP")); - iter->set_tooltip_markup (M("TP_RETINEX_ITER_TOOLTIP")); - grad->set_tooltip_markup (M("TP_RETINEX_GRAD_TOOLTIP")); - grads->set_tooltip_markup (M("TP_RETINEX_GRADS_TOOLTIP")); -// vart->set_tooltip_markup (M("TP_RETINEX_VARIANCE_TOOLTIP")); - limd->set_tooltip_markup (M("TP_RETINEX_THRESHOLD_TOOLTIP")); - baselog->set_tooltip_markup (M("TP_RETINEX_BASELOG_TOOLTIP")); - - // Gain Transmission map curve - gaintransmissionCurve = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_GAINTRANSMISSION")); - gaintransmissionCurve->setCurveListener (this); - -// std::vector defaultCurve; - rtengine::RetinexParams::getDefaultgaintransmissionCurve(defaultCurve); - gaintransmissionShape = static_cast(gaintransmissionCurve->addCurve(CT_Flat, "", nullptr, false, false)); - gaintransmissionShape->setIdentityValue(0.); - gaintransmissionShape->setResetCurve(FlatCurveType(defaultCurve.at(0)), defaultCurve); - gaintransmissionShape->setBottomBarBgGradient(milestones); - gaintransmissionCurve->set_tooltip_markup (M("TP_RETINEX_GAINTRANSMISSION_TOOLTIP")); - - gaintransmissionCurve->curveListComplete(); - - - Gtk::Frame *p1Frame; - p1Frame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_LABEL_MASK")) ); - p1Frame->set_border_width(0); - p1Frame->set_label_align(0.025, 0.5); - - Gtk::VBox *p1VBox; - p1VBox = Gtk::manage ( new Gtk::VBox()); - p1VBox->set_border_width(4); - p1VBox->set_spacing(2); - - mapbox = Gtk::manage (new Gtk::HBox ()); - labmap = Gtk::manage (new Gtk::Label (M("TP_RETINEX_MAP") + ":")); - mapbox->pack_start (*labmap, Gtk::PACK_SHRINK, 1); - - mapMethod = Gtk::manage (new MyComboBoxText ()); - mapMethod->append_text (M("TP_RETINEX_MAP_NONE")); - mapMethod->append_text (M("TP_RETINEX_MAP_GAUS")); - mapMethod->append_text (M("TP_RETINEX_MAP_MAPP")); - mapMethod->append_text (M("TP_RETINEX_MAP_MAPT")); - mapMethod->set_active(0); - mapMethodConn = mapMethod->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::mapMethodChanged) ); - mapMethod->set_tooltip_markup (M("TP_RETINEX_MAP_METHOD_TOOLTIP")); - - highlights = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0)); - h_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 80)); - shadows = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHADOWS"), 0, 100, 1, 0)); - s_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 80)); - radius = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_RADIUS"), 5, 100, 1, 40)); - - viewbox = Gtk::manage (new Gtk::HBox ()); - labview = Gtk::manage (new Gtk::Label (M("TP_RETINEX_VIEW") + ":")); - viewbox->pack_start (*labview, Gtk::PACK_SHRINK, 1); + labview = Gtk::manage (new Gtk::Label (M ("TP_RETINEX_VIEW") + ":")); + setExpandAlignProperties (labview, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + viewgrid->attach (*labview, 0, 0, 1, 1); viewMethod = Gtk::manage (new MyComboBoxText ()); - viewMethod->append_text (M("TP_RETINEX_VIEW_NONE")); - viewMethod->append_text (M("TP_RETINEX_VIEW_UNSHARP")); - viewMethod->append_text (M("TP_RETINEX_VIEW_MASK")); - viewMethod->append_text (M("TP_RETINEX_VIEW_TRAN")); - viewMethod->append_text (M("TP_RETINEX_VIEW_TRAN2")); - viewMethod->set_active(0); - viewMethodConn = viewMethod->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::viewMethodChanged) ); - viewMethod->set_tooltip_markup (M("TP_RETINEX_VIEW_METHOD_TOOLTIP")); + setExpandAlignProperties (viewMethod, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + viewMethod->append (M ("TP_RETINEX_VIEW_NONE")); + viewMethod->append (M ("TP_RETINEX_VIEW_UNSHARP")); + viewMethod->append (M ("TP_RETINEX_VIEW_MASK")); + viewMethod->append (M ("TP_RETINEX_VIEW_TRAN")); + viewMethod->append (M ("TP_RETINEX_VIEW_TRAN2")); + viewMethod->set_active (0); + viewMethodConn = viewMethod->signal_changed().connect ( sigc::mem_fun (*this, &Retinex::viewMethodChanged) ); + viewMethod->set_tooltip_markup (M ("TP_RETINEX_VIEW_METHOD_TOOLTIP")); + viewgrid->attach (*viewMethod, 1, 0, 1, 1); + retinexGrid->attach (*viewgrid, 0, 5, 1, 1); - curveEditorGH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LH")); + //------------- + + pack_start (*retinexGrid); + + + // MAP (MASK) Frame --------------------------------------------------------------- + + + Gtk::Frame *maskFrame = Gtk::manage (new Gtk::Frame (M ("TP_RETINEX_LABEL_MASK")) ); + setExpandAlignProperties (maskFrame, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + Gtk::Grid *maskGrid = Gtk::manage ( new Gtk::Grid()); + setExpandAlignProperties (maskGrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + // Map Method + mapgrid = Gtk::manage (new Gtk::Grid ()); + setExpandAlignProperties (mapgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + labmap = Gtk::manage (new Gtk::Label (M ("TP_RETINEX_MAP") + ":")); + setExpandAlignProperties (labmap, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + mapgrid->attach (*labmap, 0, 0, 1, 1); + + mapMethod = Gtk::manage (new MyComboBoxText ()); + setExpandAlignProperties (mapMethod, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + mapMethod->append (M ("TP_RETINEX_MAP_NONE")); + mapMethod->append (M ("TP_RETINEX_MAP_GAUS")); + mapMethod->append (M ("TP_RETINEX_MAP_MAPP")); + mapMethod->append (M ("TP_RETINEX_MAP_MAPT")); + mapMethod->set_active (0); + mapMethodConn = mapMethod->signal_changed().connect ( sigc::mem_fun (*this, &Retinex::mapMethodChanged) ); + mapMethod->set_tooltip_markup (M ("TP_RETINEX_MAP_METHOD_TOOLTIP")); + mapgrid->attach (*mapMethod, 1, 0, 1, 1); + + maskGrid->attach (*mapgrid, 0, 0, 1, 1); + mapgrid->show(); + + // Map Equalizer + curveEditormap = new CurveEditorGroup (options.lastRetinexDir, M ("TP_RETINEX_CONTEDIT_MAP")); + setExpandAlignProperties (curveEditormap, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + curveEditormap->setCurveListener (this); + std::vector milestones222; + milestones222.push_back ( GradientMilestone (0., 0., 0., 0.) ); + milestones222.push_back ( GradientMilestone (1., 1., 1., 1.) ); + mapshape = static_cast (curveEditormap->addCurve (CT_Diagonal, M ("TP_RETINEX_CURVEEDITOR_MAP"))); + mapshape->setTooltip (M ("TP_RETINEX_CURVEEDITOR_MAP_TOOLTIP")); + mapshape->setBottomBarBgGradient (milestones222); + mapshape->setLeftBarBgGradient (milestones222); + curveEditormap->curveListComplete(); + maskGrid->attach (*curveEditormap, 0, 1, 1, 1); + curveEditormap->show(); + + // Adjusters + highlights = Gtk::manage (new Adjuster (M ("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0)); + setExpandAlignProperties (highlights, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + maskGrid->attach (*highlights, 0, 2, 1, 1); + highlights->show(); + + h_tonalwidth = Gtk::manage (new Adjuster (M ("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 80)); + setExpandAlignProperties (h_tonalwidth, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + maskGrid->attach (*h_tonalwidth, 0, 3, 1, 1); + h_tonalwidth->show(); + + shadows = Gtk::manage (new Adjuster (M ("TP_SHADOWSHLIGHTS_SHADOWS"), 0, 100, 1, 0)); + setExpandAlignProperties (shadows, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + maskGrid->attach (*shadows, 0, 4, 1, 1); + shadows->show(); + + s_tonalwidth = Gtk::manage (new Adjuster (M ("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 80)); + setExpandAlignProperties (s_tonalwidth, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + maskGrid->attach (*s_tonalwidth, 0, 5, 1, 1); + s_tonalwidth->show(); + + radius = Gtk::manage (new Adjuster (M ("TP_SHADOWSHLIGHTS_RADIUS"), 5, 100, 1, 40)); + setExpandAlignProperties (radius, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + maskGrid->attach (*radius, 0, 6, 1, 1); + radius->show(); + + //------------- + + maskFrame->add (*maskGrid); + pack_start (*maskFrame, Gtk::PACK_EXPAND_WIDGET, 4); + + + + + // SETTINGS Expander ============================================================== + + + + + expsettings = Gtk::manage(new MyExpander(false, M ("TP_RETINEX_SETTINGS"))); + setExpandAlignProperties (expsettings, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + expsettings->signal_button_release_event().connect_notify ( sigc::bind ( sigc::mem_fun (this, &Retinex::foldAllButMe), expsettings) ); + + Gtk::Grid *settingsGrid = Gtk::manage ( new Gtk::Grid()); + setExpandAlignProperties (settingsGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + mMLabels = Gtk::manage (new Gtk::Label ("---")); + setExpandAlignProperties (mMLabels, true, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); + mMLabels->set_tooltip_markup (M ("TP_RETINEX_MLABEL_TOOLTIP")); + settingsGrid->attach (*mMLabels, 0, 0, 1, 1); + mMLabels->show (); + + transLabels = Gtk::manage (new Gtk::Label ("---")); + setExpandAlignProperties (transLabels, true, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); + transLabels->set_tooltip_markup (M ("TP_RETINEX_TLABEL_TOOLTIP")); + settingsGrid->attach (*transLabels, 0, 1, 1, 1); + transLabels->show (); + + transLabels2 = Gtk::manage (new Gtk::Label ("---")); + setExpandAlignProperties (transLabels2, true, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_START); + settingsGrid->attach (*transLabels2, 0, 2, 1, 1); + transLabels2->show (); + + + // EQUALIZER Frame ---------------------------------------------------------------- + + + equalFrame = Gtk::manage (new Gtk::Frame (M ("TP_RETINEX_EQUAL"))); + setExpandAlignProperties (equalFrame, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); +//GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + equalFrame->set_border_width (5); +#endif +//GTK318 + + Gtk::Grid *equalGrid = Gtk::manage (new Gtk::Grid()); + setExpandAlignProperties (equalGrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + // Histogram equalizer Lab curve + curveEditorGD = new CurveEditorGroup (options.lastRetinexDir, M ("TP_RETINEX_CONTEDIT_LAB")); + setExpandAlignProperties (curveEditorGD, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + curveEditorGD->setCurveListener (this); + std::vector milestones22; + milestones22.push_back ( GradientMilestone (0., 0., 0., 0.) ); + milestones22.push_back ( GradientMilestone (1., 1., 1., 1.) ); + cdshape = static_cast (curveEditorGD->addCurve (CT_Diagonal, M ("TP_RETINEX_CURVEEDITOR_CD"))); + cdshape->setTooltip (M ("TP_RETINEX_CURVEEDITOR_CD_TOOLTIP")); + cdshape->setBottomBarBgGradient (milestones22); + cdshape->setLeftBarBgGradient (milestones22); + curveEditorGD->curveListComplete(); + equalGrid->attach (*curveEditorGD, 0, 0, 1, 1); + curveEditorGD->show(); + + // Histogram equalizer HSL curve + curveEditorGDH = new CurveEditorGroup (options.lastRetinexDir, M ("TP_RETINEX_CONTEDIT_HSL")); + setExpandAlignProperties (curveEditorGDH, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + curveEditorGDH->setCurveListener (this); + std::vector milestones22H; + milestones22H.push_back ( GradientMilestone (0., 0., 0., 0.) ); + milestones22H.push_back ( GradientMilestone (1., 1., 1., 1.) ); + cdshapeH = static_cast (curveEditorGDH->addCurve (CT_Diagonal, M ("TP_RETINEX_CURVEEDITOR_CD"))); + cdshapeH->setTooltip (M ("TP_RETINEX_CURVEEDITOR_CD_TOOLTIP")); + cdshapeH->setBottomBarBgGradient (milestones22H); + cdshapeH->setLeftBarBgGradient (milestones22H); + curveEditorGDH->curveListComplete(); + equalGrid->attach (*curveEditorGDH, 0, 1, 1, 1); + curveEditorGDH->show(); + + // Hue equalizer + curveEditorGH = new CurveEditorGroup (options.lastRetinexDir, M ("TP_RETINEX_CONTEDIT_LH")); + setExpandAlignProperties (curveEditorGH, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); curveEditorGH->setCurveListener (this); - - lhshape = static_cast(curveEditorGH->addCurve(CT_Flat, M("TP_RETINEX_CURVEEDITOR_LH"))); - lhshape->setTooltip(M("TP_RETINEX_CURVEEDITOR_LH_TOOLTIP")); - lhshape->setCurveColorProvider(this, 4); - + lhshape = static_cast (curveEditorGH->addCurve (CT_Flat, M ("TP_RETINEX_CURVEEDITOR_LH"))); + lhshape->setTooltip (M ("TP_RETINEX_CURVEEDITOR_LH_TOOLTIP")); + lhshape->setCurveColorProvider (this, 4); milestones.clear(); for (int i = 0; i < 7; i++) { float R, G, B; - float x = float(i) * (1.0f / 6.0); - Color::hsv2rgb01(x, 0.5f, 0.5f, R, G, B); - milestones.push_back( GradientMilestone(double(x), double(R), double(G), double(B)) ); + float x = float (i) * (1.0f / 6.0); + Color::hsv2rgb01 (x, 0.5f, 0.5f, R, G, B); + milestones.push_back ( GradientMilestone (double (x), double (R), double (G), double (B)) ); } - lhshape->setBottomBarBgGradient(milestones); - + lhshape->setBottomBarBgGradient (milestones); curveEditorGH->curveListComplete(); - - medianmap = Gtk::manage (new Gtk::CheckButton (M("TP_RETINEX_MEDIAN"))); - medianmap->set_active (true); - medianmapConn = medianmap->signal_toggled().connect( sigc::mem_fun(*this, &Retinex::medianmapChanged) ); - - settingsVBox->pack_start (*mMLabels); - mMLabels->show (); - - settingsVBox->pack_start (*transLabels); - transLabels->show (); - - settingsVBox->pack_start (*transLabels2); - transLabels2->show (); - - equalVBox->pack_start (*curveEditorGD, Gtk::PACK_SHRINK, 4); - curveEditorGD->show(); - - equalVBox->pack_start (*curveEditorGDH, Gtk::PACK_SHRINK, 4); - curveEditorGDH->show(); - - equalVBox->pack_start (*curveEditorGH, Gtk::PACK_SHRINK, 4); + equalGrid->attach (*curveEditorGH, 0, 2, 1, 1); curveEditorGH->show(); - gambox->pack_start(*gammaretinex); + // Gamma settings + gamgrid = Gtk::manage (new Gtk::Grid ()); + setExpandAlignProperties (gamgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); - equalVBox->pack_start(*gambox); + labgam = Gtk::manage (new Gtk::Label (M ("TP_RETINEX_GAMMA") + ":")); + setExpandAlignProperties (labgam, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE); + gamgrid->attach (*labgam, 0, 0, 1, 1); + + gammaretinex = Gtk::manage (new MyComboBoxText ()); + setExpandAlignProperties (gammaretinex, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE); + gammaretinex->append (M ("TP_RETINEX_GAMMA_NONE")); + gammaretinex->append (M ("TP_RETINEX_GAMMA_LOW")); + gammaretinex->append (M ("TP_RETINEX_GAMMA_MID")); + gammaretinex->append (M ("TP_RETINEX_GAMMA_HIGH")); + gammaretinex->append (M ("TP_RETINEX_GAMMA_FREE")); + gammaretinex->set_active (0); + gammaretinexConn = gammaretinex->signal_changed().connect ( sigc::mem_fun (*this, &Retinex::gammaretinexChanged) ); + gammaretinex->set_tooltip_markup (M ("TP_RETINEX_GAMMA_TOOLTIP")); + gamgrid->attach (*gammaretinex, 1, 0, 1, 1); + equalGrid->attach (*gamgrid, 0, 3, 1, 1); gammaretinex->show(); - equalVBox->pack_start (*gam); + gam = Gtk::manage (new Adjuster (M ("TP_RETINEX_FREEGAMMA"), 0.6, 3.0, 0.01, 1.30)); + setExpandAlignProperties (gam, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + equalGrid->attach (*gam, 0, 4, 1, 1); gam->show (); - equalVBox->pack_start (*slope); + slope = Gtk::manage (new Adjuster (M ("TP_RETINEX_SLOPE"), 1., 20., 0.1, 3.)); + setExpandAlignProperties (slope, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + equalGrid->attach (*slope, 0, 5, 1, 1); slope->show (); - equalFrame->add(*equalVBox); - settingsVBox->pack_start (*equalFrame); + //------------- + + equalFrame->add (*equalGrid); + settingsGrid->attach (*equalFrame, 0, 3, 1, 1); - Gtk::VBox *iterVBox = Gtk::manage (new Gtk::VBox()); + // TONE MAPPING Frame ------------------------------------------------------------- - iterFrame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_ITERF"))); - iterVBox->pack_start (*iter); + iterFrame = Gtk::manage (new Gtk::Frame (M ("TP_RETINEX_ITERF"))); + setExpandAlignProperties (iterFrame, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); +//GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + iterFrame->set_border_width (5); +#endif +//GTK318 + + Gtk::Grid *iterGrid = Gtk::manage (new Gtk::Grid()); + setExpandAlignProperties (iterGrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + iter = Gtk::manage (new Adjuster (M ("TP_RETINEX_ITER"), 1, 5., 1., 1.)); + setExpandAlignProperties (iter, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + iter->set_tooltip_markup (M ("TP_RETINEX_ITER_TOOLTIP")); + iterGrid->attach (*iter, 0, 0, 1, 1); iter->show (); - iterVBox->pack_start (*scal); + scal = Gtk::manage (new Adjuster (M ("TP_RETINEX_SCALES"), -1, 6., 1., 3.)); + setExpandAlignProperties (scal, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + scal->set_tooltip_markup (M ("TP_RETINEX_SCALES_TOOLTIP")); + iterGrid->attach (*scal, 0, 1, 1, 1); scal->show (); - iterVBox->pack_start (*grad); + grad = Gtk::manage (new Adjuster (M ("TP_RETINEX_GRAD"), -2., 2., 1., 1.)); + setExpandAlignProperties (grad, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + grad->set_tooltip_markup (M ("TP_RETINEX_GRAD_TOOLTIP")); + iterGrid->attach (*grad, 0, 2, 1, 1); grad->show (); - iterVBox->pack_start (*grads); + grads = Gtk::manage (new Adjuster (M ("TP_RETINEX_GRADS"), -2., 2., 1., 1.)); + setExpandAlignProperties (grads, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + grads->set_tooltip_markup (M ("TP_RETINEX_GRADS_TOOLTIP")); + iterGrid->attach (*grads, 0, 3, 1, 1); grads->show (); - iterFrame->add(*iterVBox); - settingsVBox->pack_start (*iterFrame); + //------------- - Gtk::VBox *tranVBox = Gtk::manage (new Gtk::VBox()); + iterFrame->add (*iterGrid); + settingsGrid->attach (*iterFrame, 0, 4, 1, 1); - tranFrame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_TRANF"))); - tranVBox->pack_start( *transmissionCurveEditorG, Gtk::PACK_SHRINK, 2); + // TRANSMISSION Frame ------------------------------------------------------------- + + + tranFrame = Gtk::manage (new Gtk::Frame (M ("TP_RETINEX_TRANF"))); + setExpandAlignProperties (tranFrame, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); +//GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + tranFrame->set_border_width (5); +#endif +//GTK318 + + Gtk::Grid *tranGrid = Gtk::manage (new Gtk::Grid()); + setExpandAlignProperties (tranGrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + // Transmission map curve + transmissionCurveEditorG = new CurveEditorGroup (options.lastRetinexDir, M ("TP_RETINEX_TRANSMISSION")); + setExpandAlignProperties (transmissionCurveEditorG, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + transmissionCurveEditorG->setCurveListener (this); + rtengine::RetinexParams::getDefaulttransmissionCurve (defaultCurve); + transmissionShape = static_cast (transmissionCurveEditorG->addCurve (CT_Flat, "", nullptr, false, false)); + transmissionShape->setIdentityValue (0.); + transmissionShape->setResetCurve (FlatCurveType (defaultCurve.at (0)), defaultCurve); + // transmissionShape->setBottomBarBgGradient(milestones); + transmissionCurveEditorG->curveListComplete(); + transmissionCurveEditorG->set_tooltip_markup (M ("TP_RETINEX_TRANSMISSION_TOOLTIP")); + tranGrid->attach ( *transmissionCurveEditorG, 0, 0, 1, 1); transmissionCurveEditorG->show(); - tranVBox->pack_start (*skal); + // Scale + skal = Gtk::manage (new Adjuster (M ("TP_RETINEX_SKAL"), 1, 8, 1, 3)); + setExpandAlignProperties (skal, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + tranGrid->attach (*skal, 0, 1, 1, 1); skal->show (); - tranVBox->pack_start (*limd); + // Threshold + limd = Gtk::manage (new Adjuster (M ("TP_RETINEX_THRESHOLD"), 2, 100, 1, 8)); + setExpandAlignProperties (limd, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + limd->set_tooltip_markup (M ("TP_RETINEX_THRESHOLD_TOOLTIP")); + tranGrid->attach (*limd, 0, 2, 1, 1); limd->show (); - tranVBox->pack_start (*medianmap); + // Transmission median filter + medianmap = Gtk::manage (new Gtk::CheckButton (M ("TP_RETINEX_MEDIAN"))); + setExpandAlignProperties (medianmap, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + medianmap->set_active (true); + medianmapConn = medianmap->signal_toggled().connect ( sigc::mem_fun (*this, &Retinex::medianmapChanged) ); + tranGrid->attach (*medianmap, 0, 3, 1, 1); medianmap->show (); - tranFrame->add(*tranVBox); - settingsVBox->pack_start (*tranFrame); + //------------- - Gtk::VBox *gainBox = Gtk::manage (new Gtk::VBox()); + tranFrame->add (*tranGrid); + settingsGrid->attach (*tranFrame, 0, 5, 1, 1); - Gtk::HSeparator *separator = Gtk::manage (new Gtk::HSeparator()); - settingsVBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); - gainFrame = Gtk::manage (new Gtk::Frame(M("TP_RETINEX_GAINOFFS"))); - gainBox->pack_start( *gaintransmissionCurve, Gtk::PACK_SHRINK, 2); + // GAIN AND OFFSET Frame ---------------------------------------------------------- + + + gainFrame = Gtk::manage (new Gtk::Frame (M ("TP_RETINEX_GAINOFFS"))); + setExpandAlignProperties (gainFrame, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); +//GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + gainFrame->set_border_width (5); +#endif +//GTK318 + + Gtk::Grid *gainGrid = Gtk::manage (new Gtk::Grid()); + setExpandAlignProperties (gainGrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + + // Gain Transmission map curve + gaintransmissionCurve = new CurveEditorGroup (options.lastRetinexDir, M ("TP_RETINEX_GAINTRANSMISSION")); + setExpandAlignProperties (gaintransmissionCurve, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + gaintransmissionCurve->setCurveListener (this); + rtengine::RetinexParams::getDefaultgaintransmissionCurve (defaultCurve); + gaintransmissionShape = static_cast (gaintransmissionCurve->addCurve (CT_Flat, "", nullptr, false, false)); + gaintransmissionShape->setIdentityValue (0.); + gaintransmissionShape->setResetCurve (FlatCurveType (defaultCurve.at (0)), defaultCurve); + //gaintransmissionShape->setBottomBarBgGradient(milestones); + gaintransmissionCurve->set_tooltip_markup (M ("TP_RETINEX_GAINTRANSMISSION_TOOLTIP")); + gaintransmissionCurve->curveListComplete(); + + gainGrid->attach ( *gaintransmissionCurve, 0, 0, 1, 1); gaintransmissionCurve->show(); - gainBox->pack_start (*offs); + offs = Gtk::manage (new Adjuster (M ("TP_RETINEX_OFFSET"), -1000, 5000, 1, 0)); + setExpandAlignProperties (offs, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + gainGrid->attach (*offs, 0, 1, 1, 1); offs->show (); - gainFrame->add(*gainBox); - settingsVBox->pack_start (*gainFrame); - viewbox->pack_start(*viewMethod); -// settingsVBox->pack_start(*viewbox); - retinexVBox->pack_start(*viewbox); - //settingsVBox->pack_start (*viewMethod); + gainFrame->add (*gainGrid); + settingsGrid->attach (*gainFrame, 0, 6, 1, 1); - mapbox->pack_start(*mapMethod); - // settingsVBox->pack_start(*mapbox); - p1VBox->pack_start(*mapbox); + expsettings->add (*settingsGrid, false); + expsettings->setLevel (2); + pack_start (*expsettings); - p1VBox->pack_start (*curveEditormap, Gtk::PACK_SHRINK, 4); - curveEditormap->show(); + // End of SETTINGS Expander ======================================================= - p1VBox->pack_start (*highlights); - highlights->show(); - p1VBox->pack_start (*h_tonalwidth); - h_tonalwidth->show(); - p1VBox->pack_start (*shadows); - shadows->show(); - p1VBox->pack_start (*s_tonalwidth); - s_tonalwidth->show(); - p1VBox->pack_start (*radius); - radius->show(); + // Reset button - - -// settingsVBox->pack_start (*highl); -// highl->show (); - -// settingsVBox->pack_start (*baselog); -// baselog->show (); - - // settingsVBox->pack_start (*Gtk::manage (new Gtk::HSeparator())); - - - expsettings->add(*settingsVBox); - - neutrHBox = Gtk::manage (new Gtk::HBox ()); - neutrHBox->set_border_width (2); - - neutral = Gtk::manage (new Gtk::Button (M("TP_RETINEX_NEUTRAL"))); + neutral = Gtk::manage (new Gtk::Button (M ("TP_RETINEX_NEUTRAL"))); + setExpandAlignProperties (neutral, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); - neutral->set_image(*resetImg); - neutral->set_tooltip_text (M("TP_RETINEX_NEUTRAL_TIP")); - neutralconn = neutral->signal_pressed().connect( sigc::mem_fun(*this, &Retinex::neutral_pressed) ); + setExpandAlignProperties (resetImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + neutral->set_image (*resetImg); + neutral->set_tooltip_text (M ("TP_RETINEX_NEUTRAL_TIP")); + neutralconn = neutral->signal_pressed().connect ( sigc::mem_fun (*this, &Retinex::neutral_pressed) ); neutral->show(); - neutrHBox->pack_start (*neutral); + //------------- + + pack_start (*neutral); + + + // Setting Adjusters'delay str->setAdjusterListener (this); @@ -442,12 +531,6 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), neigh->delay = 200; } - gain->setAdjusterListener (this); - - if (gain->delay < 200) { - gain->delay = 200; - } - offs->setAdjusterListener (this); if (offs->delay < 200) { @@ -472,13 +555,6 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), highl->delay = 200; } - baselog->setAdjusterListener (this); - - if (baselog->delay < 200) { - baselog->delay = 200; - } - - radius->setAdjusterListener (this); if (radius->delay < 200) { @@ -515,13 +591,6 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), skal->delay = 200; } - pack_start (*retinexVBox); - p1Frame->add(*p1VBox); - pack_start (*p1Frame, Gtk::PACK_EXPAND_WIDGET, 4); - - pack_start (*expsettings); - pack_start (*neutrHBox); - disableListener(); retinexColorSpaceChanged(); gammaretinexChanged(); @@ -532,6 +601,8 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"), Retinex::~Retinex() { + idle_register.destroy(); + delete curveEditorGD; delete curveEditorGDH; delete transmissionCurveEditorG; @@ -542,30 +613,28 @@ Retinex::~Retinex() } void Retinex::neutral_pressed () { - neigh->resetValue(false); - gain->resetValue(false); - offs->resetValue(false); - str->resetValue(false); - scal->resetValue(false); - iter->resetValue(false); - grad->resetValue(false); - grads->resetValue(false); - vart->resetValue(false); - limd->resetValue(false); - highl->resetValue(false); - baselog->resetValue(false); - gam->resetValue(false); - slope->resetValue(false); - highlights->resetValue(false); - h_tonalwidth->resetValue(false); - shadows->resetValue(false); - s_tonalwidth->resetValue(false); - radius->resetValue(false); - mapMethod->set_active(0); - viewMethod->set_active(0); - retinexMethod->set_active(2); - retinexcolorspace->set_active(0); - gammaretinex->set_active(0); + neigh->resetValue (false); + offs->resetValue (false); + str->resetValue (false); + scal->resetValue (false); + iter->resetValue (false); + grad->resetValue (false); + grads->resetValue (false); + vart->resetValue (false); + limd->resetValue (false); + highl->resetValue (false); + gam->resetValue (false); + slope->resetValue (false); + highlights->resetValue (false); + h_tonalwidth->resetValue (false); + shadows->resetValue (false); + s_tonalwidth->resetValue (false); + radius->resetValue (false); + mapMethod->set_active (0); + viewMethod->set_active (0); + retinexMethod->set_active (2); + retinexcolorspace->set_active (0); + gammaretinex->set_active (0); transmissionShape->reset(); gaintransmissionShape->reset(); cdshape->reset(); @@ -577,33 +646,22 @@ void Retinex::neutral_pressed () void Retinex::foldAllButMe (GdkEventButton* event, MyExpander *expander) { if (event->button == 3) { - expsettings->set_expanded(expsettings == expander); + expsettings->set_expanded (expsettings == expander); } } -void Retinex::writeOptions(std::vector &tpOpen) +void Retinex::writeOptions (std::vector &tpOpen) { tpOpen.push_back (expsettings->get_expanded ()); } -void Retinex::updateToolState(std::vector &tpOpen) +void Retinex::updateToolState (std::vector &tpOpen) { - if(tpOpen.size() == 10) { - expsettings->set_expanded(tpOpen.at(9)); + if (tpOpen.size() >= 10) { + expsettings->set_expanded (tpOpen.at (9)); } } - - - - -int minmaxChangedUI (void* data) -{ - GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected - (static_cast(data))->minmaxComputed_ (); - return 0; -} - void Retinex::minmaxChanged (double cdma, double cdmin, double mini, double maxi, double Tmean, double Tsigma, double Tmin, double Tmax) { nextmin = cdmin; @@ -614,8 +672,15 @@ void Retinex::minmaxChanged (double cdma, double cdmin, double mini, double maxi nextsigma = Tsigma; nextminT = Tmin; nextmaxT = Tmax; - g_idle_add (minmaxChangedUI, this); + const auto func = [] (gpointer data) -> gboolean { + GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected + static_cast (data)->minmaxComputed_(); + + return FALSE; + }; + + idle_register.add (func, this); } bool Retinex::minmaxComputed_ () @@ -635,10 +700,10 @@ void Retinex::updateLabel () nX = nextmin; nY = nextmax; { - mMLabels->set_text( - Glib::ustring::compose(M("TP_RETINEX_MLABEL"), - Glib::ustring::format(std::fixed, std::setprecision(0), nX), - Glib::ustring::format(std::fixed, std::setprecision(0), nY)) + mMLabels->set_text ( + Glib::ustring::compose (M ("TP_RETINEX_MLABEL"), + Glib::ustring::format (std::fixed, std::setprecision (0), nX), + Glib::ustring::format (std::fixed, std::setprecision (0), nY)) ); } } @@ -655,17 +720,17 @@ void Retinex::updateTrans () nB = nextmaxT; nS = nextsigma; { - transLabels->set_text( - Glib::ustring::compose(M("TP_RETINEX_TLABEL"), - Glib::ustring::format(std::fixed, std::setprecision(1), nm), - Glib::ustring::format(std::fixed, std::setprecision(1), nM), - Glib::ustring::format(std::fixed, std::setprecision(1), nZ), - Glib::ustring::format(std::fixed, std::setprecision(1), nS)) + transLabels->set_text ( + Glib::ustring::compose (M ("TP_RETINEX_TLABEL"), + Glib::ustring::format (std::fixed, std::setprecision (1), nm), + Glib::ustring::format (std::fixed, std::setprecision (1), nM), + Glib::ustring::format (std::fixed, std::setprecision (1), nZ), + Glib::ustring::format (std::fixed, std::setprecision (1), nS)) ); - transLabels2->set_text( - Glib::ustring::compose(M("TP_RETINEX_TLABEL2"), - Glib::ustring::format(std::fixed, std::setprecision(1), nA), - Glib::ustring::format(std::fixed, std::setprecision(1), nB)) + transLabels2->set_text ( + Glib::ustring::compose (M ("TP_RETINEX_TLABEL2"), + Glib::ustring::format (std::fixed, std::setprecision (1), nA), + Glib::ustring::format (std::fixed, std::setprecision (1), nB)) ); @@ -678,11 +743,11 @@ void Retinex::updateTrans () void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) { disableListener (); - retinexMethodConn.block(true); - retinexColorSpaceConn.block(true); - gammaretinexConn.block(true); - mapMethodConn.block(true); - viewMethodConn.block(true); + retinexMethodConn.block (true); + retinexColorSpaceConn.block (true); + gammaretinexConn.block (true); + mapMethodConn.block (true); + viewMethodConn.block (true); if (pedited) { @@ -693,12 +758,10 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) neigh->setEditedState (pedited->retinex.neigh ? Edited : UnEdited); gam->setEditedState (pedited->retinex.gam ? Edited : UnEdited); slope->setEditedState (pedited->retinex.slope ? Edited : UnEdited); - gain->setEditedState (pedited->retinex.gain ? Edited : UnEdited); offs->setEditedState (pedited->retinex.offs ? Edited : UnEdited); vart->setEditedState (pedited->retinex.vart ? Edited : UnEdited); limd->setEditedState (pedited->retinex.limd ? Edited : UnEdited); highl->setEditedState (pedited->retinex.highl ? Edited : UnEdited); - baselog->setEditedState (pedited->retinex.baselog ? Edited : UnEdited); skal->setEditedState (pedited->retinex.skal ? Edited : UnEdited); set_inconsistent (multiImage && !pedited->retinex.enabled); medianmap->set_inconsistent (!pedited->retinex.medianmap); @@ -710,23 +773,23 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) if (!pedited->retinex.retinexMethod) { - retinexMethod->set_active_text(M("GENERAL_UNCHANGED")); + retinexMethod->set_active_text (M ("GENERAL_UNCHANGED")); } if (!pedited->retinex.mapMethod) { - mapMethod->set_active_text(M("GENERAL_UNCHANGED")); + mapMethod->set_active_text (M ("GENERAL_UNCHANGED")); } if (!pedited->retinex.viewMethod) { - viewMethod->set_active_text(M("GENERAL_UNCHANGED")); + viewMethod->set_active_text (M ("GENERAL_UNCHANGED")); } if (!pedited->retinex.retinexcolorspace) { - retinexcolorspace->set_active_text(M("GENERAL_UNCHANGED")); + retinexcolorspace->set_active_text (M ("GENERAL_UNCHANGED")); } if (!pedited->retinex.gammaretinex) { - gammaretinex->set_active_text(M("GENERAL_UNCHANGED")); + gammaretinex->set_active_text (M ("GENERAL_UNCHANGED")); } cdshape->setUnChanged (!pedited->retinex.cdcurve); @@ -739,7 +802,6 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) } neigh->setValue (pp->retinex.neigh); - gain->setValue (pp->retinex.gain); offs->setValue (pp->retinex.offs); str->setValue (pp->retinex.str); scal->setValue (pp->retinex.scal); @@ -751,7 +813,6 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) gam->setValue (pp->retinex.gam); slope->setValue (pp->retinex.slope); highl->setValue (pp->retinex.highl); - baselog->setValue (pp->retinex.baselog); radius->setValue (pp->retinex.radius); highlights->setValue (pp->retinex.highlights); @@ -761,14 +822,16 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) skal->setValue (pp->retinex.skal); - if(pp->retinex.iter == 1) { - grad->set_sensitive(false); - scal->set_sensitive(false); - grads->set_sensitive(false); - } else { - grad->set_sensitive(true); - scal->set_sensitive(true); - grads->set_sensitive(true); + if (!batchMode) { + if (pp->retinex.iter == 1) { + grad->set_sensitive (false); + scal->set_sensitive (false); + grads->set_sensitive (false); + } else { + grad->set_sensitive (true); + scal->set_sensitive (true); + grads->set_sensitive (true); + } } setEnabled (pp->retinex.enabled); @@ -839,20 +902,20 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited) mapMethodChanged (); viewMethodChanged (); - medianmapConn.block(true); + medianmapConn.block (true); medianmapChanged (); - medianmapConn.block(false); + medianmapConn.block (false); cdshape->setCurve (pp->retinex.cdcurve); cdshapeH->setCurve (pp->retinex.cdHcurve); lhshape->setCurve (pp->retinex.lhcurve); mapshape->setCurve (pp->retinex.mapcurve); - retinexMethodConn.block(false); - retinexColorSpaceConn.block(false); - gammaretinexConn.block(false); - mapMethodConn.block(false); - viewMethodConn.block(false); + retinexMethodConn.block (false); + retinexColorSpaceConn.block (false); + gammaretinexConn.block (false); + mapMethodConn.block (false); + viewMethodConn.block (false); transmissionShape->setCurve (pp->retinex.transmissionCurve); gaintransmissionShape->setCurve (pp->retinex.gaintransmissionCurve); @@ -873,12 +936,10 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) pp->retinex.gam = gam->getValue (); pp->retinex.slope = slope->getValue (); pp->retinex.neigh = neigh->getValue (); - pp->retinex.gain = (int)gain->getValue (); pp->retinex.offs = (int)offs->getValue (); pp->retinex.vart = (int)vart->getValue (); pp->retinex.limd = (int)limd->getValue (); pp->retinex.highl = (int)highl->getValue (); - pp->retinex.baselog = baselog->getValue (); pp->retinex.skal = (int)skal->getValue (); pp->retinex.cdcurve = cdshape->getCurve (); pp->retinex.lhcurve = lhshape->getCurve (); @@ -896,11 +957,11 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) pp->retinex.stonalwidth = (int)s_tonalwidth->getValue (); if (pedited) { - pedited->retinex.retinexMethod = retinexMethod->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->retinex.retinexcolorspace = retinexcolorspace->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->retinex.gammaretinex = gammaretinex->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->retinex.mapMethod = mapMethod->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->retinex.viewMethod = viewMethod->get_active_text() != M("GENERAL_UNCHANGED"); + pedited->retinex.retinexMethod = retinexMethod->get_active_text() != M ("GENERAL_UNCHANGED"); + pedited->retinex.retinexcolorspace = retinexcolorspace->get_active_text() != M ("GENERAL_UNCHANGED"); + pedited->retinex.gammaretinex = gammaretinex->get_active_text() != M ("GENERAL_UNCHANGED"); + pedited->retinex.mapMethod = mapMethod->get_active_text() != M ("GENERAL_UNCHANGED"); + pedited->retinex.viewMethod = viewMethod->get_active_text() != M ("GENERAL_UNCHANGED"); //%%%%%%%%%%%%%%%%%%%%%% pedited->retinex.str = str->getEditedState (); @@ -911,12 +972,10 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) pedited->retinex.gam = gam->getEditedState (); pedited->retinex.slope = slope->getEditedState (); pedited->retinex.neigh = neigh->getEditedState (); - pedited->retinex.gain = gain->getEditedState (); pedited->retinex.offs = offs->getEditedState (); pedited->retinex.vart = vart->getEditedState (); pedited->retinex.limd = limd->getEditedState (); pedited->retinex.highl = highl->getEditedState (); - pedited->retinex.baselog = baselog->getEditedState (); pedited->retinex.skal = skal->getEditedState (); pedited->retinex.cdcurve = !cdshape->isUnChanged (); pedited->retinex.cdHcurve = !cdshapeH->isUnChanged (); @@ -996,10 +1055,12 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited) void Retinex::retinexMethodChanged() { - if(retinexMethod->get_active_row_number() == 3) { - highl->show(); - } else { - highl->hide(); + if (!batchMode) { + if (retinexMethod->get_active_row_number() == 3) { + highl->show(); + } else { + highl->hide(); + } } if (listener) { @@ -1012,28 +1073,29 @@ void Retinex::retinexMethodChanged() void Retinex::mapMethodChanged() { - if(mapMethod->get_active_row_number() == 1 /*|| mapMethod->get_active_row_number() == 2*/) { - curveEditormap->show(); - highlights->show(); - h_tonalwidth->show(); - shadows->show(); - s_tonalwidth->show(); - radius->show(); - } else if(mapMethod->get_active_row_number() == 2 || mapMethod->get_active_row_number() == 3) { - curveEditormap->show(); - highlights->show(); - h_tonalwidth->show(); - shadows->show(); - s_tonalwidth->show(); - radius->hide(); - } else { - curveEditormap->hide(); - highlights->hide(); - h_tonalwidth->hide(); - shadows->hide(); - s_tonalwidth->hide(); - radius->hide(); - + if (!batchMode) { + if (mapMethod->get_active_row_number() == 1 /*|| mapMethod->get_active_row_number() == 2*/) { + curveEditormap->show(); + highlights->show(); + h_tonalwidth->show(); + shadows->show(); + s_tonalwidth->show(); + radius->show(); + } else if (mapMethod->get_active_row_number() == 2 || mapMethod->get_active_row_number() == 3) { + curveEditormap->show(); + highlights->show(); + h_tonalwidth->show(); + shadows->show(); + s_tonalwidth->show(); + radius->hide(); + } else { + curveEditormap->hide(); + highlights->hide(); + h_tonalwidth->hide(); + shadows->hide(); + s_tonalwidth->hide(); + radius->hide(); + } } if (listener) { @@ -1043,38 +1105,46 @@ void Retinex::mapMethodChanged() void Retinex::viewMethodChanged() { - if(viewMethod->get_active_row_number() == 1 || viewMethod->get_active_row_number() == 2) { - // vart->hide(); - gain->hide(); - offs->hide(); - limd->hide(); - transmissionCurveEditorG->hide(); - medianmap->hide(); - iter->hide(); - scal->hide(); - grad->hide(); - grads->hide(); - curveEditorGH->hide(); - } else if(viewMethod->get_active_row_number() == 3 || viewMethod->get_active_row_number() == 4) { - gain->hide(); - offs->hide(); - transmissionCurveEditorG->show(); + if (!batchMode) { + if (viewMethod->get_active_row_number() == 1 || viewMethod->get_active_row_number() == 2) { + //vart->hide(); + offs->hide(); + limd->hide(); + transmissionCurveEditorG->hide(); + medianmap->hide(); - // vart->hide(); - curveEditorGH->hide(); - } else { - vart->show(); - neigh->show(); - gain->show(); - offs->show(); - limd->show(); - transmissionCurveEditorG->show(); - medianmap->show(); - iter->show(); - scal->show(); - grad->show(); - grads->show(); - curveEditorGH->show(); + iterFrame->hide(); + /* + iter->hide(); + scal->hide(); + grad->hide(); + grads->hide(); + */ + + curveEditorGH->hide(); + } else if (viewMethod->get_active_row_number() == 3 || viewMethod->get_active_row_number() == 4) { + offs->hide(); + transmissionCurveEditorG->show(); + //vart->hide(); + curveEditorGH->hide(); + } else { + vart->show(); + neigh->show(); + offs->show(); + limd->show(); + transmissionCurveEditorG->show(); + medianmap->show(); + + iterFrame->show(); + /* + iter->show(); + scal->show(); + grad->show(); + grads->show(); + */ + + curveEditorGH->show(); + } } if (listener) { @@ -1089,18 +1159,15 @@ void Retinex::ColorSpaceUpdateUI () if (!batchMode) { curveEditorGH->show(); - if(retinexcolorspace->get_active_row_number() == 0) { + if (retinexcolorspace->get_active_row_number() == 0) { curveEditorGD->show(); curveEditorGDH->hide(); - baselog->show(); - } else if(retinexcolorspace->get_active_row_number() == 1) { + } else if (retinexcolorspace->get_active_row_number() == 1) { curveEditorGD->hide(); curveEditorGDH->show(); - baselog->show(); - } else if(retinexcolorspace->get_active_row_number() == 2) { + } else if (retinexcolorspace->get_active_row_number() == 2) { curveEditorGD->hide(); curveEditorGDH->show(); - baselog->hide(); } } } @@ -1118,10 +1185,10 @@ void Retinex::retinexColorSpaceChanged() void Retinex::gammaretinexChanged() { if (!batchMode) { - if(gammaretinex->get_active_row_number() == 4) { + if (gammaretinex->get_active_row_number() == 4) { gam->show(); slope->show(); - } else /*if(gammaretinex->get_active_row_number() != 4)*/ { + } else { /*if(gammaretinex->get_active_row_number() != 4)*/ gam->hide(); slope->hide(); } @@ -1152,11 +1219,11 @@ void Retinex::medianmapChanged () if (listener) { if (medianmap->get_active()) { if (getEnabled()) { - listener->panelChanged (EvRetinexmedianmap, M("GENERAL_ENABLED")); + listener->panelChanged (EvRetinexmedianmap, M ("GENERAL_ENABLED")); } } else { if (getEnabled()) { - listener->panelChanged (EvRetinexmedianmap, M("GENERAL_DISABLED")); + listener->panelChanged (EvRetinexmedianmap, M ("GENERAL_DISABLED")); } } @@ -1168,7 +1235,6 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi { neigh->setDefault (defParams->retinex.neigh); - gain->setDefault (defParams->retinex.gain); offs->setDefault (defParams->retinex.offs); str->setDefault (defParams->retinex.str); scal->setDefault (defParams->retinex.scal); @@ -1178,7 +1244,6 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi vart->setDefault (defParams->retinex.vart); limd->setDefault (defParams->retinex.limd); highl->setDefault (defParams->retinex.highl); - baselog->setDefault (defParams->retinex.baselog); skal->setDefault (defParams->retinex.skal); gam->setDefault (defParams->retinex.gam); slope->setDefault (defParams->retinex.slope); @@ -1191,7 +1256,6 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi if (pedited) { neigh->setDefaultEditedState (pedited->retinex.neigh ? Edited : UnEdited); - gain->setDefaultEditedState (pedited->retinex.gain ? Edited : UnEdited); offs->setDefaultEditedState (pedited->retinex.offs ? Edited : UnEdited); str->setDefaultEditedState (pedited->retinex.str ? Edited : UnEdited); scal->setDefaultEditedState (pedited->retinex.scal ? Edited : UnEdited); @@ -1201,7 +1265,6 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi vart->setDefaultEditedState (pedited->retinex.vart ? Edited : UnEdited); limd->setDefaultEditedState (pedited->retinex.limd ? Edited : UnEdited); highl->setDefaultEditedState (pedited->retinex.highl ? Edited : UnEdited); - baselog->setDefaultEditedState (pedited->retinex.baselog ? Edited : UnEdited); skal->setDefaultEditedState (pedited->retinex.skal ? Edited : UnEdited); gam->setDefaultEditedState (pedited->retinex.gam ? Edited : UnEdited); slope->setDefaultEditedState (pedited->retinex.slope ? Edited : UnEdited); @@ -1214,12 +1277,10 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi } else { neigh->setDefaultEditedState (Irrelevant); - gain->setDefaultEditedState (Irrelevant); offs->setDefaultEditedState (Irrelevant); vart->setDefaultEditedState (Irrelevant); limd->setDefaultEditedState (Irrelevant); highl->setDefaultEditedState (Irrelevant); - baselog->setDefaultEditedState (Irrelevant); skal->setDefaultEditedState (Irrelevant); str->setDefaultEditedState (Irrelevant); scal->setDefaultEditedState (Irrelevant); @@ -1238,37 +1299,37 @@ void Retinex::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi } } -void Retinex::setAdjusterBehavior (bool strAdd, bool neighAdd, bool limdAdd, bool gainAdd, bool offsAdd, bool vartAdd, bool gamAdd, bool slopeAdd) +void Retinex::setAdjusterBehavior (bool strAdd, bool neighAdd, bool limdAdd, bool offsAdd, bool vartAdd, bool gamAdd, bool slopeAdd) { - str->setAddMode(strAdd); - neigh->setAddMode(neighAdd); - limd->setAddMode(limdAdd); - gain->setAddMode(gainAdd); - offs->setAddMode(offsAdd); - vart->setAddMode(vartAdd); - gam->setAddMode(gamAdd); - slope->setAddMode(slopeAdd); + str->setAddMode (strAdd); + neigh->setAddMode (neighAdd); + limd->setAddMode (limdAdd); + offs->setAddMode (offsAdd); + vart->setAddMode (vartAdd); + gam->setAddMode (gamAdd); + slope->setAddMode (slopeAdd); } void Retinex::adjusterChanged (Adjuster* a, double newval) { + if (a == iter && !batchMode) { + if (iter->getIntValue() > 1) { + scal->set_sensitive (true); + grad->set_sensitive (true); + grads->set_sensitive (true); + } else { + scal->set_sensitive (false); + grad->set_sensitive (false); + grads->set_sensitive (false); + } + } + if (!listener || !getEnabled()) { return; } - if(iter->getTextValue() > "1") { - scal->set_sensitive(true); - grad->set_sensitive(true); - grads->set_sensitive(true); - } else { - scal->set_sensitive(false); - grad->set_sensitive(false); - grads->set_sensitive(false); - } - - if (a == neigh) { listener->panelChanged (EvLneigh, neigh->getTextValue()); } else if (a == str) { @@ -1281,8 +1342,6 @@ void Retinex::adjusterChanged (Adjuster* a, double newval) listener->panelChanged (EvLgrad, grad->getTextValue()); } else if (a == grads) { listener->panelChanged (EvLgrads, grads->getTextValue()); - } else if (a == gain) { - listener->panelChanged (EvLgain, gain->getTextValue()); } else if (a == offs) { listener->panelChanged (EvLoffs, offs->getTextValue()); } else if (a == vart) { @@ -1291,8 +1350,6 @@ void Retinex::adjusterChanged (Adjuster* a, double newval) listener->panelChanged (EvLlimd, limd->getTextValue()); } else if (a == highl) { listener->panelChanged (EvLhighl, highl->getTextValue()); - } else if (a == baselog) { - listener->panelChanged (EvLbaselog, baselog->getTextValue()); } else if (a == skal) { listener->panelChanged (EvLskal, skal->getTextValue()); } else if (a == gam) { @@ -1333,17 +1390,17 @@ void Retinex::curveChanged (CurveEditor* ce) { if (listener && getEnabled()) { if (ce == cdshape) { - listener->panelChanged (EvLCDCurve, M("HISTORY_CUSTOMCURVE")); + listener->panelChanged (EvLCDCurve, M ("HISTORY_CUSTOMCURVE")); } else if (ce == cdshapeH) { - listener->panelChanged (EvLCDHCurve, M("HISTORY_CUSTOMCURVE")); + listener->panelChanged (EvLCDHCurve, M ("HISTORY_CUSTOMCURVE")); } else if (ce == transmissionShape) { - listener->panelChanged (EvRetinextransmission, M("HISTORY_CUSTOMCURVE")); + listener->panelChanged (EvRetinextransmission, M ("HISTORY_CUSTOMCURVE")); } else if (ce == gaintransmissionShape) { - listener->panelChanged (EvRetinexgaintransmission, M("HISTORY_CUSTOMCURVE")); + listener->panelChanged (EvRetinexgaintransmission, M ("HISTORY_CUSTOMCURVE")); } else if (ce == lhshape) { - listener->panelChanged (EvRetinexlhcurve, M("HISTORY_CUSTOMCURVE")); + listener->panelChanged (EvRetinexlhcurve, M ("HISTORY_CUSTOMCURVE")); } else if (ce == mapshape) { - listener->panelChanged (EvRetinexmapcurve, M("HISTORY_CUSTOMCURVE")); + listener->panelChanged (EvRetinexmapcurve, M ("HISTORY_CUSTOMCURVE")); } } } @@ -1353,11 +1410,11 @@ void Retinex::enabledChanged () if (listener) { if (get_inconsistent()) { - listener->panelChanged (EvRetinexEnabled, M("GENERAL_UNCHANGED")); + listener->panelChanged (EvRetinexEnabled, M ("GENERAL_UNCHANGED")); } else if (getEnabled()) { - listener->panelChanged (EvRetinexEnabled, M("GENERAL_ENABLED")); + listener->panelChanged (EvRetinexEnabled, M ("GENERAL_ENABLED")); } else { - listener->panelChanged (EvRetinexEnabled, M("GENERAL_DISABLED")); + listener->panelChanged (EvRetinexEnabled, M ("GENERAL_DISABLED")); } } } @@ -1365,22 +1422,20 @@ void Retinex::enabledChanged () void Retinex::trimValues (rtengine::procparams::ProcParams* pp) { - str->trimValue(pp->retinex.str); - scal->trimValue(pp->retinex.scal); - iter->trimValue(pp->retinex.iter); - grad->trimValue(pp->retinex.grad); - grads->trimValue(pp->retinex.grads); - neigh->trimValue(pp->retinex.neigh); - gain->trimValue(pp->retinex.gain); - offs->trimValue(pp->retinex.offs); - vart->trimValue(pp->retinex.vart); - limd->trimValue(pp->retinex.limd); - highl->trimValue(pp->retinex.highl); - baselog->trimValue(pp->retinex.baselog); - gam->trimValue(pp->retinex.gam); - slope->trimValue(pp->retinex.slope); - highlights->trimValue(pp->retinex.highlights); - shadows->trimValue(pp->retinex.shadows); + str->trimValue (pp->retinex.str); + scal->trimValue (pp->retinex.scal); + iter->trimValue (pp->retinex.iter); + grad->trimValue (pp->retinex.grad); + grads->trimValue (pp->retinex.grads); + neigh->trimValue (pp->retinex.neigh); + offs->trimValue (pp->retinex.offs); + vart->trimValue (pp->retinex.vart); + limd->trimValue (pp->retinex.limd); + highl->trimValue (pp->retinex.highl); + gam->trimValue (pp->retinex.gam); + slope->trimValue (pp->retinex.slope); + highlights->trimValue (pp->retinex.highlights); + shadows->trimValue (pp->retinex.shadows); } @@ -1394,7 +1449,7 @@ void Retinex::updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histL void Retinex::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (elemType == ColorCaller::CCET_VERTICAL_BAR) { valY = 0.5; @@ -1402,24 +1457,24 @@ void Retinex::colorForValue (double valX, double valY, enum ColorCaller::ElemTyp if (callerId == 1) { // ch - main curve - Color::hsv2rgb01(float(valX), float(valY), 0.5f, R, G, B); + Color::hsv2rgb01 (float (valX), float (valY), 0.5f, R, G, B); } else if (callerId == 2) { // cc - bottom bar - float value = (1.f - 0.7f) * float(valX) + 0.7f; + float value = (1.f - 0.7f) * float (valX) + 0.7f; // whole hue range // Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before) - Color::hsv2rgb01(float(valY), float(valX), value, R, G, B); + Color::hsv2rgb01 (float (valY), float (valX), value, R, G, B); } else if (callerId == 3) { // lc - bottom bar - float value = (1.f - 0.7f) * float(valX) + 0.7f; + float value = (1.f - 0.7f) * float (valX) + 0.7f; // whole hue range // Y axis / from 0.15 up to 0.75 (arbitrary values; was 0.45 before) - Color::hsv2rgb01(float(valY), float(valX), value, R, G, B); + Color::hsv2rgb01 (float (valY), float (valX), value, R, G, B); } else if (callerId == 4) { // LH - bottom bar - Color::hsv2rgb01(float(valX), 0.5f, float(valY), R, G, B); + Color::hsv2rgb01 (float (valX), 0.5f, float (valY), R, G, B); } else if (callerId == 5) { // HH - bottom bar - float h = float((valY - 0.5) * 0.3 + valX); + float h = float ((valY - 0.5) * 0.3 + valX); if (h > 1.0f) { h -= 1.0f; @@ -1427,12 +1482,12 @@ void Retinex::colorForValue (double valX, double valY, enum ColorCaller::ElemTyp h += 1.0f; } - Color::hsv2rgb01(h, 0.5f, 0.5f, R, G, B); + Color::hsv2rgb01 (h, 0.5f, 0.5f, R, G, B); } - caller->ccRed = double(R); - caller->ccGreen = double(G); - caller->ccBlue = double(B); + caller->ccRed = double (R); + caller->ccGreen = double (G); + caller->ccBlue = double (B); } @@ -1441,7 +1496,6 @@ void Retinex::setBatchMode (bool batchMode) { ToolPanel::setBatchMode (batchMode); neigh->showEditedCB (); - gain->showEditedCB (); offs->showEditedCB (); str->showEditedCB (); scal->showEditedCB (); @@ -1453,8 +1507,6 @@ void Retinex::setBatchMode (bool batchMode) vart->showEditedCB (); limd->showEditedCB (); highl->showEditedCB (); - baselog->showEditedCB (); - radius->showEditedCB (); highlights->showEditedCB (); h_tonalwidth->showEditedCB (); diff --git a/rtgui/retinex.h b/rtgui/retinex.h index 65602863a..134be502e 100644 --- a/rtgui/retinex.h +++ b/rtgui/retinex.h @@ -17,6 +17,8 @@ class Retinex : public ToolParamBlock, public FoldableToolPanel, public rtengin public AdjusterListener, public ColorProvider { +private: + IdleRegister idle_register; protected: CurveEditorGroup* curveEditorGD; @@ -29,12 +31,10 @@ protected: Adjuster* grads; Adjuster* iter; Adjuster* neigh; - Adjuster* gain; Adjuster* offs; Adjuster* vart; Adjuster* limd; Adjuster* highl; - Adjuster* baselog; Adjuster* skal; Adjuster* gam; Adjuster* slope; @@ -47,16 +47,15 @@ protected: MyExpander* expsettings; Gtk::Label* labmdh; - Gtk::HBox* dhbox; - Gtk::HBox* mapbox; + Gtk::Grid* dhgrid; + Gtk::Grid* mapgrid; Gtk::Label* labmap; - Gtk::HBox* viewbox; + Gtk::Grid* viewgrid; Gtk::Label* labview; Gtk::Label* labgam; - Gtk::HBox* gambox; + Gtk::Grid* gamgrid; Gtk::Button* neutral; - Gtk::HBox* neutrHBox; MyComboBoxText* retinexMethod; MyComboBoxText* retinexcolorspace; @@ -123,7 +122,7 @@ public: void ColorSpaceUpdateUI(); void writeOptions (std::vector &tpOpen); void updateToolState (std::vector &tpOpen); - void setAdjusterBehavior (bool strAdd, bool neighAdd, bool limdAdd, bool gainAdd, bool offsAdd, bool vartAdd, bool gamAdd, bool slopeAdd); + void setAdjusterBehavior (bool strAdd, bool neighAdd, bool limdAdd, bool offsAdd, bool vartAdd, bool gamAdd, bool slopeAdd); void updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histLRETI); virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller); diff --git a/rtgui/rotate.cc b/rtgui/rotate.cc index d41362132..e8ea6c48e 100644 --- a/rtgui/rotate.cc +++ b/rtgui/rotate.cc @@ -38,8 +38,7 @@ Rotate::Rotate () : FoldableToolPanel(this, "rotate", M("TP_ROTATE_LABEL")) pack_start (*degree); selectStraight = Gtk::manage (new Gtk::Button (M("TP_ROTATE_SELECTLINE"))); - Gtk::Image* selimg = Gtk::manage (new RTImage ("straighten-small.png")); - selectStraight->set_image (*selimg); + selectStraight->set_image (*Gtk::manage (new RTImage ("straighten-small.png"))); pack_start (*selectStraight, Gtk::PACK_SHRINK, 2); selectStraight->signal_pressed().connect( sigc::mem_fun(*this, &Rotate::selectStraightPressed) ); diff --git a/rtgui/rtimage.cc b/rtgui/rtimage.cc index 64d36e412..16e8e3286 100644 --- a/rtgui/rtimage.cc +++ b/rtgui/rtimage.cc @@ -23,51 +23,13 @@ #include #include "options.h" +#include "../rtengine/icons.h" namespace { -std::vector imagePaths; std::map> pixbufCache; -bool loadIconSet(const Glib::ustring& iconSet) -{ - try { - - Glib::KeyFile keyFile; - keyFile.load_from_file (iconSet); - - auto iconSetDir = keyFile.get_string ("General", "Iconset"); - - if (!iconSetDir.empty ()) { - imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "actions")); - imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir)); - imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "devices")); - imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "places")); - } - - iconSetDir = keyFile.get_string ("General", "FallbackIconset"); - - if (!iconSetDir.empty ()) { - imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "actions")); - imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir)); - imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "devices")); - imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "places")); - } - - return true; - - } catch (const Glib::Exception& exception) { - - if (options.rtSettings.verbose) { - std::cerr << "Failed to load icon set \"" << iconSet << "\": " << exception.what() << std::endl; - } - - return false; - - } -} - } RTImage::RTImage (const Glib::ustring& fileName, const Glib::ustring& rtlFileName) : Gtk::Image() @@ -90,7 +52,7 @@ void RTImage::changeImage (const Glib::ustring& imageName) auto iterator = pixbufCache.find (imageName); if (iterator == pixbufCache.end ()) { - const auto imagePath = findIconAbsolutePath (imageName); + const auto imagePath = rtengine::findIconAbsolutePath (imageName); const auto pixbuf = Gdk::Pixbuf::create_from_file (imagePath); iterator = pixbufCache.emplace (imageName, pixbuf).first; @@ -102,61 +64,18 @@ void RTImage::changeImage (const Glib::ustring& imageName) void RTImage::updateImages() { for (auto& entry : pixbufCache) { - const auto imagePath = findIconAbsolutePath (entry.first); + const auto imagePath = rtengine::findIconAbsolutePath (entry.first); entry.second = Gdk::Pixbuf::create_from_file (imagePath); } } -Glib::ustring RTImage::findIconAbsolutePath (const Glib::ustring& iconName) -{ - try { - - for (const auto& imagePath : imagePaths) { - const auto iconPath = Glib::build_filename(imagePath, iconName); - - if (Glib::file_test(iconPath, Glib::FILE_TEST_IS_REGULAR)) { - return iconPath; - } - } - - } catch(const Glib::Exception&) {} - - if (options.rtSettings.verbose) { - std::cerr << "Icon \"" << iconName << "\" could not be found!" << std::endl; - } - - return Glib::ustring(); -} - -void RTImage::setPaths (const Options& options) -{ - Glib::ustring iconSet; - - // Either use the system icon set or the one specified in the options. - if (options.useSystemTheme) { - iconSet = Glib::build_filename (argv0, "themes", "system.iconset"); - } else { - iconSet = Glib::build_filename (argv0, "themes", options.theme + ".iconset"); - } - - imagePaths.clear (); - - if (!loadIconSet (iconSet)) { - // If the preferred icon set is unavailable, fall back to the default icon set. - loadIconSet (Glib::build_filename (argv0, "themes", "Default.iconset")); - } - - // The images folder is the second fallback solution. - imagePaths.push_back (Glib::build_filename(argv0, "images")); -} - Glib::RefPtr RTImage::createFromFile (const Glib::ustring& fileName) { Glib::RefPtr pixbuf; try { - const auto filePath = findIconAbsolutePath (fileName); + const auto filePath = rtengine::findIconAbsolutePath (fileName); if (!filePath.empty ()) { pixbuf = Gdk::Pixbuf::create_from_file (filePath); @@ -179,7 +98,7 @@ Cairo::RefPtr RTImage::createFromPng (const Glib::ustring& try { - const auto filePath = findIconAbsolutePath (fileName); + const auto filePath = rtengine::findIconAbsolutePath (fileName); if (!filePath.empty()) { surface = Cairo::ImageSurface::create_from_png (Glib::locale_from_utf8 (filePath)); @@ -190,7 +109,6 @@ Cairo::RefPtr RTImage::createFromPng (const Glib::ustring& if (options.rtSettings.verbose) { std::cerr << "Failed to load PNG \"" << fileName << "\": " << exception.what() << std::endl; } - } return surface; diff --git a/rtgui/rtimage.h b/rtgui/rtimage.h index cfc7a5fa1..0286d990b 100644 --- a/rtgui/rtimage.h +++ b/rtgui/rtimage.h @@ -34,9 +34,6 @@ public: void changeImage (const Glib::ustring& imageName); static void updateImages (); - static Glib::ustring findIconAbsolutePath (const Glib::ustring& iconName); - static void setPaths (const Options& options); - static Glib::RefPtr createFromFile (const Glib::ustring& fileName); static Cairo::RefPtr createFromPng (const Glib::ustring& fileName); }; diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index de5bbee43..c51d1b7f0 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -17,12 +17,15 @@ * along with RawTherapee. If not, see . */ +#include +#include #include "rtwindow.h" #include "options.h" #include "preferences.h" #include "cursormanager.h" #include "rtimage.h" #include "whitebalance.h" +#include "../rtengine/icons.h" #if defined(__APPLE__) static gboolean @@ -89,10 +92,10 @@ RTWindow::RTWindow () cacheMgr->init (); WhiteBalance::init(); - ProfilePanel::init(); + ProfilePanel::init (this); - Glib::ustring fName = "rt-logo.png"; - Glib::ustring fullPath = RTImage::findIconAbsolutePath(fName); + Glib::ustring fName = "rt-logo-small.png"; + Glib::ustring fullPath = rtengine::findIconAbsolutePath(fName); try { set_default_icon_from_file (fullPath); @@ -119,21 +122,25 @@ RTWindow::RTWindow () #endif versionStr = "RawTherapee " + versionString; - if (!versionSuffixString.empty()) { - versionStr += " " + versionSuffixString; - } - set_title_decorated(""); - property_allow_shrink() = true; + set_resizable(true); + set_decorated(true); set_default_size(options.windowWidth, options.windowHeight); set_modal(false); - set_resizable(true); + Gdk::Rectangle lMonitorRect; + get_screen()->get_monitor_geometry(std::min(options.windowMonitor, Gdk::Screen::get_default()->get_n_monitors() - 1), lMonitorRect); if (options.windowMaximized) { + move(lMonitorRect.get_x(), lMonitorRect.get_y()); maximize(); } else { unmaximize(); - move(options.windowX, options.windowY); + resize(options.windowWidth, options.windowHeight); + if(options.windowX <= lMonitorRect.get_x() + lMonitorRect.get_width() && options.windowY <= lMonitorRect.get_y() + lMonitorRect.get_height()) { + move(options.windowX, options.windowY); + } else { + move(lMonitorRect.get_x(), lMonitorRect.get_y()); + } } on_delete_has_run = false; @@ -145,6 +152,7 @@ RTWindow::RTWindow () if(simpleEditor) { epanel = Gtk::manage( new EditorPanel (nullptr) ); epanel->setParent (this); + epanel->setParentWindow(this); add (*epanel); show_all (); @@ -160,37 +168,36 @@ RTWindow::RTWindow () } } else { mainNB = Gtk::manage (new Gtk::Notebook ()); + mainNB->set_name ("MainNotebook"); mainNB->set_scrollable (true); mainNB->signal_switch_page().connect_notify( sigc::mem_fun(*this, &RTWindow::on_mainNB_switch_page) ); + // Editor panel fpanel = new FilePanel () ; fpanel->setParent (this); // decorate tab + Gtk::Grid* fpanelLabelGrid = Gtk::manage (new Gtk::Grid ()); + setExpandAlignProperties(fpanelLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + Gtk::Label* fpl = Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") )); + if (options.mainNBVertical) { mainNB->set_tab_pos (Gtk::POS_LEFT); - - Gtk::VBox* vbf = Gtk::manage (new Gtk::VBox ()); - vbf->pack_start (*Gtk::manage (new Gtk::Image (Gtk::Stock::DIRECTORY, Gtk::ICON_SIZE_MENU))); - Gtk::Label* l = Gtk::manage(new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_FILEBROWSER"))); - l->set_angle (90); - vbf->pack_start (*l); - vbf->set_spacing (2); - vbf->set_tooltip_markup (M("MAIN_FRAME_FILEBROWSER_TOOLTIP")); - vbf->show_all (); - mainNB->append_page (*fpanel, *vbf); + fpl->set_angle (90); + fpanelLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_TOP, 1, 1); + fpanelLabelGrid->attach_next_to(*fpl, Gtk::POS_TOP, 1, 1); } else { - Gtk::HBox* hbf = Gtk::manage (new Gtk::HBox ()); - hbf->pack_start (*Gtk::manage (new Gtk::Image (Gtk::Stock::DIRECTORY, Gtk::ICON_SIZE_MENU))); - hbf->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_FILEBROWSER")))); - hbf->set_spacing (2); - hbf->set_tooltip_markup (M("MAIN_FRAME_FILEBROWSER_TOOLTIP")); - hbf->show_all (); - mainNB->append_page (*fpanel, *hbf); + fpanelLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("gtk-directory.png")), Gtk::POS_RIGHT, 1, 1); + fpanelLabelGrid->attach_next_to(*fpl, Gtk::POS_RIGHT, 1, 1); } + fpanelLabelGrid->set_tooltip_markup (M("MAIN_FRAME_FILEBROWSER_TOOLTIP")); + fpanelLabelGrid->show_all (); + mainNB->append_page (*fpanel, *fpanelLabelGrid); + + + // Batch Queue panel bpanel = Gtk::manage ( new BatchQueuePanel (fpanel->fileCatalog) ); - bpanel->setParent (this); // decorate tab, the label is unimportant since its updated in batchqueuepanel anyway Gtk::Label* lbq = Gtk::manage ( new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE")) ); @@ -201,95 +208,75 @@ RTWindow::RTWindow () mainNB->append_page (*bpanel, *lbq); - // epanel is only for single tab mode - epanel = Gtk::manage ( new EditorPanel (fpanel) ); - epanel->setParent (this); - // decorate tab - if (options.mainNBVertical) { - Gtk::VBox* vbe = Gtk::manage (new Gtk::VBox ()); - vbe->pack_start (*Gtk::manage (new RTImage ("rt-logo.png"))); - Gtk::Label* l = Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") )); - //l->set_markup(Glib::ustring("Editor")); Bold difficult to read - l->set_angle (90); - vbe->pack_start (*l); - vbe->set_spacing (2); - vbe->set_tooltip_markup (M("MAIN_FRAME_EDITOR_TOOLTIP")); - vbe->show_all (); - epanel->tbTopPanel_1_visible(true); //show the toggle Top Panel button - mainNB->append_page (*epanel, *vbe); - } else { - Gtk::HBox* hbe = Gtk::manage (new Gtk::HBox ()); - hbe->pack_start (*Gtk::manage (new RTImage ("rt-logo.png"))); - hbe->pack_start (*Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") ))); - hbe->set_spacing (2); - hbe->set_tooltip_markup (M("MAIN_FRAME_EDITOR_TOOLTIP")); - hbe->show_all (); - epanel->tbTopPanel_1_visible(true); //show the toggle Top Panel button - mainNB->append_page (*epanel, *hbe); + if(isSingleTabMode()) { + createSetmEditor(); } mainNB->set_current_page (mainNB->page_num (*fpanel)); - Gtk::VBox* mainBox = Gtk::manage (new Gtk::VBox ()); - mainBox->pack_start (*mainNB); + //Gtk::VBox* mainBox = Gtk::manage (new Gtk::VBox ()); + //mainBox->pack_start (*mainNB); // filling bottom box iFullscreen = new RTImage ("fullscreen.png"); iFullscreen_exit = new RTImage ("fullscreen-exit.png"); - Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com")); + //Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com")); // unused... but fail to be linked anyway !? //Gtk::Button* preferences = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_PREFERENCES")+"...")); Gtk::Button* preferences = Gtk::manage (new Gtk::Button ()); + setExpandAlignProperties(preferences, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); preferences->set_image (*Gtk::manage(new RTImage ("gtk-preferences.png"))); preferences->set_tooltip_markup (M("MAIN_BUTTON_PREFERENCES")); preferences->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::showPreferences) ); //btn_fullscreen = Gtk::manage( new Gtk::Button(M("MAIN_BUTTON_FULLSCREEN"))); btn_fullscreen = Gtk::manage( new Gtk::Button()); + setExpandAlignProperties(btn_fullscreen, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); btn_fullscreen->set_tooltip_markup (M("MAIN_BUTTON_FULLSCREEN")); btn_fullscreen->set_image (*iFullscreen); btn_fullscreen->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::toggle_fullscreen) ); -#if GTKMM_MINOR_VERSION >= 20 + setExpandAlignProperties(&prProgBar, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + prProgBar.set_show_text(true); + + Gtk::Grid* actionGrid = Gtk::manage (new Gtk::Grid ()); + actionGrid->set_row_spacing(2); + actionGrid->set_column_spacing(2); + + setExpandAlignProperties(actionGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); if (options.mainNBVertical) { - Gtk::VBox* bottomVBox = Gtk::manage (new Gtk::VBox ()); - bottomVBox->pack_start (prProgBar, Gtk::PACK_SHRINK, 1); - bottomVBox->pack_end (*preferences, Gtk::PACK_SHRINK, 0); - bottomVBox->pack_end (*btn_fullscreen, Gtk::PACK_EXPAND_WIDGET, 1); - prProgBar.set_orientation(Gtk::PROGRESS_BOTTOM_TO_TOP); - mainNB->set_action_widget( bottomVBox, Gtk::PACK_END); - bottomVBox->show_all(); + prProgBar.set_orientation(Gtk::ORIENTATION_VERTICAL); + prProgBar.set_inverted(true); + actionGrid->set_orientation(Gtk::ORIENTATION_VERTICAL); + actionGrid->attach_next_to(prProgBar, Gtk::POS_BOTTOM, 1, 1); + actionGrid->attach_next_to(*preferences, Gtk::POS_BOTTOM, 1, 1); + actionGrid->attach_next_to(*btn_fullscreen, Gtk::POS_BOTTOM, 1, 1); + mainNB->set_action_widget(actionGrid, Gtk::PACK_END); } else { - Gtk::HBox* bottomHBox = Gtk::manage (new Gtk::HBox ()); - bottomHBox->pack_end (*btn_fullscreen, Gtk::PACK_SHRINK, 1); - bottomHBox->pack_end (*preferences, Gtk::PACK_SHRINK, 0); - bottomHBox->pack_start (prProgBar, Gtk::PACK_EXPAND_WIDGET, 1); - mainNB->set_action_widget( bottomHBox, Gtk::PACK_END); - bottomHBox->show_all(); + prProgBar.set_orientation(Gtk::ORIENTATION_HORIZONTAL); + actionGrid->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + actionGrid->attach_next_to(prProgBar, Gtk::POS_RIGHT, 1, 1); + actionGrid->attach_next_to(*preferences, Gtk::POS_RIGHT, 1, 1); + actionGrid->attach_next_to(*btn_fullscreen, Gtk::POS_RIGHT, 1, 1); + mainNB->set_action_widget(actionGrid, Gtk::PACK_END); } -#else - Gtk::HBox* bottomBox = Gtk::manage (new Gtk::HBox ()); - bottomBox->pack_end (*btn_fullscreen, Gtk::PACK_SHRINK, 1); - bottomBox->pack_end (*preferences, Gtk::PACK_SHRINK, 0); - bottomBox->pack_start (prProgBar, Gtk::PACK_EXPAND_WIDGET, 1); - mainBox->pack_start (*bottomBox, Gtk::PACK_SHRINK, 1); -#endif + actionGrid->show_all(); pldBridge = new PLDBridge(static_cast(this)); - Glib::RefPtr style = Gtk::RcStyle::create (); - style->set_xthickness (0); - style->set_ythickness (0); - rtWeb->modify_style (style); - - add (*mainBox); + add (*mainNB); show_all (); - } - if (!isSingleTabMode() && !simpleEditor) { - epanel->hide_all(); + bpanel->init (this); + + if (!argv1.empty() && !remote) { + Thumbnail* thm = cacheMgr->getEntry(argv1); + if (thm) { + fpanel->fileCatalog->openRequested({thm}); + } + } } } @@ -309,30 +296,6 @@ RTWindow::~RTWindow() } } -void RTWindow::findVerNumbers(int* numbers, Glib::ustring versionStr) -{ - numbers[0] = numbers[1] = numbers[2] = numbers[3] = 0; - int n = 0; - - for (unsigned int i = 0; i < versionStr.length(); i++) { - char chr = (char)versionStr.at(i); - - if (chr >= '0' && chr <= '9') { - numbers[n] *= 10; - numbers[n] += (int)(chr - '0'); - } else { - n++; - - if (n > 4) { - printf("Error: malformed version string; \"%s\" must follow this format: xx.xx.xx.xx. Admitting it's a developer version...\n", versionStr.c_str()); - // Reseting the already found numbers - numbers[0] = numbers[1] = numbers[2] = numbers[3] = 100; - return; - } - } - } -} - void RTWindow::on_realize () { Gtk::Window::on_realize (); @@ -345,31 +308,29 @@ void RTWindow::on_realize () epanel->setAspect(); } - cursorManager.init (get_window()); + mainWindowCursorManager.init(get_window()); - // Check if first run of this version, then display the Release Notes text - if (options.version != versionString) { - int prevVerNbr[4]; - int currVerNbr[4]; - findVerNumbers(prevVerNbr, options.version); - findVerNumbers(currVerNbr, versionString); - - // Now we can update the version parameter with the right value - options.version = versionString; - - bool showReleaseNotes = false; - - // Check if the current version is newer - if (currVerNbr[0] > prevVerNbr[0]) { - showReleaseNotes = true; - } else if (currVerNbr[1] > prevVerNbr[1]) { - showReleaseNotes = true; - } else if (currVerNbr[2] > prevVerNbr[2]) { - showReleaseNotes = true; + // Display release notes only if new major version. + // Pattern matches "5.1" from "5.1-23-g12345678" + std::string vs[] = {versionString, options.version}; + std::regex pat("(^[0-9.]+).*"); + std::smatch sm; + std::vector vMajor; + for (const auto &v : vs) { + if (std::regex_match(v, sm, pat)) { + if (sm.size() == 2) { + std::ssub_match smsub = sm[1]; + vMajor.push_back(smsub.str()); + } } + } + + if (vMajor.size() == 2) { + if (vMajor[0] != vMajor[1]) { + + // Update the version parameter with the right value + options.version = versionString; - if (showReleaseNotes) { - // this is a first run! splash = new Splash (*this); splash->set_transient_for (*this); splash->signal_delete_event().connect( sigc::mem_fun(*this, &RTWindow::splashClosed) ); @@ -385,21 +346,25 @@ void RTWindow::on_realize () } } -bool RTWindow::on_window_state_event(GdkEventWindowState* event) +bool RTWindow::on_configure_event(GdkEventConfigure* event) { - - if (!event->new_window_state) { - // Window mode - options.windowMaximized = false; - } else if (event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_ICONIFIED)) { - // Fullscreen mode, save this mode even when window is iconified (minimized) to allow easier restore, not the best solution though... - options.windowMaximized = true; + if (!is_maximized() && is_visible()) { + get_size(options.windowWidth, options.windowHeight); + get_position (options.windowX, options.windowY); } - return true; + return Gtk::Widget::on_configure_event(event); } -void RTWindow::on_mainNB_switch_page(GtkNotebookPage* page, guint page_num) +bool RTWindow::on_window_state_event(GdkEventWindowState* event) +{ + if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) { + options.windowMaximized = event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED; + } + return Gtk::Widget::on_window_state_event(event); +} + +void RTWindow::on_mainNB_switch_page(Gtk::Widget* widget, guint page_num) { if(!on_delete_has_run) { if(isEditorPanel(page_num)) { @@ -436,30 +401,33 @@ void RTWindow::addEditorPanel (EditorPanel* ep, const std::string &name) EditWindow * wndEdit = EditWindow::getInstance(this); wndEdit->show(); wndEdit->addEditorPanel(ep, name); + wndEdit->toFront(); } else { ep->setParent (this); + ep->setParentWindow(this); // construct closeable tab for the image - Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); - hb->pack_start (*Gtk::manage (new RTImage ("rtwindow.png"))); - hb->pack_start (*Gtk::manage (new Gtk::Label (Glib::path_get_basename (name)))); - hb->set_tooltip_markup (name); + Gtk::Grid* titleGrid = Gtk::manage (new Gtk::Grid ()); + titleGrid->set_tooltip_markup (name); + RTImage *closebimg = Gtk::manage(new RTImage ("gtk-close.png")); Gtk::Button* closeb = Gtk::manage (new Gtk::Button ()); - closeb->set_image (*Gtk::manage(new RTImage ("gtk-close.png"))); + closeb->set_name ("CloseButton"); + closeb->add (*closebimg); closeb->set_relief (Gtk::RELIEF_NONE); closeb->set_focus_on_click (false); - // make the button as small as possible - Glib::RefPtr style = Gtk::RcStyle::create (); - style->set_xthickness (0); - style->set_ythickness (0); - - closeb->modify_style (style); closeb->signal_clicked().connect( sigc::bind (sigc::mem_fun(*this, &RTWindow::remEditorPanel) , ep)); - hb->pack_end (*closeb); - hb->set_spacing (2); - hb->show_all (); - mainNB->append_page (*ep, *hb); + titleGrid->attach_next_to(*Gtk::manage (new RTImage ("rtwindow.png")), Gtk::POS_RIGHT, 1, 1); + titleGrid->attach_next_to(*Gtk::manage (new Gtk::Label (Glib::path_get_basename (name))), Gtk::POS_RIGHT, 1, 1); + titleGrid->attach_next_to(*closeb, Gtk::POS_RIGHT, 1, 1); + titleGrid->show_all (); +//GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + titleGrid->set_column_spacing(2); +#endif +//GTK318 + + mainNB->append_page (*ep, *titleGrid); //ep->setAspect (); mainNB->set_current_page (mainNB->page_num (*ep)); mainNB->set_tab_reorderable (*ep, true); @@ -511,6 +479,7 @@ bool RTWindow::selectEditorPanel(const std::string &name) if (wndEdit->selectEditorPanel(name)) { set_title_decorated(name); + wndEdit->toFront(); return true; } } else { @@ -539,13 +508,13 @@ bool RTWindow::keyPressed (GdkEventKey* event) #if defined(__APPLE__) bool apple_cmd = event->state & GDK_MOD2_MASK; - if (event->keyval == GDK_q && apple_cmd) { + if (event->keyval == GDK_KEY_q && apple_cmd) { try_quit = true; } #else - if (event->keyval == GDK_q && ctrl) { + if (event->keyval == GDK_KEY_q && ctrl) { try_quit = true; } @@ -557,7 +526,7 @@ bool RTWindow::keyPressed (GdkEventKey* event) } } - if(event->keyval == GDK_F11) { + if(event->keyval == GDK_KEY_F11) { toggle_fullscreen(); } @@ -569,22 +538,22 @@ bool RTWindow::keyPressed (GdkEventKey* event) if (ctrl) { switch(event->keyval) { - case GDK_F2: // file browser panel + case GDK_KEY_F2: // file browser panel mainNB->set_current_page (mainNB->page_num (*fpanel)); return true; - case GDK_F3: // batch queue panel + case GDK_KEY_F3: // batch queue panel mainNB->set_current_page (mainNB->page_num (*bpanel)); return true; - case GDK_F4: //single tab mode, editor panel + case GDK_KEY_F4: //single tab mode, editor panel if (isSingleTabMode() && epanel) { mainNB->set_current_page (mainNB->page_num (*epanel)); } return true; - case GDK_w: //multi-tab mode, close editor panel + case GDK_KEY_w: //multi-tab mode, close editor panel if (!isSingleTabMode() && mainNB->get_current_page() != mainNB->page_num(*fpanel) && mainNB->get_current_page() != mainNB->page_num(*bpanel)) { @@ -634,9 +603,13 @@ bool RTWindow::on_delete_event(GdkEventAny* event) // Check if any editor is still processing, and do NOT quit if so. Otherwise crashes and inconsistent caches bool isProcessing = false; + EditWindow* editWindow = nullptr; if (isSingleTabMode() || simpleEditor) { isProcessing = epanel->getIsProcessing(); + } else if (options.multiDisplayMode > 0) { + editWindow = EditWindow::getInstance(this, false); + isProcessing = editWindow->isProcessing(); } else { int pageCount = mainNB->get_n_pages(); @@ -663,9 +636,13 @@ bool RTWindow::on_delete_event(GdkEventAny* event) epanel->saveProfile(); epanel->writeOptions (); } else { - // Storing the options of the last EditorPanel before Gtk destroys everything - // Look at the active panel first, if any, otherwise look at the first one (sorted on the filename) - if (epanels.size()) { + if (options.multiDisplayMode > 0 && editWindow) { + editWindow->closeOpenEditors(); + editWindow->writeOptions(); + } else if (epanels.size()) { + // Storing the options of the last EditorPanel before Gtk destroys everything + // Look at the active panel first, if any, otherwise look at the first one (sorted on the filename) + int page = mainNB->get_current_page(); Gtk::Widget *w = mainNB->get_nth_page(page); bool optionsWritten = false; @@ -694,8 +671,11 @@ bool RTWindow::on_delete_event(GdkEventAny* event) get_position (options.windowX, options.windowY); } + options.windowMonitor = get_screen()->get_monitor_at_window(get_window()); + Options::save (); hide(); + on_delete_has_run = true; return false; } @@ -707,6 +687,12 @@ void RTWindow::showPreferences () delete pref; fpanel->optionsChanged (); + if (epanel) { + epanel->defaultMonitorProfileChanged(options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); + } + for (const auto &p : epanels) { + p.second->defaultMonitorProfileChanged(options.rtSettings.monitorProfile, options.rtSettings.autoMonitorProfile); + } } void RTWindow::setProgress (double p) @@ -795,27 +781,38 @@ void RTWindow::MoveFileBrowserToEditor() } } +void RTWindow::updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC) +{ + if(epanel) { + epanel->updateProfiles(printerProfile, printerIntent, printerBPC); + } + + for(auto panel : epanels) { + panel.second->updateProfiles(printerProfile, printerIntent, printerBPC); + } +} + void RTWindow::updateTPVScrollbar (bool hide) { fpanel->updateTPVScrollbar (hide); - epanel->updateTPVScrollbar (hide); + if(epanel) { + epanel->updateTPVScrollbar (hide); + } - std::map::const_iterator itr; - - for(itr = epanels.begin(); itr != epanels.end(); ++itr) { - ((*itr).second)->updateTPVScrollbar (hide); + for(auto panel : epanels) { + panel.second->updateTPVScrollbar (hide); } } void RTWindow::updateTabsUsesIcons (bool useIcons) { fpanel->updateTabsUsesIcons (useIcons); - epanel->updateTabsUsesIcons (useIcons); + if(epanel) { + epanel->updateTabsUsesIcons (useIcons); + } - std::map::const_iterator itr; - - for(itr = epanels.begin(); itr != epanels.end(); ++itr) { - ((*itr).second)->updateTabsUsesIcons (useIcons); + for(auto panel : epanels) { + panel.second->updateTabsUsesIcons (useIcons); } } @@ -831,12 +828,11 @@ void RTWindow::updateFBToolBarVisibility (bool showFilmStripToolBar) void RTWindow::updateHistogramPosition (int oldPosition, int newPosition) { - epanel->updateHistogramPosition (oldPosition, newPosition); - - std::map::const_iterator itr; - - for(itr = epanels.begin(); itr != epanels.end(); ++itr) { - ((*itr).second)->updateHistogramPosition (oldPosition, newPosition); + if(epanel) { + epanel->updateHistogramPosition (oldPosition, newPosition); + } + for(auto panel : epanels) { + panel.second->updateHistogramPosition (oldPosition, newPosition); } } @@ -858,7 +854,7 @@ void RTWindow::set_title_decorated(Glib::ustring fname) set_title(versionStr + subtitle); } -void RTWindow::CloseOpenEditors() +void RTWindow::closeOpenEditors() { std::map::const_iterator itr; itr = epanels.begin(); @@ -878,3 +874,48 @@ bool RTWindow::isEditorPanel(guint pageNum) { return isEditorPanel(mainNB->get_nth_page(pageNum)); } + +void RTWindow::setEditorMode(bool tabbedUI) +{ + MoveFileBrowserToMain(); + closeOpenEditors(); + SetMainCurrent(); + + if(tabbedUI) { + mainNB->remove_page(*epanel); + epanel = nullptr; + set_title_decorated(""); + } else { + createSetmEditor(); + epanel->show_all(); + set_title_decorated(""); + } +} + +void RTWindow::createSetmEditor() +{ + // Editor panel, single-tab mode only + epanel = Gtk::manage ( new EditorPanel (fpanel) ); + epanel->setParent (this); + epanel->setParentWindow(this); + + // decorate tab + Gtk::Grid* const editorLabelGrid = Gtk::manage (new Gtk::Grid ()); + setExpandAlignProperties(editorLabelGrid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + Gtk::Label* const el = Gtk::manage (new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") )); + + const auto pos = options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT; + + if (options.mainNBVertical) { + el->set_angle(90); + } + + editorLabelGrid->attach_next_to(*Gtk::manage (new RTImage ("rt-logo-small.png")), pos, 1, 1); + editorLabelGrid->attach_next_to(*el, pos, 1, 1); + + editorLabelGrid->set_tooltip_markup (M("MAIN_FRAME_EDITOR_TOOLTIP")); + editorLabelGrid->show_all (); + epanel->tbTopPanel_1_visible(true); //show the toggle Top Panel button + mainNB->append_page (*epanel, *editorLabelGrid); + +} diff --git a/rtgui/rtwindow.h b/rtgui/rtwindow.h index 70e80de4d..faad5f849 100644 --- a/rtgui/rtwindow.h +++ b/rtgui/rtwindow.h @@ -80,9 +80,10 @@ public: void addBatchQueueJobs (std::vector &entries); bool keyPressed (GdkEventKey* event); + bool on_configure_event(GdkEventConfigure* event); bool on_delete_event(GdkEventAny* event); bool on_window_state_event(GdkEventWindowState* event); - void on_mainNB_switch_page(GtkNotebookPage* page, guint page_num); + void on_mainNB_switch_page(Gtk::Widget* widget, guint page_num); void showPreferences (); void on_realize (); @@ -104,6 +105,7 @@ public: void MoveFileBrowserToEditor(); void MoveFileBrowserToMain(); + void updateProfiles (const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC); void updateTPVScrollbar (bool hide); void updateHistogramPosition (int oldPosition, int newPosition); void updateTabsUsesIcons (bool useIcons); @@ -114,7 +116,9 @@ public: return is_fullscreen; } void set_title_decorated(Glib::ustring fname); - void CloseOpenEditors(); + void closeOpenEditors(); + void setEditorMode(bool tabbedUI); + void createSetmEditor(); }; #endif diff --git a/rtgui/saveasdlg.cc b/rtgui/saveasdlg.cc index 2afd1eb58..865373b60 100644 --- a/rtgui/saveasdlg.cc +++ b/rtgui/saveasdlg.cc @@ -21,42 +21,46 @@ #include "guiutils.h" #include "rtimage.h" +#include "../rtengine/utils.h" + extern Options options; -SaveAsDialog::SaveAsDialog (const Glib::ustring &initialDir) + +SaveAsDialog::SaveAsDialog (const Glib::ustring &initialDir, Gtk::Window* parent) + : Gtk::Dialog (M("GENERAL_SAVE"), *parent) { - - set_title(M("GENERAL_SAVE")); - - Gtk::VBox* vbox = get_vbox (); + Gtk::Box* box = get_content_area (); fchooser = Gtk::manage( new Gtk::FileChooserWidget (Gtk::FILE_CHOOSER_ACTION_SAVE) ); fchooser->set_current_folder (initialDir); fchooser->signal_file_activated().connect(sigc::mem_fun(*this, &SaveAsDialog::okPressed)); - filter_jpg.set_name(M("SAVEDLG_JPGFILTER")); - filter_jpg.add_pattern("*.jpg"); - filter_jpg.add_pattern("*.JPG"); - filter_jpg.add_pattern("*.jpeg"); - filter_jpg.add_pattern("*.JPEG"); - filter_jpg.add_pattern("*.jpe"); - filter_jpg.add_pattern("*.JPE"); + filter_jpg = Gtk::FileFilter::create(); + filter_jpg->set_name(M("SAVEDLG_JPGFILTER")); + filter_jpg->add_pattern("*.jpg"); + filter_jpg->add_pattern("*.JPG"); + filter_jpg->add_pattern("*.jpeg"); + filter_jpg->add_pattern("*.JPEG"); + filter_jpg->add_pattern("*.jpe"); + filter_jpg->add_pattern("*.JPE"); - filter_tif.set_name(M("SAVEDLG_JPGFILTER")); - filter_tif.add_pattern("*.tif"); - filter_tif.add_pattern("*.TIF"); - filter_tif.add_pattern("*.tiff"); - filter_tif.add_pattern("*.TIFF"); + filter_tif = Gtk::FileFilter::create(); + filter_tif->set_name(M("SAVEDLG_JPGFILTER")); + filter_tif->add_pattern("*.tif"); + filter_tif->add_pattern("*.TIF"); + filter_tif->add_pattern("*.tiff"); + filter_tif->add_pattern("*.TIFF"); - filter_png.set_name(M("SAVEDLG_JPGFILTER")); - filter_png.add_pattern("*.png"); - filter_png.add_pattern("*.PNG"); + filter_png = Gtk::FileFilter::create(); + filter_png->set_name(M("SAVEDLG_JPGFILTER")); + filter_png->add_pattern("*.png"); + filter_png->add_pattern("*.PNG"); formatChanged (options.saveFormat.format); // Output Options // ~~~~~~~~~~~~~~ formatOpts = Gtk::manage( new SaveFormatPanel () ); - formatOpts->init (options.saveFormat); + setExpandAlignProperties(formatOpts, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); formatOpts->setListener (this); // queue/immediate @@ -96,9 +100,6 @@ SaveAsDialog::SaveAsDialog (const Glib::ustring &initialDir) Gtk::Button* ok = Gtk::manage( new Gtk::Button (M("GENERAL_OK")) ); Gtk::Button* cancel = Gtk::manage( new Gtk::Button (M("GENERAL_CANCEL")) ); - ok->set_image (*Gtk::manage(new RTImage ("gtk-apply.png"))); - cancel->set_image (*Gtk::manage(new RTImage ("gtk-cancel.png"))); - ok->set_tooltip_markup (M("TP_SAVEDIALOG_OK_TIP")); ok->signal_clicked().connect( sigc::mem_fun(*this, &SaveAsDialog::okPressed) ); @@ -120,19 +121,20 @@ SaveAsDialog::SaveAsDialog (const Glib::ustring &initialDir) vbox_bottomRight->pack_start (*autoSuffix, Gtk::PACK_SHRINK, 4); Gtk::HBox* hbox_bottom = Gtk::manage( new Gtk::HBox() ); - hbox_bottom->pack_start (*formatOpts, Gtk::PACK_SHRINK, 2); + hbox_bottom->pack_start (*formatOpts, Gtk::PACK_EXPAND_WIDGET, 2); hbox_bottom->pack_start (*Gtk::manage(new Gtk::VSeparator ()), Gtk::PACK_SHRINK, 2); - hbox_bottom->pack_start (*vbox_bottomRight, Gtk::PACK_SHRINK, 2); + hbox_bottom->pack_start (*vbox_bottomRight, Gtk::PACK_EXPAND_WIDGET, 2); - vbox->pack_start (*fchooser); - vbox->pack_start (*hbox_bottom, Gtk::PACK_SHRINK, 2); + box->pack_start (*fchooser); + box->pack_start (*hbox_bottom, Gtk::PACK_SHRINK, 2); get_action_area()->pack_end (*ok, Gtk::PACK_SHRINK, 4); get_action_area()->pack_end (*cancel, Gtk::PACK_SHRINK, 4); - set_border_width (4); show_all_children (); + formatOpts->init (options.saveFormat); + signal_key_press_event().connect( sigc::mem_fun(*this, &SaveAsDialog::keyPressed) ); } @@ -217,41 +219,57 @@ SaveFormat SaveAsDialog::getFormat () void SaveAsDialog::okPressed () { - fname = fchooser->get_filename(); - // checking if the filename field is empty. The user have to click Cancel if he don't want to specify a filename // NB: There seem to be a bug in Gtkmm2.22 / FileChooserWidget : if you suppress the filename entry and // click on a folder in the list, the filename field is empty but get_filename will return the folder's path :/ - if (!fname.length() || Glib::file_test (fname, Glib::FILE_TEST_IS_DIR)) { - Glib::ustring msg_ = Glib::ustring("") + M("MAIN_MSG_EMPTYFILENAME") + ""; - Gtk::MessageDialog msgd (*this, msg_, true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK, true); - msgd.run (); + if (Glib::file_test(fname, Glib::FILE_TEST_IS_DIR)) { + fname = fchooser->get_current_name(); + } + + // Checking if the filename field is empty. The user have to click Cancel if he don't want to specify a filename + if (fname.empty()) { + Gtk::MessageDialog( + *this, + Glib::ustring("") + + M("MAIN_MSG_EMPTYFILENAME") + + "", + true, + Gtk::MESSAGE_WARNING, + Gtk::BUTTONS_OK, + true + ).run(); return; } - // resolve extension ambiguities - SaveFormat sf = formatOpts->getFormat (); - Glib::ustring extLower = getExtension (fname).lowercase (); - bool extIsEmpty = (extLower == ""); - bool extIsJpeg = (extLower == "jpg" || extLower == "jpeg" || extLower == "jpe"); - bool extIsTiff = (extLower == "tif" || extLower == "tiff"); - bool extIsPng = (extLower == "png"); + if (getExtension(fname).empty()) { + // Extension is either empty or unfamiliar + fname += '.' + formatOpts->getFormat().format; + } else if ( + !rtengine::hasJpegExtension(fname) + && !rtengine::hasTiffExtension(fname) + && !rtengine::hasPngExtension(fname) + ) { + // Create dialog to warn user that the filename may have two extensions on the end + Gtk::MessageDialog msgd( + *this, + Glib::ustring("") + + M("GENERAL_WARNING") + + ": " + + M("SAVEDLG_WARNFILENAME") + + " \"" + + Glib::path_get_basename (fname) + + '.' + + formatOpts->getFormat().format + + "\"", + true, + Gtk::MESSAGE_WARNING, + Gtk::BUTTONS_OK_CANCEL, + true + ); - if (extIsEmpty || !(extIsJpeg || extIsTiff || extIsPng)) { - // extension is either empty or unfamiliar. - fname += Glib::ustring (".") + sf.format; - } else if ( !(sf.format == "jpg" && extIsJpeg) - && !(sf.format == "tif" && extIsTiff) - && !(sf.format == "png" && extIsPng ) ) { - // create dialog to warn user that the filename may have two extensions on the end. - Glib::ustring msg_ = Glib::ustring ("") + M("GENERAL_WARNING") + ": " - + M("SAVEDLG_WARNFILENAME") + " \"" + Glib::path_get_basename (fname) - + "." + sf.format + "\""; - Gtk::MessageDialog msgd (*this, msg_, true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK_CANCEL, true); - - if (msgd.run () == Gtk::RESPONSE_OK) { - fname += Glib::ustring (".") + sf.format; + if (msgd.run() == Gtk::RESPONSE_OK) { + fname += "." + formatOpts->getFormat().format; } else { return; } @@ -302,8 +320,8 @@ bool SaveAsDialog::keyPressed (GdkEventKey* event) if (ctrl) { switch(event->keyval) { - case GDK_Return: // Ctrl-Enter equivalent to pressing OK button - case GDK_KP_Enter: + case GDK_KEY_Return: // Ctrl-Enter equivalent to pressing OK button + case GDK_KEY_KP_Enter: SaveAsDialog::okPressed(); return true; } diff --git a/rtgui/saveasdlg.h b/rtgui/saveasdlg.h index 4810b46d9..9b06471e8 100644 --- a/rtgui/saveasdlg.h +++ b/rtgui/saveasdlg.h @@ -33,9 +33,9 @@ protected: Gtk::CheckButton* forceFormatOpts; SaveFormatPanel* formatOpts; Glib::ustring fname; - Gtk::FileFilter filter_jpg; - Gtk::FileFilter filter_tif; - Gtk::FileFilter filter_png; + Glib::RefPtr filter_jpg; + Glib::RefPtr filter_tif; + Glib::RefPtr filter_png; Gtk::RadioButton* saveMethod[3]; /* 0 -> immediately * 1 -> putToQueueHead * 2 -> putToQueueTail @@ -45,7 +45,7 @@ protected: void putToQueueClicked (); public: - explicit SaveAsDialog (const Glib::ustring &initialDir); + explicit SaveAsDialog (const Glib::ustring &initialDir, Gtk::Window* parent); Glib::ustring getFileName (); Glib::ustring getDirectory (); diff --git a/rtgui/saveformatpanel.cc b/rtgui/saveformatpanel.cc index 2afd5703b..cc4088741 100644 --- a/rtgui/saveformatpanel.cc +++ b/rtgui/saveformatpanel.cc @@ -23,73 +23,104 @@ SaveFormatPanel::SaveFormatPanel () : listener (nullptr) { - jpegqual = new Adjuster (M("SAVEDLG_JPEGQUAL"), 0, 100, 1, 100); - jpegqual->setAdjusterListener (this); - jpegqual->show (); - jpegSubSampBox = Gtk::manage (new Gtk::HBox ()); + // --------------------- FILE FORMAT SELECTOR - jpegSubSampHead = Gtk::manage (new Gtk::Label (M("SAVEDLG_SUBSAMP") + Glib::ustring(":")) ); - jpegSubSampHead->show (); - jpegSubSampBox->pack_start (*jpegSubSampHead, Gtk::PACK_SHRINK, 4); - jpegSubSamp = Gtk::manage (new MyComboBoxText ()); - jpegSubSamp->append_text (M("SAVEDLG_SUBSAMP_1")); - jpegSubSamp->append_text (M("SAVEDLG_SUBSAMP_2")); - jpegSubSamp->append_text (M("SAVEDLG_SUBSAMP_3")); - jpegSubSamp->set_tooltip_text (M("SAVEDLG_SUBSAMP_TOOLTIP")); - jpegSubSamp->set_active (2); - jpegSubSamp->signal_changed().connect( sigc::mem_fun(*this, &SaveFormatPanel::formatChanged) ); - jpegSubSamp->show (); - - jpegSubSampBox->pack_end (*jpegSubSamp); - jpegSubSampBox->show (); - - pngcompr = new Adjuster (M("SAVEDLG_PNGCOMPR"), 0, 6, 1, 6); - pngcompr->setAdjusterListener (this); - pngcompr->show (); - tiffuncompressed = new Gtk::CheckButton (M("SAVEDLG_TIFFUNCOMPRESSED")); - tiffuncompressed->signal_toggled().connect( sigc::mem_fun(*this, &SaveFormatPanel::formatChanged)); - tiffuncompressed->show(); - - Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ()); + Gtk::Grid* hb1 = Gtk::manage (new Gtk::Grid ()); + hb1->set_column_spacing(5); + hb1->set_row_spacing(5); + setExpandAlignProperties(hb1, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); Gtk::Label* flab = Gtk::manage (new Gtk::Label (M("SAVEDLG_FILEFORMAT") + ":")); - hb1->pack_start (*flab, Gtk::PACK_SHRINK, 4); + setExpandAlignProperties(flab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); format = Gtk::manage (new MyComboBoxText ()); - format->append_text ("JPEG (8 bit)"); - format->append_text ("TIFF (8 bit)"); - format->append_text ("TIFF (16 bit)"); - format->append_text ("PNG (8 bit)"); - format->append_text ("PNG (16 bit)"); - format->set_active (0); - oformat = 0; - format->signal_changed().connect( sigc::mem_fun(*this, &SaveFormatPanel::formatChanged) ); - hb1->pack_start (*format); - pack_start (*hb1, Gtk::PACK_SHRINK, 4); + setExpandAlignProperties(format, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + format->signal_changed ().connect (sigc::mem_fun (*this, &SaveFormatPanel::formatChanged)); - formatopts = Gtk::manage (new Gtk::VBox ()); - formatopts->pack_start (*jpegqual, Gtk::PACK_SHRINK, 4); - formatopts->pack_start (*jpegSubSampBox, Gtk::PACK_SHRINK, 4); - pack_start (*formatopts, Gtk::PACK_SHRINK, 4); - - savespp = Gtk::manage (new Gtk::CheckButton (M("SAVEDLG_SAVESPP"))); - savespp->signal_toggled().connect( sigc::mem_fun(*this, &SaveFormatPanel::formatChanged)); - pack_start (*savespp, Gtk::PACK_SHRINK, 4); - - show_all (); - set_border_width (4); + format->append ("JPEG (8 bit)"); + format->append ("TIFF (8 bit)"); + format->append ("TIFF (16 bit)"); + format->append ("PNG (8 bit)"); + format->append ("PNG (16 bit)"); fstr[0] = "jpg"; fstr[1] = "tif"; fstr[2] = "tif"; fstr[3] = "png"; fstr[4] = "png"; + + hb1->attach (*flab, 0, 0, 1, 1); + hb1->attach (*format, 1, 0, 1, 1); + hb1->show_all(); + + // --------------------- JPEG OPTIONS + + + jpegOpts = Gtk::manage (new Gtk::Grid ()); + jpegOpts->set_column_spacing(15); + jpegOpts->set_row_spacing(5); + setExpandAlignProperties(jpegOpts, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + + jpegQual = new Adjuster (M("SAVEDLG_JPEGQUAL"), 0, 100, 1, 100); + setExpandAlignProperties(jpegQual, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + jpegQual->setAdjusterListener (this); + + jpegSubSampLabel = Gtk::manage (new Gtk::Label (M("SAVEDLG_SUBSAMP") + Glib::ustring(":")) ); + setExpandAlignProperties(jpegSubSampLabel, true, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); + + jpegSubSamp = Gtk::manage (new MyComboBoxText ()); + setExpandAlignProperties(jpegSubSamp, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + jpegSubSamp->append (M("SAVEDLG_SUBSAMP_1")); + jpegSubSamp->append (M("SAVEDLG_SUBSAMP_2")); + jpegSubSamp->append (M("SAVEDLG_SUBSAMP_3")); + jpegSubSamp->set_tooltip_text (M("SAVEDLG_SUBSAMP_TOOLTIP")); + jpegSubSamp->set_active (2); + jpegSubSamp->signal_changed().connect( sigc::mem_fun(*this, &SaveFormatPanel::formatChanged) ); + + jpegOpts->attach(*jpegQual, 0, 0, 1, 2); + jpegOpts->attach(*jpegSubSampLabel, 1, 0, 1, 1); + jpegOpts->attach(*jpegSubSamp, 1, 1, 1, 1); + jpegOpts->show_all (); + + // --------------------- PNG OPTIONS + + + pngCompr = new Adjuster (M("SAVEDLG_PNGCOMPR"), 0, 6, 1, 6); + setExpandAlignProperties(pngCompr, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + pngCompr->setAdjusterListener (this); + pngCompr->show_all (); + + + // --------------------- TIFF OPTIONS + + + tiffUncompressed = new Gtk::CheckButton (M("SAVEDLG_TIFFUNCOMPRESSED")); + setExpandAlignProperties(tiffUncompressed, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + tiffUncompressed->signal_toggled().connect( sigc::mem_fun(*this, &SaveFormatPanel::formatChanged)); + tiffUncompressed->show_all(); + + + // --------------------- MAIN BOX + + + savesPP = Gtk::manage (new Gtk::CheckButton (M("SAVEDLG_SAVESPP"))); + savesPP->signal_toggled().connect( sigc::mem_fun(*this, &SaveFormatPanel::formatChanged)); + savesPP->show_all(); + + set_column_spacing(5); + set_row_spacing(5); + + attach (*hb1, 0, 0, 1, 1); + attach (*jpegOpts, 0, 1, 1, 1); + attach (*tiffUncompressed, 0, 2, 1, 1); + attach (*pngCompr, 0, 3, 1, 1); + attach (*savesPP, 0, 4, 1, 2); } SaveFormatPanel::~SaveFormatPanel () { - delete jpegqual; - delete pngcompr; - delete tiffuncompressed; + delete jpegQual; + delete pngCompr; + delete tiffUncompressed; } void SaveFormatPanel::init (SaveFormat &sf) @@ -112,10 +143,10 @@ void SaveFormatPanel::init (SaveFormat &sf) jpegSubSamp->set_active (sf.jpegSubSamp - 1); - pngcompr->setValue (sf.pngCompression); - jpegqual->setValue (sf.jpegQuality); - savespp->set_active (sf.saveParams); - tiffuncompressed->set_active (sf.tiffUncompressed); + pngCompr->setValue (sf.pngCompression); + jpegQual->setValue (sf.jpegQuality); + savesPP->set_active (sf.saveParams); + tiffUncompressed->set_active (sf.tiffUncompressed); listener = tmp; } @@ -139,26 +170,17 @@ SaveFormat SaveFormatPanel::getFormat () sf.tiffBits = 8; } - sf.pngCompression = (int) pngcompr->getValue (); - sf.jpegQuality = (int) jpegqual->getValue (); + sf.pngCompression = (int) pngCompr->getValue (); + sf.jpegQuality = (int) jpegQual->getValue (); sf.jpegSubSamp = jpegSubSamp->get_active_row_number() + 1; - sf.tiffUncompressed = tiffuncompressed->get_active(); - sf.saveParams = savespp->get_active (); + sf.tiffUncompressed = tiffUncompressed->get_active(); + sf.saveParams = savesPP->get_active (); return sf; } void SaveFormatPanel::formatChanged () { - if (oformat == 0) { - removeIfThere (formatopts, jpegqual); - removeIfThere (formatopts, jpegSubSampBox); - } else if (oformat == 3 || oformat == 4) { - removeIfThere (formatopts, pngcompr); - } else if (oformat == 1 || oformat == 2) { - removeIfThere (formatopts, tiffuncompressed); - } - int act = format->get_active_row_number(); if (act < 0 || act > 4) { @@ -168,16 +190,19 @@ void SaveFormatPanel::formatChanged () Glib::ustring fr = fstr[act]; if (fr == "jpg") { - formatopts->pack_start (*jpegqual, Gtk::PACK_SHRINK, 4); - formatopts->pack_start (*jpegSubSampBox, Gtk::PACK_SHRINK, 4); + jpegOpts->show_all(); + tiffUncompressed->hide(); + pngCompr->hide(); } else if (fr == "png") { - formatopts->pack_start (*pngcompr, Gtk::PACK_SHRINK, 4); + jpegOpts->hide(); + tiffUncompressed->hide(); + pngCompr->show_all(); } else if (fr == "tif") { - formatopts->pack_start (*tiffuncompressed, Gtk::PACK_SHRINK, 4); + jpegOpts->hide(); + tiffUncompressed->show_all(); + pngCompr->hide(); } - oformat = act; - if (listener) { listener->formatChanged (fr); } diff --git a/rtgui/saveformatpanel.h b/rtgui/saveformatpanel.h index e4b4b1b7d..c71759399 100644 --- a/rtgui/saveformatpanel.h +++ b/rtgui/saveformatpanel.h @@ -28,26 +28,25 @@ class FormatChangeListener { public: + virtual ~FormatChangeListener () {} virtual void formatChanged (Glib::ustring f) {} - }; -class SaveFormatPanel : public Gtk::VBox, public AdjusterListener +class SaveFormatPanel : public Gtk::Grid, public AdjusterListener { protected: - Adjuster* jpegqual; - Adjuster* pngcompr; - Gtk::CheckButton* tiffuncompressed; + Adjuster* jpegQual; + Adjuster* pngCompr; + Gtk::CheckButton* tiffUncompressed; MyComboBoxText* format; MyComboBoxText* jpegSubSamp; - Gtk::VBox* formatopts; - Gtk::HBox* jpegSubSampBox; - Gtk::Label* jpegSubSampHead; - int oformat; + Gtk::Grid* formatOpts; + Gtk::Grid* jpegOpts; + Gtk::Label* jpegSubSampLabel; FormatChangeListener* listener; Glib::ustring fstr[5]; - Gtk::CheckButton* savespp; + Gtk::CheckButton* savesPP; public: diff --git a/rtgui/sharpenedge.cc b/rtgui/sharpenedge.cc index d21fe54aa..8849ffa72 100644 --- a/rtgui/sharpenedge.cc +++ b/rtgui/sharpenedge.cc @@ -48,8 +48,6 @@ SharpenEdge::SharpenEdge () : FoldableToolPanel(this, "sharpenedge", M("TP_SHARP pack_start( *amount, Gtk::PACK_SHRINK, 0);//amount pack_start( *threechannels, Gtk::PACK_SHRINK, 0);//one or 3 channels Lab - show (); - chanthreeconn = threechannels->signal_toggled().connect( sigc::mem_fun(*this, &SharpenEdge::chanthree_toggled) ); } diff --git a/rtgui/sharpening.cc b/rtgui/sharpening.cc index b83b2c6d9..72f4c62d8 100644 --- a/rtgui/sharpening.cc +++ b/rtgui/sharpening.cc @@ -26,13 +26,12 @@ Sharpening::Sharpening () : FoldableToolPanel(this, "sharpening", M("TP_SHARPENI { Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ()); - hb->set_border_width (4); hb->show (); Gtk::Label* ml = Gtk::manage (new Gtk::Label (M("TP_SHARPENING_METHOD") + ":")); ml->show (); method = Gtk::manage (new MyComboBoxText ()); - method->append_text (M("TP_SHARPENING_USM")); - method->append_text (M("TP_SHARPENING_RLD")); + method->append (M("TP_SHARPENING_USM")); + method->append (M("TP_SHARPENING_RLD")); method->show (); hb->pack_start(*ml, Gtk::PACK_SHRINK, 4); hb->pack_start(*method); @@ -459,7 +458,7 @@ void Sharpening::setBatchMode (bool batchMode) damount->showEditedCB (); ddamping->showEditedCB (); diter->showEditedCB (); - method->append_text (M("GENERAL_UNCHANGED")); + method->append (M("GENERAL_UNCHANGED")); } void Sharpening::setAdjusterBehavior (bool amountadd) diff --git a/rtgui/sharpenmicro.cc b/rtgui/sharpenmicro.cc index 62e982436..871e0d38b 100644 --- a/rtgui/sharpenmicro.cc +++ b/rtgui/sharpenmicro.cc @@ -53,8 +53,6 @@ SharpenMicro::SharpenMicro () : FoldableToolPanel(this, "sharpenmicro", M("TP_SH pack_start( *amount, Gtk::PACK_SHRINK, 0); pack_start( *uniformity, Gtk::PACK_SHRINK, 0); - show (); - matrixconn = matrix->signal_toggled().connect( sigc::mem_fun(*this, &SharpenMicro::matrix_toggled) ); } diff --git a/rtgui/shcselector.cc b/rtgui/shcselector.cc index 1a5a7be4d..e8e7f46fa 100644 --- a/rtgui/shcselector.cc +++ b/rtgui/shcselector.cc @@ -21,7 +21,7 @@ #include "multilangmgr.h" #include "mycurve.h" -SHCSelector::SHCSelector() : ColoredBar(RTO_Left2Right), movingPosition(-1), tmpX(0.0), tmpPos(0.0), wslider(0.0), cl(nullptr) +SHCSelector::SHCSelector() : movingPosition(-1), tmpX(0.0), tmpPos(0.0), wslider(0.0), cl(nullptr), coloredBar(RTO_Left2Right) { positions[0] = defaults[0] = 0.25; @@ -30,13 +30,47 @@ SHCSelector::SHCSelector() : ColoredBar(RTO_Left2Right), movingPosition(-1), tmp leftMargin = RADIUS; rightMargin = RADIUS; - // TODO: This is a hack :) ; change this name to a specific one and create a new entry in all gtkrc theme files + Glib::RefPtr style = get_style_context(); + style->add_class("drawingarea"); + style->add_class(GTK_STYLE_CLASS_TROUGH); + //style->add_class(GTK_STYLE_CLASS_SCALE); + //style->add_class(GTK_STYLE_CLASS_SLIDER); + + // TODO: This is a hack :) ; change this name to a specific one and create a new entry in all CSS theme files set_name("ThresholdSelector"); set_can_focus(false); - set_size_request (-1, 12); set_tooltip_text(M("SHCSELECTOR_TOOLTIP")); } +Gtk::SizeRequestMode SHCSelector::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_CONSTANT_SIZE; +} + +void SHCSelector::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const +{ + int minimumWidth = 0; + int naturalWidth = 0; + get_preferred_width_vfunc (minimumWidth, naturalWidth); + get_preferred_height_for_width_vfunc (minimumWidth, minimum_height, natural_height); +} + +void SHCSelector::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + minimum_width = 100; + natural_width = 150; +} + +void SHCSelector::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + natural_height = minimum_height = 14; +} + +void SHCSelector::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + get_preferred_width_vfunc (minimum_width, natural_width); +} + void SHCSelector::setMargins(int left, int right) { leftMargin = left; @@ -73,14 +107,30 @@ void SHCSelector::on_realize() Gtk::DrawingArea::on_realize(); - add_events(Gdk::EXPOSURE_MASK | Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK); + add_events(Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK); } -bool SHCSelector::on_expose_event(GdkEventExpose* event) +void SHCSelector::updateBackBuffer() { - Gdk::Color c; - Cairo::RefPtr cr = get_window()->create_cairo_context(); + if (!get_realized() || !isDirty() || !get_width() || !get_height()) { + return; + } + + // This will create or update the size of the BackBuffer::surface + setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, get_width(), get_height(), true); + + if (!surface) { + return; + } + + Cairo::RefPtr cr = Cairo::Context::create(surface); + Glib::RefPtr style = get_style_context(); + + cr->set_source_rgba (0., 0., 0., 0.); + cr->set_operator (Cairo::OPERATOR_CLEAR); + cr->paint (); + cr->set_operator (Cairo::OPERATOR_OVER); int w = get_width () - leftMargin - rightMargin; int h = get_height (); @@ -88,78 +138,96 @@ bool SHCSelector::on_expose_event(GdkEventExpose* event) wslider = std::max(int(h / 5), 10); double hwslider = double(wslider) / 2.; - Gtk::StateType state = !is_sensitive() ? Gtk::STATE_INSENSITIVE : Gtk::STATE_NORMAL; - Glib::RefPtr style = get_style(); - // clear bg + cr->set_source_rgba (0., 0., 0., 0.); + cr->set_operator (Cairo::OPERATOR_CLEAR); + cr->paint (); + cr->set_operator (Cairo::OPERATOR_OVER); + // set the box's colors cr->set_line_width (1.0); + cr->set_antialias(Cairo::ANTIALIAS_SUBPIXEL); cr->set_line_cap(Cairo::LINE_CAP_BUTT); - if (is_sensitive() && canGetColors()) { + if (is_sensitive() && coloredBar.canGetColors()) { // gradient background - Glib::RefPtr win = get_window(); - // this will eventually create/update the off-screen pixmap - setDrawRectangle(win, leftMargin + 1, 1, w - 2, int(float(h) * 5.5f / 7.f + 0.5f)); + + // this will eventually create/update the off-screen BackBuffer + coloredBar.setDrawRectangle(leftMargin + 1, 1, w - 2, int(float(h) * 5.5f / 7.f + 0.5f)); // that we're displaying here - ColoredBar::expose(win); + coloredBar.expose(*this, cr); } else { - // solid background - c = style->get_bg (state); - - if (state == Gtk::STATE_INSENSITIVE) { - cr->set_source_rgb (c.get_red_p() * 0.96, c.get_green_p() * 0.96, c.get_blue_p() * 0.96); - } else { - cr->set_source_rgb (c.get_red_p() * 0.85, c.get_green_p() * 0.85, c.get_blue_p() * 0.85); - } - - // draw the box's background - cr->rectangle (leftMargin + 1, 1, w - 2, int(float(h) * 5.5f / 7.f + 0.5f)); - cr->fill(); + style->render_background(cr, leftMargin + 1, 1, w - 2, int(float(h) * 5.5f / 7.f + 0.5f)); } - // draw the box's borders - cr->set_line_width (1.); - cr->rectangle (leftMargin + 0.5, 0.5, w - 1, int(float(h) * 5.5f / 7.f + 0.5f) + 1); - c = style->get_bg (state); + style->render_frame(cr, leftMargin + 1, 1, w - 2, int(float(h) * 5.5f / 7.f + 0.5f)); - if (state == Gtk::STATE_INSENSITIVE) { - cr->set_source_rgb (c.get_red_p() * 0.85, c.get_green_p() * 0.85, c.get_blue_p() * 0.85); - } else { - cr->set_source_rgb (c.get_red_p() * 0.7, c.get_green_p() * 0.7, c.get_blue_p() * 0.7); - } - - cr->stroke (); // draw sliders - //cr->set_line_width (1.0); for (int i = 0; i < 3; i++) { - cr->move_to (leftMargin + 0.5 + (w - 1)*positions[i] + hwslider, double(h) - 0.5); - cr->rel_line_to (0., double(-h / 3)); - cr->rel_line_to (-hwslider, double(-h / 3)); - cr->rel_line_to (-hwslider, double(h / 3)); - cr->rel_line_to (0., double(h / 3)); - cr->close_path(); - // normal - c = style->get_bg (is_sensitive() ? Gtk::STATE_ACTIVE : Gtk::STATE_INSENSITIVE); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); - cr->fill_preserve (); - c = style->get_bg (state); - - if (state == Gtk::STATE_INSENSITIVE) { - cr->set_source_rgb (c.get_red_p() * 0.85, c.get_green_p() * 0.85, c.get_blue_p() * 0.85); + if (i == movingPosition) { + style->set_state(Gtk::STATE_FLAG_ACTIVE); + } + /* + else if (i==litCursor) + style->set_state(Gtk::STATE_FLAG_PRELIGHT); + */ + else if (!is_sensitive()) { + style->set_state(Gtk::STATE_FLAG_INSENSITIVE); } else { - cr->set_source_rgb (c.get_red_p() * 0.7, c.get_green_p() * 0.7, c.get_blue_p() * 0.7); + style->set_state(Gtk::STATE_FLAG_NORMAL); } - cr->stroke (); + style->render_slider(cr, leftMargin + 0.5 + (w - 1)*positions[i] - hwslider, vb, wslider, h - vb, Gtk::ORIENTATION_VERTICAL); + style->set_state(Gtk::STATE_FLAG_NORMAL); } - // draw text for the slider that is being moved - Glib::RefPtr context = get_pango_context () ; - cr->set_line_width (0.5); + /* + for (int i=0; i<3; i++) { + double posX = leftMargin+0.5+(w-1)*positions[i]; + double arrowY = h-(h*3.5/7.-0.5)-vb; + double baseY = h-0.5-vb; + double centerY = (arrowY+baseY)/2.; + cr->move_to (posX, arrowY); + cr->line_to (posX+hwslider, centerY); + cr->line_to (posX+hwslider, baseY); + cr->line_to (posX-hwslider, baseY); + cr->line_to (posX-hwslider, centerY); + cr->close_path(); + if (i==movingPosition) { + // moved (selected) + Gdk::RGBA c = style->get_background_color(Gtk::STATE_FLAG_SELECTED); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->fill_preserve (); + c = style->get_border_color (Gtk::STATE_FLAG_SELECTED); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->stroke (); + } + / * + else if (i==litCursor) { + // prelight + Gdk::RGBA c = style->get_background_color(Gtk::STATE_FLAG_PRELIGHT); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->fill_preserve (); + c = style->get_border_color (Gtk::STATE_FLAG_PRELIGHT); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->stroke (); + } + * / + else { + // normal + Gdk::RGBA c = style->get_background_color(is_sensitive() ? Gtk::STATE_FLAG_ACTIVE : Gtk::STATE_FLAG_INSENSITIVE); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->fill_preserve (); + c = style->get_border_color (is_sensitive() ? Gtk::STATE_FLAG_ACTIVE : Gtk::STATE_FLAG_INSENSITIVE); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->stroke (); + } + } + */ + // draw text for the slider that is being moved if (movingPosition >= 0) { int i = movingPosition; int offset; @@ -167,8 +235,7 @@ bool SHCSelector::on_expose_event(GdkEventExpose* event) Glib::RefPtr layout = create_pango_layout(Glib::ustring::format(std::setprecision(2), positions[i])); layout->get_pixel_size(layout_width, layout_height); offset = positions[i] > 0.5 ? -layout_width - 1 - hwslider : 1 + hwslider; - c = style->get_bg (state); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + cr->set_source_rgb (0., 0., 0.); cr->set_line_width(3.); cr->set_line_join(Cairo::LINE_JOIN_ROUND); @@ -177,10 +244,25 @@ bool SHCSelector::on_expose_event(GdkEventExpose* event) cr->move_to (leftMargin + w * positions[i] + offset, 0.); layout->add_to_cairo_context (cr); cr->stroke_preserve(); - c = style->get_fg (Gtk::STATE_PRELIGHT); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + cr->set_line_width(0.5); + cr->set_source_rgb (1., 1., 1.); cr->fill (); } +} + +bool SHCSelector::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) +{ + + // on_realize & updateBackBuffer have to be called before + if (get_realized() && get_width() && get_height()) { + if (isDirty()) { + updateBackBuffer(); + } + + if (surface) { + copySurface(cr); + } + } return true; } @@ -256,6 +338,7 @@ bool SHCSelector::on_motion_notify_event (GdkEventMotion* event) cl->shcChanged (); } + setDirty(true); queue_draw (); } @@ -265,6 +348,7 @@ bool SHCSelector::on_motion_notify_event (GdkEventMotion* event) void SHCSelector::styleChanged (const Glib::RefPtr& style) { + setDirty(true); queue_draw (); } @@ -278,6 +362,7 @@ bool SHCSelector::reset () // : movingPosition(-1), cl(NULL) { positions[0] = defaults[0]; positions[1] = defaults[1]; positions[2] = defaults[2]; + setDirty(true); queue_draw (); return true; } @@ -289,7 +374,6 @@ void SHCSelector::refresh() { setDirty(true); Glib::RefPtr win = get_window(); - if (win) { win->invalidate(true); } diff --git a/rtgui/shcselector.h b/rtgui/shcselector.h index b71044f0f..92d4c21ba 100644 --- a/rtgui/shcselector.h +++ b/rtgui/shcselector.h @@ -29,7 +29,7 @@ public: virtual void shcChanged () {} }; -class SHCSelector : public Gtk::DrawingArea, public ColoredBar +class SHCSelector : public Gtk::DrawingArea, BackBuffer { protected: @@ -47,12 +47,26 @@ protected: int rightMargin; const static int hb = 3; // horizontal border - const static int vb = 2; // vertical border + const static int vb = 4; // vertical border SHCListener* cl; + Gtk::SizeRequestMode get_request_mode_vfunc () const; + void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const; + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; + void on_realize(); + bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr); + bool on_button_press_event (GdkEventButton* event); + bool on_button_release_event (GdkEventButton* event); + bool on_motion_notify_event (GdkEventMotion* event); + void updateBackBuffer(); + public: + ColoredBar coloredBar; + SHCSelector(); void setSHCListener (SHCListener* l) @@ -64,11 +78,6 @@ public: void setDefaults (double spos, double cpos, double hpos); void setPositions (double spos, double cpos, double hpos); void getPositions (double& spos, double& cpos, double& hpos); - void on_realize(); - bool on_expose_event(GdkEventExpose* event); - bool on_button_press_event (GdkEventButton* event); - bool on_button_release_event (GdkEventButton* event); - bool on_motion_notify_event (GdkEventMotion* event); void styleChanged (const Glib::RefPtr& style); bool reset (); void refresh(); diff --git a/rtgui/splash.cc b/rtgui/splash.cc index 87408598e..576692690 100644 --- a/rtgui/splash.cc +++ b/rtgui/splash.cc @@ -23,37 +23,22 @@ #include "multilangmgr.h" #include "rtimage.h" -extern Glib::ustring argv0; extern Glib::ustring creditsPath; extern Glib::ustring licensePath; extern Glib::ustring versionString; -extern Glib::ustring versionSuffixString; SplashImage::SplashImage () { pixbuf = RTImage::createFromFile ("splash.png"); - set_size_request (pixbuf->get_width(), pixbuf->get_height()); } -void SplashImage::on_realize () -{ - - Gtk::DrawingArea::on_realize(); - add_events(Gdk::EXPOSURE_MASK); - - gc_ = Gdk::GC::create (get_window()); - Glib::RefPtr colormap = get_default_colormap(); - Gdk::Color fontc = Gdk::Color ("white"); - colormap->alloc_color (fontc); - gc_->set_foreground (fontc); - -} - -bool SplashImage::on_expose_event (GdkEventExpose* event) +bool SplashImage::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) { Glib::RefPtr window = get_window(); - pixbuf->render_to_drawable (window, gc_, 0, 0, 0, 0, pixbuf->get_width(), pixbuf->get_height(), Gdk::RGB_DITHER_NONE, 0, 0); + Gdk::Cairo::set_source_pixbuf(cr, pixbuf); + cr->rectangle(0, 0, pixbuf->get_width(), pixbuf->get_height()); + cr->fill(); Cairo::FontOptions cfo; cfo.set_antialias (Cairo::ANTIALIAS_SUBPIXEL); @@ -63,41 +48,68 @@ bool SplashImage::on_expose_event (GdkEventExpose* event) fontd.set_weight (Pango::WEIGHT_LIGHT); fontd.set_absolute_size (12 * Pango::SCALE); context->set_font_description (fontd); - Gdk::Color *textColor = new Gdk::Color(); - textColor->set_rgb(0, 0, 0); - gc_->set_foreground(*textColor); int w, h; Glib::ustring versionStr(versionString); - if (!versionSuffixString.empty()) { - versionStr += " " + versionSuffixString; - } - version = create_pango_layout (versionStr); - version->set_markup("" + versionStr + ""); + version->set_text(versionStr); version->get_pixel_size (w, h); - window->draw_layout(gc_, pixbuf->get_width() - w - 32, pixbuf->get_height() - h - 20, version); + cr->set_source_rgb (0., 0., 0.); + cr->set_line_width(3.); + cr->set_line_join(Cairo::LINE_JOIN_ROUND); + cr->move_to (pixbuf->get_width() - w - 32, pixbuf->get_height() - h - 20); + version->add_to_cairo_context (cr); + cr->stroke_preserve(); + cr->set_source_rgb (1., 1., 1.); + cr->set_line_width(0.5); + cr->stroke_preserve(); + cr->fill(); return true; } +Gtk::SizeRequestMode SplashImage::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_CONSTANT_SIZE; +} + +void SplashImage::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const +{ + minimum_height = natural_height = pixbuf ? pixbuf->get_height() : 100; +} + +void SplashImage::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + minimum_width = natural_width = pixbuf ? pixbuf->get_width() : 100; +} + +void SplashImage::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + get_preferred_height_vfunc (minimum_height, natural_height); +} + +void SplashImage::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + get_preferred_width_vfunc (minimum_width, natural_width); +} + Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, true) { - set_border_width (4); - releaseNotesSW = nullptr; nb = Gtk::manage (new Gtk::Notebook ()); - get_vbox()->pack_start (*nb); + nb->set_name ("AboutNotebook"); + get_content_area()->pack_start (*nb); // Add close button to bottom of the notebook Gtk::Button* closeButton = Gtk::manage (new Gtk::Button (M("GENERAL_CLOSE"))); closeButton->signal_clicked().connect( sigc::mem_fun(*this, &Splash::closePressed) ); - Gtk::HBox* bottomHBox = Gtk::manage (new Gtk::HBox ()); - bottomHBox->pack_end (*closeButton, Gtk::PACK_SHRINK, 0); - get_vbox()->pack_start (*bottomHBox, Gtk::PACK_SHRINK, 0); + get_action_area()->pack_start (*closeButton, Gtk::PACK_SHRINK, 0); + + Glib::RefPtr localCSS = Gtk::CssProvider::create(); + localCSS->load_from_data ("textview { font-family: monospace; }"); // Tab 1: the image splashImage = Gtk::manage(new SplashImage ()); @@ -126,6 +138,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t Gtk::ScrolledWindow *buildSW = Gtk::manage (new Gtk::ScrolledWindow()); Gtk::TextView *buildTV = Gtk::manage (new Gtk::TextView (textBuffer)); + buildTV->get_style_context()->add_provider(localCSS, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); buildTV->set_editable(false); buildTV->set_left_margin (10); buildTV->set_right_margin (5); @@ -156,6 +169,7 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t Gtk::ScrolledWindow *creditsSW = Gtk::manage (new Gtk::ScrolledWindow()); Gtk::TextView *creditsTV = Gtk::manage (new Gtk::TextView (textBuffer)); + //creditsTV->get_style_context()->add_provider(localCSS, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); creditsTV->set_left_margin (10); creditsTV->set_right_margin (5); creditsTV->set_wrap_mode(Gtk::WRAP_WORD); @@ -187,13 +201,9 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t Gtk::ScrolledWindow *licenseSW = Gtk::manage (new Gtk::ScrolledWindow()); Gtk::TextView *licenseTV = Gtk::manage (new Gtk::TextView (textBuffer)); + //licenseTV->get_style_context()->add_provider(localCSS, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); // set monospace font to enhance readability of formatted text - Pango::FontDescription fdescLicense; - fdescLicense.set_family("monospace"); - fdescLicense.set_absolute_size (11 * Pango::SCALE); - licenseTV->modify_font(fdescLicense); - licenseTV->set_left_margin (10); licenseTV->set_right_margin (5); licenseTV->set_editable(false); @@ -225,13 +235,6 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t releaseNotesSW = Gtk::manage (new Gtk::ScrolledWindow()); Gtk::TextView *releaseNotesTV = Gtk::manage (new Gtk::TextView (textBuffer)); - // set monospace font to enhance readability of formatted text - Pango::FontDescription fdescReleaseNotes; - fdescReleaseNotes.set_family("monospace"); - fdescReleaseNotes.set_absolute_size (11 * Pango::SCALE); - releaseNotesTV->modify_font(fdescReleaseNotes); - - releaseNotesTV->set_left_margin (10); releaseNotesTV->set_right_margin (3); releaseNotesTV->set_editable(false); @@ -252,30 +255,6 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t set_keep_above (true); } -Splash::Splash (Gtk::Window& parent, int maxtime) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, true) -{ - - splashImage = Gtk::manage(new SplashImage ()); -// add (*splashImage); - get_vbox()->pack_start (*splashImage); - splashImage->show (); - - if (maxtime > 0) { - Glib::signal_timeout().connect (sigc::mem_fun(*this, &Splash::on_timer), maxtime); - } - - set_position (Gtk::WIN_POS_CENTER); - - if (maxtime > 0) { - set_decorated (false); - } - - add_events(Gdk::BUTTON_RELEASE_MASK); - set_resizable (false); - - set_keep_above (true); -} - bool Splash::on_timer () { diff --git a/rtgui/splash.h b/rtgui/splash.h index 707d0b86d..4769700f6 100644 --- a/rtgui/splash.h +++ b/rtgui/splash.h @@ -25,14 +25,17 @@ class SplashImage : public Gtk::DrawingArea { private: - Glib::RefPtr gc_; Glib::RefPtr pixbuf; Glib::RefPtr version; public: SplashImage (); - void on_realize (); - bool on_expose_event (GdkEventExpose* event); + bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr); + Gtk::SizeRequestMode get_request_mode_vfunc () const; + void get_preferred_height_vfunc (int &minimum_height, int &natural_height) const; + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; }; //class Splash : public Gtk::Window { @@ -45,7 +48,6 @@ private: Gtk::ScrolledWindow* releaseNotesSW; public: - Splash (Gtk::Window& parent, int maxtime); explicit Splash (Gtk::Window& parent); bool hasReleaseNotes() diff --git a/rtgui/thresholdadjuster.cc b/rtgui/thresholdadjuster.cc index 564507bd3..754205e2e 100644 --- a/rtgui/thresholdadjuster.cc +++ b/rtgui/thresholdadjuster.cc @@ -83,7 +83,7 @@ void ThresholdAdjuster::initObject (Glib::ustring label, bool editedcb) hbox = Gtk::manage (new Gtk::HBox ()); - this->label = Gtk::manage (new Gtk::Label (label, Gtk::ALIGN_LEFT)); + this->label = Gtk::manage (new Gtk::Label (label, Gtk::ALIGN_START)); if (editedcb) { editedCheckBox = Gtk::manage (new Gtk::CheckButton ()); @@ -98,7 +98,6 @@ void ThresholdAdjuster::initObject (Glib::ustring label, bool editedcb) reset = Gtk::manage (new Gtk::Button ()); reset->add (*Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png"))); reset->set_relief (Gtk::RELIEF_NONE); - reset->set_border_width (0); reset->set_tooltip_text (M("ADJUSTER_RESET_TO_DEFAULT")); hbox->pack_end (*reset, Gtk::PACK_SHRINK, 0); @@ -319,7 +318,7 @@ void ThresholdAdjuster::showEditedCB () void ThresholdAdjuster::refreshLabelStyle () { - /* Glib::RefPtr style = label->get_style (); + /* Glib::RefPtr style = label->get_style_context (); Pango::FontDescription fd = style->get_font (); fd.set_weight (editedState==Edited ? Pango::WEIGHT_BOLD : Pango::WEIGHT_NORMAL); style->set_font (fd); diff --git a/rtgui/thresholdadjuster.h b/rtgui/thresholdadjuster.h index 99e4efd44..200fe2175 100644 --- a/rtgui/thresholdadjuster.h +++ b/rtgui/thresholdadjuster.h @@ -33,6 +33,7 @@ class ThresholdAdjusterListener { public: + virtual ~ThresholdAdjusterListener() {} // to be used by listener that has created a ThresholdAdjuster with with single threshold and precision > 0 virtual void adjusterChanged (ThresholdAdjuster* a, double newBottom, double newTop) {} // to be used by listener that has created a ThresholdAdjuster with with double threshold and precision > 0 @@ -59,7 +60,6 @@ protected: //sigc::connection spinChange; sigc::connection selectorChange; sigc::connection editedChange; - bool listenerReady; double initialDefaultVal[4]; // default value at construction time EditedState editedState; EditedState defEditedState; @@ -139,11 +139,11 @@ public: } void setBgGradient (const std::vector &milestones) { - tSelector.setBgGradient (milestones); + tSelector.coloredBar.setBgGradient (milestones); } void setBgColorProvider (ColorProvider *cp, int i) { - tSelector.setColorProvider(cp, i); + tSelector.coloredBar.setColorProvider(cp, i); } void setUpdatePolicy (eUpdatePolicy policy) { diff --git a/rtgui/thresholdselector.cc b/rtgui/thresholdselector.cc index 59320dd2a..0f9b11cf2 100644 --- a/rtgui/thresholdselector.cc +++ b/rtgui/thresholdselector.cc @@ -27,7 +27,7 @@ ThresholdSelector::ThresholdSelector(double minValueBottom, double maxValueBottom, double defBottom, Glib::ustring labelBottom, unsigned int precisionBottom, double minValueTop, double maxValueTop, double defTop, Glib::ustring labelTop, unsigned int precisionTop, ThresholdCurveProvider* curveProvider) - : ColoredBar(RTO_Left2Right) + : coloredBar(RTO_Left2Right) { positions[TS_BOTTOMLEFT] = defPos[TS_BOTTOMLEFT] = defBottom; positions[TS_TOPLEFT] = defPos[TS_TOPLEFT] = defTop; @@ -53,7 +53,7 @@ ThresholdSelector::ThresholdSelector(double minValueBottom, double maxValueBotto ThresholdSelector::ThresholdSelector(double minValue, double maxValue, double defBottom, double defTop, unsigned int precision, bool startAtOne) - : ColoredBar(RTO_Left2Right) + : coloredBar(RTO_Left2Right) { positions[TS_BOTTOMLEFT] = defPos[TS_BOTTOMLEFT] = defBottom; positions[TS_TOPLEFT] = defPos[TS_TOPLEFT] = defTop; @@ -93,7 +93,7 @@ ThresholdSelector::ThresholdSelector(double minValue, double maxValue, double de ThresholdSelector::ThresholdSelector(double minValue, double maxValue, double defBottomLeft, double defTopLeft, double defBottomRight, double defTopRight, unsigned int precision, bool startAtOne) - : ColoredBar(RTO_Left2Right) + : coloredBar(RTO_Left2Right) { positions[TS_BOTTOMLEFT] = defPos[TS_BOTTOMLEFT] = defBottomLeft; positions[TS_TOPLEFT] = defPos[TS_TOPLEFT] = defTopLeft; @@ -142,8 +142,13 @@ void ThresholdSelector::initValues () oldLitCursor = litCursor = TS_UNDEFINED; movedCursor = TS_UNDEFINED; secondaryMovedCursor = TS_UNDEFINED; - set_size_request (-1, 30); - add_events(Gdk::LEAVE_NOTIFY_MASK); + Glib::RefPtr style = get_style_context(); + + style->add_class("drawingarea"); + style->add_class(GTK_STYLE_CLASS_TROUGH); + //style->add_class(GTK_STYLE_CLASS_SCALE); + style->add_class(GTK_STYLE_CLASS_SLIDER); + set_name("ThresholdSelector"); set_can_focus(false); set_app_paintable(true); @@ -151,6 +156,35 @@ void ThresholdSelector::initValues () updateTooltip(); } +Gtk::SizeRequestMode ThresholdSelector::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_CONSTANT_SIZE; +} + +void ThresholdSelector::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const +{ + int minimumWidth = 0; + int naturalWidth = 0; + get_preferred_width_vfunc (minimumWidth, naturalWidth); + get_preferred_height_for_width_vfunc (minimumWidth, minimum_height, natural_height); +} + +void ThresholdSelector::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + minimum_width = 60; + natural_width = 150; +} + +void ThresholdSelector::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + natural_height = minimum_height = 23; +} + +void ThresholdSelector::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + get_preferred_width_vfunc (minimum_width, natural_width); +} + /* * Set the position of the sliders without telling it to the listener */ @@ -211,21 +245,32 @@ void ThresholdSelector::on_realize() Gtk::DrawingArea::on_realize(); - add_events(Gdk::EXPOSURE_MASK | Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK); + add_events(Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::LEAVE_NOTIFY_MASK); } -bool ThresholdSelector::on_expose_event(GdkEventExpose* event) +void ThresholdSelector::updateBackBuffer() { - Gdk::Color c; - Glib::RefPtr win = get_window(); - Cairo::RefPtr cr = win->create_cairo_context(); + // This will create or update the size of the BackBuffer::surface + setDrawRectangle(Cairo::FORMAT_ARGB32, 0, 0, get_width(), get_height(), true); + + if (!surface) { + return; + } + + Cairo::RefPtr cr = Cairo::Context::create(surface); + Glib::RefPtr style = get_style_context(); + + cr->set_source_rgba (0., 0., 0., 0.); + cr->set_operator (Cairo::OPERATOR_CLEAR); + cr->paint (); + cr->set_operator (Cairo::OPERATOR_OVER); double positions01[4]; int w = get_width (); int h = get_height (); - wslider = std::max(int(h / 5), 10); + int wslider = 10; int hwslider = wslider / 2; int iw = w - wslider - 2 * hb; // inner width (excluding padding for sliders) @@ -234,35 +279,25 @@ bool ThresholdSelector::on_expose_event(GdkEventExpose* event) positions01[TS_BOTTOMRIGHT] = to01(TS_BOTTOMRIGHT); positions01[TS_TOPRIGHT] = to01(TS_TOPRIGHT); - Gtk::StateType state = !is_sensitive() ? Gtk::STATE_INSENSITIVE : Gtk::STATE_NORMAL; - Glib::RefPtr style = get_style(); - // set the box's colors cr->set_line_width (1.0); cr->set_line_cap(Cairo::LINE_CAP_BUTT); - if (is_sensitive() && canGetColors()) { - // gradient background - Glib::RefPtr win = get_window(); - // this will eventually create/update the off-screen Surface - setDrawRectangle(win, hb + hwslider, int(float(h) * 1.5f / 7.f + 0.5f), iw + 1, int(float(h) * 4.f / 7.f + 0.5f)); + if (is_sensitive() && coloredBar.canGetColors()) { + // this will eventually create/update the off-screen Surface for the gradient area only ! + coloredBar.setDrawRectangle(hb + hwslider, int(float(h) * 1.5f / 7.f + 0.5f), iw + 1, int(float(h) * 4.f / 7.f + 0.5f)); // that we're displaying here - ColoredBar::expose(win); + coloredBar.expose(*this, cr); } else { - // solid background - c = style->get_bg (state); - - if (state == Gtk::STATE_INSENSITIVE) { - cr->set_source_rgb (c.get_red_p() * 0.96, c.get_green_p() * 0.96, c.get_blue_p() * 0.96); - } else { - cr->set_source_rgb (c.get_red_p() * 0.85, c.get_green_p() * 0.85, c.get_blue_p() * 0.85); - } - - // draw the box's background - cr->rectangle (hb + hwslider - 0.5, double(int(float(h) * 1.5f / 7.f)) + 0.5, iw + 1, double(int(float(h) * 4.f / 7.f))); - cr->fill(); + style->render_background(cr, hb + hwslider, int(float(h) * 1.5f / 7.f + 0.5f), iw + 1, int(float(h) * 4.f / 7.f + 0.5f)); } + // draw the box's borders + style->render_frame(cr, hb + hwslider - 0.5, double(int(float(h) * 1.5f / 7.f)) + 0.5, iw + 1, double(int(float(h) * 4.f / 7.f))); + + cr->set_line_width (1.); + cr->set_antialias(Cairo::ANTIALIAS_NONE); + // draw curve if (bgCurveProvider) { @@ -337,90 +372,110 @@ bool ThresholdSelector::on_expose_event(GdkEventExpose* event) } } - if (is_sensitive() && bgGradient.size() > 1) { + cr->set_antialias(Cairo::ANTIALIAS_SUBPIXEL); + + if (is_sensitive() && coloredBar.canGetColors()) { // draw surrounding curve - c = style->get_bg (state); - cr->set_source_rgb (c.get_red_p() * 0.85, c.get_green_p() * 0.85, c.get_blue_p() * 0.85); + cr->set_source_rgb (0., 0., 0.); cr->set_line_width (5.0); cr->stroke_preserve(); } // draw curve if (is_sensitive()) { - c = style->get_fg (movedCursor != TS_UNDEFINED || litCursor != TS_UNDEFINED ? Gtk::STATE_PRELIGHT : Gtk::STATE_ACTIVE); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + cr->set_source_rgb (1., 1., 1.); } else { - c = style->get_bg (Gtk::STATE_INSENSITIVE); - cr->set_source_rgb (c.get_red_p() * 0.85, c.get_green_p() * 0.85, c.get_blue_p() * 0.85); + cr->set_source_rgba (0., 0., 0., 0.5); } cr->set_line_width (1.5); cr->stroke (); - // draw the box's borders - cr->set_line_width (1.); - cr->rectangle (hb + hwslider - 0.5, double(int(float(h) * 1.5f / 7.f)) + 0.5, iw + 1, double(int(float(h) * 4.f / 7.f))); - c = style->get_bg (state); - - if (state == Gtk::STATE_INSENSITIVE) { - cr->set_source_rgb (c.get_red_p() * 0.85, c.get_green_p() * 0.85, c.get_blue_p() * 0.85); - } else { - cr->set_source_rgb (c.get_red_p() * 0.7, c.get_green_p() * 0.7, c.get_blue_p() * 0.7); - } - - cr->stroke (); - // draw sliders //if (!(litCursor == TS_UNDEFINED && movedCursor == TS_UNDEFINED)) { - //cr->set_line_width (1.); - for (int i = 0; i < (doubleThresh ? 4 : 2); i++) { - double posX = hb + hwslider + iw * positions01[i] + 0.5; - double arrowY = i == 0 || i == 2 ? h - (h * 2.5 / 7. - 0.5) - vb : h * 2.5 / 7. - 0.5 + vb; - double baseY = i == 0 || i == 2 ? h - 0.5 - vb : 0.5 + vb; - double centerY = (arrowY + baseY) / 2.; - cr->move_to (posX, arrowY); - cr->line_to (posX + hwslider, centerY); - cr->line_to (posX + hwslider, baseY); - cr->line_to (posX - hwslider, baseY); - cr->line_to (posX - hwslider, centerY); - cr->close_path(); + Gtk::StateFlags currState = style->get_state(); - if (i == movedCursor) { - // moved (selected) - c = style->get_bg (Gtk::STATE_SELECTED); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); - cr->fill_preserve (); - //c = style->get_dark (Gtk::STATE_SELECTED); - //cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); - c = style->get_bg (state); - cr->set_source_rgb (c.get_red_p() * 0.55, c.get_green_p() * 0.55, c.get_blue_p() * 0.55); - cr->stroke (); - } else if (i == secondaryMovedCursor || (movedCursor == TS_UNDEFINED && i == litCursor)) { - // prelight - c = style->get_bg (Gtk::STATE_PRELIGHT); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); - cr->fill_preserve (); - c = style->get_bg (state); - cr->set_source_rgb (c.get_red_p() * 0.55, c.get_green_p() * 0.55, c.get_blue_p() * 0.55); - cr->stroke (); + for (int i = 0; i < (doubleThresh ? 4 : 2); ++i) { + if (!is_sensitive()) { + style->set_state(Gtk::STATE_FLAG_INSENSITIVE); + } else if (i == movedCursor) { + style->set_state(Gtk::STATE_FLAG_ACTIVE); + } else if (i == litCursor) { + style->set_state(Gtk::STATE_FLAG_PRELIGHT); } else { - // normal - c = style->get_bg (is_sensitive() ? Gtk::STATE_ACTIVE : Gtk::STATE_INSENSITIVE); - cr->set_source_rgb (c.get_red_p(), c.get_green_p(), c.get_blue_p()); + style->set_state(Gtk::STATE_FLAG_NORMAL); + } + + double posX = hb + iw * positions01[i] + 0.5; + double arrowY = i == 0 || i == 2 ? h - (h * 3. / 7. - 0.5) - vb : h * 3. / 7. - 0.5 + vb; + double baseY = i == 0 || i == 2 ? h - 0.5 - vb : 0.5 + vb; + + style->render_slider(cr, posX, i == 0 || i == 2 ? arrowY : baseY, wslider, i == 0 || i == 2 ? baseY - arrowY : arrowY - baseY, Gtk::ORIENTATION_HORIZONTAL); + } + + style->set_state(currState); + + /* + * + Gtk::StateFlags state = !is_sensitive() ? Gtk::STATE_FLAG_INSENSITIVE : Gtk::STATE_FLAG_NORMAL; + + cr->set_line_width (1.); + for (int i=0; i<(doubleThresh?4:2); i++) { + double posX = hb+hwslider+iw*positions01[i]+0.5; + double arrowY = i==0 || i==2 ? h-(h*2.5/7.-0.5)-vb : h*2.5/7.-0.5+vb; + double baseY = i==0 || i==2 ? h-0.5-vb : 0.5+vb; + double centerY = (arrowY+baseY)/2.; + cr->move_to (posX, arrowY); + cr->line_to (posX+hwslider, centerY); + cr->line_to (posX+hwslider, baseY); + cr->line_to (posX-hwslider, baseY); + cr->line_to (posX-hwslider, centerY); + cr->close_path(); + if (i==movedCursor) { + // moved (selected) + c = style->get_background_color(Gtk::STATE_FLAG_SELECTED); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->fill_preserve (); - c = style->get_bg (state); - - if (state == Gtk::STATE_INSENSITIVE) { - cr->set_source_rgb (c.get_red_p() * 0.85, c.get_green_p() * 0.85, c.get_blue_p() * 0.85); - } else { - cr->set_source_rgb (c.get_red_p() * 0.7, c.get_green_p() * 0.7, c.get_blue_p() * 0.7); - } - + c = style->get_border_color (Gtk::STATE_FLAG_SELECTED); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->stroke (); + } + else if (i==secondaryMovedCursor || (movedCursor==TS_UNDEFINED && i==litCursor)) { + // prelight + c = style->get_background_color(Gtk::STATE_FLAG_PRELIGHT); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->fill_preserve (); + c = style->get_border_color (Gtk::STATE_FLAG_PRELIGHT); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->stroke (); + } + else { + // normal + c = style->get_background_color(is_sensitive() ? Gtk::STATE_FLAG_ACTIVE : Gtk::STATE_FLAG_INSENSITIVE); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); + cr->fill_preserve (); + c = style->get_border_color (is_sensitive() ? Gtk::STATE_FLAG_ACTIVE : Gtk::STATE_FLAG_INSENSITIVE); + cr->set_source_rgb (c.get_red(), c.get_green(), c.get_blue()); cr->stroke (); } } - + */ //} +} + +bool ThresholdSelector::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) +{ + + // on_realize & updateBackBuffer have to be called before + if (get_realized() && get_width() && get_height()) { + if (isDirty()) { + updateBackBuffer(); + } + + if (surface) { + copySurface(cr); + } + } return true; } diff --git a/rtgui/thresholdselector.h b/rtgui/thresholdselector.h index fabbfb9db..f6caa4302 100644 --- a/rtgui/thresholdselector.h +++ b/rtgui/thresholdselector.h @@ -56,11 +56,11 @@ public: * on the graph. E.g. the "bottomLeft" value is related to the bottom left cursor. * * It is also possible to have a threshold with 2 totally independent cursors, each one having his own range, - * man/max/default values and precision. This let developers create their own threshold curve, that they will - * have to provide through the + * min/max/default values and precision. This let developers create their own threshold curve, that they will + * have to provide through the ThresholdCurveProvider interface * */ -class ThresholdSelector : public Gtk::DrawingArea, public ColoredBar +class ThresholdSelector : public Gtk::DrawingArea, public BackBuffer { public: @@ -98,11 +98,10 @@ protected: double minValBottom, maxValBottom; double defPos[4]; double positions[4]; - unsigned short wslider; eUpdatePolicy updatePolicy; const static int hb = 3; // horizontal border - const static int vb = 2; // vertical border + const static int vb = 0; // vertical border void initValues (); void findLitCursor(int posX, int posY); @@ -110,9 +109,23 @@ protected: void findBoundaries(double &min, double &max); double to01(ThreshCursorId cursorId); void updateTooltip(); + void updateBackBuffer(); + + Gtk::SizeRequestMode get_request_mode_vfunc () const; + void get_preferred_height_vfunc (int& minimum_height, int& natural_height) const; + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; + void on_realize (); + bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr); + bool on_button_press_event (GdkEventButton* event); + bool on_button_release_event (GdkEventButton* event); + bool on_motion_notify_event (GdkEventMotion* event); + bool on_leave_notify_event (GdkEventCrossing* event); public: + ColoredBar coloredBar; sigc::signal signal_value_changed(); ThresholdSelector(double minValueBottom, double maxValueBottom, double defBottom, Glib::ustring labelBottom, unsigned int precisionBottom, @@ -201,12 +214,6 @@ public: { return doubleThresh; } - void on_realize (); - bool on_expose_event(GdkEventExpose* event); - bool on_button_press_event (GdkEventButton* event); - bool on_button_release_event (GdkEventButton* event); - bool on_motion_notify_event (GdkEventMotion* event); - bool on_leave_notify_event (GdkEventCrossing* event); void styleChanged (const Glib::RefPtr& style); unsigned int getPrecision () { diff --git a/rtgui/thumbbrowserbase.cc b/rtgui/thumbbrowserbase.cc index 8a067ca49..abb8ec68d 100644 --- a/rtgui/thumbbrowserbase.cc +++ b/rtgui/thumbbrowserbase.cc @@ -14,43 +14,36 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include -#include "../rtengine/rt_math.h" +#include + +#include -#include "thumbbrowserbase.h" #include "multilangmgr.h" #include "options.h" +#include "thumbbrowserbase.h" + #include "../rtengine/mytime.h" +#include "../rtengine/rt_math.h" using namespace std; ThumbBrowserBase::ThumbBrowserBase () - : lastClicked(nullptr), previewHeight(options.thumbSize), numOfCols(1), inspector(nullptr), isInspectorActive(false), location(THLOC_FILEBROWSER) + : location(THLOC_FILEBROWSER), inspector(nullptr), isInspectorActive(false), eventTime(0), lastClicked(nullptr), previewHeight(options.thumbSize), numOfCols(1), arrangement(TB_Horizontal) { inW = -1; inH = -1; - Gtk::HBox* hb1 = Gtk::manage( new Gtk::HBox () ); - Gtk::HBox* hb2 = Gtk::manage( new Gtk::HBox () ); - Gtk::Frame* frame = Gtk::manage( new Gtk::Frame () ); - frame->add (internal); - frame->set_shadow_type (Gtk::SHADOW_IN ); - hb1->pack_start (*frame); - hb1->pack_end (vscroll, Gtk::PACK_SHRINK, 0); - - pack_start (*hb1); - - hb2->pack_start (hscroll); - - pack_start (*hb2, Gtk::PACK_SHRINK, 0); + setExpandAlignProperties(&internal, true, true, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL); + setExpandAlignProperties(&hscroll, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); + setExpandAlignProperties(&vscroll, false, true, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); + attach (internal, 0, 0, 1, 1); + attach (vscroll, 1, 0, 1, 1); + attach (hscroll, 0, 1, 1, 1); internal.setParent (this); show_all (); - hscroll.set_update_policy (Gtk::UPDATE_CONTINUOUS); - vscroll.set_update_policy (Gtk::UPDATE_CONTINUOUS); - vscroll.signal_value_changed().connect( sigc::mem_fun(*this, &ThumbBrowserBase::scrollChanged) ); hscroll.signal_value_changed().connect( sigc::mem_fun(*this, &ThumbBrowserBase::scrollChanged) ); @@ -525,7 +518,7 @@ void ThumbBrowserBase::configScrollBars () } } -void ThumbBrowserBase::arrangeFiles () +void ThumbBrowserBase::arrangeFiles() { MYREADERLOCK(l, entryRW); @@ -533,74 +526,60 @@ void ThumbBrowserBase::arrangeFiles () // We could lock it one more time, there's no harm excepted (negligible) speed penalty //GThreadLock lock; - int N = fd.size (); - - // apply filter - for (int i = 0; i < N; i++) { - fd[i]->filtered = !checkFilter (fd[i]); - } - int rowHeight = 0; - // compute size of the items - for (int i = 0; i < N; i++) + for (unsigned int i = 0; i < fd.size(); i++) { + // apply filter + fd[i]->filtered = !checkFilter (fd[i]); + + // compute size of the items if (!fd[i]->filtered && fd[i]->getMinimalHeight() > rowHeight) { rowHeight = fd[i]->getMinimalHeight (); } + } if (arrangement == TB_Horizontal) { numOfCols = 1; - int numOfRows = 1; -// if (rowHeight>0) { -// numOfRows = (internal.get_height()+rowHeight/2)/rowHeight; -// if (numOfRows<1) -// numOfRows = 1; -// } - int ct = 0; int currx = 0; - while (ct < N) { - // find widest item in the column - int maxw = 0; - - for (int i = 0; ct + i < N && i < numOfRows; i++) - if (fd[ct + i]->getMinimalWidth() > maxw) { - maxw = fd[ct + i]->getMinimalWidth (); - } - + for (unsigned int ct = 0; ct < fd.size(); ++ct) { // arrange items in the column int curry = 0; - for (int i = 0; ct < N && i < numOfRows; i++, ct++) { - while (ct < N && fd[ct]->filtered) { - fd[ct++]->drawable = false; - } - - if (ct < N) { - fd[ct]->setPosition (currx, curry, maxw, rowHeight); - fd[ct]->drawable = true; - curry += rowHeight; - } + for (; ct < fd.size() && fd[ct]->filtered; ++ct) { + fd[ct]->drawable = false; } - currx += maxw; + if (ct < fd.size()) { + const int maxw = fd[ct]->getMinimalWidth(); + + fd[ct]->setPosition(currx, curry, maxw, rowHeight); + fd[ct]->drawable = true; + currx += maxw; + curry += rowHeight; + } } MYREADERLOCK_RELEASE(l); // This will require a Writer access - resizeThumbnailArea (currx, numOfRows * rowHeight); + resizeThumbnailArea(currx, rowHeight); } else { - int availWidth = internal.get_width(); + const int availWidth = internal.get_width(); + // initial number of columns numOfCols = 0; int colsWidth = 0; - for (int i = 0; i < N; i++) + for (unsigned int i = 0; i < fd.size(); ++i) { if (!fd[i]->filtered && colsWidth + fd[i]->getMinimalWidth() <= availWidth) { - colsWidth += fd[numOfCols]->getMinimalWidth (); - numOfCols++; + colsWidth += fd[numOfCols]->getMinimalWidth(); + ++numOfCols; + if(colsWidth > availWidth) { + break; + } } + } if (numOfCols < 1) { numOfCols = 1; @@ -608,30 +587,22 @@ void ThumbBrowserBase::arrangeFiles () std::vector colWidths; - for (; numOfCols > 0; numOfCols--) { + for (; numOfCols > 0; --numOfCols) { // compute column widths - colWidths.resize (numOfCols); + colWidths.assign(numOfCols, 0); - for (int i = 0; i < numOfCols; i++) { - colWidths[i] = 0; - } - - for (int i = 0, j = 0; i < N; i++) { + for (unsigned int i = 0, j = 0; i < fd.size(); ++i) { if (!fd[i]->filtered && fd[i]->getMinimalWidth() > colWidths[j % numOfCols]) { - colWidths[j % numOfCols] = fd[i]->getMinimalWidth (); + colWidths[j % numOfCols] = fd[i]->getMinimalWidth(); } if (!fd[i]->filtered) { - j++; + ++j; } } // if not wider than the space available, arrange it and we are ready - colsWidth = 0; - - for (int i = 0; i < numOfCols; i++) { - colsWidth += colWidths[i]; - } + colsWidth = std::accumulate(colWidths.begin(), colWidths.end(), 0); if (numOfCols == 1 || colsWidth < availWidth) { break; @@ -639,20 +610,19 @@ void ThumbBrowserBase::arrangeFiles () } // arrange files - int ct = 0; int curry = 0; - while (ct < N) { + for (unsigned int ct = 0; ct < fd.size();) { // arrange items in the row int currx = 0; - for (int i = 0; ct < N && i < numOfCols; i++, ct++) { - while (ct < N && fd[ct]->filtered) { - fd[ct++]->drawable = false; + for (int i = 0; ct < fd.size() && i < numOfCols; ++i, ++ct) { + for (; ct < fd.size() && fd[ct]->filtered; ++ct) { + fd[ct]->drawable = false; } - if (ct < N) { - fd[ct]->setPosition (currx, curry, colWidths[i % numOfCols], rowHeight); + if (ct < fd.size()) { + fd[ct]->setPosition(currx, curry, colWidths[i % numOfCols], rowHeight); fd[ct]->drawable = true; currx += colWidths[i % numOfCols]; } @@ -683,6 +653,15 @@ void ThumbBrowserBase::enableInspector() } } +void ThumbBrowserBase::Internal::on_style_updated() +{ + style = get_style_context (); + textn = style->get_color(Gtk::STATE_FLAG_NORMAL); + texts = style->get_color(Gtk::STATE_FLAG_SELECTED); + bgn = style->get_background_color(Gtk::STATE_FLAG_NORMAL); + bgs = style->get_background_color(Gtk::STATE_FLAG_SELECTED); +} + void ThumbBrowserBase::Internal::on_realize() { // Gtk signals automatically acquire the GUI (i.e. this method is enclosed by gdk_thread_enter and gdk_thread_leave) @@ -691,10 +670,15 @@ void ThumbBrowserBase::Internal::on_realize() get_pango_context()->set_cairo_font_options (cfo); Gtk::DrawingArea::on_realize(); - Glib::RefPtr window = get_window(); - set_flags (Gtk::CAN_FOCUS); + + style = get_style_context (); + textn = style->get_color(Gtk::STATE_FLAG_NORMAL); + texts = style->get_color(Gtk::STATE_FLAG_SELECTED); + bgn = style->get_background_color(Gtk::STATE_FLAG_NORMAL); + bgs = style->get_background_color(Gtk::STATE_FLAG_SELECTED); + + set_can_focus(true); add_events(Gdk::EXPOSURE_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::POINTER_MOTION_MASK | Gdk::SCROLL_MASK | Gdk::KEY_PRESS_MASK); - gc_ = Gdk::GC::create(window); set_has_tooltip (true); signal_query_tooltip().connect( sigc::mem_fun(*this, &ThumbBrowserBase::Internal::on_query_tooltip) ); } @@ -722,7 +706,7 @@ bool ThumbBrowserBase::Internal::on_query_tooltip (int x, int y, bool keyboard_t } } -void ThumbBrowserBase::on_style_changed (const Glib::RefPtr& style) +void ThumbBrowserBase::on_style_updated () { // GUI will be acquired by refreshThumbImages refreshThumbImages (); @@ -730,6 +714,8 @@ void ThumbBrowserBase::on_style_changed (const Glib::RefPtr& style) ThumbBrowserBase::Internal::Internal () : ofsX(0), ofsY(0), parent(nullptr), dirty(true) { + Glib::RefPtr style = get_style_context(); + set_name("FileCatalog"); } void ThumbBrowserBase::Internal::setParent (ThumbBrowserBase* p) @@ -762,7 +748,8 @@ bool ThumbBrowserBase::Internal::on_button_press_event (GdkEventButton* event) GdkRectangle rect; rect.x = 0; rect.y = 0; - window->get_size (rect.width, rect.height); + rect.width = window->get_width(); + rect.height = window->get_height(); gdk_window_invalidate_rect (window->gobj(), &rect, true); gdk_window_process_updates (window->gobj(), true); @@ -827,21 +814,22 @@ void ThumbBrowserBase::buttonPressed (int x, int y, int button, GdkEventType typ } -bool ThumbBrowserBase::Internal::on_expose_event(GdkEventExpose* event) +bool ThumbBrowserBase::Internal::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr) { // Gtk signals automatically acquire the GUI (i.e. this method is enclosed by gdk_thread_enter and gdk_thread_leave) dirty = false; - Glib::RefPtr window = get_window(); - int w = get_width(); int h = get_height(); - window->clear(); // draw thumbnails + + cr->set_antialias(Cairo::ANTIALIAS_NONE); + cr->set_line_join(Cairo::LINE_JOIN_MITER); + style->render_background(cr, 0., 0., w, h); Glib::RefPtr context = get_pango_context (); - context->set_font_description (get_style()->get_font()); + context->set_font_description (style->get_font()); { MYWRITERLOCK(l, parent->entryRW); @@ -851,14 +839,43 @@ bool ThumbBrowserBase::Internal::on_expose_event(GdkEventExpose* event) parent->fd[i]->updatepriority = false; } else { parent->fd[i]->updatepriority = true; - parent->fd[i]->draw (); + parent->fd[i]->draw (cr); } } } + style->render_frame(cr, 0., 0., w, h); return true; } +Gtk::SizeRequestMode ThumbBrowserBase::Internal::get_request_mode_vfunc () const +{ + return Gtk::SIZE_REQUEST_CONSTANT_SIZE; +} + +void ThumbBrowserBase::Internal::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const +{ + minimum_height = 20; + natural_height = 80; +} + +void ThumbBrowserBase::Internal::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const +{ + minimum_width = 200; + natural_width = 1000; +} + +void ThumbBrowserBase::Internal::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const +{ + get_preferred_height_vfunc(minimum_height, natural_height); +} + +void ThumbBrowserBase::Internal::get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const +{ + get_preferred_width_vfunc (minimum_width, natural_width); +} + + bool ThumbBrowserBase::Internal::on_button_release_event (GdkEventButton* event) { // Gtk signals automatically acquire the GUI (i.e. this method is enclosed by gdk_thread_enter and gdk_thread_leave) diff --git a/rtgui/thumbbrowserbase.h b/rtgui/thumbbrowserbase.h index a3ef08d80..d4d7e63e2 100644 --- a/rtgui/thumbbrowserbase.h +++ b/rtgui/thumbbrowserbase.h @@ -29,21 +29,36 @@ /* * Class handling the list of ThumbBrowserEntry objects and their position in it's allocated space */ -class ThumbBrowserBase : public Gtk::VBox +class ThumbBrowserBase : public Gtk::Grid { class Internal : public Gtk::DrawingArea { - - Glib::RefPtr gc_; + //Cairo::RefPtr cc; int ofsX, ofsY; ThumbBrowserBase* parent; bool dirty; + + // caching some very often used values + Glib::RefPtr style; + Gdk::RGBA textn; + Gdk::RGBA texts; + Gdk::RGBA bgn; + Gdk::RGBA bgs; + public: Internal (); void setParent (ThumbBrowserBase* p); void on_realize(); - bool on_expose_event(GdkEventExpose* event); + void on_style_updated(); + bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr); + + Gtk::SizeRequestMode get_request_mode_vfunc () const; + void get_preferred_height_vfunc (int &minimum_height, int &natural_height) const; + void get_preferred_width_vfunc (int &minimum_width, int &natural_width) const; + void get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const; + void get_preferred_width_for_height_vfunc (int height, int &minimum_width, int &natural_width) const; + bool on_button_press_event (GdkEventButton* event); bool on_button_release_event (GdkEventButton* event); bool on_motion_notify_event (GdkEventMotion* event); @@ -52,6 +67,22 @@ class ThumbBrowserBase : public Gtk::VBox bool on_query_tooltip (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip); void setPosition (int x, int y); + Glib::RefPtr getStyle() { + return style; + } + Gdk::RGBA getNormalTextColor() { + return textn; + } + Gdk::RGBA getSelectedTextColor() { + return texts; + } + Gdk::RGBA getNormalBgColor() { + return bgn; + } + Gdk::RGBA getSelectedBgColor() { + return bgs; + } + void setDirty () { dirty = true; @@ -168,7 +199,7 @@ public: { return fd; } - void on_style_changed (const Glib::RefPtr& style); + void on_style_updated (); void redraw (); // arrange files and draw area void refreshThumbImages (); // refresh thumbnail sizes, re-generate thumbnail images, arrange and draw void refreshQuickThumbImages (); // refresh thumbnail sizes, re-generate thumbnail images, arrange and draw @@ -201,6 +232,23 @@ public: { return &internal; } + + Glib::RefPtr getStyle() { + return internal.getStyle(); + } + Gdk::RGBA getNormalTextColor() { + return internal.getNormalTextColor(); + } + Gdk::RGBA getSelectedTextColor() { + return internal.getSelectedTextColor(); + } + Gdk::RGBA getNormalBgColor() { + return internal.getNormalBgColor(); + } + Gdk::RGBA getSelectedBgColor() { + return internal.getSelectedBgColor(); + } + }; #endif diff --git a/rtgui/thumbbrowserentrybase.cc b/rtgui/thumbbrowserentrybase.cc index fea52f244..ff7e58d49 100644 --- a/rtgui/thumbbrowserentrybase.cc +++ b/rtgui/thumbbrowserentrybase.cc @@ -17,33 +17,73 @@ * along with RawTherapee. If not, see . */ #include "thumbbrowserentrybase.h" -#include "thumbbrowserbase.h" + #include "options.h" +#include "thumbbrowserbase.h" + #include "../rtengine/mytime.h" -ThumbBrowserEntryBase::ThumbBrowserEntryBase (const Glib::ustring& fname) - : fnlabw(0), fnlabh(0), dtlabw(0), dtlabh(0), exlabw(0), exlabh(0), prew(0), preh(0), - prex(0), prey(0), upperMargin(6), borderWidth(1), textGap(6), sideMargin(8), lowerMargin(8), - preview(nullptr), dispname(Glib::path_get_basename (fname)), buttonSet(nullptr), width(0), height(0), - exp_width(0), exp_height(0), startx(0), starty(0), ofsX(0), ofsY(0), redrawRequests(0), - parent(nullptr), original(nullptr), bbSelected(false), bbFramed(false), bbPreview(nullptr), - thumbnail(nullptr), filename(fname), shortname(dispname), exifline(""), datetimeline(""), - selected(false), drawable(false), filtered(false), framed(false), processing(false), italicstyle(false), - edited(false), recentlysaved(false), updatepriority(false), withFilename(WFNAME_NONE) {} +ThumbBrowserEntryBase::ThumbBrowserEntryBase (const Glib::ustring& fname) : + fnlabw(0), + fnlabh(0), + dtlabw(0), + dtlabh(0), + exlabw(0), + exlabh(0), + prew(0), + preh(0), + prex(0), + prey(0), + upperMargin(6), + borderWidth(1), + textGap(6), + sideMargin(8), + lowerMargin(8), + preview(nullptr), + dispname(Glib::path_get_basename(fname)), + buttonSet(nullptr), + width(0), + height(0), + exp_width(0), + exp_height(0), + startx(0), + starty(0), + ofsX(0), + ofsY(0), + redrawRequests(0), + parent(nullptr), + original(nullptr), + bbSelected(false), + bbFramed(false), + bbPreview(nullptr), + cursor_type(CSUndefined), + collate_name(dispname.casefold().collate_key()), + thumbnail(nullptr), + filename(fname), + shortname(dispname), + exifline(""), + datetimeline(""), + selected(false), + drawable(false), + filtered(false), + framed(false), + processing(false), + italicstyle(false), + edited(false), + recentlysaved(false), + updatepriority(false), + withFilename(WFNAME_NONE) +{ +} ThumbBrowserEntryBase::~ThumbBrowserEntryBase () { - - if (preview) { - delete [] preview; - } - + delete[] preview; delete buttonSet; } void ThumbBrowserEntryBase::addButtonSet (LWButtonSet* bs) { - buttonSet = bs; } @@ -56,42 +96,48 @@ void ThumbBrowserEntryBase::updateBackBuffer () Gtk::Widget* w = parent->getDrawingArea (); - Glib::RefPtr win = w->get_window(); - - if (!win) - // Nothing to draw on, so we return - { - return; + if (backBuffer && (backBuffer->getWidth() != exp_width || backBuffer->getHeight() != exp_height )) { + // deleting the existing BackBuffer + backBuffer.reset(); + } + if (!backBuffer) { + backBuffer = Glib::RefPtr(new BackBuffer(exp_width, exp_height)); } - backBuffer = Gdk::Pixmap::create (win, exp_width, exp_height); - - // If thumbnail is hidden by a filter drawing to it will crash - int backbuffer_w = 0, backbuffer_h = 0; - backBuffer->get_size(backbuffer_w, backbuffer_h); - + // If thumbnail is hidden by a filter, drawing to it will crash // if either with or height is zero then return early - if (backbuffer_w * backbuffer_h == 0) { + if (!backBuffer->getWidth() || !backBuffer->getHeight()) { return; } + Cairo::RefPtr surface = backBuffer->getSurface(); + bbSelected = selected; bbFramed = framed; bbPreview = preview; - Glib::RefPtr gc_ = Gdk::GC::create (backBuffer); + Cairo::RefPtr cc = Cairo::Context::create(surface); - Gdk::Color textn = w->get_style()->get_text(Gtk::STATE_NORMAL); - Gdk::Color texts = w->get_style()->get_text(Gtk::STATE_SELECTED); - Gdk::Color bgn = w->get_style()->get_bg(Gtk::STATE_NORMAL); - Gdk::Color bgs = w->get_style()->get_bg(Gtk::STATE_SELECTED); + Glib::RefPtr style = parent->getStyle(); + Gdk::RGBA textn = parent->getNormalTextColor(); + Gdk::RGBA texts = parent->getSelectedTextColor(); + Gdk::RGBA bgn = parent->getNormalBgColor(); + Gdk::RGBA bgs = parent->getSelectedBgColor(); // clear area, draw frames and background - gc_->set_foreground (bgn); - gc_->set_background (bgn); - backBuffer->draw_rectangle (gc_, true, 0, 0, exp_width, exp_height); - Cairo::RefPtr cr = backBuffer->create_cairo_context(); - drawFrame (cr, bgs, bgn); + style->render_background(cc, 0., 0., exp_width, exp_height); + /* + cc->set_line_width(0.); + cc->set_line_cap(Cairo::LINE_CAP_BUTT); + cc->set_antialias(Cairo::ANTIALIAS_NONE); + cc->set_source_rgb(bgn.get_red(), bgn.get_green(), bgn.get_blue()); + cc->rectangle(0., 0., exp_width, exp_height); + cc->fill(); + */ + + cc->set_antialias(Cairo::ANTIALIAS_SUBPIXEL); + + drawFrame (cc, bgs, bgn); // calculate height of button set int bsHeight = 0; @@ -102,15 +148,15 @@ void ThumbBrowserEntryBase::updateBackBuffer () } // draw preview frame - //backBuffer->draw_rectangle (gc_, false, (exp_width-prew)/2, upperMargin+bsHeight, prew+1, preh+1); + //backBuffer->draw_rectangle (cc, false, (exp_width-prew)/2, upperMargin+bsHeight, prew+1, preh+1); // draw thumbnail image if (preview) { prex = borderWidth + (exp_width - prew) / 2; prey = upperMargin + bsHeight + borderWidth; - backBuffer->draw_rgb_image (gc_, prex, prey, prew, preh, Gdk::RGB_DITHER_NONE, preview, prew * 3); + backBuffer->copyRGBCharData(preview, 0, 0, prew, preh, prew * 3, prex, prey); } - customBackBufferUpdate (cr); + customBackBufferUpdate (cc); // draw icons onto the thumbnail area bbIcons = getIconsOnImageArea (); @@ -124,16 +170,16 @@ void ThumbBrowserEntryBase::updateBackBuffer () if ((parent->getLocation() != ThumbBrowserBase::THLOC_EDITOR && options.showFileNames && options.overlayedFileNames) || (parent->getLocation() == ThumbBrowserBase::THLOC_EDITOR && options.filmStripShowFileNames && options.filmStripOverlayedFileNames)) { - cr->begin_new_path (); - cr->rectangle (istartx, istarty, prew, fnlabh + dtlabh + exlabh + 2 * iofs_y); + cc->begin_new_path (); + cc->rectangle (istartx, istarty, prew, fnlabh + dtlabh + exlabh + 2 * iofs_y); - if ((texts.get_red_p() + texts.get_green_p() + texts.get_blue_p()) / 3 > 0.5) { - cr->set_source_rgba (0, 0, 0, 0.5); + if ((texts.get_red() + texts.get_green() + texts.get_blue()) / 3 > 0.5) { + cc->set_source_rgba (0, 0, 0, 0.5); } else { - cr->set_source_rgba (1, 1, 1, 0.5); + cc->set_source_rgba (1, 1, 1, 0.5); } - cr->fill (); + cc->fill (); } istartx += iofs_x; @@ -155,22 +201,25 @@ void ThumbBrowserEntryBase::updateBackBuffer () if ((parent->getLocation() != ThumbBrowserBase::THLOC_EDITOR && (!options.showFileNames || !options.overlayedFileNames)) || (parent->getLocation() == ThumbBrowserBase::THLOC_EDITOR && (!options.filmStripShowFileNames || !options.filmStripOverlayedFileNames))) { // Draw the transparent black background around icons - cr->begin_new_path (); - cr->move_to(istartx - igap, istarty); - cr->rel_line_to(igap, -igap); - cr->rel_line_to(iwidth, 0); - cr->rel_line_to(igap, igap); - cr->rel_line_to(0, iheight); - cr->rel_line_to(-igap, igap); - cr->rel_line_to(-iwidth, 0); - cr->rel_line_to(-igap, -igap); - cr->rel_line_to(0, -iheight); - cr->set_source_rgba (0, 0, 0, 0.6); - cr->fill (); + cc->begin_new_path (); + cc->move_to(istartx - igap, istarty); + cc->rel_line_to(igap, -igap); + cc->rel_line_to(iwidth, 0); + cc->rel_line_to(igap, igap); + cc->rel_line_to(0, iheight); + cc->rel_line_to(-igap, igap); + cc->rel_line_to(-iwidth, 0); + cc->rel_line_to(-igap, -igap); + cc->rel_line_to(0, -iheight); + cc->set_source_rgba (0, 0, 0, 0.6); + cc->fill (); } for (size_t i = 0; i < bbIcons.size(); i++) { - backBuffer->draw_pixbuf (gc_, bbIcons[i], 0, 0, istartx, istarty, bbIcons[i]->get_width(), bbIcons[i]->get_height(), Gdk::RGB_DITHER_NONE, 0, 0); + // Draw the image at 110, 90, except for the outermost 10 pixels. + Gdk::Cairo::set_source_pixbuf(cc, bbIcons[i], istartx, istarty); + cc->rectangle(istartx, istarty, bbIcons[i]->get_width(), bbIcons[i]->get_height()); + cc->fill(); istartx += bbIcons[i]->get_width() + igap; } } @@ -202,14 +251,19 @@ void ThumbBrowserEntryBase::updateBackBuffer () textposy = upperMargin + bsHeight + 2 * borderWidth + preh + borderWidth + textGap; textw = exp_width - 2 * textGap; - gc_->set_foreground (selected ? texts : textn); + + if (selected) { + cc->set_source_rgb(texts.get_red(), texts.get_green(), texts.get_blue()); + } else { + cc->set_source_rgb(textn.get_red(), textn.get_green(), textn.get_blue()); + } } else { textposx_fn = istartx; textposx_ex = istartx; textposx_dt = istartx; textposy = istarty; textw = prew - (istartx - prex); - gc_->set_foreground (texts); + cc->set_source_rgb(texts.get_red(), texts.get_green(), texts.get_blue()); } // draw file name @@ -227,7 +281,9 @@ void ThumbBrowserEntryBase::updateBackBuffer () Glib::RefPtr fn = w->create_pango_layout (dispname); fn->set_width (textw * Pango::SCALE); fn->set_ellipsize (Pango::ELLIPSIZE_MIDDLE); - backBuffer->draw_layout(gc_, textposx_fn, textposy, fn); + cc->move_to(textposx_fn, textposy); + fn->add_to_cairo_context (cc); + cc->fill(); fontd.set_weight (Pango::WEIGHT_NORMAL); fontd.set_style (Pango::STYLE_NORMAL); @@ -241,7 +297,9 @@ void ThumbBrowserEntryBase::updateBackBuffer () fn = w->create_pango_layout (datetimeline); fn->set_width (textw * Pango::SCALE); fn->set_ellipsize (Pango::ELLIPSIZE_MIDDLE); - backBuffer->draw_layout(gc_, textposx_dt, textposy + tpos, fn); + cc->move_to(textposx_dt, textposy + tpos); + fn->add_to_cairo_context (cc); + cc->fill(); tpos += dtlabh; } @@ -250,10 +308,14 @@ void ThumbBrowserEntryBase::updateBackBuffer () fn = w->create_pango_layout (exifline); fn->set_width (textw * Pango::SCALE); fn->set_ellipsize (Pango::ELLIPSIZE_MIDDLE); - backBuffer->draw_layout (gc_, textposx_ex, textposy + tpos, fn); + cc->move_to(textposx_ex, textposy + tpos); + fn->add_to_cairo_context (cc); + cc->fill(); } } } + + backBuffer->setDirty(false); } void ThumbBrowserEntryBase::getTextSizes (int& infow, int& infoh) @@ -269,7 +331,8 @@ void ThumbBrowserEntryBase::getTextSizes (int& infow, int& infoh) dispname = shortname; Glib::RefPtr context = w->get_pango_context () ; - context->set_font_description (w->get_style()->get_font()); + context->set_font_description (w->get_style_context()->get_font()); + // filename: Pango::FontDescription fontd = context->get_font_description (); @@ -389,53 +452,50 @@ void ThumbBrowserEntryBase::resize (int h) delete [] preview; preview = nullptr; refreshThumbnailImage (); - } else { - backBuffer.clear(); // This will force a backBuffer update on queue_draw + } else if (backBuffer) { + backBuffer->setDirty(true); // This will force a backBuffer update on queue_draw } drawable = true; } -void ThumbBrowserEntryBase::drawFrame (Cairo::RefPtr cr, const Gdk::Color& bg, const Gdk::Color& fg) +void ThumbBrowserEntryBase::drawFrame (Cairo::RefPtr cc, const Gdk::RGBA& bg, const Gdk::RGBA& fg) { - int radius = 8; + int radius = 4; if (selected || framed) { - cr->set_antialias (Cairo::ANTIALIAS_SUBPIXEL); - cr->move_to (radius, 0); - cr->arc (exp_width - 1 - radius, radius, radius, -M_PI / 2, 0); - cr->arc (exp_width - 1 - radius, exp_height - 1 - radius, radius, 0, M_PI / 2); - cr->arc (radius, exp_height - 1 - radius, radius, M_PI / 2, M_PI); - cr->arc (radius, radius, radius, M_PI, -M_PI / 2); - cr->close_path (); + cc->move_to (radius, 0); + cc->arc (exp_width - 1 - radius, radius, radius, -rtengine::RT_PI / 2, 0); + cc->arc (exp_width - 1 - radius, exp_height - 1 - radius, radius, 0, rtengine::RT_PI / 2); + cc->arc (radius, exp_height - 1 - radius, radius, rtengine::RT_PI / 2, rtengine::RT_PI); + cc->arc (radius, radius, radius, rtengine::RT_PI, -rtengine::RT_PI / 2); + cc->close_path (); if (selected) { - cr->set_source_rgb (bg.get_red_p(), bg.get_green_p(), bg.get_blue_p()); - cr->fill_preserve (); + cc->set_source_rgb (bg.get_red(), bg.get_green(), bg.get_blue()); + cc->fill_preserve (); } - cr->set_source_rgb (bg.get_red_p() * 2 / 3, bg.get_green_p() * 2 / 3, bg.get_blue_p() * 2 / 3); - cr->set_line_width (1.0); - cr->stroke (); - + cc->set_source_rgb (bg.get_red() * 2 / 3, bg.get_green() * 2 / 3, bg.get_blue() * 2 / 3); + cc->set_line_width (1.0); + cc->stroke (); } if (framed) { - cr->set_antialias (Cairo::ANTIALIAS_SUBPIXEL); - cr->move_to (+2 + 0.5 + radius, +2 + 0.5); - cr->arc (-2 + 0.5 + exp_width - 1 - radius, +2 + 0.5 + radius, radius, -M_PI / 2, 0); - cr->arc (-2 + 0.5 + exp_width - 1 - radius, -2 + 0.5 + exp_height - 1 - radius, radius, 0, M_PI / 2); - cr->arc (+2 + 0.5 + radius, -2 + exp_height - 1 - radius, radius, M_PI / 2, M_PI); - cr->arc (+2 + 0.5 + radius, +2 + radius, radius, M_PI, -M_PI / 2); - cr->close_path (); - cr->set_source_rgb (fg.get_red_p(), fg.get_green_p(), fg.get_blue_p()); - cr->set_line_width (2.0); - cr->stroke (); + cc->move_to (+2 + 0.5 + radius, +2 + 0.5); + cc->arc (-2 + 0.5 + exp_width - 1 - radius, +2 + 0.5 + radius, radius, -rtengine::RT_PI / 2, 0); + cc->arc (-2 + 0.5 + exp_width - 1 - radius, -2 + 0.5 + exp_height - 1 - radius, radius, 0, rtengine::RT_PI / 2); + cc->arc (+2 + 0.5 + radius, -2 + exp_height - 1 - radius, radius, rtengine::RT_PI / 2, rtengine::RT_PI); + cc->arc (+2 + 0.5 + radius, +2 + radius, radius, rtengine::RT_PI, -rtengine::RT_PI / 2); + cc->close_path (); + cc->set_source_rgb (fg.get_red(), fg.get_green(), fg.get_blue()); + cc->set_line_width (2.0); + cc->stroke (); } } -void ThumbBrowserEntryBase::draw () +void ThumbBrowserEntryBase::draw (Cairo::RefPtr cc) { if (!drawable || !parent) { @@ -447,33 +507,28 @@ void ThumbBrowserEntryBase::draw () int bbWidth, bbHeight; if (backBuffer) { - backBuffer->get_size (bbWidth, bbHeight); + bbWidth = backBuffer->getWidth(); + bbHeight = backBuffer->getHeight(); } if (!backBuffer || selected != bbSelected || framed != bbFramed || preview != bbPreview - || exp_width != bbWidth || exp_height != bbHeight || getIconsOnImageArea () != bbIcons) { + || exp_width != bbWidth || exp_height != bbHeight || getIconsOnImageArea () != bbIcons || backBuffer->isDirty()) { updateBackBuffer (); } - Gtk::Widget* w = parent->getDrawingArea (); - - Glib::RefPtr gc_ = Gdk::GC::create (w->get_window()); - -// Gdk::Color textn = w->get_style()->get_text(Gtk::STATE_NORMAL); - // Gdk::Color texts = w->get_style()->get_text(Gtk::STATE_SELECTED); - Gdk::Color bgn = w->get_style()->get_bg(Gtk::STATE_NORMAL); - Gdk::Color bgs = w->get_style()->get_bg(Gtk::STATE_SELECTED); - - w->get_window()->draw_drawable (gc_, backBuffer, 0, 0, startx + ofsX, starty + ofsY); + int w_ = startx + ofsX; + int h_ = starty + ofsY; + cc->set_source(backBuffer->getSurface(), w_, h_); + cc->rectangle(w_, h_, backBuffer->getWidth(), backBuffer->getHeight()); + cc->fill(); // check icon set changes!!! -// drawProgressBar (window, gc_, selected ? texts : textn, selected ? bgs : bgn, ofsX+startx, exp_width, ofsY+starty + upperMargin+bsHeight+borderWidth+preh+borderWidth+textGap+tpos, fnlabh); +// drawProgressBar (window, cc, selected ? texts : textn, selected ? bgs : bgn, ofsX+startx, exp_width, ofsY+starty + upperMargin+bsHeight+borderWidth+preh+borderWidth+textGap+tpos, fnlabh); // redraw button set above the thumbnail if (buttonSet) { - buttonSet->setColors (selected ? bgs : bgn, selected ? bgn : bgs); - Cairo::RefPtr cc = w->get_window()->create_cairo_context(); + buttonSet->setColors (selected ? parent->getSelectedBgColor() : parent->getNormalBgColor(), selected ? parent->getNormalBgColor() : parent->getSelectedBgColor()); buttonSet->redraw (cc); } } diff --git a/rtgui/thumbbrowserentrybase.h b/rtgui/thumbbrowserentrybase.h index 59b2c022f..f4779faa1 100644 --- a/rtgui/thumbbrowserentrybase.h +++ b/rtgui/thumbbrowserentrybase.h @@ -23,6 +23,8 @@ #include "lwbuttonset.h" #include "thumbnail.h" #include "threadutils.h" +#include "guiutils.h" +#include "cursormanager.h" class ThumbBrowserBase; class ThumbBrowserEntryBase @@ -74,17 +76,21 @@ protected: ThumbBrowserBase* parent; ThumbBrowserEntryBase* original; - Glib::RefPtr backBuffer; + Glib::RefPtr backBuffer; bool bbSelected, bbFramed; guint8* bbPreview; std::vector > bbIcons; + CursorShape cursor_type; - void drawFrame (Cairo::RefPtr cr, const Gdk::Color& bg, const Gdk::Color& fg); + void drawFrame (Cairo::RefPtr cr, const Gdk::RGBA& bg, const Gdk::RGBA& fg); void getTextSizes (int& w, int& h); // called during updateBackBuffer for custom overlays virtual void customBackBufferUpdate (Cairo::RefPtr c) {} +private: + const std::string collate_name; + public: Thumbnail* thumbnail; @@ -117,7 +123,7 @@ public: void updateBackBuffer (); void resize (int h); - virtual void draw (); + virtual void draw (Cairo::RefPtr cc); void addButtonSet (LWButtonSet* bs); int getMinimalHeight () @@ -164,9 +170,9 @@ public: void setPosition (int x, int y, int w, int h); void setOffset (int x, int y); - bool operator< (ThumbBrowserEntryBase& other) + bool operator <(const ThumbBrowserEntryBase& other) const { - return shortname.casefold() > other.shortname.casefold(); + return collate_name < other.collate_name; } ThumbBrowserEntryBase* getOriginal () const; @@ -176,7 +182,7 @@ public: virtual void refreshQuickThumbnailImage () {} virtual void calcThumbnailSize () {} - virtual void drawProgressBar (Glib::RefPtr win, Glib::RefPtr gc, const Gdk::Color& foregr, const Gdk::Color& backgr, int x, int w, int y, int h) {} + virtual void drawProgressBar (Glib::RefPtr win, const Gdk::RGBA& foregr, const Gdk::RGBA& backgr, int x, int w, int y, int h) {} virtual std::vector > getIconsOnImageArea (); virtual void getIconSize (int& w, int& h); diff --git a/rtgui/thumbimageupdater.cc b/rtgui/thumbimageupdater.cc index 72efd6b43..185ca91b7 100644 --- a/rtgui/thumbimageupdater.cc +++ b/rtgui/thumbimageupdater.cc @@ -68,11 +68,8 @@ public: inactive_waiting_(false) { int threadCount = 1; -#if !(__GNUC__ == 4 && __GNUC_MINOR__ == 8 && defined( WIN32 ) && defined(__x86_64__)) - // See Issue 2431 for explanation #ifdef _OPENMP threadCount = omp_get_num_procs(); -#endif #endif threadPool_ = new Glib::ThreadPool(threadCount, 0); @@ -81,12 +78,8 @@ public: Glib::ThreadPool* threadPool_; // Need to be a Glib::Threads::Mutex because used in a Glib::Threads::Cond object... - // This is the only exceptions in RT so far, MyMutex is used everywhere else -#ifdef WIN32 - Glib::Mutex mutex_; -#else + // This is the only exceptions along with GThreadMutex (guiutils.cc), MyMutex is used everywhere else Glib::Threads::Mutex mutex_; -#endif JobList jobs_; @@ -94,11 +87,7 @@ public: bool inactive_waiting_; -#ifdef WIN32 - Glib::Cond inactive_; -#else Glib::Threads::Cond inactive_; -#endif void processNextJob() @@ -106,11 +95,7 @@ public: Job j; { -#ifdef WIN32 - Glib::Mutex::Lock lock(mutex_); -#else Glib::Threads::Mutex::Lock lock(mutex_); -#endif // nothing to do; could be jobs have been removed if ( jobs_.empty() ) { @@ -173,12 +158,7 @@ public: } { -#ifdef WIN32 - Glib::Mutex::Lock lock(mutex_); -#else Glib::Threads::Mutex::Lock lock(mutex_); -#endif - if ( --active_ == 0 && inactive_waiting_ ) { @@ -209,11 +189,7 @@ ThumbImageUpdater::add(ThumbBrowserEntryBase* tbe, bool* priority, bool upgrade, return; } -#ifdef WIN32 - Glib::Mutex::Lock lock(impl_->mutex_); -#else Glib::Threads::Mutex::Lock lock(impl_->mutex_); -#endif // look up if an older version is in the queue Impl::JobList::iterator i(impl_->jobs_.begin()); @@ -245,11 +221,7 @@ ThumbImageUpdater::removeJobs(ThumbImageUpdateListener* listener) { DEBUG("removeJobs(%p)", listener); -#ifdef WIN32 - Glib::Mutex::Lock lock(impl_->mutex_); -#else Glib::Threads::Mutex::Lock lock(impl_->mutex_); -#endif for( Impl::JobList::iterator i(impl_->jobs_.begin()); i != impl_->jobs_.end(); ) { if (i->listener_ == listener) { @@ -276,11 +248,7 @@ ThumbImageUpdater::removeAllJobs() { DEBUG("stop"); -#ifdef WIN32 - Glib::Mutex::Lock lock(impl_->mutex_); -#else Glib::Threads::Mutex::Lock lock(impl_->mutex_); -#endif impl_->jobs_.clear(); diff --git a/rtgui/thumbnail.cc b/rtgui/thumbnail.cc index 71aeab0ab..9db7c69b6 100644 --- a/rtgui/thumbnail.cc +++ b/rtgui/thumbnail.cc @@ -26,10 +26,12 @@ #include #include "../rtengine/imagedata.h" #include + +#include "../rtengine/dynamicprofile.h" #include "guiutils.h" -#include "profilestore.h" #include "batchqueue.h" #include "extprog.h" +#include "profilestorecombobox.h" using namespace rtengine::procparams; @@ -63,7 +65,7 @@ Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, CacheImageDa Thumbnail::Thumbnail (CacheManager* cm, const Glib::ustring& fname, const std::string& md5) : fname(fname), cachemgr(cm), ref(1), enqueueNumber(0), tpp(nullptr), pparamsValid(false), - pparamsSet(false), needsReProcessing(true), imageLoading(false), lastImg(nullptr), + needsReProcessing(true), imageLoading(false), lastImg(nullptr), lastW(0), lastH(0), lastScale(0.0), initial_(true) { @@ -137,7 +139,7 @@ void Thumbnail::_generateThumbnailImage () if ( tpp == nullptr ) { quick = false; - tpp = rtengine::Thumbnail::loadFromRaw (fname, ri, tw, th, 1, pparams.wb.equal, TRUE); + tpp = rtengine::Thumbnail::loadFromRaw (fname, ri, tw, th, 1, pparams.wb.equal, TRUE, pparams.raw.bayersensor.imageNum); } if (tpp) { @@ -176,7 +178,7 @@ const ProcParams& Thumbnail::getProcParamsU () if (pparamsValid) { return pparams; } else { - pparams = *(profileStore.getDefaultProcParams (getType() == FT_Raw)); + pparams = *(ProfileStore::getInstance()->getDefaultProcParams (getType() == FT_Raw)); if (pparams.wb.method == "Camera") { double ct; @@ -184,7 +186,7 @@ const ProcParams& Thumbnail::getProcParamsU () pparams.wb.temperature = ct; } else if (pparams.wb.method == "Auto") { double ct; - getAutoWB (ct, pparams.wb.green, pparams.wb.equal); + getAutoWB (ct, pparams.wb.green, pparams.wb.equal, pparams.wb.tempBias); pparams.wb.temperature = ct; } } @@ -197,14 +199,13 @@ const ProcParams& Thumbnail::getProcParamsU () * The loaded profile may be partial, but it return a complete ProcParams (i.e. without ParamsEdited) * * @param returnParams Ask to return a pointer to a ProcParams object if true - * @param forceCPB True if the Custom Profile Builder has to be invoked, False if the CPB has to be invoked if the profile doesn't - * exist yet. It depends on other conditions too + * @param force True if the profile has to be re-generated even if it already exists * @param flaggingMode True if the ProcParams will be created because the file browser is being flagging an image * (rang, to trash, color labels). This parameter is passed to the CPB. * * @return Return a pointer to a ProcPamas structure to be updated if returnParams is true and if everything went fine, NULL otherwise. */ -rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool returnParams, bool forceCPB, bool flaggingMode) +rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool returnParams, bool force, bool flaggingMode) { static int index = 0; // Will act as unique identifier during the session @@ -216,8 +217,37 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu const CacheImageData* cfs = getCacheImageData(); Glib::ustring defaultPparamsPath = options.findProfilePath(defProf); + const bool create = (!hasProcParams() || force); + const bool run_cpb = !options.CPBPath.empty() && !defaultPparamsPath.empty() && cfs && cfs->exifValid && create; - if (!options.CPBPath.empty() && !defaultPparamsPath.empty() && (!hasProcParams() || forceCPB) && cfs && cfs->exifValid) { + const Glib::ustring outFName = + (options.paramsLoadLocation == PLL_Input && options.saveParamsFile) ? + fname + paramFileExtension : + getCacheFileName("profiles", paramFileExtension); + + if (!run_cpb) { + if (defProf == DEFPROFILE_DYNAMIC && create && cfs && cfs->exifValid) { + rtengine::ImageMetaData* imageMetaData; + if (getType() == FT_Raw) { + rtengine::RawMetaDataLocation metaData = rtengine::Thumbnail::loadMetaDataFromRaw(fname); + imageMetaData = rtengine::ImageMetaData::fromFile (fname, &metaData); + } else { + imageMetaData = rtengine::ImageMetaData::fromFile (fname, nullptr); + } + PartialProfile *pp = ProfileStore::getInstance()->loadDynamicProfile(imageMetaData); + int err = pp->pparams->save(outFName); + pp->deleteInstance(); + delete pp; + if (!err) { + loadProcParams(); + } + } else if (create && defProf != DEFPROFILE_DYNAMIC) { + const PartialProfile *p = ProfileStore::getInstance()->getProfile(defProf); + if (p && !p->pparams->save(outFName)) { + loadProcParams(); + } + } + } else { // First generate the communication file, with general values and EXIF metadata rtengine::ImageMetaData* imageMetaData; @@ -233,14 +263,6 @@ rtengine::procparams::ProcParams* Thumbnail::createProcParamsForUpdate(bool retu const rtexif::TagDirectory* exifDir = nullptr; if (imageMetaData && (exifDir = imageMetaData->getExifData())) { - Glib::ustring outFName; - - if (options.paramsLoadLocation == PLL_Input) { - outFName = fname + paramFileExtension; - } else { - outFName = getCacheFileName("profiles", paramFileExtension); - } - exifDir->CPBDump(tmpFileName, fname, outFName, defaultPparamsPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(defaultPparamsPath, Glib::path_get_basename(defProf) + paramFileExtension), cfs, @@ -295,7 +317,7 @@ void Thumbnail::loadProcParams () pparamsValid = false; pparams.setDefaults(); - const PartialProfile *defaultPP = profileStore.getDefaultPartialProfile(getType() == FT_Raw); + const PartialProfile *defaultPP = ProfileStore::getInstance()->getDefaultPartialProfile(getType() == FT_Raw); defaultPP->applyTo(&pparams); if (options.paramsLoadLocation == PLL_Input) { @@ -669,7 +691,7 @@ const Glib::ustring& Thumbnail::getDateTimeString () return dateTimeString; } -void Thumbnail::getAutoWB (double& temp, double& green, double equal) +void Thumbnail::getAutoWB (double& temp, double& green, double equal, double tempBias) { if (cfs.redAWBMul != -1.0) { rtengine::ColorTemp ct(cfs.redAWBMul, cfs.greenAWBMul, cfs.blueAWBMul, equal); @@ -801,7 +823,7 @@ void Thumbnail::_loadThumbnail(bool firstTrial) tpp->init (); } - if (!initial_ && tpp) { + if (!initial_) { tw = tpp->getImageWidth (getProcParamsU(), th, imgRatio); // this might return 0 if image was just building } } diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h index a7b889d5f..eb9e38f7f 100644 --- a/rtgui/thumbnail.h +++ b/rtgui/thumbnail.h @@ -49,7 +49,6 @@ class Thumbnail rtengine::procparams::ProcParams pparams; bool pparamsValid; - bool pparamsSet; bool needsReProcessing; bool imageLoading; @@ -87,7 +86,7 @@ public: const rtengine::procparams::ProcParams& getProcParamsU (); // Unprotected version // Use this to create params on demand for update ; if flaggingMode=true, the procparams is created for a file being flagged (inTrash, rank, colorLabel) - rtengine::procparams::ProcParams* createProcParamsForUpdate (bool returnParams, bool forceCPB, bool flaggingMode = false); + rtengine::procparams::ProcParams* createProcParamsForUpdate (bool returnParams, bool force, bool flaggingMode = false); void setProcParams (const rtengine::procparams::ProcParams& pp, ParamsEdited* pe = nullptr, int whoChangedIt = -1, bool updateCacheNow = true); void clearProcParams (int whoClearedIt = -1); @@ -125,7 +124,7 @@ public: temp = green = -1.0; } } - void getAutoWB (double& temp, double& green, double equal); + void getAutoWB (double& temp, double& green, double equal, double tempBias); void getSpotWB (int x, int y, int rect, double& temp, double& green) { if (tpp) { diff --git a/rtgui/thumbnailbrowser.h b/rtgui/thumbnailbrowser.h index c237c2194..0c2d6ebab 100644 --- a/rtgui/thumbnailbrowser.h +++ b/rtgui/thumbnailbrowser.h @@ -62,11 +62,10 @@ class ThumbBrowser : public Gtk::DrawingArea protected: int dx, dy, w, h; - Glib::RefPtr gc_; - Gdk::Color black; - Gdk::Color white; - Gdk::Color blue; - Gdk::Color bluew; + Gdk::RGBA black; + Gdk::RGBA white; + Gdk::RGBA blue; + Gdk::RGBA bluew; std::vector fd; std::vector selected; @@ -89,7 +88,7 @@ public: } virtual void on_realize(); - virtual bool on_expose_event(GdkEventExpose* event); + virtual bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr); virtual bool on_button_press_event (GdkEventButton* event); virtual bool on_button_release_event (GdkEventButton* event); virtual void previewReady (FileDescr* fdn); diff --git a/rtgui/tonecurve.cc b/rtgui/tonecurve.cc index 2c98cc280..28dcf9f3d 100644 --- a/rtgui/tonecurve.cc +++ b/rtgui/tonecurve.cc @@ -37,7 +37,6 @@ ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LA //----------- Auto Levels ---------------------------------- abox = Gtk::manage (new Gtk::HBox ()); - abox->set_border_width (2); abox->set_spacing (10); autolevels = Gtk::manage (new Gtk::ToggleButton (M("TP_EXPOSURE_AUTOLEVELS"))); @@ -52,6 +51,8 @@ ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LA sclip->set_increments (0.01, 0.10); sclip->set_value (0.02); sclip->set_digits (2); + sclip->set_width_chars(4); + sclip->set_max_width_chars(4); sclip->signal_value_changed().connect( sigc::mem_fun(*this, &ToneCurve::clip_changed) ); neutral = Gtk::manage (new Gtk::Button (M("TP_NEUTRAL"))); @@ -75,10 +76,10 @@ ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LA pack_start (*hrenabled); method = Gtk::manage (new MyComboBoxText ()); - method->append_text (M("TP_HLREC_LUMINANCE")); - method->append_text (M("TP_HLREC_CIELAB")); - method->append_text (M("TP_HLREC_COLOR")); - method->append_text (M("TP_HLREC_BLEND")); + method->append (M("TP_HLREC_LUMINANCE")); + method->append (M("TP_HLREC_CIELAB")); + method->append (M("TP_HLREC_COLOR")); + method->append (M("TP_HLREC_BLEND")); method->set_active (0); hlrbox = Gtk::manage (new Gtk::HBox ()); @@ -122,12 +123,12 @@ ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LA pack_start (*Gtk::manage (new Gtk::HSeparator())); toneCurveMode = Gtk::manage (new MyComboBoxText ()); - toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_STANDARD")); - toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD")); - toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_FILMLIKE")); - toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_SATANDVALBLENDING")); - toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_LUMINANCE")); - toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_PERCEPTUAL")); + toneCurveMode->append (M("TP_EXPOSURE_TCMODE_STANDARD")); + toneCurveMode->append (M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD")); + toneCurveMode->append (M("TP_EXPOSURE_TCMODE_FILMLIKE")); + toneCurveMode->append (M("TP_EXPOSURE_TCMODE_SATANDVALBLENDING")); + toneCurveMode->append (M("TP_EXPOSURE_TCMODE_LUMINANCE")); + toneCurveMode->append (M("TP_EXPOSURE_TCMODE_PERCEPTUAL")); toneCurveMode->set_active (0); toneCurveMode->set_tooltip_text(M("TP_EXPOSURE_TCMODE_LABEL1")); @@ -149,12 +150,12 @@ ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LA //----------- Curve 2 ------------------------------ toneCurveMode2 = Gtk::manage (new MyComboBoxText ()); - toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_STANDARD")); - toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD")); - toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_FILMLIKE")); - toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_SATANDVALBLENDING")); - toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_LUMINANCE")); - toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_PERCEPTUAL")); + toneCurveMode2->append (M("TP_EXPOSURE_TCMODE_STANDARD")); + toneCurveMode2->append (M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD")); + toneCurveMode2->append (M("TP_EXPOSURE_TCMODE_FILMLIKE")); + toneCurveMode2->append (M("TP_EXPOSURE_TCMODE_SATANDVALBLENDING")); + toneCurveMode2->append (M("TP_EXPOSURE_TCMODE_LUMINANCE")); + toneCurveMode2->append (M("TP_EXPOSURE_TCMODE_PERCEPTUAL")); toneCurveMode2->set_active (0); toneCurveMode2->set_tooltip_text(M("TP_EXPOSURE_TCMODE_LABEL2")); @@ -187,6 +188,8 @@ ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LA ToneCurve::~ToneCurve () { + idle_register.destroy(); + delete curveEditorG; delete curveEditorG2; } @@ -236,6 +239,7 @@ void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited) clipDirty = pedited->toneCurve.clip; shape->setUnChanged (!pedited->toneCurve.curve); shape2->setUnChanged (!pedited->toneCurve.curve2); + hrenabled->set_inconsistent (!pedited->toneCurve.hrenabled); if (!pedited->toneCurve.curveMode) { toneCurveMode->set_active(6); @@ -246,10 +250,6 @@ void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited) } } - if (pedited) { - hrenabled->set_inconsistent (!pedited->toneCurve.hrenabled); - } - enaconn.block (true); hrenabled->set_active (pp->toneCurve.hrenabled); enaconn.block (false); @@ -358,9 +358,6 @@ void ToneCurve::write (ProcParams* pp, ParamsEdited* pedited) pedited->toneCurve.curve2 = !shape2->isUnChanged (); pedited->toneCurve.curveMode = toneCurveMode->get_active_row_number() != 6; pedited->toneCurve.curveMode2 = toneCurveMode2->get_active_row_number() != 6; - } - - if (pedited) { pedited->toneCurve.method = method->get_active_row_number() != 4; pedited->toneCurve.hrenabled = !hrenabled->get_inconsistent(); } @@ -732,15 +729,8 @@ void ToneCurve::waitForAutoExp () method->set_sensitive(false); } -int autoExpChangedUI (void* data) -{ - (static_cast(data))->autoExpComputed_ (); - return 0; -} - void ToneCurve::autoExpChanged (double expcomp, int bright, int contr, int black, int hlcompr, int hlcomprthresh, bool hlrecons) { - nextBlack = black; nextExpcomp = expcomp; nextBrightness = bright; @@ -748,7 +738,14 @@ void ToneCurve::autoExpChanged (double expcomp, int bright, int contr, int black nextHlcompr = hlcompr; nextHlcomprthresh = hlcomprthresh; nextHLRecons = hlrecons; - g_idle_add (autoExpChangedUI, this); + + const auto func = [](gpointer data) -> gboolean { + static_cast(data)->autoExpComputed_(); + + return FALSE; + }; + + idle_register.add(func, this); } void ToneCurve::enableAll () @@ -805,7 +802,7 @@ bool ToneCurve::autoExpComputed_ () void ToneCurve::setBatchMode (bool batchMode) { ToolPanel::setBatchMode (batchMode); - method->append_text (M("GENERAL_UNCHANGED")); + method->append (M("GENERAL_UNCHANGED")); removeIfThere (abox, autolevels, false); autolevels = Gtk::manage (new Gtk::CheckButton (M("TP_EXPOSURE_AUTOLEVELS"))); @@ -823,8 +820,8 @@ void ToneCurve::setBatchMode (bool batchMode) contrast->showEditedCB (); saturation->showEditedCB (); - toneCurveMode->append_text (M("GENERAL_UNCHANGED")); - toneCurveMode2->append_text (M("GENERAL_UNCHANGED")); + toneCurveMode->append (M("GENERAL_UNCHANGED")); + toneCurveMode2->append (M("GENERAL_UNCHANGED")); curveEditorG->setBatchMode (batchMode); curveEditorG2->setBatchMode (batchMode); diff --git a/rtgui/tonecurve.h b/rtgui/tonecurve.h index e2ba03602..11ec64b96 100644 --- a/rtgui/tonecurve.h +++ b/rtgui/tonecurve.h @@ -29,6 +29,8 @@ class ToneCurve : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel, public rtengine::AutoExpListener, public CurveListener { +private: + IdleRegister idle_register; protected: // from HLRecovery @@ -73,7 +75,6 @@ protected: bool nextHLRecons; public: - ToneCurve (); ~ToneCurve (); diff --git a/rtgui/toolbar.cc b/rtgui/toolbar.cc index ebedbb306..cf5148d8b 100644 --- a/rtgui/toolbar.cc +++ b/rtgui/toolbar.cc @@ -21,15 +21,13 @@ #include "multilangmgr.h" #include "guiutils.h" -ToolBar::ToolBar () : showColPickers(true), listener (nullptr) +ToolBar::ToolBar () : showColPickers(true), listener (nullptr), pickerListener(nullptr) { editingMode = false; - handimg = Gtk::manage (new RTImage ("openhand.png")); - handimg->reference(); - editinghandimg = Gtk::manage (new RTImage ("editmodehand.png")); - editinghandimg->reference(); + handimg.reset(new RTImage("openhand.png")); + editinghandimg.reset(new RTImage("editmodehand.png")); handTool = Gtk::manage (new Gtk::ToggleButton ()); handTool->add (*handimg); @@ -48,10 +46,8 @@ ToolBar::ToolBar () : showColPickers(true), listener (nullptr) pack_start (*wbTool); - showcolpickersimg = Gtk::manage (new RTImage ("colorPickers-show.png")); - showcolpickersimg->reference(); - hidecolpickersimg = Gtk::manage (new RTImage ("colorPickers-hide.png")); - hidecolpickersimg->reference(); + showcolpickersimg.reset(new RTImage("colorPickers-show.png")); + hidecolpickersimg.reset(new RTImage("colorPickers-hide.png")); colPickerTool = Gtk::manage (new Gtk::ToggleButton ()); colPickerTool->add (*showcolpickersimg); @@ -82,6 +78,7 @@ ToolBar::ToolBar () : showColPickers(true), listener (nullptr) handTool->set_active (true); current = TMHand; + allowNoTool = false; handConn = handTool->signal_toggled().connect( sigc::mem_fun(*this, &ToolBar::hand_pressed)); wbConn = wbTool->signal_toggled().connect( sigc::mem_fun(*this, &ToolBar::wb_pressed)); @@ -96,14 +93,6 @@ ToolBar::ToolBar () : showColPickers(true), listener (nullptr) straTool->set_tooltip_markup (M("TOOLBAR_TOOLTIP_STRAIGHTEN")); } -ToolBar::~ToolBar () -{ - handimg->unreference(); - editinghandimg->unreference(); - showcolpickersimg->unreference(); - hidecolpickersimg->unreference(); - -} // // Selects the desired tool without notifying the listener // @@ -221,25 +210,29 @@ void ToolBar::hand_pressed () listener->editModeSwitchedOff (); } } - if (current != TMHand) { - if (colPickerTool) { - colPickerTool->set_active(false); - } - if (wbTool) { - wbTool->set_active (false); - } - cropTool->set_active (false); - straTool->set_active (false); - current = TMHand; + if (colPickerTool) { + colPickerTool->set_active(false); + } + if (wbTool) { + wbTool->set_active (false); } + cropTool->set_active (false); + straTool->set_active (false); handTool->set_active (true); + if (current != TMHand) { + current = TMHand; + } else if (allowNoTool) { + current = TMNone; + handTool->set_active(false); + } + } if (listener) { - listener->toolSelected (TMHand); + listener->toolSelected (current); } } @@ -366,32 +359,35 @@ void ToolBar::crop_pressed () ConnectionBlocker cropBlocker(cropConn); ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); - if (current != TMCropSelect) { - if (editingMode) { - stopEditMode(); - if (listener) { - listener->editModeSwitchedOff (); - } + if (editingMode) { + stopEditMode(); + if (listener) { + listener->editModeSwitchedOff (); } - handTool->set_active (false); - if (colPickerTool) { - colPickerTool->set_active(false); - } - if (wbTool) { - wbTool->set_active (false); - } - - straTool->set_active (false); - current = TMCropSelect; + } + handTool->set_active (false); + if (colPickerTool) { + colPickerTool->set_active(false); + } + if (wbTool) { + wbTool->set_active (false); } + straTool->set_active (false); cropTool->set_active (true); - cropTool->grab_focus (); + + if (current != TMCropSelect) { + current = TMCropSelect; + cropTool->grab_focus (); + } else if (allowNoTool) { + current = TMNone; + cropTool->set_active(false); + } } if (listener) { - listener->toolSelected (TMCropSelect); + listener->toolSelected (current); } } @@ -403,31 +399,34 @@ void ToolBar::stra_pressed () ConnectionBlocker cropBlocker(cropConn); ConnectionBlocker wbWasBlocked(wbTool, wbConn), cpWasBlocked(colPickerTool, cpConn); - if (current != TMStraighten) { - if (editingMode) { - stopEditMode(); - if (listener) { - listener->editModeSwitchedOff (); - } + if (editingMode) { + stopEditMode(); + if (listener) { + listener->editModeSwitchedOff (); } - handTool->set_active (false); - if (colPickerTool) { - colPickerTool->set_active(false); - } - if (wbTool) { - wbTool->set_active (false); - } - - cropTool->set_active (false); - current = TMStraighten; + } + handTool->set_active (false); + if (colPickerTool) { + colPickerTool->set_active(false); + } + if (wbTool) { + wbTool->set_active (false); } + cropTool->set_active (false); straTool->set_active (true); + if (current != TMStraighten) { + current = TMStraighten; + } else if (allowNoTool) { + current = TMNone; + straTool->set_active(false); + } + } if (listener) { - listener->toolSelected (TMStraighten); + listener->toolSelected (current); } } @@ -440,8 +439,8 @@ bool ToolBar::handleShortcutKey (GdkEventKey* event) if (!ctrl && !alt) { switch(event->keyval) { - case GDK_w: - case GDK_W: + case GDK_KEY_w: + case GDK_KEY_W: if(wbTool) { wb_pressed (); return true; @@ -449,18 +448,18 @@ bool ToolBar::handleShortcutKey (GdkEventKey* event) return false; - case GDK_c: - case GDK_C: + case GDK_KEY_c: + case GDK_KEY_C: crop_pressed (); return true; - case GDK_s: - case GDK_S: + case GDK_KEY_s: + case GDK_KEY_S: stra_pressed (); return true; - case GDK_h: - case GDK_H: + case GDK_KEY_h: + case GDK_KEY_H: hand_pressed (); return true; } @@ -484,5 +483,20 @@ void ToolBar::setBatchMode() removeIfThere(this, colPickerTool, false); colPickerTool = nullptr; } + + allowNoTool = true; + switch (current) { + case TMHand: + hand_pressed(); + break; + case TMCropSelect: + crop_pressed(); + break; + case TMStraighten: + stra_pressed(); + break; + default: + break; + } } diff --git a/rtgui/toolbar.h b/rtgui/toolbar.h index c5bc68696..42e764952 100644 --- a/rtgui/toolbar.h +++ b/rtgui/toolbar.h @@ -39,10 +39,10 @@ public: class ToolBar : public Gtk::HBox { private: - RTImage* handimg; - RTImage* editinghandimg; - RTImage* showcolpickersimg; - RTImage* hidecolpickersimg; + std::unique_ptr handimg; + std::unique_ptr editinghandimg; + std::unique_ptr showcolpickersimg; + std::unique_ptr hidecolpickersimg; bool showColPickers; void hand_pressed (); @@ -62,6 +62,7 @@ protected: ToolBarListener* listener; LockablePickerToolListener* pickerListener; ToolMode current; + bool allowNoTool; bool editingMode; // true if the cursor is being used to remotely edit tool's values sigc::connection handConn; sigc::connection wbConn; @@ -71,7 +72,6 @@ protected: public: ToolBar (); - ~ToolBar (); void setTool (ToolMode tool); ToolMode getTool () diff --git a/rtgui/toolenum.h b/rtgui/toolenum.h index 06212682a..85a7b954a 100644 --- a/rtgui/toolenum.h +++ b/rtgui/toolenum.h @@ -19,6 +19,6 @@ #ifndef _TOOLENUM_ #define _TOOLENUM_ -enum ToolMode {TMHand = 0, TMSpotWB = 1, TMCropSelect = 2, TMStraighten = 3, TMColorPicker = 4}; +enum ToolMode {TMNone = -1, TMHand = 0, TMSpotWB = 1, TMCropSelect = 2, TMStraighten = 3, TMColorPicker = 4}; #endif diff --git a/rtgui/toolpanel.cc b/rtgui/toolpanel.cc index 0b94359d0..812203517 100644 --- a/rtgui/toolpanel.cc +++ b/rtgui/toolpanel.cc @@ -23,46 +23,22 @@ using namespace rtengine::procparams; -ToolVBox::ToolVBox() -{ - updateStyle(); +ToolVBox::ToolVBox() { +//GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + set_spacing(1); // Vertical space between tools + set_border_width(3); // Space separating the tab's frame and the tools +#endif +//GTK318 } -void ToolVBox::updateStyle() -{ - if (options.slimUI) { - set_spacing(1); // Vertical space between tools - set_border_width(1); // Space separating the tab's frame and the tools - } else { - set_spacing(2); // Vertical space between tools - set_border_width(1); // Space separating the tab's frame and the tools 3 - } -} - -void ToolVBox::on_style_changed (const Glib::RefPtr& style) -{ - updateStyle(); -} - -ToolParamBlock::ToolParamBlock() -{ - updateStyle(); -} - -void ToolParamBlock::updateStyle() -{ - if (options.slimUI) { - set_spacing(2); // Vertical space between parameters in a single tool - set_border_width(6); // Space separating the parameters of a tool and its surrounding frame 6 - } else { - set_spacing(4); // Vertical space between parameters in a single tool - set_border_width(8); // Space separating the parameters of a tool and its surrounding frame 8 - } -} - -void ToolParamBlock::on_style_changed (const Glib::RefPtr& style) -{ - updateStyle(); +ToolParamBlock::ToolParamBlock() { +//GTK318 +#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION < 20 + set_spacing(2); // Vertical space between parameters in a single tool + set_border_width(5); // Space separating the parameters of a tool and its surrounding frame +#endif +//GTK318 } FoldableToolPanel::FoldableToolPanel(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11, bool useEnabled) : ToolPanel(toolName, need11), parentContainer(nullptr), exp(nullptr), lastEnabled(true) @@ -71,14 +47,13 @@ FoldableToolPanel::FoldableToolPanel(Gtk::Box* content, Glib::ustring toolName, return; } -// exp->set_border_width (5); // exp->set_use_markup (true); if (need11) { Gtk::HBox *titleHBox = Gtk::manage(new Gtk::HBox()); Gtk::Label *label = Gtk::manage(new Gtk::Label()); label->set_markup(Glib::ustring("") + escapeHtmlChars(UILabel) + Glib::ustring("")); - label->set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER); + label->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER); titleHBox->pack_start(*label, Gtk::PACK_EXPAND_WIDGET, 0); RTImage *image = Gtk::manage (new RTImage("zoom-100-identifier.png")); @@ -136,6 +111,13 @@ void FoldableToolPanel::set_inconsistent(bool isInconsistent) exp->set_inconsistent(isInconsistent); } +void FoldableToolPanel::setLevel (int level) +{ + if (exp) { + exp->setLevel(level); + } +} + bool FoldableToolPanel::getEnabled() { return exp->getEnabled(); diff --git a/rtgui/toolpanel.h b/rtgui/toolpanel.h index d7d0dc662..d5814c040 100644 --- a/rtgui/toolpanel.h +++ b/rtgui/toolpanel.h @@ -43,23 +43,15 @@ public: /// @brief This class control the space around the group of tools inside a tab, as well as the space separating each tool. */ class ToolVBox : public Gtk::VBox { -private: - void updateStyle(); - public: ToolVBox(); - void on_style_changed (const Glib::RefPtr& style); }; /// @brief This class control the space around a tool's block of parameter. */ class ToolParamBlock : public Gtk::VBox { -private: - void updateStyle(); - public: ToolParamBlock(); - void on_style_changed (const Glib::RefPtr& style); }; class ToolPanel @@ -168,6 +160,18 @@ public: exp->set_expanded( expanded ); } } + + void hide() { + if (exp && !batchMode) { // conditional hide + exp->hide(); + } + } + + void show() { + if (exp) { // always show + exp->show(); + } + } bool getExpanded () { if (exp) { @@ -202,6 +206,8 @@ public: bool get_inconsistent(); // related to the enabled/disabled state void set_inconsistent(bool isInconsistent); // related to the enabled/disabled state + void setLevel (int level); + // Functions that want to receive an enabled/disabled event from this class // will have to receive it from MyExpander directly, we do not create // a relaying event diff --git a/rtgui/toolpanelcoord.cc b/rtgui/toolpanelcoord.cc index 2b34891e5..64ed98537 100644 --- a/rtgui/toolpanelcoord.cc +++ b/rtgui/toolpanelcoord.cc @@ -28,7 +28,7 @@ using namespace rtengine::procparams; -ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), editDataProvider(nullptr) +ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), hasChanged(false), editDataProvider(nullptr) { exposurePanel = Gtk::manage (new ToolVBox ()); @@ -154,39 +154,39 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), editDataProvider(n toolPanels.push_back (crop); addPanel (transformPanel, resize); toolPanels.push_back (resize); - addPanel (resize->getPackBox(), prsharpening); + addPanel (resize->getPackBox(), prsharpening, 2); toolPanels.push_back (prsharpening); addPanel (transformPanel, lensgeom); toolPanels.push_back (lensgeom); - addPanel (lensgeom->getPackBox(), rotate); + addPanel (lensgeom->getPackBox(), rotate, 2); toolPanels.push_back (rotate); - addPanel (lensgeom->getPackBox(), perspective); + addPanel (lensgeom->getPackBox(), perspective, 2); toolPanels.push_back (perspective); - addPanel (lensgeom->getPackBox(), lensProf); + addPanel (lensgeom->getPackBox(), lensProf, 2); toolPanels.push_back (lensProf); - addPanel (lensgeom->getPackBox(), distortion); + addPanel (lensgeom->getPackBox(), distortion, 2); toolPanels.push_back (distortion); - addPanel (lensgeom->getPackBox(), cacorrection); + addPanel (lensgeom->getPackBox(), cacorrection, 2); toolPanels.push_back (cacorrection); - addPanel (lensgeom->getPackBox(), vignetting); + addPanel (lensgeom->getPackBox(), vignetting, 2); toolPanels.push_back (vignetting); addPanel (colorPanel, icm); toolPanels.push_back (icm); addPanel (rawPanel, sensorbayer); toolPanels.push_back (sensorbayer); - addPanel (sensorbayer->getPackBox(), bayerprocess); + addPanel (sensorbayer->getPackBox(), bayerprocess, 2); toolPanels.push_back (bayerprocess); - addPanel (sensorbayer->getPackBox(), bayerrawexposure); + addPanel (sensorbayer->getPackBox(), bayerrawexposure, 2); toolPanels.push_back (bayerrawexposure); - addPanel (sensorbayer->getPackBox(), bayerpreprocess); + addPanel (sensorbayer->getPackBox(), bayerpreprocess, 2); toolPanels.push_back (bayerpreprocess); - addPanel (sensorbayer->getPackBox(), rawcacorrection); + addPanel (sensorbayer->getPackBox(), rawcacorrection, 2); toolPanels.push_back (rawcacorrection); addPanel (rawPanel, sensorxtrans); toolPanels.push_back (sensorxtrans); - addPanel (sensorxtrans->getPackBox(), xtransprocess); + addPanel (sensorxtrans->getPackBox(), xtransprocess, 2); toolPanels.push_back (xtransprocess); - addPanel (sensorxtrans->getPackBox(), xtransrawexposure); + addPanel (sensorxtrans->getPackBox(), xtransrawexposure, 2); toolPanels.push_back (xtransrawexposure); addPanel (rawPanel, rawexposure); toolPanels.push_back (rawexposure); @@ -202,7 +202,9 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), editDataProvider(n toolPanels.push_back (iptcpanel); metadataPanel = Gtk::manage (new Gtk::Notebook ()); + metadataPanel->set_name ("MetaPanelNotebook"); toolPanelNotebook = new Gtk::Notebook (); + toolPanelNotebook->set_name ("ToolPanelNotebook"); metadataPanel->append_page (*exifpanel, M("MAIN_TAB_EXIF")); metadataPanel->append_page (*iptcpanel, M("MAIN_TAB_IPTC")); @@ -291,17 +293,11 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(nullptr), editDataProvider(n toolBar->setToolBarListener(this); } -void ToolPanelCoordinator::addPanel (Gtk::Box* where, FoldableToolPanel* panel) +void ToolPanelCoordinator::addPanel (Gtk::Box* where, FoldableToolPanel* panel, int level) { - // no more separator! - /*if (where->children().size()) { - Gtk::HSeparator *hsep = Gtk::manage (new Gtk::HSeparator()); - where->pack_start(*hsep, Gtk::PACK_SHRINK, 0); - hsep->show(); - }*/ - panel->setParent(where); + panel->setLevel(level); expList.push_back (panel->getExpander()); where->pack_start(*panel->getExpander(), false, false); @@ -316,6 +312,35 @@ ToolPanelCoordinator::~ToolPanelCoordinator () delete toolBar; } +void ToolPanelCoordinator::imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans) +{ + GThreadLock lock; + + if(isRaw) { + rawPanelSW->set_sensitive(true); + if (isBayer) { + sensorxtrans->FoldableToolPanel::hide(); + sensorbayer->FoldableToolPanel::show(); + preprocess->FoldableToolPanel::show(); + flatfield->FoldableToolPanel::show(); + } else if (isXtrans) { + sensorxtrans->FoldableToolPanel::show(); + sensorbayer->FoldableToolPanel::hide(); + preprocess->FoldableToolPanel::show(); + flatfield->FoldableToolPanel::show(); + } else { + sensorbayer->FoldableToolPanel::hide(); + sensorxtrans->FoldableToolPanel::hide(); + preprocess->FoldableToolPanel::hide(); + flatfield->FoldableToolPanel::hide(); + } + } else { + rawPanelSW->set_sensitive(false); + } + +} + + void ToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr) { @@ -487,27 +512,29 @@ void ToolPanelCoordinator::initImage (rtengine::StagedImageProcessor* ipc_, bool toneCurve->enableAll (); toneCurve->enableListener (); - const rtengine::ImageMetaData* pMetaData = ipc->getInitialImage()->getMetaData(); - exifpanel->setImageData (pMetaData); - iptcpanel->setImageData (pMetaData); - if (ipc) { + const rtengine::ImageMetaData* pMetaData = ipc->getInitialImage()->getMetaData(); + exifpanel->setImageData (pMetaData); + iptcpanel->setImageData (pMetaData); + ipc->setAutoExpListener (toneCurve); ipc->setAutoCamListener (colorappearance); ipc->setAutoBWListener (blackwhite); + ipc->setFrameCountListener (bayerprocess); + ipc->setAutoWBListener (whitebalance); ipc->setAutoColorTonListener (colortoning); ipc->setAutoChromaListener (dirpyrdenoise); ipc->setWaveletListener (wavelet); ipc->setRetinexListener (retinex); - ipc->setSizeListener (crop); ipc->setSizeListener (resize); + ipc->setImageTypeListener (this); + flatfield->setShortcutPath(Glib::path_get_dirname(ipc->getInitialImage()->getFileName())); + + icm->setRawMeta (raw, (const rtengine::ImageData*)pMetaData); + lensProf->setRawMeta (raw, pMetaData); } - flatfield->setShortcutPath(Glib::path_get_dirname(ipc->getInitialImage()->getFileName())); - - icm->setRawMeta (raw, (const rtengine::ImageData*)pMetaData); - lensProf->setRawMeta (raw, pMetaData); toneCurve->setRaw (raw); hasChanged = true; @@ -559,6 +586,7 @@ void ToolPanelCoordinator::updateToolState() wavelet->updateToolState(temp); wavelet->setExpanded(true); + retinex->updateToolState(temp); } } @@ -793,31 +821,31 @@ bool ToolPanelCoordinator::handleShortcutKey (GdkEventKey* event) if (alt) { switch(event->keyval) { - case GDK_e: + case GDK_KEY_e: toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*exposurePanelSW)); return true; - case GDK_d: + case GDK_KEY_d: toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*detailsPanelSW)); return true; - case GDK_c: + case GDK_KEY_c: toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*colorPanelSW)); return true; - case GDK_t: + case GDK_KEY_t: toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*transformPanelSW)); return true; - case GDK_r: + case GDK_KEY_r: toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*rawPanelSW)); return true; - case GDK_w: + case GDK_KEY_w: toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*waveletPanelSW)); return true; - case GDK_m: + case GDK_KEY_m: if (metadataPanel) { toolPanelNotebook->set_current_page (toolPanelNotebook->page_num(*metadataPanel)); return true; @@ -838,6 +866,10 @@ void ToolPanelCoordinator::updateVScrollbars (bool hide) transformPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy); rawPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy); waveletPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy); + + for (auto currExp : expList) { + currExp->updateVScrollbars(hide); + } } void ToolPanelCoordinator::updateTabsHeader (bool useIcons) diff --git a/rtgui/toolpanelcoord.h b/rtgui/toolpanelcoord.h index 918a0e2c9..c93e9efe3 100644 --- a/rtgui/toolpanelcoord.h +++ b/rtgui/toolpanelcoord.h @@ -93,7 +93,8 @@ class ToolPanelCoordinator : public ToolPanelListener, public SpotWBListener, public CropPanelListener, public ICMPanelListener, - public ImageAreaToolListener + public ImageAreaToolListener, + public rtengine::ImageTypeListener { protected: @@ -171,19 +172,6 @@ protected: TextOrIcon* toiM; TextOrIcon* toiW; - Gtk::Label* labelE; - Gtk::Label* labelD; - Gtk::Label* labelC; - Gtk::Label* labelT; - Gtk::Label* labelR; - Gtk::Label* labelM; - - Gtk::Image* imgIconE; - Gtk::Image* imgIconD; - Gtk::Image* imgIconC; - Gtk::Image* imgIconT; - Gtk::Image* imgIconR; - Gtk::Image* imgIconM; Gtk::Image* imgPanelEnd[6]; Gtk::VBox* vbPanelEnd[6]; @@ -198,7 +186,7 @@ protected: bool hasChanged; - void addPanel (Gtk::Box* where, FoldableToolPanel* panel); + void addPanel (Gtk::Box* where, FoldableToolPanel* panel, int level = 1); void foldThemAll (GdkEventButton* event); void updateVScrollbars (bool hide); void updateTabsHeader (bool useIcons); @@ -231,6 +219,7 @@ public: // toolpanellistener interface void panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr); + void imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans); // profilechangelistener interface void profileChange (const rtengine::procparams::PartialProfile* nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited = nullptr); void setDefaults (rtengine::procparams::ProcParams* defparams); @@ -254,10 +243,10 @@ public: void writeOptions (); // wbprovider interface - void getAutoWB (double& temp, double& green, double equal) + void getAutoWB (double& temp, double& green, double equal, double tempBias) { if (ipc) { - ipc->getAutoWB (temp, green, equal); + ipc->getAutoWB (temp, green, equal, tempBias); } } void getCamWB (double& temp, double& green) diff --git a/rtgui/version.h.in b/rtgui/version.h.in index 03630075b..39ecd6426 100644 --- a/rtgui/version.h.in +++ b/rtgui/version.h.in @@ -4,9 +4,7 @@ #ifndef _VERSION_ #define _VERSION_ -#define VERSION "${GIT_VERSION}" -#define VERSION_SUFFIX "${VERSION_SUFFIX}" -#define TAGDISTANCE ${GIT_TAGDISTANCE} +#define RTVERSION "${GIT_DESCRIBE}" #define CACHEFOLDERNAME "RawTherapee${CACHE_NAME_SUFFIX}" #endif diff --git a/rtgui/vibrance.cc b/rtgui/vibrance.cc index 9aa58d1c5..51cb31a02 100644 --- a/rtgui/vibrance.cc +++ b/rtgui/vibrance.cc @@ -77,8 +77,6 @@ Vibrance::Vibrance () : FoldableToolPanel(this, "vibrance", M("TP_VIBRANCE_LABEL pack_start (*curveEditorGG, Gtk::PACK_SHRINK, 4); - show (); - pskinsconn = protectSkins->signal_toggled().connect( sigc::mem_fun(*this, &Vibrance::protectskins_toggled) ); ashiftconn = avoidColorShift->signal_toggled().connect( sigc::mem_fun(*this, &Vibrance::avoidcolorshift_toggled) ); pastsattogconn = pastSatTog->signal_toggled().connect( sigc::mem_fun(*this, &Vibrance::pastsattog_toggled) ); diff --git a/rtgui/wavelet.cc b/rtgui/wavelet.cc index 2d7f6dd2e..b61c9acd4 100644 --- a/rtgui/wavelet.cc +++ b/rtgui/wavelet.cc @@ -132,15 +132,15 @@ Wavelet::Wavelet() : wavLabels(Gtk::manage(new Gtk::Label("---", Gtk::ALIGN_CENTER))), labmC(Gtk::manage(new Gtk::Label(M("TP_WAVELET_CTYPE") + ":"))), labmNP(Gtk::manage(new Gtk::Label(M("TP_WAVELET_NPTYPE") + ":"))), - expchroma(new MyExpander(true, M("TP_WAVELET_LEVCH"))), - expcontrast(new MyExpander(true, M("TP_WAVELET_LEVF"))), - expedge(new MyExpander(true, M("TP_WAVELET_EDGE"))), - expfinal(new MyExpander(true, M("TP_WAVELET_FINAL"))), - expgamut(new MyExpander(false, M("TP_WAVELET_CONTR"))), - expnoise(new MyExpander(true, M("TP_WAVELET_NOISE"))), - expresid(new MyExpander(true, M("TP_WAVELET_RESID"))), - expsettings(new MyExpander(false, M("TP_WAVELET_SETTINGS"))), - exptoning(new MyExpander(true, M("TP_WAVELET_TON"))), + expchroma(Gtk::manage(new MyExpander(true, M("TP_WAVELET_LEVCH")))), + expcontrast(Gtk::manage(new MyExpander(true, M("TP_WAVELET_LEVF")))), + expedge(Gtk::manage(new MyExpander(true, M("TP_WAVELET_EDGE")))), + expfinal(Gtk::manage(new MyExpander(true, M("TP_WAVELET_FINAL")))), + expgamut(Gtk::manage(new MyExpander(false, M("TP_WAVELET_CONTR")))), + expnoise(Gtk::manage(new MyExpander(true, M("TP_WAVELET_NOISE")))), + expresid(Gtk::manage(new MyExpander(true, M("TP_WAVELET_RESID")))), + expsettings(Gtk::manage(new MyExpander(false, M("TP_WAVELET_SETTINGS")))), + exptoning(Gtk::manage(new MyExpander(true, M("TP_WAVELET_TON")))), neutrHBox(Gtk::manage(new Gtk::HBox())) { CurveListener::setMulti(true); @@ -172,18 +172,16 @@ Wavelet::Wavelet() : enableFinalConn = expfinal->signal_enabled_toggled().connect ( sigc::bind( sigc::mem_fun(this, &Wavelet::enableToggled), expfinal) ); // Wavelet Settings - Gtk::VBox* const settingsVBox = Gtk::manage(new Gtk::VBox()); - settingsVBox->set_border_width(4); - settingsVBox->set_spacing(2); + ToolParamBlock* const settingsBox = Gtk::manage (new ToolParamBlock()); strength->setAdjusterListener (this); thres->set_tooltip_text (M("TP_WAVELET_LEVELS_TOOLTIP")); thres->setAdjusterListener (this); - Tilesmethod->append_text (M("TP_WAVELET_TILESFULL")); - Tilesmethod->append_text (M("TP_WAVELET_TILESBIG")); - Tilesmethod->append_text (M("TP_WAVELET_TILESLIT")); + Tilesmethod->append (M("TP_WAVELET_TILESFULL")); + Tilesmethod->append (M("TP_WAVELET_TILESBIG")); + Tilesmethod->append (M("TP_WAVELET_TILESLIT")); Tilesmethodconn = Tilesmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::TilesmethodChanged) ); Tilesmethod->set_tooltip_text (M("TP_WAVELET_TILES_TOOLTIP")); Gtk::HBox* const tilesizeHBox = Gtk::manage(new Gtk::HBox()); @@ -192,11 +190,11 @@ Wavelet::Wavelet() : tilesizeHBox->pack_start(*Tilesmethod); daubcoeffmethod->set_sensitive(true); - daubcoeffmethod->append_text (M("TP_WAVELET_DAUB2")); - daubcoeffmethod->append_text (M("TP_WAVELET_DAUB4")); - daubcoeffmethod->append_text (M("TP_WAVELET_DAUB6")); - daubcoeffmethod->append_text (M("TP_WAVELET_DAUB10")); - daubcoeffmethod->append_text (M("TP_WAVELET_DAUB14")); + daubcoeffmethod->append (M("TP_WAVELET_DAUB2")); + daubcoeffmethod->append (M("TP_WAVELET_DAUB4")); + daubcoeffmethod->append (M("TP_WAVELET_DAUB6")); + daubcoeffmethod->append (M("TP_WAVELET_DAUB10")); + daubcoeffmethod->append (M("TP_WAVELET_DAUB14")); daubcoeffmethodconn = daubcoeffmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::daubcoeffmethodChanged) ); daubcoeffmethod->set_tooltip_text (M("TP_WAVELET_DAUB_TOOLTIP")); Gtk::Label* const daubcoeffLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_DAUB") + ":")); @@ -204,19 +202,19 @@ Wavelet::Wavelet() : daubcoeffHBox->pack_start(*daubcoeffLabel, Gtk::PACK_SHRINK, 4); daubcoeffHBox->pack_start(*daubcoeffmethod); - Backmethod->append_text (M("TP_WAVELET_B0")); - Backmethod->append_text (M("TP_WAVELET_B1")); - Backmethod->append_text (M("TP_WAVELET_B2")); + Backmethod->append (M("TP_WAVELET_B0")); + Backmethod->append (M("TP_WAVELET_B1")); + Backmethod->append (M("TP_WAVELET_B2")); Backmethodconn = Backmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::BackmethodChanged) ); Gtk::HBox* const backgroundHBox = Gtk::manage(new Gtk::HBox()); Gtk::Label* const backgroundLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_BACKGROUND") + ":")); backgroundHBox->pack_start(*backgroundLabel, Gtk::PACK_SHRINK, 4); backgroundHBox->pack_start(*Backmethod); - CLmethod->append_text (M("TP_WAVELET_LEVDIR_ONE")); - CLmethod->append_text (M("TP_WAVELET_LEVDIR_INF")); - CLmethod->append_text (M("TP_WAVELET_LEVDIR_SUP")); - CLmethod->append_text (M("TP_WAVELET_LEVDIR_ALL")); + CLmethod->append (M("TP_WAVELET_LEVDIR_ONE")); + CLmethod->append (M("TP_WAVELET_LEVDIR_INF")); + CLmethod->append (M("TP_WAVELET_LEVDIR_SUP")); + CLmethod->append (M("TP_WAVELET_LEVDIR_ALL")); CLmethodconn = CLmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::CLmethodChanged) ); Gtk::HBox* const levdirMainHBox = Gtk::manage(new Gtk::HBox()); Gtk::Label* const levdirMainLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_PROC") + ":")); @@ -225,42 +223,39 @@ Wavelet::Wavelet() : Lmethod->set_sensitive(false); Lmethod->set_sensitive(false); - Lmethod->append_text (M("TP_WAVELET_1")); - Lmethod->append_text (M("TP_WAVELET_2")); - Lmethod->append_text (M("TP_WAVELET_3")); - Lmethod->append_text (M("TP_WAVELET_4")); - Lmethod->append_text (M("TP_WAVELET_5")); - Lmethod->append_text (M("TP_WAVELET_6")); - Lmethod->append_text (M("TP_WAVELET_7")); - Lmethod->append_text (M("TP_WAVELET_8")); - Lmethod->append_text (M("TP_WAVELET_9")); - Lmethod->append_text (M("TP_WAVELET_SUPE")); - Lmethod->append_text (M("TP_WAVELET_RESID")); + Lmethod->append (M("TP_WAVELET_1")); + Lmethod->append (M("TP_WAVELET_2")); + Lmethod->append (M("TP_WAVELET_3")); + Lmethod->append (M("TP_WAVELET_4")); + Lmethod->append (M("TP_WAVELET_5")); + Lmethod->append (M("TP_WAVELET_6")); + Lmethod->append (M("TP_WAVELET_7")); + Lmethod->append (M("TP_WAVELET_8")); + Lmethod->append (M("TP_WAVELET_9")); + Lmethod->append (M("TP_WAVELET_SUPE")); + Lmethod->append (M("TP_WAVELET_RESID")); Lmethod->set_active(0); Dirmethod->set_sensitive(false); - Dirmethod->append_text (M("TP_WAVELET_DONE")); - Dirmethod->append_text (M("TP_WAVELET_DTWO")); - Dirmethod->append_text (M("TP_WAVELET_DTHR")); - Dirmethod->append_text (M("TP_WAVELET_DALL")); + Dirmethod->append (M("TP_WAVELET_DONE")); + Dirmethod->append (M("TP_WAVELET_DTWO")); + Dirmethod->append (M("TP_WAVELET_DTHR")); + Dirmethod->append (M("TP_WAVELET_DALL")); Lmethodconn = Lmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::LmethodChanged) ); Dirmethodconn = Dirmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::DirmethodChanged) ); Gtk::HBox* const levdirSubHBox = Gtk::manage(new Gtk::HBox()); levdirSubHBox->pack_start(*Lmethod); levdirSubHBox->pack_start(*Dirmethod, Gtk::PACK_EXPAND_WIDGET, 2); // same, but 2 not 4? - settingsVBox->pack_start(*strength); - settingsVBox->pack_start(*thres); - settingsVBox->pack_start(*tilesizeHBox); - settingsVBox->pack_start(*daubcoeffHBox); - settingsVBox->pack_start(*backgroundHBox); - settingsVBox->pack_start(*levdirMainHBox); - settingsVBox->pack_start(*levdirSubHBox); + settingsBox->pack_start(*strength); + settingsBox->pack_start(*thres); + settingsBox->pack_start(*tilesizeHBox); + settingsBox->pack_start(*daubcoeffHBox); + settingsBox->pack_start(*backgroundHBox); + settingsBox->pack_start(*levdirMainHBox); + settingsBox->pack_start(*levdirSubHBox); // Contrast - Gtk::VBox* const levBox = Gtk::manage (new Gtk::VBox()); - levBox->set_border_width(4); - levBox->set_spacing(2); - + ToolParamBlock* const levBox = Gtk::manage (new ToolParamBlock()); Gtk::HBox* const buttonBox = Gtk::manage (new Gtk::HBox(true, 10)); levBox->pack_start(*buttonBox, Gtk::PACK_SHRINK, 2); @@ -306,11 +301,10 @@ Wavelet::Wavelet() : levBox->pack_start (*wavLabels); Gtk::VBox* const contrastSHVBox = Gtk::manage(new Gtk::VBox); - contrastSHVBox->set_border_width(4); contrastSHVBox->set_spacing(2); - HSmethod->append_text (M("TP_WAVELET_HS1")); - HSmethod->append_text (M("TP_WAVELET_HS2")); + HSmethod->append (M("TP_WAVELET_HS1")); + HSmethod->append (M("TP_WAVELET_HS2")); HSmethodconn = HSmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::HSmethodChanged) ); const std::vector milestones2 = { @@ -330,7 +324,7 @@ Wavelet::Wavelet() : threshold2->setAdjusterListener (this); threshold2->set_tooltip_text (M("TP_WAVELET_THRESHOLD2_TOOLTIP")); - contrastSHVBox->pack_start(*HSmethod); //remove 2? + contrastSHVBox->pack_start(*HSmethod); contrastSHVBox->pack_start(*hllev); contrastSHVBox->pack_start(*threshold); contrastSHVBox->pack_start(*bllev); @@ -340,17 +334,15 @@ Wavelet::Wavelet() : levBox->pack_start(*contrastSHFrame); // Chromaticity - Gtk::VBox* const chBox = Gtk::manage (new Gtk::VBox()); - chBox->set_border_width(4); - chBox->set_spacing(2); + ToolParamBlock* const chBox = Gtk::manage (new ToolParamBlock()); Gtk::Label* const labmch = Gtk::manage(new Gtk::Label(M("TP_WAVELET_CHTYPE") + ":")); Gtk::HBox* const ctboxch = Gtk::manage(new Gtk::HBox()); ctboxch->pack_start (*labmch, Gtk::PACK_SHRINK, 1); - CHmethod->append_text (M("TP_WAVELET_CH1")); - CHmethod->append_text (M("TP_WAVELET_CH2")); - CHmethod->append_text (M("TP_WAVELET_CH3")); + CHmethod->append (M("TP_WAVELET_CH1")); + CHmethod->append (M("TP_WAVELET_CH2")); + CHmethod->append (M("TP_WAVELET_CH3")); CHmethodconn = CHmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::CHmethodChanged) ); ctboxch->pack_start(*CHmethod); chBox->pack_start(*ctboxch); @@ -358,8 +350,8 @@ Wavelet::Wavelet() : Gtk::HBox* const ctboxCH = Gtk::manage(new Gtk::HBox()); ctboxCH->pack_start (*labmC, Gtk::PACK_SHRINK, 1); - CHSLmethod->append_text (M("TP_WAVELET_CHSL")); - CHSLmethod->append_text (M("TP_WAVELET_CHCU")); + CHSLmethod->append (M("TP_WAVELET_CHSL")); + CHSLmethod->append (M("TP_WAVELET_CHCU")); CHSLmethodconn = CHSLmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::CHSLmethodChanged) ); ctboxCH->pack_start(*CHSLmethod); @@ -412,9 +404,7 @@ Wavelet::Wavelet() : } // Toning - Gtk::VBox* const tonBox = Gtk::manage (new Gtk::VBox()); - tonBox->set_border_width(4); - tonBox->set_spacing(2); + ToolParamBlock* const tonBox = Gtk::manage (new ToolParamBlock()); opaCurveEditorG->setCurveListener (this); @@ -443,9 +433,7 @@ Wavelet::Wavelet() : tonBox->pack_start( *opacityCurveEditorG, Gtk::PACK_SHRINK, 2); // Denoise and Refine - Gtk::VBox* const noiseBox = Gtk::manage (new Gtk::VBox()); - noiseBox->set_border_width(4); - noiseBox->set_spacing(2); + ToolParamBlock* const noiseBox = Gtk::manage (new ToolParamBlock()); linkedg->set_active (true); linkedgConn = linkedg->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::linkedgToggled) ); @@ -469,9 +457,7 @@ Wavelet::Wavelet() : noiseBox->pack_start( *level3noise, Gtk::PACK_SHRINK, 0); // Edge Sharpness - Gtk::VBox* const edgBox = Gtk::manage (new Gtk::VBox()); - edgBox->set_border_width(4); - edgBox->set_spacing(2); + ToolParamBlock* const edgBox = Gtk::manage (new ToolParamBlock()); edgval->setAdjusterListener(this); edgBox->pack_start(*edgval); @@ -488,9 +474,9 @@ Wavelet::Wavelet() : Gtk::HBox* const edbox = Gtk::manage(new Gtk::HBox()); edbox->pack_start (*labmedgr, Gtk::PACK_SHRINK, 1); - Medgreinf->append_text (M("TP_WAVELET_RE1")); - Medgreinf->append_text (M("TP_WAVELET_RE2")); - Medgreinf->append_text (M("TP_WAVELET_RE3")); + Medgreinf->append (M("TP_WAVELET_RE1")); + Medgreinf->append (M("TP_WAVELET_RE2")); + Medgreinf->append (M("TP_WAVELET_RE3")); MedgreinfConn = Medgreinf->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::MedgreinfChanged) ); Medgreinf->set_tooltip_markup (M("TP_WAVELET_EDGREINF_TOOLTIP")); edbox->pack_start(*Medgreinf); @@ -503,8 +489,8 @@ Wavelet::Wavelet() : Gtk::HBox* const ctboxED = Gtk::manage(new Gtk::HBox()); ctboxED->pack_start (*labmED, Gtk::PACK_SHRINK, 1); - EDmethod->append_text (M("TP_WAVELET_EDSL")); - EDmethod->append_text (M("TP_WAVELET_EDCU")); + EDmethod->append (M("TP_WAVELET_EDSL")); + EDmethod->append (M("TP_WAVELET_EDCU")); EDmethodconn = EDmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::EDmethodChanged) ); ctboxED->pack_start(*EDmethod); edgBox->pack_start (*ctboxED); @@ -549,11 +535,9 @@ Wavelet::Wavelet() : edgedetectthr->set_tooltip_text (M("TP_WAVELET_EDGEDETECTTHR_TOOLTIP")); edgBox->pack_start(*edgedetectthr); - edgedetectthr2->setAdjusterListener (this); edgBox->pack_start(*edgedetectthr2); - edgBox->pack_start(*separatoredge, Gtk::PACK_SHRINK, 2); lipst->set_active (true); @@ -564,22 +548,19 @@ Wavelet::Wavelet() : edgesensi->setAdjusterListener (this); edgBox->pack_start(*edgesensi); - edgeampli->setAdjusterListener (this); edgBox->pack_start(*edgeampli); - Gtk::VBox* const ctboxES = Gtk::manage (new Gtk::VBox()); - ctboxES->set_border_width(4); ctboxES->set_spacing(2); Gtk::HBox* const ctboxNP = Gtk::manage(new Gtk::HBox()); ctboxNP->pack_start (*labmNP, Gtk::PACK_SHRINK, 1); - NPmethod->append_text (M("TP_WAVELET_NPNONE")); - NPmethod->append_text (M("TP_WAVELET_NPLOW")); - NPmethod->append_text (M("TP_WAVELET_NPHIGH")); + NPmethod->append (M("TP_WAVELET_NPNONE")); + NPmethod->append (M("TP_WAVELET_NPLOW")); + NPmethod->append (M("TP_WAVELET_NPHIGH")); NPmethodconn = NPmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::NPmethodChanged) ); NPmethod->set_tooltip_text (M("TP_WAVELET_NPTYPE_TOOLTIP")); @@ -589,9 +570,7 @@ Wavelet::Wavelet() : edgBox->pack_start(*ctboxES); // Gamut - Gtk::VBox* const conBox = Gtk::manage (new Gtk::VBox()); - conBox->set_border_width(4); - conBox->set_spacing(2); + ToolParamBlock* const conBox = Gtk::manage (new ToolParamBlock()); median->set_active (true); medianConn = median->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::medianToggled) ); @@ -641,9 +620,7 @@ Wavelet::Wavelet() : conBox->pack_start(*avoid); // Residual Image - Gtk::VBox* const resBox = Gtk::manage (new Gtk::VBox()); - resBox->set_border_width(4); - resBox->set_spacing(2); + ToolParamBlock* const resBox = Gtk::manage (new ToolParamBlock()); rescon->setAdjusterListener (this); resBox->pack_start(*rescon, Gtk::PACK_SHRINK); @@ -672,8 +649,8 @@ Wavelet::Wavelet() : Gtk::HSeparator* const separatorR0 = Gtk::manage (new Gtk::HSeparator()); resBox->pack_start(*separatorR0, Gtk::PACK_SHRINK, 2); - TMmethod->append_text (M("TP_WAVELET_COMPCONT")); - TMmethod->append_text (M("TP_WAVELET_COMPTM")); + TMmethod->append (M("TP_WAVELET_COMPCONT")); + TMmethod->append (M("TP_WAVELET_COMPTM")); TMmethodconn = TMmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::TMmethodChanged) ); ctboxTM->pack_start(*TMmethod); resBox->pack_start (*ctboxTM); @@ -771,9 +748,6 @@ Wavelet::Wavelet() : resBox->pack_start(*chanMixerMidFrame, Gtk::PACK_SHRINK); resBox->pack_start(*chanMixerShadowsFrame, Gtk::PACK_SHRINK); - // Reset sliders - neutrHBox->set_border_width (2); - //RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); //neutral->set_image(*resetImg); Gtk::Button* const neutral = Gtk::manage(new Gtk::Button(M("TP_COLORTONING_NEUTRAL"))); @@ -787,7 +761,6 @@ Wavelet::Wavelet() : // Final Touchup Gtk::VBox* const ctboxBA = Gtk::manage (new Gtk::VBox()); - ctboxBA->set_border_width(4); ctboxBA->set_spacing(2); //Gtk::HSeparator *separatorfin = Gtk::manage (new Gtk::HSeparator()); @@ -796,9 +769,9 @@ Wavelet::Wavelet() : Gtk::HBox* const ctboxFI = Gtk::manage(new Gtk::HBox()); ctboxFI->pack_start (*labmBA, Gtk::PACK_SHRINK, 1); - BAmethod->append_text (M("TP_WAVELET_BANONE")); - BAmethod->append_text (M("TP_WAVELET_BASLI")); - BAmethod->append_text (M("TP_WAVELET_BACUR")); + BAmethod->append (M("TP_WAVELET_BANONE")); + BAmethod->append (M("TP_WAVELET_BASLI")); + BAmethod->append (M("TP_WAVELET_BACUR")); BAmethodconn = BAmethod->signal_changed().connect ( sigc::mem_fun(*this, &Wavelet::BAmethodChanged) ); ctboxFI->pack_start(*BAmethod); ctboxBA->pack_start(*ctboxFI); @@ -848,9 +821,7 @@ Wavelet::Wavelet() : tmr->set_tooltip_text (M("TP_WAVELET_BALCHRO_TOOLTIP")); tmrConn = tmr->signal_toggled().connect( sigc::mem_fun(*this, &Wavelet::tmrToggled) ); - Gtk::VBox* const finalBox = Gtk::manage (new Gtk::VBox()); - finalBox->set_border_width(4); - finalBox->set_spacing(2); + ToolParamBlock* const finalBox = Gtk::manage (new ToolParamBlock()); finalBox->pack_start (*ctboxBA); finalBox->pack_start(*balance); @@ -867,36 +838,47 @@ Wavelet::Wavelet() : //----------------------------- - expsettings->add(*settingsVBox); + expsettings->add(*settingsBox, false); + expsettings->setLevel(2); pack_start (*expsettings); - expcontrast->add(*levBox); + expcontrast->add(*levBox, false); + expcontrast->setLevel(2); pack_start (*expcontrast); - expchroma->add(*chBox); + expchroma->add(*chBox, false); + expchroma->setLevel(2); pack_start (*expchroma); - exptoning->add(*tonBox); + exptoning->add(*tonBox, false); + exptoning->setLevel(2); pack_start (*exptoning); - expnoise->add(*noiseBox); + expnoise->add(*noiseBox, false); + expnoise->setLevel(2); pack_start (*expnoise); - expedge->add(*edgBox); + expedge->add(*edgBox, false); + expedge->setLevel(2); pack_start (*expedge); - expgamut->add(*conBox); + expgamut->add(*conBox, false); + expgamut->setLevel(2); pack_start (*expgamut); - expresid->add(*resBox); + expresid->add(*resBox, false); + expresid->setLevel(2); pack_start(*expresid); - expfinal->add(*finalBox); + expfinal->add(*finalBox, false); + expfinal->setLevel(2); pack_start(*expfinal); } Wavelet::~Wavelet () { + idle_register.destroy(); + delete opaCurveEditorG; delete opacityCurveEditorG; delete CCWcurveEditorG; @@ -905,28 +887,31 @@ Wavelet::~Wavelet () delete curveEditorG; delete opacityCurveEditorW; delete opacityCurveEditorWL; -} -int wavUpdateUI (void* data) -{ - GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected - (static_cast(data))->wavComputed_ (); - return 0; } void Wavelet::wavChanged (double nlevel) { nextnlevel = nlevel; - g_idle_add (wavUpdateUI, this); + + const auto func = [](gpointer data) -> gboolean { + GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected + static_cast(data)->wavComputed_(); + + return FALSE; + }; + + idle_register.add(func, this); } + bool Wavelet::wavComputed_ () { - disableListener (); enableListener (); updatewavLabel (); return false; } + void Wavelet::updatewavLabel () { if (!batchMode) { @@ -2319,20 +2304,20 @@ void Wavelet::LmethodChanged() void Wavelet::setBatchMode (bool batchMode) { - Lmethod->append_text (M("GENERAL_UNCHANGED")); - CLmethod->append_text (M("GENERAL_UNCHANGED")); - Backmethod->append_text (M("GENERAL_UNCHANGED")); - Tilesmethod->append_text (M("GENERAL_UNCHANGED")); - daubcoeffmethod->append_text (M("GENERAL_UNCHANGED")); - CHmethod->append_text (M("GENERAL_UNCHANGED")); - Medgreinf->append_text (M("GENERAL_UNCHANGED")); - CHSLmethod->append_text (M("GENERAL_UNCHANGED")); - EDmethod->append_text (M("GENERAL_UNCHANGED")); - NPmethod->append_text (M("GENERAL_UNCHANGED")); - BAmethod->append_text (M("GENERAL_UNCHANGED")); - TMmethod->append_text (M("GENERAL_UNCHANGED")); - HSmethod->append_text (M("GENERAL_UNCHANGED")); - Dirmethod->append_text (M("GENERAL_UNCHANGED")); + Lmethod->append (M("GENERAL_UNCHANGED")); + CLmethod->append (M("GENERAL_UNCHANGED")); + Backmethod->append (M("GENERAL_UNCHANGED")); + Tilesmethod->append (M("GENERAL_UNCHANGED")); + daubcoeffmethod->append (M("GENERAL_UNCHANGED")); + CHmethod->append (M("GENERAL_UNCHANGED")); + Medgreinf->append (M("GENERAL_UNCHANGED")); + CHSLmethod->append (M("GENERAL_UNCHANGED")); + EDmethod->append (M("GENERAL_UNCHANGED")); + NPmethod->append (M("GENERAL_UNCHANGED")); + BAmethod->append (M("GENERAL_UNCHANGED")); + TMmethod->append (M("GENERAL_UNCHANGED")); + HSmethod->append (M("GENERAL_UNCHANGED")); + Dirmethod->append (M("GENERAL_UNCHANGED")); CCWcurveEditorG->setBatchMode (batchMode); opaCurveEditorG->setBatchMode (batchMode); opacityCurveEditorG->setBatchMode (batchMode); @@ -2883,7 +2868,7 @@ void Wavelet::tmrToggled () void Wavelet::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { - float R, G, B; + float R = 0.f, G = 0.f, B = 0.f; if (elemType == ColorCaller::CCET_VERTICAL_BAR) { valY = 0.5; @@ -3055,7 +3040,7 @@ void Wavelet::writeOptions(std::vector &tpOpen) void Wavelet::updateToolState(std::vector &tpOpen) { - if(tpOpen.size() == 9) { + if(tpOpen.size() >= 9) { expsettings->set_expanded(tpOpen.at(0)); expcontrast->set_expanded(tpOpen.at(1)); expchroma->set_expanded(tpOpen.at(2)); diff --git a/rtgui/wavelet.h b/rtgui/wavelet.h index ff0964731..b73045228 100644 --- a/rtgui/wavelet.h +++ b/rtgui/wavelet.h @@ -40,7 +40,7 @@ class Wavelet : { public: Wavelet (); - virtual ~Wavelet (); + ~Wavelet (); bool wavComputed_ (); void adjusterChanged (ThresholdAdjuster* a, double newBottom, double newTop); @@ -248,4 +248,6 @@ private: bool lastmedian, lastmedianlev, lastlinkedg, lastavoid, lastlipst, lasttmr, lastcbenab; int nextnlevel; + + IdleRegister idle_register; }; diff --git a/rtgui/wbprovider.h b/rtgui/wbprovider.h index 2e46467f9..df1329c84 100644 --- a/rtgui/wbprovider.h +++ b/rtgui/wbprovider.h @@ -25,7 +25,7 @@ class WBProvider public: virtual ~WBProvider() {} - virtual void getAutoWB (double& temp, double& green, double equal) {} + virtual void getAutoWB (double& temp, double& green, double equal, double tempBias) {} virtual void getCamWB (double& temp, double& green) {} virtual void spotWBRequested (int size) {} }; diff --git a/rtgui/whitebalance.cc b/rtgui/whitebalance.cc index e000e6738..d16dafa08 100644 --- a/rtgui/whitebalance.cc +++ b/rtgui/whitebalance.cc @@ -254,7 +254,8 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB spotbox->set_spacing(4); spotbox->show (); - spotbutton = Gtk::manage (new Gtk::Button (M("TP_WBALANCE_SPOTWB"))); + spotbutton = Gtk::manage (new Gtk::Button ()); + spotbutton->set_tooltip_text(M("TP_WBALANCE_SPOTWB")); Gtk::Image* spotimg = Gtk::manage (new RTImage ("gtk-color-picker-small.png")); spotimg->show (); spotbutton->set_image (*spotimg); @@ -267,31 +268,31 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB spotsize = Gtk::manage (new MyComboBoxText ()); spotsize->show (); - spotsize->append_text ("2"); + spotsize->append ("2"); if (options.whiteBalanceSpotSize == 2) { spotsize->set_active(0); } - spotsize->append_text ("4"); + spotsize->append ("4"); if (options.whiteBalanceSpotSize == 4) { spotsize->set_active(1); } - spotsize->append_text ("8"); + spotsize->append ("8"); if (options.whiteBalanceSpotSize == 8) { spotsize->set_active(2); } - spotsize->append_text ("16"); + spotsize->append ("16"); if (options.whiteBalanceSpotSize == 16) { spotsize->set_active(3); } - spotsize->append_text ("32"); + spotsize->append ("32"); if (options.whiteBalanceSpotSize == 32) { spotsize->set_active(4); @@ -308,17 +309,22 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB Gtk::Image* igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); Gtk::Image* iblueredL = Gtk::manage (new RTImage ("ajd-wb-bluered1.png")); Gtk::Image* iblueredR = Gtk::manage (new RTImage ("ajd-wb-bluered2.png")); + Gtk::Image* itempbiasL = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* itempbiasR = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); 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)); equal = Gtk::manage (new Adjuster (M("TP_WBALANCE_EQBLUERED"), MINEQUAL, MAXEQUAL, 0.001, 1.0, iblueredL, iblueredR)); + tempBias = Gtk::manage (new Adjuster(M("TP_WBALANCE_TEMPBIAS"), -0.5, 0.5, 0.01, 0.0, itempbiasL, itempbiasR)); cache_customTemp (0); cache_customGreen (0); cache_customEqual (0); equal->set_tooltip_markup (M("TP_WBALANCE_EQBLUERED_TOOLTIP")); + tempBias->set_tooltip_markup (M("TP_WBALANCE_TEMPBIAS_TOOLTIP")); temp->show (); green->show (); equal->show (); + tempBias->show (); /* Gtk::HBox* boxgreen = Gtk::manage (new Gtk::HBox ()); boxgreen->show (); @@ -331,10 +337,12 @@ WhiteBalance::WhiteBalance () : FoldableToolPanel(this, "whitebalance", M("TP_WB //pack_start (*boxgreen); pack_start (*green); pack_start (*equal); + pack_start (*tempBias); temp->setAdjusterListener (this); green->setAdjusterListener (this); equal->setAdjusterListener (this); + tempBias->setAdjusterListener (this); spotbutton->signal_pressed().connect( sigc::mem_fun(*this, &WhiteBalance::spotPressed) ); methconn = method->signal_changed().connect( sigc::mem_fun(*this, &WhiteBalance::optChanged) ); @@ -357,11 +365,15 @@ void WhiteBalance::adjusterChanged (Adjuster* a, double newval) WBEntry* ppMethod = findWBEntry (row[methodColumns.colLabel], WBLT_GUI); WBEntry* wbCustom = findWBEntry ("Custom", WBLT_PP); - if (!ppMethod || (ppMethod->ppLabel != wbCustom->ppLabel && !(a == equal && ppMethod->type == WBT_AUTO)) ) { + if (!ppMethod || (ppMethod->ppLabel != wbCustom->ppLabel && !((a == equal || a == tempBias) && ppMethod->type == WBT_AUTO)) ) { methconn.block(true); opt = setActiveMethod(wbCustom->GUILabel); + tempBias->set_sensitive(false); + cache_customWB (tVal, gVal); - cache_customEqual(eVal); + if (a != equal) { + cache_customEqual(eVal); + } methconn.block(false); } @@ -372,27 +384,10 @@ void WhiteBalance::adjusterChanged (Adjuster* a, double newval) cache_customGreen (gVal); } else if (a == equal) { cache_customEqual (eVal); - - // Recomputing AutoWB if it's the current method - if (wbp && ppMethod->type == WBT_AUTO) { - double ctemp = -1.0; - double cgreen = -1.0; - wbp->getAutoWB (ctemp, cgreen, eVal); - - if (ctemp != -1.0) { - // Set the automatics temperature value only if in SET mode - if (temp->getEditedState() && !temp->getAddMode() ) { - temp->setValue (ctemp); - } - - // Set the automatics green value only if in SET mode - if (green->getEditedState() && !green->getAddMode()) { - green->setValue (cgreen); - } - } - } } + // Recomputing AutoWB if it's the current method will happen in improccoordinator.cc + if (listener) { if (a == temp) { listener->panelChanged (EvWBTemp, Glib::ustring::format ((int)a->getValue())); @@ -400,6 +395,8 @@ void WhiteBalance::adjusterChanged (Adjuster* a, double newval) listener->panelChanged (EvWBGreen, Glib::ustring::format (std::setw(4), std::fixed, std::setprecision(3), a->getValue())); } else if (a == equal) { listener->panelChanged (EvWBequal, Glib::ustring::format (std::setw(4), std::fixed, std::setprecision(3), a->getValue())); + } else if (a == tempBias) { + listener->panelChanged (EvWBtempBias, Glib::ustring::format (std::setw(4), std::fixed, std::setprecision(2), a->getValue())); } } } @@ -429,10 +426,13 @@ void WhiteBalance::optChanged () temp->setEditedState (UnEdited); green->setEditedState (UnEdited); equal->setEditedState (UnEdited); + tempBias->setEditedState (UnEdited); } else { - int methodId = findWBEntryId (row[methodColumns.colLabel], WBLT_GUI); + unsigned int methodId = findWBEntryId (row[methodColumns.colLabel], WBLT_GUI); WBEntry* currMethod = WBParams::wbEntries[methodId]; + tempBias->set_sensitive(currMethod->type == WBT_AUTO); + switch (currMethod->type) { case WBT_CAMERA: if (wbp) { @@ -459,15 +459,7 @@ void WhiteBalance::optChanged () // equal remain as is } - if (!batchMode || equal->getEditedState()) { - double ctemp, cgreen; - wbp->getAutoWB (ctemp, cgreen, equal->getValue()); - - if (ctemp != -1.0) { - temp->setValue (temp->getAddMode() ? 0.0 : (int)ctemp); - green->setValue (green->getAddMode() ? 0.0 : cgreen); - } - } + // Recomputing AutoWB will happen in improccoordinator.cc } break; @@ -545,12 +537,15 @@ void WhiteBalance::read (const ProcParams* pp, const ParamsEdited* pedited) methconn.block (true); equal->setValue (pp->wb.equal); + tempBias->setValue (pp->wb.tempBias); + tempBias->set_sensitive(true); if (pedited) { // By default, temperature and green are said "UnEdited", but it may change later temp->setEditedState (UnEdited); green->setEditedState (UnEdited); equal->setEditedState (pedited->wb.equal ? Edited : UnEdited); + tempBias->setEditedState (pedited->wb.tempBias ? Edited : UnEdited); } if (pedited && !pedited->wb.method) { @@ -570,6 +565,7 @@ void WhiteBalance::read (const ProcParams* pp, const ParamsEdited* pedited) temp->setValue (temp->getAddMode() ? 0.0 : pp->wb.temperature); green->setValue (green->getAddMode() ? 0.0 : pp->wb.green); equal->setValue (equal->getAddMode() ? 0.0 : pp->wb.equal); + tempBias->setValue (tempBias->getAddMode() ? 0.0 : pp->wb.tempBias); cache_customTemp (pp->wb.temperature); cache_customGreen (pp->wb.green); cache_customEqual (pp->wb.equal); @@ -599,6 +595,7 @@ void WhiteBalance::read (const ProcParams* pp, const ParamsEdited* pedited) green->setValue (green->getAddMode() ? 0.0 : pp->wb.green); equal->setValue (equal->getAddMode() ? 0.0 : pp->wb.equal); } + tempBias->setValue (equal->getAddMode() ? 0.0 : pp->wb.tempBias); } break; @@ -606,7 +603,8 @@ void WhiteBalance::read (const ProcParams* pp, const ParamsEdited* pedited) case WBT_AUTO: // the equalizer's value is restored for the AutoWB equal->setValue (equal->getAddMode() ? 0.0 : pp->wb.equal); - + tempBias->setValue (tempBias->getAddMode() ? 0.0 : pp->wb.tempBias); + // set default values first if in ADD mode, otherwise keep the current ones if (temp->getAddMode() ) { temp->setValue (0.0); @@ -616,32 +614,7 @@ void WhiteBalance::read (const ProcParams* pp, const ParamsEdited* pedited) green->setValue (0.0); } - // then check for the correct ones, if possible - if (wbp) { - double ctemp = -1.0; - double cgreen = -1.0; - wbp->getAutoWB (ctemp, cgreen, pp->wb.equal); - - if (ctemp != -1.0) { - // Set the automatics temperature if in SET mode - if (!pedited || (pedited->wb.temperature && !temp->getAddMode()) ) { - temp->setValue (ctemp); - - if (pedited) { - temp->setEditedState (Edited); - } - } - - // Set the automatics green value if in SET mode - if (!pedited || (pedited->wb.green && !green->getAddMode())) { - green->setValue (cgreen); - - if (pedited) { - green->setEditedState (Edited); - } - } - } - } + // Recomputing AutoWB will happen in improccoordinator.cc break; @@ -662,16 +635,20 @@ void WhiteBalance::read (const ProcParams* pp, const ParamsEdited* pedited) // Set the stored temperature, or 0.0 if in ADD mode green->setValue(green->getAddMode() ? 0.0 : pp->wb.green); equal->setValue(equal->getAddMode() ? 0.0 : pp->wb.equal); + tempBias->setValue(equal->getAddMode() ? 0.0 : pp->wb.tempBias); // The user may have changed the green value even for predefined WB values if (pedited) { green->setEditedState (pedited->wb.green ? Edited : UnEdited); equal->setEditedState (pedited->wb.equal ? Edited : UnEdited); + tempBias->setEditedState (pedited->wb.tempBias ? Edited : UnEdited); } //cache_customGreen (pp->wb.green); break; } + + tempBias->set_sensitive(wbValues->type == WBT_AUTO); } methconn.block (false); @@ -687,6 +664,7 @@ void WhiteBalance::write (ProcParams* pp, ParamsEdited* pedited) pedited->wb.temperature = temp->getEditedState (); pedited->wb.green = green->getEditedState (); pedited->wb.equal = equal->getEditedState (); + pedited->wb.tempBias = tempBias->getEditedState (); pedited->wb.method = row[methodColumns.colLabel] != M("GENERAL_UNCHANGED"); } @@ -699,11 +677,14 @@ void WhiteBalance::write (ProcParams* pp, ParamsEdited* pedited) pp->wb.temperature = temp->getIntValue (); pp->wb.green = green->getValue (); pp->wb.equal = equal->getValue (); + pp->wb.tempBias = tempBias->getValue (); } void WhiteBalance::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) { + equal->setDefault (defParams->wb.equal); + tempBias->setDefault (defParams->wb.tempBias); if (wbp && defParams->wb.method == "Camera") { double ctemp; @@ -715,34 +696,22 @@ void WhiteBalance::setDefaults (const ProcParams* defParams, const ParamsEdited* temp->setDefault (temp->getAddMode() ? 0 : (int)ctemp); green->setDefault (green->getAddMode() ? 0 : cgreen); } - } else if (wbp && defParams->wb.method == "Auto") { - // this setDefaults method is called too early ; the wbp has been set, - // but wbp is not ready to provide! - double ctemp; - double cgreen; - wbp->getAutoWB (ctemp, cgreen, defParams->wb.equal); - - if (ctemp != -1.0) { - temp->setDefault (temp->getAddMode() ? 0 : (int)ctemp); - green->setDefault (green->getAddMode() ? 0 : cgreen); - } else { - // 6504 & 1.0 = same values as in ProcParams::setDefaults - temp->setDefault (temp->getAddMode() ? 0 : 6504); - green->setDefault (green->getAddMode() ? 0 : 1.0); - } } else { temp->setDefault (defParams->wb.temperature); green->setDefault (defParams->wb.green); } + // Recomputing AutoWB if it's the current method will happen in improccoordinator.cc if (pedited) { temp->setDefaultEditedState (pedited->wb.temperature ? Edited : UnEdited); green->setDefaultEditedState (pedited->wb.green ? Edited : UnEdited); equal->setDefaultEditedState (pedited->wb.equal ? Edited : UnEdited); + tempBias->setDefaultEditedState (pedited->wb.tempBias ? Edited : UnEdited); } else { temp->setDefaultEditedState (Irrelevant); green->setDefaultEditedState (Irrelevant); equal->setDefaultEditedState (Irrelevant); + tempBias->setDefaultEditedState (Irrelevant); } } @@ -753,6 +722,7 @@ void WhiteBalance::setBatchMode (bool batchMode) temp->showEditedCB (); green->showEditedCB (); equal->showEditedCB (); + tempBias->showEditedCB (); Gtk::TreeModel::Row row = *(refTreeModel->append()); row[methodColumns.colId] = WBParams::wbEntries.size(); row[methodColumns.colLabel] = M("GENERAL_UNCHANGED"); @@ -784,12 +754,13 @@ void WhiteBalance::setWB (int vtemp, double vgreen) } } -void WhiteBalance::setAdjusterBehavior (bool tempadd, bool greenadd, bool equaladd) +void WhiteBalance::setAdjusterBehavior (bool tempadd, bool greenadd, bool equaladd, bool tempbiasadd) { temp->setAddMode(tempadd); green->setAddMode(greenadd); equal->setAddMode(equaladd); + tempBias->setAddMode(tempbiasadd); } void WhiteBalance::trimValues (rtengine::procparams::ProcParams* pp) @@ -798,6 +769,7 @@ void WhiteBalance::trimValues (rtengine::procparams::ProcParams* pp) temp->trimValue(pp->wb.temperature); green->trimValue(pp->wb.green); equal->trimValue(pp->wb.equal); + tempBias->trimValue(pp->wb.tempBias); } inline void WhiteBalance::cache_customTemp(int temp) @@ -820,7 +792,7 @@ void WhiteBalance::cache_customWB(int temp, double green) cache_customGreen (green); } -int WhiteBalance::findWBEntryId (Glib::ustring label, enum WB_LabelType lblType) +unsigned int WhiteBalance::findWBEntryId (const Glib::ustring &label, enum WB_LabelType lblType) { for (unsigned int i = 0; i < WBParams::wbEntries.size(); i++) { if (label == (lblType == WBLT_GUI ? WBParams::wbEntries[i]->GUILabel : WBParams::wbEntries[i]->ppLabel)) { @@ -828,7 +800,7 @@ int WhiteBalance::findWBEntryId (Glib::ustring label, enum WB_LabelType lblType) } } - return -1; + return 0; // default to camera wb } WBEntry* WhiteBalance::findWBEntry (Glib::ustring label, enum WB_LabelType lblType) @@ -883,3 +855,14 @@ inline Gtk::TreeRow WhiteBalance::getActiveMethod () { return *(method->get_active()); } + +void WhiteBalance::WBChanged(double temperature, double greenVal) +{ + GThreadLock lock; + disableListener(); + temp->setValue(temperature); + green->setValue(greenVal); + temp->setDefault(temperature); + green->setDefault(greenVal); + enableListener(); +} diff --git a/rtgui/whitebalance.h b/rtgui/whitebalance.h index 8a34f83da..7366e55b5 100644 --- a/rtgui/whitebalance.h +++ b/rtgui/whitebalance.h @@ -30,10 +30,11 @@ class SpotWBListener { public: + virtual ~SpotWBListener () {} virtual void spotWBRequested (int size) {} }; -class WhiteBalance : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel +class WhiteBalance : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel, public rtengine::AutoWBListener { enum WB_LabelType { @@ -64,6 +65,7 @@ protected: Adjuster* temp; Adjuster* green; Adjuster* equal; + Adjuster* tempBias; Gtk::Button* spotbutton; int opt; @@ -84,7 +86,7 @@ protected: int _setActiveMethod (Glib::ustring &label, Gtk::TreeModel::Children &children); Gtk::TreeModel::Row getActiveMethod (); - int findWBEntryId (Glib::ustring label, enum WB_LabelType lblType = WBLT_GUI); + unsigned int findWBEntryId (const Glib::ustring &label, enum WB_LabelType lblType = WBLT_GUI); rtengine::procparams::WBEntry* findWBEntry (Glib::ustring label, enum WB_LabelType lblType = WBLT_GUI); public: @@ -113,8 +115,9 @@ public: wblistener = l; } void setWB (int temp, double green); + void WBChanged (double temp, double green); - void setAdjusterBehavior (bool tempadd, bool greenadd, bool equaladd); + void setAdjusterBehavior (bool tempadd, bool greenadd, bool equaladd, bool tempbiasadd); void trimValues (rtengine::procparams::ProcParams* pp); }; diff --git a/rtgui/xtransprocess.cc b/rtgui/xtransprocess.cc index a2ab260af..a663ac7c5 100644 --- a/rtgui/xtransprocess.cc +++ b/rtgui/xtransprocess.cc @@ -19,6 +19,7 @@ #include "xtransprocess.h" #include "options.h" #include "guiutils.h" +#include using namespace rtengine; using namespace rtengine::procparams; @@ -29,7 +30,9 @@ XTransProcess::XTransProcess () : FoldableToolPanel(this, "xtransprocess", M("TP method = Gtk::manage (new MyComboBoxText ()); for( size_t i = 0; i < procparams::RAWParams::XTransSensor::numMethods; i++) { - method->append_text(procparams::RAWParams::XTransSensor::methodstring[i]); + static const std::regex what ("[() -]"); + const std::string langKey = std::regex_replace (procparams::RAWParams::XTransSensor::methodstring[i], what, ""); + method->append(M("TP_RAW_" + Glib::ustring(langKey).uppercase())); } method->set_active(0); @@ -100,7 +103,7 @@ void XTransProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* p void XTransProcess::setBatchMode(bool batchMode) { - method->append_text (M("GENERAL_UNCHANGED")); + method->append (M("GENERAL_UNCHANGED")); method->set_active(procparams::RAWParams::XTransSensor::numMethods); // No name ToolPanel::setBatchMode (batchMode); ccSteps->showEditedCB (); diff --git a/rtgui/zoompanel.cc b/rtgui/zoompanel.cc index 8f5101282..7e88fb1b3 100644 --- a/rtgui/zoompanel.cc +++ b/rtgui/zoompanel.cc @@ -23,8 +23,7 @@ ZoomPanel::ZoomPanel (ImageArea* iarea) : iarea(iarea) { - - set_border_width (0); + set_name ("EditorZoomPanel"); Gtk::Image* imageOut = Gtk::manage (new RTImage ("gtk-zoom-out.png")); imageOut->set_padding(0, 0); @@ -40,34 +39,41 @@ ZoomPanel::ZoomPanel (ImageArea* iarea) : iarea(iarea) zoomOut = Gtk::manage (new Gtk::Button()); zoomOut->add (*imageOut); zoomOut->set_relief(Gtk::RELIEF_NONE); + setExpandAlignProperties(zoomOut, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); zoomIn = Gtk::manage (new Gtk::Button()); zoomIn->add (*imageIn); zoomIn->set_relief(Gtk::RELIEF_NONE); + setExpandAlignProperties(zoomIn, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); zoomFit = Gtk::manage (new Gtk::Button()); zoomFit->add (*imageFit); zoomFit->set_relief(Gtk::RELIEF_NONE); + setExpandAlignProperties(zoomFit, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); zoomFitCrop = Gtk::manage (new Gtk::Button()); zoomFitCrop->add (*imageFitCrop); zoomFitCrop->set_relief(Gtk::RELIEF_NONE); + setExpandAlignProperties(zoomFitCrop, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); zoom11 = Gtk::manage (new Gtk::Button()); zoom11->add (*image11); zoom11->set_relief(Gtk::RELIEF_NONE); + setExpandAlignProperties(zoom11, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); - pack_start (*zoomOut, Gtk::PACK_SHRINK, 0); - pack_start (*zoomIn, Gtk::PACK_SHRINK, 0); - pack_start (*zoomFit, Gtk::PACK_SHRINK, 0); - pack_start (*zoomFitCrop, Gtk::PACK_SHRINK, 0); - pack_start (*zoom11, Gtk::PACK_SHRINK, 0); + attach_next_to (*zoomOut, Gtk::POS_RIGHT, 1, 1); + attach_next_to (*zoomIn, Gtk::POS_RIGHT, 1, 1); + attach_next_to (*zoomFit, Gtk::POS_RIGHT, 1, 1); + attach_next_to (*zoomFitCrop, Gtk::POS_RIGHT, 1, 1); + attach_next_to (*zoom11, Gtk::POS_RIGHT, 1, 1); zoomLabel = Gtk::manage (new Gtk::Label ()); - pack_start (*zoomLabel, Gtk::PACK_SHRINK, 4); + setExpandAlignProperties(zoomLabel, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); + attach_next_to (*zoomLabel, Gtk::POS_RIGHT, 1, 1); Gtk::Image* imageCrop = Gtk::manage (new RTImage ("new-detail-window.png")); imageCrop->set_padding(0, 0); newCrop = Gtk::manage (new Gtk::Button()); newCrop->add (*imageCrop); newCrop->set_relief(Gtk::RELIEF_NONE); - pack_start (*newCrop, Gtk::PACK_SHRINK, 4); + setExpandAlignProperties(newCrop, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); + attach_next_to (*newCrop, Gtk::POS_RIGHT, 1, 1); show_all_children (); diff --git a/rtgui/zoompanel.h b/rtgui/zoompanel.h index bcfbc2b34..69fe418d4 100644 --- a/rtgui/zoompanel.h +++ b/rtgui/zoompanel.h @@ -22,7 +22,7 @@ #include class ImageArea; -class ZoomPanel : public Gtk::HBox +class ZoomPanel : public Gtk::Grid { protected: diff --git a/tools/benchmarkRT b/tools/benchmarkRT index ed5950543..fbe27ebc8 100755 --- a/tools/benchmarkRT +++ b/tools/benchmarkRT @@ -6,264 +6,268 @@ # v3 2013-03-04 # v4 2013-03-07 # v5 2013-03-23 +# v6 2017-07-03 +# v7 2017-07-04 # www.rawtherapee.com -revision="tip" inFile='http://rawtherapee.com/shared/test_images/colorspace_flowers.pef' -sidecarDefault=("Neutral.pp3" "Default.pp3") -buildType="release" -branch="default" -rtExe="rawtherapee" -repo="${HOME}/rawtherapee" +rtExe="rawtherapee-cli" OPTIND=1 # Reset in case getopts has been used previously in the shell. -outFileFormat="-t" tmpDir="/tmp/rawtherapee-benchmark" runs=5 echo +die () { + printf '%s\n' "Cleaning up." + rm -rv "${tmpDir}" + exit 1 +} + +trap die HUP INT QUIT ABRT TERM + +download () { + local retries=3 + while [[ $retries -ne 0 ]]; do + wget --progress=dot:binary --continue --trust-server-names --tries=1 --timestamping "$1" 2>&1 | sed "s/^/\t/" + return=${PIPESTATUS[0]} + ((retries--)) + if [[ $return -eq 0 ]]; then # I don't trust wget to only exit with 0 if it downloaded the file succesfully, so I check. + if [[ -f "$(basename "$1")" ]]; then + break + fi + fi + printf "%s\n\n" "Failed to download \"$1\"" "Retrying: " + sleep 1s + done + if [[ $retries -eq 0 ]]; then + printf "%s\n" "Tried to download \"$1\" 3 times but failed. Exiting." + exit 1 + fi +} + howto() { - fold -s < - Input file name with complete path. This can be a file on your - hard drive or a url. The url must start with "http". The default - behavior if you do not use -i is to download a test file from - $inFile + -h - Print this help screen. - -s -s -s - Input sidecar file name(s) with full - paths. You can specify '-s ' zero or more times. To - specify multiple processing profiles, you must precede each - file path with '-s'. The processing profile can be a file on - your hard drive or a url. Only one url is handled, so if you - want to use multiple processing profiles, download them first. - The default behaviour if you do not use -s is to use the - "Neutral" profile. + -i - Absolute path to image file. This can be a file on your + hard drive or a url. The url must start with "http". The default + behavior if you do not specify -i is to download a raw image from + ${inFile} -Examples: - Run the default benchmark (recommended) + -s -s -s - Absolute path to sidecar file. + You can specify multiple sidecar files, use -s each time. + The processing profile can be a file on your hard drive or a url. + The default behaviour if you do not specify -s is to use the + "Neutral" profile. + + Examples + -------- + Run the default benchmark (recommended) ./benchmarkRT - Run a benchmark using your own image file, a RawTherpee executable in a - custom directory, and multiple processing profiles: - ./benchmarkRT -i /tmp/kittens.raw -s /tmp/kittens.raw.pp3 -s /tmp/kittens_tonemapped.raw.pp3 -s /tmp/kittens_denoised.raw.pp3 + Run a benchmark using your own image file, a RawTherpee executable in a + custom directory, and multiple processing profiles: + ./benchmarkRT -i /tmp/kittens.raw -s /tmp/noise_reduction.pp3 -s /tmp/tonemapping.pp3 -s /tmp/retinex.pp3 -Further help: - If you need further help, discover bugs or want to request new functionality - rn this script, then tell us in the forum or on IRC: - http://rawtherapee.com/forum/ - http://webchat.freenode.net/?randomnick=1&channels=rawtherapee&prompt=1 + Further Help + ------------ + If you need further help, discover bugs or want to request new + functionality, then tell us in the forum or on IRC: + https://discuss.pixls.us/t/welcome-to-the-rawtherapee-forum-read-this-first/473 + http://webchat.freenode.net/?randomnick=1&channels=rawtherapee&prompt=1 END } -download () { - local retries=10 - while [[ $retries -ne 0 ]]; do - wget --progress=dot:binary --continue --trust-server-names --tries=5 --timestamping "$1" 2>&1 | sed "s/^/\t/" - return=${PIPESTATUS[0]} - ((retries--)) - if [[ $return -eq 0 ]]; then # I don't trust wget to only exit with 0 if it downloaded the file succesfully, so I check. - if [[ -f "`basename "$1"`" ]]; then - break - fi - fi - printf "%s\n\n" "Failed to download \"$1\"" "Retrying: " - sleep 1s - done - if [[ $retries -eq 0 ]]; then - printf "%s\n" "Tried to download \"$1\" 10 times but failed. Exiting." - exit 1 - fi -} - -while getopts "ae:h?i:s:" opt; do +OPTIND=1 +while getopts "ae:i:s:h?" opt; do case "$opt" in a) testAllTools=1 ;; e) customExeDir="${OPTARG%/}" ;; - h|\?) - howto - exit 0 - ;; i) inFile="$OPTARG" ;; s) sidecarCustom+=("$OPTARG") ;; + h|\?|*) + howto + exit 0 + ;; esac done - shift $((OPTIND-1)) - [ "$1" = "--" ] && shift -inFileName="`basename "${inFile}"`" +inFileName="$(basename "${inFile}")" if [[ ! -e "${tmpDir}" ]]; then - if [[ ! -w /tmp ]]; then - printf "Error: /tmp is not writable.\n" - exit 1 - fi - mkdir "$tmpDir" + if [[ ! -w /tmp ]]; then + printf "Error: /tmp is not writable.\n" + exit 1 + fi + mkdir "$tmpDir" fi -trap 'rm -rv "${tmpDir}"; exit 1' HUP INT QUIT ABRT TERM - cd "$tmpDir" if [[ ${inFile} = http* ]]; then # if inFile is a url and if we haven't downloaded it already, then download it - [[ ! -e "${tmpDir}/${inFileName}" ]] && { + [[ ! -e "${tmpDir}/${inFileName}" ]] && { printf "%s\n\n" "${inFileName} not found in ${tmpDir}, downloading it." [[ ! -w /tmp ]] && { printf "Error: /tmp is not writable.\n"; exit 1; } [[ ! -e "$tmpDir" ]] && mkdir "$tmpDir" cd "$tmpDir" download "$inFile" echo - } +} else # otherwise if inFile is not a url, check if it exists - [[ ! -e "${inFile}" ]] && { # if it doesnt exist, choke + [[ ! -e "${inFile}" ]] && { # if it doesnt exist, choke printf "%s\n" "You specified" "-i ${inFile}" "but that file does not exist." exit 1 - } - cp "${inFile}" "${tmpDir}/${inFileName}" +} +cp "${inFile}" "${tmpDir}/${inFileName}" fi -rtExeDirs=("${customExeDir}" "$HOME/rt_${branch}_${buildType}" "$HOME/rt_${branch}_${buildType}_patched" "$HOME/rawtherapee/") +rtExeDirs=("${customExeDir}" "${HOME}/rt" "${HOME}/programs/code-rawtherapee/build/release" "${HOME}/rt_${branch}_${buildType}" "${HOME}/rawtherapee/") +found="false" for rtExeDir in "${rtExeDirs[@]}"; do - if [[ -x "${rtExeDir}/${rtExe}" ]]; then - printf "%s\n" "Using RawTherapee executable:" "${rtExeDir}/${rtExe}" - break - fi + if [[ -x "${rtExeDir}/${rtExe}" ]]; then + found="true" + break + fi done -if [[ ! -x "${rtExeDir}/${rtExe}" ]]; then - printf "%s\n" "Could not find the RawTherapee executable:" "${rtExeDir}/${rtExe}" "Re-run this script using the -e flag." - exit 0 +if [[ $found = false ]]; then + printf "%s\n" "Could not find the RawTherapee executable." "Re-run this script using the -e flag." + exit 0 fi if [[ $testAllTools -ne 1 ]]; then - if [[ -n "${sidecarCustom}" ]]; then # if sidecarCustom was specified - if [[ ${sidecarCustom} = http* ]]; then # and if sidecarCustom starts with an http - if [[ ! -e "${tmpDir}/$/{sidecarCustom##*/}" ]]; then # and if sidecarCustom hasn't been previously downloaded, then download it - printf "${sidecarCustom} not found in ${tmpDir}, downloading it.\n" - download "$sidecarCustom" - fi - else # else if sidecarCustom does not start with an http - for sidecarFile in "${sidecarCustom[@]}"; do - [[ ! -e "${sidecarFile}" ]] && { # then check if it exists - printf "You specified \"-s ${sidecarFile}\" but it does not exist. Make sure you wrote a full, absolute path, e.g.:" " -s /tmp/kittens_denoise.raw.pp3" - exit 1 - } - done - unset sidecarFiles - sidecarDir="" - sidecarFiles=("${sidecarCustom[@]}") + if [[ -n "${sidecarCustom}" ]]; then # if sidecarCustom was specified + for sidecarFile in "${sidecarCustom[@]}"; do + if [[ ${sidecarFile} = http* ]]; then # and if sidecarCustom starts with an http + if [[ ! -e "${tmpDir}/$/{sidecarFile##*/}" ]]; then # and if sidecarCustom hasn't been previously downloaded, then download it + printf "${sidecarCustom} not found in ${tmpDir}, downloading it.\n" + download "$sidecarCustom" + fi + fi + if [[ -e "${sidecarFile}" ]]; then # then check if it exists + sidecarFinal+=("${sidecarFile}") + else + printf '%s\n' "You specified \"-s ${sidecarFile}\" but it does not exist. Make sure you wrote a full, absolute path, e.g.:" " -s /tmp/custom.pp3" + exit 1 + fi + done + unset sidecarFiles + sidecarFiles=("${sidecarCustom[@]}") + else + # if sidecarCustom was not specified, use neutral. Since neutral is not a file, + # we take advantage of the fact that when RawTherapee does not find a processing profile, it uses neutral values. + sidecarFinal=("Neutral") fi - else # if sidecarCustom was not specified, find the default ones - for sidecar in "${sidecarDefault[@]}"; do - if [[ -f "${rtExeDir}/profiles/${sidecar}" ]]; then - sidecarDir="${rtExeDir}/profiles/" - elif [[ -f "${tmpDir}/${sidecar}" ]]; then - sidecarDir="${tmpDir}/" - else - printf "%s\n" "" "Could not find \"${sidecar}\" in \"${rtExeDir}/profiles/\" where it was expected to be." "Downloading the latest \"${sidecar}\" from the repository." "" - download "https://rawtherapee.googlecode.com/hg/rtdata/profiles/${sidecar}" - sidecarDir="${tmpDir}/" - fi - done - if [[ "${sidecarDir}" = "${tmpDir}/" ]]; then - printf "%s\n" "Beware that the downloaded processing profiles might not be entirely compatible with the RawTherapee version you're testing. For authentic and consistent results, make sure that the PP3 files match this RawTherapee version. You can use the -p flag to point benchmarkRT to the correct PP3 file(s)." | fold -s - fi - sidecarFiles=("${sidecarDefault[@]}") - fi else - unset sidecarFiles avgTable - sidecarDir="${tmpDir}/" - tools=("Auto Exposure;Exposure;Auto=true" "Sharpening - Unsharp Mask;Sharpening;Enabled=true;Method=usm" "Sharpening - RL Deconvolution;Sharpening;Enabled=true;Method=rld" "Vibrance;Vibrance;Enabled=true" "Edges;SharpenEdge;Enabled=true" "Microcontrast;SharpenMicro;Enabled=true" "CIECAM02;Color appearance;Enabled=true" "Impulse Noise Reduction;Impulse Denoising;Enabled=true" "Defringe;Defringing;Enabled=true" "Noise Reduction;Directional Pyramid Denoising;Enabled=true" "Tone Mapping;EPD;Enabled=true" "Shadows/Highlights;Shadows & Highlights;Enabled=true" "Contrast by Detail Levels;Directional Pyramid Equalizer;Enabled=true" "Raw Chromatic Aberration;RAW;CA=true") - for i in "${!tools[@]}"; do - IFS=";" read toolNameHuman tool key1 key2 key3 <<< "${tools[$i]}" - i=`printf "%02d\n" "$i"` - printf "%s\n" "[${tool}]" "$key1" "$key2" "$key3" > "${sidecarDir}/${i} - ${tool}.pp3" - sidecarFiles+=("${i} - ${tool}.pp3;${toolNameHuman}") - done + unset sidecarFiles avgTable sidecarDir + sidecarDir="${tmpDir}/" + tools=("Auto Exposure;Exposure;Auto=true" "Sharpening - Unsharp Mask;Sharpening;Enabled=true;Method=usm" "Sharpening - RL Deconvolution;Sharpening;Enabled=true;Method=rld" "Vibrance;Vibrance;Enabled=true" "Edges;SharpenEdge;Enabled=true" "Microcontrast;SharpenMicro;Enabled=true" "CIECAM02;Color appearance;Enabled=true" "Impulse Noise Reduction;Impulse Denoising;Enabled=true" "Defringe;Defringing;Enabled=true" "Noise Reduction;Directional Pyramid Denoising;Enabled=true" "Tone Mapping;EPD;Enabled=true" "Shadows/Highlights;Shadows & Highlights;Enabled=true" "Contrast by Detail Levels;Directional Pyramid Equalizer;Enabled=true" "Raw Chromatic Aberration;RAW;CA=true") + for i in "${!tools[@]}"; do + IFS=";" read toolNameHuman tool key1 key2 key3 <<< "${tools[$i]}" + i=$(printf "%02d\n" "$i") + printf "%s\n" "[${tool}]" "$key1" "$key2" "$key3" > "${sidecarDir}/${i} - ${tool}.pp3" + sidecarFinal+=("${i} - ${tool}.pp3;${toolNameHuman}") + done fi -printf "%s\n" "" "--------------------------------------------------------------------------------" "" "Benchmark of RawTherapee" -printf "%s\n" "`uname -srvmpio`" "" -hash cpufreq-info 2>/dev/null && cpufreq-info -mo -printf "%s\n" "" +printf "%s\n" "$(uname -srvmpio)" "" +hash cpufreq-info 2>/dev/null && { cpufreq-info -mo; printf "%s\n" ""; } + +printf "%s\n" "RawTherapee executable: ${rtExeDir}/${rtExe}" if [[ ! -f "${rtExeDir}/AboutThisBuild.txt" ]]; then - printf "%s\n" "[Could not find ${rtExeDir}/AboutThisBuild.txt]" "" + printf "%s\n" "[Could not find ${rtExeDir}/AboutThisBuild.txt]" "" else - cat "${rtExeDir}/AboutThisBuild.txt" + cat "${rtExeDir}/AboutThisBuild.txt" fi printf "%s\n" "Photo: ${tmpDir}/${inFileName}" -for sidecar in "${sidecarFiles[@]}"; do - if [[ $testAllTools -eq 1 ]]; then - IFS=";" read sidecar toolNameHuman <<< "${sidecar}" - fi - printf "%s\n" "Sidecar: ${sidecarDir}${sidecar}" +for sidecar in "${sidecarFinal[@]}"; do + if [[ $testAllTools -eq 1 ]]; then + IFS=";" read sidecar toolNameHuman <<< "${sidecar}" + fi + printf "%s\n" "Sidecar: ${sidecarDir}${sidecar}" done echo declare -A avgTable unset benchmark total sidecar sorted -for s in "${!sidecarFiles[@]}"; do - IFS=";" read sidecar toolNameHuman <<< "${sidecarFiles[s]}" - unset benchmark - for (( i=1; i<=${runs}; i++ )); do - runTime="$( { time "${rtExeDir}/${rtExe}" -o /dev/null -p "${sidecarDir}${sidecar}" "$outFileFormat" -Y -c "${tmpDir}/${inFileName}"; } 2>&1 | grep ^real; )" -# runTime=real 0m4.751s - runTime=${runTime#*[[:blank:]]} -# runTime=0m4.751s - minOnly=${runTime%m*} - secOnly=${runTime#*m}; secOnly=${secOnly%s*} - t="$( printf "%s\n" "scale=3; $secOnly+$minOnly*60" | bc )" -# t=4.751 -## t="$(( $RANDOM %20 )).$(( $RANDOM %999 ))" -# benchmark stores time array of each run, gets reset after each PP3 - benchmark+=("$t") -# total stores time array of each run, doesnt get reset, adds up total afterwards - total+=("$t") - i=`printf "%02d\n" "$i"` + +# Unfudge numbers to make sed/PE possible without spaghetti. +export LC_ALL=C + +for s in "${!sidecarFinal[@]}"; do + IFS=";" read sidecar toolNameHuman <<< "${sidecarFinal[s]}" + unset benchmark + for (( i=1; i<=${runs}; i++ )); do + runTime="$( { time "${rtExeDir}/${rtExe}" -o /dev/null/ -p "${sidecarDir}${sidecar}" -t -Y -c "${tmpDir}/${inFileName}"; } 2>&1 | grep ^real; )" + # runTime=real 0m4.751s + runTime=${runTime#*[[:blank:]]} + # runTime=0m4.751s + minOnly=${runTime%m*} + secOnly=${runTime#*m}; secOnly=${secOnly%s*} + t="$( printf "%s\n" "scale=3; $secOnly+$minOnly*60" | bc )" + # t=4.751 + ## t="$(( $RANDOM %20 )).$(( $RANDOM %999 ))" + # benchmark stores time array of each run, gets reset after each PP3 + benchmark+=("$t") + # total stores time array of each run, doesnt get reset, adds up total afterwards + total+=("$t") + i="$(printf "%02d\n" "$i")" + if [[ $testAllTools -eq 1 ]]; then + printf "%*b" "-50" "Benchmark ${i} \"${toolNameHuman}\"" "7" "${benchmark[$i - 1]}" "" "\n" | sed 's/ /../g' + else + printf "%*b" "-50" "Benchmark ${i} \"${sidecar##*/}\"" "7" "${benchmark[$i - 1]}" "" "\n" | sed 's/ /../g' + fi + done + + avg=$( { printf "%s" "scale=3; ("; IFS="+"; printf "%s" "${benchmark[*]}"; printf "%s\n" ") / ${#benchmark[@]}"; } | bc ); if [[ $testAllTools -eq 1 ]]; then - printf "%*b" "-50" "Benchmark ${i} \"${toolNameHuman}\"" "7" "${benchmark[$i - 1]}" "" "\n" | sed 's/ /../g' + printf "%*b" "-50" "Benchmark \"${toolNameHuman}\" average" "7" "${avg}" "" "\n\n" | sed 's/ /../g' + avgTable+=(["${toolNameHuman}"]="$avg") else - printf "%*b" "-50" "Benchmark ${i} \"${sidecar##*/}\"" "7" "${benchmark[$i - 1]}" "" "\n" | sed 's/ /../g' + printf "%*b" "-50" "Benchmark \"${sidecar##*/}\" average" "7" "${avg}" "" "\n\n" | sed 's/ /../g' + avgTable+=(["${sidecar}"]="$avg") fi - done - avg=$( { printf "%s" "scale=3; ("; IFS="+"; printf "%s" "${benchmark[*]}"; printf "%s\n" ") / ${#benchmark[@]}"; } | bc ); - if [[ $testAllTools -eq 1 ]]; then - printf "%*b" "-50" "Benchmark \"${toolNameHuman}\" average" "7" "${avg}" "" "\n\n" | sed 's/ /../g' - avgTable+=(["${toolNameHuman}"]="$avg") - else - printf "%*b" "-50" "Benchmark \"${sidecar##*/}\" average" "7" "${avg}" "" "\n\n" | sed 's/ /../g' - avgTable+=(["${sidecar}"]="$avg") - fi done -printf "%*b" "-50" "Benchmark total" "7" "`IFS=+; bc -l <<< "${total[*]}"`" "" "\n\n" | sed 's/ /../g' +printf "%*b" "-50" "Benchmark total" "7" "$(IFS=+; bc -l <<< "${total[*]}")" "" "\n\n" | sed 's/ /../g' # Associative arrays don't return in alphanumerical order, must be sorted manually IFS=$'\n' sorted=($(sort <<<"${!avgTable[*]}")); -printf "%s\n" "Average times for each tool:" +printf "%s\n" "Average times for each set:" for x in "${sorted[@]}"; do - printf "%*b" "-50" "${x}" "7" "${avgTable[$x]}" "" "\n" | sed 's/ /../g' + printf "%*b" "-50" "${x}" "7" "${avgTable[$x]}" "" "\n" | sed 's/ /../g' done diff --git a/tools/buildRT b/tools/buildRT index 66ed43894..71370e8df 100755 --- a/tools/buildRT +++ b/tools/buildRT @@ -83,7 +83,7 @@ while getopts "bc:fnp:s:t:uvh?-" opt; do " -s " \ "Suffix of destination build directory, so that if you have applied a patch, say \"dustremoval-1.patch\", and want to have RawTherapee compiled to a folder whose name ends with \"_dustremoval1\", you would set \"-s dustremoval1\" (the underscore is automated)." "" \ " -t \"\"" \ - "Suffix displayed next to the RawTherapee version in the window titlebar. It is recommended that you include the changeset of the newest public commit (the one you would see if you cloned the repository anew) so it is clear which commit you applied the patches to. E.g.:" "-t \": ee72ddbcfd4e + dustremoval-1.patch + mustafa ibrahim\"" "" \ + "Suffix displayed next to the RawTherapee version in the window titlebar. It is recommended that you include the commit of the newest public commit (the one you would see if you cloned the repository anew) so it is clear which commit you applied the patches to. E.g.:" "-t \": ee72ddbcfd4e + dustremoval-1.patch + mustafa ibrahim\"" "" \ " -u" \ "Check for an update of buildRT on GitHub." "" \ " -v" \ @@ -193,7 +193,7 @@ if [[ ! -d "${repo}" ]]; then currentBranch="$(git branch | grep "*" | sed -e 's/.* \+//')" rev="$(git rev-list --all --count)" node="$(git rev-parse --short HEAD)" - printf "\nRepository state:\n Branch: ${currentBranch}\n RawTherapee-${verLatesttag}.${verLatesttagdistance}\n Changeset: ${rev}:${node}\n Latest tag: ${verLatesttag}\n\n" + printf "\nRepository state:\n Branch: ${currentBranch}\n RawTherapee-${verLatesttag}.${verLatesttagdistance}\n Commit: ${rev}:${node}\n Latest tag: ${verLatesttag}\n\n" alert "Repository cloned succesfully. What would you like to do next?" printf "%b" "Repository cloned succesfully.\n" "Press 'q' to quit or any other key to continue... " read -r -n 1 @@ -239,7 +239,7 @@ verLatesttagdistance="$(git describe --tags | sed -e 's/.*-\([0-9]\+\)-.*/\1/')" currentBranch="$(git branch | grep "*" | sed -e 's/.* \+//')" rev="$(git rev-list --all --count)" node="$(git rev-parse --short HEAD)" -printf "\nRepository state:\n Branch: ${currentBranch}\n RawTherapee-${verLatesttag}.${verLatesttagdistance}\n Changeset: ${rev}:${node}\n Latest tag: ${verLatesttag}\n\n" +printf "\nRepository state:\n Branch: ${currentBranch}\n RawTherapee-${verLatesttag}.${verLatesttagdistance}\n Commit: ${rev}:${node}\n Latest tag: ${verLatesttag}\n\n" #--- Print the menu branches=() diff --git a/tools/compareRT b/tools/compareRT index cca18bee6..d701508f7 100755 --- a/tools/compareRT +++ b/tools/compareRT @@ -37,8 +37,8 @@ for rtDir in "${rtDirs[@]}"; do c=1 pp3name=${pp3%.*} pp3name=${pp3name#*/} - v+=("$(grep "Changeset:.*" "${rtDir}/AboutThisBuild.txt" | sed "s/Changeset: //")") - printf "%s\n" "Developing images using RawTherapee changeset ${v[$i]} - ${rtDir}" + v+=("$(grep "Commit:.*" "${rtDir}/AboutThisBuild.txt" | sed "s/Commit: //")") + printf "%s\n" "Developing images using RawTherapee commit ${v[$i]} - ${rtDir}" for img in "${imgs[@]}"; do printf "%s" "${c}/${#imgs[@]} - " "${rtDir}rawtherapee" -o "${outDir}${img%.*}_${v[i]}_${pp3%.*}.tif" -p "${pp3}" -t -Y -c "$img" | grep Processing diff --git a/tools/generateDirtyFiles b/tools/generateDirtyFiles index 28b95514b..2a272a2c4 100755 --- a/tools/generateDirtyFiles +++ b/tools/generateDirtyFiles @@ -2,7 +2,7 @@ # Search files for keywords, then do something to the files which don't match # Path to the RawTherapee repository -pushd $HOME/rawtherapee >/dev/null +pushd $HOME/programs/code-rawtherapee >/dev/null unset uses match m u # Key to search for, e.g. an include IFS=" " read -a match <<< $(grep -rni iomanip rt* | cut -d ":" -f1 | sort -uV) diff --git a/tools/generateLensList b/tools/generateLensList index 17a383ed7..13738a359 100755 --- a/tools/generateLensList +++ b/tools/generateLensList @@ -1,9 +1,7 @@ #!/usr/bin/env bash -# This Bash4 script generates lens ID lists for rtexif/*.cc files using -# the exiftool version installed on the host system, so make sure you have -# the latest version of exiftool installed before running this script. -# It uses xmlstarlet to parse exiftool's output so make sure you have that. +# This Bash4 script generates lens ID and other parameter lists for rtexif/*.cc +# files using ExifTool. It uses xmlstarlet to parse ExifTool's output. # # Run the script from the project root: # ./tools/generateLensList @@ -13,50 +11,51 @@ # Blame DrSlony # Please report bugs or enhancements to https://github.com/Beep6581/RawTherapee -hash exiftool 2>/dev/null || { echo >&2 "Exiftool not found, install it first."; exit 1; } +et="$HOME/programs/code-exiftool/exiftool" + +hash "$et" 2>/dev/null || { echo >&2 "ExifTool not found, install it first."; exit 1; } hash xmlstarlet 2>/dev/null || { echo >&2 "XMLStarlet not found, install it first."; exit 1; } unset cam cams -cams=("canon" "nikon" "olympus" "pentax" "sony") tmpdir="/tmp/rt-generateLensList" -head -n 15 "$0" | tail -n 14 -printf '%s\n' "exiftool version: $(exiftool -ver)" "" "XMLStarlet version: $(xmlstarlet --version)" | sed 's/^/# /' +printf '%s\n' "ExifTool version: $("$et" -ver)" "" "XMLStarlet version: $(xmlstarlet --version)" | sed 's/^/# /' if [[ -d ${tmpdir} ]]; then - printf '%s\n' "" "Removing temp folder: $tmpdir" + printf '%s\n' "" "Must remove temp folder from previous run: $tmpdir" rm -rvI "$tmpdir" || exit 1 fi mkdir -p "$tmpdir" || { printf '%s\n' "Error creating $tmpdir" ""; exit 1; } echo -for cam in "${cams[@]}"; do - if [[ "$cam" != nikon ]]; then - printf '%s\n' "Saving ${tmpdir}/${cam}" - xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType']/values/key" -v "concat(@id,' ',val)" -n < <(exiftool -listx -"$cam":all) > "${tmpdir}/cam" || { printf '%s\n' "Saving failed: ${tmpdir}/cam"; exit 1; } - sort -fuV "${tmpdir}/cam" > "${tmpdir}/${cam}" - rm -f "${tmpdir}/cam" - fi - case $cam in - canon) sed -r -i -e '/-1\tn\/a/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert(p_t(/' -e 's/$/"));/' -e 's| F/([0-9]+)| f/\1|' "${tmpdir}/canon" ;; - nikon) - # Nikon LensIDs are composite tags - printf '%s\n' "Saving ${tmpdir}/nikon" - xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensID']/values/key" -v "concat(@id,' ',val)" -n < <(exiftool -listx -composite:all) > "${tmpdir}/nikon" || { printf '%s\n' "Saving failed: ${tmpdir}/nikon"; exit 1; } - sed -r -i -e '/^... /d' -e 's/^/ lenses["/' -e 's/([A-F0-9]+)[A-F0-9.]*\t/\1"] = "/' -e 's/$/";/' -e 's|(.* ")(.*) F([0-9]+)|\1\2 f/\3|' -e 's| F/([0-9]+)| f/\1|' "${tmpdir}/nikon" - ;; - olympus) sed -r -i -e '/0 00 00\tNone/d' -e 's/^/ lenses["0/' -e 's/\t/"] = "/' -e 's/$/";/' -e 's| F([0-9]+)| f/\1|g' "${tmpdir}/olympus" ;; - pentax) sed -r -i -e 's/^/ choices.insert(p_t(256 * /' -e 's/([0-9]+) ([0-9]+)([0-9.]*)/\1 + \2/' -e 's/\t/, "/' -e 's/$/"));/' -e 's| F([0-9]+)| f/\1|' "${tmpdir}/pentax" ;; - sony) - # Sony has more lenses under the LensType2 tag - printf '%s\n' "Saving ${tmpdir}/sony-lenstype2" - xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType2']/values/key" -v "concat(@id,' ',val)" -n < <(exiftool -listx -sony:all) > "${tmpdir}/cam" || { printf '%s\n' "Saving failed: ${tmpdir}/cam"; exit 1; } - sort -fuV "${tmpdir}/cam" > "${tmpdir}/sony-lenstype2" - rm -f "${tmpdir}/cam" - sed -r -i -e '/255\tTamron Lens (255)/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert(p_t(/' -e 's/$/"));/' -e 's| F([0-9]+)| f/\1|g' "${tmpdir}/sony" "${tmpdir}/sony-lenstype2" - ;; - esac +# Canon +printf '%s\n' "Saving ${tmpdir}/canon" +xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType']/values/key" -v "concat(@id,' ',val)" -n < <("$et" -listx -canon:all) | sort -fuV > "${tmpdir}/canon" +sed -r -i -e '/-1\tn\/a/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert(p_t(/' -e 's/$/"));/' -e 's| F/([0-9]+)| f/\1|' "${tmpdir}/canon" +# xmlstarlet sel -T -t -m "taginfo/table/tag[@name='EasyMode']/values/key" -v "concat(@id,' ',val)" -n < <(exiftool -listx -canon:all) | sed -r -e '/-1\tn\/a/d' -e 's/([0-9]+)[0-9.]*\t/\1] = "/' -e 's/^/ choices[/' -e 's/$/";/' -done +# Nikon LensIDs are composite tags +printf '%s\n' "Saving ${tmpdir}/nikon" +xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensID']/values/key" -v "concat(@id,' ',val)" -n < <("$et" -listx -composite:all) > "${tmpdir}/nikon" +sed -r -i -e '/^... /d' -e 's/^/ {"/' -e 's/([A-F0-9]+)[A-F0-9.]*\t/\1", "/' -e 's/$/"},/' -e 's|(.* ")(.*) F([0-9]+)|\1\2 f/\3|' -e 's| F/([0-9]+)| f/\1|' "${tmpdir}/nikon" + +# Olympus +printf '%s\n' "Saving ${tmpdir}/olympus" +xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType']/values/key" -v "concat(@id,' ',val)" -n < <("$et" -listx -olympus:all) | sort -fuV > "${tmpdir}/olympus" +sed -r -i -e '/0 00 00\tNone/d' -e 's/^/ lenses["0/' -e 's/\t/"] = "/' -e 's/$/";/' -e 's| F([0-9]+)| f/\1|g' "${tmpdir}/olympus" + +# Pentax +printf '%s\n' "Saving ${tmpdir}/pentax" +xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType']/values/key" -v "concat(@id,' ',val)" -n < <("$et" -listx -pentax:all) | sort -fuV > "${tmpdir}/pentax" +sed -r -i -e 's/^/ choices.insert(p_t(256 * /' -e 's/([0-9]+) ([0-9]+)([0-9.]*)/\1 + \2/' -e 's/\t/, "/' -e 's/$/"));/' -e 's| F([0-9]+)| f/\1|' "${tmpdir}/pentax" + +# Sony +printf '%s\n' "Saving ${tmpdir}/sony" +xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType']/values/key" -v "concat(@id,' ',val)" -n < <("$et" -listx -sony:all) | sort -fuV > "${tmpdir}/sony" +# Sony has more lenses under the LensType2 tag +printf '%s\n' "Saving ${tmpdir}/sony-lenstype2" +xmlstarlet sel -T -t -m "taginfo/table/tag[@name='LensType2']/values/key" -v "concat(@id,' ',val)" -n < <("$et" -listx -sony:all) | sort -fuV > "${tmpdir}/sony-lenstype2" +sed -r -i -e 's/^/ {/' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/$/"},/' -e 's| F([0-9]+)| f/\1|g' "${tmpdir}/sony" +sed -r -i -e '/255\tTamron Lens (255)/d' -e 's/([0-9]+)[0-9.]*\t/\1, "/' -e 's/^/ choices.insert(p_t(/' -e 's/$/"));/' -e 's| F([0-9]+)| f/\1|g' "${tmpdir}/sony-lenstype2" diff --git a/tools/generateReleaseInfo b/tools/generateReleaseInfo index 79189ad44..ee3493e70 100755 --- a/tools/generateReleaseInfo +++ b/tools/generateReleaseInfo @@ -1,12 +1,76 @@ #!/usr/bin/env bash -gitBranch="`git symbolic-ref --short -q HEAD`" -gitVersion="`git describe --tags --always`" -gitLatesttag="`echo $gitVersion | sed 's/-.*//'`" -gitLatesttagdistance="`echo $gitVersion | sed 's/.*-\(.*\)-g.*/\1/'`" -gitChangeset="`git rev-parse --verify HEAD`" +# This script is called from tools/generateSourceTarball +# It is used to generate a ReleaseInfo.cmake file with commit information which +# enables compilation without needing to have git installed. -echo "set(GIT_BRANCH $gitBranch) -set(GIT_VERSION $gitLatesttag.$gitLatesttagdistance) -set(GIT_CHANGESET $gitChangeset) -set(GIT_TAGDISTANCE $gitLatesttagdistance)" > ReleaseInfo.cmake +rm -f ReleaseInfo.cmake +# Get version description. +# 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. +gitDescribe="$(git describe --tags --always)" + +# Get branch name. +# Will return empty if you checked out a commit or tag. Empty string handled later. +gitBranch="$(git symbolic-ref --short -q HEAD)" + +# Get commit hash. +gitCommit="$(git rev-parse --short --verify HEAD)" + +# Get commit date, YYYY-MM-DD. +gitCommitDate="$(git show -s --format=%cd --date=format:%Y-%m-%d)" + +# Get number of commits since tagging. This is what gitDescribe uses. +# Works when checking out branch, tag or commit. +gitCommitsSinceTag="$(git rev-list --count HEAD --not $(git tag --merged HEAD))" + +# Get number of commits since branching. +# Works when checking out branch, tag or commit. +gitCommitsSinceBranch="$(git rev-list --count HEAD --not --tags)" + +if [[ -z $gitDescribe ]]; then + printf '%s\n' "Failed finding commit description, aborting." + exit 1 +fi +if [[ -z $gitBranch ]]; then + printf '%s\n' "No branch found. Using commit description as branch name." + gitBranch="$gitDescribe" +fi +if [[ -z $gitCommit ]]; then + printf '%s\n' "Failed finding commit hash, aborting." + exit 1 +fi +if [[ -z $gitCommitDate ]]; then + printf '%s\n' "Failed finding commit date, aborting." + exit 1 +fi + +# 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. +# Strip everything after hyphen, e.g. "5.0-gtk2" -> "5.0", "5.1-rc1" -> "5.1" (ergo BS). +if [[ -z $gitCommitsSinceTag ]]; then + gitVersionNumericBS="0.0.0" +else + gitVersionNumericBS="${gitDescribe%%-*}" # Remove everything after first hyphen. + gitVersionNumericBS="${gitVersionNumericBS}.${gitCommitsSinceTag}" # Remove everything until after first hyphen: 5.0 +fi + +cat < ReleaseInfo.cmake +set(GIT_DESCRIBE $gitDescribe) +set(GIT_BRANCH $gitBranch) +set(GIT_COMMIT $gitCommit) +set(GIT_COMMIT_DATE $gitCommitDate) +set(GIT_COMMITS_SINCE_TAG $gitCommitsSinceTag) +set(GIT_COMMITS_SINCE_BRANCH $gitCommitsSinceBranch) +set(GIT_VERSION_NUMERIC_BS $gitVersionNumericBS) +EOF + +printf '%s\n' "Git checkout information:" \ + " Commit description: ${gitDescribe}" \ + " Branch: ${gitBranch}" \ + " Commit: ${gitCommit}" \ + " Commit date: ${gitCommitDate}" \ + " Commits since tag: ${gitCommitsSinceTag}" \ + " Commits since branch: ${gitCommitsSinceBranch}" \ + " Version (unreliable): ${gitVersionNumericBS}" \ + "" diff --git a/tools/generateSourceTarball b/tools/generateSourceTarball index 98173c00f..022e5646d 100755 --- a/tools/generateSourceTarball +++ b/tools/generateSourceTarball @@ -1,17 +1,24 @@ #!/usr/bin/env bash +# Run from the root of the cloned repository. +# This script is used to generate a source code tarball which includes commit +# metadata so that RawTherapee can be compiled without needing to install git. +# It is meant to be used every time a release is made after creating an +# annotated tag in git. +# It is your job to checkout the tag before running this script. -if [[ ! "$1" ]]; then - printf "%s\n" "Usage: $0 " "Example: $0 4.2" - exit +./tools/generateReleaseInfo +ret=$? +if [[ $ret -ne 0 ]]; then + printf '%s\n' "Something went wrong while running tools/generateReleaseInfo" "Aborting." + exit 1 fi +desc="$(grep GIT_DESCRIBE ReleaseInfo.cmake)" # Gets whole string: set(GIT_DESCRIBE 5.0-gtk2-1-g96bf9129) +desc="${desc#*GIT_DESCRIBE }" # Removes front: 5.0-gtk2-1-g96bf9129) +desc="${desc%)}" # Removes back: 5.0-gtk2-1-g96bf9129 -git checkout "$1" || exit 0 -tools/generateReleaseInfo -mkdir rawtherapee-"$1" -mv ReleaseInfo.cmake rawtherapee-"$1" -#hg archive -X ".hg*" -X "rtgui/config.h" -X "rtgui/version.h" -X "rtdata/rawtherapee.desktop" rawtherapee-"$1".tar -git archive --format=tar "$1" > rawtherapee-"$1".tar -tar --append --file=rawtherapee-"$1".tar rawtherapee-"$1"/ReleaseInfo.cmake -xz -z -9e rawtherapee-"$1".tar -rm -r rawtherapee-"$1" -git checkout +mkdir "rawtherapee-${desc}" || exit 1 +mv ReleaseInfo.cmake "rawtherapee-${desc}" || exit 1 +git archive --format=tar --prefix="rawtherapee-${desc}/" -o "rawtherapee-${desc}.tar" HEAD || exit 1 +tar --append --file="rawtherapee-${desc}.tar" "rawtherapee-${desc}/ReleaseInfo.cmake" || exit 1 +xz -z -9e "rawtherapee-${desc}.tar" || exit 1 +rm -r "rawtherapee-${desc}" diff --git a/tools/generateThemeSVG2PNG b/tools/generateThemeSVG2PNG new file mode 100755 index 000000000..bd192e16f --- /dev/null +++ b/tools/generateThemeSVG2PNG @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# Generates PNG icons from SVG theme images. +# Run this script from the rtdata/theme/images folder: +# cd ~/repo-rt/rtdata/theme/images +# ~/repo-rt/tools/generateThemeSvg2Png + +for d in svg/*; do + themeDir="${d#*/}" + if [[ ! -d "${themeDir}" ]]; then + mkdir "${themeDir}" + fi + for i in "svg/${themeDir}/"*.svg; do + iconName="${i##*/}" + iconName="${iconName%.*}" + printf '%s\n' "" "Converting: svg/${themeDir}/${iconName}.svg" + inkscape --file="svg/${themeDir}/${iconName}.svg" --export-png="${themeDir}/${iconName}.png" --export-area-page --without-gui + done +done diff --git a/tools/gimp-plugin/file-formats.h b/tools/gimp-plugin/file-formats.h new file mode 100644 index 000000000..fc6697ec7 --- /dev/null +++ b/tools/gimp-plugin/file-formats.h @@ -0,0 +1,313 @@ +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * file-rawtherapee.c -- raw file format plug-in that uses rawtherapee + * Copyright (C) 2016 Tobias Ellinghaus + * Copyright (C) 2017 Alberto Griggio + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* These are the raw formats that file-rawtherapee will register */ + +typedef struct _FileFormat FileFormat; + +struct _FileFormat +{ + const gchar *file_type; + const gchar *mime_type; + const gchar *extensions; + const gchar *magic; + + const gchar *load_proc; + const gchar *load_blurb; + const gchar *load_help; +}; + +static const FileFormat file_formats[] = +{ + { + N_("Raw Canon"), + "image/x-canon-cr2,image/x-canon-crw", + "cr2,crw", + NULL, + + "file-rawtherapee-canon-load", + "Load files in the Canon raw formats via rawtherapee", + "This plug-in loads files in Canon's raw formats by calling rawtherapee." + }, + + { + N_("Raw Nikon"), + "image/x-nikon-nef,image/x-nikon-nrw", + "nef,nrw", + NULL, + + "file-rawtherapee-nikon-load", + "Load files in the Nikon raw formats via rawtherapee", + "This plug-in loads files in Nikon's raw formats by calling rawtherapee." + }, + + { + N_("Raw Hasselblad"), + "image/x-hasselblad-3fr,image/x-hasselblad-fff", + "3fr,fff", + NULL, + + "file-rawtherapee-hasselblad-load", + "Load files in the Hasselblad raw formats via rawtherapee", + "This plug-in loads files in Hasselblad's raw formats by calling rawtherapee." + }, + + { + N_("Raw Sony"), + "image/x-sony-arw,image/x-sony-srf,image/x-sony-sr2", + "arw,srf,sr2", + NULL, + + "file-rawtherapee-sony-load", + "Load files in the Sony raw formats via rawtherapee", + "This plug-in loads files in Sony's raw formats by calling rawtherapee." + }, + + { + N_("Raw Casio BAY"), + "image/x-casio-bay", + "bay", + NULL, + + "file-rawtherapee-bay-load", + "Load files in the BAY raw format via rawtherapee", + "This plug-in loads files in Casio's raw BAY format by calling rawtherapee." + }, + + { + N_("Raw Phantom Software CINE"), + "", /* FIXME: find a mime type */ + "cine,cin", + NULL, + + "file-rawtherapee-cine-load", + "Load files in the CINE raw format via rawtherapee", + "This plug-in loads files in Phantom Software's raw CINE format by calling rawtherapee." + }, + + { + N_("Raw Sinar"), + "", /* FIXME: find a mime type */ + "cs1,ia,sti", + NULL, + + "file-rawtherapee-sinar-load", + "Load files in the Sinar raw formats via rawtherapee", + "This plug-in loads files in Sinar's raw formats by calling rawtherapee." + }, + + { + N_("Raw Kodak"), + "image/x-kodak-dc2,image/x-kodak-dcr,image/x-kodak-kdc,image/x-kodak-k25,image/x-kodak-kc2", + "dc2,dcr,kdc,k25,kc2", + NULL, + + "file-rawtherapee-kodak-load", + "Load files in the Kodak raw formats via rawtherapee", + "This plug-in loads files in Kodak's raw formats by calling rawtherapee." + }, + + { + N_("Raw Adobe DNG Digital Negative"), + "image/x-adobe-dng", + "dng", + NULL, + + "file-rawtherapee-dng-load", + "Load files in the DNG raw format via rawtherapee", + "This plug-in loads files in the Adobe Digital Negative DNG format by calling rawtherapee." + }, + + { + N_("Raw Epson ERF"), + "image/x-epson-erf", + "erf", + NULL, + + "file-rawtherapee-erf-load", + "Load files in the ERF raw format via rawtherapee", + "This plug-in loads files in Epson's raw ERF format by calling rawtherapee." + }, + + { + N_("Raw Phase One"), + "image/x-phaseone-cap,image/x-phaseone-iiq", + "cap,iiq", + NULL, + + "file-rawtherapee-phaseone-load", + "Load files in the Phase One raw formats via rawtherapee", + "This plug-in loads files in Phase One's raw formats by calling rawtherapee." + }, + + { + N_("Raw Minolta"), + "image/x-minolta-mdc,image/x-minolta-mrw", + "mdc,mrw", + NULL, + + "file-rawtherapee-minolta-load", + "Load files in the Minolta raw formats via rawtherapee", + "This plug-in loads files in Minolta's raw formats by calling rawtherapee." + }, + + { + N_("Raw Mamiya MEF"), + "image/x-mamiya-mef", + "mef", NULL, + + "file-rawtherapee-mef-load", + "Load files in the MEF raw format via rawtherapee", + "This plug-in loads files in Mamiya's raw MEF format by calling rawtherapee." + }, + + { + N_("Raw Leaf MOS"), + "image/x-leaf-mos", + "mos", + NULL, + + "file-rawtherapee-mos-load", + "Load files in the MOS raw format via rawtherapee", + "This plug-in loads files in Leaf's raw MOS format by calling rawtherapee." + }, + + { + N_("Raw Olympus ORF"), + "image/x-olympus-orf", + "orf", + NULL, + + "file-rawtherapee-orf-load", + "Load files in the ORF raw format via rawtherapee", + "This plug-in loads files in Olympus' raw ORF format by calling rawtherapee." + }, + + { + N_("Raw Pentax PEF"), + "image/x-pentax-pef,image/x-pentax-raw", + "pef,raw", + NULL, + + "file-rawtherapee-pef-load", + "Load files in the PEF raw format via rawtherapee", + "This plug-in loads files in Pentax' raw PEF format by calling rawtherapee." + }, + + { + N_("Raw Logitech PXN"), + "image/x-pxn", /* FIXME: is that the correct mime type? */ + "pxn", + NULL, + + "file-rawtherapee-pxn-load", + "Load files in the PXN raw format via rawtherapee", + "This plug-in loads files in Logitech's raw PXN format by calling rawtherapee." + }, + + { + N_("Raw Apple QuickTake QTK"), + "", /* FIXME: find a mime type */ + "qtk", + NULL, + + "file-rawtherapee-qtk-load", + "Load files in the QTK raw format via rawtherapee", + "This plug-in loads files in Apple's QuickTake QTK raw format by calling rawtherapee." + }, + + { + N_("Raw Fujifilm RAF"), + "image/x-fuji-raf", + "raf", + NULL, + + "file-rawtherapee-raf-load", + "Load files in the RAF raw format via rawtherapee", + "This plug-in loads files in Fujifilm's raw RAF format by calling rawtherapee." + }, + + { + N_("Raw Panasonic"), + "image/x-panasonic-raw,image/x-panasonic-rw2", + "raw,rw2", + NULL, + + "file-rawtherapee-panasonic-load", + "Load files in the Panasonic raw formats via rawtherapee", + "This plug-in loads files in Panasonic's raw formats by calling rawtherapee." + }, + + { + N_("Raw Digital Foto Maker RDC"), + "", /* FIXME: find a mime type */ + "rdc", + NULL, + + "file-rawtherapee-rdc-load", + "Load files in the RDC raw format via rawtherapee", + "This plug-in loads files in Digital Foto Maker's raw RDC format by calling rawtherapee." + }, + + { + N_("Raw Leica RWL"), + "image/x-leica-rwl", + "rwl", + NULL, + + "file-rawtherapee-rwl-load", + "Load files in the RWL raw format via rawtherapee", + "This plug-in loads files in Leica's raw RWL format by calling rawtherapee." + }, + + { + N_("Raw Samsung SRW"), + "image/x-samsung-srw", + "srw", + NULL, + + "file-rawtherapee-srw-load", + "Load files in the SRW raw format via rawtherapee", + "This plug-in loads files in Samsung's raw SRW format by calling rawtherapee." + }, + + { + N_("Raw Sigma X3F"), + "image/x-sigma-x3f", + "x3f", + NULL, + + "file-rawtherapee-x3f-load", + "Load files in the X3F raw format via rawtherapee", + "This plug-in loads files in Sigma's raw X3F format by calling rawtherapee." + }, + + { + N_("Raw Arriflex ARI"), + "", + "ari", + NULL, + + "file-rawtherapee-ari-load", + "Load files in the ARI raw format via rawtherapee", + "This plug-in loads files in Arriflex' raw ARI format by calling rawtherapee." + } +}; diff --git a/tools/gimp-plugin/file-rawtherapee.c b/tools/gimp-plugin/file-rawtherapee.c new file mode 100644 index 000000000..d78c30a10 --- /dev/null +++ b/tools/gimp-plugin/file-rawtherapee.c @@ -0,0 +1,431 @@ +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis + * + * file-rawtherapee.c -- raw file format plug-in that uses RawTherapee + * Copyright (C) 2012 Simon Budig + * Copyright (C) 2016 Tobias Ellinghaus + * Copyright (C) 2017 Alberto Griggio + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "config.h" + +#include +#include + +#include + +#include + +#include "libgimp/stdplugins-intl.h" + +#include "file-formats.h" + + +#define LOAD_THUMB_PROC "file-rawtherapee-load-thumb" + + +static void init (void); +static void query (void); +static void run (const gchar *name, + gint nparams, + const GimpParam *param, + gint *nreturn_vals, + GimpParam **return_vals); +static gint32 load_image (const gchar *filename, + GimpRunMode run_mode, + GError **error); + +static gint32 load_thumbnail_image (const gchar *filename, + gint thumb_size, + GError **error); + +const GimpPlugInInfo PLUG_IN_INFO = +{ + init, /* init_proc */ + NULL, /* quit_proc */ + query, /* query proc */ + run, /* run_proc */ +}; + +MAIN () + + +static void +init (void) +{ + static const GimpParamDef load_args[] = + { + { GIMP_PDB_INT32, "run-mode", "The run mode { RUN-INTERACTIVE (0), RUN-NONINTERACTIVE (1) }" }, + { GIMP_PDB_STRING, "filename", "The name of the file to load." }, + { GIMP_PDB_STRING, "raw-filename", "The name entered" }, + }; + + static const GimpParamDef load_return_vals[] = + { + { GIMP_PDB_IMAGE, "image", "Output image" } + }; + + static const GimpParamDef thumb_args[] = + { + { GIMP_PDB_STRING, "filename", "The name of the file to load" }, + { GIMP_PDB_INT32, "thumb-size", "Preferred thumbnail size" } + }; + + static const GimpParamDef thumb_return_vals[] = + { + { GIMP_PDB_IMAGE, "image", "Thumbnail image" } + }; + + /* check if rawtherapee is installed + * TODO: allow setting the location of the executable in preferences + */ + gchar *argv[] = { "rawtherapee", "-v", NULL }; + gchar *rawtherapee_stdout = NULL; + gboolean have_rawtherapee = FALSE; + gint i; + + if (g_spawn_sync (NULL, + argv, + NULL, + G_SPAWN_STDERR_TO_DEV_NULL | + G_SPAWN_SEARCH_PATH, + NULL, + NULL, + &rawtherapee_stdout, + NULL, + NULL, + NULL)) + { + int rtmajor = 0, rtminor = 0; + + if (sscanf (rawtherapee_stdout, + "RawTherapee, version %d.%d", + &rtmajor, &rtminor) == 2 && rtmajor >= 5 && rtminor >= 2) + { + have_rawtherapee = TRUE; + } + + g_free (rawtherapee_stdout); + } + + if (! have_rawtherapee) + return; + + gimp_install_procedure (LOAD_THUMB_PROC, + "Load thumbnail from a raw image via rawtherapee", + "This plug-in loads a thumbnail from a raw image by calling rawtherapee-cli.", + "Alberto Griggio", + "Alberto Griggio", + "2017", + NULL, + NULL, + GIMP_PLUGIN, + G_N_ELEMENTS (thumb_args), + G_N_ELEMENTS (thumb_return_vals), + thumb_args, thumb_return_vals); + + for (i = 0; i < G_N_ELEMENTS (file_formats); i++) + { + const FileFormat *format = &file_formats[i]; + + gimp_install_procedure (format->load_proc, + format->load_blurb, + format->load_help, + "Alberto Griggio", + "Alberto Griggio", + "2017", + format->file_type, + NULL, + GIMP_PLUGIN, + G_N_ELEMENTS (load_args), + G_N_ELEMENTS (load_return_vals), + load_args, load_return_vals); + + gimp_register_file_handler_mime (format->load_proc, + format->mime_type); + gimp_register_file_handler_raw (format->load_proc); + gimp_register_magic_load_handler (format->load_proc, + format->extensions, + "", + format->magic); + + gimp_register_thumbnail_loader (format->load_proc, LOAD_THUMB_PROC); + } +} + +static void +query (void) +{ + /* query() is run only the first time for efficiency. Yet this plugin + * is dependent on the presence of rawtherapee which may be installed + * or uninstalled between GIMP startups. Therefore we should move the + * usual gimp_install_procedure() to init() so that the check is done + * at every startup instead. + */ +} + +static void +run (const gchar *name, + gint nparams, + const GimpParam *param, + gint *nreturn_vals, + GimpParam **return_vals) +{ + static GimpParam values[6]; + GimpPDBStatusType status = GIMP_PDB_SUCCESS; + GimpRunMode run_mode; + gint image_ID; + GError *error = NULL; + gint i; + + INIT_I18N (); + + run_mode = param[0].data.d_int32; + + *nreturn_vals = 1; + *return_vals = values; + + values[0].type = GIMP_PDB_STATUS; + values[0].data.d_status = GIMP_PDB_EXECUTION_ERROR; + + /* check if the format passed is actually supported & load */ + for (i = 0; i < G_N_ELEMENTS (file_formats); i++) + { + const FileFormat *format = &file_formats[i]; + + if (format->load_proc && ! strcmp (name, format->load_proc)) + { + image_ID = load_image (param[1].data.d_string, run_mode, &error); + + if (image_ID != -1) + { + *nreturn_vals = 2; + values[1].type = GIMP_PDB_IMAGE; + values[1].data.d_image = image_ID; + } + else + { + status = GIMP_PDB_EXECUTION_ERROR; + } + + break; + } + else if (! strcmp (name, LOAD_THUMB_PROC)) + { + image_ID = load_thumbnail_image (param[0].data.d_string, + param[1].data.d_int32, + &error); + + if (image_ID != -1) + { + *nreturn_vals = 4; + values[1].type = GIMP_PDB_IMAGE; + values[1].data.d_image = image_ID; + values[4].type = GIMP_PDB_INT32; + values[4].data.d_int32 = GIMP_RGB_IMAGE; + values[5].type = GIMP_PDB_INT32; + values[5].data.d_int32 = 1; /* num_layers */ + } + else + { + status = GIMP_PDB_EXECUTION_ERROR; + } + + break; + } + } + + if (i == G_N_ELEMENTS (file_formats)) + status = GIMP_PDB_CALLING_ERROR; + + if (status != GIMP_PDB_SUCCESS && error) + { + *nreturn_vals = 2; + values[1].type = GIMP_PDB_STRING; + values[1].data.d_string = error->message; + } + + values[0].data.d_status = status; +} + +static gint32 +load_image (const gchar *filename, + GimpRunMode run_mode, + GError **error) +{ + gint32 image_ID = -1; + gchar *filename_out = gimp_temp_name ("tif"); + + gchar *rawtherapee_stdout = NULL; + + /* linear sRGB for now as GIMP uses that internally in many places anyway */ + gchar *argv[] = + { + "rawtherapee", + "-gimp", + (gchar *) filename, + filename_out, + NULL + }; + + gimp_progress_init_printf (_("Opening '%s'"), + gimp_filename_to_utf8 (filename)); + + if (g_spawn_sync (NULL, + argv, + NULL, + /*G_SPAWN_STDOUT_TO_DEV_NULL |*/ + G_SPAWN_STDERR_TO_DEV_NULL | + G_SPAWN_SEARCH_PATH, + NULL, + NULL, + &rawtherapee_stdout, + NULL, + NULL, + error)) + { + image_ID = gimp_file_load (run_mode, filename_out, filename_out); + if (image_ID != -1) + gimp_image_set_filename (image_ID, filename); + } + + /*if (rawtherapee_stdout) printf ("%s\n", rawtherapee_stdout);*/ + g_free (rawtherapee_stdout); + + g_unlink (filename_out); + g_free (filename_out); + + gimp_progress_update (1.0); + + return image_ID; +} + +static gint32 +load_thumbnail_image (const gchar *filename, + gint thumb_size, + GError **error) +{ + gint32 image_ID = -1; + gchar *filename_out = gimp_temp_name ("jpg"); + gchar *thumb_pp3 = gimp_temp_name ("pp3"); + FILE *thumb_pp3_f = fopen (thumb_pp3, "w"); + gchar *rawtherapee_stdout = NULL; + const char *pp3_content = + "[Version]\n" + "AppVersion=5.0\n" + "Version=326\n" + "\n" + "[Resize]\n" + "Enabled=true\n" + "AppliesTo=Cropped area\n" + "Method=Lanczos\n" + "Width=%d\n" + "Height=%d\n" + "\n" + "[Sharpening]\n" + "Enabled=false\n" + "\n" + "[SharpenEdge]\n" + "Enabled=false\n" + "\n" + "[SharpenMicro]\n" + "Enabled=false\n" + "\n" + "[Defringing]\n" + "Enabled=false\n" + "\n" + "[Directional Pyramid Equalizer]\n" + "Enabled=false\n" + "\n" + "[PostResizeSharpening]\n" + "Enabled=false\n" + "\n" + "[Directional Pyramid Denoising]\n" + "Enabled=false\n" + "\n" + "[Impulse Denoising]\n" + "Enabled=false\n" + "\n" + "[Wavelet]\n" + "Enabled=false\n" + "\n" + "[RAW Bayer]\n" + "Method=fast\n" + "\n" + "[RAW X-Trans]\n" + "Method=fast\n"; + + + gchar *argv[] = + { + "rawtherapee-cli", + "-o", filename_out, + "-d", + "-s", + "-j", + "-p", thumb_pp3, + "-f", + "-c", (char *) filename, + NULL + }; + + if (thumb_pp3_f) { + if (fprintf (thumb_pp3_f, pp3_content, thumb_size, thumb_size) < 0) { + fclose (thumb_pp3_f); + thumb_pp3_f = NULL; + } + } + + gimp_progress_init_printf (_("Opening thumbnail for '%s'"), + gimp_filename_to_utf8 (filename)); + + if (thumb_pp3_f && + g_spawn_sync (NULL, + argv, + NULL, + G_SPAWN_STDERR_TO_DEV_NULL | + G_SPAWN_SEARCH_PATH, + NULL, + NULL, + &rawtherapee_stdout, + NULL, + NULL, + error)) + { + gimp_progress_update (0.5); + + image_ID = gimp_file_load (GIMP_RUN_NONINTERACTIVE, + filename_out, + filename_out); + if (image_ID != -1) + { + /* is this needed for thumbnails? */ + gimp_image_set_filename (image_ID, filename); + } + } + + gimp_progress_update (1.0); + + if (thumb_pp3_f) { + fclose (thumb_pp3_f); + } + g_unlink (thumb_pp3); + g_free (filename_out); + g_free (thumb_pp3); + g_free (rawtherapee_stdout); + + return image_ID; +} diff --git a/tools/osx/Info.plist.in b/tools/osx/Info.plist.in index 5b08d63a1..e78db0cc4 100644 --- a/tools/osx/Info.plist.in +++ b/tools/osx/Info.plist.in @@ -111,7 +111,7 @@ CFBundleExecutable rawtherapee CFBundleGetInfoString - @version@, Copyright © 2004-2010 Gábor Horváth, 2010-2016 RT dev team + @version@, Copyright © 2004-2010 Gábor Horváth, 2010-2017 RawTherapee Development Team CFBundleIconFile rawtherapee.icns CFBundleIdentifier @@ -127,7 +127,7 @@ CFBundleSignature ???? CFBundleVersion - @version@ + @shortVersion@ LSExecutableArchitectures @arch@ @@ -135,7 +135,7 @@ NSHighResolutionCapable NSHumanReadableCopyright - Copyright © 2004-2013 Gábor Horváth + Copyright © 2004-2010 Gábor Horváth, 2010-2017 RawTherapee Development Team UTExportedTypeDeclarations diff --git a/tools/osx/executable_loader.in b/tools/osx/executable_loader.in index 5f1911edb..c36695d9e 100644 --- a/tools/osx/executable_loader.in +++ b/tools/osx/executable_loader.in @@ -1,31 +1,51 @@ -#!/bin/bash +#!/usr/bin/env bash -cwd="$(cd "$(dirname "$0")"; pwd)" +cd "$(dirname "$0")" || exit 1 + +cwd="$(pwd)" app="${cwd%/Contents/*}" -etc="${cwd}"/etc +lib="${app}/Contents/Frameworks" +resources="${app}/Contents/Resources" +etc="${resources}"/etc -# for different os x versions -# see https://github.com/Beep6581/RawTherapee/issues/1779 -cups_dir=/tmp/RT4 -install -d ${cups_dir} -cp -f /usr/lib/libcups.2.dylib ${cups_dir} +### Pending deletion: +# See https://github.com/Beep6581/RawTherapee/issues/1779 +# cups_dir=/tmp/RT5 +# install -d "${cups_dir}" +# cp -f /usr/lib/libcups.2.dylib "${cups_dir}" +# export DYLD_LIBRARY_PATH="${lib}:${cups_dir}" -export DYLD_LIBRARY_PATH="${cwd}"/lib:${cups_dir} -export GTK_EXE_PREFIX="${cwd}" -export GTK_DATA_PREFIX="${cwd}" -export GTK_IM_MODULE_FILE="${etc}"/gtk-2.0/gtk.immodules -export GDK_PIXBUF_MODULE_FILE="${etc}"/gtk-2.0/gdk-pixbuf.loaders -export XDG_DATA_DIRS="${cwd}"/share -export PANGO_RC_FILE="${etc}"/pango/pangorc +# export GTK_EXE_PREFIX="${resources}" +# export GTK_DATA_PREFIX="${resources}" +export XDG_DATA_DIRS="${resources}/share" +# export GTK_IM_MODULE_FILE="${etc}/gtk-3.0/gtk.immodules" -# environment variables for X11 backend -if test -d "${etc}"/fonts; then - export FONTCONFIG_PATH="${etc}"/fonts -fi +export DYLD_LIBRARY_PATH="${lib}" -# strip out system argument -case $1 in -psn_*) shift;; esac +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}/gdk-pixbuf-2.0/2.10.0/loaders" -ln -sf "${app}" /tmp +export RT_SETTINGS="${HOME}/Library/Application Support/RawTherapee/config" +export RT_CACHE="${HOME}/Library/Application Support/RawTherapee/cache" -exec "${cwd}"/rawtherapee-bin "$@" +### Pending deletion: +# Environment variables for X11 backend +#if [[ -d ${etc}/fonts ]]; then +# export FONTCONFIG_PATH="${etc}/fonts" +#fi + +# Strip out system argument +case "$1" in + -psn_*) shift ;; +esac + +# Commented-out as part of "crash-on-startup part 2" fix, see https://github.com/Beep6581/RawTherapee/issues/3882#issuecomment-311703141 +#if [[ -d "/tmp/RawTherapee.app" ]]; then +# rm -rf "/tmp/RawTherapee.app" +#fi +#ln -sf "${app}" /tmp + +exec "${cwd}/rawtherapee-bin" "$@" diff --git a/tools/osx/libiconv_1.15_rt.patch b/tools/osx/libiconv_1.15_rt.patch new file mode 100644 index 000000000..ca434154b --- /dev/null +++ b/tools/osx/libiconv_1.15_rt.patch @@ -0,0 +1,30 @@ +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 diff --git a/tools/osx/macosx_bundle.sh b/tools/osx/macosx_bundle.sh index 2803396ba..40cfe195f 100644 --- a/tools/osx/macosx_bundle.sh +++ b/tools/osx/macosx_bundle.sh @@ -1,17 +1,26 @@ -#!/bin/bash +#!/usr/bin/env bash -# Required variables -# ------------------ -# these are very important variables. Must be set into rtdata/CMakeLists.txt! +# Required variables, must be set in rtdata/CMakeLists.txt # - PROJECT_NAME -# - PROJECT_SOURCE_DIR # - PROJECT_VERSION (if without git) +# - PROJECT_SOURCE_DIR # - CMAKE_BUILD_TYPE # - PROC_BIT_DEPTH # - GTK_PREFIX -function message { - printf '\e[34m-- %s\e[m\n' "$*" +# Formatting +fNormal="$(tput sgr0)" +fBold="$(tput bold)" +# Colors depend upon the user's terminal emulator color scheme - what is readable for you may be not readable for someone else. +fMagenta="$(tput setaf 5)" +fRed="$(tput setaf 1)" + +function msg { + printf "\\n${fBold}-- %s${fNormal}\\n" "${@}" +} + +function msgError { + printf "\\n${fBold}Error:${fNormal}\\n%s\\n" "${@}" } function GetDependencies { @@ -19,47 +28,54 @@ function GetDependencies { } function CheckLink { - GetDependencies "$1" | while read; do + GetDependencies "$1" | while read -r; do local dest="${LIB}/$(basename "${REPLY}")" - test -f "${dest}" || { ditto --arch ${arch} "${REPLY}" "${dest}"; CheckLink "${dest}"; } + test -f "${dest}" || { ditto --arch "${arch}" "${REPLY}" "${dest}"; CheckLink "${dest}"; } done } -# source check -if test ! -d "${CMAKE_BUILD_TYPE}"; then - printf "\e[31m${PWD}/${CMAKE_BUILD_TYPE} directory is not found. Please execute 'make install' first.\e[m\n" +# Source check +if [[ ! -d "${CMAKE_BUILD_TYPE}" ]]; then + msgError "${PWD}/${CMAKE_BUILD_TYPE} folder does not exist. Please execute 'make install' first." exit 1 fi -# update project version -if test -x "$(which git)" -a -d "${PROJECT_SOURCE_DIR}/.git"; then - # This is what the version ought to look like to be accurate in the git universe: - PROJECT_FULL_VERSION="$(git describe --tags --always | sed 's/-g.*//')_$(git symbolic-ref --short -q HEAD)" - # outputs: 4.2-677-g904467b_master - # but Apple requirements https://goo.gl/eWDQv6 state we should use this: - PROJECT_VERSION="$(git describe --tags --always | sed -e 's/-g.*//' -e 's/-/./')" - # outputs: 4.2.677 +# Update project version +if [[ -x "$(which git)" && -d "${PROJECT_SOURCE_DIR}/.git" ]]; then + ### This section is copied from tools/generateReleaseInfo + # Get version description. + # 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. + gitDescribe="$(git describe --tags --always)" + + # Apple requires a numeric version of the form n.n.n + # https://goo.gl/eWDQv6 + + # Get number of commits since tagging. This is what gitDescribe uses. + # Works when checking out branch, tag or commit. + gitCommitsSinceTag="$(git rev-list --count HEAD --not $(git tag --merged HEAD))" + + # 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. + # Strip everything after hyphen, e.g. "5.0-gtk2" -> "5.0", "5.1-rc1" -> "5.1" (ergo BS). + if [[ -z $gitCommitsSinceTag ]]; then + gitVersionNumericBS="0.0.0" + else + gitVersionNumericBS="${gitDescribe%%-*}" # Remove everything after first hyphen. + gitVersionNumericBS="${gitVersionNumericBS}.${gitCommitsSinceTag}" # Remove everything until after first hyphen: 5.0 + fi + ### Copy end. + + PROJECT_FULL_VERSION="$gitDescribe" + PROJECT_VERSION="$gitVersionNumericBS" + fi -# if not specify CMAKE_OSX_DEPLOYMENT_TARGET when compiling, -# 'MINIMUM_VERSION' will be used host OS X version. -MINIMUM_SYSTEM_VERSION="$(otool -l "${CMAKE_BUILD_TYPE}"/rawtherapee | grep -A2 'LC_VERSION_MIN_MACOSX' | awk '$1 ~ /version/ { printf $2 }')" -if test ! -n "${MINIMUM_SYSTEM_VERSION}"; then +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 MINIMUM_SYSTEM_VERSION="$(sw_vers -productVersion | cut -d. -f-2)" fi -# check for pango-querymodules. Pango 1.38.0 and above do not include it. -# https://github.com/Homebrew/homebrew/issues/44764#issuecomment-146795820 -PangoVer="$(brew list --versions pango)" -PangoVer="${PangoVer//./}" -# Only check the first 4 digits, so that "1.36.99" (13699) doesn't test greater than "1.38.0" (1380) -PangoVer="${PangoVer:0:4}" -if [[ "$PangoVer" -ge "1380" ]]; then - ExistPangoQuerymodules="false" -else - ExistPangoQuerymodules="true" -fi - case ${PROC_BIT_DEPTH} in 64) arch=x86_64;; 32) arch=i386;; @@ -76,127 +92,135 @@ GTK_PREFIX: ${GTK_PREFIX} PWD: ${PWD} __EOS__ -APP="${PROJECT_NAME}".app -CONTENTS="${APP}"/Contents -RESOURCES="${CONTENTS}"/Resources -MACOS="${CONTENTS}"/MacOS -LIB="${MACOS}"/lib -ETC="${MACOS}"/etc -EXECUTABLE="${MACOS}"/rawtherapee +APP="${PROJECT_NAME}.app" +CONTENTS="${APP}/Contents" +RESOURCES="${CONTENTS}/Resources" +MACOS="${CONTENTS}/MacOS" +LIB="${CONTENTS}/Frameworks" +ETC="${RESOURCES}/etc" +EXECUTABLE="${MACOS}/rawtherapee" -message "Removing old files" -rm -rf "${APP}" ${PROJECT_NAME}_*.dmg +msg "Removing old files:" +rm -rf "${APP}" "${PROJECT_NAME}_*.dmg" -message "Creating bundle container" +msg "Creating bundle container:" install -d "${RESOURCES}" \ -"${MACOS}" \ -"${LIB}" \ -"${ETC}" + "${MACOS}" \ + "${LIB}" \ + "${ETC}" -message "Copying release files" -ditto "${CMAKE_BUILD_TYPE}" "${MACOS}" +msg "Copying release files:" +ditto "${CMAKE_BUILD_TYPE}/MacOS" "${MACOS}" +ditto "${CMAKE_BUILD_TYPE}/Resources" "${RESOURCES}" -message "Copying dependencies from ${GTK_PREFIX}" +msg "Copying dependencies from ${GTK_PREFIX}:" CheckLink "${EXECUTABLE}" -message "Copying library modules from ${GTK_PREFIX}" -ditto --arch "${arch}" {"${GTK_PREFIX}"/lib,"${LIB}"}/gdk-pixbuf-2.0 -ditto --arch "${arch}" {"${GTK_PREFIX}"/lib,"${LIB}"}/gtk-2.0 -ditto --arch "${arch}" {"${GTK_PREFIX}"/lib,"${LIB}"}/pango +msg "Copying library modules from ${GTK_PREFIX}:" +ditto --arch "${arch}" {"${GTK_PREFIX}/lib","${LIB}"}/gdk-pixbuf-2.0 +ditto --arch "${arch}" {"${GTK_PREFIX}/lib","${LIB}"}/gtk-3.0 -message "Removing static libraries and cache files" -find -E "${LIB}" -type f -regex '.*\.(a|la|cache)$' | while read; do rm "${REPLY}"; done +msg "Removing static libraries and cache files:" +find -E "${LIB}" -type f -regex '.*\.(a|la|cache)$' | while read -r; do rm "${REPLY}"; done -message "Copying configuration files from ${GTK_PREFIX}" -install -d "${ETC}"/{gtk-2.0,pango} -cp "${GTK_PREFIX}"/etc/gtk-2.0/im-multipress.conf "${ETC}"/gtk-2.0 -"${GTK_PREFIX}"/bin/gdk-pixbuf-query-loaders "${LIB}"/gdk-pixbuf-2.0/*/loaders/*.so > "${ETC}"/gtk-2.0/gdk-pixbuf.loaders -"${GTK_PREFIX}"/bin/gtk-query-immodules-2.0 "${LIB}"/gtk-2.0/*/immodules/*.so > "${ETC}"/gtk-2.0/gtk.immodules -sed -i "" -e "s|${PWD}|/tmp|" "${ETC}"/gtk-2.0/gdk-pixbuf.loaders \ -"${ETC}"/gtk-2.0/gtk.immodules -if [[ "$ExistPangoQuerymodules" = "true" ]]; then - "${GTK_PREFIX}"/bin/pango-querymodules "${LIB}"/pango/*/modules/*.so > "${ETC}"/pango/pango.modules - sed -i "" -e "s|${PWD}|/tmp|" "${ETC}"/pango/pango.modules - printf "[Pango]\nModuleFiles = /tmp/${ETC}/pango/pango.modules" > "${ETC}"/pango/pangorc -fi +msg "Copying configuration files from ${GTK_PREFIX}:" +install -d "${ETC}/gtk-3.0" +cp "${GTK_PREFIX}/etc/gtk-3.0/im-multipress.conf" "${ETC}/gtk-3.0" +"${GTK_PREFIX}/bin/gdk-pixbuf-query-loaders" "${LIB}"/gdk-pixbuf-2.0/*/loaders/*.so > "${ETC}/gtk-3.0/gdk-pixbuf.loaders" +"${GTK_PREFIX}/bin/gtk-query-immodules-3.0" "${LIB}"/gtk-3.0/*/immodules/*.so > "${ETC}/gtk-3.0/gtk.immodules" +#sed -i "" -e "s|${PWD}|/tmp|" "${ETC}/gtk-3.0/gdk-pixbuf.loaders" "${ETC}/gtk-3.0/gtk.immodules" +sed -i "" -e "s|${PWD}/RawTherapee.app/Contents/|@executable_path/../|" "${ETC}/gtk-3.0/gdk-pixbuf.loaders" "${ETC}/gtk-3.0/gtk.immodules" -message "Copying shared files from ${GTK_PREFIX}" -cp -R "${GTK_PREFIX}"/share/mime "${MACOS}"/share -# gtk themes -ditto {"${GTK_PREFIX}","${MACOS}"}/share/themes/Mac/gtk-2.0-key/gtkrc -ditto {"${GTK_PREFIX}","${MACOS}"}/share/themes/Clearlooks/gtk-2.0/gtkrc -install -d "${MACOS}"/share/themes/Raleigh/gtk-2.0 -(cd "${MACOS}"/share/themes/Raleigh/gtk-2.0 && ln -s ../../Clearlooks/gtk-2.0/gtkrc) +ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/glib-2.0/schemas +"${GTK_PREFIX}/bin/glib-compile-schemas" "${RESOURCES}/share/glib-2.0/schemas" + +msg "Copying shared files from ${GTK_PREFIX}:" +ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/mime +# GTK3 themes +ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/themes/Mac/gtk-3.0/gtk-keys.css +ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/themes/Default/gtk-3.0/gtk-keys.css +# Adwaita icons +iconfolders=("16x16/actions" "16x16/devices" "16x16/mimetypes" "16x16/places" "16x16/status" "48x48/devices") +for f in "${iconfolders[@]}"; do + ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/icons/Adwaita/"$f" +done +ditto {"${GTK_PREFIX}","${RESOURCES}"}/share/icons/Adwaita/index.theme +"${GTK_PREFIX}/bin/gtk-update-icon-cache-3.0" "${RESOURCES}/share/icons/Adwaita" + +### Pending deletion: # fontconfig files (X11 backend only) -if otool -L "${EXECUTABLE}" | grep -sq 'libgtk-x11-2.0'; then - message "Installing fontconfig files (Your library is X11 backend. 'FONTCONFIG_PATH' will be set by executable loader.)" - cp -RL "${GTK_PREFIX}"/etc/fonts "${ETC}" -fi +# if otool -L "${EXECUTABLE}" | grep -sq 'libgtk-x11-2.0'; then +# msg "Installing fontconfig files (Using X11 backend. FONTCONFIG_PATH will be set by executable loader.)" +# cp -RL "${GTK_PREFIX}/etc/fonts" "${ETC}" +# fi - - -# install names -find -E "${MACOS}" -type f -regex '.*/(rawtherapee|.*\.(dylib|so))' | while read x; do - message "Modifying install names: ${x}" +# 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 y; do - echo " install_name_tool -change '${y}' '@rpath/$(basename "${y}")' '${x}'" - done -} | bash -v + 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 -message "Registering @loader_path into the executable" -echo " install_name_tool -add_rpath @loader_path/lib '${EXECUTABLE}'" | bash -v +msg "Registering @loader_path into the executable:" +echo " install_name_tool -add_rpath @loader_path/../Frameworks '${EXECUTABLE}'" | bash -v +echo " install_name_tool -add_rpath @loader_path/../Frameworks '${EXECUTABLE}-cli'" | bash -v +msg "Installing required application bundle files:" +PROJECT_SOURCE_DATA_DIR="${PROJECT_SOURCE_DIR}/tools/osx" - -message "Installing required application bundle files" -PROJECT_SOURCE_DATA_DIR="${PROJECT_SOURCE_DIR}"/tools/osx -# executable loader -# note: executable is renamed to 'rawtherapee-bin'. -mv "${MACOS}"/rawtherapee{,-bin} -install -m 0755 "${PROJECT_SOURCE_DATA_DIR}"/executable_loader.in "${MACOS}"/rawtherapee -# app bundle resources -cp "${PROJECT_SOURCE_DATA_DIR}"/{rawtherapee,profile}.icns "${RESOURCES}" -cp "${PROJECT_SOURCE_DATA_DIR}"/PkgInfo "${CONTENTS}" -install -m 0644 "${PROJECT_SOURCE_DATA_DIR}"/Info.plist.in "${CONTENTS}"/Info.plist -sed -i "" -e "s|@version@|${PROJECT_VERSION}| +# Executable loader +# Note: executable is renamed to 'rawtherapee-bin'. +mv "${MACOS}/rawtherapee" "${MACOS}/rawtherapee-bin" +install -m 0755 "${PROJECT_SOURCE_DATA_DIR}/executable_loader.in" "${MACOS}/rawtherapee" +# App bundle resources +cp "${PROJECT_SOURCE_DATA_DIR}/"{rawtherapee,profile}.icns "${RESOURCES}" +cp "${PROJECT_SOURCE_DATA_DIR}/PkgInfo" "${CONTENTS}" +install -m 0644 "${PROJECT_SOURCE_DATA_DIR}/Info.plist.in" "${CONTENTS}/Info.plist" +sed -i "" -e "s|@version@|${PROJECT_FULL_VERSION}| s|@shortVersion@|${PROJECT_VERSION}| s|@arch@|${arch}|" \ -"${CONTENTS}"/Info.plist -plutil -convert binary1 "${CONTENTS}"/Info.plist + "${CONTENTS}/Info.plist" +plutil -convert binary1 "${CONTENTS}/Info.plist" function CreateDmg { - local srcdir="$(mktemp -dt $$)" + local srcDir="$(mktemp -dt $$)" - message "Preparing disk image sources at ${srcdir}" - mv "${APP}" "${srcdir}" - cp AboutThisBuild.txt "${srcdir}" - ln -s /Applications "${srcdir}" + msg "Preparing disk image sources at ${srcDir}:" + cp -R "${APP}" "${srcDir}" + cp AboutThisBuild.txt "${srcDir}" + ln -s /Applications "${srcDir}" - # web bookmarks + # Web bookmarks function CreateWebloc { - defaults write "${srcdir}/$1" URL "$2" - mv "${srcdir}/$1".{plist,webloc} + defaults write "${srcDir}/$1" URL "$2" + mv "${srcDir}/$1".{plist,webloc} } - CreateWebloc 'RawTherapee Blog' 'http://www.rawtherapee.com' - CreateWebloc 'Online Manual' 'http://rawpedia.rawtherapee.com/' + CreateWebloc 'Website' 'http://www.rawtherapee.com/' + CreateWebloc 'Manual' 'http://rawpedia.rawtherapee.com/' - # disk image name + # Disk image name dmg_name="${PROJECT_NAME// /_}_OSX_${MINIMUM_SYSTEM_VERSION}_${PROC_BIT_DEPTH}_${PROJECT_FULL_VERSION}" - if ! echo "${CMAKE_BUILD_TYPE}" | grep -sqi "release"; then - dmg_name="${dmg_name}_$(echo ${CMAKE_BUILD_TYPE} | tr '[:upper:]' '[:lower:]')" + lower_build_type="$(tr '[:upper:]' '[:lower:]' <<< "$CMAKE_BUILD_TYPE")" + if [[ ${lower_build_type} != release ]]; then + dmg_name="${dmg_name}_${lower_build_type}" fi - message "Creating disk image" - hdiutil create -format UDBZ -srcdir "${srcdir}" -volname "${PROJECT_NAME}_${PROJECT_FULL_VERSION}" "${dmg_name}".dmg + msg "Creating disk image:" + hdiutil create -format UDBZ -srcdir "${srcDir}" -volname "${PROJECT_NAME}_${PROJECT_FULL_VERSION}" "${dmg_name}.dmg" - message "Removing disk image caches" - rm -rf "${srcdir}" + # Zip disk image for redistribution + zip "${dmg_name}.zip" "${dmg_name}.dmg" AboutThisBuild.txt + rm "${dmg_name}.dmg" + + msg "Removing disk image caches:" + rm -rf "${srcDir}" } CreateDmg diff --git a/tools/source_icons/scalable/expanderClosed.file b/tools/source_icons/scalable/expanderClosed.file index 039041106..46bb9877d 100644 --- a/tools/source_icons/scalable/expanderClosed.file +++ b/tools/source_icons/scalable/expanderClosed.file @@ -1 +1 @@ -expanderClosed.png,w18,actions +expanderClosed.png,w14,actions diff --git a/tools/source_icons/scalable/expanderClosed.svg b/tools/source_icons/scalable/expanderClosed.svg index ca47969f8..b9778cca4 100644 --- a/tools/source_icons/scalable/expanderClosed.svg +++ b/tools/source_icons/scalable/expanderClosed.svg @@ -10,11 +10,11 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1300" + width="1000" height="1000" id="svg2" sodipodi:version="0.32" - inkscape:version="0.48.3.1 r9886" + inkscape:version="0.91 r13725" sodipodi:docname="expanderClosed.svg" inkscape:export-filename="/home/philippe/devel/rawtherapee/icons/NewIcons/crop22.png" inkscape:export-xdpi="2.1600001" @@ -637,13 +637,13 @@ id="stop4223-6" /> + height="1.3672854" + style="color-interpolation-filters:sRGB"> image/svg+xml - + @@ -717,12 +717,12 @@ transform="matrix(1.5074827,0,0,1.5074827,-9.4212231,-17.89429)"> + transform="matrix(0,-1.0901186,1.0901183,0,-116.40447,102.17828)"> image/svg+xml - + @@ -619,12 +619,12 @@ id="g4060" transform="matrix(1.5074827,0,0,1.5074827,-9.4212231,-17.89429)"> diff --git a/tools/source_icons/scalable/expanderEnabled.file b/tools/source_icons/scalable/expanderEnabled.file index 790e109da..0835d223a 100644 --- a/tools/source_icons/scalable/expanderEnabled.file +++ b/tools/source_icons/scalable/expanderEnabled.file @@ -1 +1 @@ -expanderEnabled.png,w18,actions +expanderEnabled.png,w14,actions diff --git a/tools/source_icons/scalable/expanderEnabled.svg b/tools/source_icons/scalable/expanderEnabled.svg index 1407ca335..4606416c0 100644 --- a/tools/source_icons/scalable/expanderEnabled.svg +++ b/tools/source_icons/scalable/expanderEnabled.svg @@ -10,11 +10,11 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1300" + width="1000" height="1000" id="svg2" sodipodi:version="0.32" - inkscape:version="0.48.3.1 r9886" + inkscape:version="0.91 r13725" sodipodi:docname="expanderEnabled.svg" inkscape:export-filename="/home/philippe/devel/rawtherapee/icons/NewIcons/crop22.png" inkscape:export-xdpi="2.1600001" @@ -555,7 +555,7 @@ + style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB"> + style="color-interpolation-filters:sRGB"> image/svg+xml - + @@ -1222,7 +1222,7 @@ id="g4060" transform="matrix(1.5074827,0,0,1.5074827,-9.4212231,-17.89429)"> diff --git a/tools/source_icons/scalable/expanderOpened.file b/tools/source_icons/scalable/expanderOpened.file index c2175efad..f6bfd1a54 100644 --- a/tools/source_icons/scalable/expanderOpened.file +++ b/tools/source_icons/scalable/expanderOpened.file @@ -1 +1 @@ -expanderOpened.png,w18,actions +expanderOpened.png,w14,actions diff --git a/tools/source_icons/scalable/expanderOpened.svg b/tools/source_icons/scalable/expanderOpened.svg index c00fe2d85..a0092792c 100644 --- a/tools/source_icons/scalable/expanderOpened.svg +++ b/tools/source_icons/scalable/expanderOpened.svg @@ -10,11 +10,11 @@ xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="1300" + width="1000" height="1000" id="svg2" sodipodi:version="0.32" - inkscape:version="0.48.3.1 r9886" + inkscape:version="0.91 r13725" sodipodi:docname="expanderOpened.svg" inkscape:export-filename="/home/philippe/devel/rawtherapee/icons/NewIcons/crop22.png" inkscape:export-xdpi="2.1600001" @@ -637,13 +637,13 @@ id="stop4223-6" /> + height="1.3672854" + style="color-interpolation-filters:sRGB"> image/svg+xml - + @@ -727,12 +727,12 @@ transform="matrix(1.5074827,0,0,1.5074827,-9.4212231,-17.89429)"> + transform="matrix(1.0901186,0,0,1.0901184,-42.507088,11.516234)"> - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/tools/win/InnoSetup/WindowsInnoSetup.iss.in b/tools/win/InnoSetup/WindowsInnoSetup.iss.in index 1ba02590d..55305d5f0 100644 --- a/tools/win/InnoSetup/WindowsInnoSetup.iss.in +++ b/tools/win/InnoSetup/WindowsInnoSetup.iss.in @@ -1,30 +1,26 @@ -; Script initially generated by the Inno Setup Script Wizard -; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! - - - -; This script has to be used by "INNO Setup" (http://www.jrsoftware.org/) to create a setup executable. -; When the "make install" process ends, you can double click on this file to load it into -; INNO Setup, then execute it to create the archive. It expect to find all the dependency libs -; in the root destination folder (the one of the 'make install' process), and the usual 'lib' directory. -; Please note that all *.dll files will be added, so be carefull on which dll are present in the directory -; before compiling the INNO Setup script. +; Script initially generated by the Inno Setup Script Wizard. +; Documentation: http://www.jrsoftware.org/ishelp/ ; -; It also search for and bundles all "rawtherapee*.exe" files, which mean that you can bundle a Release and -; a Debug build at the same time (for conveniency), but official downloads must only contain the Release -; version. +; This script is used by "Inno Setup" (http://www.jrsoftware.org/) to create a +; setup executable. When the "make install" process ends, double-click on this +; file to load it into Inno Setup, then execute it to create the installer. It +; expects to find all the dependency libs in the root destination folder (the +; one from the 'make install' process), and the usual 'lib' directory. +; Note that all *.dll files will be added, so be careful which DLLs are present +; in the folder before running this script. ; -; In all cases, you have to bundle at least one file named "rawtherapee.exe", which INNO Setup will require -; as a default executable to run. +; This script searches for and bundles all "rawtherapee*.exe" files, allowing +; you to bundle a "release" as well as a "debug" version at the same time. +; At least one "rawtherapee.exe" file is required. ; -; This script is configured to check that the operating system's bit depth is the same than the executable file. -; Please note that the ia64 architecture is not supported (is it really necessary?) - - +; This script is configured to check that the operating system's bit depth is +; the same as that of the executable file. +; +; The IA-64 architecture is not supported. #define MyAppName "RawTherapee" -#define MyAppVersion "${GIT_VERSION}" -#define MyAppFullVersion "${GIT_VERSION}.${GIT_TAGDISTANCE}" +#define MyAppVersion "${GIT_DESCRIBE}" +#define MyAppVersionNumeric "${GIT_NUMERIC_VERSION_BS}" #define MyAppPublisher "rawtherapee.com" #define MyAppURL "http://www.rawtherapee.com/" #define MyAppExeName "rawtherapee.exe" @@ -39,21 +35,20 @@ ; NOTE: The value of AppId uniquely identifies this application. ; Do not use the same AppId value in installers for other applications. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) -AppId={{128459AB-59A7-430A-8BD0-3D8803D50400} +AppId={#MyAppName}{#MyAppVersion} AppName={#MyAppName} AppVersion={#MyAppVersion} -VersionInfoVersion={#MyAppFullVersion} -;AppVerName={#MyAppName} {#MyAppVersion} +VersionInfoVersion={#MyAppVersionNumeric} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} -DefaultDirName={pf}\{#MyAppName}-{#MyAppFullVersion} -DefaultGroupName={#MyAppName} {#MyAppFullVersion} +DefaultDirName={pf}\{#MyAppName}\{#MyAppVersion} +DefaultGroupName={#MyAppName} AllowNoIcons=yes LicenseFile={#MyBuildBasePath}\LICENSE.txt OutputDir={#MyBuildBasePath}\..\ -OutputBaseFilename={#MyAppName}_{#MySystemName}_{#MyBitDepth}_{#MyAppFullVersion} +OutputBaseFilename={#MyAppName}_{#MyAppVersion}_{#MySystemName}_{#MyBitDepth} SetupIconFile={#MySourceBasePath}\rtdata\icons\RT.ico WizardImageFile={#MySourceBasePath}\tools\win\InnoSetup\installerStrip.bmp WizardImageBackColor=$2A2A2A @@ -79,7 +74,6 @@ Name: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl" Name: "hungarian"; MessagesFile: "compiler:Languages\Hungarian.isl" Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl" Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl" -Name: "nepali"; MessagesFile: "compiler:Languages\Nepali.islu" Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl" Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl" Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl" @@ -97,7 +91,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{ Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1 [Files] -Source: "{#MyBuildBasePath}\rawtherapee.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#MyBuildBasePath}\rawtherapee*.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "{#MyBuildBasePath}\camconst.json"; DestDir: "{app}"; Flags: ignoreversion Source: "{#MyBuildBasePath}\dcpprofiles\*"; DestDir: "{app}\dcpprofiles\"; Flags: ignoreversion recursesubdirs createallsubdirs ;Source: "{#MyBuildBasePath}\etc\*"; DestDir: "{app}\etc\"; Flags: ignoreversion recursesubdirs createallsubdirs @@ -122,11 +116,11 @@ Source: "{#MyBuildBasePath}\fonts\DroidSansMonoSlashed.ttf"; DestDir: "{fonts}"; ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] -Name: "{group}\{#MyAppName} {#MyAppFullVersion}"; Filename: "{app}\{#MyAppExeName}" +Name: "{group}\{#MyAppName} {#MyAppVersion}"; Filename: "{app}\{#MyAppExeName}" Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" -Name: "{commondesktop}\{#MyAppName}{#MyAppFullVersion}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon -Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName} {#MyAppFullVersion}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon +Name: "{commondesktop}\{#MyAppName} {#MyAppVersion}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon +Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName} {#MyAppVersion}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon [Run] Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent diff --git a/win.cmake b/win.cmake index b4bbc66a2..3b330ebe0 100644 --- a/win.cmake +++ b/win.cmake @@ -1,10 +1,10 @@ # Use the 'Debug' build type to have a non optimized, with debugging information, with a console executable # Use the 'Release' build type to have an optimized, without debugging information, console free executable # Use the 'RelWithDebInfo' build type to have an optimized, without debugging information, with a console executable -# Use the 'MinSizeRel' build type to have the smallest possible, without debugging information, console free executable +# Use the 'MinSizeRel' build type to have the smallest possible, without debugging information, console free executable #set(CMAKE_BUILD_TYPE Release CACHE STRING "Between: None Debug Release RelWithDebInfo MinSizeRel.") -set(CMAKE_INSTALL_PREFIX ./Builds/${CMAKE_BUILD_TYPE} CACHE PATH "Libraries installation path") +set(CMAKE_INSTALL_PREFIX ./${CMAKE_BUILD_TYPE} CACHE PATH "Libraries installation path") set(DATADIR . CACHE PATH "Datas installation path") set(BINDIR . CACHE PATH "Binaries installation path") set(LIBDIR . CACHE PATH "Libraries installation path") @@ -22,32 +22,29 @@ set(CACHE_NAME_SUFFIX "" CACHE STRING "RawTherapee's cache folder suffix (leave # This line will let you chose the target number, and the associated processor set(PROC_TARGET_NUMBER 0 CACHE STRING "Target Processor") -# To add a version suffix (text) after the standard version number, e.g. for patched builds -set(VERSION_SUFFIX "" CACHE STRING "For patched builds, use this string to add a version suffix (text); KEEP EMPTY FOR RELEASE BULDS") - # If you want to force the target processor name when PROC_TARGET_NUMBER = 0 or 2, # uncomment the next line and replace labelWithoutQuotes by its value #set (PROC_LABEL labelWithoutQuotes CACHE STRING "Target Processor label") # Important: MinGW-w64 user may need to specify the -m32 or -m64 flag in CMAKE_CXX_FLAGS, # CMAKE_C_FLAGS and CMAKE_EXE_LINKER_FLAGS to select between 32/64bit build -set(CMAKE_CXX_FLAGS "-mwin32 -mthreads" CACHE STRING "Compiler options for C++ source files") +set(CMAKE_CXX_FLAGS "-mwin32 -m64 -mthreads -msse2" CACHE STRING "Compiler options for C++ source files") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g2" CACHE STRING "Compiler options for C++ source files and Debug target") -set(CMAKE_CXX_FLAGS_RELEASE "-mwindows -DNDEBUG -O2" CACHE STRING "Compiler options for C++ source files and Release target") -set(CMAKE_CXX_FLAGS_MINSIZEREL "-mwindows -DNDEBUG -Os" CACHE STRING "Compiler options for C++ source files and MinSizeRel target") +set(CMAKE_CXX_FLAGS_RELEASE "-Wno-aggressive-loop-optimizations -DNDEBUG -O3" CACHE STRING "Compiler options for C++ source files and Release target") +set(CMAKE_CXX_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Compiler options for C++ source files and MinSizeRel target") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Compiler options for C++ source files and RelWithDebInfo target") # Uncomment the next line and set the right value to override the default value (special compiling flags for RTEngine) #set(RTENGINE_CXX_FLAGS "-funroll-loops" CACHE STRING "Special compilation flags for RTEngine") -set(CMAKE_C_FLAGS "-mwin32 -mthreads" CACHE STRING "Compiler options for C source files") +set(CMAKE_C_FLAGS "-mwin32 -m64 -mthreads -msse2" CACHE STRING "Compiler options for C source files") set(CMAKE_C_FLAGS_DEBUG "-O0 -g2" CACHE STRING "Compiler options for C source files and Debug target") -set(CMAKE_C_FLAGS_RELEASE "-mwindows -DNDEBUG -O2" CACHE STRING "Compiler options for C source files and Release target") -set(CMAKE_C_FLAGS_MINSIZEREL "-mwindows -DNDEBUG -Os" CACHE STRING "Compiler options for C source files and MinSizeRel target") +set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2" CACHE STRING "Compiler options for C source files and Release target") +set(CMAKE_C_FLAGS_MINSIZEREL "-DNDEBUG -Os" CACHE STRING "Compiler options for C source files and MinSizeRel target") set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Compiler options for C source files and RelWithDebInfo target") -set(CMAKE_EXE_LINKER_FLAGS "-mwin32 -mthreads -static-libgcc -Wl,--large-address-aware,--verbose" CACHE STRING "Linker options") +set(CMAKE_EXE_LINKER_FLAGS "-m64 -mthreads -static-libgcc" CACHE STRING "Linker options") set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-O0" CACHE STRING "Linkage options for the Debug target") -set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-mwindows -s -O2" CACHE STRING "Linkage options for the Release target") -set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-mwindows -s -Os" CACHE STRING "Linkage options for the MinSizeRel target") +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s -O3" CACHE STRING "Linkage options for the Release target") +set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-s -Os" CACHE STRING "Linkage options for the MinSizeRel target") set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "-s -O2" CACHE STRING "Linkage options for the RelWithDebInfo target")